testmempoolaccept
Indicates if a raw transaction (serialized, hex-encoded) would be accepted by mempool based on the results of the acceptance tests run by mempool.
This determines whether the transaction deviates from the agreement or the guidelines.
Example Request and Result for testmempoolaccept method
In this section, we provide an illustrative example of a request made to retrieve details contents using the testmempoolaccept
method. Additionally, we present the resulting response containing information about the result of mempool acceptance tests.
Parameters
Field | Type | Description |
---|---|---|
rawtxs* | array<string> | An array of hex strings of raw transactions. |
maxfeerate | numeric/string | Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB |
The example in this section uses a non-existing project id.
Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
Curl Request example
curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'content-type: application/json;' \
--data '{
"jsonrpc": "1.0",
"id": "bwarelabs",
"method": "testmempoolaccept",
"params": [
[
"0200000001e114ded2868c57821e336374c948158cebf18daaf5c7bc756b199d118d6e229d0000000000ffffffff010000000000000000066a040001020300000000"
]
]
}'