Represents the root cryptographic identity derived from a seed phrase.

An Identity is the foundation of the Me2em protocol. It allows for the hierarchical derivation of isolated Handles for different contexts (e.g., email, social, specific devices) from a single master seed, ensuring zero cross-contamination of cryptographic material.

Methods

  • Initializes a new Identity from a BIP39 mnemonic seed phrase or raw seed bytes.

    Parameters

    • seed: string | Uint8Array

      A 12 or 24-word BIP39 mnemonic string, or a raw Uint8Array seed.

    Returns Promise<Identity>

    A Promise resolving to a new Identity instance.

    If the provided seed is invalid or cannot be processed.

  • Derives a new, cryptographically isolated Handle for a specific context.

    Each Handle is derived deterministically. The same name and metadata will always produce the same Handle from the same Identity, but different names produce completely unrelated keys.

    Parameters

    Returns Promise<Handle>

    A Promise resolving to the derived Handle.

  • Retrieves the public key of the root Identity.

    Returns Uint8Array

    A Uint8Array containing the 32-byte Ed25519 public key.