On this page
Class: Signature
A signature represents a cryptocraphic proof that a private key signed some data. It can be verified with the private key's public key.
Table of contents
Constructors
Methods
Constructors
constructor
• new Signature(): Signature
Returns
Methods
free
▸ free(): void
Returns
void
Defined in
web.d.ts:1507
toBytes
▸ toBytes(): Uint8Array
Serializes the signature to a byte array.
Returns
Uint8Array
Defined in
web.d.ts:1520
toHex
▸ toHex(): string
Formats the signature into a hex string.
Returns
string
Defined in
web.d.ts:1533
fromBytes
▸ fromBytes(bytes
): Signature
Deserializes a signature from a byte array.
Throws when the byte array contains less than 64 bytes.
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Defined in
web.d.ts:1515
fromHex
▸ fromHex(hex
): Signature
Parses a signature from its hex representation.
Throws when the string is not valid hex format or when it represents less than 64 bytes.
Parameters
Name | Type |
---|---|
hex | string |
Returns
Defined in
web.d.ts:1528