@semaphore-protocol/identity 4.4.1 → 4.5.0
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 +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/README.md
CHANGED
|
@@ -129,3 +129,11 @@ const signature = identity.signMessage(message)
|
|
|
129
129
|
|
|
130
130
|
Identity.verifySignature(message, signature, identity.publicKey)
|
|
131
131
|
```
|
|
132
|
+
|
|
133
|
+
\# **Identity.generateCommitment**(publicKey: _Point_): _bigint_
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { Identity } from "@semaphore-protocol/identity"
|
|
137
|
+
|
|
138
|
+
Identity.generateCommitment(identity.publicKey)
|
|
139
|
+
```
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { Point } from "@zk-kit/baby-jubjub";
|
|
3
|
-
import { Signature } from "@zk-kit/eddsa-poseidon";
|
|
3
|
+
import { type Signature } from "@zk-kit/eddsa-poseidon";
|
|
4
4
|
import type { BigNumberish } from "@zk-kit/utils";
|
|
5
|
+
export type { Point };
|
|
6
|
+
export type { Signature };
|
|
5
7
|
/**
|
|
6
8
|
* The Semaphore identity is essentially an {@link https://www.rfc-editor.org/rfc/rfc8032 | EdDSA}
|
|
7
9
|
* public/private key pair. The {@link https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/eddsa-poseidon | EdDSA implementation}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Point } from "@zk-kit/baby-jubjub"
|
|
2
|
-
import { EdDSAPoseidon, Signature, signMessage, verifySignature } from "@zk-kit/eddsa-poseidon"
|
|
2
|
+
import { EdDSAPoseidon, type Signature, signMessage, verifySignature } from "@zk-kit/eddsa-poseidon"
|
|
3
3
|
import type { BigNumberish } from "@zk-kit/utils"
|
|
4
4
|
import { base64ToBuffer, bufferToBase64, textToBase64 } from "@zk-kit/utils/conversions"
|
|
5
5
|
import { isString } from "@zk-kit/utils/type-checks"
|
|
6
6
|
import { poseidon2 } from "poseidon-lite/poseidon2"
|
|
7
7
|
|
|
8
|
+
export type { Point }
|
|
9
|
+
export type { Signature }
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* The Semaphore identity is essentially an {@link https://www.rfc-editor.org/rfc/rfc8032 | EdDSA}
|
|
10
13
|
* public/private key pair. The {@link https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/eddsa-poseidon | EdDSA implementation}
|