submitpackage

Back to rawtransactions

Summary

Submit a package of raw transactions (serialized, hex-encoded) to local node.

Description

Submit a package of raw transactions (serialized, hex-encoded) to local node. The package will be validated according to consensus and mempool policy rules. If any transaction passes, it will be accepted to mempool. This RPC is experimental and the interface may be unstable. Refer to doc/policy/packages.md for documentation on package policies. Warning: successful submission does not mean the transactions will propagate throughout the network.

Arguments

  • package (ARR, required): An array of raw transactions. The package must consist of a transaction with (some, all, or none of) its unconfirmed parents. A single transaction is permitted. None of the parents may depend on each other. Parents that are already in mempool do not need to be present in the package. The package must be topologically sorted, with the child being the last element in the array if there are multiple elements.
  • rawtx (STR_HEX): No description.
  • maxfeerate (AMOUNT): Reject transactions whose fee rate is higher than the specified value, expressed in QBT/kvB. Fee rates larger than 1QBT/kvB are rejected. Set to 0 to accept any fee rate.
  • maxburnamount (AMOUNT): Reject transactions with provably unspendable outputs (e.g. 'datacarrier' outputs that use the OP_RETURN opcode) greater than the specified value, expressed in QBT. If burning funds through unspendable outputs is desired, increase this value. This check is based on heuristics and does not guarantee spendability of outputs.

Results

  • value (OBJ): No description.
  • package_msg (STR): The transaction package result message. "success" indicates all transactions were accepted into or are already in the mempool.
  • tx-results (OBJ_DYN): transaction results keyed by wtxid
    • wtxid (OBJ): transaction wtxid
    • txid (STR_HEX): The transaction hash in hex
    • other-wtxid (STR_HEX, optional): The wtxid of a different transaction with the same txid but different witness found in the mempool. This means the submitted transaction was ignored.
    • vsize (NUM, optional): Sigops-adjusted virtual transaction size.
    • fees (OBJ, optional): Transaction fees
      • base (STR_AMOUNT): transaction fee in QBT
      • effective-feerate (STR_AMOUNT, optional): if the transaction was not already in the mempool, the effective feerate in QBT per KvB. For example, the package feerate and/or feerate with modified fees from prioritisetransaction.
      • effective-includes (ARR, optional): if effective-feerate is provided, the wtxids of the transactions whose fees and vsizes are included in effective-feerate.
      • value (STR_HEX): transaction wtxid in hex
    • error (STR, optional): The transaction error string, if it was rejected by the mempool
  • replaced-transactions (ARR, optional): List of txids of replaced transactions
    • value (STR_HEX): The transaction id

Examples

curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "submitpackage", "params": [["raw-parent-tx-1", "raw-parent-tx-2", "raw-child-tx"]]}' -H 'content-type: application/json' http://127.0.0.1:8352/
qbit-cli submitpackage '["raw-tx-without-unconfirmed-parents"]'