@worldcoin/idkit-core 1.4.0 → 1.4.2

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.
@@ -34,6 +34,8 @@ type IDKitConfig = {
34
34
  bridge_url?: string;
35
35
  /** The minimum required level of verification. Defaults to "orb". */
36
36
  verification_level?: VerificationLevel;
37
+ /** Whether the app is a partner app and should allow deferred verification. Defaults to false. */
38
+ partner?: boolean;
37
39
  };
38
40
 
39
41
  export { type AbiEncodedValue as A, CredentialType as C, type IDKitConfig as I, VerificationLevel as V };
@@ -34,6 +34,8 @@ type IDKitConfig = {
34
34
  bridge_url?: string;
35
35
  /** The minimum required level of verification. Defaults to "orb". */
36
36
  verification_level?: VerificationLevel;
37
+ /** Whether the app is a partner app and should allow deferred verification. Defaults to false. */
38
+ partner?: boolean;
37
39
  };
38
40
 
39
41
  export { type AbiEncodedValue as A, CredentialType as C, type IDKitConfig as I, VerificationLevel as V };
package/build/index.cjs CHANGED
@@ -161,7 +161,7 @@ var buffer_decode = (encoded) => {
161
161
  var verification_level_to_credential_types = (verification_level) => {
162
162
  switch (verification_level) {
163
163
  case "device" /* Device */:
164
- return ["orb" /* Orb */, "device" /* Device */, "secure_document" /* SecureDocument */, "document" /* Document */];
164
+ return ["orb" /* Orb */, "device" /* Device */];
165
165
  case "document" /* Document */:
166
166
  return ["document" /* Document */, "orb" /* Orb */];
167
167
  case "secure_document" /* SecureDocument */:
@@ -222,7 +222,7 @@ var useWorldBridgeStore = (0, import_zustand.create)((set, get) => ({
222
222
  connectorURI: null,
223
223
  bridge_url: DEFAULT_BRIDGE_URL,
224
224
  verificationState: "loading_widget" /* PreparingClient */,
225
- createClient: async ({ bridge_url, app_id, verification_level, action_description, action, signal }) => {
225
+ createClient: async ({ bridge_url, app_id, verification_level, action_description, action, signal, partner }) => {
226
226
  const { key, iv } = await generateKey();
227
227
  if (bridge_url) {
228
228
  const validation = validate_bridge_url(bridge_url, app_id.includes("staging"));
@@ -265,7 +265,7 @@ var useWorldBridgeStore = (0, import_zustand.create)((set, get) => ({
265
265
  verificationState: "awaiting_connection" /* WaitingForConnection */,
266
266
  connectorURI: `https://worldcoin.org/verify?t=wld&i=${request_id}&k=${encodeURIComponent(
267
267
  await exportKey(key)
268
- )}${bridge_url && bridge_url !== DEFAULT_BRIDGE_URL ? `&b=${encodeURIComponent(bridge_url)}` : ""}`
268
+ )}${bridge_url && bridge_url !== DEFAULT_BRIDGE_URL ? `&b=${encodeURIComponent(bridge_url)}` : ""}${partner ? `&partner=${encodeURIComponent(true)}` : ""}`
269
269
  });
270
270
  },
271
271
  pollForUpdates: async () => {
package/build/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as ISuccessResult, A as AppErrorCodes, V as VerificationState } from './result-CUii5sPK.cjs';
2
- export { a as IErrorState } from './result-CUii5sPK.cjs';
3
- import { I as IDKitConfig, V as VerificationLevel } from './config-Cnqr_Fj4.cjs';
4
- export { A as AbiEncodedValue, C as CredentialType } from './config-Cnqr_Fj4.cjs';
1
+ import { I as ISuccessResult, A as AppErrorCodes, V as VerificationState } from './result-dIv4wo8c.cjs';
2
+ export { a as IErrorState } from './result-dIv4wo8c.cjs';
3
+ import { I as IDKitConfig, V as VerificationLevel } from './config-DdATHXeA.cjs';
4
+ export { A as AbiEncodedValue, C as CredentialType } from './config-DdATHXeA.cjs';
5
5
  import * as zustand from 'zustand';
6
6
 
7
7
  type WorldBridgeStore = {
package/build/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { I as ISuccessResult, A as AppErrorCodes, V as VerificationState } from './result-BIRE8gcC.js';
2
- export { a as IErrorState } from './result-BIRE8gcC.js';
3
- import { I as IDKitConfig, V as VerificationLevel } from './config-Cnqr_Fj4.js';
4
- export { A as AbiEncodedValue, C as CredentialType } from './config-Cnqr_Fj4.js';
1
+ import { I as ISuccessResult, A as AppErrorCodes, V as VerificationState } from './result-CQHGruZD.js';
2
+ export { a as IErrorState } from './result-CQHGruZD.js';
3
+ import { I as IDKitConfig, V as VerificationLevel } from './config-DdATHXeA.js';
4
+ export { A as AbiEncodedValue, C as CredentialType } from './config-DdATHXeA.js';
5
5
  import * as zustand from 'zustand';
6
6
 
7
7
  type WorldBridgeStore = {
package/build/index.js CHANGED
@@ -97,7 +97,7 @@ var buffer_decode = (encoded) => {
97
97
  var verification_level_to_credential_types = (verification_level) => {
98
98
  switch (verification_level) {
99
99
  case "device" /* Device */:
100
- return ["orb" /* Orb */, "device" /* Device */, "secure_document" /* SecureDocument */, "document" /* Document */];
100
+ return ["orb" /* Orb */, "device" /* Device */];
101
101
  case "document" /* Document */:
102
102
  return ["document" /* Document */, "orb" /* Orb */];
103
103
  case "secure_document" /* SecureDocument */:
@@ -158,7 +158,7 @@ var useWorldBridgeStore = create((set, get) => ({
158
158
  connectorURI: null,
159
159
  bridge_url: DEFAULT_BRIDGE_URL,
160
160
  verificationState: "loading_widget" /* PreparingClient */,
161
- createClient: async ({ bridge_url, app_id, verification_level, action_description, action, signal }) => {
161
+ createClient: async ({ bridge_url, app_id, verification_level, action_description, action, signal, partner }) => {
162
162
  const { key, iv } = await generateKey();
163
163
  if (bridge_url) {
164
164
  const validation = validate_bridge_url(bridge_url, app_id.includes("staging"));
@@ -201,7 +201,7 @@ var useWorldBridgeStore = create((set, get) => ({
201
201
  verificationState: "awaiting_connection" /* WaitingForConnection */,
202
202
  connectorURI: `https://worldcoin.org/verify?t=wld&i=${request_id}&k=${encodeURIComponent(
203
203
  await exportKey(key)
204
- )}${bridge_url && bridge_url !== DEFAULT_BRIDGE_URL ? `&b=${encodeURIComponent(bridge_url)}` : ""}`
204
+ )}${bridge_url && bridge_url !== DEFAULT_BRIDGE_URL ? `&b=${encodeURIComponent(bridge_url)}` : ""}${partner ? `&partner=${encodeURIComponent(true)}` : ""}`
205
205
  });
206
206
  },
207
207
  pollForUpdates: async () => {
@@ -1,5 +1,5 @@
1
- import { I as ISuccessResult } from '../result-CUii5sPK.cjs';
2
- import '../config-Cnqr_Fj4.cjs';
1
+ import { I as ISuccessResult } from '../result-dIv4wo8c.cjs';
2
+ import '../config-DdATHXeA.cjs';
3
3
 
4
4
  interface IVerifyResponse {
5
5
  success: boolean;
@@ -1,5 +1,5 @@
1
- import { I as ISuccessResult } from '../result-BIRE8gcC.js';
2
- import '../config-Cnqr_Fj4.js';
1
+ import { I as ISuccessResult } from '../result-CQHGruZD.js';
2
+ import '../config-DdATHXeA.js';
3
3
 
4
4
  interface IVerifyResponse {
5
5
  success: boolean;
@@ -1,4 +1,4 @@
1
- import { A as AbiEncodedValue, I as IDKitConfig } from '../config-Cnqr_Fj4.cjs';
1
+ import { A as AbiEncodedValue, I as IDKitConfig } from '../config-DdATHXeA.cjs';
2
2
  import { Bytes } from 'ox';
3
3
 
4
4
  interface HashFunctionOutput {
@@ -1,4 +1,4 @@
1
- import { A as AbiEncodedValue, I as IDKitConfig } from '../config-Cnqr_Fj4.js';
1
+ import { A as AbiEncodedValue, I as IDKitConfig } from '../config-DdATHXeA.js';
2
2
  import { Bytes } from 'ox';
3
3
 
4
4
  interface HashFunctionOutput {
@@ -1,4 +1,4 @@
1
- import { V as VerificationLevel } from './config-Cnqr_Fj4.js';
1
+ import { V as VerificationLevel } from './config-DdATHXeA.js';
2
2
 
3
3
  declare enum AppErrorCodes {
4
4
  ConnectionFailed = "connection_failed",
@@ -1,4 +1,4 @@
1
- import { V as VerificationLevel } from './config-Cnqr_Fj4.cjs';
1
+ import { V as VerificationLevel } from './config-DdATHXeA.cjs';
2
2
 
3
3
  declare enum AppErrorCodes {
4
4
  ConnectionFailed = "connection_failed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/idkit-core",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "homepage": "https://docs.worldcoin.org/id/idkit",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -41,6 +41,9 @@
41
41
  ]
42
42
  }
43
43
  },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
44
47
  "engines": {
45
48
  "node": ">=12.4"
46
49
  },