aboutsummaryrefslogtreecommitdiffstats
path: root/xmrpayclnt.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmrpayclnt.go')
-rw-r--r--xmrpayclnt.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/xmrpayclnt.go b/xmrpayclnt.go
index bb034bb..2ecd183 100644
--- a/xmrpayclnt.go
+++ b/xmrpayclnt.go
@@ -76,6 +76,18 @@ func (c *Client) NewTxWithCallback(ctx context.Context, amount uint64, descripti
}
}
+// GetTxStatus retrieves information about a transfer on a subaddress.
+func (c *Client) GetTxStatus(ctx context.Context, address string) (model.ReceiveGetResponse, error) {
+ var resp model.ReceiveGetResponse
+ url := c.endpoint.JoinPath(receivePath, address)
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, url.String(), nil)
+ if err != nil {
+ return resp, err
+ }
+ err = c.c.Do(req, http.StatusOK, &resp)
+ return resp, err
+}
+
func (c *Client) postReceive(ctx context.Context, amount uint64, description string, callbackUrl string) (model.ReceivePostResponse, error) {
var resp model.ReceivePostResponse