@zkpassport/aztec 0.1.0-beta.2 → 0.1.0-beta.3

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 CHANGED
@@ -6,11 +6,11 @@ library.
6
6
  ## Install
7
7
 
8
8
  ```sh
9
- npm install @zkpassport/aztec @aztec-labs/aztec.js@6.0 @aztec-labs/stdlib@6.0
9
+ npm install @zkpassport/aztec @aztec-labs/aztec.js@6.1 @aztec-labs/stdlib@6.1
10
10
  ```
11
11
 
12
12
  `@aztec-labs/aztec.js` and `@aztec-labs/stdlib` are peer dependencies: the package works with Aztec
13
- 6.0.x and uses the app's own copies of them. Until the first stable release, install
13
+ 6.1.x and uses the app's own copies of them. Until the first stable release, install
14
14
  `@zkpassport/aztec@beta`.
15
15
 
16
16
  ## Features
@@ -25,7 +25,7 @@ npm install @zkpassport/aztec @aztec-labs/aztec.js@6.0 @aztec-labs/stdlib@6.0
25
25
  await gate.methods.claim(user).send({ from: sender, capsules })
26
26
  ```
27
27
 
28
- - **`assembleProofCapsule` / `assembleDiscloseCapsule` / `assembleSanctionsCapsule`**: the same capsules' fields from the parts of a proof, for a client that builds them itself. The proof capsule ends with the circuits release that made the proof; only 0.23.x proofs verify.
28
+ - **`assembleProofCapsule` / `assembleDiscloseCapsule` / `assembleSanctionsCapsule` / `assembleFacematchCapsule`**: the same capsules' fields from the parts of a proof, for a client that builds them itself. The proof capsule ends with the circuits release that made the proof; only 0.23.x proofs verify. The face match capsule holds a face match's committed inputs; an Android one verifies only under a revocation root the registry accepts.
29
29
  - **`nationalityBytes` / `packNationality` / `isIdCard`** — TS twins of the Noir `disclosed_data` module's nationality reader. `@zkpassport/utils`' `DisclosedData.fromDisclosedBytes(bytes, isIdCard(bytes) ? "id_card" : "passport")` reads every field.
30
30
  - **`fetchOuterVk(vkeyHash)`**: the outer vk from the live `circuits2.zkpassport.id` host.
31
31
  - **`constants.ts`**: the field counts and capsule slots, from `@zkpassport/utils`' mirror of `core/src/constants.nr`.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ContractArtifact } from '@aztec-labs/aztec.js/abi';
2
2
  import { AztecAddress } from '@aztec-labs/aztec.js/addresses';
3
3
  import { Fr } from '@aztec-labs/aztec.js/fields';
4
4
  import { Capsule } from '@aztec-labs/aztec.js/tx';
5
- import { AztecVerifierParameters, getAztecOuterPublicInputCount } from '@zkpassport/utils';
5
+ import { FacematchCommittedInputs, AztecVerifierParameters, getAztecOuterPublicInputCount } from '@zkpassport/utils';
6
6
  import { ContractInstanceWithAddress } from '@aztec-labs/stdlib/contract';
7
7
 
8
8
  /**
@@ -53,6 +53,13 @@ declare function assembleDiscloseCapsule(discloseMask: number[], disclosedBytes:
53
53
  * against, the SDK's `SanctionsCommittedInputs.rootHash`.
54
54
  */
55
55
  declare function assembleSanctionsCapsule(rootHash: string): Fr[];
56
+ /**
57
+ * Assemble the capsule for `FACE_MATCH_CAPSULE_SLOT` from a face match's committed inputs, the
58
+ * SDK's `FacematchCommittedInputs`: the root key leaf, the environment, the app id hash, the
59
+ * integrity public key hash, the mode and the revocation root, in the order the proof commits
60
+ * them.
61
+ */
62
+ declare function assembleFacematchCapsule(facematch: FacematchCommittedInputs): Fr[];
56
63
 
57
64
  /**
58
65
  * Note: these come from `@zkpassport/utils`, a TS mirror of `noir/core/src/constants.nr`. That is
@@ -69,6 +76,8 @@ declare const PROOF_CAPSULE_SLOT: bigint;
69
76
  declare const DISCLOSE_CAPSULE_SLOT: bigint;
70
77
  /** Capsule slot for the sanctions exclusion payload. */
71
78
  declare const SANCTIONS_CAPSULE_SLOT: bigint;
79
+ /** Capsule slot for a face match's parameters. */
80
+ declare const FACE_MATCH_CAPSULE_SLOT: bigint;
72
81
  /** The canonical 90-byte disclose payload length (TD1 exactly; TD3 zero-padded). */
73
82
  declare const MRZ_LENGTH = 90;
74
83
  /** The circuits releases the library parses: 0.23.x. */
@@ -152,4 +161,4 @@ declare function registerZKPassportRegistry(wallet: RegistryWallet, node: Regist
152
161
  */
153
162
  declare function fetchOuterVk(vkeyHash: string): Promise<string[]>;
154
163
 
155
- export { DISCLOSE_CAPSULE_SLOT, MRZ_LENGTH, type OuterProofParts, PROOF_CAPSULE_SLOT, PROOF_FIELDS, type RegistryNode, type RegistryWallet, SANCTIONS_CAPSULE_SLOT, SUPPORTED_CIRCUIT_VERSION, TD1_NATIONALITY_INDEX, TD3_NATIONALITY_INDEX, VK_FIELDS, ZKPassportRegistryArtifact, assembleDiscloseCapsule, assembleProofCapsule, assembleSanctionsCapsule, fetchOuterVk, isIdCard, nationalityBytes, outerCapsuleLength, outerPublicInputCount, packNationality, registerZKPassportRegistry, toAztecCapsules };
164
+ export { DISCLOSE_CAPSULE_SLOT, FACE_MATCH_CAPSULE_SLOT, MRZ_LENGTH, type OuterProofParts, PROOF_CAPSULE_SLOT, PROOF_FIELDS, type RegistryNode, type RegistryWallet, SANCTIONS_CAPSULE_SLOT, SUPPORTED_CIRCUIT_VERSION, TD1_NATIONALITY_INDEX, TD3_NATIONALITY_INDEX, VK_FIELDS, ZKPassportRegistryArtifact, assembleDiscloseCapsule, assembleFacematchCapsule, assembleProofCapsule, assembleSanctionsCapsule, fetchOuterVk, isIdCard, nationalityBytes, outerCapsuleLength, outerPublicInputCount, packNationality, registerZKPassportRegistry, toAztecCapsules };