1 RPC Reference
Claude edited this page 2026-02-20 15:12:17 +00:00

RPC Reference

The Lethean node exposes two RPC interfaces: a daemon API for blockchain queries and node control, and a wallet API for account management and transactions. Both use JSON-RPC 2.0 over HTTP.

  • Daemon RPC default ports: 36941 (mainnet), 46941 (testnet)
  • Wallet RPC runs on a user-configured port alongside the wallet process

Daemon RPC Methods

Node Information

Method Description Key parameters Key returns
getinfo Comprehensive node status flags (bitmask for optional fields) height, difficulty, tx_count, outgoing_connections_count, incoming_connections_count, synchronized, top_block_hash, total_coins, block_reward
getheight Current blockchain height (none) height
getblockcount Alias for block count (none) count

Block Queries

Method Description Key parameters Key returns
getblockhash Hash of block at height [height] block hash string
getblocktemplate Template for mining wallet_address, extra_text blocktemplate_blob, difficulty, height, seed
submitblock Submit mined block [block_blob] status
submitblock2 Extended block submission block_blob + PoS data status, block_id
get_last_block_header Most recent block header (none) block_header (hash, height, timestamp, major/minor version, nonce, reward, depth, difficulty)
get_block_header_by_hash Block header by hash hash block_header
get_block_header_by_height Block header by height height block_header
get_blocks_details Detailed block info (range) height_start, count blocks[] with full details
get_block_details Single block details id (hash) block_details
get_alt_blocks_details Alternative chain blocks offset, count blocks[]

Transaction Queries

Method Description Key parameters Key returns
gettransactions Fetch txs by hash txs_hashes[] txs_as_hex[], missed_tx[]
get_tx_details Detailed tx information tx_hash tx_info (inputs, outputs, extra, fee, size)
decrypt_tx_details Decrypt private tx data tx_id or tx_blob, tx_secret_key, outputs_addresses[] decoded_outputs[] (amount, address, asset_id)
get_tx_global_outputs_indexes Global output indices txids[] output index arrays
get_tx_global_outputs_indexes_by_amount Indices by amount amount, i output indices
search_by_id Search blocks/txs by hash id matching block or tx details
get_est_height_from_date Estimate height from timestamp timestamp h (estimated height)

Transaction Pool

Method Description Key parameters Key returns
get_pool_info Pool status and pending aliases (none) aliases_que[]
get_tx_pool All pool transactions (none) txs[] (blobs), tx_expiration_ts_median
get_pool_txs_details Detailed pool tx info ids[] txs[] with full details
get_pool_txs_brief_details Brief pool tx summaries ids[] txs[] brief info
get_all_pool_tx_list List all pool tx hashes (none) ids[]
get_current_core_tx_expiration_median Expiration median timestamp (none) expiration_median

Key Images

Method Description Key parameters Key returns
check_keyimages Check spent status images[] images_stat[] (1=unspent, 0=spent)

Output Selection

Method Description Key parameters Key returns
get_random_outs Random outputs for mixing amounts[], outs_count outs[] with global indices and keys
get_random_outs3 Version 3 random outputs amounts[], outs_count, use_forced_mix_outs outs[]
get_multisig_info Multisig output details ms_id multisig output info
get_global_index_info Global output index stats asset_id amount_and_count[]

Address and Alias Operations

Method Description Key parameters Key returns
get_alias_details Resolve alias to address alias alias_details (address, comment)
get_alias_reward Cost to register alias alias reward
get_all_aliases List all registered aliases (none) aliases[]
get_aliases Paginated alias list offset, count aliases[]
get_aliases_by_address Aliases for an address address alias
get_integrated_address Create integrated address payment_id, regular_address integrated_address, payment_id

Asset Operations

Method Description Key parameters Key returns
get_asset_info Asset details by ID asset_id asset_descriptor (ticker, name, supply, owner)
get_assets_list List registered assets offset, count assets[]

Mining Control

Method Description Key parameters Key returns
start_mining Start PoW mining miner_address, threads_count status
stop_mining Stop PoW mining (none) status
get_pos_mining_details PoS staking details stake entries pos_basic_data

Voting

Method Description Key parameters Key returns
get_votes Vote results in block range h_start, h_end votes

Pool Management

Method Description Key parameters Key returns
reset_tx_pool Clear transaction pool (none) status
remove_tx_from_pool Remove specific tx tx_id status

Raw Transaction

Method Description Key parameters Key returns
sendrawtransaction Broadcast raw tx tx_as_hex status
force_relay Force relay tx blobs txs_as_hex[] status

Block Sync (Fast)

Method Description Key parameters Key returns
getblocks.bin Fast block sync (binary) block_ids[], minimum_height blocks[], start_height, current_height
find_outs_in_recent_blocks Scan recent blocks for outputs address, viewkey, blocks_limit outputs[]

Marketplace

Method Description Key parameters Key returns
get_offers_ex Query marketplace offers filter criteria offers[]

Wallet RPC Methods

Wallet State

Method Description Key parameters Key returns
getbalance Account balance (none) balance, unlocked_balance
getaddress Wallet address (none) address
get_wallet_info Wallet metadata (none) wallet info (address, path, height, etc.)
get_wallet_restore_info Seed phrase for backup (none) seed_phrase
get_seed_phrase_info Validate a seed phrase seed_phrase validation result
store Save wallet to disk (none) status
force_rescan_tx_pool Rescan pool for wallet (none) status

Transfers and Payments

Method Description Key parameters Key returns
transfer Send LTHN destinations[] (address, amount), fee, mixin_count, payment_id, comment tx_hash, tx_unsigned_hex
get_payments Payments by payment ID payment_id payments[]
get_bulk_payments Payments for multiple IDs payment_ids[], min_block_height payments[]
get_recent_txs_and_info Recent transaction history offset, count, update_provision_info transfers[], total_transfers
search_for_transactions Search wallet transactions tx_id, in, out, pool, filter_by_height in[], out[], pool[]
get_mining_history Staking/mining rewards (none) mining history

Address Utilities

Method Description Key parameters Key returns
make_integrated_address Create integrated address payment_id integrated_address, payment_id
split_integrated_address Decode integrated address integrated_address standard_address, payment_id

Alias Management

Method Description Key parameters Key returns
register_alias Register new alias alias, address tx_hash
update_alias Update alias details alias, address tx_hash

Offline Signing

Method Description Key parameters Key returns
sign_transfer Sign an unsigned tx tx_unsigned_hex tx_signed_hex, tx_hash
submit_transfer Broadcast signed tx tx_signed_hex tx_hash

Output Management

Method Description Key parameters Key returns
sweep_below Consolidate small outputs address, amount, fee tx_hash, amount_swept
get_bare_outs_stats Statistics of bare outputs (none) output stats
sweep_bare_outs Convert bare outputs (none) tx_hash

HTLC (Hash Time-Locked Contracts)

Method Description Key parameters Key returns
create_htlc_proposal Create HTLC proposal destination, amount, lock_blocks, htlc_hash tx_hash
get_list_of_active_htlc List active HTLCs (none) htlcs[]
redeem_htlc Redeem HTLC with preimage tx_id, origin tx_hash
check_htlc_redeemed Check HTLC redemption tx_id redeemed status

Ionic Swaps

Method Description Key parameters Key returns
ionic_swap_generate_proposal Create swap proposal destination, amount, desired_amount, desired_asset_id hex_raw_proposal
ionic_swap_get_proposal_info Decode swap proposal hex_raw_proposal proposal details
ionic_swap_accept_proposal Accept and execute swap hex_raw_proposal tx_hash

Asset Operations

Method Description Key parameters Key returns
assets_deploy Register new asset asset_descriptor (ticker, name, supply, decimal_point) tx_hash, asset_id
assets_emit Emit additional supply asset_id, amount tx_hash
assets_update Update asset metadata asset_id, asset_descriptor tx_hash
assets_burn Burn asset supply asset_id, amount tx_hash
assets_whitelist_get Get whitelisted assets (none) assets[]
assets_whitelist_add Whitelist an asset asset_id status
assets_whitelist_remove Remove from whitelist asset_id status

Escrow Contracts

Method Description Key parameters Key returns
contracts_send_proposal Send escrow proposal contract details tx_hash
contracts_accept_proposal Accept escrow proposal contract_id tx_hash
contracts_get_all List all contracts (none) contracts[]
contracts_release Release escrow funds contract_id tx_hash
contracts_request_cancel Request cancellation contract_id tx_hash
contracts_accept_cancel Accept cancellation contract_id tx_hash

Marketplace

Method Description Key parameters Key returns
marketplace_get_my_offers List own offers filter criteria offers[]
marketplace_push_offer Create offer offer details tx_hash
marketplace_push_update_offer Update offer offer details tx_hash
marketplace_cancel_offer Cancel offer offer_id tx_hash

Cryptographic Utilities

Method Description Key parameters Key returns
sign_message Sign arbitrary message buff sig
encrypt_data Encrypt data buff encrypted_buff
decrypt_data Decrypt data encrypted_buff buff

Multi-Wallet

Method Description Key parameters Key returns
mw_get_wallets List managed wallets (none) wallets[]
mw_select_wallet Switch active wallet wallet_id status

Proxy

Method Description Key parameters Key returns
proxy_to_daemon Forward request to daemon body daemon response

Binary Endpoints

Some daemon methods use binary (non-JSON) serialisation for performance. These use the epee portable storage format:

Endpoint Description
/getblocks.bin Fast block sync
/get_o_indexes.bin Output global indices
/getrandom_outs.bin Random outputs for ring construction
/get_random_outs3.bin Version 3 random outputs

Wire Format Notes

  • Daemon JSON-RPC: Standard JSON-RPC 2.0 at /json_rpc. Methods are called via {"method": "getinfo", "params": {...}}.
  • Wallet JSON-RPC: Same format at /json_rpc on the wallet RPC port.
  • P2P protocol: Uses the Levin binary protocol (see P2P Protocol), not JSON-RPC.
  • Binary endpoints: Use epee portable storage binary serialisation, accessed via direct HTTP POST to the endpoint path.