Classes

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.

Properties

publicKey

`readonly` publicKey: [ES256PublicKey](ES256PublicKey) \| [PublicKey](PublicKey)

The embedded public key.


signature

`readonly` signature: [ES256Signature](ES256Signature) \| [Signature](Signature)

The embedded signature.


ES256_SINGLE_SIG_SIZE

`readonly` `static` ES256\_SINGLE\_SIG\_SIZE: `number`

SINGLE_SIG_SIZE

`readonly` `static` SINGLE\_SIG\_SIZE: `number`

Methods

free()

free(): `void`

isSignedBy()

isSignedBy(`sender`): `boolean`

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

ParameterType
FirstAddress

serialize()

serialize(): `Uint8Array`

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


toPlain()

toPlain(): [PlainTransactionProof](../type-aliases/PlainTransactionProof)

Creates a JSON-compatible plain object representing the signature proof.


verify()

verify(`data`): `boolean`

Verifies the signature proof against the provided data.

ParameterType
FirstUint8Array

deserialize()

`static` deserialize(`bytes`): [SignatureProof](SignatureProof)

Deserializes a signature proof from a byte array.

ParameterType
FirstUint8Array

multiSig()

`static` multiSig(`signer_key`, `public_keys`, `signature`): [SignatureProof](SignatureProof)

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

ParameterType
FirstSignature

singleSig()

`static` singleSig(`public_key`, `signature`): [SignatureProof](SignatureProof)

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

ParameterType
FirstSignature

webauthnMultiSig()

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

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

ParameterType
FirstUint8Array

webauthnSingleSig()

`static` webauthnSingleSig(`public_key`, `signature`, `authenticator_data`, `client_data_json`): [SignatureProof](SignatureProof)

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

ParameterType
FirstUint8Array

On this page