You can use the stx_transferStx
method to request a transfer of any amount of Stacks to any recipient from the user's wallet.
Request parameters | Description |
---|---|
The user will be prompted to review the Stacks transfer transaction in the wallet, with the recipient, memo and amount to send. Xverse browser extension UI shown as example:
The transaction will be signed and broadcasted upon user approval.
The stx_transferStx
method returns a Promise that resolves to the TransferStxResult
object:
Property | Description |
---|---|
txid
a hex-encoded string representing the ID of the transfer STX transaction signed
transaction
a hex-encoded string reperesenting the transfer STX transaction signed
amount
a string representing the amount of STX tokens to transfer, in microstacks units. (Anything parseable by BigInt
is acceptable)
recipient
a string representing the recipient's Crockford base-32 encoded Stacks address
memo
Optional a string representing the transaction memo