Class: Signature
An Ed25519 Signature represents a cryptographic proof that a private key signed some data. It can be verified with the private key's public key.
Constructors
new Signature()
new Signature():
Signature
Returns
Methods
__getClassname()
__getClassname():
string
Returns
string
Defined in
@nimiq/core/types/wasm/web.d.ts:1852
free()
free():
void
Returns
void
Defined in
@nimiq/core/types/wasm/web.d.ts:1848
serialize()
serialize():
Uint8Array
Serializes the signature to a byte array.
Returns
Uint8Array
Defined in
@nimiq/core/types/wasm/web.d.ts:1865
toHex()
toHex():
string
Formats the signature into a hex string.
Returns
string
Defined in
@nimiq/core/types/wasm/web.d.ts:1892
create()
static
create(private_key
,public_key
,data
):Signature
Create a signature from a private key and its public key over byte data.
Parameters
• private_key: PrivateKey
• public_key: PublicKey
• data: Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1873
deserialize()
static
deserialize(bytes
):Signature
Deserializes an Ed25519 signature from a byte array.
Throws when the byte array contains less than 64 bytes.
Parameters
• bytes: Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1860
fromAsn1()
static
fromAsn1(bytes
):Signature
Parses an Ed25519 signature from its ASN.1 representation.
Parameters
• bytes: Uint8Array
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1879
fromHex()
static
fromHex(hex
):Signature
Parses an Ed25519 signature from its hex representation.
Throws when the string is not valid hex format or when it represents less than 64 bytes.
Parameters
• hex: string
Returns
Defined in
@nimiq/core/types/wasm/web.d.ts:1887