@zkproofport-app/sdk 0.2.7 → 0.2.9
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/LICENSE +1 -1
- package/README.md +290 -85
- package/dist/ProofportSDK.d.ts +40 -3
- package/dist/constants.d.ts +30 -0
- package/dist/deeplink.d.ts +30 -13
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +292 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +292 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -5
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +69 -2
- package/package.json +2 -2
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
|
*
|
|
@@ -135,6 +197,11 @@ export interface ProofRequest {
|
|
|
135
197
|
dappName?: string;
|
|
136
198
|
/** Optional: DApp icon URL displayed in mobile app UI */
|
|
137
199
|
dappIcon?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Optional: which app the ZKProofport app should bring back to the foreground
|
|
202
|
+
* once it has finished. Not a URL — see {@link ProofportSDK.createRelayRequest}.
|
|
203
|
+
*/
|
|
204
|
+
returnScheme?: string;
|
|
138
205
|
/** Unix timestamp (ms) when request was created */
|
|
139
206
|
createdAt: number;
|
|
140
207
|
/** Optional: Unix timestamp (ms) when request expires */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkproofport-app/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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": "
|
|
61
|
+
"author": "Masse Labs Inc.",
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"repository": {
|
|
64
64
|
"type": "git",
|