@worldcoin/idkit-core 4.1.5 → 4.1.6

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.
Binary file
package/dist/index.cjs CHANGED
@@ -1587,7 +1587,7 @@ function __wbg_get_imports() {
1587
1587
  const a = state0.a;
1588
1588
  state0.a = 0;
1589
1589
  try {
1590
- return __wasm_bindgen_func_elem_1544(a, state0.b, arg02, arg12);
1590
+ return __wasm_bindgen_func_elem_1556(a, state0.b, arg02, arg12);
1591
1591
  } finally {
1592
1592
  state0.a = a;
1593
1593
  }
@@ -1767,11 +1767,11 @@ function __wbg_get_imports() {
1767
1767
  return addHeapObject(ret);
1768
1768
  },
1769
1769
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1770
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_751, __wasm_bindgen_func_elem_752);
1770
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_763, __wasm_bindgen_func_elem_764);
1771
1771
  return addHeapObject(ret);
1772
1772
  },
1773
1773
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1774
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1079, __wasm_bindgen_func_elem_1080);
1774
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1091, __wasm_bindgen_func_elem_1092);
1775
1775
  return addHeapObject(ret);
1776
1776
  },
1777
1777
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1807,13 +1807,13 @@ function __wbg_get_imports() {
1807
1807
  "./idkit_wasm_bg.js": import0
1808
1808
  };
1809
1809
  }
1810
- function __wasm_bindgen_func_elem_752(arg0, arg1) {
1811
- wasm.__wasm_bindgen_func_elem_752(arg0, arg1);
1810
+ function __wasm_bindgen_func_elem_764(arg0, arg1) {
1811
+ wasm.__wasm_bindgen_func_elem_764(arg0, arg1);
1812
1812
  }
1813
- function __wasm_bindgen_func_elem_1080(arg0, arg1, arg2) {
1813
+ function __wasm_bindgen_func_elem_1092(arg0, arg1, arg2) {
1814
1814
  try {
1815
1815
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1816
- wasm.__wasm_bindgen_func_elem_1080(retptr, arg0, arg1, addHeapObject(arg2));
1816
+ wasm.__wasm_bindgen_func_elem_1092(retptr, arg0, arg1, addHeapObject(arg2));
1817
1817
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1818
1818
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1819
1819
  if (r1) {
@@ -1823,8 +1823,8 @@ function __wasm_bindgen_func_elem_1080(arg0, arg1, arg2) {
1823
1823
  wasm.__wbindgen_add_to_stack_pointer(16);
1824
1824
  }
1825
1825
  }
1826
- function __wasm_bindgen_func_elem_1544(arg0, arg1, arg2, arg3) {
1827
- wasm.__wasm_bindgen_func_elem_1544(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1826
+ function __wasm_bindgen_func_elem_1556(arg0, arg1, arg2, arg3) {
1827
+ wasm.__wasm_bindgen_func_elem_1556(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1828
1828
  }
1829
1829
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1830
1830
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -2546,6 +2546,12 @@ function deviceLegacy(opts = {}) {
2546
2546
  function selfieCheckLegacy(opts = {}) {
2547
2547
  return { type: "SelfieCheckLegacy", signal: opts.signal };
2548
2548
  }
2549
+ function proofOfHuman(opts = {}) {
2550
+ return { type: "ProofOfHuman", signal: opts.signal };
2551
+ }
2552
+ function passport(opts = {}) {
2553
+ return { type: "Passport", signal: opts.signal };
2554
+ }
2549
2555
  function createWasmBuilderFromConfig(config) {
2550
2556
  if (!config.rp_context) {
2551
2557
  throw new Error("rp_context is required for WASM bridge transport");
@@ -2639,7 +2645,7 @@ var IDKitBuilder2 = class {
2639
2645
  * Presets provide a simplified way to create requests with predefined
2640
2646
  * credential configurations.
2641
2647
  *
2642
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2648
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
2643
2649
  * @returns A new IDKitRequest instance
2644
2650
  *
2645
2651
  * @example
@@ -2722,7 +2728,7 @@ var IDKitInviteCodeBuilder = class {
2722
2728
  /**
2723
2729
  * Creates an invite-code mode IDKit request from a preset.
2724
2730
  *
2725
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2731
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
2726
2732
  * @returns A new IDKitInviteCodeRequest instance
2727
2733
  */
2728
2734
  async preset(preset) {
@@ -2874,7 +2880,11 @@ var IDKit = {
2874
2880
  /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
2875
2881
  deviceLegacy,
2876
2882
  /** Create a SelfieCheckLegacy preset for face verification */
2877
- selfieCheckLegacy
2883
+ selfieCheckLegacy,
2884
+ /** Create a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback */
2885
+ proofOfHuman,
2886
+ /** Create a Passport preset for World ID 4.0 with legacy document fallback */
2887
+ passport
2878
2888
  };
2879
2889
 
2880
2890
  // src/lib/platform.ts
@@ -2927,6 +2937,8 @@ exports.isNode = isNode;
2927
2937
  exports.isReactNative = isReactNative;
2928
2938
  exports.isWeb = isWeb;
2929
2939
  exports.orbLegacy = orbLegacy;
2940
+ exports.passport = passport;
2941
+ exports.proofOfHuman = proofOfHuman;
2930
2942
  exports.secureDocumentLegacy = secureDocumentLegacy;
2931
2943
  exports.selfieCheckLegacy = selfieCheckLegacy;
2932
2944
  exports.setDebug = setDebug;
package/dist/index.d.cts CHANGED
@@ -256,7 +256,19 @@ interface DeviceLegacyPreset {
256
256
  signal?: string;
257
257
  }
258
258
 
259
- type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset;
259
+ interface ProofOfHumanPreset {
260
+ /** Requests a World ID 4.0 proof-of-human credential with legacy Orb fallback. */
261
+ type: "ProofOfHuman";
262
+ signal?: string;
263
+ }
264
+
265
+ interface PassportPreset {
266
+ /** Requests a World ID 4.0 passport credential with legacy document fallback. */
267
+ type: "Passport";
268
+ signal?: string;
269
+ }
270
+
271
+ type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset | ProofOfHumanPreset | PassportPreset;
260
272
 
261
273
 
262
274
 
@@ -550,13 +562,43 @@ declare function deviceLegacy(opts?: {
550
562
  *
551
563
  * @example
552
564
  * ```typescript
553
- * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: false })
565
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
554
566
  * .preset(selfieCheckLegacy({ signal: 'user-123' }))
555
567
  * ```
556
568
  */
557
569
  declare function selfieCheckLegacy(opts?: {
558
570
  signal?: string;
559
571
  }): SelfieCheckLegacyPreset;
572
+ /**
573
+ * Creates a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback
574
+ *
575
+ * @param opts - Optional configuration with signal
576
+ * @returns A ProofOfHuman preset
577
+ *
578
+ * @example
579
+ * ```typescript
580
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
581
+ * .preset(proofOfHuman({ signal: 'user-123' }))
582
+ * ```
583
+ */
584
+ declare function proofOfHuman(opts?: {
585
+ signal?: string;
586
+ }): ProofOfHumanPreset;
587
+ /**
588
+ * Creates a Passport preset for World ID 4.0 with legacy document fallback
589
+ *
590
+ * @param opts - Optional configuration with signal
591
+ * @returns A Passport preset
592
+ *
593
+ * @example
594
+ * ```typescript
595
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: false })
596
+ * .preset(passport({ signal: 'user-123' }))
597
+ * ```
598
+ */
599
+ declare function passport(opts?: {
600
+ signal?: string;
601
+ }): PassportPreset;
560
602
  /**
561
603
  * Builder for IDKit requests
562
604
  *
@@ -586,7 +628,7 @@ declare class IDKitBuilder {
586
628
  * Presets provide a simplified way to create requests with predefined
587
629
  * credential configurations.
588
630
  *
589
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
631
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
590
632
  * @returns A new IDKitRequest instance
591
633
  *
592
634
  * @example
@@ -625,7 +667,7 @@ declare class IDKitInviteCodeBuilder {
625
667
  /**
626
668
  * Creates an invite-code mode IDKit request from a preset.
627
669
  *
628
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
670
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
629
671
  * @returns A new IDKitInviteCodeRequest instance
630
672
  */
631
673
  preset(preset: Preset): Promise<IDKitInviteCodeRequest>;
@@ -792,6 +834,10 @@ declare const IDKit: {
792
834
  deviceLegacy: typeof deviceLegacy;
793
835
  /** Create a SelfieCheckLegacy preset for face verification */
794
836
  selfieCheckLegacy: typeof selfieCheckLegacy;
837
+ /** Create a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback */
838
+ proofOfHuman: typeof proofOfHuman;
839
+ /** Create a Passport preset for World ID 4.0 with legacy document fallback */
840
+ passport: typeof passport;
795
841
  };
796
842
 
797
843
  /**
@@ -819,4 +865,4 @@ declare const isNode: () => boolean;
819
865
  declare function isDebug(): boolean;
820
866
  declare function setDebug(enabled: boolean): void;
821
867
 
822
- export { type AbiEncodedValue, type ConstraintNode, CredentialRequest, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitInviteCodeRequest, 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, all, any, deviceLegacy, documentLegacy, enumerate, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy, setDebug };
868
+ export { type AbiEncodedValue, type ConstraintNode, CredentialRequest, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitInviteCodeRequest, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type PassportPreset, type Preset, type ProofOfHumanPreset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, all, any, deviceLegacy, documentLegacy, enumerate, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, passport, proofOfHuman, secureDocumentLegacy, selfieCheckLegacy, setDebug };
package/dist/index.d.ts CHANGED
@@ -256,7 +256,19 @@ interface DeviceLegacyPreset {
256
256
  signal?: string;
257
257
  }
258
258
 
259
- type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset;
259
+ interface ProofOfHumanPreset {
260
+ /** Requests a World ID 4.0 proof-of-human credential with legacy Orb fallback. */
261
+ type: "ProofOfHuman";
262
+ signal?: string;
263
+ }
264
+
265
+ interface PassportPreset {
266
+ /** Requests a World ID 4.0 passport credential with legacy document fallback. */
267
+ type: "Passport";
268
+ signal?: string;
269
+ }
270
+
271
+ type Preset = OrbLegacyPreset | SecureDocumentLegacyPreset | DocumentLegacyPreset | SelfieCheckLegacyPreset | DeviceLegacyPreset | ProofOfHumanPreset | PassportPreset;
260
272
 
261
273
 
262
274
 
@@ -550,13 +562,43 @@ declare function deviceLegacy(opts?: {
550
562
  *
551
563
  * @example
552
564
  * ```typescript
553
- * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: false })
565
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
554
566
  * .preset(selfieCheckLegacy({ signal: 'user-123' }))
555
567
  * ```
556
568
  */
557
569
  declare function selfieCheckLegacy(opts?: {
558
570
  signal?: string;
559
571
  }): SelfieCheckLegacyPreset;
572
+ /**
573
+ * Creates a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback
574
+ *
575
+ * @param opts - Optional configuration with signal
576
+ * @returns A ProofOfHuman preset
577
+ *
578
+ * @example
579
+ * ```typescript
580
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: true })
581
+ * .preset(proofOfHuman({ signal: 'user-123' }))
582
+ * ```
583
+ */
584
+ declare function proofOfHuman(opts?: {
585
+ signal?: string;
586
+ }): ProofOfHumanPreset;
587
+ /**
588
+ * Creates a Passport preset for World ID 4.0 with legacy document fallback
589
+ *
590
+ * @param opts - Optional configuration with signal
591
+ * @returns A Passport preset
592
+ *
593
+ * @example
594
+ * ```typescript
595
+ * const request = await IDKit.request({ app_id, action, rp_context, allow_legacy_proofs: false })
596
+ * .preset(passport({ signal: 'user-123' }))
597
+ * ```
598
+ */
599
+ declare function passport(opts?: {
600
+ signal?: string;
601
+ }): PassportPreset;
560
602
  /**
561
603
  * Builder for IDKit requests
562
604
  *
@@ -586,7 +628,7 @@ declare class IDKitBuilder {
586
628
  * Presets provide a simplified way to create requests with predefined
587
629
  * credential configurations.
588
630
  *
589
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
631
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
590
632
  * @returns A new IDKitRequest instance
591
633
  *
592
634
  * @example
@@ -625,7 +667,7 @@ declare class IDKitInviteCodeBuilder {
625
667
  /**
626
668
  * Creates an invite-code mode IDKit request from a preset.
627
669
  *
628
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
670
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
629
671
  * @returns A new IDKitInviteCodeRequest instance
630
672
  */
631
673
  preset(preset: Preset): Promise<IDKitInviteCodeRequest>;
@@ -792,6 +834,10 @@ declare const IDKit: {
792
834
  deviceLegacy: typeof deviceLegacy;
793
835
  /** Create a SelfieCheckLegacy preset for face verification */
794
836
  selfieCheckLegacy: typeof selfieCheckLegacy;
837
+ /** Create a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback */
838
+ proofOfHuman: typeof proofOfHuman;
839
+ /** Create a Passport preset for World ID 4.0 with legacy document fallback */
840
+ passport: typeof passport;
795
841
  };
796
842
 
797
843
  /**
@@ -819,4 +865,4 @@ declare const isNode: () => boolean;
819
865
  declare function isDebug(): boolean;
820
866
  declare function setDebug(enabled: boolean): void;
821
867
 
822
- export { type AbiEncodedValue, type ConstraintNode, CredentialRequest, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitInviteCodeRequest, 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, all, any, deviceLegacy, documentLegacy, enumerate, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy, setDebug };
868
+ export { type AbiEncodedValue, type ConstraintNode, CredentialRequest, type CredentialRequestType, type CredentialType, type DeviceLegacyPreset, type DocumentLegacyPreset, IDKit, type IDKitCompletionResult, type IDKitErrorCode, IDKitErrorCodes, type IDKitInviteCodeRequest, type IDKitRequest, type IDKitRequestConfig, type IDKitResult, type IDKitResultSession, type IDKitSessionConfig, type OrbLegacyPreset, type PassportPreset, type Preset, type ProofOfHumanPreset, type ResponseItemSession, type ResponseItemV3, type ResponseItemV4, type RpContext, type SecureDocumentLegacyPreset, type SelfieCheckLegacyPreset, type Status$1 as Status, type WaitOptions, all, any, deviceLegacy, documentLegacy, enumerate, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, passport, proofOfHuman, secureDocumentLegacy, selfieCheckLegacy, setDebug };
package/dist/index.js CHANGED
@@ -1584,7 +1584,7 @@ function __wbg_get_imports() {
1584
1584
  const a = state0.a;
1585
1585
  state0.a = 0;
1586
1586
  try {
1587
- return __wasm_bindgen_func_elem_1544(a, state0.b, arg02, arg12);
1587
+ return __wasm_bindgen_func_elem_1556(a, state0.b, arg02, arg12);
1588
1588
  } finally {
1589
1589
  state0.a = a;
1590
1590
  }
@@ -1764,11 +1764,11 @@ function __wbg_get_imports() {
1764
1764
  return addHeapObject(ret);
1765
1765
  },
1766
1766
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1767
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_751, __wasm_bindgen_func_elem_752);
1767
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_763, __wasm_bindgen_func_elem_764);
1768
1768
  return addHeapObject(ret);
1769
1769
  },
1770
1770
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1771
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1079, __wasm_bindgen_func_elem_1080);
1771
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1091, __wasm_bindgen_func_elem_1092);
1772
1772
  return addHeapObject(ret);
1773
1773
  },
1774
1774
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1804,13 +1804,13 @@ function __wbg_get_imports() {
1804
1804
  "./idkit_wasm_bg.js": import0
1805
1805
  };
1806
1806
  }
1807
- function __wasm_bindgen_func_elem_752(arg0, arg1) {
1808
- wasm.__wasm_bindgen_func_elem_752(arg0, arg1);
1807
+ function __wasm_bindgen_func_elem_764(arg0, arg1) {
1808
+ wasm.__wasm_bindgen_func_elem_764(arg0, arg1);
1809
1809
  }
1810
- function __wasm_bindgen_func_elem_1080(arg0, arg1, arg2) {
1810
+ function __wasm_bindgen_func_elem_1092(arg0, arg1, arg2) {
1811
1811
  try {
1812
1812
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1813
- wasm.__wasm_bindgen_func_elem_1080(retptr, arg0, arg1, addHeapObject(arg2));
1813
+ wasm.__wasm_bindgen_func_elem_1092(retptr, arg0, arg1, addHeapObject(arg2));
1814
1814
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1815
1815
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1816
1816
  if (r1) {
@@ -1820,8 +1820,8 @@ function __wasm_bindgen_func_elem_1080(arg0, arg1, arg2) {
1820
1820
  wasm.__wbindgen_add_to_stack_pointer(16);
1821
1821
  }
1822
1822
  }
1823
- function __wasm_bindgen_func_elem_1544(arg0, arg1, arg2, arg3) {
1824
- wasm.__wasm_bindgen_func_elem_1544(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1823
+ function __wasm_bindgen_func_elem_1556(arg0, arg1, arg2, arg3) {
1824
+ wasm.__wasm_bindgen_func_elem_1556(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1825
1825
  }
1826
1826
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1827
1827
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
@@ -2543,6 +2543,12 @@ function deviceLegacy(opts = {}) {
2543
2543
  function selfieCheckLegacy(opts = {}) {
2544
2544
  return { type: "SelfieCheckLegacy", signal: opts.signal };
2545
2545
  }
2546
+ function proofOfHuman(opts = {}) {
2547
+ return { type: "ProofOfHuman", signal: opts.signal };
2548
+ }
2549
+ function passport(opts = {}) {
2550
+ return { type: "Passport", signal: opts.signal };
2551
+ }
2546
2552
  function createWasmBuilderFromConfig(config) {
2547
2553
  if (!config.rp_context) {
2548
2554
  throw new Error("rp_context is required for WASM bridge transport");
@@ -2636,7 +2642,7 @@ var IDKitBuilder2 = class {
2636
2642
  * Presets provide a simplified way to create requests with predefined
2637
2643
  * credential configurations.
2638
2644
  *
2639
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2645
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
2640
2646
  * @returns A new IDKitRequest instance
2641
2647
  *
2642
2648
  * @example
@@ -2719,7 +2725,7 @@ var IDKitInviteCodeBuilder = class {
2719
2725
  /**
2720
2726
  * Creates an invite-code mode IDKit request from a preset.
2721
2727
  *
2722
- * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), or deviceLegacy()
2728
+ * @param preset - A preset object from orbLegacy(), secureDocumentLegacy(), documentLegacy(), selfieCheckLegacy(), deviceLegacy(), proofOfHuman(), or passport()
2723
2729
  * @returns A new IDKitInviteCodeRequest instance
2724
2730
  */
2725
2731
  async preset(preset) {
@@ -2871,7 +2877,11 @@ var IDKit = {
2871
2877
  /** Create a DeviceLegacy preset for World ID 3.0 legacy support */
2872
2878
  deviceLegacy,
2873
2879
  /** Create a SelfieCheckLegacy preset for face verification */
2874
- selfieCheckLegacy
2880
+ selfieCheckLegacy,
2881
+ /** Create a ProofOfHuman preset for World ID 4.0 with legacy Orb fallback */
2882
+ proofOfHuman,
2883
+ /** Create a Passport preset for World ID 4.0 with legacy document fallback */
2884
+ passport
2875
2885
  };
2876
2886
 
2877
2887
  // src/lib/platform.ts
@@ -2905,4 +2915,4 @@ function isValidHex(s) {
2905
2915
  return /^[0-9a-fA-F]+$/.test(s);
2906
2916
  }
2907
2917
 
2908
- export { CredentialRequest, IDKit, IDKitErrorCodes, all, any, deviceLegacy, documentLegacy, enumerate, hashSignal2 as hashSignal, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, secureDocumentLegacy, selfieCheckLegacy, setDebug };
2918
+ export { CredentialRequest, IDKit, IDKitErrorCodes, all, any, deviceLegacy, documentLegacy, enumerate, hashSignal2 as hashSignal, isDebug, isInWorldApp, isNode, isReactNative, isWeb, orbLegacy, passport, proofOfHuman, secureDocumentLegacy, selfieCheckLegacy, setDebug };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/idkit-core",
3
- "version": "4.1.5",
3
+ "version": "4.1.6",
4
4
  "description": "Core IDKit SDK for World ID - Pure TypeScript, no dependencies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",