@me2em/core
    Preparing search index...

    Function verifyWalletBinding

    • Default wallet-binding check (v1.2 §6): answers "does this attestation bind this wallet to this entity?".

      Order of the three fail-closed checks:

      1. Signature — the token verifies against the expected issuer public key (Attestation.verifySignature).
      2. Subject agreement — the attestation must attest THIS entity (payload.subjectId === entity.id); without it any valid attestation of a different subject would "bind" its wallet here.
      3. Address equality — payload.subjectWallet string-equals the wallet address to be bound; an attestation without wallet fields fails (undefined never equals an address).

      On-curve checking and path re-derivation are NOT part of the default — they are adapter overrides (Mode 1) per v1.2 §6/§6.1.

      Parameters

      Returns Promise<boolean>

      false on every failed check — never throws for a verification mismatch (only structural token errors surface as AttestationError from verifySignature/decode, per its contract).

      const ok = await verifyWalletBinding(wallet, entity, attestation, {
      issuerPublicKey: rootIdentity.getPublicKey(),
      });