semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
876 stars 191 forks source link

fix(identity)!: update type of private key #803

Closed cedoor closed 4 weeks ago

cedoor commented 1 month ago

Description

This fixes #799 by updating the @zk-kit/eddsa-poseidon dependency and adds two methods to export/import encoded (base64) private keys.

The type of the private key in the Identity constructor has also been changed. Now, it must be one of the following: Uint8Array, Buffer, string, i.e. bytes or text, exactly the same as the types supported by @zk-kit/eddsa-poseidon.

This should eliminate the ambiguity of having a string that can be either text or hexadecimal, as it was before.

Related Issue(s)

Fixes #799

Checklist