@worldcoin/idkit-core 4.1.2 → 4.1.4

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
@@ -24,7 +24,17 @@ var IDKitErrorCodes = /* @__PURE__ */ ((IDKitErrorCodes2) => {
24
24
  IDKitErrorCodes2["ConnectionFailed"] = "connection_failed";
25
25
  IDKitErrorCodes2["MaxVerificationsReached"] = "max_verifications_reached";
26
26
  IDKitErrorCodes2["FailedByHostApp"] = "failed_by_host_app";
27
+ IDKitErrorCodes2["InvalidRpSignature"] = "invalid_rp_signature";
28
+ IDKitErrorCodes2["NullifierReplayed"] = "nullifier_replayed";
29
+ IDKitErrorCodes2["DuplicateNonce"] = "duplicate_nonce";
30
+ IDKitErrorCodes2["UnknownRp"] = "unknown_rp";
31
+ IDKitErrorCodes2["InactiveRp"] = "inactive_rp";
32
+ IDKitErrorCodes2["TimestampTooOld"] = "timestamp_too_old";
33
+ IDKitErrorCodes2["TimestampTooFarInFuture"] = "timestamp_too_far_in_future";
34
+ IDKitErrorCodes2["InvalidTimestamp"] = "invalid_timestamp";
35
+ IDKitErrorCodes2["RpSignatureExpired"] = "rp_signature_expired";
27
36
  IDKitErrorCodes2["GenericError"] = "generic_error";
37
+ IDKitErrorCodes2["InvalidRpIdFormat"] = "invalid_rp_id_format";
28
38
  IDKitErrorCodes2["Timeout"] = "timeout";
29
39
  IDKitErrorCodes2["Cancelled"] = "cancelled";
30
40
  return IDKitErrorCodes2;
@@ -228,7 +238,7 @@ var CredentialRequestWasm = class _CredentialRequestWasm {
228
238
  return takeObject(ret);
229
239
  }
230
240
  /**
231
- * Gets the signal as raw bytes
241
+ * Gets the signal bytes used by protocol proof requests
232
242
  * @returns {Uint8Array | undefined}
233
243
  */
234
244
  getSignalBytes() {
@@ -1396,7 +1406,7 @@ function __wbg_get_imports() {
1396
1406
  const a = state0.a;
1397
1407
  state0.a = 0;
1398
1408
  try {
1399
- return __wasm_bindgen_func_elem_1438(a, state0.b, arg02, arg12);
1409
+ return __wasm_bindgen_func_elem_1487(a, state0.b, arg02, arg12);
1400
1410
  } finally {
1401
1411
  state0.a = a;
1402
1412
  }
@@ -1576,11 +1586,11 @@ function __wbg_get_imports() {
1576
1586
  return addHeapObject(ret);
1577
1587
  },
1578
1588
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1579
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_656, __wasm_bindgen_func_elem_657);
1589
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_699, __wasm_bindgen_func_elem_700);
1580
1590
  return addHeapObject(ret);
1581
1591
  },
1582
1592
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1583
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_984, __wasm_bindgen_func_elem_985);
1593
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1027, __wasm_bindgen_func_elem_1028);
1584
1594
  return addHeapObject(ret);
1585
1595
  },
1586
1596
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1616,13 +1626,13 @@ function __wbg_get_imports() {
1616
1626
  "./idkit_wasm_bg.js": import0
1617
1627
  };
1618
1628
  }
1619
- function __wasm_bindgen_func_elem_657(arg0, arg1) {
1620
- wasm.__wasm_bindgen_func_elem_657(arg0, arg1);
1629
+ function __wasm_bindgen_func_elem_700(arg0, arg1) {
1630
+ wasm.__wasm_bindgen_func_elem_700(arg0, arg1);
1621
1631
  }
1622
- function __wasm_bindgen_func_elem_985(arg0, arg1, arg2) {
1632
+ function __wasm_bindgen_func_elem_1028(arg0, arg1, arg2) {
1623
1633
  try {
1624
1634
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1625
- wasm.__wasm_bindgen_func_elem_985(retptr, arg0, arg1, addHeapObject(arg2));
1635
+ wasm.__wasm_bindgen_func_elem_1028(retptr, arg0, arg1, addHeapObject(arg2));
1626
1636
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1627
1637
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1628
1638
  if (r1) {
@@ -1632,8 +1642,8 @@ function __wasm_bindgen_func_elem_985(arg0, arg1, arg2) {
1632
1642
  wasm.__wbindgen_add_to_stack_pointer(16);
1633
1643
  }
1634
1644
  }
1635
- function __wasm_bindgen_func_elem_1438(arg0, arg1, arg2, arg3) {
1636
- wasm.__wasm_bindgen_func_elem_1438(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1645
+ function __wasm_bindgen_func_elem_1487(arg0, arg1, arg2, arg3) {
1646
+ wasm.__wasm_bindgen_func_elem_1487(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1637
1647
  }
1638
1648
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1639
1649
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
package/dist/index.d.cts CHANGED
@@ -202,6 +202,15 @@ type IDKitErrorCode =
202
202
  | "connection_failed"
203
203
  | "max_verifications_reached"
204
204
  | "failed_by_host_app"
205
+ | "invalid_rp_signature"
206
+ | "nullifier_replayed"
207
+ | "duplicate_nonce"
208
+ | "unknown_rp"
209
+ | "inactive_rp"
210
+ | "timestamp_too_old"
211
+ | "timestamp_too_far_in_future"
212
+ | "invalid_timestamp"
213
+ | "rp_signature_expired"
205
214
  | "generic_error";
206
215
 
207
216
  /** Status returned from pollForStatus() */
@@ -287,7 +296,17 @@ declare enum IDKitErrorCodes {
287
296
  ConnectionFailed = "connection_failed",
288
297
  MaxVerificationsReached = "max_verifications_reached",
289
298
  FailedByHostApp = "failed_by_host_app",
299
+ InvalidRpSignature = "invalid_rp_signature",
300
+ NullifierReplayed = "nullifier_replayed",
301
+ DuplicateNonce = "duplicate_nonce",
302
+ UnknownRp = "unknown_rp",
303
+ InactiveRp = "inactive_rp",
304
+ TimestampTooOld = "timestamp_too_old",
305
+ TimestampTooFarInFuture = "timestamp_too_far_in_future",
306
+ InvalidTimestamp = "invalid_timestamp",
307
+ RpSignatureExpired = "rp_signature_expired",
290
308
  GenericError = "generic_error",
309
+ InvalidRpIdFormat = "invalid_rp_id_format",
291
310
  Timeout = "timeout",
292
311
  Cancelled = "cancelled"
293
312
  }
package/dist/index.d.ts CHANGED
@@ -202,6 +202,15 @@ type IDKitErrorCode =
202
202
  | "connection_failed"
203
203
  | "max_verifications_reached"
204
204
  | "failed_by_host_app"
205
+ | "invalid_rp_signature"
206
+ | "nullifier_replayed"
207
+ | "duplicate_nonce"
208
+ | "unknown_rp"
209
+ | "inactive_rp"
210
+ | "timestamp_too_old"
211
+ | "timestamp_too_far_in_future"
212
+ | "invalid_timestamp"
213
+ | "rp_signature_expired"
205
214
  | "generic_error";
206
215
 
207
216
  /** Status returned from pollForStatus() */
@@ -287,7 +296,17 @@ declare enum IDKitErrorCodes {
287
296
  ConnectionFailed = "connection_failed",
288
297
  MaxVerificationsReached = "max_verifications_reached",
289
298
  FailedByHostApp = "failed_by_host_app",
299
+ InvalidRpSignature = "invalid_rp_signature",
300
+ NullifierReplayed = "nullifier_replayed",
301
+ DuplicateNonce = "duplicate_nonce",
302
+ UnknownRp = "unknown_rp",
303
+ InactiveRp = "inactive_rp",
304
+ TimestampTooOld = "timestamp_too_old",
305
+ TimestampTooFarInFuture = "timestamp_too_far_in_future",
306
+ InvalidTimestamp = "invalid_timestamp",
307
+ RpSignatureExpired = "rp_signature_expired",
290
308
  GenericError = "generic_error",
309
+ InvalidRpIdFormat = "invalid_rp_id_format",
291
310
  Timeout = "timeout",
292
311
  Cancelled = "cancelled"
293
312
  }
package/dist/index.js CHANGED
@@ -21,7 +21,17 @@ var IDKitErrorCodes = /* @__PURE__ */ ((IDKitErrorCodes2) => {
21
21
  IDKitErrorCodes2["ConnectionFailed"] = "connection_failed";
22
22
  IDKitErrorCodes2["MaxVerificationsReached"] = "max_verifications_reached";
23
23
  IDKitErrorCodes2["FailedByHostApp"] = "failed_by_host_app";
24
+ IDKitErrorCodes2["InvalidRpSignature"] = "invalid_rp_signature";
25
+ IDKitErrorCodes2["NullifierReplayed"] = "nullifier_replayed";
26
+ IDKitErrorCodes2["DuplicateNonce"] = "duplicate_nonce";
27
+ IDKitErrorCodes2["UnknownRp"] = "unknown_rp";
28
+ IDKitErrorCodes2["InactiveRp"] = "inactive_rp";
29
+ IDKitErrorCodes2["TimestampTooOld"] = "timestamp_too_old";
30
+ IDKitErrorCodes2["TimestampTooFarInFuture"] = "timestamp_too_far_in_future";
31
+ IDKitErrorCodes2["InvalidTimestamp"] = "invalid_timestamp";
32
+ IDKitErrorCodes2["RpSignatureExpired"] = "rp_signature_expired";
24
33
  IDKitErrorCodes2["GenericError"] = "generic_error";
34
+ IDKitErrorCodes2["InvalidRpIdFormat"] = "invalid_rp_id_format";
25
35
  IDKitErrorCodes2["Timeout"] = "timeout";
26
36
  IDKitErrorCodes2["Cancelled"] = "cancelled";
27
37
  return IDKitErrorCodes2;
@@ -225,7 +235,7 @@ var CredentialRequestWasm = class _CredentialRequestWasm {
225
235
  return takeObject(ret);
226
236
  }
227
237
  /**
228
- * Gets the signal as raw bytes
238
+ * Gets the signal bytes used by protocol proof requests
229
239
  * @returns {Uint8Array | undefined}
230
240
  */
231
241
  getSignalBytes() {
@@ -1393,7 +1403,7 @@ function __wbg_get_imports() {
1393
1403
  const a = state0.a;
1394
1404
  state0.a = 0;
1395
1405
  try {
1396
- return __wasm_bindgen_func_elem_1438(a, state0.b, arg02, arg12);
1406
+ return __wasm_bindgen_func_elem_1487(a, state0.b, arg02, arg12);
1397
1407
  } finally {
1398
1408
  state0.a = a;
1399
1409
  }
@@ -1573,11 +1583,11 @@ function __wbg_get_imports() {
1573
1583
  return addHeapObject(ret);
1574
1584
  },
1575
1585
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1576
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_656, __wasm_bindgen_func_elem_657);
1586
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_699, __wasm_bindgen_func_elem_700);
1577
1587
  return addHeapObject(ret);
1578
1588
  },
1579
1589
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1580
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_984, __wasm_bindgen_func_elem_985);
1590
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1027, __wasm_bindgen_func_elem_1028);
1581
1591
  return addHeapObject(ret);
1582
1592
  },
1583
1593
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1613,13 +1623,13 @@ function __wbg_get_imports() {
1613
1623
  "./idkit_wasm_bg.js": import0
1614
1624
  };
1615
1625
  }
1616
- function __wasm_bindgen_func_elem_657(arg0, arg1) {
1617
- wasm.__wasm_bindgen_func_elem_657(arg0, arg1);
1626
+ function __wasm_bindgen_func_elem_700(arg0, arg1) {
1627
+ wasm.__wasm_bindgen_func_elem_700(arg0, arg1);
1618
1628
  }
1619
- function __wasm_bindgen_func_elem_985(arg0, arg1, arg2) {
1629
+ function __wasm_bindgen_func_elem_1028(arg0, arg1, arg2) {
1620
1630
  try {
1621
1631
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1622
- wasm.__wasm_bindgen_func_elem_985(retptr, arg0, arg1, addHeapObject(arg2));
1632
+ wasm.__wasm_bindgen_func_elem_1028(retptr, arg0, arg1, addHeapObject(arg2));
1623
1633
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1624
1634
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1625
1635
  if (r1) {
@@ -1629,8 +1639,8 @@ function __wasm_bindgen_func_elem_985(arg0, arg1, arg2) {
1629
1639
  wasm.__wbindgen_add_to_stack_pointer(16);
1630
1640
  }
1631
1641
  }
1632
- function __wasm_bindgen_func_elem_1438(arg0, arg1, arg2, arg3) {
1633
- wasm.__wasm_bindgen_func_elem_1438(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1642
+ function __wasm_bindgen_func_elem_1487(arg0, arg1, arg2, arg3) {
1643
+ wasm.__wasm_bindgen_func_elem_1487(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1634
1644
  }
1635
1645
  var __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1636
1646
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/idkit-core",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "Core IDKit SDK for World ID - Pure TypeScript, no dependencies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",