Liking cljdoc? Tell your friends :D
Clojure only.

bitcoin-rpc.core


abandon-transactionclj

(abandon-transaction client {:as params :keys [txid]})

Marks an in-wallet transaction and all its in-wallet descendants as abandoned. This allows their inputs to be respent.

NameTypePresenceDescription
txidstring (hex)Required<br>(exactly 1)The transaction id

https://bitcoin.org/en/developer-reference#abandontransaction

Marks an in-wallet transaction and all its in-wallet descendants as abandoned. This allows their inputs to be respent.

| Name | Type         | Presence                | Description        |
| ---- | ------------ | ----------------------- | ------------------ |
| txid | string (hex) | Required<br>(exactly 1) | The transaction id |

https://bitcoin.org/en/developer-reference#abandontransaction
sourceraw docstring

abort-rescanclj

(abort-rescan client)
Stops current wallet rescan

https://bitcoin.org/en/developer-reference#abortrescan
sourceraw docstring

add-multi-sig-addressclj

(add-multi-sig-address client
                       {:as params :keys [nrequired keys label address_type]})

Adds a P2SH multisig address to the wallet.

NameTypePresenceDescription
nrequirednumber (int)Required<br>(exactly 1)The number of required signatures out of the n keys or addresses.
keysjson arrayRequired<br>(exactly 1)A json array of bitcoin addresses or hex-encoded public keys
labelstringOptionalA label to assign the addresses to.
address_typestringOptional<br>Default=set by -addresstypeThe address type to use. Options are "legacy", "p2sh-segwit", and "bech32".

https://bitcoin.org/en/developer-reference#addmultisigaddress

Adds a P2SH multisig address to the wallet.

| Name         | Type         | Presence                                | Description                                                                 |
| ------------ | ------------ | --------------------------------------- | --------------------------------------------------------------------------- |
| nrequired    | number (int) | Required<br>(exactly 1)                 | The number of required signatures out of the n keys or addresses.           |
| keys         | json array   | Required<br>(exactly 1)                 | A json array of bitcoin addresses or hex-encoded public keys                |
| label        | string       | Optional                                | A label to assign the addresses to.                                         |
| address_type | string       | Optional<br>Default=set by -addresstype | The address type to use. Options are "legacy", "p2sh-segwit", and "bech32". |

https://bitcoin.org/en/developer-reference#addmultisigaddress
sourceraw docstring

add-nodeclj

(add-node client {:as params :keys [node command]})

Attempts to add or remove a node from the addnode list.

NameTypePresenceDescription
nodestringRequired<br>(exactly 1)The node (see getpeerinfo for nodes). The node to add as a string in the form of <IP address>:<port>. The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address
commandstringRequired<br>(exactly 1)'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once. What to do with the IP address above. Options are:<br>• add to add a node to the addnode list. Up to 8 nodes can be added additional to the default 8 nodes. Not limited by -maxconnections<br>• remove to remove a node from the list. If currently connected, this will disconnect immediately<br>• onetry to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once

https://bitcoin.org/en/developer-reference#addnode

Attempts to add or remove a node from the addnode list.

| Name    | Type   | Presence                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------- | ------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| node    | string | Required<br>(exactly 1) | The node (see getpeerinfo for nodes). The node to add as a string in the form of `<IP address>:<port>`.  The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address                                                                                                                                                                                                                                                                                                                                                            |
| command | string | Required<br>(exactly 1) | 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once. What to do with the IP address above.  Options are:<br>• `add` to add a node to the addnode list.  Up to 8 nodes can be added additional to the default 8 nodes. Not limited by `-maxconnections`<br>• `remove` to remove a node from the list.  If currently connected, this will disconnect immediately<br>• `onetry` to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once |

https://bitcoin.org/en/developer-reference#addnode
sourceraw docstring

analyze-psbtclj

(analyze-psbt client {:as params :keys [psbt]})

Analyzes and provides information about the current status of a PSBT and its inputs.

NameTypePresenceDescription
psbtstringRequired<br>(exactly 1)A base64 string of a PSBT

https://bitcoin.org/en/developer-reference#analyzepsbt

Analyzes and provides information about the current status of a PSBT and its inputs.

| Name | Type   | Presence                | Description               |
| ---- | ------ | ----------------------- | ------------------------- |
| psbt | string | Required<br>(exactly 1) | A base64 string of a PSBT |

https://bitcoin.org/en/developer-reference#analyzepsbt
sourceraw docstring

backup-walletclj

(backup-wallet client {:as params :keys [destination]})

Safely copies current wallet file to destination, which can be a directory or a path with filename.

NameTypePresenceDescription
destinationstringRequired<br>(exactly 1)The destination directory or file

https://bitcoin.org/en/developer-reference#backupwallet

Safely copies current wallet file to destination, which can be a directory or a path with filename.

| Name        | Type   | Presence                | Description                       |
| ----------- | ------ | ----------------------- | --------------------------------- |
| destination | string | Required<br>(exactly 1) | The destination directory or file |

https://bitcoin.org/en/developer-reference#backupwallet
sourceraw docstring

bump-feeclj

(bump-fee client {:as params :keys [txid options]})

Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The txid to be bumped
optionsjson objectOptional

https://bitcoin.org/en/developer-reference#bumpfee

Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

| Name    | Type        | Presence                | Description           |
| ------- | ----------- | ----------------------- | --------------------- |
| txid    | string      | Required<br>(exactly 1) | The txid to be bumped |
| options | json object | Optional                |                       |

https://bitcoin.org/en/developer-reference#bumpfee
sourceraw docstring

clear-bannedclj

(clear-banned client)
Clear all banned IPs.

https://bitcoin.org/en/developer-reference#clearbanned
sourceraw docstring

clientclj

(client {:keys [url user pass]})
source

combine-psbtclj

(combine-psbt client {:as params :keys [txs]})

Combine multiple partially signed Bitcoin transactions into one transaction.

NameTypePresenceDescription
txsjson arrayRequired<br>(exactly 1)A json array of base64 strings of partially signed transactions

https://bitcoin.org/en/developer-reference#combinepsbt

Combine multiple partially signed Bitcoin transactions into one transaction.

| Name | Type       | Presence                | Description                                                     |
| ---- | ---------- | ----------------------- | --------------------------------------------------------------- |
| txs  | json array | Required<br>(exactly 1) | A json array of base64 strings of partially signed transactions |

https://bitcoin.org/en/developer-reference#combinepsbt
sourceraw docstring

combine-raw-transactionclj

(combine-raw-transaction client {:as params :keys [txs]})

Combine multiple partially signed transactions into one transaction.

NameTypePresenceDescription
txsjson arrayRequired<br>(exactly 1)A json array of hex strings of partially signed transactions

https://bitcoin.org/en/developer-reference#combinerawtransaction

Combine multiple partially signed transactions into one transaction.

| Name | Type       | Presence                | Description                                                  |
| ---- | ---------- | ----------------------- | ------------------------------------------------------------ |
| txs  | json array | Required<br>(exactly 1) | A json array of hex strings of partially signed transactions |

https://bitcoin.org/en/developer-reference#combinerawtransaction
sourceraw docstring

convert-to-psbtclj

(convert-to-psbt client {:as params :keys [hexstring permitsigdata iswitness]})

Converts a network serialized transaction to a PSBT.

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The hex string of a raw transaction
permitsigdatabooleanOptional<br>Default=falseIf true, any signatures in the input will be discarded and conversion. will continue. If false, RPC will fail if any signatures are present.
iswitnessbooleanOptional<br>Default=depends on heuristic testsWhether the transaction hex is a serialized witness transaction. If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion will be tried. If false, only non-witness deserialization will be tried. Only has an effect if permitsigdata is true.

https://bitcoin.org/en/developer-reference#converttopsbt

Converts a network serialized transaction to a PSBT.

| Name          | Type    | Presence                                       | Description                                                                                                                                                                                                                                                                                        |
| ------------- | ------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| hexstring     | string  | Required<br>(exactly 1)                        | The hex string of a raw transaction                                                                                                                                                                                                                                                                |
| permitsigdata | boolean | Optional<br>Default=false                      | If true, any signatures in the input will be discarded and conversion. will continue. If false, RPC will fail if any signatures are present.                                                                                                                                                       |
| iswitness     | boolean | Optional<br>Default=depends on heuristic tests | Whether the transaction hex is a serialized witness transaction. If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion will be tried. If false, only non-witness deserialization will be tried. Only has an effect if permitsigdata is true. |

https://bitcoin.org/en/developer-reference#converttopsbt
sourceraw docstring

create-multi-sigclj

(create-multi-sig client {:as params :keys [nrequired keys address_type]})

Creates a multi-signature address with n signature of m keys required.

NameTypePresenceDescription
nrequirednumber (int)Required<br>(exactly 1)The number of required signatures out of the n keys.
keysjson arrayRequired<br>(exactly 1)A json array of hex-encoded public keys.
address_typestringOptional<br>Default=legacyThe address type to use. Options are "legacy", "p2sh-segwit", and "bech32".

https://bitcoin.org/en/developer-reference#createmultisig

Creates a multi-signature address with n signature of m keys required.

| Name         | Type         | Presence                   | Description                                                                 |
| ------------ | ------------ | -------------------------- | --------------------------------------------------------------------------- |
| nrequired    | number (int) | Required<br>(exactly 1)    | The number of required signatures out of the n keys.                        |
| keys         | json array   | Required<br>(exactly 1)    | A json array of hex-encoded public keys.                                    |
| address_type | string       | Optional<br>Default=legacy | The address type to use. Options are "legacy", "p2sh-segwit", and "bech32". |

https://bitcoin.org/en/developer-reference#createmultisig
sourceraw docstring

create-psbtclj

(create-psbt client {:as params :keys [inputs outputs locktime replaceable]})

Creates a transaction in the Partially Signed Transaction format.

NameTypePresenceDescription
inputsjson arrayRequired<br>(exactly 1)A json array of json objects
outputsjson arrayRequired<br>(exactly 1)a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.
locktimenumber (int)Optional<br>Default=0Raw locktime. Non-0 value also locktime-activates inputs
replaceablebooleanOptional<br>Default=falseMarks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.

https://bitcoin.org/en/developer-reference#createpsbt

Creates a transaction in the Partially Signed Transaction format.

| Name        | Type         | Presence                  | Description                                                                                                                                                                                                                                                                                      |
| ----------- | ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| inputs      | json array   | Required<br>(exactly 1)   | A json array of json objects                                                                                                                                                                                                                                                                     |
| outputs     | json array   | Required<br>(exactly 1)   | a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter. |
| locktime    | number (int) | Optional<br>Default=0     | Raw locktime. Non-0 value also locktime-activates inputs                                                                                                                                                                                                                                         |
| replaceable | boolean      | Optional<br>Default=false | Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.                                                                                               |

https://bitcoin.org/en/developer-reference#createpsbt
sourceraw docstring

create-raw-transactionclj

(create-raw-transaction client
                        {:as params
                         :keys [inputs outputs locktime replaceable]})

Create a transaction spending the given inputs and creating new outputs.

NameTypePresenceDescription
inputsjson arrayRequired<br>(exactly 1)A json array of json objects
outputsjson arrayRequired<br>(exactly 1)a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.
locktimenumber (int)Optional<br>Default=0Raw locktime. Non-0 value also locktime-activates inputs
replaceablebooleanOptional<br>Default=falseMarks this transaction as BIP125-replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.

https://bitcoin.org/en/developer-reference#createrawtransaction

Create a transaction spending the given inputs and creating new outputs.

| Name        | Type         | Presence                  | Description                                                                                                                                                                                                                                                                                      |
| ----------- | ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| inputs      | json array   | Required<br>(exactly 1)   | A json array of json objects                                                                                                                                                                                                                                                                     |
| outputs     | json array   | Required<br>(exactly 1)   | a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter. |
| locktime    | number (int) | Optional<br>Default=0     | Raw locktime. Non-0 value also locktime-activates inputs                                                                                                                                                                                                                                         |
| replaceable | boolean      | Optional<br>Default=false | Marks this transaction as BIP125-replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.                                                                                               |

https://bitcoin.org/en/developer-reference#createrawtransaction
sourceraw docstring

create-walletclj

(create-wallet client
               {:as params :keys [wallet_name disable_private_keys blank]})

Creates and loads a new wallet.

NameTypePresenceDescription
wallet_namestringRequired<br>(exactly 1)The name for the new wallet. If this is a path, the wallet will be created at the path location.
disable_private_keysbooleanOptional<br>Default=falseDisable the possibility of private keys (only watchonlys are possible in this mode).
blankbooleanOptional<br>Default=falseCreate a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed.

https://bitcoin.org/en/developer-reference#createwallet

Creates and loads a new wallet.

| Name                 | Type    | Presence                  | Description                                                                                      |
| -------------------- | ------- | ------------------------- | ------------------------------------------------------------------------------------------------ |
| wallet_name          | string  | Required<br>(exactly 1)   | The name for the new wallet. If this is a path, the wallet will be created at the path location. |
| disable_private_keys | boolean | Optional<br>Default=false | Disable the possibility of private keys (only watchonlys are possible in this mode).             |
| blank                | boolean | Optional<br>Default=false | Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed.    |

https://bitcoin.org/en/developer-reference#createwallet
sourceraw docstring

decode-psbtclj

(decode-psbt client {:as params :keys [psbt]})

Return a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.

NameTypePresenceDescription
psbtstringRequired<br>(exactly 1)The PSBT base64 string

https://bitcoin.org/en/developer-reference#decodepsbt

Return a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.

| Name | Type   | Presence                | Description            |
| ---- | ------ | ----------------------- | ---------------------- |
| psbt | string | Required<br>(exactly 1) | The PSBT base64 string |

https://bitcoin.org/en/developer-reference#decodepsbt
sourceraw docstring

decode-raw-transactionclj

(decode-raw-transaction client {:as params :keys [hexstring iswitness]})

Return a JSON object representing the serialized, hex-encoded transaction.

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The transaction hex string
iswitnessbooleanOptional<br>Default=depends on heuristic testsWhether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding

https://bitcoin.org/en/developer-reference#decoderawtransaction

Return a JSON object representing the serialized, hex-encoded transaction.

| Name      | Type    | Presence                                       | Description                                                                                                                           |
| --------- | ------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| hexstring | string  | Required<br>(exactly 1)                        | The transaction hex string                                                                                                            |
| iswitness | boolean | Optional<br>Default=depends on heuristic tests | Whether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding |

https://bitcoin.org/en/developer-reference#decoderawtransaction
sourceraw docstring

decode-scriptclj

(decode-script client {:as params :keys [hexstring]})

Decode a hex-encoded script.

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)the hex-encoded script

https://bitcoin.org/en/developer-reference#decodescript

Decode a hex-encoded script.

| Name      | Type   | Presence                | Description            |
| --------- | ------ | ----------------------- | ---------------------- |
| hexstring | string | Required<br>(exactly 1) | the hex-encoded script |

https://bitcoin.org/en/developer-reference#decodescript
sourceraw docstring

derive-addressesclj

(derive-addresses client {:as params :keys [descriptor range]})

Derives one or more addresses corresponding to an output descriptor.

NameTypePresenceDescription
descriptorstringRequired<br>(exactly 1)The descriptor.
rangenumeric or arrayOptionalIf a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive.

https://bitcoin.org/en/developer-reference#deriveaddresses

Derives one or more addresses corresponding to an output descriptor.

| Name       | Type             | Presence                | Description                                                                                              |
| ---------- | ---------------- | ----------------------- | -------------------------------------------------------------------------------------------------------- |
| descriptor | string           | Required<br>(exactly 1) | The descriptor.                                                                                          |
| range      | numeric or array | Optional                | If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive. |

https://bitcoin.org/en/developer-reference#deriveaddresses
sourceraw docstring

disconnect-nodeclj

(disconnect-node client {:as params :keys [address nodeid]})

Immediately disconnects from the specified peer node.

NameTypePresenceDescription
addressstringOptional<br>Default=fallback to nodeidThe IP address/port of the node
nodeidnumber (int)Optional<br>Default=fallback to addressThe node ID (see getpeerinfo for node IDs)

https://bitcoin.org/en/developer-reference#disconnectnode

Immediately disconnects from the specified peer node.

| Name    | Type         | Presence                                | Description                                |
| ------- | ------------ | --------------------------------------- | ------------------------------------------ |
| address | string       | Optional<br>Default=fallback to nodeid  | The IP address/port of the node            |
| nodeid  | number (int) | Optional<br>Default=fallback to address | The node ID (see getpeerinfo for node IDs) |

https://bitcoin.org/en/developer-reference#disconnectnode
sourceraw docstring

dump-priv-keyclj

(dump-priv-key client {:as params :keys [address]})

Reveals the private key corresponding to 'address'.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address for the private key

https://bitcoin.org/en/developer-reference#dumpprivkey

Reveals the private key corresponding to 'address'.

| Name    | Type   | Presence                | Description                             |
| ------- | ------ | ----------------------- | --------------------------------------- |
| address | string | Required<br>(exactly 1) | The bitcoin address for the private key |

https://bitcoin.org/en/developer-reference#dumpprivkey
sourceraw docstring

dump-walletclj

(dump-wallet client {:as params :keys [filename]})

Dumps all wallet keys in a human-readable format to a server-side file.

NameTypePresenceDescription
filenamestringRequired<br>(exactly 1)The filename with path (either absolute or relative to bitcoind)

https://bitcoin.org/en/developer-reference#dumpwallet

Dumps all wallet keys in a human-readable format to a server-side file.

| Name     | Type   | Presence                | Description                                                      |
| -------- | ------ | ----------------------- | ---------------------------------------------------------------- |
| filename | string | Required<br>(exactly 1) | The filename with path (either absolute or relative to bitcoind) |

https://bitcoin.org/en/developer-reference#dumpwallet
sourceraw docstring

encrypt-walletclj

(encrypt-wallet client {:as params :keys [passphrase]})

Encrypts the wallet with 'passphrase'.

NameTypePresenceDescription
passphrasestringRequired<br>(exactly 1)The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.

https://bitcoin.org/en/developer-reference#encryptwallet

Encrypts the wallet with 'passphrase'.

| Name       | Type   | Presence                | Description                                                                                      |
| ---------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------ |
| passphrase | string | Required<br>(exactly 1) | The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long. |

https://bitcoin.org/en/developer-reference#encryptwallet
sourceraw docstring

estimate-smart-feeclj

(estimate-smart-fee client {:as params :keys [conf_target estimate_mode]})

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.

NameTypePresenceDescription
conf_targetnumber (int)Required<br>(exactly 1)Confirmation target in blocks (1 - 1008)
estimate_modestringOptional<br>Default=CONSERVATIVEThe fee estimate mode. Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. Must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE"

https://bitcoin.org/en/developer-reference#estimatesmartfee

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.

| Name          | Type         | Presence                         | Description                                                                                                                                                                                                                                                                                                                                                           |
| ------------- | ------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| conf_target   | number (int) | Required<br>(exactly 1)          | Confirmation target in blocks (1 - 1008)                                                                                                                                                                                                                                                                                                                              |
| estimate_mode | string       | Optional<br>Default=CONSERVATIVE | The fee estimate mode. Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market.  Must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE" |

https://bitcoin.org/en/developer-reference#estimatesmartfee
sourceraw docstring

finalize-psbtclj

(finalize-psbt client {:as params :keys [psbt extract]})

Finalize the inputs of a PSBT.

NameTypePresenceDescription
psbtstringRequired<br>(exactly 1)A base64 string of a PSBT
extractbooleanOptional<br>Default=trueIf true and the transaction is complete, extract and return the complete transaction in normal network serialization instead of the PSBT.

https://bitcoin.org/en/developer-reference#finalizepsbt

Finalize the inputs of a PSBT.

| Name    | Type    | Presence                 | Description                                                                                                                               |
| ------- | ------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| psbt    | string  | Required<br>(exactly 1)  | A base64 string of a PSBT                                                                                                                 |
| extract | boolean | Optional<br>Default=true | If true and the transaction is complete, extract and return the complete transaction in normal network serialization instead of the PSBT. |

https://bitcoin.org/en/developer-reference#finalizepsbt
sourceraw docstring

fund-raw-transactionclj

(fund-raw-transaction client {:as params :keys [hexstring options iswitness]})

Add inputs to a transaction until it has enough in value to meet its out value.

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The hex string of the raw transaction
optionsjson objectOptionalfor backward compatibility: passing in a true instead of an object will result in {"includeWatching":true} "replaceable": bool, (boolean, optional, default=fallback to wallet's default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees "conf_target": n, (numeric, optional, default=fallback to wallet's default) Confirmation target (in blocks) "estimate_mode": "str", (string, optional, default=UNSET) The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE" }
iswitnessbooleanOptional<br>Default=depends on heuristic testsWhether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding

https://bitcoin.org/en/developer-reference#fundrawtransaction

Add inputs to a transaction until it has enough in value to meet its out value.

| Name      | Type        | Presence                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------- | ----------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| hexstring | string      | Required<br>(exactly 1)                        | The hex string of the raw transaction                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| options   | json object | Optional                                       | for backward compatibility: passing in a true instead of an object will result in {"includeWatching":true} "replaceable": bool,           (boolean, optional, default=fallback to wallet's default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees "conf_target": n,              (numeric, optional, default=fallback to wallet's default) Confirmation target (in blocks) "estimate_mode": "str",        (string, optional, default=UNSET) The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE" } |
| iswitness | boolean     | Optional<br>Default=depends on heuristic tests | Whether the transaction hex is a serialized witness transaction If iswitness is not present, heuristic tests will be used in decoding                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

https://bitcoin.org/en/developer-reference#fundrawtransaction
sourceraw docstring

generateclj

(generate client {:as params :keys [nblocks maxtries]})

Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.

NameTypePresenceDescription
nblocksnumber (int)Required<br>(exactly 1)How many blocks are generated immediately.
maxtriesnumber (int)Optional<br>Default=1000000How many iterations to try.

https://bitcoin.org/en/developer-reference#generate

Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.

| Name     | Type         | Presence                    | Description                                |
| -------- | ------------ | --------------------------- | ------------------------------------------ |
| nblocks  | number (int) | Required<br>(exactly 1)     | How many blocks are generated immediately. |
| maxtries | number (int) | Optional<br>Default=1000000 | How many iterations to try.                |

https://bitcoin.org/en/developer-reference#generate
sourceraw docstring

generate-to-addressclj

(generate-to-address client {:as params :keys [nblocks address maxtries]})

Mine blocks immediately to a specified address (before the RPC call returns).

NameTypePresenceDescription
nblocksnumber (int)Required<br>(exactly 1)How many blocks are generated immediately.
addressstringRequired<br>(exactly 1)The address to send the newly generated bitcoin to.
maxtriesnumber (int)Optional<br>Default=1000000How many iterations to try.

https://bitcoin.org/en/developer-reference#generatetoaddress

Mine blocks immediately to a specified address (before the RPC call returns).

| Name     | Type         | Presence                    | Description                                         |
| -------- | ------------ | --------------------------- | --------------------------------------------------- |
| nblocks  | number (int) | Required<br>(exactly 1)     | How many blocks are generated immediately.          |
| address  | string       | Required<br>(exactly 1)     | The address to send the newly generated bitcoin to. |
| maxtries | number (int) | Optional<br>Default=1000000 | How many iterations to try.                         |

https://bitcoin.org/en/developer-reference#generatetoaddress
sourceraw docstring

get-added-node-infoclj

(get-added-node-info client {:as params :keys [node]})

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here).

NameTypePresenceDescription
nodestringOptional<br>Default=all nodesIf provided, return information about this specific node, otherwise all nodes are returned.

https://bitcoin.org/en/developer-reference#getaddednodeinfo

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here).

| Name | Type   | Presence                      | Description                                                                                 |
| ---- | ------ | ----------------------------- | ------------------------------------------------------------------------------------------- |
| node | string | Optional<br>Default=all nodes | If provided, return information about this specific node, otherwise all nodes are returned. |

https://bitcoin.org/en/developer-reference#getaddednodeinfo
sourceraw docstring

get-address-infoclj

(get-address-info client {:as params :keys [address]})

Return information about the given bitcoin address.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to get the information of.

https://bitcoin.org/en/developer-reference#getaddressinfo

Return information about the given bitcoin address.

| Name    | Type   | Presence                | Description                                    |
| ------- | ------ | ----------------------- | ---------------------------------------------- |
| address | string | Required<br>(exactly 1) | The bitcoin address to get the information of. |

https://bitcoin.org/en/developer-reference#getaddressinfo
sourceraw docstring

get-addresses-by-labelclj

(get-addresses-by-label client {:as params :keys [label]})

Returns the list of addresses assigned the specified label.

NameTypePresenceDescription
labelstringRequired<br>(exactly 1)The label.

https://bitcoin.org/en/developer-reference#getaddressesbylabel

Returns the list of addresses assigned the specified label.

| Name  | Type   | Presence                | Description |
| ----- | ------ | ----------------------- | ----------- |
| label | string | Required<br>(exactly 1) | The label.  |

https://bitcoin.org/en/developer-reference#getaddressesbylabel
sourceraw docstring

get-balanceclj

(get-balance client {:as params :keys [dummy minconf include_watchonly]})

Returns the total available balance.

NameTypePresenceDescription
dummystringOptionalRemains for backward compatibility. Must be excluded or set to "*".
minconfnumber (int)Optional<br>Default=0Only include transactions confirmed at least this many times.
include_watchonlybooleanOptional<br>Default=falseAlso include balance in watch-only addresses (see 'importaddress')

https://bitcoin.org/en/developer-reference#getbalance

Returns the total available balance.

| Name              | Type         | Presence                  | Description                                                         |
| ----------------- | ------------ | ------------------------- | ------------------------------------------------------------------- |
| dummy             | string       | Optional                  | Remains for backward compatibility. Must be excluded or set to "*". |
| minconf           | number (int) | Optional<br>Default=0     | Only include transactions confirmed at least this many times.       |
| include_watchonly | boolean      | Optional<br>Default=false | Also include balance in watch-only addresses (see 'importaddress')  |

https://bitcoin.org/en/developer-reference#getbalance
sourceraw docstring

get-best-block-hashclj

(get-best-block-hash client)

Returns the hash of the best (tip) block in the longest blockchain.

https://bitcoin.org/en/developer-reference#getbestblockhash

Returns the hash of the best (tip) block in the longest blockchain.

https://bitcoin.org/en/developer-reference#getbestblockhash
sourceraw docstring

get-blockclj

(get-block client {:as params :keys [blockhash verbosity]})

Gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.

NameTypePresenceDescription
blockhashstring (hex)Required<br>(exactly 1)The block hash
verbositynumber (int)Optional<br>Default=10 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data

https://bitcoin.org/en/developer-reference#getblock

Gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.

| Name      | Type         | Presence                | Description                                                                              |
| --------- | ------------ | ----------------------- | ---------------------------------------------------------------------------------------- |
| blockhash | string (hex) | Required<br>(exactly 1) | The block hash                                                                           |
| verbosity | number (int) | Optional<br>Default=1   | 0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data |

https://bitcoin.org/en/developer-reference#getblock
sourceraw docstring

get-block-chain-infoclj

(get-block-chain-info client)

Returns an object containing various state info regarding blockchain processing.

https://bitcoin.org/en/developer-reference#getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

https://bitcoin.org/en/developer-reference#getblockchaininfo
sourceraw docstring

get-block-countclj

(get-block-count client)

Returns the number of blocks in the longest blockchain.

https://bitcoin.org/en/developer-reference#getblockcount

Returns the number of blocks in the longest blockchain.

https://bitcoin.org/en/developer-reference#getblockcount
sourceraw docstring

get-block-hashclj

(get-block-hash client {:as params :keys [height]})

Returns hash of block in best-block-chain at height provided.

NameTypePresenceDescription
heightnumber (int)Required<br>(exactly 1)The height index

https://bitcoin.org/en/developer-reference#getblockhash

Returns hash of block in best-block-chain at height provided.

| Name   | Type         | Presence                | Description      |
| ------ | ------------ | ----------------------- | ---------------- |
| height | number (int) | Required<br>(exactly 1) | The height index |

https://bitcoin.org/en/developer-reference#getblockhash
sourceraw docstring

get-block-headerclj

(get-block-header client {:as params :keys [blockhash verbose]})

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.

NameTypePresenceDescription
blockhashstringRequired<br>(exactly 1)The block hash
verbosebooleanOptional<br>Default=truetrue for a json object, false for the hex-encoded data

https://bitcoin.org/en/developer-reference#getblockheader

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.

| Name      | Type    | Presence                 | Description                                            |
| --------- | ------- | ------------------------ | ------------------------------------------------------ |
| blockhash | string  | Required<br>(exactly 1)  | The block hash                                         |
| verbose   | boolean | Optional<br>Default=true | true for a json object, false for the hex-encoded data |

https://bitcoin.org/en/developer-reference#getblockheader
sourceraw docstring

get-block-statsclj

(get-block-stats client {:as params :keys [hash_or_height stats]})

Compute per block statistics for a given window.

NameTypePresenceDescription
hash_or_heightstring or numericRequired<br>(exactly 1)The block hash or height of the target block
statsjson arrayOptional<br>Default=all valuesValues to plot (see result below)

https://bitcoin.org/en/developer-reference#getblockstats

Compute per block statistics for a given window.

| Name           | Type              | Presence                       | Description                                  |
| -------------- | ----------------- | ------------------------------ | -------------------------------------------- |
| hash_or_height | string or numeric | Required<br>(exactly 1)        | The block hash or height of the target block |
| stats          | json array        | Optional<br>Default=all values | Values to plot (see result below)            |

https://bitcoin.org/en/developer-reference#getblockstats
sourceraw docstring

get-block-templateclj

(get-block-template client {:as params :keys [template_request]})

If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.

NameTypePresenceDescription
template_requestjson objectRequired<br>(exactly 1)A json object in the following spec "rules": [ (json array, required) A list of strings "support", (string) client side supported softfork deployment ... ], }

https://bitcoin.org/en/developer-reference#getblocktemplate

If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.

| Name             | Type        | Presence                | Description                                                                                                                                                                      |
| ---------------- | ----------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| template_request | json object | Required<br>(exactly 1) | A json object in the following spec "rules": [           (json array, required) A list of strings "support",         (string) client side supported softfork deployment ... ], } |

https://bitcoin.org/en/developer-reference#getblocktemplate
sourceraw docstring

get-chain-tipsclj

(get-chain-tips client)

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

https://bitcoin.org/en/developer-reference#getchaintips

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

https://bitcoin.org/en/developer-reference#getchaintips
sourceraw docstring

get-chain-tx-statsclj

(get-chain-tx-stats client {:as params :keys [nblocks blockhash]})

Compute statistics about the total number and rate of transactions in the chain.

NameTypePresenceDescription
nblocksnumber (int)Optional<br>Default=one monthSize of the window in number of blocks
blockhashstringOptional<br>Default=chain tipThe hash of the block that ends the window.

https://bitcoin.org/en/developer-reference#getchaintxstats

Compute statistics about the total number and rate of transactions in the chain.

| Name      | Type         | Presence                      | Description                                 |
| --------- | ------------ | ----------------------------- | ------------------------------------------- |
| nblocks   | number (int) | Optional<br>Default=one month | Size of the window in number of blocks      |
| blockhash | string       | Optional<br>Default=chain tip | The hash of the block that ends the window. |

https://bitcoin.org/en/developer-reference#getchaintxstats
sourceraw docstring

get-connection-countclj

(get-connection-count client)

Returns the number of connections to other nodes.

https://bitcoin.org/en/developer-reference#getconnectioncount

Returns the number of connections to other nodes.

https://bitcoin.org/en/developer-reference#getconnectioncount
sourceraw docstring

get-descriptor-infoclj

(get-descriptor-info client {:as params :keys [descriptor]})

Analyses a descriptor.

NameTypePresenceDescription
descriptorstringRequired<br>(exactly 1)The descriptor.

https://bitcoin.org/en/developer-reference#getdescriptorinfo

Analyses a descriptor.

| Name       | Type   | Presence                | Description     |
| ---------- | ------ | ----------------------- | --------------- |
| descriptor | string | Required<br>(exactly 1) | The descriptor. |

https://bitcoin.org/en/developer-reference#getdescriptorinfo
sourceraw docstring

get-difficultyclj

(get-difficulty client)

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

https://bitcoin.org/en/developer-reference#getdifficulty

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

https://bitcoin.org/en/developer-reference#getdifficulty
sourceraw docstring

get-mem-pool-ancestorsclj

(get-mem-pool-ancestors client {:as params :keys [txid verbose]})

If txid is in the mempool, returns all in-mempool ancestors.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id (must be in mempool)
verbosebooleanOptional<br>Default=falseTrue for a json object, false for array of transaction ids

https://bitcoin.org/en/developer-reference#getmempoolancestors

If txid is in the mempool, returns all in-mempool ancestors.

| Name    | Type    | Presence                  | Description                                                |
| ------- | ------- | ------------------------- | ---------------------------------------------------------- |
| txid    | string  | Required<br>(exactly 1)   | The transaction id (must be in mempool)                    |
| verbose | boolean | Optional<br>Default=false | True for a json object, false for array of transaction ids |

https://bitcoin.org/en/developer-reference#getmempoolancestors
sourceraw docstring

get-mem-pool-descendantsclj

(get-mem-pool-descendants client {:as params :keys [txid verbose]})

If txid is in the mempool, returns all in-mempool descendants.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id (must be in mempool)
verbosebooleanOptional<br>Default=falseTrue for a json object, false for array of transaction ids

https://bitcoin.org/en/developer-reference#getmempooldescendants

If txid is in the mempool, returns all in-mempool descendants.

| Name    | Type    | Presence                  | Description                                                |
| ------- | ------- | ------------------------- | ---------------------------------------------------------- |
| txid    | string  | Required<br>(exactly 1)   | The transaction id (must be in mempool)                    |
| verbose | boolean | Optional<br>Default=false | True for a json object, false for array of transaction ids |

https://bitcoin.org/en/developer-reference#getmempooldescendants
sourceraw docstring

get-mem-pool-entryclj

(get-mem-pool-entry client {:as params :keys [txid]})

Returns mempool data for given transaction.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id (must be in mempool)

https://bitcoin.org/en/developer-reference#getmempoolentry

Returns mempool data for given transaction.

| Name | Type   | Presence                | Description                             |
| ---- | ------ | ----------------------- | --------------------------------------- |
| txid | string | Required<br>(exactly 1) | The transaction id (must be in mempool) |

https://bitcoin.org/en/developer-reference#getmempoolentry
sourceraw docstring

get-mem-pool-infoclj

(get-mem-pool-info client)

Returns details on the active state of the TX memory pool.

https://bitcoin.org/en/developer-reference#getmempoolinfo

Returns details on the active state of the TX memory pool.

https://bitcoin.org/en/developer-reference#getmempoolinfo
sourceraw docstring

get-memory-infoclj

(get-memory-info client {:as params :keys [mode]})

Returns an object containing information about memory usage.

NameTypePresenceDescription
modestringOptional<br>Default="stats"determines what kind of information is returned. - "stats" returns general statistics about memory usage in the daemon. - "mallocinfo" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+).

https://bitcoin.org/en/developer-reference#getmemoryinfo

Returns an object containing information about memory usage.

| Name | Type   | Presence                    | Description                                                                                                                                                                                                                                 |
| ---- | ------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mode | string | Optional<br>Default="stats" | determines what kind of information is returned. - "stats" returns general statistics about memory usage in the daemon. - "mallocinfo" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+). |

https://bitcoin.org/en/developer-reference#getmemoryinfo
sourceraw docstring

get-mining-infoclj

(get-mining-info client)

Returns a json object containing mining-related information.

https://bitcoin.org/en/developer-reference#getmininginfo

Returns a json object containing mining-related information.

https://bitcoin.org/en/developer-reference#getmininginfo
sourceraw docstring

get-net-totalsclj

(get-net-totals client)

Returns information about network traffic, including bytes in, bytes out, and current time.

https://bitcoin.org/en/developer-reference#getnettotals

Returns information about network traffic, including bytes in, bytes out, and current time.

https://bitcoin.org/en/developer-reference#getnettotals
sourceraw docstring

get-network-hash-psclj

(get-network-hash-ps client {:as params :keys [nblocks height]})

Returns the estimated network hashes per second based on the last n blocks.

NameTypePresenceDescription
nblocksnumber (int)Optional<br>Default=120The number of blocks, or -1 for blocks since last difficulty change.
heightnumber (int)Optional<br>Default=-1To estimate at the time of the given height.

https://bitcoin.org/en/developer-reference#getnetworkhashps

Returns the estimated network hashes per second based on the last n blocks.

| Name    | Type         | Presence                | Description                                                          |
| ------- | ------------ | ----------------------- | -------------------------------------------------------------------- |
| nblocks | number (int) | Optional<br>Default=120 | The number of blocks, or -1 for blocks since last difficulty change. |
| height  | number (int) | Optional<br>Default=-1  | To estimate at the time of the given height.                         |

https://bitcoin.org/en/developer-reference#getnetworkhashps
sourceraw docstring

get-network-infoclj

(get-network-info client)

Returns an object containing various state info regarding P2P networking.

https://bitcoin.org/en/developer-reference#getnetworkinfo

Returns an object containing various state info regarding P2P networking.

https://bitcoin.org/en/developer-reference#getnetworkinfo
sourceraw docstring

get-new-addressclj

(get-new-address client {:as params :keys [label address_type]})

Returns a new Bitcoin address for receiving payments.

NameTypePresenceDescription
labelstringOptional<br>Default=""The label name for the address to be linked to. It can also be set to the empty string "" to represent the default label. The label does not need to exist, it will be created if there is no label by the given name.
address_typestringOptional<br>Default=set by -addresstypeThe address type to use. Options are "legacy", "p2sh-segwit", and "bech32".

https://bitcoin.org/en/developer-reference#getnewaddress

Returns a new Bitcoin address for receiving payments.

| Name         | Type   | Presence                                | Description                                                                                                                                                                                                            |
| ------------ | ------ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| label        | string | Optional<br>Default=""                  | The label name for the address to be linked to. It can also be set to the empty string "" to represent the default label. The label does not need to exist, it will be created if there is no label by the given name. |
| address_type | string | Optional<br>Default=set by -addresstype | The address type to use. Options are "legacy", "p2sh-segwit", and "bech32".                                                                                                                                            |

https://bitcoin.org/en/developer-reference#getnewaddress
sourceraw docstring

get-node-addressesclj

(get-node-addresses client {:as params :keys [count]})

Return known addresses which can potentially be used to find new nodes in the network.

NameTypePresenceDescription
countnumber (int)Optional<br>Default=1How many addresses to return. Limited to the smaller of 2500 or 23% of all known addresses.

https://bitcoin.org/en/developer-reference#getnodeaddresses

Return known addresses which can potentially be used to find new nodes in the network.

| Name  | Type         | Presence              | Description                                                                                 |
| ----- | ------------ | --------------------- | ------------------------------------------------------------------------------------------- |
| count | number (int) | Optional<br>Default=1 | How many addresses to return. Limited to the smaller of 2500 or 23% of all known addresses. |

https://bitcoin.org/en/developer-reference#getnodeaddresses
sourceraw docstring

get-peer-infoclj

(get-peer-info client)

Returns data about each connected network node as a json array of objects.

https://bitcoin.org/en/developer-reference#getpeerinfo

Returns data about each connected network node as a json array of objects.

https://bitcoin.org/en/developer-reference#getpeerinfo
sourceraw docstring

get-raw-change-addressclj

(get-raw-change-address client {:as params :keys [address_type]})

Returns a new Bitcoin address, for receiving change.

NameTypePresenceDescription
address_typestringOptional<br>Default=set by -changetypeThe address type to use. Options are "legacy", "p2sh-segwit", and "bech32".

https://bitcoin.org/en/developer-reference#getrawchangeaddress

Returns a new Bitcoin address, for receiving change.

| Name         | Type   | Presence                               | Description                                                                 |
| ------------ | ------ | -------------------------------------- | --------------------------------------------------------------------------- |
| address_type | string | Optional<br>Default=set by -changetype | The address type to use. Options are "legacy", "p2sh-segwit", and "bech32". |

https://bitcoin.org/en/developer-reference#getrawchangeaddress
sourceraw docstring

get-raw-mem-poolclj

(get-raw-mem-pool client {:as params :keys [verbose]})

Returns all transaction ids in memory pool as a json array of string transaction ids.

NameTypePresenceDescription
verbosebooleanOptional<br>Default=falseTrue for a json object, false for array of transaction ids

https://bitcoin.org/en/developer-reference#getrawmempool

Returns all transaction ids in memory pool as a json array of string transaction ids.

| Name    | Type    | Presence                  | Description                                                |
| ------- | ------- | ------------------------- | ---------------------------------------------------------- |
| verbose | boolean | Optional<br>Default=false | True for a json object, false for array of transaction ids |

https://bitcoin.org/en/developer-reference#getrawmempool
sourceraw docstring

get-raw-transactionclj

(get-raw-transaction client {:as params :keys [txid verbose blockhash]})

Return the raw transaction data.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id
verbosebooleanOptional<br>Default=falseIf false, return a string, otherwise return a json object
blockhashstringOptionalThe block in which to look for the transaction

https://bitcoin.org/en/developer-reference#getrawtransaction

Return the raw transaction data.

| Name      | Type    | Presence                  | Description                                               |
| --------- | ------- | ------------------------- | --------------------------------------------------------- |
| txid      | string  | Required<br>(exactly 1)   | The transaction id                                        |
| verbose   | boolean | Optional<br>Default=false | If false, return a string, otherwise return a json object |
| blockhash | string  | Optional                  | The block in which to look for the transaction            |

https://bitcoin.org/en/developer-reference#getrawtransaction
sourceraw docstring

get-received-by-addressclj

(get-received-by-address client {:as params :keys [address minconf]})

Returns the total amount received by the given address in transactions with at least minconf confirmations.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address for transactions.
minconfnumber (int)Optional<br>Default=1Only include transactions confirmed at least this many times.

https://bitcoin.org/en/developer-reference#getreceivedbyaddress

Returns the total amount received by the given address in transactions with at least minconf confirmations.

| Name    | Type         | Presence                | Description                                                   |
| ------- | ------------ | ----------------------- | ------------------------------------------------------------- |
| address | string       | Required<br>(exactly 1) | The bitcoin address for transactions.                         |
| minconf | number (int) | Optional<br>Default=1   | Only include transactions confirmed at least this many times. |

https://bitcoin.org/en/developer-reference#getreceivedbyaddress
sourceraw docstring

get-received-by-labelclj

(get-received-by-label client {:as params :keys [label minconf]})

Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.

NameTypePresenceDescription
labelstringRequired<br>(exactly 1)The selected label, may be the default label using "".
minconfnumber (int)Optional<br>Default=1Only include transactions confirmed at least this many times.

https://bitcoin.org/en/developer-reference#getreceivedbylabel

Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.

| Name    | Type         | Presence                | Description                                                   |
| ------- | ------------ | ----------------------- | ------------------------------------------------------------- |
| label   | string       | Required<br>(exactly 1) | The selected label, may be the default label using "".        |
| minconf | number (int) | Optional<br>Default=1   | Only include transactions confirmed at least this many times. |

https://bitcoin.org/en/developer-reference#getreceivedbylabel
sourceraw docstring

get-rpc-infoclj

(get-rpc-info client)

Returns details of the RPC server.

https://bitcoin.org/en/developer-reference#getrpcinfo

Returns details of the RPC server.

https://bitcoin.org/en/developer-reference#getrpcinfo
sourceraw docstring

get-transactionclj

(get-transaction client {:as params :keys [txid include_watchonly]})

Get detailed information about in-wallet transaction <txid>.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id
include_watchonlybooleanOptional<br>Default=falseWhether to include watch-only addresses in balance calculation and details[]

https://bitcoin.org/en/developer-reference#gettransaction

Get detailed information about in-wallet transaction <txid>.

| Name              | Type    | Presence                  | Description                                                                  |
| ----------------- | ------- | ------------------------- | ---------------------------------------------------------------------------- |
| txid              | string  | Required<br>(exactly 1)   | The transaction id                                                           |
| include_watchonly | boolean | Optional<br>Default=false | Whether to include watch-only addresses in balance calculation and details[] |

https://bitcoin.org/en/developer-reference#gettransaction
sourceraw docstring

get-tx-outclj

(get-tx-out client {:as params :keys [txid n include_mempool]})

Returns details about an unspent transaction output.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id
nnumber (int)Required<br>(exactly 1)vout number
include_mempoolbooleanOptional<br>Default=trueWhether to include the mempool. Note that an unspent output that is spent in the mempool won't appear.

https://bitcoin.org/en/developer-reference#gettxout

Returns details about an unspent transaction output.

| Name            | Type         | Presence                 | Description                                                                                            |
| --------------- | ------------ | ------------------------ | ------------------------------------------------------------------------------------------------------ |
| txid            | string       | Required<br>(exactly 1)  | The transaction id                                                                                     |
| n               | number (int) | Required<br>(exactly 1)  | vout number                                                                                            |
| include_mempool | boolean      | Optional<br>Default=true | Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear. |

https://bitcoin.org/en/developer-reference#gettxout
sourceraw docstring

get-tx-out-proofclj

(get-tx-out-proof client {:as params :keys [txids blockhash]})

Returns a hex-encoded proof that "txid" was included in a block.

NameTypePresenceDescription
txidsjson arrayRequired<br>(exactly 1)A json array of txids to filter
blockhashstringOptionalIf specified, looks for txid in the block with this hash

https://bitcoin.org/en/developer-reference#gettxoutproof

Returns a hex-encoded proof that "txid" was included in a block.

| Name      | Type       | Presence                | Description                                              |
| --------- | ---------- | ----------------------- | -------------------------------------------------------- |
| txids     | json array | Required<br>(exactly 1) | A json array of txids to filter                          |
| blockhash | string     | Optional                | If specified, looks for txid in the block with this hash |

https://bitcoin.org/en/developer-reference#gettxoutproof
sourceraw docstring

get-tx-out-set-infoclj

(get-tx-out-set-info client)

Returns statistics about the unspent transaction output set.

https://bitcoin.org/en/developer-reference#gettxoutsetinfo

Returns statistics about the unspent transaction output set.

https://bitcoin.org/en/developer-reference#gettxoutsetinfo
sourceraw docstring

get-unconfirmed-balanceclj

(get-unconfirmed-balance client)

Returns the server's total unconfirmed balance.

https://bitcoin.org/en/developer-reference#getunconfirmedbalance

Returns the server's total unconfirmed balance.

https://bitcoin.org/en/developer-reference#getunconfirmedbalance
sourceraw docstring

get-wallet-infoclj

(get-wallet-info client)

Returns an object containing various wallet state info.

https://bitcoin.org/en/developer-reference#getwalletinfo

Returns an object containing various wallet state info.

https://bitcoin.org/en/developer-reference#getwalletinfo
sourceraw docstring

helpclj

(help client {:as params :keys [command]})

List all commands, or get help for a specified command.

NameTypePresenceDescription
commandstringOptional<br>Default=all commandsThe command to get help on

https://bitcoin.org/en/developer-reference#help

List all commands, or get help for a specified command.

| Name    | Type   | Presence                         | Description                |
| ------- | ------ | -------------------------------- | -------------------------- |
| command | string | Optional<br>Default=all commands | The command to get help on |

https://bitcoin.org/en/developer-reference#help
sourceraw docstring

import-addressclj

(import-address client {:as params :keys [address label rescan p2sh]})

Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The Bitcoin address (or hex-encoded script)
labelstringOptional<br>Default=""An optional label
rescanbooleanOptional<br>Default=trueRescan the wallet for transactions
p2shbooleanOptional<br>Default=falseAdd the P2SH version of the script as well

https://bitcoin.org/en/developer-reference#importaddress

Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.

| Name    | Type    | Presence                  | Description                                 |
| ------- | ------- | ------------------------- | ------------------------------------------- |
| address | string  | Required<br>(exactly 1)   | The Bitcoin address (or hex-encoded script) |
| label   | string  | Optional<br>Default=""    | An optional label                           |
| rescan  | boolean | Optional<br>Default=true  | Rescan the wallet for transactions          |
| p2sh    | boolean | Optional<br>Default=false | Add the P2SH version of the script as well  |

https://bitcoin.org/en/developer-reference#importaddress
sourceraw docstring

import-multiclj

(import-multi client {:as params :keys [requests options]})

Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts.

NameTypePresenceDescription
requestsjson arrayRequired<br>(exactly 1)Data to be imported "range": n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import "internal": bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) "watchonly": bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. "label": "str", (string, optional, default='') Label to assign to the address, only allowed with internal=false "keypool": bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled }, ... ]
optionsjson objectOptional

https://bitcoin.org/en/developer-reference#importmulti

Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts.

| Name     | Type        | Presence                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------- | ----------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| requests | json array  | Required<br>(exactly 1) | Data to be imported "range": n or [n,n],                                       (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import "internal": bool,                                          (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) "watchonly": bool,                                         (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. "label": "str",                                            (string, optional, default='') Label to assign to the address, only allowed with internal=false "keypool": bool,                                           (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled }, ... ] |
| options  | json object | Optional                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

https://bitcoin.org/en/developer-reference#importmulti
sourceraw docstring

import-priv-keyclj

(import-priv-key client {:as params :keys [privkey label rescan]})

Adds a private key (as returned by dumpprivkey) to your wallet.

NameTypePresenceDescription
privkeystringRequired<br>(exactly 1)The private key (see dumpprivkey)
labelstringOptionalAn optional label
rescanbooleanOptional<br>Default=trueRescan the wallet for transactions

https://bitcoin.org/en/developer-reference#importprivkey

Adds a private key (as returned by dumpprivkey) to your wallet.

| Name    | Type    | Presence                 | Description                        |
| ------- | ------- | ------------------------ | ---------------------------------- |
| privkey | string  | Required<br>(exactly 1)  | The private key (see dumpprivkey)  |
| label   | string  | Optional                 | An optional label                  |
| rescan  | boolean | Optional<br>Default=true | Rescan the wallet for transactions |

https://bitcoin.org/en/developer-reference#importprivkey
sourceraw docstring

import-pruned-fundsclj

(import-pruned-funds client {:as params :keys [rawtransaction txoutproof]})

Imports funds without rescan.

NameTypePresenceDescription
rawtransactionstringRequired<br>(exactly 1)A raw transaction in hex funding an already-existing address in wallet
txoutproofstringRequired<br>(exactly 1)The hex output from gettxoutproof that contains the transaction

https://bitcoin.org/en/developer-reference#importprunedfunds

Imports funds without rescan.

| Name           | Type   | Presence                | Description                                                            |
| -------------- | ------ | ----------------------- | ---------------------------------------------------------------------- |
| rawtransaction | string | Required<br>(exactly 1) | A raw transaction in hex funding an already-existing address in wallet |
| txoutproof     | string | Required<br>(exactly 1) | The hex output from gettxoutproof that contains the transaction        |

https://bitcoin.org/en/developer-reference#importprunedfunds
sourceraw docstring

import-pub-keyclj

(import-pub-key client {:as params :keys [pubkey label rescan]})

Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.

NameTypePresenceDescription
pubkeystringRequired<br>(exactly 1)The hex-encoded public key
labelstringOptional<br>Default=""An optional label
rescanbooleanOptional<br>Default=trueRescan the wallet for transactions

https://bitcoin.org/en/developer-reference#importpubkey

Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.

| Name   | Type    | Presence                 | Description                        |
| ------ | ------- | ------------------------ | ---------------------------------- |
| pubkey | string  | Required<br>(exactly 1)  | The hex-encoded public key         |
| label  | string  | Optional<br>Default=""   | An optional label                  |
| rescan | boolean | Optional<br>Default=true | Rescan the wallet for transactions |

https://bitcoin.org/en/developer-reference#importpubkey
sourceraw docstring

import-walletclj

(import-wallet client {:as params :keys [filename]})

Imports keys from a wallet dump file (see dumpwallet).

NameTypePresenceDescription
filenamestringRequired<br>(exactly 1)The wallet file

https://bitcoin.org/en/developer-reference#importwallet

Imports keys from a wallet dump file (see dumpwallet).

| Name     | Type   | Presence                | Description     |
| -------- | ------ | ----------------------- | --------------- |
| filename | string | Required<br>(exactly 1) | The wallet file |

https://bitcoin.org/en/developer-reference#importwallet
sourceraw docstring

join-psbtsclj

(join-psbts client {:as params :keys [txs]})

Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.

NameTypePresenceDescription
txsjson arrayRequired<br>(exactly 1)A json array of base64 strings of partially signed transactions

https://bitcoin.org/en/developer-reference#joinpsbts

Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.

| Name | Type       | Presence                | Description                                                     |
| ---- | ---------- | ----------------------- | --------------------------------------------------------------- |
| txs  | json array | Required<br>(exactly 1) | A json array of base64 strings of partially signed transactions |

https://bitcoin.org/en/developer-reference#joinpsbts
sourceraw docstring

key-pool-refillclj

(key-pool-refill client {:as params :keys [newsize]})

Fills the keypool.

NameTypePresenceDescription
newsizenumber (int)Optional<br>Default=100The new keypool size

https://bitcoin.org/en/developer-reference#keypoolrefill

Fills the keypool.

| Name    | Type         | Presence                | Description          |
| ------- | ------------ | ----------------------- | -------------------- |
| newsize | number (int) | Optional<br>Default=100 | The new keypool size |

https://bitcoin.org/en/developer-reference#keypoolrefill
sourceraw docstring

list-address-groupingsclj

(list-address-groupings client)

Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.

https://bitcoin.org/en/developer-reference#listaddressgroupings

Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.

https://bitcoin.org/en/developer-reference#listaddressgroupings
sourceraw docstring

list-bannedclj

(list-banned client)
List all banned IPs/Subnets.

https://bitcoin.org/en/developer-reference#listbanned
sourceraw docstring

list-labelsclj

(list-labels client {:as params :keys [purpose]})

Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

NameTypePresenceDescription
purposestringOptionalAddress purpose to list labels for ('send','receive'). An empty string is the same as not providing this argument.

https://bitcoin.org/en/developer-reference#listlabels

Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

| Name    | Type   | Presence | Description                                                                                                        |
| ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
| purpose | string | Optional | Address purpose to list labels for ('send','receive'). An empty string is the same as not providing this argument. |

https://bitcoin.org/en/developer-reference#listlabels
sourceraw docstring

list-lock-unspentclj

(list-lock-unspent client)

Returns list of temporarily unspendable outputs.

https://bitcoin.org/en/developer-reference#listlockunspent

Returns list of temporarily unspendable outputs.

https://bitcoin.org/en/developer-reference#listlockunspent
sourceraw docstring

list-received-by-addressclj

(list-received-by-address
  client
  {:as params :keys [minconf include_empty include_watchonly address_filter]})

List balances by receiving address.

NameTypePresenceDescription
minconfnumber (int)Optional<br>Default=1The minimum number of confirmations before payments are included.
include_emptybooleanOptional<br>Default=falseWhether to include addresses that haven't received any payments.
include_watchonlybooleanOptional<br>Default=falseWhether to include watch-only addresses (see 'importaddress').
address_filterstringOptionalIf present, only return information on this address.

https://bitcoin.org/en/developer-reference#listreceivedbyaddress

List balances by receiving address.

| Name              | Type         | Presence                  | Description                                                       |
| ----------------- | ------------ | ------------------------- | ----------------------------------------------------------------- |
| minconf           | number (int) | Optional<br>Default=1     | The minimum number of confirmations before payments are included. |
| include_empty     | boolean      | Optional<br>Default=false | Whether to include addresses that haven't received any payments.  |
| include_watchonly | boolean      | Optional<br>Default=false | Whether to include watch-only addresses (see 'importaddress').    |
| address_filter    | string       | Optional                  | If present, only return information on this address.              |

https://bitcoin.org/en/developer-reference#listreceivedbyaddress
sourceraw docstring

list-received-by-labelclj

(list-received-by-label client
                        {:as params
                         :keys [minconf include_empty include_watchonly]})

List received transactions by label.

NameTypePresenceDescription
minconfnumber (int)Optional<br>Default=1The minimum number of confirmations before payments are included.
include_emptybooleanOptional<br>Default=falseWhether to include labels that haven't received any payments.
include_watchonlybooleanOptional<br>Default=falseWhether to include watch-only addresses (see 'importaddress').

https://bitcoin.org/en/developer-reference#listreceivedbylabel

List received transactions by label.

| Name              | Type         | Presence                  | Description                                                       |
| ----------------- | ------------ | ------------------------- | ----------------------------------------------------------------- |
| minconf           | number (int) | Optional<br>Default=1     | The minimum number of confirmations before payments are included. |
| include_empty     | boolean      | Optional<br>Default=false | Whether to include labels that haven't received any payments.     |
| include_watchonly | boolean      | Optional<br>Default=false | Whether to include watch-only addresses (see 'importaddress').    |

https://bitcoin.org/en/developer-reference#listreceivedbylabel
sourceraw docstring

list-since-blockclj

(list-since-block client
                  {:as params
                   :keys [blockhash target_confirmations include_watchonly
                          include_removed]})

Get all transactions in blocks since block [blockhash], or all transactions if omitted.

NameTypePresenceDescription
blockhashstringOptionalIf set, the block hash to list transactions since, otherwise list all transactions.
target_confirmationsnumber (int)Optional<br>Default=1Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value
include_watchonlybooleanOptional<br>Default=falseInclude transactions to watch-only addresses (see 'importaddress')
include_removedbooleanOptional<br>Default=trueShow transactions that were removed due to a reorg in the "removed" array (not guaranteed to work on pruned nodes)

https://bitcoin.org/en/developer-reference#listsinceblock

Get all transactions in blocks since block [blockhash], or all transactions if omitted.

| Name                 | Type         | Presence                  | Description                                                                                                                                                                |
| -------------------- | ------------ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| blockhash            | string       | Optional                  | If set, the block hash to list transactions since, otherwise list all transactions.                                                                                        |
| target_confirmations | number (int) | Optional<br>Default=1     | Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value |
| include_watchonly    | boolean      | Optional<br>Default=false | Include transactions to watch-only addresses (see 'importaddress')                                                                                                         |
| include_removed      | boolean      | Optional<br>Default=true  | Show transactions that were removed due to a reorg in the "removed" array (not guaranteed to work on pruned nodes)                                                         |

https://bitcoin.org/en/developer-reference#listsinceblock
sourceraw docstring

list-transactionsclj

(list-transactions client
                   {:as params :keys [label count skip include_watchonly]})

If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

NameTypePresenceDescription
labelstringOptionalIf set, should be a valid label name to return only incoming transactions with the specified label, or "*" to disable filtering and return all transactions.
countnumber (int)Optional<br>Default=10The number of transactions to return
skipnumber (int)Optional<br>Default=0The number of transactions to skip
include_watchonlybooleanOptional<br>Default=falseInclude transactions to watch-only addresses (see 'importaddress')

https://bitcoin.org/en/developer-reference#listtransactions

If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

| Name              | Type         | Presence                  | Description                                                                                                                                                  |
| ----------------- | ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| label             | string       | Optional                  | If set, should be a valid label name to return only incoming transactions with the specified label, or "*" to disable filtering and return all transactions. |
| count             | number (int) | Optional<br>Default=10    | The number of transactions to return                                                                                                                         |
| skip              | number (int) | Optional<br>Default=0     | The number of transactions to skip                                                                                                                           |
| include_watchonly | boolean      | Optional<br>Default=false | Include transactions to watch-only addresses (see 'importaddress')                                                                                           |

https://bitcoin.org/en/developer-reference#listtransactions
sourceraw docstring

list-unspentclj

(list-unspent client
              {:as params
               :keys [minconf maxconf addresses include_unsafe query_options]})

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.

NameTypePresenceDescription
minconfnumber (int)Optional<br>Default=1The minimum confirmations to filter
maxconfnumber (int)Optional<br>Default=9999999The maximum confirmations to filter
addressesjson arrayOptional<br>Default=empty arrayA json array of bitcoin addresses to filter
include_unsafebooleanOptional<br>Default=trueInclude outputs that are not safe to spend See description of "safe" attribute below.
query_optionsjson objectOptionalJSON with query options

https://bitcoin.org/en/developer-reference#listunspent

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.

| Name           | Type         | Presence                        | Description                                                                           |
| -------------- | ------------ | ------------------------------- | ------------------------------------------------------------------------------------- |
| minconf        | number (int) | Optional<br>Default=1           | The minimum confirmations to filter                                                   |
| maxconf        | number (int) | Optional<br>Default=9999999     | The maximum confirmations to filter                                                   |
| addresses      | json array   | Optional<br>Default=empty array | A json array of bitcoin addresses to filter                                           |
| include_unsafe | boolean      | Optional<br>Default=true        | Include outputs that are not safe to spend See description of "safe" attribute below. |
| query_options  | json object  | Optional                        | JSON with query options                                                               |

https://bitcoin.org/en/developer-reference#listunspent
sourceraw docstring

list-wallet-dirclj

(list-wallet-dir client)

Returns a list of wallets in the wallet directory.

https://bitcoin.org/en/developer-reference#listwalletdir

Returns a list of wallets in the wallet directory.

https://bitcoin.org/en/developer-reference#listwalletdir
sourceraw docstring

list-walletsclj

(list-wallets client)

Returns a list of currently loaded wallets.

https://bitcoin.org/en/developer-reference#listwallets

Returns a list of currently loaded wallets.

https://bitcoin.org/en/developer-reference#listwallets
sourceraw docstring

load-walletclj

(load-wallet client {:as params :keys [filename]})

Loads a wallet from a wallet file or directory.

NameTypePresenceDescription
filenamestringRequired<br>(exactly 1)The wallet directory or .dat file.

https://bitcoin.org/en/developer-reference#loadwallet

Loads a wallet from a wallet file or directory.

| Name     | Type   | Presence                | Description                        |
| -------- | ------ | ----------------------- | ---------------------------------- |
| filename | string | Required<br>(exactly 1) | The wallet directory or .dat file. |

https://bitcoin.org/en/developer-reference#loadwallet
sourceraw docstring

lock-unspentclj

(lock-unspent client {:as params :keys [unlock transactions]})

Updates list of temporarily unspendable outputs.

NameTypePresenceDescription
unlockbooleanRequired<br>(exactly 1)Whether to unlock (true) or lock (false) the specified transactions
transactionsjson arrayOptional<br>Default=empty arrayA json array of objects. Each object the txid (string) vout (numeric).

https://bitcoin.org/en/developer-reference#lockunspent

Updates list of temporarily unspendable outputs.

| Name         | Type       | Presence                        | Description                                                            |
| ------------ | ---------- | ------------------------------- | ---------------------------------------------------------------------- |
| unlock       | boolean    | Required<br>(exactly 1)         | Whether to unlock (true) or lock (false) the specified transactions    |
| transactions | json array | Optional<br>Default=empty array | A json array of objects. Each object the txid (string) vout (numeric). |

https://bitcoin.org/en/developer-reference#lockunspent
sourceraw docstring

loggingclj

(logging client {:as params :keys [include exclude]})

Gets and sets the logging configuration.

NameTypePresenceDescription
includejson arrayOptionalA json array of categories to add debug logging
excludejson arrayOptionalA json array of categories to remove debug logging

https://bitcoin.org/en/developer-reference#logging

Gets and sets the logging configuration.

| Name    | Type       | Presence | Description                                        |
| ------- | ---------- | -------- | -------------------------------------------------- |
| include | json array | Optional | A json array of categories to add debug logging    |
| exclude | json array | Optional | A json array of categories to remove debug logging |

https://bitcoin.org/en/developer-reference#logging
sourceraw docstring

pingclj

(ping client)

Requests that a ping be sent to all other nodes, to measure ping time.

https://bitcoin.org/en/developer-reference#ping

Requests that a ping be sent to all other nodes, to measure ping time.

https://bitcoin.org/en/developer-reference#ping
sourceraw docstring

precious-blockclj

(precious-block client {:as params :keys [blockhash]})

Treats a block as if it were received before others with the same work.

NameTypePresenceDescription
blockhashstringRequired<br>(exactly 1)the hash of the block to mark as precious

https://bitcoin.org/en/developer-reference#preciousblock

Treats a block as if it were received before others with the same work.

| Name      | Type   | Presence                | Description                               |
| --------- | ------ | ----------------------- | ----------------------------------------- |
| blockhash | string | Required<br>(exactly 1) | the hash of the block to mark as precious |

https://bitcoin.org/en/developer-reference#preciousblock
sourceraw docstring

prioritise-transactionclj

(prioritise-transaction client {:as params :keys [txid dummy fee_delta]})

Accepts the transaction into mined blocks at a higher (or lower) priority.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The transaction id.
dummynumber (int)OptionalAPI-Compatibility for previous API. Must be zero or null. DEPRECATED. For forward compatibility use named arguments and omit this parameter.
fee_deltanumber (int)Required<br>(exactly 1)The fee value (in satoshis) to add (or subtract, if negative). Note, that this value is not a fee rate. It is a value to modify absolute fee of the TX. The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee.

https://bitcoin.org/en/developer-reference#prioritisetransaction

Accepts the transaction into mined blocks at a higher (or lower) priority.

| Name      | Type         | Presence                | Description                                                                                                                                                                                                                                                                                                               |
| --------- | ------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| txid      | string       | Required<br>(exactly 1) | The transaction id.                                                                                                                                                                                                                                                                                                       |
| dummy     | number (int) | Optional                | API-Compatibility for previous API. Must be zero or null. DEPRECATED. For forward compatibility use named arguments and omit this parameter.                                                                                                                                                                              |
| fee_delta | number (int) | Required<br>(exactly 1) | The fee value (in satoshis) to add (or subtract, if negative). Note, that this value is not a fee rate. It is a value to modify absolute fee of the TX. The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee. |

https://bitcoin.org/en/developer-reference#prioritisetransaction
sourceraw docstring

prune-block-chainclj

(prune-block-chain client {:as params :keys [height]})

Does PruneBlockChain.

NameTypePresenceDescription
heightnumber (int)Required<br>(exactly 1)The block height to prune up to. May be set to a discrete height, or a unix timestamp to prune blocks whose block time is at least 2 hours older than the provided timestamp.

https://bitcoin.org/en/developer-reference#pruneblockchain

Does PruneBlockChain.

| Name   | Type         | Presence                | Description                                                                                                                                                                   |
| ------ | ------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| height | number (int) | Required<br>(exactly 1) | The block height to prune up to. May be set to a discrete height, or a unix timestamp to prune blocks whose block time is at least 2 hours older than the provided timestamp. |

https://bitcoin.org/en/developer-reference#pruneblockchain
sourceraw docstring

remove-pruned-fundsclj

(remove-pruned-funds client {:as params :keys [txid]})

Deletes the specified transaction from the wallet.

NameTypePresenceDescription
txidstringRequired<br>(exactly 1)The hex-encoded id of the transaction you are deleting

https://bitcoin.org/en/developer-reference#removeprunedfunds

Deletes the specified transaction from the wallet.

| Name | Type   | Presence                | Description                                            |
| ---- | ------ | ----------------------- | ------------------------------------------------------ |
| txid | string | Required<br>(exactly 1) | The hex-encoded id of the transaction you are deleting |

https://bitcoin.org/en/developer-reference#removeprunedfunds
sourceraw docstring

rescan-block-chainclj

(rescan-block-chain client {:as params :keys [start_height stop_height]})

Rescan the local blockchain for wallet related transactions.

NameTypePresenceDescription
start_heightnumber (int)Optional<br>Default=0block height where the rescan should start
stop_heightnumber (int)Optionalthe last block height that should be scanned. If none is provided it will rescan up to the tip at return time of this call.

https://bitcoin.org/en/developer-reference#rescanblockchain

Rescan the local blockchain for wallet related transactions.

| Name         | Type         | Presence              | Description                                                                                                                 |
| ------------ | ------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| start_height | number (int) | Optional<br>Default=0 | block height where the rescan should start                                                                                  |
| stop_height  | number (int) | Optional              | the last block height that should be scanned. If none is provided it will rescan up to the tip at return time of this call. |

https://bitcoin.org/en/developer-reference#rescanblockchain
sourceraw docstring

save-mem-poolclj

(save-mem-pool client)
Dumps the mempool to disk.

https://bitcoin.org/en/developer-reference#savemempool
sourceraw docstring

scan-tx-out-setclj

(scan-tx-out-set client {:as params :keys [action scanobjects]})

EXPERIMENTAL warning: this call may be removed or changed in future releases.

NameTypePresenceDescription
actionstringRequired<br>(exactly 1)The action to execute "start" for starting a scan "abort" for aborting the current scan (returns true when abort was successful) "status" for progress report (in %) of the current scan
scanobjectsjson arrayRequired<br>(exactly 1)Array of scan objects Every scan object is either a string descriptor or an object:

https://bitcoin.org/en/developer-reference#scantxoutset

EXPERIMENTAL warning: this call may be removed or changed in future releases.

| Name        | Type       | Presence                | Description                                                                                                                                                                              |
| ----------- | ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| action      | string     | Required<br>(exactly 1) | The action to execute "start" for starting a scan "abort" for aborting the current scan (returns true when abort was successful) "status" for progress report (in %) of the current scan |
| scanobjects | json array | Required<br>(exactly 1) | Array of scan objects Every scan object is either a string descriptor or an object:                                                                                                      |

https://bitcoin.org/en/developer-reference#scantxoutset
sourceraw docstring

send-manyclj

(send-many client
           {:as params
            :keys [dummy amounts minconf comment subtractfeefrom replaceable
                   conf_target estimate_mode]})

Send multiple times.

NameTypePresenceDescription
dummystringRequired<br>(exactly 1)Must be set to "" for backwards compatibility.
amountsjson objectRequired<br>(exactly 1)A json object with addresses and amounts
minconfnumber (int)Optional<br>Default=1Only use the balance confirmed at least this many times.
commentstringOptionalA comment
subtractfeefromjson arrayOptionalA json array with addresses. The fee will be equally deducted from the amount of each selected address. Those recipients will receive less bitcoins than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee.
replaceablebooleanOptional<br>Default=fallback to wallet's defaultAllow this transaction to be replaced by a transaction with higher fees via BIP 125
conf_targetnumber (int)Optional<br>Default=fallback to wallet's defaultConfirmation target (in blocks)
estimate_modestringOptional<br>Default=UNSETThe fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE"

https://bitcoin.org/en/developer-reference#sendmany

Send multiple times.

| Name            | Type         | Presence                                         | Description                                                                                                                                                                                                                                                          |
| --------------- | ------------ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dummy           | string       | Required<br>(exactly 1)                          | Must be set to "" for backwards compatibility.                                                                                                                                                                                                                       |
| amounts         | json object  | Required<br>(exactly 1)                          | A json object with addresses and amounts                                                                                                                                                                                                                             |
| minconf         | number (int) | Optional<br>Default=1                            | Only use the balance confirmed at least this many times.                                                                                                                                                                                                             |
| comment         | string       | Optional                                         | A comment                                                                                                                                                                                                                                                            |
| subtractfeefrom | json array   | Optional                                         | A json array with addresses. The fee will be equally deducted from the amount of each selected address. Those recipients will receive less bitcoins than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee. |
| replaceable     | boolean      | Optional<br>Default=fallback to wallet's default | Allow this transaction to be replaced by a transaction with higher fees via BIP 125                                                                                                                                                                                  |
| conf_target     | number (int) | Optional<br>Default=fallback to wallet's default | Confirmation target (in blocks)                                                                                                                                                                                                                                      |
| estimate_mode   | string       | Optional<br>Default=UNSET                        | The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE"                                                                                                                                                                                           |

https://bitcoin.org/en/developer-reference#sendmany
sourceraw docstring

send-raw-transactionclj

(send-raw-transaction client {:as params :keys [hexstring allowhighfees]})

Submits raw transaction (serialized, hex-encoded) to local node and network.

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The hex string of the raw transaction
allowhighfeesbooleanOptional<br>Default=falseAllow high fees

https://bitcoin.org/en/developer-reference#sendrawtransaction

Submits raw transaction (serialized, hex-encoded) to local node and network.

| Name          | Type    | Presence                  | Description                           |
| ------------- | ------- | ------------------------- | ------------------------------------- |
| hexstring     | string  | Required<br>(exactly 1)   | The hex string of the raw transaction |
| allowhighfees | boolean | Optional<br>Default=false | Allow high fees                       |

https://bitcoin.org/en/developer-reference#sendrawtransaction
sourceraw docstring

send-to-addressclj

(send-to-address client
                 {:as params
                  :keys [address amount comment comment_to subtractfeefromamount
                         replaceable conf_target estimate_mode]})

Send an amount to a given address.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to send to.
amountnumeric or stringRequired<br>(exactly 1)The amount in BTC to send. eg 0.1
commentstringOptionalA comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.
comment_tostringOptionalA comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet.
subtractfeefromamountbooleanOptional<br>Default=falseThe fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field.
replaceablebooleanOptional<br>Default=fallback to wallet's defaultAllow this transaction to be replaced by a transaction with higher fees via BIP 125
conf_targetnumber (int)Optional<br>Default=fallback to wallet's defaultConfirmation target (in blocks)
estimate_modestringOptional<br>Default=UNSETThe fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE"

https://bitcoin.org/en/developer-reference#sendtoaddress

Send an amount to a given address.

| Name                  | Type              | Presence                                         | Description                                                                                                                                                       |
| --------------------- | ----------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address               | string            | Required<br>(exactly 1)                          | The bitcoin address to send to.                                                                                                                                   |
| amount                | numeric or string | Required<br>(exactly 1)                          | The amount in BTC to send. eg 0.1                                                                                                                                 |
| comment               | string            | Optional                                         | A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.                                               |
| comment_to            | string            | Optional                                         | A comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet. |
| subtractfeefromamount | boolean           | Optional<br>Default=false                        | The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field.                                 |
| replaceable           | boolean           | Optional<br>Default=fallback to wallet's default | Allow this transaction to be replaced by a transaction with higher fees via BIP 125                                                                               |
| conf_target           | number (int)      | Optional<br>Default=fallback to wallet's default | Confirmation target (in blocks)                                                                                                                                   |
| estimate_mode         | string            | Optional<br>Default=UNSET                        | The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE"                                                                                        |

https://bitcoin.org/en/developer-reference#sendtoaddress
sourceraw docstring

set-banclj

(set-ban client {:as params :keys [subnet command bantime absolute]})

Attempts to add or remove an IP/Subnet from the banned list.

NameTypePresenceDescription
subnetstringRequired<br>(exactly 1)The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)
commandstringRequired<br>(exactly 1)'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list
bantimenumber (int)Optional<br>Default=0time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
absolutebooleanOptional<br>Default=falseIf set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)

https://bitcoin.org/en/developer-reference#setban

Attempts to add or remove an IP/Subnet from the banned list.

| Name     | Type         | Presence                  | Description                                                                                                                                                                                    |
| -------- | ------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| subnet   | string       | Required<br>(exactly 1)   | The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)                                                                                             |
| command  | string       | Required<br>(exactly 1)   | 'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list                                                                                                           |
| bantime  | number (int) | Optional<br>Default=0     | time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument) |
| absolute | boolean      | Optional<br>Default=false | If set, the bantime must be an absolute timestamp in seconds since epoch (Jan 1 1970 GMT)                                                                                                      |

https://bitcoin.org/en/developer-reference#setban
sourceraw docstring

set-hd-seedclj

(set-hd-seed client {:as params :keys [newkeypool seed]})

Set or generate a new HD wallet seed.

NameTypePresenceDescription
newkeypoolbooleanOptional<br>Default=trueWhether to flush old unused addresses, including change addresses, from the keypool and regenerate it. If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing keypool will be used until it has been depleted.
seedstringOptional<br>Default=random seedThe WIF private key to use as the new HD seed. The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1

https://bitcoin.org/en/developer-reference#sethdseed

Set or generate a new HD wallet seed.

| Name       | Type    | Presence                        | Description                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------- | ------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| newkeypool | boolean | Optional<br>Default=true        | Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it. If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed. If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing keypool will be used until it has been depleted. |
| seed       | string  | Optional<br>Default=random seed | The WIF private key to use as the new HD seed. The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1                                                                                                                                                                                                                                               |

https://bitcoin.org/en/developer-reference#sethdseed
sourceraw docstring

set-labelclj

(set-label client {:as params :keys [address label]})

Sets the label associated with the given address.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to be associated with a label.
labelstringRequired<br>(exactly 1)The label to assign to the address.

https://bitcoin.org/en/developer-reference#setlabel

Sets the label associated with the given address.

| Name    | Type   | Presence                | Description                                        |
| ------- | ------ | ----------------------- | -------------------------------------------------- |
| address | string | Required<br>(exactly 1) | The bitcoin address to be associated with a label. |
| label   | string | Required<br>(exactly 1) | The label to assign to the address.                |

https://bitcoin.org/en/developer-reference#setlabel
sourceraw docstring

set-network-activeclj

(set-network-active client {:as params :keys [state]})

Disable/enable all p2p network activity.

NameTypePresenceDescription
statebooleanRequired<br>(exactly 1)true to enable networking, false to disable

https://bitcoin.org/en/developer-reference#setnetworkactive

Disable/enable all p2p network activity.

| Name  | Type    | Presence                | Description                                 |
| ----- | ------- | ----------------------- | ------------------------------------------- |
| state | boolean | Required<br>(exactly 1) | true to enable networking, false to disable |

https://bitcoin.org/en/developer-reference#setnetworkactive
sourceraw docstring

set-tx-feeclj

(set-tx-fee client {:as params :keys [amount]})

Set the transaction fee per kB for this wallet.

NameTypePresenceDescription
amountnumeric or stringRequired<br>(exactly 1)The transaction fee in BTC/kB

https://bitcoin.org/en/developer-reference#settxfee

Set the transaction fee per kB for this wallet.

| Name   | Type              | Presence                | Description                   |
| ------ | ----------------- | ----------------------- | ----------------------------- |
| amount | numeric or string | Required<br>(exactly 1) | The transaction fee in BTC/kB |

https://bitcoin.org/en/developer-reference#settxfee
sourceraw docstring

sign-messageclj

(sign-message client {:as params :keys [address message]})

Sign a message with the private key of an address.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to use for the private key.
messagestringRequired<br>(exactly 1)The message to create a signature of.

https://bitcoin.org/en/developer-reference#signmessage

Sign a message with the private key of an address.

| Name    | Type   | Presence                | Description                                     |
| ------- | ------ | ----------------------- | ----------------------------------------------- |
| address | string | Required<br>(exactly 1) | The bitcoin address to use for the private key. |
| message | string | Required<br>(exactly 1) | The message to create a signature of.           |

https://bitcoin.org/en/developer-reference#signmessage
sourceraw docstring

sign-message-with-priv-keyclj

(sign-message-with-priv-key client {:as params :keys [privkey message]})

Sign a message with the private key of an address.

NameTypePresenceDescription
privkeystringRequired<br>(exactly 1)The private key to sign the message with.
messagestringRequired<br>(exactly 1)The message to create a signature of.

https://bitcoin.org/en/developer-reference#signmessagewithprivkey

Sign a message with the private key of an address.

| Name    | Type   | Presence                | Description                               |
| ------- | ------ | ----------------------- | ----------------------------------------- |
| privkey | string | Required<br>(exactly 1) | The private key to sign the message with. |
| message | string | Required<br>(exactly 1) | The message to create a signature of.     |

https://bitcoin.org/en/developer-reference#signmessagewithprivkey
sourceraw docstring

sign-raw-transaction-with-keyclj

(sign-raw-transaction-with-key client
                               {:as params
                                :keys [hexstring privkeys prevtxs sighashtype]})

Sign inputs for raw transaction (serialized, hex-encoded).

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The transaction hex string
privkeysjson arrayRequired<br>(exactly 1)A json array of base58-encoded private keys for signing
prevtxsjson arrayOptionalA json array of previous dependent transaction outputs
sighashtypestringOptional<br>Default=ALLThe signature hash type. Must be one of: "ALL" "NONE" "SINGLE" "ALL

https://bitcoin.org/en/developer-reference#signrawtransactionwithkey

Sign inputs for raw transaction (serialized, hex-encoded).

| Name        | Type       | Presence                | Description                                                                                                                  |
| ----------- | ---------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| hexstring   | string     | Required<br>(exactly 1) | The transaction hex string                                                                                                   |
| privkeys    | json array | Required<br>(exactly 1) | A json array of base58-encoded private keys for signing                                                                      |
| prevtxs     | json array | Optional                | A json array of previous dependent transaction outputs                                                                       |
| sighashtype | string     | Optional<br>Default=ALL | The signature hash type. Must be one of: "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY"  |

https://bitcoin.org/en/developer-reference#signrawtransactionwithkey
sourceraw docstring

sign-raw-transaction-with-walletclj

(sign-raw-transaction-with-wallet client
                                  {:as params
                                   :keys [hexstring prevtxs sighashtype]})

Sign inputs for raw transaction (serialized, hex-encoded).

NameTypePresenceDescription
hexstringstringRequired<br>(exactly 1)The transaction hex string
prevtxsjson arrayOptionalA json array of previous dependent transaction outputs
sighashtypestringOptional<br>Default=ALLThe signature hash type. Must be one of "ALL" "NONE" "SINGLE" "ALL

https://bitcoin.org/en/developer-reference#signrawtransactionwithwallet

Sign inputs for raw transaction (serialized, hex-encoded).

| Name        | Type       | Presence                | Description                                                                                                                |
| ----------- | ---------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| hexstring   | string     | Required<br>(exactly 1) | The transaction hex string                                                                                                 |
| prevtxs     | json array | Optional                | A json array of previous dependent transaction outputs                                                                     |
| sighashtype | string     | Optional<br>Default=ALL | The signature hash type. Must be one of "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY" |

https://bitcoin.org/en/developer-reference#signrawtransactionwithwallet
sourceraw docstring

stopclj

(stop client)
Stop Bitcoin server.

https://bitcoin.org/en/developer-reference#stop
sourceraw docstring

submit-blockclj

(submit-block client {:as params :keys [hexdata dummy]})

Attempts to submit new block to network.

NameTypePresenceDescription
hexdatastringRequired<br>(exactly 1)the hex-encoded block data to submit
dummystringOptional<br>Default=ignoreddummy value, for compatibility with BIP22. This value is ignored.

https://bitcoin.org/en/developer-reference#submitblock

Attempts to submit new block to network.

| Name    | Type   | Presence                    | Description                                                       |
| ------- | ------ | --------------------------- | ----------------------------------------------------------------- |
| hexdata | string | Required<br>(exactly 1)     | the hex-encoded block data to submit                              |
| dummy   | string | Optional<br>Default=ignored | dummy value, for compatibility with BIP22. This value is ignored. |

https://bitcoin.org/en/developer-reference#submitblock
sourceraw docstring

submit-headerclj

(submit-header client {:as params :keys [hexdata]})

Decode the given hexdata as a header and submit it as a candidate chain tip if valid.

NameTypePresenceDescription
hexdatastringRequired<br>(exactly 1)the hex-encoded block header data

https://bitcoin.org/en/developer-reference#submitheader

Decode the given hexdata as a header and submit it as a candidate chain tip if valid.

| Name    | Type   | Presence                | Description                       |
| ------- | ------ | ----------------------- | --------------------------------- |
| hexdata | string | Required<br>(exactly 1) | the hex-encoded block header data |

https://bitcoin.org/en/developer-reference#submitheader
sourceraw docstring

testmem-pool-acceptclj

(testmem-pool-accept client {:as params :keys [rawtxs allowhighfees]})

Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool.

NameTypePresenceDescription
rawtxsjson arrayRequired<br>(exactly 1)An array of hex strings of raw transactions. Length must be one for now.
allowhighfeesbooleanOptional<br>Default=falseAllow high fees

https://bitcoin.org/en/developer-reference#testmempoolaccept

Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool.

| Name          | Type       | Presence                  | Description                                                              |
| ------------- | ---------- | ------------------------- | ------------------------------------------------------------------------ |
| rawtxs        | json array | Required<br>(exactly 1)   | An array of hex strings of raw transactions. Length must be one for now. |
| allowhighfees | boolean    | Optional<br>Default=false | Allow high fees                                                          |

https://bitcoin.org/en/developer-reference#testmempoolaccept
sourceraw docstring

unload-walletclj

(unload-wallet client {:as params :keys [wallet_name]})

Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.

NameTypePresenceDescription
wallet_namestringOptional<br>Default=the wallet name from the RPC requestThe name of the wallet to unload.

https://bitcoin.org/en/developer-reference#unloadwallet

Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.

| Name        | Type   | Presence                                                 | Description                       |
| ----------- | ------ | -------------------------------------------------------- | --------------------------------- |
| wallet_name | string | Optional<br>Default=the wallet name from the RPC request | The name of the wallet to unload. |

https://bitcoin.org/en/developer-reference#unloadwallet
sourceraw docstring

uptimeclj

(uptime client)

Returns the total uptime of the server.

https://bitcoin.org/en/developer-reference#uptime

Returns the total uptime of the server.

https://bitcoin.org/en/developer-reference#uptime
sourceraw docstring

utxo-update-psbtclj

(utxo-update-psbt client {:as params :keys [psbt]})

Updates a PSBT with witness UTXOs retrieved from the UTXO set or the mempool.

NameTypePresenceDescription
psbtstringRequired<br>(exactly 1)A base64 string of a PSBT

https://bitcoin.org/en/developer-reference#utxoupdatepsbt

Updates a PSBT with witness UTXOs retrieved from the UTXO set or the mempool.

| Name | Type   | Presence                | Description               |
| ---- | ------ | ----------------------- | ------------------------- |
| psbt | string | Required<br>(exactly 1) | A base64 string of a PSBT |

https://bitcoin.org/en/developer-reference#utxoupdatepsbt
sourceraw docstring

validate-addressclj

(validate-address client {:as params :keys [address]})

Return information about the given bitcoin address.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to validate

https://bitcoin.org/en/developer-reference#validateaddress

Return information about the given bitcoin address.

| Name    | Type   | Presence                | Description                     |
| ------- | ------ | ----------------------- | ------------------------------- |
| address | string | Required<br>(exactly 1) | The bitcoin address to validate |

https://bitcoin.org/en/developer-reference#validateaddress
sourceraw docstring

verify-chainclj

(verify-chain client {:as params :keys [checklevel nblocks]})

Verifies blockchain database.

NameTypePresenceDescription
checklevelnumber (int)OptionalHow thorough the block verification is.
nblocksnumber (int)OptionalThe number of blocks to check.

https://bitcoin.org/en/developer-reference#verifychain

Verifies blockchain database.

| Name       | Type         | Presence | Description                             |
| ---------- | ------------ | -------- | --------------------------------------- |
| checklevel | number (int) | Optional | How thorough the block verification is. |
| nblocks    | number (int) | Optional | The number of blocks to check.          |

https://bitcoin.org/en/developer-reference#verifychain
sourceraw docstring

verify-messageclj

(verify-message client {:as params :keys [address signature message]})

Verify a signed message.

NameTypePresenceDescription
addressstringRequired<br>(exactly 1)The bitcoin address to use for the signature.
signaturestringRequired<br>(exactly 1)The signature provided by the signer in base 64 encoding (see signmessage).
messagestringRequired<br>(exactly 1)The message that was signed.

https://bitcoin.org/en/developer-reference#verifymessage

Verify a signed message.

| Name      | Type   | Presence                | Description                                                                 |
| --------- | ------ | ----------------------- | --------------------------------------------------------------------------- |
| address   | string | Required<br>(exactly 1) | The bitcoin address to use for the signature.                               |
| signature | string | Required<br>(exactly 1) | The signature provided by the signer in base 64 encoding (see signmessage). |
| message   | string | Required<br>(exactly 1) | The message that was signed.                                                |

https://bitcoin.org/en/developer-reference#verifymessage
sourceraw docstring

verify-tx-out-proofclj

(verify-tx-out-proof client {:as params :keys [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.

NameTypePresenceDescription
proofstringRequired<br>(exactly 1)The hex-encoded proof generated by gettxoutproof

https://bitcoin.org/en/developer-reference#verifytxoutproof

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.

| Name  | Type   | Presence                | Description                                      |
| ----- | ------ | ----------------------- | ------------------------------------------------ |
| proof | string | Required<br>(exactly 1) | The hex-encoded proof generated by gettxoutproof |

https://bitcoin.org/en/developer-reference#verifytxoutproof
sourceraw docstring

wallet-createfunded-psbtclj

(wallet-createfunded-psbt client
                          {:as params
                           :keys [inputs outputs locktime options bip32derivs]})

Creates and funds a transaction in the Partially Signed Transaction format.

NameTypePresenceDescription
inputsjson arrayRequired<br>(exactly 1)A json array of json objects
outputsjson arrayRequired<br>(exactly 1)a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.
locktimenumber (int)Optional<br>Default=0Raw locktime. Non-0 value also locktime-activates inputs
optionsjson objectOptional"replaceable": bool, (boolean, optional, default=false) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees "conf_target": n, (numeric, optional, default=Fallback to wallet's confirmation target) Confirmation target (in blocks) "estimate_mode": "str", (string, optional, default=UNSET) The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE" }
bip32derivsbooleanOptional<br>Default=falseIf true, includes the BIP 32 derivation paths for public keys if we know them

https://bitcoin.org/en/developer-reference#walletcreatefundedpsbt

Creates and funds a transaction in the Partially Signed Transaction format.

| Name        | Type         | Presence                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------- | ------------ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| inputs      | json array   | Required<br>(exactly 1)   | A json array of json objects                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| outputs     | json array   | Required<br>(exactly 1)   | a json array with outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.                                                                                                                                                                            |
| locktime    | number (int) | Optional<br>Default=0     | Raw locktime. Non-0 value also locktime-activates inputs                                                                                                                                                                                                                                                                                                                                                                                                                    |
| options     | json object  | Optional                  | "replaceable": bool,           (boolean, optional, default=false) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees "conf_target": n,              (numeric, optional, default=Fallback to wallet's confirmation target) Confirmation target (in blocks) "estimate_mode": "str",        (string, optional, default=UNSET) The fee estimate mode, must be one of: "UNSET" "ECONOMICAL" "CONSERVATIVE" } |
| bip32derivs | boolean      | Optional<br>Default=false | If true, includes the BIP 32 derivation paths for public keys if we know them                                                                                                                                                                                                                                                                                                                                                                                               |

https://bitcoin.org/en/developer-reference#walletcreatefundedpsbt
sourceraw docstring

wallet-lockclj

(wallet-lock client)

Removes the wallet encryption key from memory, locking the wallet.

https://bitcoin.org/en/developer-reference#walletlock

Removes the wallet encryption key from memory, locking the wallet.

https://bitcoin.org/en/developer-reference#walletlock
sourceraw docstring

wallet-passphraseclj

(wallet-passphrase client {:as params :keys [passphrase timeout]})

Stores the wallet decryption key in memory for 'timeout' seconds.

NameTypePresenceDescription
passphrasestringRequired<br>(exactly 1)The wallet passphrase
timeoutnumber (int)Required<br>(exactly 1)The time to keep the decryption key in seconds; capped at 100000000 (~3 years).

https://bitcoin.org/en/developer-reference#walletpassphrase

Stores the wallet decryption key in memory for 'timeout' seconds.

| Name       | Type         | Presence                | Description                                                                     |
| ---------- | ------------ | ----------------------- | ------------------------------------------------------------------------------- |
| passphrase | string       | Required<br>(exactly 1) | The wallet passphrase                                                           |
| timeout    | number (int) | Required<br>(exactly 1) | The time to keep the decryption key in seconds; capped at 100000000 (~3 years). |

https://bitcoin.org/en/developer-reference#walletpassphrase
sourceraw docstring

wallet-passphrase-changeclj

(wallet-passphrase-change client
                          {:as params :keys [oldpassphrase newpassphrase]})

Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.

NameTypePresenceDescription
oldpassphrasestringRequired<br>(exactly 1)The current passphrase
newpassphrasestringRequired<br>(exactly 1)The new passphrase

https://bitcoin.org/en/developer-reference#walletpassphrasechange

Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.

| Name          | Type   | Presence                | Description            |
| ------------- | ------ | ----------------------- | ---------------------- |
| oldpassphrase | string | Required<br>(exactly 1) | The current passphrase |
| newpassphrase | string | Required<br>(exactly 1) | The new passphrase     |

https://bitcoin.org/en/developer-reference#walletpassphrasechange
sourceraw docstring

wallet-process-psbtclj

(wallet-process-psbt client
                     {:as params :keys [psbt sign sighashtype bip32derivs]})

Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

NameTypePresenceDescription
psbtstringRequired<br>(exactly 1)The transaction base64 string
signbooleanOptional<br>Default=trueAlso sign the transaction when updating
sighashtypestringOptional<br>Default=ALLThe signature hash type to sign with if not specified by the PSBT. Must be one of "ALL" "NONE" "SINGLE" "ALL
bip32derivsbooleanOptional<br>Default=falseIf true, includes the BIP 32 derivation paths for public keys if we know them

https://bitcoin.org/en/developer-reference#walletprocesspsbt

Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

| Name        | Type    | Presence                  | Description                                                                                                                                                          |
| ----------- | ------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| psbt        | string  | Required<br>(exactly 1)   | The transaction base64 string                                                                                                                                        |
| sign        | boolean | Optional<br>Default=true  | Also sign the transaction when updating                                                                                                                              |
| sighashtype | string  | Optional<br>Default=ALL   | The signature hash type to sign with if not specified by the PSBT. Must be one of "ALL" "NONE" "SINGLE" "ALL|ANYONECANPAY" "NONE|ANYONECANPAY" "SINGLE|ANYONECANPAY" |
| bip32derivs | boolean | Optional<br>Default=false | If true, includes the BIP 32 derivation paths for public keys if we know them                                                                                        |

https://bitcoin.org/en/developer-reference#walletprocesspsbt
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close