interface · Browser and Node
Signer
@toip-tools/eventlogView sourceimport { type Signer } from "@toip-tools/eventlog";
Declaration
interface Signer {
/** Defaults to Ed25519 when absent. */
readonly curve?: Curve;
/** 32 bytes for Ed25519; 33 bytes (compressed point) for P-256. */
readonly publicKey: Uint8Array;
sign(message: Uint8Array): Promise<Uint8Array | WrappedSignature>;
}
Properties
curveoptional · readonlyCurve | undefinedDefaults to Ed25519 when absent.
publicKeyrequired · readonlyUint8Array<ArrayBufferLike>32 bytes for Ed25519; 33 bytes (compressed point) for P-256.
Methods
sign
sign(message: Uint8Array): Promise<Uint8Array | WrappedSignature>;
Parameters
messagerequiredUint8Array<ArrayBufferLike>
Returns
Promise<Uint8Array<ArrayBufferLike> | WrappedSignature>