You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2. Additional fields from PrebuildAndSignTransactionOptions (transaction building and signing fields)
54
54
*/
55
55
exportconstAccelerateTxRequestBody={
56
-
/** Transaction IDs to accelerate using CPFP (Child-Pays-For-Parent). Must be array of length 1. */
56
+
/**
57
+
* Txids of the transactions to bump
58
+
*
59
+
* **Notes:** Each target unconfirmed transaction must be sending funds to the calling wallet. Accepts only a single txid at this stage.
60
+
*/
57
61
cpfpTxIds: optional(t.array(t.string)),
58
62
59
-
/** Transaction IDs to accelerate using RBF (Replace-By-Fee). Must be array of length 1. */
63
+
/** The list of transactions to accelerate using Replace-By-Fee (RBF) for UTXO coins (currently accelerating only one tx is supported). */
60
64
rbfTxIds: optional(t.array(t.string)),
61
65
62
-
/** Fee rate for the CPFP transaction (in satoshis/kB). Required for CPFP unless noCpfpFeeRate=true. */
66
+
/** Desired effective feerate of the bumped transactions and the CPFP transaction in satoshi per kilobyte */
63
67
cpfpFeeRate: optional(t.number),
64
68
65
69
/** If true, allows skipping cpfpFeeRate requirement for CPFP */
66
70
noCpfpFeeRate: optional(t.boolean),
67
71
68
-
/** Maximum fee willing to pay (in satoshis). Required for CPFP unless noMaxFee=true. */
72
+
/**
73
+
* Maximum allowed fee for the CPFP transaction in satoshi
74
+
*
75
+
* **Notes:** A CPFP transaction accelerates the target transactions and all of the unconfirmed transactions the target transactions depends on. As it can be difficult to discern the complete transaction ancestry at times, we recommend limiting the total fee for each CPFP attempt as a safety net to prevent CPFP transactions that exceed your cost expectations.
76
+
*/
69
77
maxFee: optional(t.number),
70
78
71
79
/** If true, allows skipping maxFee requirement for CPFP */
72
80
noMaxFee: optional(t.boolean),
73
81
74
-
/** Fee multiplier for RBF (must be > 1). Required when using rbfTxIds. */
82
+
/** (UTXO only) Custom multiplier to the feeRate. The resulting fee rate is limited by the maxFeeRate. For replace-by-fee (RBF) transactions (that include rbfTxIds), the feeMultiplier must be greater than 1, since it's an absolute fee multiplier to the transaction being replaced.
83
+
*
84
+
* **Note:** The maxFeeRate limits the fee rate generated by feeMultiplier.
85
+
*/
75
86
feeMultiplier: optional(t.number),
76
87
77
88
/** Recipients array (will be set to empty array by SDK for acceleration) */
* Send a new transaction to accelerate the targeted unconfirmed transaction either by using Child-Pays-For-Parent (CPFP) or Replace-By-Fee (RBF).
384
395
*
385
-
* This endpoint accelerates a stuck or slow transaction using either:
386
-
* - **CPFP (Child-Pays-For-Parent)**: Creates a new transaction that spends the output
387
-
* of the stuck transaction with a higher fee, incentivizing miners to confirm both.
388
-
* - **RBF (Replace-By-Fee)**: Replaces the original transaction with a new one that
389
-
* has a higher fee (only works if original transaction was marked as RBF-enabled).
396
+
* **Background:**
397
+
* 1. In Bitcoin, a transaction can only be included in a block when all its inputs are confirmed. This requirement can be used to increase the effective fee rate of a stuck low-fee transaction. One of the stuck transaction's outputs is spent in a child transaction with a much higher fee. Miners include the transactions with the highest fees first to maximize their revenue, but the high-fee child transaction can only be included once the parent transaction is confirmed. The miners are therefore incentivized to include both the parent and the child transaction together in a block. A Child-Pays-For-Parent transaction can be created by a recipient of the transaction or by the sender if the target transaction has a change output.
398
+
* 2. In Bitcoin, a transaction can be replaced by a new transaction with a higher fee as long as the new transaction spends few or all of the same inputs used by the original transaction that's being replaced. Unlike CPFP, only the sender of the transaction can create a Replace-By-Fee transaction, and only either of the transactions can be confirmed. More often than not, the replacement transaction with the higher fee will be accepted by the miners.
390
399
*
391
-
* Supported coins: Primarily UTXO-based coins like Bitcoin (btc, tbtc), Litecoin (ltc), etc.
400
+
* **Notes:**
401
+
* 1. As other coins do not have a blockspace market, this route is only available for Bitcoin at this time.
402
+
* 2. Using CPFP, if a target transaction depends on other unconfirmed transactions, this route also adds sufficient fees to elevate the entire transaction ancestry's effective fee rate to the cpfpFeeRate.
392
403
*
393
-
* **CPFP Requirements:**
394
-
* - cpfpTxIds: Array with exactly one transaction ID
395
-
* - cpfpFeeRate: Fee rate in satoshis/kB (required unless noCpfpFeeRate=true)
396
-
* - maxFee: Maximum fee in satoshis (required unless noMaxFee=true)
397
-
* - walletPassphrase, xprv, or prv: For signing the CPFP transaction
398
404
*
399
-
* **RBF Requirements:**
400
-
* - rbfTxIds: Array with exactly one transaction ID
401
-
* - feeMultiplier: Multiplier for the fee (must be > 1, e.g., 1.5 for 50% increase)
402
-
* - walletPassphrase, xprv, or prv: For signing the replacement transaction
403
-
*
404
-
* **Important:**
405
-
* - Must specify EITHER cpfpTxIds OR rbfTxIds (not both)
406
-
* - Original transaction must be unconfirmed
407
-
* - For RBF, original transaction must have been created with RBF enabled
408
-
*
409
-
* **Behavior:**
410
-
* 1. Validates acceleration parameters (CPFP or RBF)
411
-
* 2. Builds and signs the acceleration transaction
0 commit comments