sendtoaddress
Send an amount of Yerbas to a given address
Basic syntax
sendtoaddress <address> <amount> [<own_note> <recipient_note>]
Arguments
Argument | Type | Description | |
---|---|---|---|
address | string | Destination address | Required |
amount | number | Desired amount in Yerbas | Required |
future: | {json} | '{"future_maturity": n, "future_locktime": n}' | Optional |
↳ future_maturity: n | number | number of confirmation for this future to mature. | |
↳ future_locktime: n | number | time in seconds from first confirmation for future to mature | |
comment | string | A comment about the transaction (private) | Optional |
comment_to | string | A 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
Result | Type | Description |
---|---|---|
txid | string | The 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/