sign
sign(
instance
,payload
,publicKey
):Promise
<Bytes
>
Defined in: astrobase/src/ecdsa/ecdsa.ts:19
Sign a message with ECDSA using Keyring.
Parameters
Section titled “Parameters”instance
Section titled “instance”The Instance config.
payload
Section titled “payload”Uint8Array
The buffer of the payload to sign.
publicKey
Section titled “publicKey”Uint8Array
The buffer of the public key of the target identity to sign as.
Returns
Section titled “Returns”Promise
<Bytes
>
The buffer of the signature in a Promise.
Throws
Section titled “Throws”If the private key is unavailable (i.e. wrong or no keyring loaded).