Skip to content

Add PDA wallet public seed helper#448

Open
onspeedhp wants to merge 1 commit into
solana-program:mainfrom
onspeedhp:codex/pda-passkey-public-seed-helper
Open

Add PDA wallet public seed helper#448
onspeedhp wants to merge 1 commit into
solana-program:mainfrom
onspeedhp:codex/pda-passkey-public-seed-helper

Conversation

@onspeedhp

Copy link
Copy Markdown

Summary

  • Add a small Rust helper for PDA-wallet confidential-balance public_seed encoding.
  • Expose the helper through the wasm ConfidentialKeys.pdaWalletPublicSeed(...) API with 32-byte field validation.
  • Document the helper in the wasm README for passkey/PDA wallet flows.

Why

PR #427 added the WebAuthn PRF adapter and intentionally kept public_seed caller-defined. This helper gives single-signer PDA wallets a shared encoding for program_id || wallet_pda || mint || token_account, reducing seed-convention drift without changing the underlying derivation or crypto.

Testing

  • cargo test -p solana-zk-sdk pda_wallet_public_seed --lib
  • cargo build --target wasm32-unknown-unknown -p solana-zk-sdk-wasm-js
  • cargo test -p solana-zk-sdk-wasm-js --target wasm32-unknown-unknown pda_wallet_public_seed --no-run

@onspeedhp onspeedhp marked this pull request as ready for review June 19, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant