@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/lib/telemetry.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { PhoneVerificationChannel } from '../types';
|
|
1
2
|
export declare const getTelemetryId: () => string;
|
|
2
3
|
export declare const initTelemetry: (enableTelemetry?: boolean) => void;
|
|
3
4
|
export declare const telemetryModalOpened: () => void;
|
|
4
5
|
export declare const telemetryPhoneTyped: () => void;
|
|
6
|
+
export declare const telemetryRetryCode: (channel: PhoneVerificationChannel) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { PhoneSignalProof } from '../types';
|
|
2
|
-
export declare function requestCode(phone_number: string, action_id: string, ph_distinct_id: string): Promise<void>;
|
|
1
|
+
import type { PhoneRequestErrorCodes, PhoneSignalProof, PhoneVerificationChannel } from '../types';
|
|
2
|
+
export declare function requestCode(phone_number: string, action_id: string, channel: PhoneVerificationChannel, ph_distinct_id: string): Promise<void>;
|
|
3
3
|
interface VerifyCodeSuccess extends Pick<PhoneSignalProof, 'signature' | 'timestamp'> {
|
|
4
4
|
success: true;
|
|
5
5
|
nullifier_hash: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function verifyCode(phone_number: string, code: string, action_id: string, ph_distinct_id: string): Promise<VerifyCodeSuccess>;
|
|
8
8
|
interface RequestCodeError {
|
|
9
|
-
code:
|
|
10
|
-
|
|
9
|
+
code: PhoneRequestErrorCodes;
|
|
10
|
+
detail: string;
|
|
11
11
|
}
|
|
12
12
|
export declare function isRequestCodeError(error: unknown): error is RequestCodeError;
|
|
13
13
|
export interface VerifyCodeError {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { OrbResponse } from '../types/orb';
|
|
2
2
|
import type { StringOrAdvanced } from '../types/config';
|
|
3
|
-
import {
|
|
3
|
+
import { OrbErrorCodes, VerificationState } from '../types/orb';
|
|
4
4
|
type UseOrbSignalResponse = {
|
|
5
5
|
result: OrbResponse | null;
|
|
6
|
-
errorCode:
|
|
6
|
+
errorCode: OrbErrorCodes | null;
|
|
7
7
|
verificationState: VerificationState;
|
|
8
8
|
qrData: {
|
|
9
9
|
default: string;
|
package/build/store/idkit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDKITStage } from '../types';
|
|
2
|
-
import type { CallbackFn,
|
|
2
|
+
import type { CallbackFn, ISuccessResult, IErrorState } from '../types';
|
|
3
3
|
import type { Config, ConfigSource, StringOrAdvanced } from '../types/config';
|
|
4
4
|
export type IDKitStore = {
|
|
5
5
|
code: string;
|
|
@@ -12,17 +12,17 @@ export type IDKitStore = {
|
|
|
12
12
|
signal: StringOrAdvanced;
|
|
13
13
|
actionId: StringOrAdvanced;
|
|
14
14
|
stringifiedActionId: string;
|
|
15
|
-
errorState:
|
|
15
|
+
errorState: IErrorState | null;
|
|
16
16
|
successCallbacks: Record<ConfigSource, CallbackFn | undefined> | Record<string, never>;
|
|
17
17
|
retryFlow: () => void;
|
|
18
18
|
setCode: (code: string) => void;
|
|
19
19
|
setOpen: (open: boolean) => void;
|
|
20
20
|
setStage: (stage: IDKITStage) => void;
|
|
21
21
|
onOpenChange: (open: boolean) => void;
|
|
22
|
-
|
|
22
|
+
onVerification: (result: ISuccessResult) => void;
|
|
23
23
|
setProcessing: (processing: boolean) => void;
|
|
24
24
|
setPhoneNumber: (phoneNumber: string) => void;
|
|
25
|
-
setErrorState: (
|
|
25
|
+
setErrorState: (state: IErrorState | null) => void;
|
|
26
26
|
setOptions: (options: Config, source: ConfigSource) => void;
|
|
27
27
|
addSuccessCallback: (cb: CallbackFn, source: ConfigSource) => void;
|
|
28
28
|
};
|