@sodot/sodot-node-sdk • Docs
@sodot/sodot-node-sdk / EcdsaPublicKey
An ECDSA public key, generated by the ECDSA.keygen function.
You can get the compressed form (33 bytes) via the serializeCompressed function,
or the uncompressed form (65 bytes) via the serializeUncompressed function.
new EcdsaPublicKey(
pubkey):EcdsaPublicKey
• pubkey: string | Uint8Array<ArrayBufferLike>
The uncompressed public key as a Uint8Array or a hex string. If the Uint8Array is 65 bytes long (SEC1 encoding), the first byte will be ignored.
A new EcdsaPublicKey object
pubKeyAsHex():
string
string
The public key as a hex string.
serializeCompressed():
Uint8Array<ArrayBufferLike>
Uint8Array<ArrayBufferLike>
The compressed public key as a Uint8Array of length 33.
serializeUncompressed():
Uint8Array<ArrayBufferLike>
Uint8Array<ArrayBufferLike>
The uncompressed public key as a Uint8Array of length 65.