Supported Bitcoin JSON-RPCs with Amazon Managed Blockchain (AMB) Access Bitcoin - AMB Access Bitcoin

Supported Bitcoin JSON-RPCs with Amazon Managed Blockchain (AMB) Access Bitcoin

This topic provides a list of and references to the Bitcoin JSON-RPCs that Managed Blockchain supports. Each supported JSON-RPC has a brief description of its use.

Note
  • You can authenticate Bitcoin JSON-RPCs on Managed Blockchain by using the Signature Version 4 (SigV4) signing process. This means that only authorized IAM principals in the AWS account can interact with it by using the Bitcoin JSON-RPCs. Provide AWS credentials (an access key ID and secret access key) with the call.

  • If your HTTP response is larger than 10 MB, you will get an error. To correct this, you must set the compression headers to Accept-Encoding:gzip. The compressed response your client then receives contains the following headers: Content-Type: application/json and Content-Encoding: gzip.

  • Amazon Managed Blockchain (AMB) Access Bitcoin generates a 400 error for malformed JSON-RPC requests.

  • Use the sendrawtransaction JSON-RPC to submit transactions that update the Bitcoin blockchain state.

  • AMB Access Bitcoin has a default request limit of 100 requests per second (RPS), per NETWORK_TYPE, per AWS Region.

    For increasing your quota, you must contact AWS support. To contact AWS support, sign into the AWS Support Center Console. Choose Create case. Choose Technical. Choose Managed Blockchain as your service. Choose Access:Bitcoin as your Category and General guidance as your Severity. Enter RPC Quota as the Subject and in the Description text box and list the quota limits applicable to your needs in RPS per Bitcoin network per Region. Submit your case.

Supported JSON-RPCs

AMB Access Bitcoin supports the following Bitcoin JSON-RPCs. Each supported call has a brief description of its use.

Category JSON-RPC Description
Blockchain RPCs getbestblockhash Returns the hash of the best (tip) block in the most-work, fully validated chain.
getblock If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’. If verbosity is 1, returns an Object with information about the block ‘hash’. If verbosity is 2, returns an Object with information about the block ‘hash’ and information about each transaction. If verbosity is 3, returns an Object with information about the block ‘hash’ and information about each transaction, including the prevout information for inputs.
getblockchaininfo Returns an object containing various state info regarding blockchain processing.
getblockcount Returns the height of the most-work, fully validated chain. The genesis block has height 0.
getblockfilter Retrieves a BIP 157 content filter for a particular block using the block hash.
getblockhash Returns hash of block in best-block-chain at height provided.
getblockheader If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’. If verbose is true, returns an Object with information about blockheader ‘hash’.
getblockstats Computes per block statistics for a given window. All amounts are in satoshis. It won’t work for some heights with pruning.
getchaintips Returns information about all known tips in the block tree, including the main chain and orphaned branches.
getchaintxstats Computes statistics about the total number and rate of transactions in the chain.
getdifficulty Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
getmempoolancestors If txid is in the mempool, returns all in-mempool ancestors.
getmempooldescendants If txid is in the mempool, returns all in-mempool descendants.
getmempoolentry Returns mempool data for given transaction.
getmempoolinfo Returns details on the active state of the TX memory pool.
getrawmempool Returns all transaction IDs in memory pool as a JSON array of string transaction IDs.
Note

verbose = true is not supported.

gettxout Returns details about an unspent transaction output.
gettxoutproof Returns a hex-encoded proof that “txid” was included in a block.
Rawtransactions RPCs createrawtransaction Creates a transaction spending the given inputs and creating new outputs.
decoderawtransaction Returns a JSON object representing the serialized, hex-encoded transaction.
decodescript Decodes a hex-encoded script.
getrawtransaction Returns the raw transaction data.
sendrawtransaction Submits a raw transaction (serialized, hex-encoded) to local node and network.
testmempoolaccept Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool. This checks if the transaction violates the consensus or policy rules.
Util RPCs createmultisig Creates a multi-signature address with n signature of m keys required.
estimatesmartfee Estimates the approximate fee per kilobyte required for a transaction to begin confirmation within conf_target blocks, if possible, and returns the number of blocks for which the estimate is valid. Uses virtual transaction size, as defined in BIP 141 (witness data is discounted).
validateaddress Returns information about the given bitcoin address.
verifymessage Verifies a signed message.