@me2em/solana
    Preparing search index...

    Class SolanaWalletTree

    Deterministic Solana wallet tree over one 64-byte seed (Документ 2 v1.2 §4.1).

    • Seed contract — exactly 64 bytes, the same as Identity.fromSeed / crypto.slip10.masterKeyFromSeed; anything else throws TypeError.
    • The seed is never retained. fromSeed derives the master node once and keeps ONLY the 32-byte IL/IR pair in #private fields; the caller's buffer is neither read again nor wiped (the caller owns it). Mutating the seed after fromSeed never changes subsequent derivations.
    • Fresh buffers. deriveWallet returns a freshly derived private key; the tree's master material is never exposed, and the child chain code (not returned) is wiped immediately.
    • Dispose wipes. dispose() zeroizes the master key material; every key-requiring call afterwards throws DisposedError.
    import { SolanaWalletTree } from '@me2em/solana';
    import { secureWipe } from '@me2em/crypto';

    const tree = SolanaWalletTree.fromSeed(seed64);
    try {
    const { address, privateKey, derivationPath } = await tree.deriveWallet(0);
    // … sign / bind / attest …
    secureWipe(privateKey); // caller MUST wipe
    } finally {
    tree.dispose();
    }
    Index
    • Builds the tree from a 64-byte seed.

      The seed is CONSUMED by derivation and NOT retained (only the derived master key + chain code are kept, in private fields); the caller's buffer is not wiped — the caller owns it.

      Parameters

      • seed: Uint8Array

      Returns SolanaWalletTree

      if seed is not a Uint8Array of exactly 64 bytes (delegated contract of crypto.slip10.masterKeyFromSeed).

    • Derives the payment wallet at index: m/44'/501'/{index}'/0' → SLIP-0010 ed25519 → base58 address.

      Deterministic: the same seed and index always produce a byte-identical address and private key.

      Parameters

      • index: number

      Returns Promise<SolanaDerivedWallet>

      The derived wallet. The caller MUST wipe privateKey after use (secureWipe).

      if index is not a safe integer in 0..2^31 − 1.

    • Chain-scoped index allocation over used m/44'/501'/N'/0' paths (v1.2 §2.2) — pure planning over the caller's persisted paths. Needs no key material, so it keeps working after SolanaWalletTree.dispose.

      Parameters

      • usedPaths: string[]

      Returns number

      if usedPaths is not an array.

    • Zeroizes the master key material. Idempotent. After the FIRST call every key-requiring method throws DisposedError (code === 'DISPOSED'); nextIndex — which needs no key material — keeps working, mirroring core's dispose semantics (capabilities are revoked, information stays).

      Returns void