Boarding is the process of moving Bitcoin from an onchain wallet into the Ark. Once boarded, funds can be used for instant, low-fee Ark payments.
Boarding requires an onchain wallet. Create your wallet with Wallet::create_with_onchain() or use Wallet::open_with_onchain() to access boarding functionality.
Periodically check if boards have sufficient confirmations and register them:
// Sync pending boards (checks confirmations and registers if ready)wallet.sync_pending_boards().await?;// Or use comprehensive maintenancewallet.maintenance_with_onchain(&mut onchain_wallet).await?;
The number of confirmations required is determined by the Ark server:
// Get server info including confirmation requirementslet ark_info = wallet.ark_info().await?.expect("connected to server");println!("Required confirmations: {}", ark_info.required_board_confirmations);println!("Minimum board amount: {}", ark_info.min_board_amount);
Paid to Bitcoin miners for including the board transaction:
// These fees are calculated automatically based on current fee rateslet fee_rates = wallet.chain.fee_rates().await;println!("Regular fee rate: {}", fee_rates.regular);
// This is called automatically by sync_pending_boards()// but you can also call it explicitlywallet.register_all_confirmed_boards(&mut onchain_wallet).await?;
Boarding creates VTXOs with an expiry. If a board transaction doesn’t receive enough confirmations before the VTXO expires, it will automatically be marked for unilateral exit.
1
Check minimum amounts
Always verify the server’s minimum board amount before boarding:
let ark_info = wallet.ark_info().await?.expect("connected");if amount < ark_info.min_board_amount { println!("Amount too small: minimum is {}", ark_info.min_board_amount);}
2
Monitor pending boards
Regularly sync pending boards to register them as soon as possible:
// Sync every 30 seconds until registeredwallet.sync_pending_boards().await?;
3
Account for both fee types
When calculating the total cost, include both onchain and service fees.