@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.mjs CHANGED
@@ -98,6 +98,18 @@ const CIRCUIT_METADATA = {
98
98
  publicInputsCount: 192,
99
99
  publicInputNames: ['signal_hash', 'domain_separator', 'action_hash', 'signer_list_merkle_root', 'scope', 'nullifier'],
100
100
  },
101
+ // Experimental, GIWA Sepolia only. The wallet signs the request (an EIP-712
102
+ // action, or signal_hash when none is given -- the same branch as GIWA), and
103
+ // the same key must have signed a payAndIssueEAS() call to the Playground
104
+ // faucet. No issuer list, so no merkle root: 5 x [u8; 32] = 160, read off the
105
+ // compiled ABI -- signal_hash 0-31, domain_separator 32-63, action_hash
106
+ // 64-95, scope 96-127, nullifier 128-159.
107
+ dojang_playground: {
108
+ name: 'Dojang Playground',
109
+ description: 'Prove this wallet issued itself a Dojang through the GIWA Playground, optionally authorizing one EIP-712 action',
110
+ publicInputsCount: 160,
111
+ publicInputNames: ['signal_hash', 'domain_separator', 'action_hash', 'scope', 'nullifier'],
112
+ },
101
113
  // Korea Mobile ID (mDL) circuits. Planned — not officially supported yet.
102
114
  // Counts are byte-flattened field totals from the compiled circuit ABIs:
103
115
  // [u8; 32] arrays contribute 32 inputs each.
@@ -372,6 +384,8 @@ const CIRCUIT_IDS = Object.freeze({
372
384
  OIDC_DOMAIN_ATTESTATION: 'oidc_domain_attestation',
373
385
  /** GIWA attestation. Planned — not officially supported yet. */
374
386
  GIWA_ATTESTATION: 'giwa_attestation',
387
+ /** Dojang Playground on GIWA Sepolia. Experimental — testnet only. */
388
+ DOJANG_PLAYGROUND: 'dojang_playground',
375
389
  /** Korea Mobile ID ownership. Planned — not officially supported yet. */
376
390
  MDL_KR_OWNERSHIP: 'mdl_kr_ownership',
377
391
  /** Korea Mobile ID age threshold. Planned — not officially supported yet. */
@@ -403,6 +417,9 @@ const CIRCUIT_SUPPORT_STATUS = Object.freeze({
403
417
  // 'supported' is that it is testnet-only, so the app offers it behind
404
418
  // Developer Mode and reads its files from main rather than a release tag.
405
419
  giwa_attestation: 'experimental',
420
+ // Same footing as GIWA: built, verifier deployed on GIWA Sepolia, a real
421
+ // proof verifies there. Testnet only.
422
+ dojang_playground: 'experimental',
406
423
  mdl_kr_ownership: 'planned',
407
424
  mdl_kr_age: 'planned',
408
425
  mdl_kr_region: 'planned',
@@ -432,6 +449,7 @@ const CIRCUIT_VK_PATHS = Object.freeze({
432
449
  coinbase_country_attestation: 'coinbase-country-attestation/target/vk/vk',
433
450
  oidc_domain_attestation: 'oidc-domain-attestation/target/vk/vk',
434
451
  giwa_attestation: 'giwa-attestation/target/vk/vk',
452
+ dojang_playground: 'dojang-playground/target/vk/vk',
435
453
  mdl_kr_ownership: 'mdl/kr-ownership/target/vk/vk',
436
454
  mdl_kr_age: 'mdl/kr-age/target/vk/vk',
437
455
  mdl_kr_region: 'mdl/kr-region/target/vk/vk',
@@ -520,6 +538,8 @@ const CIRCUIT_ACTION_BINDING = {
520
538
  // Branches in-circuit: with an action the wallet signs the typed data,
521
539
  // without one it personal_signs the request's signal hash.
522
540
  giwa_attestation: 'optional',
541
+ // Same branch as GIWA; see dojang-playground/src/main.nr.
542
+ dojang_playground: 'optional',
523
543
  mdl_kr_ownership: 'none',
524
544
  mdl_kr_age: 'none',
525
545
  mdl_kr_region: 'none',
@@ -560,6 +580,9 @@ const CIRCUIT_NEEDS_WALLET_SIGNATURE = {
560
580
  // -- it sat under the Web2 comment above and was never revisited. A request
561
581
  // for it would have reached the relay with no signer.
562
582
  giwa_attestation: true,
583
+ // The wallet signs the request, and the same key must have signed its
584
+ // Playground faucet transaction.
585
+ dojang_playground: true,
563
586
  };
564
587
 
565
588
  const ADDRESS = /^0x[0-9a-fA-F]{40}$/;
@@ -4510,6 +4533,9 @@ const PUBLIC_INPUT_OFFSETS = Object.freeze({
4510
4533
  // it reads: signal_hash, domain_separator, action_hash, merkle root, then
4511
4534
  // scope and nullifier 64 bytes further along than Coinbase.
4512
4535
  giwa_attestation: { scope: [128, 159], nullifier: [160, 191] },
4536
+ // signal_hash, domain_separator, action_hash, scope, nullifier: GIWA's
4537
+ // order without the merkle root, since there is no issuer list.
4538
+ dojang_playground: { scope: [96, 127], nullifier: [128, 159] },
4513
4539
  // country_list, country_list_length and is_included sit before scope.
4514
4540
  coinbase_country_attestation: { scope: [86, 117], nullifier: [118, 149] },
4515
4541
  // pubkey_modulus_limbs and the bounded domain sit before scope.