RPC Reference

TALER provides a comprehensive JSON-RPC interface for programmatic interaction with the blockchain, wallet, and network. This reference documents all available RPC methods.

Getting Started with TALER RPC

Enabling RPC Access

1. Configure RPC in taler.conf

Create or edit your configuration file:

Linux/macOS: ~/.taler/taler.conf Windows: %APPDATA%\TALER\taler.conf

# Enable RPC server
server=1

# RPC credentials (required)
rpcuser=yourusername
rpcpassword=yourpassword

# Optional: bind to specific IP
rpcbind=127.0.0.1

# Optional: allow connections from specific IP
rpcallowip=127.0.0.1

# Optional: custom RPC port (default: 23333)
rpcport=23333

2. Start talerd with RPC enabled

talerd -daemon

Making RPC Calls

Using taler-cli (recommended)

taler-cli [options] <command> [params]

Example:

taler-cli getblockcount
taler-cli getbalance
taler-cli sendtoaddress "TFNxSh9X75WguDWRj4FbRELK8GUP37xu4E" 10.5

Using curl (HTTP POST)

curl --user yourusername:yourpassword \
  --data-binary '{"jsonrpc":"1.0","id":"curltest","method":"getblockcount","params":[]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:23333/

Response format:

{
  "result": 123456,
  "error": null,
  "id": "curltest"
}

RPC Methods by Category

Blockchain Information

Query blockchain state, blocks, transactions, and chain statistics.

MethodDescription
getblockchaininfoReturns comprehensive blockchain information including chain tip, difficulty, and softfork status
getblockcountReturns the current block height (number of blocks in the main chain)
getbestblockhashReturns the hash of the current best (tip) block
getblock "blockhash" (verbosity)Returns information about a specific block given its hash
getblockhash heightReturns the block hash for a block at the specified height
getblockheader "blockhash" (verbose)Returns the header information of a specific block
getchaintipsReturns information about all known chain tips (valid and invalid forks)
getchaintxstats (nblocks) (blockhash)Returns chain transaction statistics (tx count, tx rate, window)
getblockstats hash_or_height (stats)Returns per-block statistics (fees, weight, time, tx count)
getdifficultyReturns the current proof-of-work and proof-of-stake difficulty
verifychain (checklevel) (nblocks)Verifies the blockchain database integrity
preciousblock "blockhash"Marks a block as precious, affecting chain selection priority

Mempool (Transaction Pool)

Inspect and manage transactions waiting to be confirmed.

MethodDescription
getrawmempool (verbose)Returns all transaction IDs in the memory pool
getmempoolancestors "txid" (verbose)Returns all ancestor transactions of a given mempool transaction
getmempooldescendants "txid" (verbose)Returns all descendant transactions of a given mempool transaction
getmempoolentry "txid"Returns detailed information about a specific mempool transaction
getmempoolinfoReturns mempool size, memory usage, and transaction count
savemempoolSaves the current memory pool to disk

UTXO Set

Query unspent transaction outputs and proof verification.

MethodDescription
gettxout "txid" n (include_mempool)Returns details about an unspent transaction output (UTXO)
gettxoutsetinfoReturns statistics about the unspent transaction output set
gettxoutproof ["txid",...] (blockhash)Returns a hex-encoded proof that transactions were included in a block
verifytxoutproof "proof"Verifies a proof and returns the transactions it commits to
scantxoutset "action" [scanobjects,...]Scans the UTXO set for specific descriptor patterns

Advanced Blockchain Control

Advanced operations for testing and blockchain management.

MethodDescription
pruneblockchain heightPrunes blockchain data up to a specified height (if pruning enabled)
invalidateblock "blockhash"Marks a block and all its descendants as invalid (testing only)
reconsiderblock "blockhash"Reconsiders a previously invalidated block
waitfornewblock (timeout)Waits for a new block to be generated and returns its hash and height
waitforblock "blockhash" (timeout)Waits for a specific block to arrive
waitforblockheight height (timeout)Waits for the blockchain to reach a specific height

Mining & Generating

Control block generation for both proof-of-work (PoW) and proof-of-stake (PoS).

MethodDescription
getmininginfoReturns mining-related information (hashrate, difficulty, blocks, staking status)
getnetworkhashps (nblocks) (height)Returns estimated network hashes per second based on recent blocks
getblocktemplate (template_request)Returns a block template for mining (BIP 22/23 compatible)
submitblock "hexdata" (dummy)Attempts to submit a new block to the network
prioritisetransaction "txid" (dummy) fee_deltaModifies transaction priority for mining (higher fee_delta = higher priority)
generate nblocks (maxtries)Mines up to nblocks blocks immediately (requires wallet, regtest only)
generatetoaddress nblocks "address" (maxtries)Mines blocks directly to a specified address
getgenerateReturns whether the server is set to generate blocks
setgeneratepow generate (genproclimit)Enables/disables proof-of-work mining and sets thread count
setgeneratepos generateEnables/disables proof-of-stake mining (wallet must be unlocked)

Note: For production staking, use setgeneratepos true with an encrypted and unlocked wallet. See Mining & Staking Guide for details.


Raw Transactions

Create, decode, sign, and broadcast raw transactions.

Creating Transactions

MethodDescription
createrawtransaction [{"txid":"id","vout":n},...] [{"address":amount},...] (locktime)Creates an unsigned raw transaction
createpsbt [{"txid":"id","vout":n},...] [{"address":amount},...] (locktime)Creates an unsigned PSBT (Partially Signed Bitcoin Transaction)
fundrawtransaction "hexstring" (options)Adds inputs to a raw transaction using wallet funds

Decoding Transactions

MethodDescription
decoderawtransaction "hexstring"Decodes a hex-encoded raw transaction and returns its details
decodescript "hexstring"Decodes a hex-encoded script (redeem script, witness script)
decodepsbt "psbt"Decodes and returns information about a PSBT

Signing Transactions

MethodDescription
signrawtransaction "hexstring" ([{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey",...] sighashtype)Signs a raw transaction (uses wallet if available)
signrawtransactionwithkey "hexstring" ["privatekey",...] ([{"txid":"id","vout":n,...},...] sighashtype)Signs a raw transaction with provided private keys (no wallet needed)
signrawtransactionwithwallet "hexstring" ([{"txid":"id","vout":n,...},...] sighashtype)Signs a raw transaction using wallet private keys

Broadcasting Transactions

MethodDescription
sendrawtransaction "hexstring" (allowhighfees)Broadcasts a signed raw transaction to the network
testmempoolaccept ["rawtx",...] (allowhighfees)Tests whether transactions would be accepted by the mempool (does not broadcast)

PSBT Operations

MethodDescription
walletcreatefundedpsbt [{"txid":"id","vout":n},...] [{"address":amount},...] (locktime) (options) (bip32derivs)Creates and funds a PSBT using wallet UTXOs
walletprocesspsbt "psbt" (sign) (sighashtype) (bip32derivs)Processes and optionally signs a PSBT using wallet keys
combinepsbt ["psbt",...]Combines multiple partially signed PSBTs into one
finalizepsbt "psbt" (extract)Finalizes a PSBT and optionally extracts the complete transaction
converttopsbt "hexstring" (permitsigdata)Converts a raw transaction to PSBT format

Combining Transactions

MethodDescription
combinerawtransaction ["hexstring",...]Combines multiple partial raw transactions into one

Wallet Management

Manage wallet files, encryption, backups, and key pools.

Wallet Operations

MethodDescription
getwalletinfoReturns general wallet information (balance, tx count, key pool, encryption status)
listwalletsLists all currently loaded wallets
createwallet "wallet_name" (disable_private_keys) (blank) (passphrase) (avoid_reuse)Creates a new wallet
loadwallet "filename"Loads an existing wallet file into memory
unloadwallet ("wallet_name")Unloads a wallet from memory (does not delete)
backupwallet "destination"Backs up the wallet.dat file to the specified location
rescanblockchain (start_height) (stop_height)Rescans the blockchain for wallet transactions
abortrescanAborts an ongoing blockchain rescan

Wallet Encryption & Security

MethodDescription
encryptwallet "passphrase"Encrypts the wallet with a passphrase (one-time operation, requires restart)
walletpassphrase "passphrase" timeoutUnlocks the wallet for a specified time (in seconds)
walletpassphrasechange "oldpassphrase" "newpassphrase"Changes the wallet encryption passphrase
walletlockImmediately locks an unlocked wallet

Important: Always encrypt your wallet before staking. See Security Best Practices for details.

Key Pool Management

MethodDescription
keypoolrefill (newsize)Refills the key pool with new keys
sethdseed (newkeypool) ("seed")Sets or generates a new HD wallet seed

Addresses & Labels

Generate and manage wallet addresses.

Address Generation

MethodDescription
getnewaddress ("label") ("address_type")Generates a new receiving address with optional label
getrawchangeaddress ("address_type")Returns a new address for receiving change
validateaddress "address"Validates a TALER address and returns information about it
getaddressinfo "address"Returns detailed information about an address in the wallet

Address Types: "legacy", "p2sh-segwit", "bech32" (default depends on wallet configuration)

Labels & Organization

MethodDescription
setlabel "address" "label"Sets or updates a label for an address
getaddressesbylabel "label"Returns all addresses associated with a specific label
listlabels ("purpose")Lists all address labels in the wallet
listaddressgroupingsLists address groupings (addresses that are likely owned together)

Multi-Signature Addresses

MethodDescription
addmultisigaddress nrequired ["key",...] ("label") ("address_type")Creates a multi-signature address and adds it to the wallet
createmultisig nrequired ["key",...]Creates a multi-signature redemption script (does not add to wallet)

Balances & Transaction History

Query wallet balances and transaction information.

Balance Information

MethodDescription
getbalance ("dummy") (minconf) (include_watchonly)Returns the wallet’s total available balance
getunconfirmedbalanceReturns the balance of unconfirmed transactions
getreceivedbyaddress "address" (minconf)Returns the total amount received by a specific address
getreceivedbylabel "label" (minconf)Returns the total amount received by addresses with a specific label
listreceivedbyaddress (minconf) (include_empty) (include_watchonly) ("address_filter")Lists addresses with their received amounts
listreceivedbylabel (minconf) (include_empty) (include_watchonly)Lists labels with their received amounts

Transaction History

MethodDescription
listtransactions ("label") (count) (skip) (include_watchonly)Lists wallet transactions with optional filtering
gettransaction "txid" (include_watchonly)Returns detailed information about a wallet transaction
listsinceblock ("blockhash") (target_confirmations) (include_watchonly) (include_removed)Lists transactions since a specified block

Sending Transactions

Send TALER coins from the wallet.

Simple Sending

MethodDescription
sendtoaddress "address" amount ("comment") ("comment_to") (subtractfeefromamount)Sends an amount to a given address
sendmany "" {"address":amount,...} (minconf) ("comment") ["address",...] (subtractfeefromamount)Sends to multiple addresses in one transaction

Example:

taler-cli sendtoaddress "TFNxSh9X75WguDWRj4FbRELK8GUP37xu4E" 10.5
taler-cli sendmany "" '{"TAddr1":10,"TAddr2":5.5}'

Transaction Management

MethodDescription
abandontransaction "txid"Marks a transaction as abandoned (allows coins to be respent)
bumpfee "txid" (options)Increases the fee of a transaction using RBF (Replace-By-Fee)
resendwallettransactionsImmediately re-broadcasts unconfirmed wallet transactions

UTXO Management

Control which unspent outputs are available for spending.

MethodDescription
listunspent (minconf) (maxconf) (["address",...]) (include_unsafe) (query_options)Lists unspent transaction outputs (UTXOs) with optional filters
lockunspent unlock ([{"txid":"id","vout":n},...])Locks or unlocks specific UTXOs to prevent spending
listlockunspentReturns a list of all currently locked UTXOs

Example - Lock a UTXO:

taler-cli lockunspent false '[{"txid":"abc123...","vout":0}]'

Example - Unlock all UTXOs:

taler-cli lockunspent true

Importing & Exporting

Import and export keys, addresses, and wallet data.

Importing

MethodDescription
importprivkey "privkey" ("label") (rescan)Imports a private key into the wallet
importaddress "address" ("label") (rescan) (p2sh)Imports an address or script for watch-only monitoring
importpubkey "pubkey" ("label") (rescan)Imports a public key for watch-only monitoring
importwallet "filename"Imports keys from a wallet dump file
importmulti '[{"scriptPubKey":{"address":"addr"},"timestamp":now,...},...]' (options)Imports multiple keys/addresses with metadata in one call
importprunedfunds "rawtransaction" "txoutproof"Imports a transaction and proof (for pruned nodes)
removeprunedfunds "txid"Removes a transaction imported via importprunedfunds

Exporting

MethodDescription
dumpprivkey "address"Exports the private key for an address in WIF format
dumpwallet "filename"Exports all wallet keys and metadata to a human-readable file

Security Warning: Never share exported private keys or wallet dumps. Anyone with access to private keys can spend your coins.


Signing & Verifying Messages

Sign messages with wallet addresses and verify signatures.

MethodDescription
signmessage "address" "message"Signs a message with the private key of an address in the wallet
signmessagewithprivkey "privkey" "message"Signs a message with a private key (no wallet needed)
verifymessage "address" "signature" "message"Verifies a signed message

Example:

# Sign a message
taler-cli signmessage "TFNxSh9X75WguDWRj4FbRELK8GUP37xu4E" "Hello TALER"

# Verify the signature
taler-cli verifymessage "TFNxSh9X75WguDWRj4FbRELK8GUP37xu4E" "H1234..." "Hello TALER"

Staking (Proof-of-Stake)

Monitor and manage proof-of-stake minting/staking.

MethodDescription
listmintingLists minting/staking information including expected time to next stake
setgeneratepos generateEnables/disables proof-of-stake staking (requires unlocked encrypted wallet)
getmininginfoReturns mining and staking information (includes staking status)

For detailed staking setup instructions, see Mining & Staking Guide.


Network Information

Query peer connections and network statistics.

Peer Management

MethodDescription
getconnectioncountReturns the number of connections to other nodes
getpeerinfoReturns detailed information about each connected peer
addnode "node" "command"Adds, removes, or tries connecting to a peer ("add", "remove", "onetry")
disconnectnode "[address]" (nodeid)Disconnects from a specific peer by address or node ID
getaddednodeinfo (node)Returns information about manually added nodes
pingSends a ping to all connected peers (measures latency)

Network Statistics

MethodDescription
getnetworkinfoReturns network information (version, connections, protocol, networks)
getnettotalsReturns network traffic statistics (total bytes sent/received)

Ban Management

MethodDescription
setban "subnet" "command" (bantime) (absolute)Bans or unbans an IP/subnet ("add" or "remove")
listbannedLists all banned IPs/subnets with ban duration
clearbannedClears all banned IPs/subnets

Example - Ban an IP:

taler-cli setban "192.168.1.100" "add" 86400

Network Control

MethodDescription
setnetworkactive stateEnables/disables all P2P network activity

Server Control & Information

Control the TALER daemon and query system information.

MethodDescription
help ("command")Lists all commands or returns help for a specific command
stopStops the TALER server gracefully
uptimeReturns the total server uptime in seconds
getmemoryinfo ("mode")Returns memory usage statistics
logging ("[include,...] <exclude>")Gets or sets logging categories for debugging

Example:

# Get help for a command
taler-cli help getblockcount

# Check server uptime
taler-cli uptime

# Stop the daemon
taler-cli stop

Deprecated Methods

The following methods are deprecated and maintained for backward compatibility only. They may be removed in future versions.

MethodReplacementDescription
getinfoUse specific methodsReturns aggregated node information (use getblockchaininfo, getnetworkinfo, getwalletinfo instead)
getaccount "address"getaddressinfoReturns the account for an address
setaccount "address" "account"setlabelSets the account for an address
getaccountaddress "account"getnewaddressGets an address for an account
getaddressesbyaccount "account"getaddressesbylabelLists addresses for an account
listaccountslistlabelsLists accounts and their balances
getreceivedbyaccount "account"getreceivedbylabelReturns total received by an account
listreceivedbyaccountlistreceivedbylabelLists accounts with received amounts
sendfrom "account" "address" amountsendtoaddressSends from a specific account
move "fromaccount" "toaccount" amountN/AMoves funds between accounts (removed)
addwitnessaddress "address"N/AAdds a witness address (SegWit related)

Error Handling

RPC calls return errors in the following format:

{
  "result": null,
  "error": {
    "code": -5,
    "message": "Invalid address"
  },
  "id": "curltest"
}

Common Error Codes

CodeDescription
-1General error
-3Invalid parameter
-5Invalid address or key
-6Insufficient funds
-8Insufficient priority
-13Wallet unlock required
-14Wallet passphrase incorrect
-15Wallet encryption failure
-17Database error
-22Invalid parameter (too many)
-32600Invalid JSON-RPC request
-32601Method not found

RPC Authentication

TALER RPC uses HTTP Basic Authentication. Configure credentials in taler.conf:

rpcuser=yourusername
rpcpassword=yourpassword

Security Best Practices:

  • Use a strong, randomly generated password
  • Never expose RPC to the public internet
  • Use rpcallowip to restrict access to specific IPs
  • Consider using SSH tunneling for remote access
  • Use HTTPS/TLS if exposing RPC remotely (requires reverse proxy)

Additional Resources

For questions or support, visit the TALER Community on Telegram.

Need More Help?

Can't find what you're looking for? Check our FAQ section or reach out to the community for help.