@zkproofport-app/sdk 0.4.0 → 0.4.1

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
@@ -103,6 +103,18 @@ const CIRCUIT_METADATA = {
103
103
  publicInputsCount: 192,
104
104
  publicInputNames: ['signal_hash', 'domain_separator', 'action_hash', 'signer_list_merkle_root', 'scope', 'nullifier'],
105
105
  },
106
+ // Experimental, GIWA Sepolia only. The wallet signs the request (an EIP-712
107
+ // action, or signal_hash when none is given -- the same branch as GIWA), and
108
+ // the same key must have signed a payAndIssueEAS() call to the Playground
109
+ // faucet. No issuer list, so no merkle root: 5 x [u8; 32] = 160, read off the
110
+ // compiled ABI -- signal_hash 0-31, domain_separator 32-63, action_hash
111
+ // 64-95, scope 96-127, nullifier 128-159.
112
+ dojang_playground: {
113
+ name: 'Dojang Playground',
114
+ description: 'Prove this wallet issued itself a Dojang through the GIWA Playground, optionally authorizing one EIP-712 action',
115
+ publicInputsCount: 160,
116
+ publicInputNames: ['signal_hash', 'domain_separator', 'action_hash', 'scope', 'nullifier'],
117
+ },
106
118
  // Korea Mobile ID (mDL) circuits. Planned — not officially supported yet.
107
119
  // Counts are byte-flattened field totals from the compiled circuit ABIs:
108
120
  // [u8; 32] arrays contribute 32 inputs each.
@@ -377,6 +389,8 @@ const CIRCUIT_IDS = Object.freeze({
377
389
  OIDC_DOMAIN_ATTESTATION: 'oidc_domain_attestation',
378
390
  /** GIWA attestation. Planned — not officially supported yet. */
379
391
  GIWA_ATTESTATION: 'giwa_attestation',
392
+ /** Dojang Playground on GIWA Sepolia. Experimental — testnet only. */
393
+ DOJANG_PLAYGROUND: 'dojang_playground',
380
394
  /** Korea Mobile ID ownership. Planned — not officially supported yet. */
381
395
  MDL_KR_OWNERSHIP: 'mdl_kr_ownership',
382
396
  /** Korea Mobile ID age threshold. Planned — not officially supported yet. */
@@ -408,6 +422,9 @@ const CIRCUIT_SUPPORT_STATUS = Object.freeze({
408
422
  // 'supported' is that it is testnet-only, so the app offers it behind
409
423
  // Developer Mode and reads its files from main rather than a release tag.
410
424
  giwa_attestation: 'experimental',
425
+ // Same footing as GIWA: built, verifier deployed on GIWA Sepolia, a real
426
+ // proof verifies there. Testnet only.
427
+ dojang_playground: 'experimental',
411
428
  mdl_kr_ownership: 'planned',
412
429
  mdl_kr_age: 'planned',
413
430
  mdl_kr_region: 'planned',
@@ -437,6 +454,7 @@ const CIRCUIT_VK_PATHS = Object.freeze({
437
454
  coinbase_country_attestation: 'coinbase-country-attestation/target/vk/vk',
438
455
  oidc_domain_attestation: 'oidc-domain-attestation/target/vk/vk',
439
456
  giwa_attestation: 'giwa-attestation/target/vk/vk',
457
+ dojang_playground: 'dojang-playground/target/vk/vk',
440
458
  mdl_kr_ownership: 'mdl/kr-ownership/target/vk/vk',
441
459
  mdl_kr_age: 'mdl/kr-age/target/vk/vk',
442
460
  mdl_kr_region: 'mdl/kr-region/target/vk/vk',
@@ -525,6 +543,8 @@ const CIRCUIT_ACTION_BINDING = {
525
543
  // Branches in-circuit: with an action the wallet signs the typed data,
526
544
  // without one it personal_signs the request's signal hash.
527
545
  giwa_attestation: 'optional',
546
+ // Same branch as GIWA; see dojang-playground/src/main.nr.
547
+ dojang_playground: 'optional',
528
548
  mdl_kr_ownership: 'none',
529
549
  mdl_kr_age: 'none',
530
550
  mdl_kr_region: 'none',
@@ -565,6 +585,9 @@ const CIRCUIT_NEEDS_WALLET_SIGNATURE = {
565
585
  // -- it sat under the Web2 comment above and was never revisited. A request
566
586
  // for it would have reached the relay with no signer.
567
587
  giwa_attestation: true,
588
+ // The wallet signs the request, and the same key must have signed its
589
+ // Playground faucet transaction.
590
+ dojang_playground: true,
568
591
  };
569
592
 
570
593
  const ADDRESS = /^0x[0-9a-fA-F]{40}$/;
@@ -1648,6 +1671,9 @@ const PUBLIC_INPUT_OFFSETS = Object.freeze({
1648
1671
  // it reads: signal_hash, domain_separator, action_hash, merkle root, then
1649
1672
  // scope and nullifier 64 bytes further along than Coinbase.
1650
1673
  giwa_attestation: { scope: [128, 159], nullifier: [160, 191] },
1674
+ // signal_hash, domain_separator, action_hash, scope, nullifier: GIWA's
1675
+ // order without the merkle root, since there is no issuer list.
1676
+ dojang_playground: { scope: [96, 127], nullifier: [128, 159] },
1651
1677
  // country_list, country_list_length and is_included sit before scope.
1652
1678
  coinbase_country_attestation: { scope: [86, 117], nullifier: [118, 149] },
1653
1679
  // pubkey_modulus_limbs and the bounded domain sit before scope.