Skip to content

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: 2020-05-13

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 LOKI which is 1e9 atomic units.

JSON

JSON

COMMAND_RPC_ADD_ADDRESS_BOOK_ENTRY

Back to top

Add an entry to the address book.

Endpoints: add_address_book

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "add_address_book",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "payment_id": "f378710e54eeeb8d",
    "description": "My account description"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "index": 123
}

Inputs:

  • address - string: Public address of the entry.
  • payment_id - string: (Optional), defaults to "0000000000000000000000000000000000000000000000000000000000000000".
  • description - string: (Optional), defaults to "".

Outputs:

  • index - uint64: The index of the address book entry.

COMMAND_RPC_AUTO_REFRESH

Back to top

Endpoints: auto_refresh
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "auto_refresh",
  "params": {
    "enable": true,
    "period": 2130706433
  }
}
EOF

Inputs:

  • enable - bool
  • period - uint32: seconds

COMMAND_RPC_CAN_REQUEST_STAKE_UNLOCK

Back to top

Check if Service Node can unlock it's stake.

Endpoints: can_request_stake_unlock

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "can_request_stake_unlock",
  "params": {
    "service_node_key": "4a8c30cea9e729b06c91132295cce32d2a8e6e5bcf7b74a998e2ee1b3ed590b3"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "can_unlock": true,
    "msg": "Message returned by the sender (wallet/daemon)"
  }
}

Inputs:

  • service_node_key - string: Service node public address.

Outputs:

  • can_unlock - bool: States if the stake can be locked.
  • msg - string: Information on the unlocking process.

COMMAND_RPC_CHANGE_WALLET_PASSWORD

Back to top

Change a wallet password.

Endpoints: change_wallet_password

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "change_wallet_password",
  "params": {
    "old_password": "TODO(loki): Write example string",
    "new_password": "TODO(loki): Write example string"
  }
}
EOF

Inputs:

  • old_password - string: (Optional) Current wallet password, if defined.
  • new_password - string: (Optional) New wallet password, if not blank.

COMMAND_RPC_CHECK_RESERVE_PROOF

Back to top

Proves a wallet has a disposable reserve using a signature.

Endpoints: check_reserve_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "check_reserve_proof",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "message": "User assigned note describing something",
    "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "good": true,
    "total": 123,
    "spent": 123
  }
}

Inputs:

  • address - string: Public address of the wallet.
  • message - string: (Optional) Should be the same message used in get_reserve_proof.
  • signature - string: Reserve signature to confirm.

Outputs:

  • good - bool: States if the inputs proves the reserve.
  • total - uint64
  • spent - uint64

COMMAND_RPC_CHECK_SPEND_PROOF

Back to top

Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.

Endpoints: check_spend_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "check_spend_proof",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "message": "User assigned note describing something",
    "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "good": true
}

Inputs:

  • txid - string: Transaction id.
  • message - string: (Optional) Should be the same message used in get_spend_proof.
  • signature - string: Spend signature to confirm.

Outputs:

  • good - bool: States if the inputs proves the spend.

COMMAND_RPC_CHECK_TX_KEY

Back to top

Check a transaction in the blockchain with its secret key.

Endpoints: check_tx_key

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "check_tx_key",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "received": 123,
    "in_pool": true,
    "confirmations": 123
  }
}

Inputs:

  • txid - string: Transaction id.
  • tx_key - string: Transaction secret key.
  • address - string: Destination public address of the transaction.

Outputs:

  • received - uint64: Amount of the transaction.
  • in_pool - bool: States if the transaction is still in pool or has been added to a block.
  • confirmations - uint64: Number of block mined after the one with the transaction.

COMMAND_RPC_CHECK_TX_PROOF

Back to top

Prove a transaction by checking its signature.

Endpoints: check_tx_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "check_tx_proof",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "message": "User assigned note describing something",
    "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "good": true,
    "received": 123,
    "in_pool": true,
    "confirmations": 123
  }
}

Inputs:

  • txid - string: Transaction id.
  • address - string: Destination public address of the transaction.
  • message - string: (Optional) Should be the same message used in get_tx_proof.
  • signature - string: Transaction signature to confirm.

Outputs:

  • good - bool: States if the inputs proves the transaction.
  • received - uint64: Amount of the transaction.
  • in_pool - bool: States if the transaction is still in pool or has been added to a block.
  • confirmations - uint64: Number of block mined after the one with the transaction.

COMMAND_RPC_CLOSE_WALLET

Back to top

Close the currently opened wallet, after trying to save it.

Endpoints: close_wallet

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "close_wallet",
  "params": {
    "autosave_current": true
  }
}
EOF

Inputs:

  • autosave_current - bool: Save the wallet state on close

COMMAND_RPC_CREATE_ACCOUNT

Back to top

Create a new account with an optional label.

Endpoints: create_account

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "create_account",
  "params": {
    "label": "My label"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "account_index": 0,
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
  }
}

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_CREATE_ADDRESS

Back to top

Create a new address for an account. Optionally, label the new address.

Endpoints: create_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "create_address",
  "params": {
    "account_index": 0,
    "label": "My label"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "address_index": 0
  }
}

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_CREATE_WALLET

Back to top

Create a new wallet. You need to have set the argument "'–wallet-dir" when launching loki-wallet-rpc to make this work.

Endpoints: create_wallet

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "create_wallet",
  "params": {
    "filename": "Doyles_Cool_Wallet",
    "password": "not_a_secure_password",
    "language": "english"
  }
}
EOF

Inputs:

  • filename - string: Set the wallet file name.
  • password - string: (Optional) Set the password to protect the wallet.
  • language - string: Language for your wallets' seed.

COMMAND_RPC_DELETE_ADDRESS_BOOK_ENTRY

Back to top

Delete an entry from the address book.

Endpoints: delete_address_book

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "delete_address_book",
  "params": {
    "index": 123
  }
}
EOF

Inputs:

  • index - uint64: The index of the address book entry.

COMMAND_RPC_DESCRIBE_TRANSFER

Back to top

Endpoints: describe_transfer
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "describe_transfer",
  "params": {
    "unsigned_txset": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "desc": [{
    "amount_in": 123,
    "amount_out": 123,
    "ring_size": 2130706433,
    "unlock_time": 123,
    "recipients": [{
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "amount": 26734261552878
    }],
    "payment_id": "f378710e54eeeb8d",
    "change_amount": 123,
    "change_address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "fee": 123,
    "dummy_outputs": 2130706433,
    "extra": "01008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b584"
  }]
}

Inputs:

  • unsigned_txset - string: Set of unsigned tx returned by "transfer" or "transfer_split" methods.
  • multisig_txset - string: Set of unsigned multisig txes 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 loki 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_EXCHANGE_MULTISIG_KEYS

Back to top

Endpoints: exchange_multisig_keys

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "exchange_multisig_keys",
  "params": {
    "password": "not_a_secure_password",
    "multisig_info": ["TODO(loki): Write example string"]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "multisig_info": "TODO(loki): Write example string"
  }
}

Inputs:

  • password - string: Wallet password.
  • multisig_info - string[]: List of multisig string from peers.

Outputs:

  • address - string: Multisig wallet address.
  • multisig_info - string: Multisig string to share with peers to create the multisig wallet.

COMMAND_RPC_EXPORT_KEY_IMAGES

Back to top

Export a signed set of key images.

Endpoints: export_key_images

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "export_key_images",
  "params": {
    "requested_only": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "offset": 2130706433,
    "signed_key_images": [{
      "key_image": "8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3",
      "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
    }]
  }
}

Inputs:

  • requested_only - bool: Default false.

Outputs:

  • offset - uint32
  • signed_key_images - signed_key_image[]
  • key_image - string
  • signature - string

COMMAND_RPC_EXPORT_MULTISIG

Back to top

Export multisig info for other participants.

Endpoints: export_multisig_info

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "export_multisig_info"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "info": "TODO(loki): Write example string"
}

Outputs:

  • info - string: Multisig info in hex format for other participants.

COMMAND_RPC_EXPORT_OUTPUTS

Back to top

Export all outputs in hex format.

Endpoints: export_outputs

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "export_outputs",
  "params": {
    "all": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "outputs_data_hex": "TODO(loki): Write example string"
}

Inputs:

  • all - bool

Outputs:

  • outputs_data_hex - string: Wallet outputs in hex format.

COMMAND_RPC_FINALIZE_MULTISIG

Back to top

Turn this wallet into a multisig wallet, extra step for N-1/N wallets.

Endpoints: finalize_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "finalize_multisig",
  "params": {
    "password": "not_a_secure_password",
    "multisig_info": ["TODO(loki): Write example string"]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
}

Inputs:

  • password - string: Wallet password.
  • multisig_info - string[]: List of multisig string from peers.

Outputs:

  • address - string: Multisig wallet address.

COMMAND_RPC_GENERATE_FROM_KEYS

Back to top

Restore a wallet using the private spend key, view key and public address.

Endpoints: generate_from_keys

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "generate_from_keys",
  "params": {
    "restore_height": 123,
    "filename": "Doyles_Cool_Wallet",
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "spendkey": "1de25fd280b9b08da62f06a5521c735fd94b7ecf237ca7409748295e75b48104",
    "viewkey": "1de25fd280b9b08da62f06a5521c735fd94b7ecf237ca7409748295e75b48104",
    "password": "not_a_secure_password",
    "autosave_current": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "info": "TODO(loki): Write example string"
  }
}

Inputs:

  • restore_height - uint64: (Optional: Default 0) Height in which to start scanning the blockchain for transactions into and out of this Wallet.
  • filename - string: Set the name of the wallet.
  • address - string: The public address of the wallet.
  • spendkey - string: The private spend key of the wallet
  • viewkey - string: The private view key of the wallet.
  • password - string: Set password for Wallet.
  • autosave_current - bool: (Optional: Default true): If a pre-existing wallet is open, save to disk before opening the new wallet.

Outputs:

  • address - string
  • info - string

COMMAND_RPC_GET_ACCOUNTS

Back to top

Get all accounts for a wallet. Optionally filter accounts by tag.

Endpoints: get_accounts

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_accounts",
  "params": {
    "tag": "My tag"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "total_balance": 123,
    "total_unlocked_balance": 123,
    "subaddress_accounts": [{
      "account_index": 0,
      "base_address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "balance": 123,
      "unlocked_balance": 123,
      "label": "My label",
      "tag": "My tag"
    }]
  }
}

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_GET_ACCOUNT_TAGS

Back to top

Get a list of user-defined account tags.

Endpoints: get_account_tags

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_account_tags"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "account_tags": [{
    "tag": "My tag",
    "label": "My label",
    "accounts": [2130706433]
  }]
}

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_GET_ADDRESS

Back to top

Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.

Endpoints: get_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_address",
  "params": {
    "account_index": 0,
    "address_index": [0]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "addresses": [{
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "label": "My label",
      "address_index": 0,
      "used": true
    }]
  }
}

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_BOOK_ENTRY

Back to top

Retrieves entries from the address book.

Endpoints: get_address_book

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_address_book",
  "params": {
    "entries": [123]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "entries": [{
    "index": 123,
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "payment_id": "f378710e54eeeb8d",
    "description": "My account description"
  }]
}

Inputs:

  • entries - uint64[]: Indices of the requested address book entries.

Outputs:

  • entries - entry[]: List of address book entries information.
  • index - uint64: Index of entry.
  • address - string: Public address of the entry
  • payment_id - string: (Optional) 64-character hex string to identify a transaction.
  • description - string: Description of this address entry.

COMMAND_RPC_GET_ADDRESS_INDEX

Back to top

Get account and address indexes from a specific (sub)address.

Endpoints: get_address_index

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_address_index",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "index": {
    "major": 2130706433,
    "minor": 2130706433
  }
}

Inputs:

  • address - string: (Sub)address to look for.

Outputs:

  • index - cryptonote::subaddress_index: Account index followed by the subaddress index.
  • major - uint32: The account index, major index
  • minor - uint32: The subaddress index, minor index

COMMAND_RPC_GET_ATTRIBUTE

Back to top

Get attribute value by name.

Endpoints: get_attribute

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_attribute",
  "params": {
    "key": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "value": "TODO(loki): Write example string"
}

Inputs:

  • key - string: Attribute name.

Outputs:

  • value - string: Attribute value.

COMMAND_RPC_GET_BALANCE

Back to top

Return the wallet's balance.

Endpoints: get_balance

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_balance",
  "params": {
    "account_index": 0,
    "address_indices": [0],
    "all_accounts": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "balance": 123,
    "unlocked_balance": 123,
    "multisig_import_needed": true,
    "per_subaddress": [{
      "account_index": 0,
      "address_index": 0,
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "balance": 123,
      "unlocked_balance": 123,
      "label": "My label",
      "num_unspent_outputs": 123,
      "blocks_to_unlock": 123
    }],
    "blocks_to_unlock": 123
  }
}

Inputs:

  • account_index - uint32: Return balance for this account.
  • address_indices - uint32[]: (Optional) Return balance detail for those subaddresses.
  • all_accounts - bool: If true, return balance for all accounts, subaddr_indices and account_index are ignored

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 loki 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.
  • account_index - uint32: Index of the account in the wallet.
  • 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 loki 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.
  • blocks_to_unlock - uint64: The number of blocks remaining for the balance to unlock
  • blocks_to_unlock - uint64: The number of blocks remaining for the balance to unlock

COMMAND_RPC_GET_BULK_PAYMENTS

Back to top

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
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_bulk_payments",
  "params": {
    "payment_ids": ["TODO(loki): Write example string"],
    "min_block_height": 123
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "payments": [{
    "payment_id": "f378710e54eeeb8d",
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "amount": 26734261552878,
    "block_height": 123,
    "unlock_time": 123,
    "subaddr_index": {
      "major": 2130706433,
      "minor": 2130706433
    },
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
  }]
}

Inputs:

  • payment_ids - string[]: Payment IDs used to find the payments (16 characters hex).
  • min_block_height - uint64: The block height at which to start looking for payments.

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.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address receiving the payment.

COMMAND_RPC_GET_HEIGHT

Back to top

Returns the wallet's current block height and blockchain immutable height

Endpoints: get_height

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_height"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "height": 234767,
    "immutable_height": 123
  }
}

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.
  • immutable_height - uint64: The latest height in the blockchain that can not be reorganized from (backed by atleast 2 Service Node, or 1 hardcoded checkpoint, 0 if N/A).

COMMAND_RPC_GET_LANGUAGES

Back to top

Get a list of available languages for your wallet's seed.

Endpoints: get_languages

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_languages"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "languages": ["TODO(loki): Write example string"],
    "languages_local": ["TODO(loki): Write example string"]
  }
}

Outputs:

  • languages - string[]: List of available languages.
  • languages_local - string[]: List of available languages in the native language

COMMAND_RPC_GET_PAYMENTS

Back to top

Get a list of incoming payments using a given payment id.

Endpoints: get_payments

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_payments",
  "params": {
    "payment_id": "f378710e54eeeb8d"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "payments": [{
    "payment_id": "f378710e54eeeb8d",
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "amount": 26734261552878,
    "block_height": 123,
    "unlock_time": 123,
    "subaddr_index": {
      "major": 2130706433,
      "minor": 2130706433
    },
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk"
  }]
}

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.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address receiving the payment.

COMMAND_RPC_GET_RESERVE_PROOF

Back to top

Generate a signature to prove of an available amount in a wallet.

Endpoints: get_reserve_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_reserve_proof",
  "params": {
    "all": true,
    "account_index": 0,
    "amount": 26734261552878,
    "message": "User assigned note describing something"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • all - bool: Proves all wallet balance to be disposable.
  • account_index - uint32: Specify the account from witch to prove reserve. (ignored if all is set to true)
  • amount - uint64: Amount (in atomic units) to prove the account has for reserve. (ignored if all is set to true)
  • message - string: (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string: Reserve signature.

COMMAND_RPC_GET_SPEND_PROOF

Back to top

Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.

Endpoints: get_spend_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_spend_proof",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "message": "User assigned note describing something"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • txid - string: Transaction id.
  • message - string: (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string: Spend signature.

COMMAND_RPC_GET_TRANSFERS

Back to top

Returns a list of transfers, by default all transfer types are included. If all requested type fields are false, then all transfers will be queried.

Endpoints: get_transfers

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_transfers",
  "params": {
    "in": true,
    "out": true,
    "stake": true,
    "pending": true,
    "failed": true,
    "pool": true,
    "coinbase": true,
    "filter_by_height": true,
    "min_height": 123,
    "max_height": 123,
    "account_index": 0,
    "subaddr_indices": [0],
    "all_accounts": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "in": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }],
    "out": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }],
    "pending": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }],
    "failed": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }],
    "pool": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }]
  }
}

Inputs:

  • in - bool: (Optional) Include incoming transfers.
  • out - bool: (Optional) Include outgoing transfers.
  • stake - bool: (Optional) Include outgoing stakes.
  • pending - bool: (Optional) Include pending transfers.
  • failed - bool: (Optional) Include failed transfers.
  • pool - bool: (Optional) Include transfers from the daemon's transaction pool.
  • coinbase - bool: (Optional) Include transfers from the daemon's transaction pool.
  • filter_by_height - bool: (Optional) Filter transfers by block height.
  • min_height - uint64: (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.
  • max_height - uint64: (Optional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).
  • account_index - uint32: (Optional) Index of the account to query for transfers. (defaults to 0)
  • subaddr_indices - uint32[]: (Optional) List of subaddress indices to query for transfers. (defaults to 0)
  • all_accounts - bool: If true, return transfers for all accounts, subaddr_indices and account_index are ignored

Outputs:

  • in - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.
  • out - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.
  • pending - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.
  • failed - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.
  • pool - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.

COMMAND_RPC_GET_TRANSFERS_CSV

Back to top

Returns a string with the transfers formatted as csv

Endpoints: get_transfers_csv

Constants: 
 * `request - COMMAND_RPC_GET_TRANSFERS::request`

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_transfers_csv",
  "params": {
    "in": true,
    "out": true,
    "stake": true,
    "pending": true,
    "failed": true,
    "pool": true,
    "coinbase": true,
    "filter_by_height": true,
    "min_height": 123,
    "max_height": 123,
    "account_index": 0,
    "subaddr_indices": [0],
    "all_accounts": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "csv": "TODO(loki): Write example string"
}

Inputs:

  • in - bool: (Optional) Include incoming transfers.
  • out - bool: (Optional) Include outgoing transfers.
  • stake - bool: (Optional) Include outgoing stakes.
  • pending - bool: (Optional) Include pending transfers.
  • failed - bool: (Optional) Include failed transfers.
  • pool - bool: (Optional) Include transfers from the daemon's transaction pool.
  • coinbase - bool: (Optional) Include transfers from the daemon's transaction pool.
  • filter_by_height - bool: (Optional) Filter transfers by block height.
  • min_height - uint64: (Optional) Minimum block height to scan for transfers, if filtering by height is enabled.
  • max_height - uint64: (Optional) Maximum block height to scan for transfers, if filtering by height is enabled (defaults to max block height).
  • account_index - uint32: (Optional) Index of the account to query for transfers. (defaults to 0)
  • subaddr_indices - uint32[]: (Optional) List of subaddress indices to query for transfers. (defaults to 0)
  • all_accounts - bool: If true, return transfers for all accounts, subaddr_indices and account_index are ignored

Outputs:

  • csv - string

COMMAND_RPC_GET_TRANSFER_BY_TXID

Back to top

Show information about a transfer to/from this address.

Endpoints: get_transfer_by_txid

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_transfer_by_txid",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "account_index": 0
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "transfer": {
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    },
    "transfers": [{
      "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
      "payment_id": "f378710e54eeeb8d",
      "height": 234767,
      "timestamp": 123,
      "amount": 26734261552878,
      "fee": 123,
      "note": "User assigned note describing something",
      "destinations": [{
        "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
        "amount": 26734261552878
      }],
      "type": "TODO(loki): Write example string",
      "unlock_time": 123,
      "subaddr_index": {
        "major": 2130706433,
        "minor": 2130706433
      },
      "subaddr_indices": [{
        "major": 2130706433,
        "minor": 2130706433
      }],
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "double_spend_seen": true,
      "confirmations": 123,
      "suggested_confirmations_threshold": 123,
      "checkpointed": 1,
      "blink_mempool": true,
      "was_blink": true
    }]
  }
}

Inputs:

  • txid - string: Transaction ID used to find the transfer.
  • account_index - uint32: (Optional) Index of the account to query for the transfer.

Outputs:

  • transfer - transfer_view
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.
  • transfers - transfer_view[]
  • txid - string: Transaction ID for this transfer.
  • payment_id - string: Payment ID for this transfer.
  • height - uint64: Height of the first block that confirmed this transfer (0 if not mined yet).
  • timestamp - uint64: UNIX timestamp for when this transfer was first confirmed in a block (or timestamp submission if not mined yet).
  • amount - uint64: Amount transferred.
  • fee - uint64: Transaction fee for this transfer.
  • note - string: Note about this transfer.
  • destinations - transfer_destination[]: Array of transfer destinations.
    • address - string: Destination public address.
    • amount - uint64: Amount to send to each destination, in atomic units.
  • type - string: Type of transfer, one of the following: "in", "out", "stake", "miner", "snode", "gov", "pending", "failed", "pool".
  • unlock_time - uint64: Number of blocks until transfer is safely spendable.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • subaddr_indices - cryptonote::subaddress_index[]
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • address - string: Address that transferred the funds.
  • double_spend_seen - bool: True if the key image(s) for the transfer have been seen before.
  • confirmations - uint64: Number of block mined since the block containing this transaction (or block height at which the transaction should be added to a block if not yet confirmed).
  • suggested_confirmations_threshold - uint64: Estimation of the confirmations needed for the transaction to be included in a block.
  • checkpointed - uint64: If transfer is backed by atleast 2 Service Node Checkpoints, 0 if it is not, see immutable_height in the daemon rpc call get_info
  • blink_mempool - bool: True if this is an approved blink tx in the mempool
  • was_blink - bool: True if we saw this as an approved blink (either in the mempool or a recent, uncheckpointed block). Note that if we didn't see it while an active blink this won't be set.

COMMAND_RPC_GET_TX_KEY

Back to top

Get transaction secret key from transaction id.

Endpoints: get_tx_key

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_tx_key",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c"
}

Inputs:

  • txid - string: Transaction id.

Outputs:

  • tx_key - string: Transaction secret key.

COMMAND_RPC_GET_TX_NOTES

Back to top

Get string notes for transactions.

Endpoints: get_tx_notes

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_tx_notes",
  "params": {
    "txids": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "notes": ["TODO(loki): Write example string"]
}

Inputs:

  • txids - string[]: Transaction ids.

Outputs:

  • notes - string[]: Notes for the transactions.

COMMAND_RPC_GET_TX_PROOF

Back to top

Get transaction signature to prove it.

Endpoints: get_tx_proof

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_tx_proof",
  "params": {
    "txid": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "message": "User assigned note describing something"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • txid - string: Transaction id.
  • address - string: Destination public address of the transaction.
  • message - string: (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:

  • signature - string: Transaction signature.

COMMAND_RPC_GET_VERSION

Back to top

Get RPC version Major & Minor integer-format, where Major is the first 16 bits and Minor the last 16 bits.

Endpoints: get_version

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "get_version"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "version": 2130706433
}

Outputs:

  • version - uint32: RPC version, formatted with Major * 2^16 + Minor(Major encoded over the first 16 bits, and Minor over the last 16 bits).

COMMAND_RPC_IMPORT_KEY_IMAGES

Back to top

Import signed key images list and verify their spent status.

Endpoints: import_key_images

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "import_key_images",
  "params": {
    "offset": 2130706433,
    "signed_key_images": [{
      "key_image": "8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3",
      "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
    }]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "height": 234767,
    "spent": 123,
    "unspent": 123
  }
}

Inputs:

  • offset - uint32
  • signed_key_images - signed_key_image[]
  • key_image - string: Key image of specific output
  • signature - string: Transaction signature.

Outputs:

  • height - uint64
  • spent - uint64: Amount (in atomic units) spent from those key images.
  • unspent - uint64: Amount (in atomic units) still available from those key images.

COMMAND_RPC_IMPORT_MULTISIG

Back to top

Import multisig info from other participants.

Endpoints: import_multisig_info

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "import_multisig_info",
  "params": {
    "info": ["TODO(loki): Write example string"]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "n_outputs": 123
}

Inputs:

  • info - string[]: List of multisig info in hex format from other participants.

Outputs:

  • n_outputs - uint64: Number of outputs signed with those multisig info.

COMMAND_RPC_IMPORT_OUTPUTS

Back to top

Import outputs in hex format.

Endpoints: import_outputs

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "import_outputs",
  "params": {
    "outputs_data_hex": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "num_imported": 123
}

Inputs:

  • outputs_data_hex - string: Wallet outputs in hex format.

Outputs:

  • num_imported - uint64: Number of outputs imported.

COMMAND_RPC_INCOMING_TRANSFERS

Back to top

Return a list of incoming transfers to the wallet.

Endpoints: incoming_transfers

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "incoming_transfers",
  "params": {
    "transfer_type": "all",
    "account_index": 0,
    "subaddr_indices": [0]
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "transfers": [{
    "amount": 26734261552878,
    "spent": true,
    "global_index": 123,
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "subaddr_index": {
      "major": 2130706433,
      "minor": 2130706433
    },
    "key_image": "8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3",
    "block_height": 123,
    "frozen": true,
    "unlocked": true
  }]
}

Inputs:

  • transfer_type - string: "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
  • account_index - uint32: (Optional) Return transfers for this account. (defaults to 0)
  • subaddr_indices - uint32[]: (Optional) Return transfers sent to these subaddresses.

Outputs:

  • transfers - transfer_details[]: List of information of the transfers details.
  • amount - uint64: Amount of this transfer.
  • spent - bool: Indicates if this transfer has been spent.
  • global_index - uint64: The index into the global list of transactions grouped by amount in the Loki network.
  • tx_hash - string: Several incoming transfers may share the same hash if they were in the same transaction.
  • subaddr_index - cryptonote::subaddress_index: Major & minor index, account and subaddress index respectively.
    • major - uint32: The account index, major index
    • minor - uint32: The subaddress index, minor index
  • key_image - string: Key image for the incoming transfer's unspent output (empty unless verbose is true).
  • block_height - uint64: Block height the transfer occurred on
  • frozen - bool: If the output has been intentionally frozen by the user, i.e. unspendable.
  • unlocked - bool: If the TX is spendable yet

COMMAND_RPC_IS_MULTISIG

Back to top

Check if a wallet is a multisig one.

Endpoints: is_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "is_multisig"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "multisig": true,
    "ready": true,
    "threshold": 2130706433,
    "total": 2130706433
  }
}

Outputs:

  • multisig - bool: States if the wallet is multisig.
  • ready - bool
  • threshold - uint32: Amount of signature needed to sign a transfer.
  • total - uint32: Total amount of signature in the multisig wallet.

COMMAND_RPC_LABEL_ACCOUNT

Back to top

Label an account.

Endpoints: label_account

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "label_account",
  "params": {
    "account_index": 0,
    "label": "My label"
  }
}
EOF

Inputs:

  • account_index - uint32: Account index to set the label for.
  • label - string: Label for the account.

COMMAND_RPC_LABEL_ADDRESS

Back to top

Label an address.

Endpoints: label_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "label_address",
  "params": {
    "index": {
      "major": 2130706433,
      "minor": 2130706433
    },
    "label": "My label"
  }
}
EOF

Inputs:

  • index - cryptonote::subaddress_index: Major & minor address index
  • major - uint32: The account index, major index
  • minor - uint32: The subaddress index, minor index
  • label - string: Label for the address.

COMMAND_RPC_LNS_BUY_MAPPING

Back to top

Endpoints: lns_buy_mapping

Constants: 
 * `R - char *description =`
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "lns_buy_mapping",
  "params": {
    "type": session,
    "owner": "L8ssYFtxi1HTFQdbmG9Lt71tyudgageDgBqBLcgLnw5XBiJ1NQLFYNAAfYpYS3jHaSe8UsFYjSgKadKhC7edTSQB15s6T7g",
    "backup_owner": "L8PYYYTh6yEewvuPmF75uhjDn9fBzKXp8CeMuwKNZBvZT8wAoe9hJ4favnZMvTTkNdT56DMNDcdWyheb3icfk4MS3udsP4R",
    "name": "My_Lns_Name",
    "value": "059f5a1ac2d04d0c09daa21b08699e8e2e0fd8d6fbe119207e5f241043cf77c30d",
    "account_index": 0,
    "subaddr_indices": [0],
    "priority": 0,
    "get_tx_key": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • type - string: The mapping type, currently we only support "session". In future "lokinet" and "blockchain" mappings will be available.
  • owner - string: (Optional): The ed25519 public key or wallet address that has authority to update the mapping.
  • backup_owner - string: (Optional): The secondary, backup public key that has authority to update the mapping.
  • name - string: The name to purchase via Loki Name Service
  • value - string: The value that the name maps to via Loki Name Service, (i.e. For Session: [display name->session public key]. In future, for wallets: [name->wallet address], for Lokinet: [name->domain name]).
  • 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: or 0-4 for: default, unimportant, normal, elevated, priority.
  • 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 loki 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 in atomic units.
  • fee - uint64: Value in atomic units of the fee charged for the tx.
  • 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_LNS_DECRYPT_VALUE

Back to top

Takes a LNS encrypted value and decrypts the mapping value.

Endpoints: lns_decrypt_value

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "lns_decrypt_value",
  "params": {
    "name": "TODO(loki): Write example string",
    "type": "TODO(loki): Write example string",
    "encrypted_value": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "value": "TODO(loki): Write example string"
}

Inputs:

  • name - string: The desired name to hash
  • type - string: The mapping type, currently we only support "session". In future "lokinet" and "blockchain" mappings will be available.
  • encrypted_value - string: The encrypted value represented in hex

Outputs:

  • value - string: The value decrypted

COMMAND_RPC_LNS_HASH_NAME

Back to top

Takes a LNS name, upon validating it, generates the hash and returns the base64 representation of the hash suitable for use in the daemon LNS name queries.

Endpoints: lns_hash_name

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "lns_hash_name",
  "params": {
    "type": "TODO(loki): Write example string",
    "name": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "name": "TODO(loki): Write example string"
}

Inputs:

  • type - string: The mapping type, currently we only support "session". In future "lokinet" and "blockchain" mappings will be available.
  • name - string: The desired name to hash

Outputs:

  • name - string: The name hashed and represented in base64

COMMAND_RPC_LNS_MAKE_UPDATE_SIGNATURE

Back to top

Endpoints: lns_make_update_mapping_signature

Constants: 
 * `R - char *description =`
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "lns_make_update_mapping_signature",
  "params": {
    "type": session,
    "name": "My_Lns_Name",
    "value": "059f5a1ac2d04d0c09daa21b08699e8e2e0fd8d6fbe119207e5f241043cf77c30d",
    "owner": "L8ssYFtxi1HTFQdbmG9Lt71tyudgageDgBqBLcgLnw5XBiJ1NQLFYNAAfYpYS3jHaSe8UsFYjSgKadKhC7edTSQB15s6T7g",
    "backup_owner": "L8PYYYTh6yEewvuPmF75uhjDn9fBzKXp8CeMuwKNZBvZT8wAoe9hJ4favnZMvTTkNdT56DMNDcdWyheb3icfk4MS3udsP4R",
    "account_index": 0
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • type - string: The mapping type, currently we only support "session". In future "lokinet" and "blockchain" mappings will be available.
  • name - string: The desired name to update via Loki Name Service
  • value - string: (Optional): The new value that the name maps to via Loki Name Service. If not specified or given the empty string "", then the mapping's value remains unchanged.
  • owner - string: (Optional): The new owner of the mapping. If not specified or given the empty string "", then the mapping's owner remains unchanged.
  • backup_owner - string: (Optional): The new backup owner of the mapping. If not specified or given the empty string "", then the mapping's backup owner remains unchanged.
  • account_index - uint32: (Optional) Use this wallet's subaddress account for generating the signature

Outputs:

  • signature - string: A signature valid for using in LNS to update an underlying mapping.

COMMAND_RPC_LNS_UPDATE_MAPPING

Back to top

Update the underlying value in the name->value mapping via Loki Name Service.

Endpoints: lns_update_mapping

Constants: 
 * `R - char *description =`

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "lns_update_mapping",
  "params": {
    "type": session,
    "name": "My_Lns_Name",
    "value": "059f5a1ac2d04d0c09daa21b08699e8e2e0fd8d6fbe119207e5f241043cf77c30d",
    "owner": "L8ssYFtxi1HTFQdbmG9Lt71tyudgageDgBqBLcgLnw5XBiJ1NQLFYNAAfYpYS3jHaSe8UsFYjSgKadKhC7edTSQB15s6T7g",
    "backup_owner": "L8PYYYTh6yEewvuPmF75uhjDn9fBzKXp8CeMuwKNZBvZT8wAoe9hJ4favnZMvTTkNdT56DMNDcdWyheb3icfk4MS3udsP4R",
    "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70",
    "account_index": 0,
    "subaddr_indices": [0],
    "priority": 0,
    "get_tx_key": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • type - string: The mapping type, currently we only support "session". In future "lokinet" and "blockchain" mappings will be available.
  • name - string: The name to update via Loki Name Service
  • value - string: (Optional): The new value that the name maps to via Loki Name Service. If not specified or given the empty string "", then the mapping's value remains unchanged.
  • owner - string: (Optional): The new owner of the mapping. If not specified or given the empty string "", then the mapping's owner remains unchanged.
  • backup_owner - string: (Optional): The new backup owner of the mapping. If not specified or given the empty string "", then the mapping's backup owner remains unchanged.
  • signature - string: (Optional): Signature derived using libsodium generichash on {current txid blob, new value blob} of the mapping to update. By default the hash is signed using the wallet's spend key as an ed25519 keypair, if signature is specified.
  • 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: 0-4 for: default, unimportant, normal, elevated, priority.
  • 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 loki 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 in atomic units.
  • fee - uint64: Value in atomic units of the fee charged for the tx.
  • 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_MAKE_INTEGRATED_ADDRESS

Back to top

Make an integrated address from the wallet address and a payment id.

Endpoints: make_integrated_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "make_integrated_address",
  "params": {
    "standard_address": "TODO(loki): Write example string",
    "payment_id": "f378710e54eeeb8d"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "integrated_address": "TODO(loki): Write example string",
    "payment_id": "f378710e54eeeb8d"
  }
}

Inputs:

  • standard_address - string: (Optional, defaults to primary address) Destination public address.
  • payment_id - string: (Optional, defaults to a random ID) 16 characters hex encoded.

Outputs:

  • integrated_address - string
  • payment_id - string: Hex encoded.

COMMAND_RPC_MAKE_MULTISIG

Back to top

Make a wallet multisig by importing peers multisig string.

Endpoints: make_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "make_multisig",
  "params": {
    "multisig_info": ["TODO(loki): Write example string"],
    "threshold": 2130706433,
    "password": "not_a_secure_password"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "multisig_info": "TODO(loki): Write example string"
  }
}

Inputs:

  • multisig_info - string[]: List of multisig string from peers.
  • threshold - uint32: Amount of signatures needed to sign a transfer. Must be less or equal than the amount of signature in multisig_info.
  • password - string: Wallet password.

Outputs:

  • address - string: Multisig wallet address.
  • multisig_info - string: Multisig string to share with peers to create the multisig wallet (extra step for N-1/N wallets).

COMMAND_RPC_MAKE_URI

Back to top

Create a payment URI using the official URI spec.

Endpoints: make_uri

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "make_uri"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "uri": "TODO(loki): Write example string"
}

Inputs:

  • address - string: Wallet address.
  • payment_id - string: (Optional) 16 or 64 character hexadecimal payment id.
  • amount - uint64: (Optional) the integer amount to receive, in atomic units.
  • tx_description - string: (Optional) Description of the reason for the tx.
  • recipient_name - string: (Optional) name of the payment recipient.

Outputs:

  • uri - string: This contains all the payment input information as a properly formatted payment URI.

COMMAND_RPC_OPEN_WALLET

Back to top

Open a wallet. You need to have set the argument "–-wallet-dir" when launching loki-wallet-rpc to make this work.
The wallet rpc executable may only open wallet files within the same directory as wallet-dir, otherwise use the
"--wallet-file" flag to open specific wallets.

Endpoints: open_wallet

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "open_wallet",
  "params": {
    "filename": "Doyles_Cool_Wallet",
    "password": "not_a_secure_password",
    "autosave_current": true
  }
}
EOF

Inputs:

  • filename - string: Wallet name stored in "–-wallet-dir".
  • password - string: The wallet password, set as "" if there's no password
  • autosave_current - bool: (Optional: Default true): If a pre-existing wallet is open, save to disk before opening the new wallet.

COMMAND_RPC_PARSE_URI

Back to top

Parse a payment URI to get payment information.

Endpoints: parse_uri

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "parse_uri",
  "params": {
    "uri": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "uri": {
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "payment_id": "f378710e54eeeb8d",
      "amount": 26734261552878,
      "tx_description": "User assigned note describing something",
      "recipient_name": "Thor"
    },
    "unknown_parameters": ["TODO(loki): Write example string"]
  }
}

Inputs:

  • uri - string: This contains all the payment input information as a properly formatted payment URI.

Outputs:

  • uri - uri_spec: JSON object containing payment information:
  • address - string: Wallet address.
  • payment_id - string: (Optional) 16 or 64 character hexadecimal payment id.
  • amount - uint64: (Optional) the integer amount to receive, in atomic units.
  • tx_description - string: (Optional) Description of the reason for the tx.
  • recipient_name - string: (Optional) name of the payment recipient.
  • unknown_parameters - string[]

COMMAND_RPC_PREPARE_MULTISIG

Back to top

Prepare a wallet for multisig by generating a multisig string to share with peers.

Endpoints: prepare_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "prepare_multisig"
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "multisig_info": "TODO(loki): Write example string"
}

Outputs:

  • multisig_info - string: Multisig string to share with peers to create the multisig wallet.

COMMAND_RPC_QUERY_KEY

Back to top

Return the spend or view private key.

Endpoints: query_key

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "query_key",
  "params": {
    "key_type": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "key": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • key_type - string: Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key

Outputs:

  • key - string: The view key will be hex encoded, while the mnemonic will be a string of words.

COMMAND_RPC_REFRESH

Back to top

Refresh a wallet after openning.

Endpoints: refresh

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "refresh",
  "params": {
    "start_height": 123
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "blocks_fetched": 123,
    "received_money": true
  }
}

Inputs:

  • start_height - uint64: (Optional) The block height from which to start refreshing.

Outputs:

  • blocks_fetched - uint64: Number of new blocks scanned.
  • received_money - bool: States if transactions to the wallet have been found in the blocks.

COMMAND_RPC_REGISTER_SERVICE_NODE

Back to top

Register Service Node.

Endpoints: register_service_node

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "register_service_node",
  "params": {
    "register_service_node_str": "TODO(loki): Write example string",
    "get_tx_key": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • register_service_node_str - string: String supplied by the prepare_registration command.
  • 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 loki 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 in atomic units.
  • fee - uint64: Value in atomic units of the fee charged for the tx.
  • 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_RELAY_TX

Back to top

Relay transaction metadata to the daemon 

Endpoints: relay_tx

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "relay_tx",
  "params": {
    "hex": "TODO(loki): Write example string",
    "blink": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"
}

Inputs:

  • hex - string: Transaction metadata returned from a transfer method with get_tx_metadata set to true.
  • blink - bool: (Optional): True if this tx was constructed with a blink priority and should be submitted to the blink quorum

Outputs:

  • tx_hash - string: String for the publically searchable transaction hash.

COMMAND_RPC_REQUEST_STAKE_UNLOCK

Back to top

Request to unlock stake by deregistering Service Node.

Endpoints: request_stake_unlock

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "request_stake_unlock",
  "params": {
    "service_node_key": "4a8c30cea9e729b06c91132295cce32d2a8e6e5bcf7b74a998e2ee1b3ed590b3"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "unlocked": true,
    "msg": "Message returned by the sender (wallet/daemon)"
  }
}

Inputs:

  • service_node_key - string: Service Node Public Key.

Outputs:

  • unlocked - bool: States if stake has been unlocked.
  • msg - string: Information on the unlocking process.

COMMAND_RPC_RESCAN_BLOCKCHAIN

Back to top

Rescan the blockchain from scratch, losing any information 
which can not be recovered from the blockchain itself.
This includes destination addresses, tx secret keys, tx notes, etc.
Warning: This blocks the Wallet RPC executable until rescanning is complete.

Endpoints: rescan_blockchain

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "rescan_blockchain",
  "params": {
    "hard": true
  }
}
EOF

Inputs:

  • hard - bool

COMMAND_RPC_RESCAN_SPENT

Back to top

Rescan the blockchain for spent outputs.

Endpoints: rescan_spent

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "rescan_spent"
}
EOF

COMMAND_RPC_RESTORE_DETERMINISTIC_WALLET

Back to top

Restore a wallet using the seed words.

Endpoints: restore_deterministic_wallet

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "restore_deterministic_wallet",
  "params": {
    "restore_height": 123,
    "filename": "Doyles_Cool_Wallet",
    "seed": "TODO(loki): Write example string",
    "seed_offset": "TODO(loki): Write example string",
    "password": "not_a_secure_password",
    "language": "english",
    "autosave_current": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "seed": "TODO(loki): Write example string",
    "info": "TODO(loki): Write example string",
    "was_deprecated": true
  }
}

Inputs:

  • restore_height - uint64: Height in which to start scanning the blockchain for transactions into and out of this Wallet.
  • filename - string: Set the name of the Wallet.
  • seed - string: Mnemonic seed of wallet (25 words).
  • seed_offset - string
  • password - string: Set password for Wallet.
  • language - string: Set language for the wallet.
  • autosave_current - bool: (Optional: Default true): If a pre-existing wallet is open, save to disk before opening the new wallet.

Outputs:

  • address - string: Public address of wallet.
  • seed - string: Seed of wallet.
  • info - string: Wallet information.
  • was_deprecated - bool

COMMAND_RPC_SET_ACCOUNT_TAG_DESCRIPTION

Back to top

Set description for an account tag.

Endpoints: set_account_tag_description

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_account_tag_description",
  "params": {
    "tag": "My tag",
    "description": "My account description"
  }
}
EOF

Inputs:

  • tag - string: Set a description for this tag.
  • description - string: Description for the tag.

COMMAND_RPC_SET_ATTRIBUTE

Back to top

Set arbitrary attribute.

Endpoints: set_attribute

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_attribute",
  "params": {
    "key": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70",
    "value": "TODO(loki): Write example string"
  }
}
EOF

Inputs:

  • key - string: Attribute name.
  • value - string: Attribute value.

COMMAND_RPC_SET_DAEMON

Back to top

Endpoints: set_daemon
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_daemon",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "trusted": true,
    "ssl_support": "TODO(loki): Write example string",
    "ssl_private_key_path": "TODO(loki): Write example string",
    "ssl_certificate_path": "TODO(loki): Write example string",
    "ssl_ca_file": "TODO(loki): Write example string",
    "ssl_allowed_fingerprints": ["TODO(loki): Write example string"],
    "ssl_allow_any_cert": true
  }
}
EOF

Inputs:

  • address - string: The remote address of the daemon
  • trusted - bool: When true, allow the usage of commands that may compromise privacy
  • ssl_support - string: disabled, enabled, autodetect
  • ssl_private_key_path - string
  • ssl_certificate_path - string
  • ssl_ca_file - string
  • ssl_allowed_fingerprints - string[]
  • ssl_allow_any_cert - bool

COMMAND_RPC_SET_LOG_CATEGORIES

Back to top

Endpoints: set_log_categories
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_log_categories",
  "params": {
    "categories": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "categories": "TODO(loki): Write example string"
}

Inputs:

  • categories - string

Outputs:

  • categories - string

COMMAND_RPC_SET_LOG_LEVEL

Back to top

Endpoints: set_log_level
Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_log_level",
  "params": {
    "level": 8
  }
}
EOF

Inputs:

  • level - int8

COMMAND_RPC_SET_TX_NOTES

Back to top

Set arbitrary string notes for transactions.

Endpoints: set_tx_notes

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "set_tx_notes",
  "params": {
    "txids": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"],
    "notes": ["TODO(loki): Write example string"]
  }
}
EOF

Inputs:

  • txids - string[]: Transaction ids.
  • notes - string[]: Notes for the transactions.

COMMAND_RPC_SIGN

Back to top

Sign a string.

Endpoints: sign

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sign",
  "params": {
    "data": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
}

Inputs:

  • data - string: Anything you need to sign.

Outputs:

  • signature - string: Signature generated against the "data" and the account public address.

COMMAND_RPC_SIGN_MULTISIG

Back to top

Sign a transaction in multisig.

Endpoints: sign_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sign_multisig",
  "params": {
    "tx_data_hex": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_data_hex": "TODO(loki): Write example string",
    "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"]
  }
}

Inputs:

  • tx_data_hex - string: Multisig transaction in hex format, as returned by transfer under multisig_txset.

Outputs:

  • tx_data_hex - string: Multisig transaction in hex format.
  • tx_hash_list - string[]: List of transaction Hash.

COMMAND_RPC_SIGN_TRANSFER

Back to top

Sign a transaction created on a read-only wallet (in cold-signing process).

Endpoints: sign_transfer

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sign_transfer",
  "params": {
    "unsigned_txset": "TODO(loki): Write example string",
    "export_raw": true,
    "get_tx_keys": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "signed_txset": "TODO(loki): Write example string",
    "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"],
    "tx_raw_list": ["TODO(loki): Write example string"],
    "tx_key_list": ["1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c"]
  }
}

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_SPLIT_INTEGRATED_ADDRESS

Back to top

Retrieve the standard address and payment id corresponding to an integrated address.

Endpoints: split_integrated_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "split_integrated_address",
  "params": {
    "integrated_address": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "standard_address": "TODO(loki): Write example string",
    "payment_id": "f378710e54eeeb8d",
    "is_subaddress": true
  }
}

Inputs:

  • integrated_address - string

Outputs:

  • standard_address - string
  • payment_id - string
  • is_subaddress - bool

COMMAND_RPC_STAKE

Back to top

Stake for Service Node.

Endpoints: stake

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "stake",
  "params": {
    "destination": "L8ssYFtxi1HTFQdbmG9Lt71tyudgageDgBqBLcgLnw5XBiJ1NQLFYNAAfYpYS3jHaSe8UsFYjSgKadKhC7edTSQB15s6T7g",
    "amount": 26734261552878,
    "subaddr_indices": [0],
    "service_node_key": "4a8c30cea9e729b06c91132295cce32d2a8e6e5bcf7b74a998e2ee1b3ed590b3",
    "priority": 0,
    "get_tx_key": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • destination - string: Primary Public address that the rewards will go to.
  • amount - uint64: Amount of Loki to stake in atomic units.
  • subaddr_indices - uint32[]: (Optional) Transfer from this set of subaddresses. (Defaults to 0)
  • service_node_key - string: Service Node Public Address.
  • priority - uint32: Set a priority for the transaction. Accepted values are: or 0-4 for: default, unimportant, normal, elevated, priority.
  • 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 loki 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 in atomic units.
  • fee - uint64: Value in atomic units of the fee charged for the tx.
  • 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_START_MINING

Back to top

Start mining in the loki daemon.

Endpoints: start_mining

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "start_mining",
  "params": {
    "threads_count": 123
  }
}
EOF

Inputs:

  • threads_count - uint64: Number of threads created for mining.

COMMAND_RPC_STOP_MINING

Back to top

Stop mining in the loki daemon.

Endpoints: stop_mining

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "stop_mining"
}
EOF

COMMAND_RPC_STOP_WALLET

Back to top

Stops the wallet, storing the current state.

Endpoints: stop_wallet

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "stop_wallet"
}
EOF

COMMAND_RPC_STORE

Back to top

Save the wallet file.

Endpoints: store

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "store"
}
EOF

COMMAND_RPC_SUBMIT_MULTISIG

Back to top

Submit a signed multisig transaction.

Endpoints: submit_multisig

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "submit_multisig",
  "params": {
    "tx_data_hex": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"]
}

Inputs:

  • tx_data_hex - string: Multisig transaction in hex format, as returned by sign_multisig under tx_data_hex.

Outputs:

  • tx_hash_list - string[]: List of transaction hash.

COMMAND_RPC_SUBMIT_TRANSFER

Back to top

Submit a previously signed transaction on a read-only wallet (in cold-signing process).

Endpoints: submit_transfer

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "submit_transfer",
  "params": {
    "tx_data_hex": "TODO(loki): Write example string"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"]
}

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_ALL

Back to top

Send all unlocked balance to an address.

Endpoints: sweep_all

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sweep_all",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "account_index": 0,
    "subaddr_indices": [0],
    "priority": 0,
    "blink": true,
    "outputs": 10,
    "unlock_time": 123,
    "payment_id": "f378710e54eeeb8d",
    "get_tx_keys": true,
    "below_amount": 123,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"],
    "tx_key_list": ["1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c"],
    "amount_list": [123],
    "fee_list": [123],
    "tx_blob_list": ["0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000"],
    "tx_metadata_list": ["TODO(loki): Write example string"],
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

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: Set a priority for the transaction. Accepted values are: 1 for unimportant or 5 for blink. (0 and 2-4 are accepted for backwards compatibility and are equivalent to 5)
  • blink - bool: (Deprecated) Set priority to 5 for blink, field is deprecated: specifies that the tx should be blinked (priority will be ignored).
  • outputs - uint64
  • unlock_time - uint64: Number of blocks before the loki 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_DUST

Back to top

Send all dust outputs back to the wallet's, to make them easier to spend (and mix).

Endpoints: sweep_dust

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sweep_dust",
  "params": {
    "get_tx_keys": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"],
    "tx_key_list": ["1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c"],
    "amount_list": [123],
    "fee_list": [123],
    "tx_blob_list": ["0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000"],
    "tx_metadata_list": ["TODO(loki): Write example string"],
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

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 loki 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_SINGLE

Back to top

Send all of a specific unlocked output to an address.

Endpoints: sweep_single

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "sweep_single",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "priority": 0,
    "blink": true,
    "outputs": 10,
    "unlock_time": 123,
    "payment_id": "f378710e54eeeb8d",
    "get_tx_key": true,
    "key_image": "8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3",
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • address - string: Destination public address.
  • priority - uint32: Set a priority for the transaction. Accepted values are: 1 for unimportant or 5 for blink. (0 and 2-4 are accepted for backwards compatibility and are equivalent to 5)
  • blink - bool: (Deprecated) Set priority to 5 for blink, field is deprecated: specifies that the tx should be blinked (priority will be ignored).
  • outputs - uint64
  • unlock_time - uint64: Number of blocks before the loki 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_TAG_ACCOUNTS

Back to top

Apply a filtering tag to a list of accounts.

Endpoints: tag_accounts

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "tag_accounts",
  "params": {
    "tag": "My tag",
    "accounts": [2130706433]
  }
}
EOF

Inputs:

  • tag - string: Tag for the accounts.
  • accounts - uint32[]: Tag this list of accounts.

COMMAND_RPC_TRANSFER

Back to top

Send loki 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
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "transfer",
  "params": {
    "destinations": [{
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "amount": 26734261552878
    }],
    "account_index": 0,
    "subaddr_indices": [0],
    "priority": 0,
    "blink": true,
    "unlock_time": 123,
    "payment_id": "f378710e54eeeb8d",
    "get_tx_key": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash": "b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123",
    "tx_key": "1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c",
    "amount": 26734261552878,
    "fee": 123,
    "tx_blob": "0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000",
    "tx_metadata": "TODO(loki): Write example string",
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • destinations - transfer_destination[]: Array of destinations to receive LOKI.
  • address - string: Destination public address.
  • amount - uint64: Amount to send to each destination, in atomic units.
  • 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: 1 for unimportant or 5 for blink. (0 and 2-4 are accepted for backwards compatibility and are equivalent to 5)
  • blink - bool: (Deprecated) Set priority to 5 for blink, field is deprecated: specifies that the tx should be blinked (priority will be ignored).
  • unlock_time - uint64: Number of blocks before the loki 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 loki 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

Back to top

Same as transfer, but can split into more than one tx if necessary.

Endpoints: transfer_split

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "transfer_split",
  "params": {
    "destinations": [{
      "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
      "amount": 26734261552878
    }],
    "account_index": 0,
    "subaddr_indices": [0],
    "priority": 0,
    "blink": true,
    "unlock_time": 123,
    "payment_id": "f378710e54eeeb8d",
    "get_tx_keys": true,
    "do_not_relay": true,
    "get_tx_hex": true,
    "get_tx_metadata": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "tx_hash_list": ["b605cab7e3b9fe1f6d322e3167cd26e1e61c764afa9d733233ef716787786123"],
    "tx_key_list": ["1982e99c69d8acc993cfc94ce59ff8f113d23482d9a25c892a3fc01c77dd8c4c"],
    "amount_list": [123],
    "fee_list": [123],
    "tx_blob_list": ["0402f78b05f78b05f78b0501ffd98b0502b888ddcf730229f056f5594cfcfd8d44f8033c9fda22450693d1694038e1cecaaaac25a8fc12af8992bc800102534df00c14ead3b3dedea9e7bdcf71c44803349b5e9aee2f73e22d5385ac147b7601008e5729d9329320444666d9d9d9dc602a3ae585de91ab2ca125665e3a363610021100000001839fdb0000000000000000000001200408d5ad7ab79d9b05c94033c2029f4902a98ec51f5175564f6978467dbb28723f929cf806d4ee1c781d7771183a93a1fd74f0827bddee9baac7e3083ab2b5840000"],
    "tx_metadata_list": ["TODO(loki): Write example string"],
    "multisig_txset": "TODO(loki): Write example string",
    "unsigned_txset": "TODO(loki): Write example string"
  }
}

Inputs:

  • destinations - transfer_destination[]: Array of destinations to receive LOKI:
  • address - string: Destination public address.
  • amount - uint64: Amount to send to each destination, in atomic units.
  • 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: 1 for unimportant or 5 for blink. (0 and 2-4 are accepted for backwards compatibility and are equivalent to 5)
  • blink - bool: (Deprecated) Set priority to 5 for blink, field is deprecated: specifies that the tx should be blinked (priority will be ignored).
  • unlock_time - uint64: Number of blocks before the loki 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 loki 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_UNTAG_ACCOUNTS

Back to top

Remove filtering tag from a list of accounts.

Endpoints: untag_accounts

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "untag_accounts",
  "params": {
    "accounts": [2130706433]
  }
}
EOF

Inputs:

  • accounts - uint32[]: Remove tag from this list of accounts.

COMMAND_RPC_VALIDATE_ADDRESS

Back to top

Parse an address to validate if it's a valid Loki address.

Endpoints: validate_address

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "validate_address",
  "params": {
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "any_net_type": true,
    "allow_openalias": true
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "result": {
    "valid": true,
    "integrated": true,
    "subaddress": true,
    "nettype": "MAINNET",
    "openalias_address": "TODO(loki): Write example string"
  }
}

Inputs:

  • address - string: Address to check.
  • any_net_type - bool
  • allow_openalias - bool

Outputs:

  • valid - bool: States if it is a valid Loki address.
  • integrated - bool: States if it is an integrated address.
  • subaddress - bool: States if it is a subaddress.
  • nettype - string: States if the nettype is mainet, testnet, stagenet.
  • openalias_address - string

COMMAND_RPC_VERIFY

Back to top

Verify a signature on a string.

Endpoints: verify

Example Request
curl -X POST http://127.0.0.1:22023/json_rpc \
-H 'Content-Type: application/json' \
-d @- << EOF
{
  "jsonrpc": "2.0",
  "id": "0",
  "method": "verify",
  "params": {
    "data": "TODO(loki): Write example string",
    "address": "L8KJf3nRQ53NTX1YLjtHryjegFRa3ZCEGLKmRxUfvkBWK19UteEacVpYqpYscSJ2q8WRuHPFdk7Q5W8pQB7Py5kvUs8vKSk",
    "signature": "bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70bf430a3279f576ed8a814be25193e5a1ec61d3ee5729e64f47d8480ce5a2da70"
  }
}
EOF

Example Response
{
  "jsonrpc": "2.0",
  "id": "0",
  "good": true
}

Inputs:

  • data - string: What should have been signed.
  • address - string: Public address of the wallet used to sign the data.
  • signature - string: Signature generated by sign method.

Outputs:

  • good - bool