Compare the refresh options
An interactive refresh needs the wallet app online through the round, a delegated one only while it submits, and every option needs it back online before the old VTXOs expire
- Interactive: The participation stalls, a later maintenance pass cancels it, and the refresh starts over in a new round. Nothing is refreshed. The pass does not cancel a participation whose round already finished. The next sync after the round transaction confirms completes it.
- Delegated and scheduled: The server carries the round once. A round that skips the participation, for example a full one, leaves it for the next round. The new VTXO stays hash-locked until the app returns and forfeits the old VTXOs. Make the app return before those expire, while an emergency exit on them can still confirm.
Refresh interactively when the app stays online
Pick interactive refresh for any wallet app that can keep its process alive across a round. That includes a server-side integration, a node, a desktop app, or a browser tab the user is looking at. It is the default on every surface.- Bark SDK
- Bark CLI
- Barkd
Call
maintenance() to run the full pass and join the next round with every VTXO that is due, or refreshVtxos(vtxoIds) to refresh a chosen set. When there is something to refresh, both calls wait for the next round to start, then take part in it until the round ends. The wallet app completes the refresh on a later sync, once the round transaction confirms.Delegate the round when the app cannot stay online
Pick delegated refresh when the operating system can suspend your app mid-round, which is the normal case on iOS and Android, and an option on desktop. The Ark server signs the round on the app’s behalf (delegated refreshes walks through the phases).- Bark SDK
- Bark CLI
- Barkd
Call
maintenanceDelegated() for the full pass, or refreshVtxosDelegated(vtxoIds) for a chosen set (same names in Swift, Kotlin, React Native, and Dart). The latter returns the participation’s round state, or nothing when there is nothing to refresh.- The old VTXOs stay spendable until the server issues the round: A send that picks one in that window makes the server drop the participation. On a later sync the app submits a new delegated participation with the inputs that remain. The refresh movement carries on with it. If no input remains, the app marks the refresh movement
failedand drops the participation. It does the same when the remaining inputs cannot cover the refresh fee and leave a non-dust output. In those two cases, submit a new participation. In every other case, the app completes the refresh on the first sync after the round transaction confirms. Until then,pendingRoundStates()lists the participation asdelegated-pending. - The user trusts the server for as long as they hold the new VTXO: Delegated co-signer covers what the server can do meanwhile and what the app checks before it forfeits.
- A mobile app needs background wakes: Background refresh covers waking the app, running the delegated pass, completing each refresh on a later wake, and storing the mnemonic.
Schedule a delegated refresh ahead of time
Pick a scheduled delegated refresh when the app has the user’s attention now and may not have it when the refresh is due, typically during a foreground session on mobile. The app submits the participation with a future block height. The server holds it out of rounds until the chain tip reaches that height.- Bark SDK
- Bark CLI
- Barkd
Call
refreshVtxosScheduled(vtxoIds, scheduledHeight). pendingRoundStates() shows the participation as delegated-pending (a RoundFlowKind case in the native SDK bindings) with the height in scheduledHeight.expiry_height, the same margin as the default refresh threshold, rather than on the last possible block:
- Fee: The server prices the refresh at the scheduled height and locks that price in at submission. Scheduling close to expiry pays the lower bracket the VTXO would reach by then.
- Height limit: The server refuses a height at or past any input VTXO’s
expiry_height. A round has to happen between the scheduled height and expiry.
How Bark Wallet does it
How Bark Wallet does it
- Installed version, interactive: The
barkddaemon does the upkeep. The app’s auto-refresh and “Refresh all” action submit interactive refreshes throughPOST /api/v1/wallet/refresh/vtxosand/refresh/all. - Web version (WASM), delegated: The same actions submit delegated refreshes through the SDK’s
refreshVtxosDelegated. The worker’s sync loop completes them the next time a tab is open. While a tab is open, the bark library’s background daemon can also join a round interactively for the VTXOs its maintenance selection finds due. Maintenance covers how the app runs its refresh check.