@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/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: 420,
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 (byte offsets).
214
- * Defines the byte positions of each field in the flattened public inputs array.
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
- * Public inputs are packed as individual field elements (one byte per element):
217
- * - pubkey_modulus_limbs: 18 x u128 = 18 x 16 bytes = 288 bytes → fields 0–287
218
- * - domain (BoundedVec<u8, 64>): 4-byte length (u32) + 64-byte storage = 68 fields → fields 288355
219
- * - scope: 32 bytes → fields 356387
220
- * - nullifier: 32 bytes → fields 388419
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 (1882)
219
+ * - scope: pub [u8; 32]32 fields (83114)
220
+ * - nullifier: pub [u8; 32]32 fields (115146)
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: 287,
233
- DOMAIN_START: 288,
234
- DOMAIN_END: 355,
235
- SCOPE_START: 356,
236
- SCOPE_END: 387,
237
- NULLIFIER_START: 388,
238
- NULLIFIER_END: 419,
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 = 356;
970
- end = 387;
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 = 388;
1007
- end = 419;
1009
+ start = 115;
1010
+ end = 146;
1008
1011
  }
1009
1012
  else {
1010
1013
  start = 96;