@zkproofport-app/sdk 0.2.6 → 0.2.7
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 +90 -3
- package/dist/ProofportSDK.d.ts +19 -0
- package/dist/constants.d.ts +7 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +61 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +61 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -4
- package/dist/index.mjs.map +1 -1
- package/dist/verifier.d.ts +17 -0
- package/package.json +1 -1
package/dist/verifier.d.ts
CHANGED
|
@@ -164,3 +164,20 @@ export declare function extractScopeFromPublicInputs(publicInputsHex: string[],
|
|
|
164
164
|
* ```
|
|
165
165
|
*/
|
|
166
166
|
export declare function extractNullifierFromPublicInputs(publicInputsHex: string[], circuit?: string): string | null;
|
|
167
|
+
/**
|
|
168
|
+
* Extract domain string from OIDC Domain Attestation public inputs.
|
|
169
|
+
*
|
|
170
|
+
* The domain is stored as a Noir BoundedVec<u8, 64>, which serializes as
|
|
171
|
+
* [storage[0..64], len]. Each storage element is a u8 value in a field element.
|
|
172
|
+
*
|
|
173
|
+
* @param publicInputsHex - Array of public input hex strings
|
|
174
|
+
* @param circuit - Circuit identifier (must be 'oidc_domain_attestation')
|
|
175
|
+
* @returns Domain as ASCII string, or null if circuit doesn't match or inputs are insufficient
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* const domain = extractDomainFromPublicInputs(publicInputs, 'oidc_domain_attestation');
|
|
180
|
+
* console.log(domain); // 'example.com'
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export declare function extractDomainFromPublicInputs(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.
|
|
3
|
+
"version": "0.2.7",
|
|
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",
|