diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-07-09 17:46:36 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-07-09 17:46:36 -0230 |
| commit | 6b87616fdd259c3669cd8de88ccb0136aa1d7f00 (patch) | |
| tree | 7d52de378c57f017f1261d9075db8011cd8b2657 /xmrpayclnt.go | |
| parent | 0db3af48c9bd5dfaf2b689672cf315f11c0126c4 (diff) | |
| download | xmrpayclnt-6b87616fdd259c3669cd8de88ccb0136aa1d7f00.zip | |
rename Receive to NewTx
Diffstat (limited to 'xmrpayclnt.go')
| -rw-r--r-- | xmrpayclnt.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmrpayclnt.go b/xmrpayclnt.go index 5d865bf..bb034bb 100644 --- a/xmrpayclnt.go +++ b/xmrpayclnt.go @@ -60,12 +60,13 @@ func (c *Client) Health(ctx context.Context) (bool, error) { return err == nil, err } -// Receive creates a subaddress for incoming transfers. -func (c *Client) Receive(ctx context.Context, amount uint64, description string) (model.ReceivePostResponse, error) { +// NewTx creates a subaddress for incoming transfers. +func (c *Client) NewTx(ctx context.Context, amount uint64, description string) (model.ReceivePostResponse, error) { return c.postReceive(ctx, amount, description, "") } -func (c *Client) ReceiveWithCallback(ctx context.Context, amount uint64, description string, ch *CallbackHandler) (model.ReceivePostResponse, Callback, error) { +// NewTxWithCallback creates a subaddress and a callback to monitor it. +func (c *Client) NewTxWithCallback(ctx context.Context, amount uint64, description string, ch *CallbackHandler) (model.ReceivePostResponse, Callback, error) { cb := ch.listen() if resp, err := c.postReceive(ctx, amount, description, cb.url.String()); err == nil { return resp, cb, nil |