Speed up an unconfirmed attach
const url = 'https://api.digirare.com/v1/attach-templates/speed-up';const options = { method: 'POST', headers: {'x-session-token': '<x-session-token>', 'Content-Type': 'application/json'}, body: '{"owner":"example","txid":"example","fee_rate":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.digirare.com/v1/attach-templates/speed-up \ --header 'Content-Type: application/json' \ --header 'x-session-token: <x-session-token>' \ --data '{ "owner": "example", "txid": "example", "fee_rate": 1 }'Returns an unsigned CPFP child for the session owner’s own unconfirmed attach. The server reads the attach from Bitcoin, proves from its bytes that it is a Counterparty attach whose unit lands on its first spendable output, finds the owner’s change output after it (never the asset UTXO), checks that the change is unspent, and sizes a one-input, one-output child back to the same owner so the package (the attach, its unconfirmed ancestors, and the child) reaches fee_rate (default: the next-block rate). Nothing is stored. Sign input 0 with DEFAULT|ALL and relay the finalized child with POST /transactions. Refusals carry a reason: confirmed, no_change, change_spent (with spent_by), fee_sufficient, ancestor_limit, not_attach, or insufficient_change (code insufficient_funds with need_sats, have_sats and shortfall_sats).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The session address whose change pays for the speed-up.
The unconfirmed attach to speed up. For a chain of attaches, the newest one: its change is the unspent one, and its package carries every ancestor.
Examplegenerated
{ "owner": "example", "txid": "example", "fee_rate": 1}Responses
Section titled “Responses”One unsigned speed-up child, never stored
object
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
The attach’s plain-BTC change output the child spends. Never the asset UTXO.
object
object
object
Mainnet P2TR or P2WPKH address. The SIGNING capability: every signature is verified by reconstructing a BIP-143/BIP-341 witness sighash.
object
The attach plus every unconfirmed ancestor it waits on.
What the child returns to the owner: change minus the child fee.
Example
{ "result": { "child": { "signing": { "inputs_to_sign": [ 0 ], "sighash": "DEFAULT|ALL" } } }}Stable machine-readable failure
object
On 422 mempool_rejected from a broadcast: which deterministic node policy refused the bytes. Retrying the same bytes fails the same way. fee_floor: re-quote at a higher fee_rate. chain_too_long: too many unconfirmed ancestors; wait for a confirmation, then retry. truc: a version-3 (TRUC) package rule, such as spending an unconfirmed version-3 output; wait for a confirmation, then retry.
The node’s own reject reason, on mempool_rejected (422) and on state_changed (409) when a broadcast lost to a conflicting or replacing spend.
Present and true when mempool_policy is chain_too_long or truc.
On a checkout or accept completion refused as mempool_rejected: the journaled settlement ended and every listing, bid, and asset claim it held was released (its inputs were proven unspent). The quote or accept is replaced; request a new one.
Batch listing routes only: every refused item. The first sets the status and code.
One refused item in a batch refusal’s refused_listings array. Nothing in the batch was changed.
object
On 429 rate_limited: the exact seconds until the oldest counted request leaves the window; a retry then is admitted (also sent as Retry-After). Limited writes are bucketed per route scope in exact sliding 60-second windows: by session address when a valid x-session-token is present, otherwise by IP, with a per-IP ceiling across sessions. Expensive writes: 20, ceiling 120. Signed completions: 120, ceiling 600. Session minting (/auth/*): 60 per IP. A request refused by any bucket is counted by none.
Example
{ "code": "invalid_request", "mempool_policy": "fee_floor"}Stable machine-readable failure
object
On 422 mempool_rejected from a broadcast: which deterministic node policy refused the bytes. Retrying the same bytes fails the same way. fee_floor: re-quote at a higher fee_rate. chain_too_long: too many unconfirmed ancestors; wait for a confirmation, then retry. truc: a version-3 (TRUC) package rule, such as spending an unconfirmed version-3 output; wait for a confirmation, then retry.
The node’s own reject reason, on mempool_rejected (422) and on state_changed (409) when a broadcast lost to a conflicting or replacing spend.
Present and true when mempool_policy is chain_too_long or truc.
On a checkout or accept completion refused as mempool_rejected: the journaled settlement ended and every listing, bid, and asset claim it held was released (its inputs were proven unspent). The quote or accept is replaced; request a new one.
Batch listing routes only: every refused item. The first sets the status and code.
One refused item in a batch refusal’s refused_listings array. Nothing in the batch was changed.
object
On 429 rate_limited: the exact seconds until the oldest counted request leaves the window; a retry then is admitted (also sent as Retry-After). Limited writes are bucketed per route scope in exact sliding 60-second windows: by session address when a valid x-session-token is present, otherwise by IP, with a per-IP ceiling across sessions. Expensive writes: 20, ceiling 120. Signed completions: 120, ceiling 600. Session minting (/auth/*): 60 per IP. A request refused by any bucket is counted by none.
Example
{ "code": "invalid_request", "mempool_policy": "fee_floor"}