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
Properties
publicKey
readonly
publicKey:ES256PublicKey
|PublicKey
The embedded public key.
Defined in
@nimiq/core/types/wasm/web.d.ts:2027
signature
readonly
signature:ES256Signature
|Signature
The embedded signature.
Defined in
@nimiq/core/types/wasm/web.d.ts:2031
ES256_SINGLE_SIG_SIZE
readonly
static
ES256_SINGLE_SIG_SIZE:number
Defined in
@nimiq/core/types/wasm/web.d.ts:2022
SINGLE_SIG_SIZE
readonly
static
SINGLE_SIG_SIZE:number
Defined in
@nimiq/core/types/wasm/web.d.ts:2023
Methods
free()
free():
void
Returns
void
Defined in
@nimiq/core/types/wasm/web.d.ts:1958
isSignedBy()
isSignedBy(
sender
):boolean
Checks if the signature proof is signed by the provided address.
Parameters
sender
Returns
boolean
Defined in
@nimiq/core/types/wasm/web.d.ts:2005
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:2010
toPlain()
toPlain():
PlainTransactionProof
Creates a JSON-compatible plain object representing the signature proof.
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:2015
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:1999
deserialize()
static
deserialize(bytes
):SignatureProof
Deserializes a signature proof from a byte array.
Parameters
bytes
Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:2021
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
public_keys
(ES256PublicKey
| PublicKey
)[]
signature
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1974
singleSig()
static
singleSig(public_key
,signature
):SignatureProof
Creates a Ed25519/Schnorr signature proof for a single-sig signature.
Parameters
public_key
signature
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1965
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
public_keys
(ES256PublicKey
| PublicKey
)[]
signature
authenticator_data
Uint8Array
client_data_json
Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1993
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
signature
authenticator_data
Uint8Array
client_data_json
Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1983