@worldcoin/idkit-core 4.0.1-dev.123c6a8 → 4.0.1-dev.eebacb1
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/idkit_wasm_bg.wasm +0 -0
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -106
- package/dist/index.d.ts +53 -106
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/wasm/idkit_wasm.d.ts +11 -78
- package/wasm/idkit_wasm.js +17 -19
- package/wasm/idkit_wasm_bg.wasm +0 -0
- package/wasm/idkit_wasm_bg.wasm.d.ts +5 -5
package/package.json
CHANGED
package/wasm/idkit_wasm.d.ts
CHANGED
|
@@ -90,67 +90,14 @@ export function base64Decode(data: string): Uint8Array;
|
|
|
90
90
|
*/
|
|
91
91
|
export function signRequest(action: string, signing_key_hex: string, ttl_seconds?: bigint | null): RpSignature;
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
identifier: CredentialType;
|
|
97
|
-
/** Compressed Groth16 proof (hex) */
|
|
98
|
-
proof: string;
|
|
99
|
-
/** RP-scoped nullifier (hex) */
|
|
100
|
-
nullifier: string;
|
|
101
|
-
/** Authenticator merkle root (hex) */
|
|
102
|
-
merkle_root: string;
|
|
103
|
-
/** Unix timestamp when proof was generated */
|
|
104
|
-
proof_timestamp: number;
|
|
105
|
-
/** Credential issuer schema ID (hex) */
|
|
106
|
-
issuer_schema_id: string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/** V3 response item (protocol version 3.0 / World ID v3 - legacy format) */
|
|
110
|
-
export interface ResponseItemV3 {
|
|
111
|
-
/** Credential identifier */
|
|
112
|
-
identifier: CredentialType;
|
|
113
|
-
/** ABI-encoded proof (hex) */
|
|
114
|
-
proof: string;
|
|
115
|
-
/** Merkle root (hex) */
|
|
116
|
-
merkle_root: string;
|
|
117
|
-
/** Nullifier hash (hex) */
|
|
118
|
-
nullifier_hash: string;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* A single credential response item - unified type for both bridge and SDK.
|
|
123
|
-
* Type narrowing: use 'proof_timestamp' in item for V4, 'nullifier_hash' in item for V3.
|
|
124
|
-
*/
|
|
125
|
-
export type ResponseItem = ResponseItemV4 | ResponseItemV3;
|
|
126
|
-
|
|
127
|
-
/** V3 result (legacy format - no session support) */
|
|
128
|
-
export interface IDKitResultV3 {
|
|
129
|
-
/** Protocol version 3.0 */
|
|
130
|
-
protocol_version: "3.0";
|
|
131
|
-
/** Array of V3 credential responses */
|
|
132
|
-
responses: ResponseItemV3[];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/** V4 result (current format - supports sessions) */
|
|
136
|
-
export interface IDKitResultV4 {
|
|
137
|
-
/** Protocol version 4.0 */
|
|
138
|
-
protocol_version: "4.0";
|
|
139
|
-
/** Session ID (for session proofs) */
|
|
140
|
-
session_id?: string;
|
|
141
|
-
/** Array of V4 credential responses */
|
|
142
|
-
responses: ResponseItemV4[];
|
|
93
|
+
export interface OrbLegacyPreset {
|
|
94
|
+
type: "OrbLegacy";
|
|
95
|
+
data: { signal?: string };
|
|
143
96
|
}
|
|
144
97
|
|
|
145
|
-
|
|
146
|
-
export type IDKitResult = IDKitResultV3 | IDKitResultV4;
|
|
98
|
+
export type Preset = OrbLegacyPreset;
|
|
147
99
|
|
|
148
|
-
|
|
149
|
-
export type Status =
|
|
150
|
-
| { type: "waiting_for_connection" }
|
|
151
|
-
| { type: "awaiting_confirmation" }
|
|
152
|
-
| { type: "confirmed"; result: IDKitResult }
|
|
153
|
-
| { type: "failed"; error: string };
|
|
100
|
+
export function orbLegacy(signal?: string): Preset;
|
|
154
101
|
|
|
155
102
|
|
|
156
103
|
|
|
@@ -169,17 +116,6 @@ export type ConstraintNode =
|
|
|
169
116
|
|
|
170
117
|
|
|
171
118
|
|
|
172
|
-
export interface OrbLegacyPreset {
|
|
173
|
-
type: "OrbLegacy";
|
|
174
|
-
data: { signal?: string };
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export type Preset = OrbLegacyPreset;
|
|
178
|
-
|
|
179
|
-
export function orbLegacy(signal?: string): Preset;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
119
|
export interface RpSignature {
|
|
184
120
|
sig: string;
|
|
185
121
|
nonce: string;
|
|
@@ -281,14 +217,11 @@ export class CredentialRequestWasm {
|
|
|
281
217
|
*/
|
|
282
218
|
toJSON(): any;
|
|
283
219
|
}
|
|
284
|
-
/**
|
|
285
|
-
* WASM wrapper for `BridgeResponseV1` (legacy proof format)
|
|
286
|
-
*/
|
|
287
220
|
export class IDKitProof {
|
|
288
221
|
free(): void;
|
|
289
222
|
[Symbol.dispose](): void;
|
|
290
223
|
/**
|
|
291
|
-
* Creates a new
|
|
224
|
+
* Creates a new proof
|
|
292
225
|
*
|
|
293
226
|
* # Errors
|
|
294
227
|
*
|
|
@@ -488,11 +421,11 @@ export interface InitOutput {
|
|
|
488
421
|
readonly init_wasm: () => void;
|
|
489
422
|
readonly hashSignalBytes: (a: number, b: number, c: number) => void;
|
|
490
423
|
readonly request: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
491
|
-
readonly
|
|
492
|
-
readonly
|
|
493
|
-
readonly
|
|
494
|
-
readonly
|
|
495
|
-
readonly
|
|
424
|
+
readonly __wasm_bindgen_func_elem_510: (a: number, b: number) => void;
|
|
425
|
+
readonly __wasm_bindgen_func_elem_509: (a: number, b: number) => void;
|
|
426
|
+
readonly __wasm_bindgen_func_elem_873: (a: number, b: number, c: number) => void;
|
|
427
|
+
readonly __wasm_bindgen_func_elem_872: (a: number, b: number) => void;
|
|
428
|
+
readonly __wasm_bindgen_func_elem_1238: (a: number, b: number, c: number, d: number) => void;
|
|
496
429
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
497
430
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
498
431
|
readonly __wbindgen_export3: (a: number) => void;
|
package/wasm/idkit_wasm.js
CHANGED
|
@@ -482,16 +482,16 @@ export function signRequest(action, signing_key_hex, ttl_seconds) {
|
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
function
|
|
486
|
-
wasm.
|
|
485
|
+
function __wasm_bindgen_func_elem_510(arg0, arg1) {
|
|
486
|
+
wasm.__wasm_bindgen_func_elem_510(arg0, arg1);
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
function
|
|
490
|
-
wasm.
|
|
489
|
+
function __wasm_bindgen_func_elem_873(arg0, arg1, arg2) {
|
|
490
|
+
wasm.__wasm_bindgen_func_elem_873(arg0, arg1, addHeapObject(arg2));
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
-
function
|
|
494
|
-
wasm.
|
|
493
|
+
function __wasm_bindgen_func_elem_1238(arg0, arg1, arg2, arg3) {
|
|
494
|
+
wasm.__wasm_bindgen_func_elem_1238(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
@@ -827,9 +827,7 @@ if (Symbol.dispose) CredentialRequestWasm.prototype[Symbol.dispose] = Credential
|
|
|
827
827
|
const IDKitProofFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
828
828
|
? { register: () => {}, unregister: () => {} }
|
|
829
829
|
: new FinalizationRegistry(ptr => wasm.__wbg_idkitproof_free(ptr >>> 0, 1));
|
|
830
|
-
|
|
831
|
-
* WASM wrapper for `BridgeResponseV1` (legacy proof format)
|
|
832
|
-
*/
|
|
830
|
+
|
|
833
831
|
export class IDKitProof {
|
|
834
832
|
|
|
835
833
|
__destroy_into_raw() {
|
|
@@ -844,7 +842,7 @@ export class IDKitProof {
|
|
|
844
842
|
wasm.__wbg_idkitproof_free(ptr, 0);
|
|
845
843
|
}
|
|
846
844
|
/**
|
|
847
|
-
* Creates a new
|
|
845
|
+
* Creates a new proof
|
|
848
846
|
*
|
|
849
847
|
* # Errors
|
|
850
848
|
*
|
|
@@ -1576,7 +1574,7 @@ function __wbg_get_imports() {
|
|
|
1576
1574
|
const a = state0.a;
|
|
1577
1575
|
state0.a = 0;
|
|
1578
1576
|
try {
|
|
1579
|
-
return
|
|
1577
|
+
return __wasm_bindgen_func_elem_1238(a, state0.b, arg0, arg1);
|
|
1580
1578
|
} finally {
|
|
1581
1579
|
state0.a = a;
|
|
1582
1580
|
}
|
|
@@ -1769,6 +1767,11 @@ function __wbg_get_imports() {
|
|
|
1769
1767
|
const ret = getObject(arg0).versions;
|
|
1770
1768
|
return addHeapObject(ret);
|
|
1771
1769
|
};
|
|
1770
|
+
imports.wbg.__wbindgen_cast_20b7882efa3c21d9 = function(arg0, arg1) {
|
|
1771
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 190, function: Function { arguments: [Externref], shim_idx: 191, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1772
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_872, __wasm_bindgen_func_elem_873);
|
|
1773
|
+
return addHeapObject(ret);
|
|
1774
|
+
};
|
|
1772
1775
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1773
1776
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1774
1777
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -1779,19 +1782,14 @@ function __wbg_get_imports() {
|
|
|
1779
1782
|
const ret = BigInt.asUintN(64, arg0);
|
|
1780
1783
|
return addHeapObject(ret);
|
|
1781
1784
|
};
|
|
1782
|
-
imports.wbg.__wbindgen_cast_91c43ecf1f8dafb8 = function(arg0, arg1) {
|
|
1783
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 135, function: Function { arguments: [], shim_idx: 136, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1784
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_550, __wasm_bindgen_func_elem_551);
|
|
1785
|
-
return addHeapObject(ret);
|
|
1786
|
-
};
|
|
1787
1785
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
1788
1786
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1789
1787
|
const ret = arg0;
|
|
1790
1788
|
return addHeapObject(ret);
|
|
1791
1789
|
};
|
|
1792
|
-
imports.wbg.
|
|
1793
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1794
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1790
|
+
imports.wbg.__wbindgen_cast_c84362f2a853c6d7 = function(arg0, arg1) {
|
|
1791
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 131, function: Function { arguments: [], shim_idx: 132, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1792
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_509, __wasm_bindgen_func_elem_510);
|
|
1795
1793
|
return addHeapObject(ret);
|
|
1796
1794
|
};
|
|
1797
1795
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
package/wasm/idkit_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -41,11 +41,11 @@ export const signRequest: (a: number, b: number, c: number, d: number, e: number
|
|
|
41
41
|
export const init_wasm: () => void;
|
|
42
42
|
export const hashSignalBytes: (a: number, b: number, c: number) => void;
|
|
43
43
|
export const request: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
44
|
+
export const __wasm_bindgen_func_elem_510: (a: number, b: number) => void;
|
|
45
|
+
export const __wasm_bindgen_func_elem_509: (a: number, b: number) => void;
|
|
46
|
+
export const __wasm_bindgen_func_elem_873: (a: number, b: number, c: number) => void;
|
|
47
|
+
export const __wasm_bindgen_func_elem_872: (a: number, b: number) => void;
|
|
48
|
+
export const __wasm_bindgen_func_elem_1238: (a: number, b: number, c: number, d: number) => void;
|
|
49
49
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
50
50
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
51
51
|
export const __wbindgen_export3: (a: number) => void;
|