@worldcoin/idkit 1.4.2 → 1.4.3
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/build/{chunk-YN64HCS2.js → chunk-5OWPJUHG.js} +4 -1
- package/build/index.js +24 -16
- package/build/internal.d.ts +1 -0
- package/build/internal.js +1 -1
- package/package.json +61 -61
|
@@ -31,6 +31,7 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
31
31
|
action_description: "",
|
|
32
32
|
bridge_url: "",
|
|
33
33
|
verification_level: DEFAULT_VERIFICATION_LEVEL,
|
|
34
|
+
partner: false,
|
|
34
35
|
open: false,
|
|
35
36
|
result: null,
|
|
36
37
|
errorTitle: "",
|
|
@@ -72,6 +73,7 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
72
73
|
signal,
|
|
73
74
|
action,
|
|
74
75
|
app_id,
|
|
76
|
+
partner,
|
|
75
77
|
onError,
|
|
76
78
|
verification_level,
|
|
77
79
|
action_description,
|
|
@@ -86,7 +88,8 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
86
88
|
action_description,
|
|
87
89
|
autoClose: autoClose ?? true,
|
|
88
90
|
app_id: advanced?.self_hosted ? SELF_HOSTED_APP_ID : app_id,
|
|
89
|
-
verification_level: verification_level ?? DEFAULT_VERIFICATION_LEVEL
|
|
91
|
+
verification_level: verification_level ?? DEFAULT_VERIFICATION_LEVEL,
|
|
92
|
+
partner
|
|
90
93
|
});
|
|
91
94
|
get().addSuccessCallback(onSuccess, source);
|
|
92
95
|
if (onError) get().addErrorCallback(onError, source);
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
QRCode_default,
|
|
3
3
|
__,
|
|
4
4
|
idkit_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5OWPJUHG.js";
|
|
6
6
|
|
|
7
7
|
// src/hooks/useIDKit.ts
|
|
8
8
|
import { useEffect } from "react";
|
|
@@ -743,9 +743,6 @@ select{
|
|
|
743
743
|
.h-24{
|
|
744
744
|
height: 96px;
|
|
745
745
|
}
|
|
746
|
-
.h-5{
|
|
747
|
-
height: 20px;
|
|
748
|
-
}
|
|
749
746
|
.min-h-full{
|
|
750
747
|
min-height: 100%;
|
|
751
748
|
}
|
|
@@ -758,9 +755,6 @@ select{
|
|
|
758
755
|
.w-4{
|
|
759
756
|
width: 16px;
|
|
760
757
|
}
|
|
761
|
-
.w-5{
|
|
762
|
-
width: 20px;
|
|
763
|
-
}
|
|
764
758
|
.w-full{
|
|
765
759
|
width: 100%;
|
|
766
760
|
}
|
|
@@ -1312,7 +1306,7 @@ var ERROR_MESSAGES = {
|
|
|
1312
1306
|
"There was a problem with this request. Please try again or contact the app owner."
|
|
1313
1307
|
),
|
|
1314
1308
|
[AppErrorCodes.InvalidNetwork]: __(
|
|
1315
|
-
"Invalid network. If you are the app owner, visit docs.
|
|
1309
|
+
"Invalid network. If you are the app owner, visit docs.world.org/test for details."
|
|
1316
1310
|
),
|
|
1317
1311
|
[AppErrorCodes.InclusionProofFailed]: __("There was an issue fetching your credential. Please try again."),
|
|
1318
1312
|
[AppErrorCodes.InclusionProofPending]: __(
|
|
@@ -1337,7 +1331,7 @@ var ErrorState = () => {
|
|
|
1337
1331
|
onClick: retryFlow,
|
|
1338
1332
|
className: "inline-flex items-center rounded-lg border border-ebecef bg-transparent px-8 py-3 font-medium text-3c424b shadow-sm transition duration-300 hover:shadow focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1339
1333
|
children: [
|
|
1340
|
-
/* @__PURE__ */ jsx6(ReloadIcon_default, { className: "mr-1.5
|
|
1334
|
+
/* @__PURE__ */ jsx6(ReloadIcon_default, { className: "mr-1.5 size-5" }),
|
|
1341
1335
|
__("Try Again")
|
|
1342
1336
|
]
|
|
1343
1337
|
}
|
|
@@ -1678,7 +1672,7 @@ import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
|
1678
1672
|
// src/services/wld-bridge.ts
|
|
1679
1673
|
import { useEffect as useEffect3, useRef } from "react";
|
|
1680
1674
|
import { useWorldBridgeStore } from "@worldcoin/idkit-core";
|
|
1681
|
-
var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, action_description) => {
|
|
1675
|
+
var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, action_description, partner) => {
|
|
1682
1676
|
const ref_verification_level = useRef(verification_level);
|
|
1683
1677
|
const { reset, result, connectorURI, createClient, pollForUpdates, verificationState, errorCode } = useWorldBridgeStore();
|
|
1684
1678
|
useEffect3(() => {
|
|
@@ -1689,10 +1683,21 @@ var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, ac
|
|
|
1689
1683
|
signal,
|
|
1690
1684
|
bridge_url,
|
|
1691
1685
|
action_description,
|
|
1692
|
-
verification_level: ref_verification_level.current
|
|
1686
|
+
verification_level: ref_verification_level.current,
|
|
1687
|
+
partner
|
|
1693
1688
|
});
|
|
1694
1689
|
}
|
|
1695
|
-
}, [
|
|
1690
|
+
}, [
|
|
1691
|
+
app_id,
|
|
1692
|
+
action,
|
|
1693
|
+
signal,
|
|
1694
|
+
action_description,
|
|
1695
|
+
createClient,
|
|
1696
|
+
ref_verification_level,
|
|
1697
|
+
bridge_url,
|
|
1698
|
+
connectorURI,
|
|
1699
|
+
partner
|
|
1700
|
+
]);
|
|
1696
1701
|
useEffect3(() => {
|
|
1697
1702
|
if (!connectorURI || result || errorCode) return;
|
|
1698
1703
|
const interval = setInterval(() => void pollForUpdates(), 3e3);
|
|
@@ -1737,7 +1742,8 @@ var getOptions = (store) => ({
|
|
|
1737
1742
|
handleVerify: store.handleVerify,
|
|
1738
1743
|
setErrorState: store.setErrorState,
|
|
1739
1744
|
verification_level: store.verification_level,
|
|
1740
|
-
action_description: store.action_description
|
|
1745
|
+
action_description: store.action_description,
|
|
1746
|
+
partner: store.partner
|
|
1741
1747
|
});
|
|
1742
1748
|
var WorldIDState = () => {
|
|
1743
1749
|
const [showQR, setShowQR] = useState3(false);
|
|
@@ -1750,7 +1756,8 @@ var WorldIDState = () => {
|
|
|
1750
1756
|
bridge_url,
|
|
1751
1757
|
action_description,
|
|
1752
1758
|
verification_level,
|
|
1753
|
-
setErrorState
|
|
1759
|
+
setErrorState,
|
|
1760
|
+
partner
|
|
1754
1761
|
} = idkit_default(getOptions, shallow);
|
|
1755
1762
|
const { connectorURI, reset, errorCode, result, verificationState } = useWorldBridge(
|
|
1756
1763
|
app_id,
|
|
@@ -1758,7 +1765,8 @@ var WorldIDState = () => {
|
|
|
1758
1765
|
signal,
|
|
1759
1766
|
bridge_url,
|
|
1760
1767
|
verification_level,
|
|
1761
|
-
action_description
|
|
1768
|
+
action_description,
|
|
1769
|
+
partner
|
|
1762
1770
|
);
|
|
1763
1771
|
useEffect4(() => reset, [reset]);
|
|
1764
1772
|
useEffect4(() => {
|
|
@@ -1890,7 +1898,7 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
1890
1898
|
/* @__PURE__ */ jsxs11(
|
|
1891
1899
|
"a",
|
|
1892
1900
|
{
|
|
1893
|
-
href: "https://
|
|
1901
|
+
href: "https://world.org/world-id",
|
|
1894
1902
|
target: "_blank",
|
|
1895
1903
|
rel: "noreferrer",
|
|
1896
1904
|
className: "flex items-center gap-1 text-sm text-9eafc0",
|
package/build/internal.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ type IDKitStore = {
|
|
|
27
27
|
bridge_url?: IDKitConfig['bridge_url'];
|
|
28
28
|
action_description?: IDKitConfig['action_description'];
|
|
29
29
|
verification_level: NonNullable<IDKitConfig['verification_level']>;
|
|
30
|
+
partner?: IDKitConfig['partner'];
|
|
30
31
|
open: boolean;
|
|
31
32
|
stage: IDKITStage;
|
|
32
33
|
autoClose: boolean;
|
package/build/internal.js
CHANGED
package/package.json
CHANGED
|
@@ -1,60 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@worldcoin/idkit",
|
|
3
|
-
"version": "1.4.2",
|
|
4
|
-
"homepage": "https://docs.worldcoin.org/id/idkit",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"private": false,
|
|
7
|
-
"description": "The identity SDK. Privacy-preserving identity and proof of personhood with World ID.",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/worldcoin/idkit-js",
|
|
11
|
-
"directory": "packages/react"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"import": "./build/index.js",
|
|
17
|
-
"types": "./build/index.d.ts"
|
|
18
|
-
},
|
|
19
|
-
"./internal": {
|
|
20
|
-
"import": "./build/internal.js",
|
|
21
|
-
"types": "./build/internal.d.ts"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"publishConfig": {
|
|
25
|
-
"access": "public"
|
|
26
|
-
},
|
|
27
|
-
"typesVersions": {
|
|
28
|
-
"*": {
|
|
29
|
-
"internal": [
|
|
30
|
-
"./build/internal.d.ts"
|
|
31
|
-
],
|
|
32
|
-
"*": [
|
|
33
|
-
"./build/*/index.d.ts",
|
|
34
|
-
"./build/index.d.ts"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"main": "src/index.ts",
|
|
39
|
-
"types": "src/index.ts",
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=12.4"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"build",
|
|
45
|
-
"README.md"
|
|
46
|
-
],
|
|
47
|
-
"keywords": [
|
|
48
|
-
"identity",
|
|
49
|
-
"ID",
|
|
50
|
-
"web3",
|
|
51
|
-
"proof-of-personhood",
|
|
52
|
-
"sybil resistance"
|
|
53
|
-
],
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"react": ">18.0.0",
|
|
56
|
-
"react-dom": ">18.0.0"
|
|
57
|
-
},
|
|
58
2
|
"dependencies": {
|
|
59
3
|
"@radix-ui/react-dialog": "^1.1.1",
|
|
60
4
|
"@radix-ui/react-toast": "^1.2.1",
|
|
@@ -62,10 +6,11 @@
|
|
|
62
6
|
"copy-to-clipboard": "^3.3.3",
|
|
63
7
|
"framer-motion": "^11.2.14",
|
|
64
8
|
"qrcode": "^1.5.3",
|
|
65
|
-
"react-shadow": "^
|
|
9
|
+
"react-shadow": "^20.6.0",
|
|
66
10
|
"zustand": "^4.5.4",
|
|
67
|
-
"@worldcoin/idkit-core": "1.4.
|
|
11
|
+
"@worldcoin/idkit-core": "1.4.3"
|
|
68
12
|
},
|
|
13
|
+
"description": "The identity SDK. Privacy-preserving identity and proof of personhood with World ID.",
|
|
69
14
|
"devDependencies": {
|
|
70
15
|
"@types/node": "18.11.9",
|
|
71
16
|
"@types/qrcode": "^1.5.5",
|
|
@@ -93,10 +38,65 @@
|
|
|
93
38
|
"tsup": "^8.1.0",
|
|
94
39
|
"typescript": "^5.5.3"
|
|
95
40
|
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=12.4"
|
|
43
|
+
},
|
|
44
|
+
"exports": {
|
|
45
|
+
".": {
|
|
46
|
+
"import": "./build/index.js",
|
|
47
|
+
"types": "./build/index.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./internal": {
|
|
50
|
+
"import": "./build/internal.js",
|
|
51
|
+
"types": "./build/internal.d.ts"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"build",
|
|
56
|
+
"README.md"
|
|
57
|
+
],
|
|
58
|
+
"homepage": "https://docs.world.org/id/idkit",
|
|
59
|
+
"keywords": [
|
|
60
|
+
"identity",
|
|
61
|
+
"ID",
|
|
62
|
+
"web3",
|
|
63
|
+
"proof-of-personhood",
|
|
64
|
+
"sybil resistance"
|
|
65
|
+
],
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"main": "src/index.ts",
|
|
68
|
+
"name": "@worldcoin/idkit",
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": ">18.0.0",
|
|
71
|
+
"react-dom": ">18.0.0"
|
|
72
|
+
},
|
|
73
|
+
"private": false,
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"access": "public"
|
|
76
|
+
},
|
|
77
|
+
"repository": {
|
|
78
|
+
"directory": "packages/react",
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "git+https://github.com/worldcoin/idkit-js"
|
|
81
|
+
},
|
|
82
|
+
"type": "module",
|
|
83
|
+
"types": "src/index.ts",
|
|
84
|
+
"typesVersions": {
|
|
85
|
+
"*": {
|
|
86
|
+
"*": [
|
|
87
|
+
"./build/*/index.d.ts",
|
|
88
|
+
"./build/index.d.ts"
|
|
89
|
+
],
|
|
90
|
+
"internal": [
|
|
91
|
+
"./build/internal.d.ts"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"version": "1.4.3",
|
|
96
96
|
"scripts": {
|
|
97
|
-
"dev": "tsup --watch",
|
|
98
|
-
"lint": "eslint src --ext .ts",
|
|
99
97
|
"build": "npm run build:css && tsup",
|
|
100
|
-
"build:css": "npx tailwindcss -i ./src/styles/styles.css -o ./build/index.css --minify"
|
|
98
|
+
"build:css": "npx tailwindcss -i ./src/styles/styles.css -o ./build/index.css --minify",
|
|
99
|
+
"dev": "tsup --watch",
|
|
100
|
+
"lint": "eslint src --ext .ts"
|
|
101
101
|
}
|
|
102
102
|
}
|