@@ -160,12 +160,19 @@ be confirmed within a certain number of blocks.
160160
161161**Signature **
162162
163- .. function :: blockchain.estimatefee(number)
163+ .. function :: blockchain.estimatefee(number, mode=None)
164+ .. versionchanged :: 1.5
165+ *mode * argument added
164166
165167 *number *
166168
167169 The number of blocks to target for confirmation.
168170
171+ *mode *
172+
173+ A string to pass to the bitcoind *estimatesmartfee * RPC as the
174+ *estimate_mode * parameter. Optional.
175+
169176**Result **
170177
171178 The estimated transaction fee in coin units per kilobyte, as a
@@ -498,6 +505,109 @@ Unsubscribe from a script hash, preventing future notifications if its :ref:`sta
498505 Note that :const: `False ` might be returned even for something subscribed to earlier,
499506 because the server can drop subscriptions in rare circumstances.
500507
508+ blockchain.outpoint.subscribe
509+ ===============================
510+
511+ Subscribe to a transaction outpoint (TXO), to get notifications about its status.
512+ A status involves up to two transactions: the funding transaction that creates
513+ the TXO (as one of its outputs), and the spending transaction that uses it
514+ as an input (spends it).
515+
516+ **Signature **
517+
518+ .. function :: blockchain.outpoint.subscribe(tx_hash, txout_idx)
519+ .. versionadded :: 1.5
520+
521+ *tx_hash *
522+
523+ The TXID of the funding transaction as a hexadecimal string.
524+ (sometimes called prevout_hash, in inputs)
525+
526+ *txout_idx *
527+
528+ The output index, a non-negative integer. (sometimes called prevout_n, in inputs)
529+
530+ **Result **
531+
532+ The status of the TXO, taking the mempool into consideration.
533+ The output is a dictionary, containing 0, 1, or 3 of the following items:
534+
535+ * *height *
536+
537+ The integer height of the block the funding transaction was confirmed in.
538+ ``0 `` if the funding transaction is in the mempool.
539+ This key must be present if and only if there exists a funding transaction
540+ (either in the best chain or in the mempool), regardless of spentness.
541+
542+ * *spender_txhash *
543+
544+ The TXID of the spending transaction as a hexadecimal string.
545+ This key is present if and only if there exists a spending transaction
546+ (either in the best chain or in the mempool).
547+
548+ * *spender_height *
549+
550+ The integer height of the block the spending transaction was confirmed in.
551+ ``0 `` if the spending transaction is in the mempool.
552+ This key is present if and only if the `spender_txhash ` key is present.
553+
554+
555+ **Result Examples **
556+
557+ ::
558+
559+ {}
560+
561+ ::
562+
563+ {
564+ "height": 1866594
565+ }
566+
567+ ::
568+
569+ {
570+ "height": 1866594,
571+ "spender_txhash": "4a19a360f71814c566977114c49ccfeb8a7e4719eda26cee27fa504f3f02ca09",
572+ "spender_height": 0
573+ }
574+
575+ **Notifications **
576+
577+ The client will receive a notification when the `status ` of the outpoint changes.
578+ The protocol does not guarantee but the client might also receive a notification
579+ if the status does not change but there was a reorg.
580+ Its signature is
581+
582+ .. function :: blockchain.outpoint.subscribe([tx_hash, txout_idx], status)
583+ :noindex:
584+
585+ blockchain.outpoint.unsubscribe
586+ =================================
587+
588+ Unsubscribe from a transaction outpoint (TXO), preventing future notifications
589+ if its `status ` changes.
590+
591+ **Signature **
592+
593+ .. function :: blockchain.outpoint.unsubscribe(tx_hash, txout_idx)
594+ .. versionadded :: 1.5
595+
596+ *tx_hash *
597+
598+ The TXID of the funding transaction as a hexadecimal string.
599+
600+ *txout_idx *
601+
602+ The output index, a non-negative integer.
603+
604+ **Result **
605+
606+ Returns :const: `True ` if the outpoint was subscribed to, otherwise :const: `False `.
607+ Note that :const: `False ` might be returned even for something subscribed to earlier,
608+ because the server can drop subscriptions in rare circumstances.
609+
610+
501611blockchain.transaction.broadcast
502612================================
503613
@@ -625,15 +735,17 @@ and height.
625735
626736**Signature **
627737
628- .. function :: blockchain.transaction.get_merkle(tx_hash, height)
738+ .. function :: blockchain.transaction.get_merkle(tx_hash, height=None)
739+ .. versionchanged :: 1.5
740+ *height * argument made optional (previously mandatory)
629741
630742 *tx_hash *
631743
632744 The transaction hash as a hexadecimal string.
633745
634746 *height *
635747
636- The height at which it was confirmed, an integer.
748+ Optionally, the height at which it was confirmed, an integer.
637749
638750**Result **
639751
@@ -968,6 +1080,7 @@ server.version
9681080==============
9691081
9701082Identify the client to the server and negotiate the protocol version.
1083+ This must be the first message sent on the wire.
9711084Only the first :func: `server.version ` message is accepted.
9721085
9731086**Signature **
0 commit comments