Electronero exposes a JSON-RPC service that allows programs to control a running wallet. The helper libraries in this repository make it easy to interact with the service from Node.js, PHP, Go and Python.
const ElectroneroRPC = require('../modules/NodeJs/electronero');
const rpc = new ElectroneroRPC();
rpc.getBalance().then(bal => console.log(bal));
The wallet RPC exposes a wide range of commands. The following table lists each
method with its request parameters. Parameters are taken directly from
wallet_rpc_server_commands_defs.h
in the source tree.
Method | Parameters |
---|
| get_balance
| account_index |
| get_address
| account_index, address_index |
| create_address
| account_index, label |
| label_address
| index, label |
| get_accounts
| tag |
| create_account
| label |
| label_account
| account_index, label |
| get_account_tags
| |
| tag_accounts
| tag, accounts |
| untag_accounts
| accounts |
| set_account_tag_description
| tag, description |
| get_height
| |
| transfer
| destinations, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, payment_id, get_tx_key, do_not_relay, get_tx_hex, get_tx_metadata |
| transfer_split
| destinations, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, payment_id, get_tx_keys, do_not_relay, get_tx_hex, get_tx_metadata |
| sweep_dust
| get_tx_keys, do_not_relay, get_tx_hex, get_tx_metadata |
| sweep_all
| address, account_index, subaddr_indices, priority, mixin, ring_size, unlock_time, payment_id, get_tx_keys, below_amount, do_not_relay, get_tx_hex, get_tx_metadata |
| sweep_single
| address, priority, mixin, ring_size, unlock_time, payment_id, get_tx_key, key_image, do_not_relay, get_tx_hex, get_tx_metadata |
| relay_tx
| hex |
| token_create
| name, symbol, supply, creator_fee |
| token_balance
| token_address, address |
| token_transfer
| token_address, to, amount |
| token_approve
| name, spender, amount |
| token_transfer_from
| token_address, from, to, amount |
| token_burn
| token_address, amount |
| token_mint
| token_address, amount |
| token_info
| token_address |
| all_tokens
| |
| my_tokens
| |
| token_history
| token_address, address, type |
| token_history_addr
| address, type |
| token_set_fee
| token_address, creator_fee |
| token_transfer_ownership
| token_address, new_owner |
| store
| |
| get_payments
| payment_id |
| get_bulk_payments
| payment_ids, min_block_height |
| incoming_transfers
| transfer_type, account_index, subaddr_indices, verbose |
| query_key
| key_type |
| make_integrated_address
| payment_id |
| split_integrated_address
| integrated_address |
| stop_wallet
| |
| rescan_blockchain
| |
| set_tx_notes
| txids, notes |
| get_tx_notes
| txids |
| set_attribute
| key, value |
| get_attribute
| key |
| get_tx_key
| txid |
| check_tx_key
| txid, tx_key, address |
| get_tx_proof
| txid, address, message |
| check_tx_proof
| txid, address, message, signature |
| get_spend_proof
| txid, message |
| check_spend_proof
| txid, message, signature |
| get_reserve_proof
| all, account_index, amount, message |
| check_reserve_proof
| address, message, signature |
| get_transfers
| in, out, pending, failed, pool, filter_by_height, min_height, max_height, account_index, subaddr_indices, (uint64_t)CRYPTONOTE_MAX_BLOCK_NUMBER) |
| get_transfer_by_txid
| txid, account_index |
| sign
| data |
| verify
| data, address, signature |
| export_key_images
| |
| parse_uri
| uri |
| add_address_book_entry
| address, payment_id, description |
| get_address_book_entry
| entries |
| delete_address_book_entry
| index |
| rescan_spent
| |
| rescan_token_tx
| fromHeight |
| start_mining
| threads_count, do_background_mining, ignore_battery |
| stop_mining
| |
| get_languages
| |
| create_wallet
| filename, password, language |
| open_wallet
| filename, password |
| is_multisig
| |
| prepare_multisig
| |
| make_multisig
| multisig_info, threshold, password |
| export_multisig
| |
| import_multisig
| info |
| finalize_multisig
| password, multisig_info |
| sign_multisig
| tx_data_hex |
| submit_multisig
| tx_data_hex |