Deposit
Deposit tokens into the Trident vault on any chain where you have a registered provider/signer. The SDK handles ERC-20 approval if the current allowance is insufficient.
Example: Deposit Tokens
Section titled “Example: Deposit Tokens”use alloy_primitives::{address, U256};
let domain = 1; // Avalanchelet token = address!("..."); // Token contract address on Avalanchelet amount = U256::from(1_000_000); // Amount in token's smallest unit
let receipt = client.deposit(domain, token, amount).await?;println!("Deposit tx: {:?}", receipt.transaction_hash);After the deposit transaction confirms and the attester finalizes the block, your balance becomes spendable on any supported chain. Finalization time depends on the source chain’s block finality.