@zkproofport-app/sdk 0.2.1 → 0.2.2

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.
@@ -145,3 +145,22 @@ export declare function getVerifierChainId(circuit: CircuitType, customVerifier?
145
145
  * ```
146
146
  */
147
147
  export declare function extractScopeFromPublicInputs(publicInputsHex: string[], circuit?: string): string | null;
148
+ /**
149
+ * Extracts the nullifier (bytes32) from public inputs based on circuit type.
150
+ *
151
+ * The nullifier is a unique, deterministic hash derived from the user's attestation
152
+ * and scope. It serves as a privacy-preserving user identifier — the same user
153
+ * with the same scope always produces the same nullifier, enabling duplicate
154
+ * detection without revealing the wallet address.
155
+ *
156
+ * @param publicInputsHex - Array of hex-encoded field elements
157
+ * @param circuit - Circuit type (defaults to coinbase_attestation)
158
+ * @returns Nullifier as hex string (bytes32), or null if publicInputs too short
159
+ *
160
+ * @example
161
+ * ```typescript
162
+ * const nullifier = extractNullifierFromPublicInputs(publicInputs, 'coinbase_attestation');
163
+ * console.log(nullifier); // '0xabc123...'
164
+ * ```
165
+ */
166
+ export declare function extractNullifierFromPublicInputs(publicInputsHex: string[], circuit?: string): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkproofport-app/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "ZKProofport SDK for requesting zero-knowledge proofs from the ZKProofport mobile app and verifying them on-chain",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",