Wallet RPC guide refresh + Finalized for all languages (except PL):

- get_balance;
- get_address;
- get_address_index;
- create_address;
- label_address;
- get_accounts;
- create_account;
- label_account;
- get_account_tags;
- tag_accounts;
- untag_accounts;
- set_account_tag_description;
- get_height;
- transfer;
- transfer_split;
- sign_transfer;
- submit_transfer;
- sweep_dust;
- sweep_all;
- sweep_single;
- relay_tx;
- store;
- get_payments;
- get_bulk_payments;
- incoming_transfers;
- query_key;
- make_integrated_address;
- split_integrated_address;
- stop_wallet;
- rescan_blockchain;
- set_tx_notes;
- get_tx_notes;
- set_attribute;
- get_attribute;
- get_tx_key;
- check_tx_key;
- get_tx_proof;
- check_tx_proof;
- get_spend_proof;
- check_spend_proof;
- get_reserve_proof;
- check_reserve_proof;
- get_transfers; (including clarification proposed in #703)
- get_transfer_by_txid;
- sign;
- verify;
- export_outputs;
- import_outputs;
- export_key_images;
- import_key_images;
- make_uri;
- parse_uri;
- get_address_book;
- add_address_book;
- delete_address_book;
- refresh;
- rescan_spent;
- start_mining;
- stop_mining;
- get_languages;
- create_wallet;
- open_wallet;
- close_wallet;
- change_wallet_password;
- is_multisig;
- prepare_multisig;
- make_multisig;
- export_multisig_info;
- import_multisig_info;
- finalize_multisig;
- sign_multisig;
- submit_multisig;
- get_version;
parent a1a3fd14
{% assign version = '1.2.0' | split: '.' %}
{% assign version = '2.1.0' | split: '.' %}
{% include disclaimer.html translated="false" version=page.version %}
## Introduction
......@@ -33,64 +33,98 @@ curl \
Note: "@atomic-units" refer to the smallest fraction of 1 XMR according to the monerod implementation. **1 XMR = 1e12 @atomic-units.**
This list has been updated on a frozen code on 2018-09-14 after merged commit bb30a7236725e456138f055f96a634c75ce2b491 (Wallet RPC version 1.3), and at block height 1643308.
### Index of JSON RPC Methods:
* [getbalance](#getbalance)
* [getaddress](#getaddress)
* [getheight](#getheight)
* [get_balance](#get_balance)
* [get_address](#get_address)
* [get_address_index](#get_address_index)
* [create_address](#create_address)
* [label_address](#label_address)
* [get_accounts](#get_accounts)
* [create_account](#create_account)
* [label_account](#label_account)
* [get_account_tags](#get_account_tags)
* [tag_accounts](#tag_accounts)
* [untag_accounts](#untag_accounts)
* [set_account_tag_description](#set_account_tag_description)
* [get_height](#get_height)
* [transfer](#transfer)
* [transfer_split](#transfer_split)
* [sign_transfer](#sign_transfer)
* [submit_transfer](#submit_transfer)
* [sweep_dust](#sweep_dust)
* [sweep_all](#sweep_all)
* [sweep_single](#sweep_single)
* [relay_tx](#relay_tx)
* [store](#store)
* [get_payments](#get_payments)
* [get_bulk_payments](#get_bulk_payments)
* [get_transfers](#get_transfers)
* [get_transfer_by_txid](#get_transfer_by_txid)
* [incoming_transfers](#incoming_transfers)
* [query_key](#query_key)
* [make_integrated_address](#make_integrated_address)
* [split_integrated_address](#split_integrated_address)
* [stop_wallet](#stop_wallet)
* [make_uri](#make_uri)
* [parse_uri](#parse_uri)
* [rescan_blockchain](#rescan_blockchain)
* [set_tx_notes](#set_tx_notes)
* [get_tx_notes](#get_tx_notes)
* [set_attribute](#set_attribute)
* [get_attribute](#get_attribute)
* [get_tx_key](#get_tx_key)
* [check_tx_key](#check_tx_key)
* [get_tx_proof](#get_tx_proof)
* [check_tx_proof](#check_tx_proof)
* [get_spend_proof](#get_spend_proof)
* [check_spend_proof](#check_spend_proof)
* [get_reserve_proof](#get_reserve_proof)
* [check_reserve_proof](#check_reserve_proof)
* [get_transfers](#get_transfers)
* [get_transfer_by_txid](#get_transfer_by_txid)
* [sign](#sign)
* [verify](#verify)
* [export_outputs](#export_outputs)
* [import_outputs](#import_outputs)
* [export_key_images](#export_key_images)
* [import_key_images](#import_key_images)
* [make_uri](#make_uri)
* [parse_uri](#parse_uri)
* [get_address_book](#get_address_book)
* [add_address_book](#add_address_book)
* [delete_address_book](#delete_address_book)
* [refresh](#refresh)
* [rescan_spent](#rescan_spent)
* [start_mining](#start_mining)
* [stop_mining](#stop_mining)
* [get_languages](#get_languages)
* [create_wallet](#create_wallet)
* [open_wallet](#open_wallet)
* [get_accounts](#get_accounts)
* [create_account](#create_account)
* [label_account](#label_account)
* [create_address](#create_address)
* [label_address](#label_address)
* [get_account_tags](#get_account_tags)
* [tag_accounts](#tag_accounts)
* [untag_accounts](#untag_accounts)
* [set_account_tag_description](#set_account_tag_description)
* [close_wallet](#close_wallet)
* [change_wallet_password](#change_wallet_password)
* [is_multisig](#is_multisig)
* [prepare_multisig](#prepare_multisig)
* [make_multisig](#make_multisig)
* [export_multisig_info](#export_multisig_info)
* [import_multisig_info](#import_multisig_info)
* [finalize_multisig](#finalize_multisig)
* [sign_multisig](#sign_multisig)
* [submit_multisig](#submit_multisig)
* [get_version](#get_version)
---
## JSON RPC Methods:
### **getbalance**
### **get_balance**
Return the wallet's balance.
Alias: *getbalance*.
Inputs:
* *account_index* - unsigned int; Return balance for this account.
* *address_indices* - array of unsigned int; (Optional) Return balance detail for those subaddresses.
Outputs:
......@@ -108,32 +142,40 @@ Outputs:
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getbalance","params":{"account_index":0}}' -H 'Content-Type: application/json'
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_balance","params":{"account_index":0,"address_indices":[0,1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"balance": 140000000000,
"unlocked_balance": 50000000000,
"balance": 157443303037455077,
"multisig_import_needed": false,
"per_subaddress": {
"per_subaddress": [{
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"address_index": 0,
"address": "427ZuEhNJQRXoyJAeEoBaNW56ScQaLXyyQWgxeRL9KgAUhVzkvfiELZV7fCPBuuB2CGuJiWFQjhnhhwiH1FsHYGQGaDsaBA",
"balance": 140000000000,
"unlocked_balance": 50000000000,
"balance": 157360317826255077,
"label": "Primary account",
"num_unspent_outputs": 5281,
"unlocked_balance": 157360317826255077
},{
"address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
"address_index": 1,
"balance": 59985211200000,
"label": "",
"num_unspent_outputs": 42
}
"num_unspent_outputs": 1,
"unlocked_balance": 59985211200000
}],
"unlocked_balance": 157443303037455077
}
}
```
### **getaddress**
### **get_address**
Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
Alias: *getaddress*.
Inputs:
* *account_index* - unsigned int; Return subaddresses for this account.
......@@ -142,1001 +184,1935 @@ Inputs:
Outputs:
* *address* - string; The 95-character hex address string of the monero-wallet-rpc in session.
* *addresses* array of addresses informations
* *address* string; The 95-character hex (sub)address string.
* *label* string; Label of the (sub)address
* *address_index* unsigned int; index of the subaddress
* *used* boolean; states if the (sub)address has already received funds
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getaddress","params":{"account_index":0,"address_index":[0,1]}}' -H 'Content-Type: application/json'
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address","params":{"account_index":0,"address_index":[0,1,4]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"address": "427ZuEhNJQRXoyJAeEoBaNW56ScQaLXyyQWgxeRL9KgAUhVzkvfiELZV7fCPBuuB2CGuJiWFQjhnhhwiH1FsHYGQGaDsaBA",
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"addresses": [{
"address": "427ZuEhNJQRXoyJAeEoBaNW56ScQaLXyyQWgxeRL9KgAUhVzkvfiELZV7fCPBuuB2CGuJiWFQjhnhhwiH1FsHYGQGaDsaBA",
"address_index": 0,
"label": "Primary account",
"used": false
},{
"address": "88bV1uo76AaKZaWD389kCf5EfPxKFYEKUQbs9ZRJm23E2X2oYgV9bQ54FiY6hAB83aDXMUSZF6KWyfeQqzLqaAeeFrk9iic",
"address_index": 1,
"label": "",
"used": false
}]
"address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"address_index": 0,
"label": "Primary account",
"used": true
},{
"address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
"address_index": 1,
"label": "",
"used": true
},{
"address": "77xa6Dha7kzCQuvmd8iB5VYoMkdenwCNRU9khGhExXQ8KLL3z1N1ZATBD1sFPenyHWT9cm4fVFnCAUApY53peuoZFtwZiw5",
"address_index": 4,
"label": "test2",
"used": true
}]
}
}
```
### **getheight**
Returns the wallet's current block height.
### **get_address_index**
Inputs: *None*.
Get account and address indexes from a specific (sub)address
Alias: *None*.
Inputs:
* *address* - String; (sub)address to look for.
Outputs:
* *height* - unsigned int; The current monero-wallet-rpc's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.
* *index* - subaddress informations
* *major* unsigned int; Account index.
* *minor* unsigned int; Address index.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getheight"}' -H 'Content-Type: application/json'
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_index","params":{"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"height": 994310
"index": {
"major": 0,
"minor": 1
}
}
}
```
### **transfer**
### **create_address**
Send monero to a number of recipients.
Create a new address for an account. Optionally, label the new address.
Inputs:
Alias: *None*.
* *destinations* - array of destinations to receive XMR:
* *amount* - unsigned int; Amount to send to each destination, in @atomic-units.
* *address* - string; Destination public address.
* *account_index* - unsigned int; Transfer from this account index.
* *subaddr_indices* - array of unsigned int; Transfer from this set of subaddresses.
* *fee* - unsigned int; Ignored, will be automatically calculated.
* *mixin* - unsigned int; Number of outpouts from the blockchain to mix with (0 means no mixing).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_key* - boolean; (Optional) Return the transaction key after sending.
* *priority* - unsigned int; Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
* *do_not_relay* - boolean; (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
* *get_tx_hex* - boolean; Return the transaction as hex string after sending
* *get_tx_metadata* - boolean; Return the metadata needed to relay the transaction.
Inputs:
* *account_index* - unsigned int; Create a new address for this account.
* *label* - string; (Optional) Label for the new address.
Outputs:
* *fee* - Integer value of the fee charged for the txn.
* *tx_hash* - String for the publically searchable transaction hash
* *tx_key* - String for the transaction key if get_tx_key is true, otherwise, blank string.
* *amount* - Amount transferred for the transaction.
* *tx_blob* - Raw transaction represented as hex string, if get_tx_hex is true.
* *tx_metadata* - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.
* *multisig_txset* - Set of multisig transactions in the process of being signed (empty for non-multisig).
* *address* - string; Newly created address. Base58 representation of the public keys.
* *address_index* - unsigned int; Index of the new address under the input account.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000,"address":"9wNgSYy2F9qPZu7KBjvsFgZLTKE2TZgEpNFbGka9gA5zPmAXS35QzzYaLKJRkYTnzgArGNX7TvSqZC87tBLwtaC5RQgJ8rm"},{"amount":200000000,"address":"9vH5D7Fv47mbpCpdcthcjU34rqiiAYRCh1tYywmhqnEk9iwCE9yppgNCXAyVHG5qJt2kExa42TuhzQfJbmbpeGLkVbg8xit"}],"mixin":4,"get_tx_key": true}}' -H 'Content-Type: application/json'
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":0,"label":"new-sub"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"fee": 48958481211,
"tx_hash": "985180f468637bc6d2f72ee054e1e34b8d5097988bb29a2e0cb763e4464db23c",
"tx_key": "8d62e5637f1fcc9a8904057d6bed6c697618507b193e956f77c31ce662b2ee07",
"amount": 300000000,
"tx_blob": "",
"tx_metadata": "",
"multisig_txset": ""
"address": "7BG5jr9QS5sGMdpbBrZEwVLZjSKJGJBsXdZLt8wiXyhhLjy7x2LZxsrAnHTgD8oG46ZtLjUGic2pWc96GFkGNPQQDA3Dt7Q",
"address_index": 5
}
}
```
### **transfer_split**
### **label_address**
Same as transfer, but can split into more than one tx if necessary.
Label an address.
Inputs:
Alias: *None*.
* *destinations* - array of destinations to receive XMR:
* *amount* - unsigned int; Amount to send to each destination, in @atomic-units.
* *address* - string; Destination public address.
* *account_index* - unsigned int; Transfer from this account.
* *subaddr_indices* - array of unsigned int; Transfer from this set of subaddresses.
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *ring_size* - unsigned int; Sets ringsize to n (mixin + 1).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending. -- Ignored
* *priority* - unsigned int; Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
* *do_not_relay* - boolean; (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
* *get_tx_hex* - boolean; Return the transactions as hex string after sending
* *new_algorithm* - boolean; True to use the new transaction construction algorithm, defaults to false.
* *get_tx_metadata* - boolean; Return list of transaction metadata needed to relay the transfer later.
Inputs:
Outputs:
* *index* - subaddress index; JSON Object containing the major & minor address index:
* *major* - unsigned int; Account index for the subaddress.
* *minor* - unsigned int; Index of the subaddress in the account.
* *label* - string; Label for the address.
* *fee_list* - array of: integer. The amount of fees paid for every transaction.
* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_blob_list* - array of: string. The tx as hex string for every transaction.
* *amount_list* - array of: integer. The amount transferred for every transaction..
* *tx_key_list* - array of: string. The transaction keys for every transaction.
* *tx_metadata_list* - array of: string. List of transaction metadata needed to relay the transactions later.
* *multisig_txset* - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
Outputs: *None*.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer_split","params":{"destinations":[{"amount":100000000,"address":"9wNgSYy2F9qPZu7KBjvsFgZLTKE2TZgEpNFbGka9gA5zPmAXS35QzzYaLKJRkYTnzgArGNX7TvSqZC87tBwtaC5RQgJ8rm"},{"amount":200000000,"address":"9vH5D7Fv47mbpCpdcthcjU34rqiiAYRCh1tYywmhqnEk9iwCE9yppgNCXAyVHG5qJt2kExa42TuhzQfJbmbpeGLkVbg8xit"},{"amount":200000000,"address":"9vC5Q25cR1d3WzKX6dpTaLJaqZyDrtTnfadTmVuB1Wue2tyFGxUhiE4RGa74pEDJv7gSySzcd1Ao6G1nzSaqp78vLfP6MPj"},{"amount":200000000,"address":"A2MSrn49ziBPJBh8ZNEhhbfyLMou6mao4C1F5TLGUatmUnCxZArDYkcbAnVkVEopWVeak2rKDrmc8JpoS7n5dvfN9YDPBTG"},{"amount":200000000,"address":"9tEDyVQ8zgRQbDYiykTdpw5kZ6qWQWcKfExEj9eQshjpGb3sdr3UyWE2AHWzUGzJjaH9HN1DdGBdyQQ4AqGMc7rr5xYwZWW"}],"mixin":4,"get_tx_key": true, "new_algorithm": true}}' -H 'Content-Type: application/json'
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_address","params":{"index":{"major":0,"minor":5},"label":"myLabel"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"fee_list": [97916962422],
"tx_hash_list": ["c5c389846e701c27aaf1f7ab8b9dc457b471fcea5bc9710e8020d51275afbc54"]
}
}
```
### **get_accounts**
### **sweep_dust**
Get all accounts for a wallet. Optionally filter accounts by tag.
Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
Alias: *None*.
Inputs: *None*.
Inputs:
Outputs:
* *tag* - string; (Optional) Tag for filtering accounts.
* *tx_hash_list* - list of: string
Outputs:
Example (In this example, `sweep_dust` returns an error due to insufficient funds to sweep):
* *subaddress_accounts* - array of subaddress account information:
* *account_index* - unsigned int; Index of the account.
* *balance* - unsigned int; Balance of the account (locked or unlocked).
* *base_address* - string; Base64 representation of the first subaddress in the account.
* *label* - string; (Optional) Label of the account.
* *tag* - string; (Optional) Tag for filtering accounts.
* *unlocked_balance* - unsigned int; Unlocked balance for the account.
* *total_balance* - unsigned int; Total balance of the selected accounts (locked or unlocked).
* *total_unlocked_balance* - unsigned int; Total unlocked balance of the selected accounts.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_dust"}' -H 'Content-Type: application/json'
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_accounts","params":{"tag":"myTag"}}' -H 'Content-Type: application/json'
{
"error": {
"code": -4,
"message": "not enough money"
},
"id": "0",
"jsonrpc": "2.0"
"jsonrpc": "2.0",
"result": {
"subaddress_accounts": [{
"account_index": 0,
"balance": 157663195572433688,
"base_address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
"label": "Primary account",
"tag": "myTag",
"unlocked_balance": 157443303037455077
},{
"account_index": 1,
"balance": 0,
"base_address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
"label": "Secondary account",
"tag": "myTag",
"unlocked_balance": 0
}],
"total_balance": 157663195572433688,
"total_unlocked_balance": 157443303037455077
}
}
```
### **sweep_all**
Send all unlocked balance to an address.
### **create_account**
Create a new account with an optional label.
Alias: *None*.
Inputs:
* *address* - string; Destination public address.
* *account_index* - unsigned int; Sweep transactions from this account.
* *subaddr_indices* - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.
* *priority* - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending.
* *below_amount* - unsigned int; (Optional) Include outputs below this amount.
* *do_not_relay* - boolean; (Optional) If true, do not relay this sweep transfer.
* *get_tx_hex* - boolean; (Optional) return the transactions as hex encoded string.
* *get_tx_metadata* - boolean; (Optional) return the transaction metadata as a string.
* *label* - string; (Optional) Label for the account.
Outputs:
* *tx_hash_list* - array of string; List of transaction hashes used as transaction IDs.
* *tx_key_list* - array of string; List of public and private transaction keys.
* *tx_blob_list* - array of string; List of transactions represented as a hex blob.
* *tx_metadata_list* - array of string; Transaction metadata needed for relaying.
* *multisig_txset* - string; Set of multisig transactions in the process of being signed.
* *account_index* - unsigned int; Index of the new account.
* *address* - string; Address for this account. Base58 representation of the public keys.
Example:
```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_all","params":{"address":"9sS8eRU2b5ZbN2FPSrpkiab1bjbHE5XtL6Ti6We3Fhw5aQPudRfVVypjgzKDNkxtvTQSPs122NKggb2mqcqkKSeMNVu59S","mixin":2,"unlock_time":0,"get_tx_keys":true}}' -H 'Content-Type: application/json'
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"Secondary account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash_list": ["53a3648797d5524dd037d4105e067fa61468faecab41927fc43adbb26c202d22"],
"tx_key_list": ["e83b3b78235e36cd7e4d9695efd81a3b3e64c7d1f1ebd61892f0a7add6a50301"]
"account_index": 1,
"address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp"
}
}
```
### **store**
Save the blockchain.
### **label_account**
Inputs: *None*.
Label an account.
Alias: *None*.
Inputs:
* *account_index* - unsigned int; Apply label to account at this index.
* *label* - string; Label for the account.
Outputs: *None*.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"store"}' -H 'Content-Type: application/json'
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_account","params":{"account_index":0,"label":"Primary account"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"account_tags": [{
"accounts": [0,1],
"label": "",
"tag": "myTag"
}]
}
}
```
### **get_payments**
### **get_account_tags**
Get a list of incoming payments using a given payment id.
Get a list of user-defined account tags.
Inputs:
Alias: *None*.
* *payment_id* - string; Payment ID used to find the payments.
Inputs: *None*.
Outputs:
* *payments* - list of:
* *payment_id* - string; Payment ID matching the input parameter.
* *tx_hash* - string; Transaction hash used as the transaction ID.
* *amount* - unsigned int; Amount for this payment.
* *block_height* - unsigned int; Height of the block that first confirmed this payment.
* *unlock_time* - unsigned int; Time (in block height) until this payment is safe to spend.
* *subaddr_index* - subaddress index:
* *major* - unsigned int; Account index for the subaddress.
* *minor* - unsigned int; Index of the subaddress in the account.
* *address* - string; Address receiving the payment; Base58 representation of the public keys.
* *account_tags* - array of account tag information:
* *tag* - string; Filter tag.
* *label* - string; Label for the tag.
* *accounts* - array of int; List of tagged account indices.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_payments","params":{"payment_id":"4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030"}}' -H 'Content-Type: application/json'
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_account_tags","params":""}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [{
"amount": 10350000000000,
"block_height": 994327,
"payment_id": "4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030",
"tx_hash": "c391089f5b1b02067acc15294e3629a463412af1f1ed0f354113dd4467e4f6c1",
"unlock_time": 0
"subaddr_index": {
"major": 0,
"minor": 0,
},
"address": "427ZuEhNJQRXoyJAeEoBaNW56ScQaLXyyQWgxeRL9KgAUhVzkvfiELZV7fCPBuuB2CGuJiWFQjhnhhwiH1FsHYGQGaDsaBA"
"account_tags": [{
"accounts": [0],
"label": "Test tag",
"tag": "myTag"
}]
}
}
```
### **get_bulk_payments**
### **tag_accounts**
Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height. This method is the preferred method over `get_payments` because it has the same functionality but is more extendable. Either is fine for looking up transactions by a single payment ID.
Apply a filtering tag to a list of accounts.
Inputs:
Alias: *None*.
* *payment_ids* - array of: string; Payment IDs used to find the payments.
* *min_block_height* - unsigned int; The block height at which to start looking for payments.
Inputs:
Outputs:
* *tag* - string; Tag for the accounts.
* *accounts* - array of unsigned int; Tag this list of accounts.
* *payments* - list of:
* *payment_id* - string; Payment ID matching one of the input IDs.
* *tx_hash* - string; Transaction hash used as the transaction ID.
* *amount* - unsigned int; Amount for this payment.
* *block_height* - unsigned int; Height of the block that first confirmed this payment.
* *unlock_time* - unsigned int; Time (in block height) until this payment is safe to spend.
* *subaddr_index* - subaddress index:
* *major* - unsigned int; Account index for the subaddress.
* *minor* - unsigned int; Index of the subaddress in the account.
* *address* - string; Address receiving the payment; Base58 representation of the public keys.
Outputs: *None*.
Example:
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030"],"min_block_height":990000}}' -H 'Content-Type: application/json'
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"tag_accounts","params":{"tag":"myTag","accounts":[0,1]}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"payments": [{
"amount": 10350000000000,
"block_height": 994327,
"payment_id": "4279257e0a20608e25dba8744949c9e1caff4fcdafc7d5362ecf14225f3d9030",
"tx_hash": "c391089f5b1b02067acc15294e3629a463412af1f1ed0f354113dd4467e4f6c1",
"unlock_time": 0
"subaddr_index": {
"major": 0,
"minor": 1,
},
"address": "88bV1uo76AaKZaWD389kCf5EfPxKFYEKUQbs9ZRJm23E2X2oYgV9bQ54FiY6hAB83aDXMUSZF6KWyfeQqzLqaAeeFrk9iic"
}]
}
}
```
### **get_transfers**
### **untag_accounts**
Returns a list of transfers.
Remove filtering tag from a list of accounts.
Alias: *None*.
Inputs:
* *in* - boolean; (Optional) Include incoming transfers.
* *out* - boolean; (Optional) Include outgoing transfers.
* *pending* - boolean; (Optional) Include pending transfers.
* *failed* - boolean; (Optional) Include failed transfers.
* *pool* - boolean; (Optional) Include transfers from the daemon's transaction pool.
* *filter_by_height* - boolean; (Optional) Filter transfers by block height.
* *min_height* - unsigned int; (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.
* *max_height* - unsigned int; (Opional) Maximum block height to scan for transfers, if filtering by height is enabled.
* *account_index* - unsigned int; (Optional) Index of the account to query for transfers.
* *subaddr_indices* - array of unsigned int; (Optional) List of subaddress indices to query for transfers.
* *accounts* - array of unsigned int; Remove tag from this list of accounts.
Outputs:
Outputs: *None*.
* *in* array of transfers:
* *txid* - string; Transaction ID for this transfer.
* *payment_id* - string; Payment ID for this transfer.
* *height* - unsigned int; Height of the first block that confirmed this transfer.
* *timestamp* - unsigned int; POSIX timestamp for when this transfer was first confirmed in a block.
* *amount* - unsigned int; Amount transferred.
* *fee* - unsigned int; Transaction fee for this transfer.
* *note* - string; Note about this transfer.
* *destinations* - array of transfer destinations:
* *amount* - unsigned int; Amount for this destination.
* *address* - string; Address for this destination. Base58 representation of the public keys.
* *type* - string; Transfer type: "in"
* *out* array of transfers:
* *txid* - string; Transaction ID for this transfer.
* *payment_id* - string; Payment ID for this transfer.
* *height* - unsigned int; Height of the first block that confirmed this transfer.
* *timestamp* - unsigned int; POSIX timestamp for when this transfer was first confirmed in a block.
* *amount* - unsigned int; Amount transferred.
* *fee* - unsigned int; Transaction fee for this transfer.
* *note* - string; Note about this transfer.
* *destinations* - array of transfer destinations:
* *amount* - unsigned int; Amount for this destination.
* *address* - string; Address for this destination. Base58 representation of the public keys.
* *type* - string; Transfer type: "out"
* *pending* array of transfers:
* *txid* - string; Transaction ID for this transfer.
* *payment_id* - string; Payment ID for this transfer.
* *height* - unsigned int; 0, this transfer is not yet confirmed in a block.
* *timestamp* - unsigned int; POSIX timestamp for when this transfer was sent.
* *amount* - unsigned int; Amount transferred.
* *fee* - unsigned int; Transaction fee for this transfer.
* *note* - string; Note about this transfer.
* *destinations* - array of transfer destinations:
* *amount* - unsigned int; Amount for this destination.
* *address* - string; Address for this destination. Base58 representation of the public keys.