@semaphore-protocol/identity 4.0.0-alpha.8 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -14
- package/dist/index.browser.js +347 -257
- package/dist/index.node.cjs +56 -12
- package/dist/index.node.js +56 -12
- package/dist/types/identity.d.ts +58 -10
- package/package.json +5 -3
- package/src/identity.ts +63 -23
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<a href="https://npmjs.org/package/@semaphore-protocol/identity">
|
|
19
19
|
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/identity.svg?style=flat-square" />
|
|
20
20
|
</a>
|
|
21
|
-
<a href="https://js.semaphore.pse.dev/
|
|
21
|
+
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_identity">
|
|
22
22
|
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
|
|
23
23
|
</a>
|
|
24
24
|
<a href="https://eslint.org/">
|
|
@@ -70,6 +70,8 @@ yarn add @semaphore-protocol/identity
|
|
|
70
70
|
|
|
71
71
|
## 📜 Usage
|
|
72
72
|
|
|
73
|
+
For more information on the functions provided by `@semaphore-protocol/identity`, please refer to the [TypeDoc documentation](https://js.semaphore.pse.dev/modules/_semaphore_protocol_identity).
|
|
74
|
+
|
|
73
75
|
\# **new Identity**(privateKey?: _BigNumberish_): _Identity_
|
|
74
76
|
|
|
75
77
|
```typescript
|
|
@@ -93,19 +95,6 @@ const identity = new Identity()
|
|
|
93
95
|
const signature = identity.signMessage(message)
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
\# **identity.verifySignature**(message: _BigNumberish_, signature: _Signature_): _boolean_
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
import { Identity } from "@semaphore-protocol/identity"
|
|
100
|
-
|
|
101
|
-
const message = "message"
|
|
102
|
-
const identity = new Identity()
|
|
103
|
-
|
|
104
|
-
const signature = identity.signMessage(message)
|
|
105
|
-
|
|
106
|
-
identity.verifySignature(message, signature)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
98
|
\# **Identity.verifySignature**(message: _BigNumberish_, signature: _Signature_, publicKey: _Point_): _boolean_
|
|
110
99
|
|
|
111
100
|
```typescript
|