From 6b87616fdd259c3669cd8de88ccb0136aa1d7f00 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 9 Jul 2026 17:46:36 -0230 Subject: rename Receive to NewTx --- xmrpayclnt.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xmrpayclnt.go') 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 -- cgit v1.2.3