=> :: Helper types :: |% :: +address: base58check encoded public key (20 bytes) :: :: FIXME: %bech32 is not parsed by fim:ag :: +$ address ?(@uc [%bech32 @t]) ++ blockhash @ux :: $estimate-mode :: :: Used in: :: - %fund-raw-transaction :: - %estimate-smart-fee :: - %bump-fee :: - %wallet-create-fundedpsbt :: - %send-to-address :: - %send-many :: +$ estimate-mode ?(%'UNSET' %'ECONOMICAL' %'CONSERVATIVE') :: $category: :: :: Used in: :: - $tx-in-block :: - %get-transaction :: - %list-transactions :: +$ category ?(%send %receive %generate %immature %orphan) :: $rule: :: :: Used in: :: - %get-block-template :: :: +$ rule %segwit :: $capability: :: :: Used in: :: - %get-block-template :: +$ capability $? %longpoll %coinbasetxn %coinbasevalue %proposal %serverlist %workid == :: $block-template-mode: :: :: Used in: :: - %get-block-template :: +$ block-template-mode $? mode=%template [mode=%proposal data=@ux workid=(unit @t)] == :: $logging-category: :: :: Used in: :: - %logging :: +$ logging-category $? %net %tor %mempool %http %bench %zmq %db %rpc %estimatefee %addrman %selectcoins %reindex %cmpctblock %rand %prune %proxy %mempoolrej %libevent %coindb %qt %leveldb == :: $rpc-command: :: :: Used in: :: - %get-rpc-info :: +$ rpc-command [method=@t duration=@dr] :: $transaction: :: :: Used in: :: - %get-block-template :: +$ transaction $: data=@ux txid=@ux hash=@ux depends=(list @ud) fee=@ud sigops=@ud weight=@ud == :: $mutable: :: :: Used in: :: - %get-block-template :: +$ mutable ?(%value %time %transactions %prevblock) :: $node-address: :: :: Used in: :: - $node-info :: +$ node-address [address=@t connected=?(%inbound %outbound)] :: $node-info: :: :: Used in: :: - %get-added-node-info :: +$ node-info [added-node=@t connected=? addresses=(list node-address)] :: $upload-target: :: :: Used in: :: - %get-net-totals :: +$ upload-target $: timeframe=@dr target=@ud target-reached=? serve-historical-blocks=? bytes-left-in-cycle=@ud time-left-in-cycle=@dr == :: $network-info: :: :: Used in: :: - %get-network-info :: +$ network-info $: name=?(%ipv4 %ipv6 %onion) limited=? reachable=? proxy=@t proxy-randomize-credentials=? == :: $local-address: :: :: Used in: :: - %get-network-info :: +$ local-address [address=@t port=@ud score=@ud] :: $node-address-info: :: :: Used in: :: - %get-node-addresses :: +$ node-address-info [time=@da services=@ud address=@t port=@ud] :: $peer-info: :: :: Used in: :: - %get-peer-info :: +$ peer-info $: id=@ud addr=@t addr-bind=@t addr-local=(unit @t) services=@t services-names=(list @t) relay-txes=? last-send=@da last-recv=@da bytes-sent=@ud bytes-recv=@ud conn-time=@da time-offset=@t ping-time=@rd min-ping=@rd ping-wait=(unit @ud) version=@ud subver=@t inbound=? addnode=? starting-height=@ud ban-score=@ud synced-headers=@ud synced-blocks=@ud inflight=(list @ud) whitelisted=? min-fee-filter=@rd bytes-sent-per-msg=(map @t @ud) bytes-recv-per-msg=(map @t @ud) == :: $banned: :: :: Used in: :: - %list-banned :: +$ banned [address=@t banned-until=@da ban-created=@da ban-reason=@t] :: $chain-status: :: :: Used in: :: - %get-chain-tips :: +$ chain-status $? %invalid %headers-only %valid-headers %valid-fork %active == :: $soft-fork-types: :: :: Used in: :: - %get-blockchain-info/$softforks :: +$ soft-fork-types ?(%buried %bip9) :: $soft-fork-status: :: :: Used in: :: - %get-blockchain-info/$softforks :: +$ soft-fork-status ?(%defined %started %'locked_in' %active %failed) :: $purpose: :: :: Used in: :: - %get-addresses-by-label :: - %get-address-info :: +$ purpose ?(%send %receive) :: $address-type: :: :: Used in: :: - %add-multisig-address :: +$ address-type ?(%legacy %p2sh-segwit %bech32) :: $bip125-replaceable: :: :: Used in: :: - %get-transaction :: - %list-transactions :: - $tx-in-block :: +$ bip125-replaceable ?(%yes %no %unknown) :: $network-name: :: :: Used in: :: - %get-blockchain-info :: +$ network-name ?(%main %test %regtest) :: $sig-hash: :: :: Used in: :: - %wallet-process-psbt :: - %sign-raw-transaction-with-wallet :: - %sign-raw-transaction-with-key :: - %decode-psbt :: +$ sig-hash $? %'NONE' %'SINGLE' %'ALL|ANYONECANPAY' %'NONE|ANYONECANPAY' %'SINGLE|ANYONECANPAY' %'ALL' == :: $script: :: :: Used in: :: - %decode-psbt: $redeem-script/$witness-script :: +$ script [asm=@t hex=@ux type=@t] :: $script-pubkey: :: :: Used in: :: - $utxo :: +$ script-pubkey $: asm=@t hex=@ux type=@t =address == :: $range: :: :: Used in: :: - %derive-addresses :: - $scan-object :: +$ range ?(@ud [@ud @ud]) :: $vin: :: :: Used in: :: - $serialized-tx :: - $raw-transaction-rpc-out :: +$ vin $: txid=(unit @ux) vout=(unit @ud) script-sig=(unit [asm=@t hex=@ux]) tx-in-witness=(unit (list @ux)) sequence=@ud == :: $vout: :: :: Used in: :: - $serialized-tx :: - $raw-transaction-rpc-out :: +$ vout $: value=@t n=@ud :: $= script-pubkey $: asm=@t hex=@ux req-sigs=(unit @ud) type=@t addresses=(unit (list address)) == == :: $input: :: :: Used in: :: - %wallet-create-fundedpsbt :: - $partially-signed-transaction :: +$ input $: txid=@ux vout=@ud sequence=@ud == :: $output: :: :: Used in: :: - %wallet-create-fundedpsbt :: - $partially-signed-transaction :: +$ output $: data=[%data @ux] addresses=(list [=address amount=@t]) == :: $scan-object: :: :: Used in: :: - %scan-tx-outset :: +$ scan-object $? descriptor=@t :: $= object $: desc=@t range=(unit range) == == :: $utxo: :: :: Used in: :: - %decode-psbt :: +$ utxo (unit [amount=@t =script-pubkey]) :: $segwit-script: :: :: Used in: :: - %decode-script :: +$ segwit-script $: asm=@t hex=(unit @ux) type=@t req-sigs=(unit @ud) addresses=(list [%bech32 @t]) p2sh-segwit=(unit @uc) == :: $partially-signed-transaction: :: :: Used in: :: - %create-psbt :: - %create-raw-transaction :: +$ partially-signed-transaction $: inputs=(list input) outputs=output locktime=(unit @ud) replaceable=(unit ?) == :: $import-request: :: :: Used in: :: - %import-multi :: +$ import-request $: desc=(unit @t) :: $= script-pubkey $% [%script s=@t] [%address a=address] == :: timestamp=?(@da %now) redeem-script=(unit @t) witness-script=(unit @t) pubkeys=(unit (list @t)) keys=(unit (list @t)) range=(unit ?(@ud [@ud @ud])) internal=(unit ?) watchonly=(unit ?) label=(unit @t) keypool=(unit ?) == :: $serialized-tx: :: :: Used in: :: - %decode-psbt :: - %decode-raw-transaction :: +$ serialized-tx $: txid=@ux hash=@ux size=@ud vsize=@ud weight=@ud version=@ud locktime=@ud vin=(list vin) vout=(list vout) == :: $prev-tx: :: :: Used in: :: - %sign-raw-transaction-with-wallet :: - %sign-raw-transaction-with-key :: +$ prev-tx $: txid=@ux vout=@ud script-pubkey=@ux redeem-script=(unit @ux) witness-script=(unit @ux) amount=@t == :: $raw-transaction-rpc-out: :: :: Used in: :: - %get-block :: - %get-raw-transaction :: +$ raw-transaction-rpc-out $: in-active-chain=(unit ?) hex=@ux txid=@ux hash=@ux size=@ud vsize=@ud weight=@ud version=@t locktime=@ud vin=(list vin) vout=(list vout) blockhash=(unit @ux) confirmations=(unit @ud) blocktime=(unit @ud) time=(unit @ud) == :: $tx-in-block: :: :: Used in: :: - %lists-in-ceblock :: - %list-transactions :: +$ tx-in-block $: address=(unit address) =category amount=@t label=(unit @t) vout=@ud fee=(unit @t) confirmations=@ud blockhash=(unit @ux) blockindex=(unit @ud) blocktime=(unit @ud) txid=@ux time=@ud time-received=(unit @ud) wallet-conflicts=(unit (list @ux)) =bip125-replaceable abandoned=(unit ?) comment=(unit @t) to=(unit @t) == :: $errors: :: :: Used in: :: - %sign-raw-transaction-with-key :: - %sign-raw-transaction-with-wallet :: +$ errors %- list $: txid=@ vout=@ script-sig=@ sequence=@ error=@t == :: $mem-pool: :: :: Used in: :: - $mem-pool-response :: - %get-mempool-entry :: +$ mem-pool $: size=(unit @ud) vsize=@ud weight=@ud fee=@t modified-fee=@t time=@ud height=@ud descendant-count=@ud descendant-size=@ud descendant-fees=@t ancestor-count=@ud ancestor-size=@ud ancestor-fees=@t w-txid=@ux :: $= fees $: base=@t modified=@t ancestor=@t descendant=@t == :: depends=(list @ux) spent-by=(list @ux) bip125-replaceable=? == :: $mem-pool-response: :: :: Used in: :: - %get-raw-mempool :: - %get-mempool-entry :: - %get-mempool-ancestors :: - %get-mempool-descendants :: - %get-raw-mempool :: +$ mem-pool-response %- list $@ :: (for verbose = false) :: @ux :: :: (for verbose = true) :: [id=@ux =mem-pool] :: :: $descriptor :: :: Used in: :: - %utxo-update-psbt :: +$ descriptor $? @t :: $: desc=@t range=(unit range) == == -- |% :: +$ btc-node-hook-action request:btc-rpc +$ btc-node-hook-command command:btc-rpc :: Expand the response type to include connectivity :: +$ btc-node-hook-response response:btc-rpc :: ++ btc-rpc |% +$ request $% :: Blockchain :: :: %get-best-block-hash: Returns the hash of the :: best (tip) block in the longest blockchain. :: [%get-best-block-hash ~] :: %get-block: Returns an Object/string with information about block :: [%get-block blockhash=@ux verbosity=(unit ?(%0 %1 %2))] :: %get-blockchain-info: Returns info regarding blockchain processing. :: [%get-blockchain-info ~] :: %get-block-count: Returns number of blocks in the longest blockchain :: [%get-block-count ~] :: %get-block-filter: Retrieve a BIP 157 content filter for a block. :: [%get-block-filter block-hash=@ux filter-type=(unit @t)] :: %get-block-hash: Returns hash of block in best-block-chain at height :: [%get-block-hash height=@ud] :: %get-block-header: If verbose is false, returns a string that is :: serialized, hex-encoded data for blockheader 'hash'. If verbose is :: true, returns an Object :: [%get-block-header blockhash=@ux verbose=(unit ?)] :: %get-block-stats: Compute per block statistics for a given window. :: $: %get-block-stats $= hash-or-height $% [%hex @ux] [%num @ud] == :: stats=(unit (list @t)) == :: %get-chain-tips: Return information about tips in the block tree. :: [%get-chain-tips ~] :: %get-chain-tx-stats: Compute statistics about total number rate :: of transactions in the chain. :: [%get-chain-tx-stats n-blocks=(unit @ud) blockhash=(unit @ux)] :: %get-difficulty: Returns the proof-of-work difficulty as a multiple :: of the minimum difficulty. :: [%get-difficulty ~] :: %get-mempool-ancestors: If txid is in the mempool, returns :: all in-mempool ancestors. :: [%get-mempool-ancestors txid=@ux verbose=(unit ?)] :: %get-mempool-descendants: If txid is in the mempool, returns :: all in-mempool descendants. :: [%get-mempool-descendants txid=@ux verbose=(unit ?)] :: %get-mempool-entry: Returns mempool data for given transaction :: [%get-mempool-entry txid=@ux] :: %get-mempool-info: Returns details on the active state of the :: TX memory pool. :: [%get-mempool-info ~] :: %get-raw-mempool: Returns all transaction ids in memory pool as a :: json array of string transaction ids. :: [%get-raw-mempool verbose=(unit ?)] :: %get-tx-out: Returns details about an unspent transaction output. :: [%get-tx-out txid=@ux n=@ud include-mempool=(unit ?)] :: %get-tx-out-proof: Returns a hex-encoded proof that "txid" was :: included in a block. :: [%get-tx-out-proof tx-ids=(list @ux) blockhash=(unit @ux)] :: %get-tx-outset-info: Returns statistics about the unspent :: transaction output set. :: [%get-tx-outset-info ~] :: %precious-block: Treats a block as if it were received before :: others with the same work. :: [%precious-block blockhash=@ux] :: %prune-blockchain: :: [%prune-blockchain height=@ud] :: %save-mempool: Dumps the mempool to disk. :: It will fail until the previous dump is fully loaded. :: [%save-mempool ~] :: %scan-tx-outset: Scans the unspent transaction output set for :: entries that match certain output descriptors. :: $: %scan-tx-outset action=?(%start %abort %status) scan-objects=(list scan-object) == :: %verify-chain: Verifies blockchain database. :: [%verify-chain check-level=(unit @ud) n-blocks=(unit @ud)] :: %verify-tx-out-proof: Verifies that a proof points to a transaction :: in a block, returning the transaction it commits to :: and throwing an RPC error if the block is not in our best chain :: [%verify-tx-out-proof proof=@t] :: Control :: :: %getmemoryinfo: Returns an object containing information about memory :: usage. :: [%get-memory-info ~] :: %getrpcinfo: Returns details of the RPC server. :: [%get-rpc-info ~] :: %help: List all commands, or get help for a specified command. :: [%help command=(unit @t)] :: %logging: Gets and sets the logging configuration. :: $: %logging include=?(%all %none (list logging-category)) exclude=?(%all %none (list logging-category)) == :: %stop: Stop Bitcoin server. :: [%stop ~] :: %uptime: Returns the total uptime of the server. :: [%uptime ~] :: Generating :: [%generate blocks=@ud max-tries=(unit @ud)] :: %generatetoaddress: Mine blocks immediately to a specified address :: (before the RPC call returns) :: [%generate-to-address n-blocks=@ud =address max-tries=(unit @ud)] :: Mining :: :: %getblocktemplate: It returns data needed to construct a block :: to work on. :: $: %get-block-template rules=(list rule) capabilities=(list capability) mode=(unit block-template-mode) == :: %getmininginfo: Returns a json object containing mining-related :: information. :: [%get-mining-info ~] :: %getnetworkhashps: Returns the estimated network hashes per second :: based on the last n blocks. :: [%get-network-hash-ps n-blocks=(unit @ud) height=(unit @ud)] :: %prioritisetransaction: Accepts the transaction into mined blocks :: at a higher (or lower) priority :: [%prioritise-transaction txid=@ux fee-delta=@ud] :: %submitblock: Attempts to submit new block to network. :: [%submit-block hex-data=@ux] :: %submitheader: Decode the given hexdata as a header and submit it :: as a candidate chain tip if valid. Throws when the header is :: invalid. :: [%submit-header hex-data=@ux] :: Mining :: :: %addnode: Attempts to add or remove a node from the addnode list. :: Or try a connection to a node once. :: [%add-node node=@if port=@ud command=?(%add %remove %onetry)] :: %clearbanned: Clear all banned IPs. :: [%clear-banned ~] :: %disconnectnode: Immediately disconnects from the specified peer node. :: [%disconnect-node node=?(node-id=@t [address=@if port=@ud])] :: %getaddednodeinfo: Returns information about the given added node, :: or all added nodes (note that onetry addnodes are not listed here) :: [%get-added-node-info node=(unit @if)] :: %getconnectioncount: Returns the number of connections to other :: nodes. :: [%get-connection-count ~] :: %getnettotals: Returns information about network traffic, :: including bytes in, bytes out, and current time. :: [%get-net-totals ~] :: %getnetworkinfo: Returns an object containing various state info :: regarding P2P networking. :: [%get-network-info ~] :: %getnodeaddresses: Return known addresses which can potentially be :: used to find new nodes in the network [%get-node-addresses count=(unit @ud)] :: %getpeerinfo: Returns data about each connected network node as a :: json array of objects. :: [%get-peer-info ~] :: %listbanned: List all banned IPs/Subnets. :: [%list-banned ~] :: %ping: Requests that a ping be sent to all other nodes, to measure :: ping time. Results provided in getpeerinfo, pingtime and pingwait :: fields are decimal seconds. Ping command is handled in queue with all :: other commands, so it measures processing backlog, not just network :: ping. :: [%ping ~] :: %setban: Attempts to add or remove an IP/Subnet from the banned list. :: $: %set-ban subnet=@t command=?(%add %remove) ban-time=(unit ?([%dr @dr] [%da @da])) == :: %setnetworkactive: Disable/enable all p2p network activity. :: [%set-network-active state=?] :: Raw Transactions :: :: %analyze-psbt: Analyzes and provides information about :: the current status of a PSBT and its inputs :: [%analyze-psbt psbt=@t] :: %combine-psbt: Combine multiple partially signed Bitcoin :: transactions into one transaction. :: [%combine-psbt txs=(list @t)] :: %combine-raw-transaction: Combine multiple partially signed t :: ransactions into one transaction. :: [%combine-raw-transaction txs=(list @ux)] :: %convert-to-psbt: Converts a network serialized transaction to a :: PSBT. :: $: %convert-to-psbt hex-string=@ux permit-sig-data=(unit ?) is-witness=(unit ?) == :: %create-psbt: Creates a transaction in the Partially Signed :: Transaction format. :: [%create-psbt partially-signed-transaction] :: %create-raw-transaction: Create a transaction spending the given :: inputs and creating new outputs. :: [%create-raw-transaction partially-signed-transaction] :: %decode-psbt: Return a JSON object representing the serialized, :: base64-encoded partially signed Bitcoin transaction. :: [%decode-psbt psbt=@t] :: %decode-raw-transaction: Return a JSON object representing the :: serialized, hex-encoded transaction. :: [%decode-raw-transaction hex-string=@ux is-witness=?] :: %decode-script: Decode a hex-encoded script. :: [%decode-script hex-string=@ux] :: %finalize-psbt: Finalize the inputs of a PSBT. :: [%finalize-psbt psbt=@t extract=(unit ?)] :: %fund-raw-transaction: Add inputs to a transaction until it has :: enough in value to meet its out value. :: $: %fund-raw-transaction hex-string=@ux :: $= options %- unit $: change-address=(unit address) change-position=(unit @ud) change-type=(unit address-type) include-watching=(unit ?) lock-unspents=(unit ?) fee-rate=(unit @t) subtract-fee-from-outputs=(unit (list @ud)) replaceable=(unit ?) conf-target=(unit @ud) mode=(unit estimate-mode) == :: is-witness=? == :: %get-raw-transaction: Return the raw transaction data. :: [%get-raw-transaction txid=@ux verbose=(unit ?) blockhash=(unit @ux)] :: %join-psbts: Joins multiple distinct PSBTs with different inputs :: and outputs into one PSBT with inputs and outputs from all of :: the PSBTs :: [%join-psbts txs=(list @t)] :: %send-raw-transaction: Submits raw transaction :: (serialized, hex-encoded) to local node and network. :: [%send-raw-transaction hex-string=@ux max-fee-rate=(unit @t)] :: %sign-raw-transaction-with-key: Sign inputs for raw transaction :: (serialized, hex-encoded). :: $: %sign-raw-transaction-with-key hex-string=@ux priv-keys=(list @t) prev-txs=(unit (list prev-tx)) sig-hash-type=(unit sig-hash) == :: %test-mempool-accept: Returns result of mempool acceptance tests :: indicating if raw transaction (serialized, hex-encoded) would be :: accepted by mempool. :: [%test-mempool-accept raw-txs=(list @ux) max-fee-rate=(unit @t)] :: %utxo-update-psbt: Updates a PSBT with witness UTXOs retrieved from :: the UTXO set or the mempool. :: $: %utxo-update-psbt psbt=@t descriptors=(unit (list descriptor)) == :: Util :: :: %create-multi-sig: Creates a multi-signature address with n :: signature of m keys required. It returns a json object with the :: address and redeemScript. :: $: %create-multi-sig n-required=@ud keys=(list @ux) address-type=(unit address-type) == :: %derive-addresses: Derives one or more addresses corresponding to :: an output descriptor. :: [%derive-addresses descriptor=@t range=(unit range)] :: %estimate-smart-fee: Estimates the approximate fee per kilobyte :: needed for a transaction to begin confirmation within conf_target :: blocks if possible and return the number of blocks for which the :: estimate is valid. :: [%estimate-smart-fee conf-target=@ud mode=(unit estimate-mode)] :: %get-descriptor-info: Analyses a descriptor. :: [%get-descriptor-info descriptor=@t] :: %sign-message-with-privkey: Sign a message with the private key of :: an address :: [%sign-message-with-privkey privkey=@t message=@t] :: %validate-address: Return information about the given :: bitcoin address. :: [%validate-address =address] :: %verify-message: Verify a signed message :: [%verify-message =address signature=@t message=@t] :: Wallet :: :: %abandon-transaction: Mark in-wallet transaction as abandoned. :: [%abandon-transaction txid=@ux] :: %abort-rescan: Stops current wallet rescan triggered by an :: RPC call, e.g. by an importprivkey call. :: [%abort-rescan ~] :: %add-multisig-address: Add a nrequired-to-sign multisignature :: address to the wallet. :: $: %add-multisig-address n-required=@ud keys=(list address) label=(unit @t) =address-type == :: %backupwallet: Safely copies current wallet file to destination. :: [%backup-wallet destination=@t] :: %bump-fee: Bumps the fee of an opt-in-RBF transaction T, replacing :: it with a new transaction B. :: $: %bump-fee txid=@ux :: $= options %- unit $: conf-target=(unit @ud) total-fee=(unit @t) fee-rate=(unit @t) replaceable=(unit ?) mode=(unit estimate-mode) == == :: %create-wallet: Creates and loads a new wallet. :: :: - %name: The name for the new wallet. :: - %disable-private-keys: Disable the possibility of private keys :: (only watchonlys are possible in this mode). :: - %blank: Create a blank wallet. :: A blank wallet has no keys or HD seed. :: One can be set using sethdseed. :: $: %create-wallet name=@t disable-private-keys=(unit ?) blank=(unit ?) passphrase=(unit @t) avoid-reuse=(unit ?) == :: %dump-privkey: Reveals the private key corresponding to 'address'. :: [%dump-privkey =address] :: %dump-wallet: Dumps all wallet keys in a human-readable format to :: a server-side file. :: [%dump-wallet filename=@t] :: %encrypt-wallet: Encrypts the wallet with 'passphrase'. :: [%encrypt-wallet passphrase=@t] :: %get-addresses-by-label: Returns the list of addresses assigned the :: specified label. :: [%get-addresses-by-label label=@t] :: %get-address-info: Return information about the given bitcoin :: address. :: [%get-address-info =address] :: %get-balance: Returns the total available balance. :: $: %get-balance %- unit $: dummy=(unit %'*') minconf=(unit @ud) include-watch-only=(unit ?) avoid-reuse=(unit ?) == == :: %get-balances: Returns an object with all balances in BTC. :: [%get-balances ~] :: %get-new-address: Returns a new Bitcoin address for receiving :: payments. :: [%get-new-address label=(unit @t) address-type=(unit address-type)] :: %get-raw-change-address: Returns a new Bitcoin address, :: for receiving change. :: [%get-raw-change-address address-type=(unit address-type)] :: %get-received-by-address: Returns the total amount received by the :: given address in transactions with at least minconf confirmations. :: [%get-received-by-address =address minconf=@ud] :: %get-received-by-label: Returns the total amount received by :: addresses with