Skip to main content

Utility RPC Methods

Utility RPCs provide various helper functions including address validation, message signing, descriptor utilities, and fee estimation.

Address Validation

validateaddress

Validates a Bitcoin address and returns information about it.
bitcoin-cli validateaddress "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
isvalid
boolean
Whether address is valid
address
string
The validated bitcoin address
scriptPubKey
string
Hex-encoded scriptPubKey
isscript
boolean
Whether address is a script address
iswitness
boolean
Whether address is a witness address
witness_version
number
Witness version (0 for P2WPKH/P2WSH, 1 for P2TR)
witness_program
string
Hex-encoded witness program
This RPC only validates the address format. For wallet-specific information (like ownership), use the wallet’s getaddressinfo RPC.

Message Signing

signmessagewithprivkey

Signs a message with a private key.
bitcoin-cli signmessagewithprivkey "privkey" "my message"
result
string
Base64-encoded signature
Never expose private keys. This RPC is primarily for testing. For wallet-managed keys, use the wallet’s signmessage RPC.

verifymessage

Verifies a signed message.
bitcoin-cli verifymessage "bc1q..." "signature" "my message"
result
boolean
Whether signature is valid

Descriptor Utilities

getdescriptorinfo

Analyzes a descriptor and returns information about it.
bitcoin-cli getdescriptorinfo "wpkh([d34db33f/84h/0h/0h]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)"
descriptor
string
Canonical descriptor with computed checksum
checksum
string
Checksum for the descriptor
isrange
boolean
Whether descriptor is ranged
issolvable
boolean
Whether descriptor is solvable
hasprivatekeys
boolean
Whether descriptor has private keys

deriveaddresses

Derives addresses from a descriptor.
# Derive single address
bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub.../0/*)#checksum" 0

# Derive range of addresses
bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub.../0/*)#checksum" "[0,2]"
result
array
Array of derived Bitcoin addresses

Fee Estimation

estimatesmartfee

Estimates the fee rate needed for confirmation within target blocks.
# Estimate fee for confirmation in 6 blocks
bitcoin-cli estimatesmartfee 6

# Economical estimate
bitcoin-cli estimatesmartfee 6 "economical"
feerate
number
Estimated fee rate in BTC/kvB
blocks
number
Block number where estimate was found
errors
array
Array of error messages (if any)
Fee estimation requires the node to have observed sufficient transaction history. New nodes may not have enough data for accurate estimates.

Data Encoding

createrawtransaction

Creates a raw transaction (hex-encoded).
# Create transaction
bitcoin-cli createrawtransaction \
  '[{"txid":"mytxid","vout":0}]' \
  '{"bc1q...": 0.01}'
result
string
Hex-encoded raw transaction

decoderawtransaction

Decodes a raw transaction to JSON.
bitcoin-cli decoderawtransaction "020000000001..."
Returns detailed transaction object with all inputs, outputs, and metadata.

decodescript

Decodes a hex-encoded script.
bitcoin-cli decodescript "76a914..."
asm
string
Script assembly representation
type
string
Script type (e.g., pubkeyhash, scripthash, witness_v0_keyhash)
reqSigs
number
Required signatures (deprecated)
addresses
array
Array of bitcoin addresses (deprecated)
p2sh
string
P2SH address for this script
segwit
object
Segwit-specific information

PSBT Utilities

decodepsbt

Decodes a PSBT (Partially Signed Bitcoin Transaction) to JSON.
bitcoin-cli decodepsbt "cHNidP8BAH..."
Returns detailed PSBT structure including:
  • Transaction details
  • Input metadata (UTXOs, signatures, derivation paths)
  • Output metadata
  • Unknown fields

combinepsbt

Combines multiple PSBTs into one.
bitcoin-cli combinepsbt '["psbt1", "psbt2"]'
result
string
Combined PSBT (base64)

finalizepsbt

Finalizes a PSBT if possible.
bitcoin-cli finalizepsbt "cHNidP8BAH..."
psbt
string
Base64-encoded PSBT (if not extracted or not complete)
hex
string
Hex-encoded network transaction (if complete and extracted)
complete
boolean
Whether transaction is complete

analyzepsbt

Analyzes a PSBT and provides information about what is missing.
bitcoin-cli analyzepsbt "cHNidP8BAH..."
inputs
array
Analysis of each input (missing signatures, pubkeys, etc.)
estimated_vsize
number
Estimated virtual size of final transaction
estimated_feerate
number
Estimated feerate (BTC/kvB)
fee
number
Transaction fee in BTC
next
string
Role of next signer: signer, finalizer, extractor

Miscellaneous

getindexinfo

Returns status of optional indices.
# Get all indices
bitcoin-cli getindexinfo

# Get specific index
bitcoin-cli getindexinfo "txindex"
synced
boolean
Whether index is synced to chain tip
best_block_height
number
Height index is synced to

logging

Gets and sets logging configuration.
# Get current logging configuration
bitcoin-cli logging

# Enable net and mempool logging
bitcoin-cli logging '["net", "mempool"]' '["http"]'
Available log categories:
  • net: Network messages
  • tor: Tor connection info
  • mempool: Mempool operations
  • http: HTTP server
  • bench: Benchmarking
  • zmq: ZMQ notifications
  • walletdb: Wallet database operations
  • rpc: RPC calls
  • estimatefee: Fee estimation
  • addrman: Address manager
  • selectcoins: Coin selection
  • validation: Block/transaction validation
  • And more…

uptime

Returns the total uptime of the server in seconds.
bitcoin-cli uptime
result
number
Server uptime in seconds

echo

Echoes back input arguments (for testing).
bitcoin-cli echo "test" 123