Skip to main content

Interface: OvercastProtocolSigner

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

Signs arbitrary protocol payloads — not chain transactions. Where an OvercastChainSigner turns a built transaction into an on-chain result, a protocol signer produces a detached signature over raw bytes, used for the protocol's off-chain authorization (e.g. authorizing an offer).

The protocol fixes the signing scheme to the ed25519 curve, and it is not chain-specific: createProtocolSigner builds one in core straight from the OvercastConfig (its privateKey), so it lives outside any settlement layer or ProtocolFactory. Supply OvercastConfig.protocolSigner to plug in your own implementation (e.g. a remote / HSM signer) instead.

Properties

publicKey

readonly publicKey: string;

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

The signer's public key / address.

Methods

sign()

sign(payload): Promise<string>;

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

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>


signOperation()

signOperation(operation): Promise<SignedOperation>;

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

Parameters

ParameterType
operationOperation

Returns

Promise<SignedOperation>