@worldcoin/idkit 0.0.1 → 0.0.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.
- package/build/components/IDKitWidget/BaseWidget.d.ts +2 -7
- package/build/components/IDKitWidget/index.d.ts +1 -5
- package/build/components/Icons/WorldcoinLogomark.d.ts +5 -0
- package/build/components/QRCode.d.ts +6 -0
- package/build/hooks/useMedia.d.ts +2 -0
- package/build/idkit-js.js +73 -19
- package/build/index.css +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +8 -2
- package/build/index.js.map +3 -3
- package/build/lib/hashing.d.ts +37 -0
- package/build/lib/qr.d.ts +5 -0
- package/build/lib/telemetry.d.ts +4 -0
- package/build/lib/utils.d.ts +2 -1
- package/build/services/phone.d.ts +1 -1
- package/build/services/walletconnect.d.ts +14 -0
- package/build/store/idkit.d.ts +8 -7
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/config.d.ts +13 -1
- package/build/types/index.d.ts +4 -0
- package/build/types/orb.d.ts +21 -0
- package/package.json +29 -9
package/build/types/config.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { CallbackFn } from '.';
|
|
2
|
+
export type StringOrAdvanced = Array<[string, unknown]> | string;
|
|
3
|
+
export declare enum ConfigSource {
|
|
4
|
+
HOOK = "hook",
|
|
5
|
+
PROPS = "props",
|
|
6
|
+
MANUAL = "manual"
|
|
7
|
+
}
|
|
2
8
|
export type Config = {
|
|
3
|
-
|
|
9
|
+
signal: StringOrAdvanced;
|
|
10
|
+
actionId: StringOrAdvanced;
|
|
4
11
|
autoClose?: boolean;
|
|
5
12
|
onSuccess?: CallbackFn;
|
|
6
13
|
enableTelemetry?: boolean;
|
|
@@ -11,6 +18,11 @@ export type Config = {
|
|
|
11
18
|
success?: string;
|
|
12
19
|
};
|
|
13
20
|
};
|
|
21
|
+
export type WidgetProps = Config & {
|
|
22
|
+
children?: ({ open }: {
|
|
23
|
+
open: () => void;
|
|
24
|
+
}) => JSX.Element;
|
|
25
|
+
};
|
|
14
26
|
export declare const DEFAULT_COPY: {
|
|
15
27
|
title: string;
|
|
16
28
|
heading: string;
|
package/build/types/index.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum ErrorCodes {
|
|
2
|
+
ConnectionFailed = "connection_failed",
|
|
3
|
+
VerificationRejected = "verification_rejected",
|
|
4
|
+
AlreadySigned = "already_signed",
|
|
5
|
+
InvalidActionID = "invalid_action_id",
|
|
6
|
+
InvalidSignal = "invalid_signal",
|
|
7
|
+
UnexpectedResponse = "unexpected_response",
|
|
8
|
+
GenericError = "generic_error"
|
|
9
|
+
}
|
|
10
|
+
export declare enum VerificationState {
|
|
11
|
+
LoadingWidget = "loading_widget",
|
|
12
|
+
AwaitingConnection = "awaiting_connection",
|
|
13
|
+
AwaitingVerification = "awaiting_verification",
|
|
14
|
+
Confirmed = "confirmed",
|
|
15
|
+
Failed = "failed"
|
|
16
|
+
}
|
|
17
|
+
export type OrbResponse = {
|
|
18
|
+
proof: string;
|
|
19
|
+
merkle_root: string;
|
|
20
|
+
nullifier_hash: string;
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "The identity SDK. Add sybil resistance to your apps through the World ID protocol.",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./build/index.d.ts",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.2",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./build/index.cjs",
|
|
9
9
|
"module": "./build/index.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"web3",
|
|
18
18
|
"proof-of-personhood",
|
|
19
19
|
"sybil resistance"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"homepage": "https://github.com/worldcoin/idkit-js",
|
|
24
|
+
"repository": "github:worldcoin/idkit-js",
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "npm-run-all clean build:*",
|
|
27
27
|
"build:css": "npx tailwindcss -i ./src/styles/styles.css -o ./build/index.css --minify",
|
|
@@ -37,13 +37,16 @@
|
|
|
37
37
|
"format:check": "prettier --check ./",
|
|
38
38
|
"lint": "eslint --ext .tsx,.ts,.js,.jsx ./",
|
|
39
39
|
"lint:fix": "eslint --ext .tsx,.ts,.js,.jsx ./ --fix",
|
|
40
|
-
"typecheck": "tsc"
|
|
40
|
+
"typecheck": "tsc",
|
|
41
|
+
"prerelease": "standard-version"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"react": ">18.0.0",
|
|
44
45
|
"react-dom": ">18.0.0"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
48
|
+
"@ethersproject/bytes": "^5.7.0",
|
|
49
|
+
"@ethersproject/solidity": "^5.7.0",
|
|
47
50
|
"@fontsource/rubik": "^4.5.11",
|
|
48
51
|
"@headlessui/react": "^1.7.4",
|
|
49
52
|
"@heroicons/react": "^2.0.13",
|
|
@@ -52,9 +55,13 @@
|
|
|
52
55
|
"@radix-ui/react-select": "^1.1.2",
|
|
53
56
|
"@radix-ui/react-toast": "^1.1.2",
|
|
54
57
|
"@tailwindcss/forms": "^0.5.3",
|
|
58
|
+
"@walletconnect/client": "^1.8.0",
|
|
55
59
|
"country-telephone-data": "^0.6.3",
|
|
56
60
|
"framer-motion": "^7.6.7",
|
|
61
|
+
"js-sha3": "^0.8.0",
|
|
57
62
|
"phone": "^3.1.30",
|
|
63
|
+
"posthog-js-lite": "2.0.0-alpha5",
|
|
64
|
+
"qr-code-styling-new": "^1.6.1",
|
|
58
65
|
"react-countdown": "^2.3.4",
|
|
59
66
|
"react-country-flag": "^3.0.2",
|
|
60
67
|
"react-frame-component": "^5.2.3",
|
|
@@ -62,7 +69,6 @@
|
|
|
62
69
|
"zustand": "^4.1.4"
|
|
63
70
|
},
|
|
64
71
|
"devDependencies": {
|
|
65
|
-
"typescript": "4.9.3",
|
|
66
72
|
"@babel/core": "^7.20.2",
|
|
67
73
|
"@babel/plugin-syntax-typescript": "^7.20.0",
|
|
68
74
|
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
|
@@ -96,7 +102,21 @@
|
|
|
96
102
|
"react": "18.2.0",
|
|
97
103
|
"react-dom": "18.2.0",
|
|
98
104
|
"rimraf": "^3.0.2",
|
|
105
|
+
"standard-version": "^9.5.0",
|
|
99
106
|
"tailwindcss": "^3.2.4",
|
|
100
|
-
"tsc-alias": "^1.7.1"
|
|
107
|
+
"tsc-alias": "^1.7.1",
|
|
108
|
+
"typescript": "4.9.3"
|
|
109
|
+
},
|
|
110
|
+
"browserslist": {
|
|
111
|
+
"production": [
|
|
112
|
+
">0.2%",
|
|
113
|
+
"not dead",
|
|
114
|
+
"not op_mini all"
|
|
115
|
+
],
|
|
116
|
+
"development": [
|
|
117
|
+
"last 1 chrome version",
|
|
118
|
+
"last 1 firefox version",
|
|
119
|
+
"last 1 safari version"
|
|
120
|
+
]
|
|
101
121
|
}
|
|
102
122
|
}
|