Skip to content
Get startedGetting started →

createEd25519SigningSession

Creates a signing session from an Ed25519 private key.

import { createEd25519SigningSession } from "@category-labs/mera";
import {
createEd25519SigningSession,
getSolanaAddress,
} from "@category-labs/mera";
const privateKey = crypto.getRandomValues(new Uint8Array(32));
const message = new TextEncoder().encode("hello mera");
const session = createEd25519SigningSession({ privateKey });
const address = getSolanaAddress(session.publicKey);
const signature = await session.signMessage(message);
session.end();

options is a CreateSigningSessionOptions.

  • Type: Uint8Array
  • Required

Ed25519 private key (the 32-byte seed).

A live Ed25519SigningSession.