@zkproofport-app/sdk 0.2.4 → 0.2.6
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 +28 -7
- package/dist/constants.d.ts +17 -14
- package/dist/index.esm.js +23 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -20
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75,8 +75,8 @@ const CIRCUIT_METADATA = {
|
|
|
75
75
|
oidc_domain_attestation: {
|
|
76
76
|
name: 'OIDC Domain',
|
|
77
77
|
description: 'Prove email domain affiliation via OIDC JWT',
|
|
78
|
-
publicInputsCount:
|
|
79
|
-
publicInputNames: ['pubkey_modulus_limbs', 'domain', 'scope', 'nullifier'],
|
|
78
|
+
publicInputsCount: 148,
|
|
79
|
+
publicInputNames: ['pubkey_modulus_limbs', 'domain', 'scope', 'nullifier', 'provider'],
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
@@ -210,14 +210,15 @@ const COINBASE_COUNTRY_PUBLIC_INPUT_LAYOUT = {
|
|
|
210
210
|
NULLIFIER_END: 149,
|
|
211
211
|
};
|
|
212
212
|
/**
|
|
213
|
-
* OIDC Domain Attestation circuit public input layout (
|
|
214
|
-
* Defines the
|
|
213
|
+
* OIDC Domain Attestation circuit public input layout (field offsets).
|
|
214
|
+
* Defines the field positions in the flattened public inputs array (148 fields total).
|
|
215
215
|
*
|
|
216
|
-
*
|
|
217
|
-
* - pubkey_modulus_limbs:
|
|
218
|
-
* - domain
|
|
219
|
-
* - scope: 32
|
|
220
|
-
* - nullifier: 32
|
|
216
|
+
* Circuit public inputs (from main.nr):
|
|
217
|
+
* - pubkey_modulus_limbs: pub [u128; 18] → 18 fields (0–17)
|
|
218
|
+
* - domain: pub BoundedVec<u8, 64> → 1 len + 64 storage = 65 fields (18–82)
|
|
219
|
+
* - scope: pub [u8; 32] → 32 fields (83–114)
|
|
220
|
+
* - nullifier: pub [u8; 32] → 32 fields (115–146)
|
|
221
|
+
* - provider: pub u8 → 1 field (147)
|
|
221
222
|
*
|
|
222
223
|
* @example
|
|
223
224
|
* ```typescript
|
|
@@ -229,13 +230,15 @@ const COINBASE_COUNTRY_PUBLIC_INPUT_LAYOUT = {
|
|
|
229
230
|
*/
|
|
230
231
|
const OIDC_DOMAIN_ATTESTATION_PUBLIC_INPUT_LAYOUT = {
|
|
231
232
|
PUBKEY_MODULUS_START: 0,
|
|
232
|
-
PUBKEY_MODULUS_END:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
PUBKEY_MODULUS_END: 17,
|
|
234
|
+
DOMAIN_LEN: 18,
|
|
235
|
+
DOMAIN_START: 19,
|
|
236
|
+
DOMAIN_END: 82,
|
|
237
|
+
SCOPE_START: 83,
|
|
238
|
+
SCOPE_END: 114,
|
|
239
|
+
NULLIFIER_START: 115,
|
|
240
|
+
NULLIFIER_END: 146,
|
|
241
|
+
PROVIDER: 147,
|
|
239
242
|
};
|
|
240
243
|
|
|
241
244
|
/**
|
|
@@ -966,8 +969,8 @@ function extractScopeFromPublicInputs(publicInputsHex, circuit) {
|
|
|
966
969
|
end = 117;
|
|
967
970
|
}
|
|
968
971
|
else if (circuit === 'oidc_domain_attestation') {
|
|
969
|
-
start =
|
|
970
|
-
end =
|
|
972
|
+
start = 83;
|
|
973
|
+
end = 114;
|
|
971
974
|
}
|
|
972
975
|
else {
|
|
973
976
|
start = 64;
|
|
@@ -1003,8 +1006,8 @@ function extractNullifierFromPublicInputs(publicInputsHex, circuit) {
|
|
|
1003
1006
|
end = 149;
|
|
1004
1007
|
}
|
|
1005
1008
|
else if (circuit === 'oidc_domain_attestation') {
|
|
1006
|
-
start =
|
|
1007
|
-
end =
|
|
1009
|
+
start = 115;
|
|
1010
|
+
end = 146;
|
|
1008
1011
|
}
|
|
1009
1012
|
else {
|
|
1010
1013
|
start = 96;
|