Breaking release addressing 5 architectural gaps surfaced by the v0.1.1 workspace migration.
Highlights
TokenAccountPlanConfig— replaces 4-positional-paramprepare_token_accountswith a config struct. NoDefaultimpl (rent has no safe default); useTokenAccountPlanConfig::with_rent(rent)constructor.AtaCreateMode { Idempotent (default), Legacy }— control whetherprepare_token_accountsemits idempotent or non-idempotent ATA creates.MintIntent::RequireTokenBalance { amount }— validate (not transfer) non-SOL token balance at plan time. Errors withInsufficientBalanceinstead of v0.1's silent drop.TokenMintMetadata— replacesTokenMintWithFee. Now includesprogram_id(free, from account owner) andtransfer_hook_program_id(parsed fromTransferHookextension).- 2 new
TokenErrorvariants —InsufficientBalance { mint, required, actual }andRequireBalanceForSolNotSupported(Pubkey).
Migration
See CHANGELOG.md for the full migration guide with before/after code blocks.
Quick summary:
// Before (v0.1.x)
let plan = prepare_token_accounts(&state, &intent, WrapSolStrategy::Ata, rent)?;
let parsed = get_token_mint_and_transfer_fee(pk, &acc, epoch)?;
// After (v0.2.0)
let plan = prepare_token_accounts(&state, &intent, TokenAccountPlanConfig::with_rent(rent))?;
let parsed = get_token_mint_metadata(pk, &acc, epoch)?;Verification
cargo +nightly fmt --check— cleancargo clippy --all-targets -- -D warnings— cleancargo test— 39 pass (15 unit + 18 integration + 6 doc)cargo doc --no-deps— clean
Provenance
Designed and shipped via the brainstorm → spec → plan → implement → review workflow. Source documents (in the consuming workspace, not this repo):
- Spec: `docs/superpowers/specs/2026-05-03-solana-token-toolkit-v0.2-design.md`
- Plan: `docs/superpowers/plans/2026-05-03-solana-token-toolkit-v0.2.md`
- Driving review: `docs/superpowers/reviews/2026-05-03-waterpump-token-migration-review.md`