Skip to main content

Class: Ed25519ProtocolSigner

Defined in: packages/overcast-core/src/protocol-signer.ts:47

The default OvercastProtocolSigner: ed25519 over @noble/ed25519, a pure-JS implementation that runs identically in Node, browsers and other runtimes (no dependency on Node's built-in crypto). Built from a 32-byte seed (the leading half of an ed25519 secret key); createProtocolSigner derives that seed from the config's privateKey.

Use Ed25519ProtocolSigner.create rather than new — deriving the public key from the seed is async.

Implements

Properties

publicKey

readonly publicKey: string;

Defined in: packages/overcast-core/src/protocol-signer.ts:49

The signer's public key / address.

Implementation of

OvercastProtocolSigner.publicKey

Methods

sign()

sign(payload): Promise<string>;

Defined in: packages/overcast-core/src/protocol-signer.ts:59

ed25519-sign an arbitrary byte payload, returning the detached signature as an Id (base58-encoded, the canonical Id encoding).

Parameters

ParameterType
payloadUint8Array

Returns

Promise<string>

Implementation of

OvercastProtocolSigner.sign


signOperation()

signOperation(op): Promise<SignedOperation>;

Defined in: packages/overcast-core/src/protocol-signer.ts:63

Parameters

ParameterType
opOperation

Returns

Promise<SignedOperation>

Implementation of

OvercastProtocolSigner.signOperation


create()

static create(seed): Promise<Ed25519ProtocolSigner>;

Defined in: packages/overcast-core/src/protocol-signer.ts:54

Derive the public key from the seed and build the signer.

Parameters

ParameterType
seedUint8Array

Returns

Promise<Ed25519ProtocolSigner>