Returns if raw transaction (serialized, hex-encoded) would be accepted by mempool.
This checks if the transaction violates the consensus or policy rules.
See sendrawtransaction call.
Arguments:
- ["rawtxs"] (array, required) An array of hex strings of raw transactions.
Length must be one for now. - allowhighfees (boolean, optional, default=false) Allow high fees
Request
curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
-X POST \
-H 'x-amberdata-blockchain-id: bitcoin-mainnet' \
-d '{"jsonrpc":"2.0","id":1,"method":"testmempoolaccept","params":[["02000000000101a8.....20900"]]}'
Response
[
{
"txid" (string) The transaction hash in hex
"allowed" (boolean) If the mempool allows this tx to be inserted
"reject-reason" (string) Rejection string (only present when 'allowed' is false)
}
]