Variable DERIVATION_PATHSConst

DERIVATION_PATHS: {
    identity: "me2em/identity/v1/root";
    handle: ((name: string) => string);
    subhandle: ((handleName: string, subName: string) => string);
    p2pChannelV2: "me2em/p2p-channel/v2";
} = ...

Deterministic derivation paths for the Me2em protocol.

All HKDF info strings used to derive Identity, Handle, and SubHandle keys are centralized here. This guarantees that:

  • Identity.deriveHandle(name) and Handle.deriveSubHandle(subName) produce the same key as Identity.deriveSubHandle(name, subName).
  • Any future change to derivation paths is a single-line edit.

Type declaration

  • Readonlyidentity: "me2em/identity/v1/root"

    Info string for deriving the root Identity key from the seed. Constant value: "me2em/identity/v1/root".

  • Readonlyhandle: ((name: string) => string)

    Builds the info string for deriving a Handle from an Identity.

      • (name): string
      • Parameters

        • name: string

          The Handle name (will be normalized).

        Returns string

        The info string, e.g. "me2em/handle/v1/station-001".

  • Readonlysubhandle: ((handleName: string, subName: string) => string)

    Builds the info string for deriving a SubHandle from a Handle.

      • (handleName, subName): string
      • Parameters

        • handleName: string

          The parent Handle name (will be normalized).

        • subName: string

          The SubHandle name (will be normalized).

        Returns string

        The info string, e.g. "me2em/subhandle/v1/station-001/connector-1".

  • Readonlyp2pChannelV2: "me2em/p2p-channel/v2"

    Versioned info string for peer-to-peer channel key derivation. v2 binds both peers' public keys into the derivation, preventing unknown key-share attacks. The peer keys are appended in sorted order so both parties derive the identical string.