@zkproofport-app/sdk 0.2.6 → 0.2.8

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/types.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * const circuit: CircuitType = 'coinbase_attestation';
11
11
  * ```
12
12
  */
13
- export type CircuitType = 'coinbase_attestation' | 'coinbase_country_attestation' | 'oidc_domain_attestation';
13
+ export type CircuitType = 'coinbase_attestation' | 'coinbase_country_attestation' | 'oidc_domain_attestation' | 'mdl_kr_ownership' | 'mdl_kr_age' | 'mdl_kr_region';
14
14
  /**
15
15
  * Proof request lifecycle status.
16
16
  *
@@ -91,6 +91,68 @@ export interface OidcDomainInputs {
91
91
  scope: string;
92
92
  provider?: 'google' | 'microsoft';
93
93
  }
94
+ /**
95
+ * Input parameters for Korea Mobile ID (mDL) ownership attestation circuit.
96
+ *
97
+ * Proves the user holds a valid Korean mobile driver's license. The license
98
+ * data never leaves the device; only the selected attributes indicated by
99
+ * `discloseFlags` are revealed through the proof's public inputs.
100
+ *
101
+ * @property scope - Application-specific identifier for proof uniqueness (e.g., dapp domain)
102
+ * @property discloseFlags - Attribute disclosure bitmask 0x00–0x0F
103
+ * (0x01 name | 0x02 birth | 0x04 sex | 0x08 phone). Omit or 0 for a fully
104
+ * anonymous ownership proof. The attribute values themselves are entered
105
+ * by the user on-device, never supplied by the dapp.
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * // Anonymous "I hold a valid Korean mobile ID" proof
110
+ * const inputs: MdlKrOwnershipInputs = { scope: 'myapp.com' };
111
+ * ```
112
+ */
113
+ export interface MdlKrOwnershipInputs {
114
+ scope: string;
115
+ discloseFlags?: number;
116
+ }
117
+ /**
118
+ * Input parameters for Korea Mobile ID (mDL) age attestation circuit.
119
+ *
120
+ * Proves the user is at least `ageThreshold` years old according to their
121
+ * Korean mobile driver's license, without revealing the birth date.
122
+ *
123
+ * @property scope - Application-specific identifier for proof uniqueness
124
+ * @property ageThreshold - Minimum age to prove (integer, 1–150). E.g., 19 for
125
+ * Korean adult verification.
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * const inputs: MdlKrAgeInputs = { scope: 'myapp.com', ageThreshold: 19 };
130
+ * ```
131
+ */
132
+ export interface MdlKrAgeInputs {
133
+ scope: string;
134
+ ageThreshold: number;
135
+ }
136
+ /**
137
+ * Input parameters for Korea Mobile ID (mDL) region attestation circuit.
138
+ *
139
+ * Proves the user's registered address is in the specified si/do region
140
+ * without revealing the full address.
141
+ *
142
+ * @property scope - Application-specific identifier for proof uniqueness
143
+ * @property targetRegion - Region (si/do) to prove residency in, in Korean
144
+ * (e.g., '경기도', '서울특별시'). Chosen by the dapp; the proof succeeds only
145
+ * if the license address matches.
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * const inputs: MdlKrRegionInputs = { scope: 'myapp.com', targetRegion: '경기도' };
150
+ * ```
151
+ */
152
+ export interface MdlKrRegionInputs {
153
+ scope: string;
154
+ targetRegion: string;
155
+ }
94
156
  /**
95
157
  * Empty input type for circuits that retrieve all data from the mobile app.
96
158
  * Used when SDK doesn't need to provide any circuit-specific parameters.
@@ -101,7 +163,7 @@ export interface EmptyInputs {
101
163
  * Union type of all circuit-specific input types.
102
164
  * Each circuit type has a corresponding input interface.
103
165
  */
104
- export type CircuitInputs = CoinbaseKycInputs | CoinbaseCountryInputs | OidcDomainInputs | EmptyInputs;
166
+ export type CircuitInputs = CoinbaseKycInputs | CoinbaseCountryInputs | OidcDomainInputs | MdlKrOwnershipInputs | MdlKrAgeInputs | MdlKrRegionInputs | EmptyInputs;
105
167
  /**
106
168
  * Zero-knowledge proof request sent to mobile app via deep link.
107
169
  *
@@ -164,3 +164,20 @@ export declare function extractScopeFromPublicInputs(publicInputsHex: string[],
164
164
  * ```
165
165
  */
166
166
  export declare function extractNullifierFromPublicInputs(publicInputsHex: string[], circuit?: string): string | null;
167
+ /**
168
+ * Extract domain string from OIDC Domain Attestation public inputs.
169
+ *
170
+ * The domain is stored as a Noir BoundedVec<u8, 64>, which serializes as
171
+ * [storage[0..64], len]. Each storage element is a u8 value in a field element.
172
+ *
173
+ * @param publicInputsHex - Array of public input hex strings
174
+ * @param circuit - Circuit identifier (must be 'oidc_domain_attestation')
175
+ * @returns Domain as ASCII string, or null if circuit doesn't match or inputs are insufficient
176
+ *
177
+ * @example
178
+ * ```typescript
179
+ * const domain = extractDomainFromPublicInputs(publicInputs, 'oidc_domain_attestation');
180
+ * console.log(domain); // 'example.com'
181
+ * ```
182
+ */
183
+ export declare function extractDomainFromPublicInputs(publicInputsHex: string[], circuit?: string): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkproofport-app/sdk",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "ZKProofport SDK for requesting zero-knowledge proofs from the ZKProofport mobile app and verifying them on-chain",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -58,7 +58,7 @@
58
58
  "blockchain",
59
59
  "zkproofport"
60
60
  ],
61
- "author": "ZKProofport",
61
+ "author": "Masse Labs Inc.",
62
62
  "license": "MIT",
63
63
  "repository": {
64
64
  "type": "git",