@worldcoin/idkit 0.0.2 → 0.2.0
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/README.md +2 -2
- package/build/components/IDKitWidget/States/ErrorState.d.ts +2 -0
- package/build/components/IDKitWidget/States/HostAppVerificationState.d.ts +7 -0
- package/build/components/IDKitWidget/States/PrivacyState.d.ts +2 -0
- package/build/idkit-js.js +29 -29
- package/build/index.css +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +3 -3
- package/build/lib/telemetry.d.ts +2 -0
- package/build/services/phone.d.ts +4 -4
- package/build/services/walletconnect.d.ts +2 -2
- package/build/store/idkit.d.ts +4 -4
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/config.d.ts +1 -1
- package/build/types/index.d.ts +22 -4
- package/build/types/orb.d.ts +1 -1
- package/package.json +1 -1
package/build/types/config.d.ts
CHANGED
package/build/types/index.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ export declare enum IDKITStage {
|
|
|
2
2
|
ENTER_PHONE = "ENTER_PHONE",
|
|
3
3
|
ENTER_CODE = "ENTER_CODE",
|
|
4
4
|
WORLD_ID = "WORLD_ID",
|
|
5
|
+
PRIVACY = "PRIVACY",
|
|
5
6
|
SUCCESS = "SUCCESS",
|
|
6
7
|
ERROR = "ERROR",
|
|
7
|
-
ABOUT = "ABOUT"
|
|
8
|
+
ABOUT = "ABOUT",
|
|
9
|
+
HOST_APP_VERIFICATION = "HOST_APP_VERIFICATION"
|
|
8
10
|
}
|
|
9
11
|
export interface OrbSignalProof {
|
|
10
12
|
merkle_root: string;
|
|
@@ -23,12 +25,28 @@ export interface ISuccessResult {
|
|
|
23
25
|
proof_payload: OrbSignalProof | PhoneSignalProof;
|
|
24
26
|
nullifier_hash: string;
|
|
25
27
|
}
|
|
26
|
-
export type CallbackFn = (result: ISuccessResult) => void;
|
|
27
|
-
export
|
|
28
|
+
export type CallbackFn = (result: ISuccessResult) => Promise<void> | void;
|
|
29
|
+
export interface IErrorState {
|
|
30
|
+
code: ErrorCodes;
|
|
31
|
+
message?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare enum ErrorCodes {
|
|
28
34
|
GENERIC_ERROR = "GENERIC_ERROR",
|
|
29
|
-
|
|
35
|
+
PHONE_OTP_REQUEST_ERROR = "PHONE_OTP_REQUEST_ERROR",
|
|
36
|
+
INVALID_CODE = "INVALID_CODE",
|
|
37
|
+
REJECTED_BY_HOST_APP = "REJECTED_BY_HOST_APP"
|
|
30
38
|
}
|
|
31
39
|
export interface ExpectedErrorResponse {
|
|
32
40
|
message: string;
|
|
33
41
|
stack: string;
|
|
34
42
|
}
|
|
43
|
+
export declare enum PhoneVerificationChannel {
|
|
44
|
+
SMS = "sms",
|
|
45
|
+
Call = "call"
|
|
46
|
+
}
|
|
47
|
+
export declare enum PhoneRequestErrorCodes {
|
|
48
|
+
MAX_ATTEMPTS = "max_attempts",
|
|
49
|
+
TIMEOUT = "timeout",
|
|
50
|
+
UNSUPPORTED_COUNTRY = "unsupported_country",
|
|
51
|
+
SERVER_ERROR = "server_error"
|
|
52
|
+
}
|
package/build/types/orb.d.ts
CHANGED
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.2.0",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./build/index.cjs",
|
|
9
9
|
"module": "./build/index.js",
|