winterwallet-client 0.1.0

Off-chain client helpers for the WinterWallet Solana program: instruction builders, PDAs, transaction planning, and wallet state.
Documentation

Off-chain client for the WinterWallet program.

Provides instruction builders, PDA derivation, preimage construction, CPI payload encoding, and on-chain state deserialization.

Example: Build an Advance(Withdraw) plan

use winterwallet_client::*;
use winterwallet_common::WINTERNITZ_SCALARS;

// 1. Build a plan. It owns the payload + account order.
let plan = AdvancePlan::withdraw(&wallet_pda, &receiver, lamports, &new_root)?;

// 2. Compute preimage and sign.
let preimage = plan.preimage(&id, current_root);
let sig = keypair.sign_and_increment::<WINTERNITZ_SCALARS>(&preimage);

// 3. Build the Advance instruction.
let ix = plan.instruction(sig.as_bytes().try_into().unwrap());