Signer

Defines the interface for a signer that can sign data, retrieve its public key.

Table of contents

Properties

Properties

init

• init: () => Promise<void>

Initializes the signer, performing any necessary setup or configuration.

Type declaration

â–¸ (): Promise<void>

Returns

Promise<void>


sign

• sign: (signerAddress: string, signerData: SignerData, options: { note?: string }) => Promise<{ sig: Signature ; pk: Uint8Array }>

Signs the provided data using the private key associated with the signer's address.

Type declaration

â–¸ (signerAddress, signerData, options): Promise<{ sig: Signature ; pk: Uint8Array }>

Parameters

Name
Type
Description

signerAddress

string

The address of the signer

signerData

The data to be signed, which can be a raw message or custom data

options

Object

Additional options

options.note?

string

An optional note to include with the transaction

Returns

Promise<{ sig: Signature ; pk: Uint8Array }>


getPublicKey

• getPublicKey: (address: string) => Promise<Uint8Array>

Retrieves the public key associated with the signer's address.

Type declaration

â–¸ (address): Promise<Uint8Array>

Parameters

Name
Type
Description

address

string

The address of the signer

Returns

Promise<Uint8Array>

Last updated

Was this helpful?