Skip to content

Commit 14386d6

Browse files
author
f321x
committed
add submitpackage methods
replace colon with semicolon remove venv and html add submitpackage methods
1 parent 37ea4b2 commit 14386d6

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

docs/protocol-changes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,12 @@ New methods
175175
-----------
176176

177177
* :func:`blockchain.name.get_value_proof` to resolve a name (with proof). Name index coins (e.g. Namecoin) only.
178+
179+
180+
Version 1.4.4
181+
=============
182+
183+
New methods
184+
-----------
185+
186+
* :func:`blockchain.transaction.broadcast_package` to broadcast a package of transactions (submitpackage).

docs/protocol-methods.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,70 @@ Protocol version 1.0 returning an error as the result:
537537

538538
"258: txn-mempool-conflict"
539539

540+
blockchain.transaction.broadcast_package
541+
========================================
542+
543+
Broadcast a package of transactions to the network (submitpackage). The package must consist of a child with its parents,
544+
and none of the parents may depend on one another.
545+
546+
**Signature**
547+
548+
.. function:: blockchain.transaction.broadcast_package([raw_txs]; verbose=false)
549+
550+
*[raw_txs]*
551+
552+
An array of raw transactions as hexadecimal strings.
553+
554+
*verbose*
555+
556+
Whether a verbose coin-specific response is required.
557+
558+
**Result**
559+
560+
If *verbose* is :const:`false`:
561+
562+
The package_msg and replaced_txs, a list of txids of replaced transactions.
563+
564+
If *verbose* is :const:`true`:
565+
566+
The Bitcoin Core daemon result according to its RPC API documentation.
567+
568+
**Result Example**
569+
570+
When *verbose* is :const:`false`::
571+
572+
{
573+
"package_msg": "success",
574+
"replaced-transactions": []
575+
}
576+
577+
When *verbose* is :const:`true`::
578+
579+
{ (json object)
580+
"package_msg" : "str", (string) The transaction package result message. "success" indicates all transactions were accepted into or are already in the mempool.
581+
"tx-results" : { (json object) transaction results keyed by wtxid
582+
"wtxid" : { (json object) transaction wtxid
583+
"txid" : "hex", (string) The transaction hash in hex
584+
"other-wtxid" : "hex", (string, 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.
585+
"vsize" : n, (numeric, optional) Sigops-adjusted virtual transaction size.
586+
"fees" : { (json object, optional) Transaction fees
587+
"base" : n, (numeric) transaction fee in BTC
588+
"effective-feerate" : n, (numeric, optional) if the transaction was not already in the mempool, the effective feerate in BTC per KvB. For example, the package feerate and/or feerate with modified fees from prioritisetransaction.
589+
"effective-includes" : [ (json array, optional) if effective-feerate is provided, the wtxids of the transactions whose fees and vsizes are included in effective-feerate.
590+
"hex", (string) transaction wtxid in hex
591+
...
592+
]
593+
},
594+
"error" : "str" (string, optional) The transaction error string, if it was rejected by the mempool
595+
},
596+
...
597+
},
598+
"replaced-transactions" : [ (json array, optional) List of txids of replaced transactions
599+
"hex", (string) The transaction id
600+
...
601+
]
602+
}
603+
540604
blockchain.transaction.get
541605
==========================
542606

0 commit comments

Comments
 (0)