Skip to main content

Class: OvercastProtocolSigner

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

Signs 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 an Operation's digest, 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, so this lives in core outside any settlement layer or ProtocolFactory: createProtocolSigner builds one straight from the OvercastConfig (its privateKey). Supply ["protocolSigner"] to plug in your own instead.

This is only the key — the account it signs on behalf of (an operation's creator) is the app-wide OvercastApp.owner. The two match for a self-custodied signer; a delegate signer (e.g. a KMS key authorized via key add) signs with its own key for someone else's wallet.

Constructors

Constructor

new OvercastProtocolSigner(rawSigner): OvercastProtocolSigner;

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

Parameters

ParameterType
rawSignerRawSigner

Returns

OvercastProtocolSigner

Properties

rawSigner

readonly rawSigner: RawSigner;

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

Accessors

curve

Get Signature

get curve(): SignatureCurve;

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

The curve this protocol signer operates on

Returns

SignatureCurve


publicKey

Get Signature

get publicKey(): Bytes32;

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

The wrapped key, i.e. what lands in SignedOperation.signingKey.

Returns

Bytes32

Methods

signOperation()

signOperation(op): Promise<SignedOperation>;

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

Sign a whole Operation. The digest and envelope are the operation's business, so this just hands itself over — every RawSigner implementation gets it for free.

Parameters

ParameterType
opOperation

Returns

Promise<SignedOperation>