@thruputchain/client
    Preparing search index...

    Class Ed25519Signer

    Ed25519 signer backed by an in-memory private key.

    This is convenient for scripts and tests. Browser wallets or production key management systems should usually provide their own Signer implementation instead of exposing raw private keys to application code.

    import { Ed25519Signer } from "@thruputchain/client/signers";

    const signer = Ed25519Signer.fromSeed(seed); // 32 bytes
    const signature = await signer.sign(message);

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create an Ed25519 signer from a 32-byte private key.

      Prefer Ed25519Signer.fromSeed, which validates the key length and matches MlDsa65Signer.fromSeed.

      Parameters

      • secretKey: Uint8Array

      Returns Ed25519Signer

    Properties

    publicKey: {}

    Ed25519 public key derived from the constructor's private key.

    Methods

    • Sign a message with the in-memory Ed25519 private key.

      Parameters

      • message: Uint8Array

      Returns Promise<{}>

    • Create an Ed25519 signer from a 32-byte RFC 8032 private key seed.

      Parameters

      • seed: Uint8Array

      Returns Ed25519Signer