Minimal Anti Collusion Infrastructure (MACI) v2.0.0-alpha / sign
Function: sign()
sign(
privateKey
,message
):Signature
<bigint
>
Signs a message using the provided private key, employing Poseidon hashing and EdDSA with the Baby Jubjub elliptic curve.
The private key must be an instance of Buffer, Uint8Array or a string. The input will be used to generate entropy and there is no limit in size. The string is used as a set of raw bytes (in UTF-8) and is typically used to pass passwords or secret messages. If you want to pass a bigint, a number or a hexadecimal, be sure to convert them to one of the supported types first. The 'conversions' module in @zk-kit/utils provides a set of functions that may be useful in case you need to convert types.
Parameters
• privateKey: string
| Uint8Array
| Buffer
The private key used to sign the message.
• message: BigNumberish
The message to be signed.
Returns
Signature
<bigint
>
The signature object, containing properties relevant to EdDSA signatures, such as 'R8' and 'S' values.
Defined in
node_modules/.pnpm/@zk-kit+eddsa-poseidon@1.0.2/node_modules/@zk-kit/eddsa-poseidon/dist/types/eddsa-poseidon.d.ts:57