@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.mjs
CHANGED
|
@@ -70,8 +70,8 @@ const CIRCUIT_METADATA = {
|
|
|
70
70
|
oidc_domain_attestation: {
|
|
71
71
|
name: 'OIDC Domain',
|
|
72
72
|
description: 'Prove email domain affiliation via OIDC JWT',
|
|
73
|
-
publicInputsCount:
|
|
74
|
-
publicInputNames: ['pubkey_modulus_limbs', 'domain', 'scope', 'nullifier'],
|
|
73
|
+
publicInputsCount: 148,
|
|
74
|
+
publicInputNames: ['pubkey_modulus_limbs', 'domain', 'scope', 'nullifier', 'provider'],
|
|
75
75
|
},
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
@@ -205,14 +205,15 @@ const COINBASE_COUNTRY_PUBLIC_INPUT_LAYOUT = {
|
|
|
205
205
|
NULLIFIER_END: 149,
|
|
206
206
|
};
|
|
207
207
|
/**
|
|
208
|
-
* OIDC Domain Attestation circuit public input layout (
|
|
209
|
-
* Defines the
|
|
208
|
+
* OIDC Domain Attestation circuit public input layout (field offsets).
|
|
209
|
+
* Defines the field positions in the flattened public inputs array (148 fields total).
|
|
210
210
|
*
|
|
211
|
-
*
|
|
212
|
-
* - pubkey_modulus_limbs:
|
|
213
|
-
* - domain
|
|
214
|
-
* - scope: 32
|
|
215
|
-
* - nullifier: 32
|
|
211
|
+
* Circuit public inputs (from main.nr):
|
|
212
|
+
* - pubkey_modulus_limbs: pub [u128; 18] → 18 fields (0–17)
|
|
213
|
+
* - domain: pub BoundedVec<u8, 64> → 1 len + 64 storage = 65 fields (18–82)
|
|
214
|
+
* - scope: pub [u8; 32] → 32 fields (83–114)
|
|
215
|
+
* - nullifier: pub [u8; 32] → 32 fields (115–146)
|
|
216
|
+
* - provider: pub u8 → 1 field (147)
|
|
216
217
|
*
|
|
217
218
|
* @example
|
|
218
219
|
* ```typescript
|
|
@@ -224,13 +225,15 @@ const COINBASE_COUNTRY_PUBLIC_INPUT_LAYOUT = {
|
|
|
224
225
|
*/
|
|
225
226
|
const OIDC_DOMAIN_ATTESTATION_PUBLIC_INPUT_LAYOUT = {
|
|
226
227
|
PUBKEY_MODULUS_START: 0,
|
|
227
|
-
PUBKEY_MODULUS_END:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
PUBKEY_MODULUS_END: 17,
|
|
229
|
+
DOMAIN_LEN: 18,
|
|
230
|
+
DOMAIN_START: 19,
|
|
231
|
+
DOMAIN_END: 82,
|
|
232
|
+
SCOPE_START: 83,
|
|
233
|
+
SCOPE_END: 114,
|
|
234
|
+
NULLIFIER_START: 115,
|
|
235
|
+
NULLIFIER_END: 146,
|
|
236
|
+
PROVIDER: 147,
|
|
234
237
|
};
|
|
235
238
|
|
|
236
239
|
/**
|
|
@@ -3828,8 +3831,8 @@ function extractScopeFromPublicInputs(publicInputsHex, circuit) {
|
|
|
3828
3831
|
end = 117;
|
|
3829
3832
|
}
|
|
3830
3833
|
else if (circuit === 'oidc_domain_attestation') {
|
|
3831
|
-
start =
|
|
3832
|
-
end =
|
|
3834
|
+
start = 83;
|
|
3835
|
+
end = 114;
|
|
3833
3836
|
}
|
|
3834
3837
|
else {
|
|
3835
3838
|
start = 64;
|
|
@@ -3865,8 +3868,8 @@ function extractNullifierFromPublicInputs(publicInputsHex, circuit) {
|
|
|
3865
3868
|
end = 149;
|
|
3866
3869
|
}
|
|
3867
3870
|
else if (circuit === 'oidc_domain_attestation') {
|
|
3868
|
-
start =
|
|
3869
|
-
end =
|
|
3871
|
+
start = 115;
|
|
3872
|
+
end = 146;
|
|
3870
3873
|
}
|
|
3871
3874
|
else {
|
|
3872
3875
|
start = 96;
|