Skip to main content

sendtoaddress

Send an amount of Yerbas to a given address

Basic syntax

sendtoaddress <address> <amount> [<own_note> <recipient_note>]

Arguments

ArgumentTypeDescription
addressstringDestination addressRequired
amountnumberDesired amount in YerbasRequired
future:{json}'{"future_maturity": n, "future_locktime": n}'Optional
↳ future_maturity: nnumbernumber of confirmation for this future to mature.
↳ future_locktime: nnumbertime in seconds from first confirmation for future to mature
commentstringA comment about the transaction (private)Optional
comment_tostringA comment about the receiving person or organization (private)Optional

yerbas-cli

yerbas-cli help sendtoaddress output:

Arguments:
1. "address" (string, required) The yerbas address to send to.
2. "amount" (numeric or string, required) The amount in YERB to send. eg 0.1
3. "future" (string, optional) future transaction is mature when it has enough confirmation or locktime in seconds has past from its first confirm
{
"future_maturity":n, (numeric, required) number of confirmation for this future to mature.
"future_locktime":n (numeric, required) total time in seconds from its first confirmation for this future to mature
}
4. "comment" (string, optional) A comment used to store what the transaction is for.
This is not part of the transaction, just kept in your wallet.
5. "comment_to" (string, optional) A comment to store the name of the person or organization
to which you're sending the transaction. This is not part of the
transaction, just kept in your wallet.
6. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.
The recipient will receive less amount of Yerbas than you enter in the amount field.
7. "use_is" (bool, optional, default=false) Deprecated and ignored
8. "use_cj" (bool, optional, default=false) Use CoinJoin funds only
9. conf_target (numeric, optional) Confirmation target (in blocks)
10. "estimate_mode" (string, optional, default=UNSET) The fee estimate mode, must be one of:
"UNSET"
"ECONOMICAL"
"CONSERVATIVE"

Output

ResultTypeDescription
txidstringThe transaction id of the submitted transaction

Examples

Using the Yerbas-CLI:

Sending a simple 100 YERB transaction to a friend, with a note:

yerbasium-cli sendtoaddress <address> <amount> <"own_note"> <"recipient_note">

yerbasium-cli sendtoaddress XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG 100 "donation to you" "friend from club"

Sending a 50 YERB Futures transaction with a note, set to release after 100 block verifications and after 7 days (60s x 60m x 24h x 7d = 604800s):

yerbasium-cli sendtoaddress <address> <amount> '{"future_maturity": unlock_time_blocks, "future_locktime": unlock_time_seconds}' <"own_note">

yerbasium-cli sendtoaddress XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG 100 '{"future_maturity":100, "future_locktime": 604800}' "This will unlock in 7 days"


Using the RPC API:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendtoaddress", "params": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/