Bitcoin rpc api list


If the third parameter is provided, only outputs which pay an address in this array will be included.

If unlock is true , it unlocks the specified outputs, or unlocks all outputs if no second parameter is provided. Working with raw transactions appendrawchange tx-hex address native-fee Adds a change output to the raw transaction in tx-hex given by a previous call to createrawtransaction.

Any assets or native currency in the transaction inputs which are not claimed in the outputs will be sent to address , minus the native-fee which is calculated automatically if omitted. The returned raw transaction can be signed and broadcast to the network using signrawtransaction and sendrawtransaction. Raw metadata can be specified in data-hex in hexadecimal form. Alternatively, an object can be passed to represent asset issuance, stream creation or a stream item — see raw transactions for more details.

Note that if tx-hex contains more outputs than inputs, the new outputs will be inserted at position n , where n is the number of inputs in tx-hex. This is important to preserve the viability of certain types of transaction signatures.

In Bitcoin Core, each amount field is a quantity of the bitcoin currency. The optional data array adds one or more metadata outputs to the transaction, where each element is a raw hexadecimal string or object, formatted as passed to appendrawdata.

The optional action parameter can be lock locks the given inputs in the wallet , sign signs the transaction using wallet keys , lock,sign does both or send signs and sends the transaction. If action is send the txid is returned. If action contains sign , an object with hex and complete fields is returned, as for signrawtransaction.

Otherwise, the raw transaction hexadecimal is returned. See raw transactions for more details on building raw transactions. One or more change outputs going back to from-address will also be added to the end of the transaction. The raw transaction can be created using createrawtransaction , optionally appendrawdata and signrawtransaction , or else createrawexchange and appendrawexchange.

Returns a raw hexadecimal transaction in the hex field alongside a complete field stating whether it is now completely signed. If not, it can be passed to other parties for additional signing. To sign only part of the transaction, use the sighashtype parameter to control the signature hash type. Peer-to-peer connections addnode ip: For the entire ip: The command parameter should be one of add to manually queue a node for the next available slot , remove to remove a node , or onetry to immediately connect to a node even if a slot is not available.

If this is a MultiChain blockchain, includes handshake and handshakelocal fields showing the remote and local address used during the handshaking for that connection. The results are received asynchronously and retrieved from the pingtime field of the response to getpeerinfo.

Messaging signing and verification signmessage address privkey message Returns a baseencoded digital signature which proves that message was approved by the owner of address which must belong to this wallet or any other private key given in privkey. The signature can be verified by any node using the verifymessage command. The result is true or false unless an error occurred. Set verbose to 0 or false for the block in raw hexadecimal form. Set to 1 or true for a block summary including the miner address and a list of txids.

Set to 2 to 3 to include more information about each transaction and its raw hexadecimal. Set to 4 to include a full description of each transaction, formatted like the output of decoderawtransaction. This can be passed to getblock to get information about the block. If the memory pool is growing continuously, this suggests that transactions are being generated faster than the network is able to process them.

For a MultiChain blockchain, includes assets and permissions fields listing any assets or permission changes encoded within the output. Set unconfirmed to true to include unconfirmed transaction outputs. The blocks parameter can contain a comma-delimited list or array of block heights, hashes, height ranges e. Advanced wallet control backupwallet filename Creates a backup of the wallet.

The backup is created in file filename. Use with caution — any node with access to this private key can perform any action restricted to the address. Use with caution — once a wallet has been encrypted it cannot be permanently unencrypted, and must be unlocked for signing transactions with the walletpassphrase command. In a permissioned blockchain, MultiChain will also require the wallet to be unlocked before it can connect to other nodes, or sign blocks that it has mined.

The entire blockchain will be rescanned for transactions relating to the addresses corresponding with these private keys.

In a permissioned blockchain, this will also need to be called before the node can connect to other nodes or sign blocks that it has mined. The upgrade can be specified using its name or creation txid. Returns the txid of the approval transaction. Pass the value "upgrade" in the type parameter the create API can also be used to create streams and false for the open parameter.

For now, only the protocol version can be upgraded, for example from to Note that an address requires both admin and create permissions to create an upgrade.

Returns the txid of the transaction creating the upgrade. It is useful if the node has multiple addresses with both admin and create permissions. The response includes information on whether each upgrade has been approved by consensus, which admins have approved it so far, how many more admins are required to reach consensus, and the appliedblock where the upgrade became active.

This can only be called after pause incoming,mining. Successful if no error is returned. Returns the hash of the last block in the chain after the change. Alphabetical list of API commands — view by category In the table below, all optional parameters are denoted in round brackets.

Sets the runtime parameter param to value and immediately applies the change. Returns general information about this node and blockchain. Creates a pay-to-scripthash P2SH multisig address and adds it to the wallet. Adds address or a full public key, or an array of either to the wallet, without an associated private key.

Returns information about the addresses in the wallet. Creates a pay-to-scripthash P2SH multisig address. Grants permissions to addresses , a comma-separated list of addresses. This works like grant , but with control over the from-address used to grant the permissions.

This works like grant , but with an additional data-only transaction output. This works like grantwithdata , but with control over the from-address used to grant the permissions. Returns a list of all permissions which have been explicitly granted to addresses. Revokes permissions from addresses , a comma-separated list of addresses. This works like revoke , but with control over the from-address used to revoke the permissions.

Creates a new asset on the blockchain, sending the initial qty units to address. This works like issue , but with control over the from-address used to issue the asset. Issues qty additional units of asset , sending them to address. This works like issuemore , but with control over the from-address used. Returns information about assets issued on the blockchain.

Sends one or more assets to address , returning the txid. Sends qty of asset to address , returning the txid. This works like sendasset , but with control over the from-address whose funds are used. This works like send , but with control over the from-address whose funds are used. This works like send , but with an additional data-only transaction output. This works like sendwithdata , but with control over the from-address whose funds are used.

Adds to the raw atomic exchange transaction in tx-hex given by a previous call to createrawexchange or appendrawexchange. This works like appendrawexchange but finalizes the exchange, preventing any further additions. Decodes the raw exchange transaction in tx-hex , given by a previous call to createrawexchange or appendrawexchange. Sends a transaction to disable the offer of exchange in tx-hex , returning the txid. Prepares an unspent transaction output useful for building atomic exchange transactions containing qty units of asset , where asset is an asset name, ref or issuance txid use "" as the asset to specify a quantity of the native currency.

This works like preparelockunspent , but with control over the from-address whose funds are used to prepare the unspent transaction output. Creates a new stream on the blockchain called name. This works like create , but with control over the from-address used to create the stream. Returns information about streams created on the blockchain.

Publishes an item in stream , passed as a stream name, ref or creation txid, with key provided in text form and data-hex in hexadecimal. This works like publish , but publishes the item from from-address.

Instructs the node to start tracking one or more asset s or stream s. Instructs the node to stop tracking one or more asset s or stream s. Retrieves a specific transaction txid involving asset , passed as an asset name, ref or issuance txid, to which the node must be subscribed. Lists transactions involving asset , passed as an asset name, ref or issuance txid, to which the node must be subscribed.

Retrieves a specific item with txid from stream , passed as a stream name, ref or creation txid, to which the node must be subscribed. Returns the data embedded in output vout of transaction txid , in hexadecimal. This works like liststreamitems , but listing items within the specified blocks only. This works like liststreamitems , but listing items with the given key only. Provides information about keys in stream , passed as a stream name, ref or creation txid.

Lists items in stream , passed as a stream name, ref or creation txid. This works like liststreamitems , but listing items published by the given address only. Provides information about publishers who have written to stream , passed as a stream name, ref or creation txid. Sends transactions to combine unspent outputs UTXOs belonging to the same address into a single unspent output, returning a list of txids. Returns a list of locked unspent transaction outputs in the wallet.

Returns a list of unspent transaction outputs in the wallet, with between minconf and maxconf confirmations. If unlock is false , locks the specified transaction outputs in the wallet, so they will not be used for automatic coin selection.

Adds a change output to the raw transaction in tx-hex given by a previous call to createrawtransaction. This works like createrawtransaction but adds the given inputs and regular or metadata outputs to the raw transaction specified in tx-hex , rather than creating a new transaction. Creates a transaction spending the specified inputs, sending to the given addresses.

This works like createrawtransaction , except it automatically selects the transaction inputs from those belonging to from-address , to cover the appropriate amounts.

Returns a JSON object describing the serialized transaction in tx-hex. Validates the raw transaction in tx-hex and transmits it to the network, returning the txid. Signs the raw transaction in tx-hex , often provided by a previous call to createrawtransaction or createrawsendfrom. Manually adds or removes a peer-to-peer connection peers are also discovered and added automatically.

Returns information about the network ports to which the node is connected, and its local IP addresses. Returns information about the other nodes to which this node is connected. Sends a ping message to all connected nodes to measure network latency and backlog. Returns a baseencoded digital signature which proves that message was approved by the owner of address which must belong to this wallet or any other private key given in privkey. Verifies that message was approved by the owner of address by checking the baseencoded digital signature provided by a previous call to signmessage.

Returns information about the block with hash retrievable from getblockhash or at the given height in the active chain. Returns information about the blockchain, including the bestblockhash of the most recent block on the active chain, which can be compared across nodes to check if they are perfectly synchronized. Returns the hash of the block at the given height.

Returns information about the memory pool, which contains transactions that the node has seen and validated, but which have not yet been confirmed on the active chain.

There is also a wrapper for Json. NET called Bitnet https: A more complete library and wrapper for Bitcoin also for Litecoin and all Bitcoin clones is BitcoinLib https: Querying the daemon with BitcoinLib is as simple as:.

Client ; use Data:: Fatalf "error creating new btc client: Fatalf "error listing accounts: Amount and write to stdout for label , amount: Fatalf "address receiver1 seems to be invalid: Fatalf "address receiver2 seems to be invalid: SendMany "some-account-label-from-which-to-send" , receivers if err! Add new JProperty "jsonrpc" , "1. Add new JProperty "id" , "1" ; joe. GetBytes s ; webRequest. Write byteArray , 0 , byteArray.

Retrieved from " https: Navigation menu Personal tools English Create account Log in. Views Read View source View history. Navigation Main page Recent changes Random page Help. This page was last edited on 24 October , at