aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-07-09 17:46:51 -0230
committerSam Anthony <sam@samanthony.xyz>2026-07-09 17:46:51 -0230
commit4eba6615431acf2ccfa8d70f63b3fc6aa54b62b4 (patch)
tree7d76201e87a0d6d0d3ff5d7a5857fe7fcb67c56f
parent6b87616fdd259c3669cd8de88ccb0136aa1d7f00 (diff)
downloadxmrpayclnt-4eba6615431acf2ccfa8d70f63b3fc6aa54b62b4.zip
GetTxStatus()v0.1.0
-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