StaticfromInitializes a new Identity from a BIP39 mnemonic seed phrase or raw seed bytes.
The seed is the full 64-byte BIP39 seed (PBKDF2-HMAC-SHA512 output, as produced by get64ByteSeedFromMnemonic). It is used as the HKDF-SHA256 input key material; HKDF info strings are unchanged.
A 64-byte raw Uint8Array seed, or a hex-encoded string of 64 bytes.
A Promise resolving to a new Identity instance.
Derives a new, cryptographically isolated Handle for a specific context.
Each Handle is derived deterministically. The same name will always produce the same Handle from the same Identity, but different names produce completely unrelated keys.
The context identifier (e.g., '[email protected]', 'station-001').
Optionalmetadata: HandleMetadataOptional metadata to associate with this Handle.
A Promise resolving to the derived Handle.
Atomically derives a SubHandle from this Identity by its full path.
This method performs the equivalent of:
const handle = await identity.deriveHandle(handleName);
const sub = await handle.deriveSubHandle(subName);
but in a single call, without exposing the intermediate Handle.
It is the recommended entry point for stateless session verification, because the server only needs the Identity and the path from the token.
The resulting SubHandle is cryptographically identical to the one produced
by Handle.deriveSubHandle(subName) on the same Identity.
The parent Handle name.
The SubHandle name.
Optionalmetadata: SubHandleMetadataOptional SubHandle metadata with constraints.
A Promise resolving to the derived SubHandle with path [handleName, subName].
Signs arbitrary data with the root private key (implements Signer).
This is what makes an Identity acceptable as the signer argument
of Attestation.issue — the raw private key never leaves the
Identity.
The data to be signed, as a Uint8Array.
A Promise resolving to the 64-byte Ed25519 signature.
Issues an attestation binding a derived Handle key to its name
and grant. The subject public key is always derived internally —
it is impossible to attest a foreign key, and the resulting
subjectId always matches the handle reconstructed via
Identity.deriveSubHandle.
Constraints verifiers will enforce for this handle
and (via subNamePatterns) for the SubHandles it may attest.
Optionalopts: { OptionalttlOptionalexpiresOptionaljti?: stringOptionalnow?: numberAn attestation signed by the Identity root key (the
Identity passes itself to Attestation.issue as the Signer).
Store it with the Handle — it is a public artifact, not a secret.
Permanently destroys this Identity's key material.
The private key bytes are zeroized; afterwards every capability method (sign, deriveHandle, deriveSubHandle, attestHandle) throws a DisposedError. Informational getters (getPublicKey) keep working — public keys are not secrets.
Calling dispose() more than once is a no-op (idempotent).
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 and SubHandles for different contexts (e.g., email, social, specific devices) from a single master seed, ensuring zero cross-contamination of cryptographic material.
The Identity provides two derivation entry points: