@worldcoin/idkit-core 4.0.10 → 4.0.11

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
@@ -56,7 +56,7 @@ const request = await IDKit.request({
56
56
  const qrUrl = request.connectorURI;
57
57
  ```
58
58
 
59
- **Available presets:** `orbLegacy`, `documentLegacy`, `secureDocumentLegacy`, `selfieCheckLegacy`
59
+ **Available presets:** `orbLegacy`, `documentLegacy`, `secureDocumentLegacy`, `deviceLegacy`, `selfieCheckLegacy`
60
60
 
61
61
  Selfie check preset example:
62
62
 
Binary file
package/dist/index.cjs CHANGED
@@ -392,14 +392,14 @@ function signRequest(action, signing_key_hex, ttl_seconds) {
392
392
  wasm.__wbindgen_add_to_stack_pointer(16);
393
393
  }
394
394
  }
395
- function __wasm_bindgen_func_elem_975(arg0, arg1, arg2) {
396
- wasm.__wasm_bindgen_func_elem_975(arg0, arg1, addHeapObject(arg2));
395
+ function __wasm_bindgen_func_elem_619(arg0, arg1) {
396
+ wasm.__wasm_bindgen_func_elem_619(arg0, arg1);
397
397
  }
398
- function __wasm_bindgen_func_elem_612(arg0, arg1) {
399
- wasm.__wasm_bindgen_func_elem_612(arg0, arg1);
398
+ function __wasm_bindgen_func_elem_982(arg0, arg1, arg2) {
399
+ wasm.__wasm_bindgen_func_elem_982(arg0, arg1, addHeapObject(arg2));
400
400
  }
401
- function __wasm_bindgen_func_elem_1360(arg0, arg1, arg2, arg3) {
402
- wasm.__wasm_bindgen_func_elem_1360(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
401
+ function __wasm_bindgen_func_elem_1367(arg0, arg1, arg2, arg3) {
402
+ wasm.__wasm_bindgen_func_elem_1367(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
403
403
  }
404
404
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
405
405
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -1591,7 +1591,7 @@ function __wbg_get_imports() {
1591
1591
  const a = state0.a;
1592
1592
  state0.a = 0;
1593
1593
  try {
1594
- return __wasm_bindgen_func_elem_1360(a, state0.b, arg02, arg12);
1594
+ return __wasm_bindgen_func_elem_1367(a, state0.b, arg02, arg12);
1595
1595
  } finally {
1596
1596
  state0.a = a;
1597
1597
  }
@@ -1800,14 +1800,18 @@ function __wbg_get_imports() {
1800
1800
  const ret = getObject(arg0).versions;
1801
1801
  return addHeapObject(ret);
1802
1802
  };
1803
- imports.wbg.__wbindgen_cast_02740531cfdb05fe = function(arg0, arg1) {
1804
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_611, __wasm_bindgen_func_elem_612);
1803
+ imports.wbg.__wbindgen_cast_0c688d3d5dd51bcb = function(arg0, arg1) {
1804
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_981, __wasm_bindgen_func_elem_982);
1805
1805
  return addHeapObject(ret);
1806
1806
  };
1807
1807
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1808
1808
  const ret = getStringFromWasm0(arg0, arg1);
1809
1809
  return addHeapObject(ret);
1810
1810
  };
1811
+ imports.wbg.__wbindgen_cast_26df652e200d9104 = function(arg0, arg1) {
1812
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_618, __wasm_bindgen_func_elem_619);
1813
+ return addHeapObject(ret);
1814
+ };
1811
1815
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1812
1816
  const ret = BigInt.asUintN(64, arg0);
1813
1817
  return addHeapObject(ret);
@@ -1824,10 +1828,6 @@ function __wbg_get_imports() {
1824
1828
  const ret = arg0;
1825
1829
  return addHeapObject(ret);
1826
1830
  };
1827
- imports.wbg.__wbindgen_cast_f23235b6472d5cf3 = function(arg0, arg1) {
1828
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_974, __wasm_bindgen_func_elem_975);
1829
- return addHeapObject(ret);
1830
- };
1831
1831
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1832
1832
  const ret = getObject(arg0);
1833
1833
  return addHeapObject(ret);
@@ -2220,6 +2220,9 @@ function secureDocumentLegacy(opts = {}) {
2220
2220
  function documentLegacy(opts = {}) {
2221
2221
  return { type: "DocumentLegacy", signal: opts.signal };
2222
2222
  }
2223
+ function deviceLegacy(opts = {}) {
2224
+ return { type: "DeviceLegacy", signal: opts.signal };
2225
+ }
2223
2226
  function selfieCheckLegacy(opts = {}) {
2224
2227
  return { type: "SelfieCheckLegacy", signal: opts.signal };
2225
2228
  }
@@ -2312,7 +2315,7 @@ var IDKitBuilder2 = class {
2312
2315
  * Presets provide a simplified way to create requests with predefined
2313
2316
  * credential configurations.
2314
2317
  *
2315
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), or selfieCheckLegacy()
2318
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2316
2319
  * @returns A new IDKitRequest instance
2317
2320
  *
2318
2321
  * @example
@@ -2411,6 +2414,8 @@ var IDKit = {
2411
2414
  secureDocumentLegacy,
2412
2415
  /** Create a DocumentLegacy preset for World ID 3.0 legacy support */
2413
2416
  documentLegacy,
2417
+ /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
2418
+ deviceLegacy,
2414
2419
  /** Create a SelfieCheckLegacy preset for face verification */
2415
2420
  selfieCheckLegacy
2416
2421
  };
@@ -2452,6 +2457,7 @@ Object.defineProperty(exports, "signRequest", {
2452
2457
  });
2453
2458
  exports.IDKit = IDKit;
2454
2459
  exports.IDKitErrorCodes = IDKitErrorCodes;
2460
+ exports.deviceLegacy = deviceLegacy;
2455
2461
  exports.documentLegacy = documentLegacy;
2456
2462
  exports.hashSignal = hashSignal2;
2457
2463
  exports.isNode = isNode;
package/dist/index.d.cts CHANGED
@@ -252,7 +252,13 @@ interface SelfieCheckLegacyPreset {
252
252
  signal?: string;
253
253
  }
254
254
 
255
- type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset;
255
+ interface DeviceLegacyPreset {
256
+ /** This preset only returns World ID 3.0 proofs. Use it for compatibility with older IDKit versions. */
257
+ type: "DeviceLegacy";
258
+ signal?: string;
259
+ }
260
+
261
+ type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset;
256
262
 
257
263
  /**
258
264
  * Result types - re-exported from WASM bindings
@@ -391,6 +397,23 @@ declare function secureDocumentLegacy(opts?: {
391
397
  declare function documentLegacy(opts?: {
392
398
  signal?: string;
393
399
  }): DocumentLegacyPreset;
400
+ /**
401
+ * Creates a DeviceLegacy preset for World ID 3.0 legacy support
402
+ *
403
+ * This preset only returns World ID 3.0 proofs. Use it for compatibility with older IDKit versions.
404
+ *
405
+ * @param opts - Optional configuration with signal
406
+ * @returns A DeviceLegacy preset
407
+ *
408
+ * @example
409
+ * ```typescript
410
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
411
+ * .preset(deviceLegacy({ signal: 'user-123' }))
412
+ * ```
413
+ */
414
+ declare function deviceLegacy(opts?: {
415
+ signal?: string;
416
+ }): DeviceLegacyPreset;
394
417
  /**
395
418
  * Creates a SelfieCheckLegacy preset for face verification
396
419
  *
@@ -440,7 +463,7 @@ declare class IDKitBuilder {
440
463
  * Presets provide a simplified way to create requests with predefined
441
464
  * credential configurations.
442
465
  *
443
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), or selfieCheckLegacy()
466
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
444
467
  * @returns A new IDKitRequest instance
445
468
  *
446
469
  * @example
@@ -520,6 +543,8 @@ declare const IDKit: {
520
543
  secureDocumentLegacy: typeof secureDocumentLegacy;
521
544
  /** Create a DocumentLegacy preset for World ID 3.0 legacy support */
522
545
  documentLegacy: typeof documentLegacy;
546
+ /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
547
+ deviceLegacy: typeof deviceLegacy;
523
548
  /** Create a SelfieCheckLegacy preset for face verification */
524
549
  selfieCheckLegacy: typeof selfieCheckLegacy;
525
550
  };
@@ -546,4 +571,4 @@ declare const isWeb: () => boolean;
546
571
  */
547
572
  declare const isNode: () => boolean;
548
573
 
549
- export { type AbiEncodedValue, type ConstraintNode, type CredentialRequestType, type CredentialType, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type Preset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, documentLegacy, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
574
+ export { type AbiEncodedValue, type ConstraintNode, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type Preset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, deviceLegacy, documentLegacy, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
package/dist/index.d.ts CHANGED
@@ -252,7 +252,13 @@ interface SelfieCheckLegacyPreset {
252
252
  signal?: string;
253
253
  }
254
254
 
255
- type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset;
255
+ interface DeviceLegacyPreset {
256
+ /** This preset only returns World ID 3.0 proofs. Use it for compatibility with older IDKit versions. */
257
+ type: "DeviceLegacy";
258
+ signal?: string;
259
+ }
260
+
261
+ type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset;
256
262
 
257
263
  /**
258
264
  * Result types - re-exported from WASM bindings
@@ -391,6 +397,23 @@ declare function secureDocumentLegacy(opts?: {
391
397
  declare function documentLegacy(opts?: {
392
398
  signal?: string;
393
399
  }): DocumentLegacyPreset;
400
+ /**
401
+ * Creates a DeviceLegacy preset for World ID 3.0 legacy support
402
+ *
403
+ * This preset only returns World ID 3.0 proofs. Use it for compatibility with older IDKit versions.
404
+ *
405
+ * @param opts - Optional configuration with signal
406
+ * @returns A DeviceLegacy preset
407
+ *
408
+ * @example
409
+ * ```typescript
410
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
411
+ * .preset(deviceLegacy({ signal: 'user-123' }))
412
+ * ```
413
+ */
414
+ declare function deviceLegacy(opts?: {
415
+ signal?: string;
416
+ }): DeviceLegacyPreset;
394
417
  /**
395
418
  * Creates a SelfieCheckLegacy preset for face verification
396
419
  *
@@ -440,7 +463,7 @@ declare class IDKitBuilder {
440
463
  * Presets provide a simplified way to create requests with predefined
441
464
  * credential configurations.
442
465
  *
443
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), or selfieCheckLegacy()
466
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
444
467
  * @returns A new IDKitRequest instance
445
468
  *
446
469
  * @example
@@ -520,6 +543,8 @@ declare const IDKit: {
520
543
  secureDocumentLegacy: typeof secureDocumentLegacy;
521
544
  /** Create a DocumentLegacy preset for World ID 3.0 legacy support */
522
545
  documentLegacy: typeof documentLegacy;
546
+ /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
547
+ deviceLegacy: typeof deviceLegacy;
523
548
  /** Create a SelfieCheckLegacy preset for face verification */
524
549
  selfieCheckLegacy: typeof selfieCheckLegacy;
525
550
  };
@@ -546,4 +571,4 @@ declare const isWeb: () => boolean;
546
571
  */
547
572
  declare const isNode: () => boolean;
548
573
 
549
- export { type AbiEncodedValue, type ConstraintNode, type CredentialRequestType, type CredentialType, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type Preset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, documentLegacy, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
574
+ export { type AbiEncodedValue, type ConstraintNode, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type Preset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, deviceLegacy, documentLegacy, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
package/dist/index.js CHANGED
@@ -389,14 +389,14 @@ function signRequest(action, signing_key_hex, ttl_seconds) {
389
389
  wasm.__wbindgen_add_to_stack_pointer(16);
390
390
  }
391
391
  }
392
- function __wasm_bindgen_func_elem_975(arg0, arg1, arg2) {
393
- wasm.__wasm_bindgen_func_elem_975(arg0, arg1, addHeapObject(arg2));
392
+ function __wasm_bindgen_func_elem_619(arg0, arg1) {
393
+ wasm.__wasm_bindgen_func_elem_619(arg0, arg1);
394
394
  }
395
- function __wasm_bindgen_func_elem_612(arg0, arg1) {
396
- wasm.__wasm_bindgen_func_elem_612(arg0, arg1);
395
+ function __wasm_bindgen_func_elem_982(arg0, arg1, arg2) {
396
+ wasm.__wasm_bindgen_func_elem_982(arg0, arg1, addHeapObject(arg2));
397
397
  }
398
- function __wasm_bindgen_func_elem_1360(arg0, arg1, arg2, arg3) {
399
- wasm.__wasm_bindgen_func_elem_1360(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
398
+ function __wasm_bindgen_func_elem_1367(arg0, arg1, arg2, arg3) {
399
+ wasm.__wasm_bindgen_func_elem_1367(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
400
400
  }
401
401
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
402
402
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -1588,7 +1588,7 @@ function __wbg_get_imports() {
1588
1588
  const a = state0.a;
1589
1589
  state0.a = 0;
1590
1590
  try {
1591
- return __wasm_bindgen_func_elem_1360(a, state0.b, arg02, arg12);
1591
+ return __wasm_bindgen_func_elem_1367(a, state0.b, arg02, arg12);
1592
1592
  } finally {
1593
1593
  state0.a = a;
1594
1594
  }
@@ -1797,14 +1797,18 @@ function __wbg_get_imports() {
1797
1797
  const ret = getObject(arg0).versions;
1798
1798
  return addHeapObject(ret);
1799
1799
  };
1800
- imports.wbg.__wbindgen_cast_02740531cfdb05fe = function(arg0, arg1) {
1801
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_611, __wasm_bindgen_func_elem_612);
1800
+ imports.wbg.__wbindgen_cast_0c688d3d5dd51bcb = function(arg0, arg1) {
1801
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_981, __wasm_bindgen_func_elem_982);
1802
1802
  return addHeapObject(ret);
1803
1803
  };
1804
1804
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1805
1805
  const ret = getStringFromWasm0(arg0, arg1);
1806
1806
  return addHeapObject(ret);
1807
1807
  };
1808
+ imports.wbg.__wbindgen_cast_26df652e200d9104 = function(arg0, arg1) {
1809
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_618, __wasm_bindgen_func_elem_619);
1810
+ return addHeapObject(ret);
1811
+ };
1808
1812
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1809
1813
  const ret = BigInt.asUintN(64, arg0);
1810
1814
  return addHeapObject(ret);
@@ -1821,10 +1825,6 @@ function __wbg_get_imports() {
1821
1825
  const ret = arg0;
1822
1826
  return addHeapObject(ret);
1823
1827
  };
1824
- imports.wbg.__wbindgen_cast_f23235b6472d5cf3 = function(arg0, arg1) {
1825
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_974, __wasm_bindgen_func_elem_975);
1826
- return addHeapObject(ret);
1827
- };
1828
1828
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
1829
1829
  const ret = getObject(arg0);
1830
1830
  return addHeapObject(ret);
@@ -2217,6 +2217,9 @@ function secureDocumentLegacy(opts = {}) {
2217
2217
  function documentLegacy(opts = {}) {
2218
2218
  return { type: "DocumentLegacy", signal: opts.signal };
2219
2219
  }
2220
+ function deviceLegacy(opts = {}) {
2221
+ return { type: "DeviceLegacy", signal: opts.signal };
2222
+ }
2220
2223
  function selfieCheckLegacy(opts = {}) {
2221
2224
  return { type: "SelfieCheckLegacy", signal: opts.signal };
2222
2225
  }
@@ -2309,7 +2312,7 @@ var IDKitBuilder2 = class {
2309
2312
  * Presets provide a simplified way to create requests with predefined
2310
2313
  * credential configurations.
2311
2314
  *
2312
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), or selfieCheckLegacy()
2315
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2313
2316
  * @returns A new IDKitRequest instance
2314
2317
  *
2315
2318
  * @example
@@ -2408,6 +2411,8 @@ var IDKit = {
2408
2411
  secureDocumentLegacy,
2409
2412
  /** Create a DocumentLegacy preset for World ID 3.0 legacy support */
2410
2413
  documentLegacy,
2414
+ /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
2415
+ deviceLegacy,
2411
2416
  /** Create a SelfieCheckLegacy preset for face verification */
2412
2417
  selfieCheckLegacy
2413
2418
  };
@@ -2443,4 +2448,4 @@ function isValidHex(s) {
2443
2448
  return /^[0-9a-fA-F]+$/.test(s);
2444
2449
  }
2445
2450
 
2446
- export { IDKit, IDKitErrorCodes, documentLegacy, hashSignal2 as hashSignal, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
2451
+ export { IDKit, IDKitErrorCodes, deviceLegacy, documentLegacy, hashSignal2 as hashSignal, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/idkit-core",
3
- "version": "4.0.10",
3
+ "version": "4.0.11",
4
4
  "description": "Core IDKit SDK for World ID - Pure TypeScript, no dependencies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",