One-time initializer wiring the native XLM token contract address. After init, the token reference is immutable — there is no setter.
fn init(
env: soroban_sdk::Env,
token: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
Add more funds to an existing vault. Does not alter unlock_timestamp.
fn deposit(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
vault_id: u64,
amount: i128,
) -> Result<(), soroban_sdk::Error>
Withdraw the full vault balance to the owner address.
Reverts with StillLocked if env.ledger().timestamp() < unlock_timestamp.
fn withdraw(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
vault_id: u64,
) -> Result
Read-only — fetch a vault by id.
fn get_vault(env: soroban_sdk::Env, vault_id: u64) -> Result
Read-only — list vault ids owned by owner.
fn list_owned(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
) -> soroban_sdk::Vec
Push the unlock timestamp further into the future by additional_seconds.
Reducing or zeroing the lock is impossible — there is no set_unlock API.
fn extend_lock(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
vault_id: u64,
additional_seconds: u64,
) -> Result
Create a vault and lock initial_deposit of the configured asset.
unlock_timestamp is recorded immutably; it can only ever be PUSHED
FORWARD via extend_lock.
fn create_vault(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
name: soroban_sdk::String,
initial_deposit: i128,
unlock_timestamp: u64,
) -> Result