OptionalrenewalConfig: RenewalConfigOptionalsettlementConfig: false | SettlementConfigOptional ReadonlyrenewalReadonlysettlementReadonlywalletGet boarding inputs whose timelock has expired.
These inputs can no longer be onboarded cooperatively via settle() and
must be swept back to a fresh boarding address using the unilateral exit path.
OptionalprefetchedUtxos: ExtendedCoin[]Array of expired boarding inputs
Get virtual outputs that are expiring soon based on renewal configuration
OptionalthresholdMs: numberOptional override for threshold in milliseconds
Array of expiring virtual outputs, empty array if renewal is disabled or no virtual outputs expiring
const wallet = await Wallet.create({
identity,
arkServerUrl: 'https://arkade.computer',
settlementConfig: {
vtxoThreshold: 86_400 // 24 hours
},
});
const manager = await wallet.getVtxoManager();
const expiringVtxos = await manager.getExpiringVtxos();
if (expiringVtxos.length > 0) {
console.log(`${expiringVtxos.length} virtual outputs expiring soon`);
}
Get information about recoverable balance without executing recovery.
Useful for displaying to users before they decide to recover funds.
Object containing recoverable amounts and subdust information
const manager = await wallet.getVtxoManager();
const balance = await manager.getRecoverableBalance();
if (balance.recoverable > 0n) {
console.log(`You can recover ${balance.recoverable} sats`);
if (balance.includesSubdust) {
console.log(`This includes ${balance.subdust} sats from subdust virtual outputs`);
}
}
Recover swept/expired virtual outputs by settling them back to the wallet's Arkade address.
This method:
Note: Settled virtual outputs with long expiry are NOT recovered to avoid locking liquidity unnecessarily. Only preconfirmed subdust is recovered to consolidate small amounts.
OptionaleventCallback: (event: SettlementEvent) => voidOptional callback to receive settlement events
Settlement transaction ID
Renew expiring virtual outputs by settling them back to the wallet's address
This method collects all expiring spendable virtual outputs (including recoverable ones) and settles them back to the wallet, effectively refreshing their expiration time. This is the primary way to prevent virtual outputs from expiring.
OptionaleventCallback: (event: SettlementEvent) => voidOptional callback for settlement events
Settlement transaction ID
Sweep expired boarding inputs back to a fresh boarding address via the unilateral exit path (onchain self-spend).
This builds a raw onchain transaction that:
No Arkade server involvement is needed — this is a pure onchain transaction.
OptionalprefetchedUtxos: ExtendedCoin[]The broadcast transaction ID
const wallet = await Wallet.create({
identity,
arkServerUrl: 'https://arkade.computer',
settlementConfig: {
boardingUtxoSweep: true,
},
});
const manager = await wallet.getVtxoManager();
try {
const txid = await manager.sweepExpiredBoardingUtxos();
console.log('Swept expired boarding inputs:', txid);
} catch (e) {
console.log('No sweep needed or not economical');
}
VtxoManager is a unified class for managing virtual output lifecycle operations including recovery of swept/expired virtual outputs and renewal to prevent expiration.
Key Features:
Virtual outputs become recoverable when:
Example