Skip to content

Class: SignatureProof

A signature proof represents a signature together with its public key and the public key's merkle path. It is used as the proof for transactions.

Constructors

new SignatureProof()

new SignatureProof(): SignatureProof

Returns

SignatureProof

Properties

publicKey

readonly publicKey: ES256PublicKey | PublicKey

The embedded public key.

Defined in

web.d.ts:1831


signature

readonly signature: ES256Signature | Signature

The embedded signature.

Defined in

web.d.ts:1835

Methods

free()

free(): void

Returns

void

Defined in

web.d.ts:1775


isSignedBy()

isSignedBy(sender): boolean

Checks if the signature proof is signed by the provided address.

Parameters

sender: Address

Returns

boolean

Defined in

web.d.ts:1822


serialize()

serialize(): Uint8Array

Serializes the proof to a byte array, e.g. for assigning it to a transaction.proof field.

Returns

Uint8Array

Defined in

web.d.ts:1827


verify()

verify(data): boolean

Verifies the signature proof against the provided data.

Parameters

data: Uint8Array

Returns

boolean

Defined in

web.d.ts:1816


multiSig()

static multiSig(signer_key, public_keys, signature): SignatureProof

Creates a Ed25519/Schnorr signature proof for a multi-sig signature. The public keys can also include ES256 keys.

Parameters

signer_key: PublicKey

public_keys: (ES256PublicKey | PublicKey)[]

signature: Signature

Returns

SignatureProof

Defined in

web.d.ts:1791


singleSig()

static singleSig(public_key, signature): SignatureProof

Creates a Ed25519/Schnorr signature proof for a single-sig signature.

Parameters

public_key: PublicKey

signature: Signature

Returns

SignatureProof

Defined in

web.d.ts:1782


webauthnMultiSig()

static webauthnMultiSig(signer_key, public_keys, signature, authenticator_data, client_data_json): SignatureProof

Creates a Webauthn signature proof for a multi-sig signature.

Parameters

signer_key: ES256PublicKey | PublicKey

public_keys: (ES256PublicKey | PublicKey)[]

signature: ES256Signature | Signature

authenticator_data: Uint8Array

client_data_json: Uint8Array

Returns

SignatureProof

Defined in

web.d.ts:1810


webauthnSingleSig()

static webauthnSingleSig(public_key, signature, authenticator_data, client_data_json): SignatureProof

Creates a Webauthn signature proof for a single-sig signature.

Parameters

public_key: ES256PublicKey | PublicKey

signature: ES256Signature | Signature

authenticator_data: Uint8Array

client_data_json: Uint8Array

Returns

SignatureProof

Defined in

web.d.ts:1800