@me2em/core
    Preparing search index...

    Interface WalletAdapter

    A chain adapter registered for exactly one CAIP-2 chain (Документ 2 v1.2 §2). core never imports chain packages; chain packages register adapters into the process-wide registry (registerWalletAdapter) and the payment layer resolves them by exact key (getWalletAdapter).

    interface WalletAdapter {
        chain: string;
        resolveWallet(
            entity: WalletEntityRef,
            opts?: { seed?: Uint8Array; index?: number },
        ): Promise<WalletDescriptor>;
        isValidAddress(address: string): boolean;
        nextIndex?(usedPaths: string[]): number;
    }

    Hierarchy (View Summary)

    Index
    chain: string

    Exact CAIP-2 chain this adapter handles — also its registry key.

    • Resolves (derives or attaches) the entity's wallet on this chain. Deterministic adapters require opts.seed; without it they reject with TypeError. Attach-only adapters ignore seed.

      Parameters

      • entity: WalletEntityRef
      • Optionalopts: { seed?: Uint8Array; index?: number }

      Returns Promise<WalletDescriptor>

    • Structural address check (format only — no network, no on-curve).

      Parameters

      • address: string

      Returns boolean

    • Optional: chain-scoped index allocation from used derivation paths (v1.2 §2.2). The adapter parses its own path formats; an empty input — or an input that is empty after filtering to the adapter's own paths — yields 0; otherwise max(indexes) + 1 (holes are never reused); paths the adapter cannot parse are ignored, never thrown on. Callers filter paths by subjectWalletChain before handing them over. core performs NO fallback when the method is absent — index allocation is caller responsibility.

      Parameters

      • usedPaths: string[]

      Returns number