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

@nimiq/core/types/wasm/web.d.ts:1830


signature

readonly signature: ES256Signature | Signature

The embedded signature.

Defined in

@nimiq/core/types/wasm/web.d.ts:1834

Methods

free()

free(): void

Returns

void

Defined in

@nimiq/core/types/wasm/web.d.ts:1774


isSignedBy()

isSignedBy(sender): boolean

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

Parameters

sender: Address

Returns

boolean

Defined in

@nimiq/core/types/wasm/web.d.ts:1821


serialize()

serialize(): Uint8Array

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

Returns

Uint8Array

Defined in

@nimiq/core/types/wasm/web.d.ts:1826


verify()

verify(data): boolean

Verifies the signature proof against the provided data.

Parameters

data: Uint8Array

Returns

boolean

Defined in

@nimiq/core/types/wasm/web.d.ts:1815


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

@nimiq/core/types/wasm/web.d.ts:1790


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

@nimiq/core/types/wasm/web.d.ts:1781


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

@nimiq/core/types/wasm/web.d.ts:1809


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

@nimiq/core/types/wasm/web.d.ts:1799