Search…
Wallet RPC Guide

Introduction

This is a list of the RPC calls, their inputs and outputs, and examples of each. This list is autogenerated and was last generated on: 2019-04-08
Many RPC calls use the JSON RPC interface while others use their own interfaces, as demonstrated below.
Note: "atomic units" refer to the smallest fraction of 1 BELDEX which is 1e9 atomic units.

RPC Methods

COMMAND_RPC_GET_BALANCE

Return the wallet's balance.
Endpoints: get_balance, getbalance
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"getbalance",
4
"params": {
5
"account_index": 2130706433,
6
"address_indices": [2130706433, ...]
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"balance": 123,
3
"unlocked_balance": 123,
4
"multisig_import_needed": true,
5
"per_subaddress": [{
6
"address_index": 2130706433,
7
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
8
"balance": 123,
9
"unlocked_balance": 123,
10
"label": "TODO(beldex): Write example string",
11
"num_unspent_outputs": 123
12
}, ...]
13
}
Copied!
Inputs:
  • account_index - uint32: Return balance for this account.
  • address_indices - uint32[]: (Optional) Return balance detail for those subaddresses.
Outputs:
  • balance - uint64: The total balance (atomic units) of the currently opened wallet.
  • unlocked_balance - uint64: Unlocked funds are those funds that are sufficiently deep enough in the beldex blockchain to be considered safe to spend.
  • multisig_import_needed - bool: True if importing multisig data is needed for returning a correct balance.
  • per_subaddress - per_subaddress_info[]: Balance information for each subaddress in an account.
    • address_index - uint32: Index of the subaddress in the account.
    • address - string: Address at this index. Base58 representation of the public keys.
    • balance - uint64: Balance for the subaddress (locked or unlocked).
    • unlocked_balance - uint64: Unlocked funds are those funds that are sufficiently deep enough in the beldex blockchain to be considered safe to spend.
    • label - string: Label for the subaddress.
    • num_unspent_outputs - uint64: Number of unspent outputs available for the subaddress.

COMMAND_RPC_GET_ADDRESS

Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
Endpoints: get_address, getaddress
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"getaddress",
4
"params": {
5
"account_index": 2130706433,
6
"address_index": [2130706433, ...]
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
3
"addresses": [{
4
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
5
"label": "TODO(beldex): Write example string",
6
"address_index": 2130706433,
7
"used": true
8
}, ...]
9
}
Copied!
Inputs:
  • account_index - uint32: Get the wallet addresses for the specified account.
  • address_index - uint32[]: (Optional) List of subaddresses to return from the aforementioned account.
Outputs:
  • address - string: (Deprecated) Remains to be compatible with older RPC format
  • addresses - address_info[]: Addresses informations.
    • address - string: The (sub)address string.
    • label - string: Label of the (sub)address.
    • address_index - uint32: Index of the subaddress
    • used - bool: True if the (sub)address has received funds before.

COMMAND_RPC_GET_ADDRESS_INDEX

Get account and address indexes from a specific (sub)address.
Endpoints: get_address_index
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"get_address_index",
4
"params": {
5
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"index":
3
}
Copied!
Inputs:
  • address - string: (Sub)address to look for.
Outputs:
  • index - cryptonote::subaddress_index: Account index followed by the subaddress index.

COMMAND_RPC_CREATE_ADDRESS

Create a new address for an account. Optionally, label the new address.
Endpoints: create_address
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"create_address",
4
"params": {
5
"account_index": 2130706433,
6
"label": "TODO(beldex): Write example string"
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
3
"address_index": 2130706433
4
}
Copied!
Inputs:
  • account_index - uint32: Create a new subaddress for this account.
  • label - string: (Optional) Label for the new subaddress.
Outputs:
  • address - string: The newly requested address.
  • address_index - uint32: Index of the new address in the requested account index.

COMMAND_RPC_LABEL_ADDRESS

Label an address.
Endpoints: label_address
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"label_address",
4
"params": {
5
"index": ,
6
"label": "TODO(beldex): Write example string"
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
  • index - cryptonote::subaddress_index: Major & minor address index
  • label - string: Label for the address.
Outputs:

COMMAND_RPC_GET_ACCOUNTS

Get all accounts for a wallet. Optionally filter accounts by tag.
Endpoints: get_accounts
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"get_accounts",
4
"params": {
5
"tag": "TODO(beldex): Write example string"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"total_balance": 123,
3
"total_unlocked_balance": 123,
4
"subaddress_accounts": [{
5
"account_index": 2130706433,
6
"base_address": "TODO(beldex): Write example string",
7
"balance": 123,
8
"unlocked_balance": 123,
9
"label": "TODO(beldex): Write example string",
10
"tag": "TODO(beldex): Write example string"
11
}, ...]
12
}
Copied!
Inputs:
  • tag - string: (Optional) Tag for filtering accounts. All accounts if empty, otherwise those accounts with this tag
Outputs:
  • total_balance - uint64: Total balance of the selected accounts (locked or unlocked).
  • total_unlocked_balance - uint64: Total unlocked balance of the selected accounts.
  • subaddress_accounts - subaddress_account_info[]: Account information.
    • account_index - uint32: Index of the account.
    • base_address - string: The first address of the account (i.e. the primary address).
    • balance - uint64: Balance of the account (locked or unlocked).
    • unlocked_balance - uint64: Unlocked balance for the account.
    • label - string: (Optional) Label of the account.
    • tag - string: (Optional) Tag for filtering accounts.

COMMAND_RPC_CREATE_ACCOUNT

Create a new account with an optional label.
Endpoints: create_account
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"create_account",
4
"params": {
5
"label": "TODO(beldex): Write example string"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"account_index": 2130706433,
3
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
4
}
Copied!
Inputs:
  • label - string: (Optional) Label for the account.
Outputs:
  • account_index - uint32: Index of the new account.
  • address - string: The primary address of the new account.

COMMAND_RPC_LABEL_ACCOUNT

Label an account.
Endpoints: label_account
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"label_account",
4
"params": {
5
"account_index": 2130706433,
6
"label": "TODO(beldex): Write example string"
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
  • account_index - uint32: Account index to set the label for.
  • label - string: Label for the account.
Outputs:

COMMAND_RPC_GET_ACCOUNT_TAGS

Get a list of user-defined account tags.
Endpoints: get_account_tags
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '{ "jsonrpc":"2.0", "id":"0", "method":"get_account_tags"}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"account_tags": [{
3
"tag": "TODO(beldex): Write example string",
4
"label": "TODO(beldex): Write example string",
5
"accounts": [2130706433, ...]
6
}, ...]
7
}
Copied!
Inputs:
Outputs:
  • account_tags - account_tag_info[]: Account tag information:
    • tag - string: Filter tag.
    • label - string: Label for the tag.
    • accounts - uint32[]: List of tagged account indices.

COMMAND_RPC_TAG_ACCOUNTS

Apply a filtering tag to a list of accounts.
Endpoints: tag_accounts
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"tag_accounts",
4
"params": {
5
"tag": "TODO(beldex): Write example string",
6
"accounts": [2130706433, ...]
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
  • tag - string: Tag for the accounts.
  • accounts - uint32[]: Tag this list of accounts.
Outputs:

COMMAND_RPC_UNTAG_ACCOUNTS

Remove filtering tag from a list of accounts.
Endpoints: untag_accounts
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"untag_accounts",
4
"params": {
5
"accounts": [2130706433, ...]
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
  • accounts - uint32[]: Remove tag from this list of accounts.
Outputs:

COMMAND_RPC_SET_ACCOUNT_TAG_DESCRIPTION

Set description for an account tag.
Endpoints: set_account_tag_description
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"set_account_tag_description",
4
"params": {
5
"tag": "TODO(beldex): Write example string",
6
"description": "TODO(beldex): Write example string"
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
  • tag - string: Set a description for this tag.
  • description - string: Description for the tag.
Outputs:

COMMAND_RPC_GET_HEIGHT

Returns the wallet's current block height.
Endpoints: get_height, getheight
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '{ "jsonrpc":"2.0", "id":"0", "method":"getheight"}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"height": 234767
3
}
Copied!
Inputs:
Outputs:
  • height - uint64: The current wallet's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.

COMMAND_RPC_TRANSFER

Send beldex to a number of recipients. To preview the transaction fee, set do_not_relay to true and get_tx_metadata to true.
Submit the response using the data in get_tx_metadata in the RPC call, relay_tx.
Endpoints: transfer
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"transfer",
4
"params": {
5
"destinations": [, ...],
6
"account_index": 2130706433,
7
"subaddr_indices": [2130706433, ...],
8
"priority": 2130706433,
9
"mixin": 123,
10
"ring_size": 123,
11
"unlock_time": 123,
12
"payment_id": "f378710e54eeeb8d",
13
"get_tx_key": true,
14
"do_not_relay": true,
15
"get_tx_hex": true,
16
"get_tx_metadata": true
17
}
18
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
3
"tx_key": "TODO(beldex): Write example string",
4
"amount": 123,
5
"fee": 123,
6
"tx_blob": "TODO(beldex): Write example string",
7
"tx_metadata": "TODO(beldex): Write example string",
8
"multisig_txset": "TODO(beldex): Write example string",
9
"unsigned_txset": "TODO(beldex): Write example string"
10
}
Copied!
Inputs:
  • destinations - transfer_destination[]: Array of destinations to receive BELDEX.
  • account_index - uint32: (Optional) Transfer from this account index. (Defaults to 0)
  • subaddr_indices - uint32[]: (Optional) Transfer from this set of subaddresses. (Defaults to 0)
  • priority - uint32: Set a priority for the transaction. Accepted Values are: default (1), or 0-3 for: unimportant, normal, elevated, priority.
  • mixin - uint64: (Deprecated) Set to 9. Number of outputs from the blockchain to mix with. Beldex mixin statically set to 9.
  • ring_size - uint64: (Deprecated) Set to 10. Sets ringsize to n (mixin + 1). Beldex ring_size is statically set to 10.
  • unlock_time - uint64: Number of blocks before the beldex can be spent (0 to use the default lock time).
  • payment_id - string: (Optional) Random 64-character hex string to identify a transaction.
  • get_tx_key - bool: (Optional) Return the transaction key after sending.
  • do_not_relay - bool: (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)
  • get_tx_hex - bool: Return the transaction as hex string after sending. (Defaults to false)
  • get_tx_metadata - bool: Return the metadata needed to relay the transaction. (Defaults to false)
Outputs:
  • tx_hash - string: Publically searchable transaction hash.
  • tx_key - string: Transaction key if get_tx_key is true, otherwise, blank string.
  • amount - uint64: Amount transferred for the transaction.
  • fee - uint64: Fee charged for the txn.
  • tx_blob - string: Raw transaction represented as hex string, if get_tx_hex is true.
  • tx_metadata - string: Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.
  • multisig_txset - string: Set of multisig transactions in the process of being signed (empty for non-multisig).
  • unsigned_txset - string: Set of unsigned tx for cold-signing purposes.

COMMAND_RPC_TRANSFER_SPLIT

Same as transfer, but can split into more than one tx if necessary.
Endpoints: transfer_split
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"transfer_split",
4
"params": {
5
"destinations": [, ...],
6
"account_index": 2130706433,
7
"subaddr_indices": [2130706433, ...],
8
"priority": 2130706433,
9
"mixin": 123,
10
"ring_size": 123,
11
"unlock_time": 123,
12
"payment_id": "f378710e54eeeb8d",
13
"get_tx_keys": true,
14
"do_not_relay": true,
15
"get_tx_hex": true,
16
"get_tx_metadata": true
17
}
18
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash_list": ["TODO(beldex): Write example string", ...],
3
"tx_key_list": ["TODO(beldex): Write example string", ...],
4
"amount_list": [123, ...],
5
"fee_list": [123, ...],
6
"tx_blob_list": ["TODO(beldex): Write example string", ...],
7
"tx_metadata_list": ["TODO(beldex): Write example string", ...],
8
"multisig_txset": "TODO(beldex): Write example string",
9
"unsigned_txset": "TODO(beldex): Write example string"
10
}
Copied!
Inputs:
  • destinations - transfer_destination[]: Array of destinations to receive BELDEX:
  • account_index - uint32: (Optional) Transfer from this account index. (Defaults to 0)
  • subaddr_indices - uint32[]: (Optional) Transfer from this set of subaddresses. (Defaults to 0)
  • priority - uint32: Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
  • mixin - uint64: (Ignored) Number of outputs from the blockchain to mix with. Beldex mixin statically set to 9.
  • ring_size - uint64: (Ignored) Sets ringsize to n (mixin + 1). Beldex ring_size is statically set to 10.
  • unlock_time - uint64: Number of blocks before the beldex 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 - bool: (Optional) Return the transaction keys after sending.
  • do_not_relay - bool: (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)
  • get_tx_hex - bool: Return the transactions as hex string after sending.
  • get_tx_metadata - bool: Return list of transaction metadata needed to relay the transfer later.
Outputs:
  • tx_hash_list - string[]: The tx hashes of every transaction.
  • tx_key_list - string[]: The transaction keys for every transaction.
  • amount_list - uint64[]: The amount transferred for every transaction.
  • fee_list - uint64[]: The amount of fees paid for every transaction.
  • tx_blob_list - string[]: The tx as hex string for every transaction.
  • tx_metadata_list - 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).
  • unsigned_txset - string: Set of unsigned tx for cold-signing purposes.

COMMAND_RPC_DESCRIBE_TRANSFER

Endpoints: describe_transfer
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"describe_transfer",
4
"params": {
5
"unsigned_txset": "TODO(beldex): Write example string"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"desc": [{
3
"amount_in": 123,
4
"amount_out": 123,
5
"ring_size": 2130706433,
6
"unlock_time": 123,
7
"recipients": [{
8
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
9
"amount": 123
10
}, ...],
11
"payment_id": "f378710e54eeeb8d",
12
"change_amount": 123,
13
"change_address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
14
"fee": 123,
15
"dummy_outputs": 2130706433,
16
"extra": "TODO(beldex): Write example string"
17
}, ...]
18
}
Copied!
Inputs:
  • unsigned_txset - string: Set of unsigned tx returned by "transfer" or "transfer_split" methods.
Outputs:
  • desc - transfer_description[]: List of information of transfers.
    • amount_in - uint64: Amount in, in atomic units.
    • amount_out - uint64: amount out, in atomic units.
    • ring_size - uint32: Ring size of transfer.
    • unlock_time - uint64: Number of blocks before the beldex can be spent (0 represents the default network lock time).
    • recipients - recipient[]: List of addresses and amounts.
      • address - string: Destination public address.
      • amount - uint64: Amount in atomic units.
    • payment_id - string: Payment ID matching the input parameter.
    • change_amount - uint64: Change received from transaction in atomic units.
    • change_address - string: Address the change was sent to.
    • fee - uint64: Fee of the transaction in atomic units.
    • dummy_outputs - uint32
    • extra - string: Data stored in the tx extra represented in hex.

COMMAND_RPC_SIGN_TRANSFER

Sign a transaction created on a read-only wallet (in cold-signing process).
Endpoints: sign_transfer
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"sign_transfer",
4
"params": {
5
"unsigned_txset": "TODO(beldex): Write example string",
6
"export_raw": true,
7
"get_tx_keys": true
8
}
9
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"signed_txset": "TODO(beldex): Write example string",
3
"tx_hash_list": ["TODO(beldex): Write example string", ...],
4
"tx_raw_list": ["TODO(beldex): Write example string", ...],
5
"tx_key_list": ["TODO(beldex): Write example string", ...]
6
}
Copied!
Inputs:
  • unsigned_txset - string: Set of unsigned tx returned by "transfer" or "transfer_split" methods.
  • export_raw - bool: (Optional) If true, return the raw transaction data. (Defaults to false)
  • get_tx_keys - bool: (Optional) Return the transaction keys after sending.
Outputs:
  • signed_txset - string: Set of signed tx to be used for submitting transfer.
  • tx_hash_list - string[]: The tx hashes of every transaction.
  • tx_raw_list - string[]: The tx raw data of every transaction.
  • tx_key_list - string[]: The tx key data of every transaction.

COMMAND_RPC_SUBMIT_TRANSFER

Submit a previously signed transaction on a read-only wallet (in cold-signing process).
Endpoints: submit_transfer
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"submit_transfer",
4
"params": {
5
"tx_data_hex": "TODO(beldex): Write example string"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash_list": ["TODO(beldex): Write example string", ...]
3
}
Copied!
Inputs:
  • tx_data_hex - string: Set of signed tx returned by "sign_transfer".
Outputs:
  • tx_hash_list - string[]: The tx hashes of every transaction.

COMMAND_RPC_SWEEP_DUST

Send all dust outputs back to the wallet's, to make them easier to spend (and mix).
Endpoints: sweep_dust, sweep_unmixable
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"sweep_unmixable",
4
"params": {
5
"get_tx_keys": true,
6
"do_not_relay": true,
7
"get_tx_hex": true,
8
"get_tx_metadata": true
9
}
10
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash_list": ["TODO(beldex): Write example string", ...],
3
"tx_key_list": ["TODO(beldex): Write example string", ...],
4
"amount_list": [123, ...],
5
"fee_list": [123, ...],
6
"tx_blob_list": ["TODO(beldex): Write example string", ...],
7
"tx_metadata_list": ["TODO(beldex): Write example string", ...],
8
"multisig_txset": "TODO(beldex): Write example string",
9
"unsigned_txset": "TODO(beldex): Write example string"
10
}
Copied!
Inputs:
  • get_tx_keys - bool: (Optional) Return the transaction keys after sending.
  • do_not_relay - bool: (Optional) If true, the newly created transaction will not be relayed to the beldex network. (Defaults to false)
  • get_tx_hex - bool: (Optional) Return the transactions as hex string after sending. (Defaults to false)
  • get_tx_metadata - bool: (Optional) Return list of transaction metadata needed to relay the transfer later. (Defaults to false)
Outputs:
  • tx_hash_list - string[]: The tx hashes of every transaction.
  • tx_key_list - string[]: The transaction keys for every transaction.
  • amount_list - uint64[]: The amount transferred for every transaction.
  • fee_list - uint64[]: The amount of fees paid for every transaction.
  • tx_blob_list - string[]: The tx as hex string for every transaction.
  • tx_metadata_list - 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).
  • unsigned_txset - string: Set of unsigned tx for cold-signing purposes.

COMMAND_RPC_SWEEP_ALL

Send all unlocked balance to an address.
Endpoints: sweep_all
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"sweep_all",
4
"params": {
5
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
6
"account_index": 2130706433,
7
"subaddr_indices": [2130706433, ...],
8
"priority": 2130706433,
9
"mixin": 123,
10
"ring_size": 123,
11
"outputs": 123,
12
"unlock_time": 123,
13
"payment_id": "f378710e54eeeb8d",
14
"get_tx_keys": true,
15
"below_amount": 123,
16
"do_not_relay": true,
17
"get_tx_hex": true,
18
"get_tx_metadata": true
19
}
20
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash_list": ["TODO(beldex): Write example string", ...],
3
"tx_key_list": ["TODO(beldex): Write example string", ...],
4
"amount_list": [123, ...],
5
"fee_list": [123, ...],
6
"tx_blob_list": ["TODO(beldex): Write example string", ...],
7
"tx_metadata_list": ["TODO(beldex): Write example string", ...],
8
"multisig_txset": "TODO(beldex): Write example string",
9
"unsigned_txset": "TODO(beldex): Write example string"
10
}
Copied!
Inputs:
  • address - string: Destination public address.
  • account_index - uint32: Sweep transactions from this account.
  • subaddr_indices - uint32[]: (Optional) Sweep from this set of subaddresses in the account.
  • priority - uint32: (Optional) Priority for sending the sweep transfer, partially determines fee.
  • mixin - uint64: (Deprecated) Set to 9. Number of outputs from the blockchain to mix with. Beldex mixin statically set to 9.
  • ring_size - uint64: (Deprecated) Set to 10. Sets ringsize to n (mixin + 1). Beldex ring_size is statically set to 10.
  • outputs - uint64
  • unlock_time - uint64: Number of blocks before the beldex can be spent (0 to not add a lock).
  • payment_id - string: (Optional) 64-character hex string to identify a transaction.
  • get_tx_keys - bool: (Optional) Return the transaction keys after sending.
  • below_amount - uint64: (Optional) Include outputs below this amount.
  • do_not_relay - bool: (Optional) If true, do not relay this sweep transfer. (Defaults to false)
  • get_tx_hex - bool: (Optional) return the transactions as hex encoded string. (Defaults to false)
  • get_tx_metadata - bool: (Optional) return the transaction metadata as a string. (Defaults to false)
Outputs:
  • tx_hash_list - string[]: The tx hashes of every transaction.
  • tx_key_list - string[]: The transaction keys for every transaction.
  • amount_list - uint64[]: The amount transferred for every transaction.
  • fee_list - uint64[]: The amount of fees paid for every transaction.
  • tx_blob_list - string[]: The tx as hex string for every transaction.
  • tx_metadata_list - 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).
  • unsigned_txset - string: Set of unsigned tx for cold-signing purposes.

COMMAND_RPC_SWEEP_SINGLE

Send all of a specific unlocked output to an address.
Endpoints: sweep_single
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"sweep_single",
4
"params": {
5
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
6
"priority": 2130706433,
7
"mixin": 123,
8
"ring_size": 123,
9
"outputs": 123,
10
"unlock_time": 123,
11
"payment_id": "f378710e54eeeb8d",
12
"get_tx_key": true,
13
"key_image": "8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3",
14
"do_not_relay": true,
15
"get_tx_hex": true,
16
"get_tx_metadata": true
17
}
18
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
3
"tx_key": "TODO(beldex): Write example string",
4
"amount": 123,
5
"fee": 123,
6
"tx_blob": "TODO(beldex): Write example string",
7
"tx_metadata": "TODO(beldex): Write example string",
8
"multisig_txset": "TODO(beldex): Write example string",
9
"unsigned_txset": "TODO(beldex): Write example string"
10
}
Copied!
Inputs:
  • address - string: Destination public address.
  • priority - uint32: (Optional) Priority for sending the sweep transfer, partially determines fee.
  • mixin - uint64: (Deprecated) Set to 9. Number of outputs from the blockchain to mix with. Beldex mixin statically set to 9.
  • ring_size - uint64: (Deprecated) Set to 10. Sets ringsize to n (mixin + 1). Beldex ring_size is statically set to 10.
  • outputs - uint64
  • unlock_time - uint64: Number of blocks before the beldex can be spent (0 to not add a lock).
  • payment_id - string: (Optional) 64-character hex string to identify a transaction.
  • get_tx_key - bool: (Optional) Return the transaction keys after sending.
  • key_image - string: Key image of specific output to sweep.
  • do_not_relay - bool: (Optional) If true, do not relay this sweep transfer. (Defaults to false)
  • get_tx_hex - bool: (Optional) return the transactions as hex encoded string. (Defaults to false)
  • get_tx_metadata - bool: (Optional) return the transaction metadata as a string. (Defaults to false)
Outputs:
  • tx_hash - string: The tx hashes of the transaction.
  • tx_key - string: The tx key of the transaction.
  • amount - uint64: The amount transfered in atomic units.
  • fee - uint64: The fee paid in atomic units.
  • tx_blob - string: The tx as hex string.
  • tx_metadata - string: Transaction metadata needed to relay the transaction later.
  • multisig_txset - string: The set of signing keys used in a multisig transaction (empty for non-multisig).
  • unsigned_txset - string: Set of unsigned tx for cold-signing purposes.

COMMAND_RPC_RELAY_TX

Relay transaction metadata to the daemon
Endpoints: relay_tx
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"relay_tx",
4
"params": {
5
"hex": "TODO(beldex): Write example string"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"
3
}
Copied!
Inputs:
  • hex - string: Transaction metadata returned from a transfer method with get_tx_metadata set to true.
Outputs:
  • tx_hash - string: String for the publically searchable transaction hash.

COMMAND_RPC_STORE

Save the wallet file.
Endpoints: store
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '{ "jsonrpc":"2.0", "id":"0", "method":"store"}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
Copied!
Inputs:
Outputs:

COMMAND_RPC_GET_PAYMENTS

Get a list of incoming payments using a given payment id.
Endpoints: get_payments
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"get_payments",
4
"params": {
5
"payment_id": "f378710e54eeeb8d"
6
}
7
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"payments": [{
3
"payment_id": "f378710e54eeeb8d",
4
"tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
5
"amount": 123,
6
"block_height": 123,
7
"unlock_time": 123,
8
"subaddr_index": ,
9
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
10
}, ...]
11
}
Copied!
Inputs:
  • payment_id - string: Payment ID used to find the payments (16 characters hex).
Outputs:
  • payments - payment_details[]: List of payment details:
    • payment_id - string: Payment ID matching the input parameter.
    • tx_hash - string: Transaction hash used as the transaction ID.
    • amount - uint64: Amount for this payment.
    • block_height - uint64: Height of the block that first confirmed this payment.
    • unlock_time - uint64: Time (in block height) until this payment is safe to spend.
    • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • address - string: Address receiving the payment.

COMMAND_RPC_GET_BULK_PAYMENTS

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_paymentsbecause it
has the same functionality but is more extendable.
Either is fine for looking up transactions by a single payment ID.
Endpoints: get_bulk_payments
Example Request:
1
curl -X POST http://127.0.0.1:22023/json_rpc -d '
2
{
3
"jsonrpc":"2.0", "id":"0", "method":"get_bulk_payments",
4
"params": {
5
"payment_ids": ["TODO(beldex): Write example string", ...],
6
"min_block_height": 123
7
}
8
}' -H 'Content-Type: application/json'
Copied!
Example Response:
1
{
2
"payments": [{
3
"payment_id": "f378710e54eeeb8d",
4
"tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
5
"amount": 123,
6
"block_height": 123,
7
"unlock_time": 123,
8
"subaddr_index": ,
9
"address": "8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscS