Context
arkd PR #988 (merged 2026-03-23) added two API changes that ts-sdk needs to implement:
1. New sweep_tx field in GetTransactionsStreamResponse (service.proto field 4)
message GetTransactionsStreamResponse {
oneof data {
TxNotification commitment_tx = 1;
TxNotification ark_tx = 2;
Heartbeat heartbeat = 3;
TxNotification sweep_tx = 4; // NEW
}
}
2. New swept_vtxos field in TxNotification (types.proto field 6)
message TxNotification {
// ... existing fields ...
repeated Outpoint swept_vtxos = 6; // NEW
}
Current state (verified 2026-05-22)
sweptVtxos is already handled in the subscription stream (getSubscription) in both:
providers/indexer.ts lines 508–510
providers/expoIndexer.ts lines 106–108
These cover the subscription stream, NOT the transactions stream.
Remaining work in src/providers/ark.ts
TxNotification interface (line 175) — add sweptVtxos?: Outpoint[]
getTransactionsStream return type (line 247–250) — add sweepTx?: TxNotification
parseTransactionNotification() (lines 855–890) — add handler for data.sweepTx before the console.warn fallthrough
Required changes in src/providers/ark.ts
TxNotification interface
Add: sweptVtxos?: Outpoint[]
getTransactionsStream return type
getTransactionsStream(signal: AbortSignal): AsyncIterableIterator<{
commitmentTx?: TxNotification;
arkTx?: TxNotification;
sweepTx?: TxNotification; // ADD
}>;
parseTransactionNotification()
if (data.sweepTx) {
return {
sweepTx: {
txid: data.sweepTx.txid,
tx: data.sweepTx.tx,
spentVtxos: data.sweepTx.spentVtxos.map(mapVtxo),
spendableVtxos: data.sweepTx.spendableVtxos.map(mapVtxo),
checkpointTxs: data.sweepTx.checkpointTxs,
sweptVtxos: data.sweepTx.sweptVtxos || [],
},
};
}
Why it matters
Clients using getTransactionsStream will silently miss sweep events (dropped at console.warn). Swept VTXO outpoints are needed for wallet sync to mark outputs as swept.
Reference
Context
arkd PR #988 (merged 2026-03-23) added two API changes that ts-sdk needs to implement:
1. New
sweep_txfield inGetTransactionsStreamResponse(service.proto field 4)2. New
swept_vtxosfield inTxNotification(types.proto field 6)Current state (verified 2026-05-22)
sweptVtxosis already handled in the subscription stream (getSubscription) in both:providers/indexer.tslines 508–510providers/expoIndexer.tslines 106–108These cover the subscription stream, NOT the transactions stream.
Remaining work in
src/providers/ark.tsTxNotificationinterface (line 175) — addsweptVtxos?: Outpoint[]getTransactionsStreamreturn type (line 247–250) — addsweepTx?: TxNotificationparseTransactionNotification()(lines 855–890) — add handler fordata.sweepTxbefore theconsole.warnfallthroughRequired changes in
src/providers/ark.tsTxNotificationinterfaceAdd:
sweptVtxos?: Outpoint[]getTransactionsStreamreturn typeparseTransactionNotification()Why it matters
Clients using
getTransactionsStreamwill silently miss sweep events (dropped atconsole.warn). Swept VTXO outpoints are needed for wallet sync to mark outputs as swept.Reference