@worldcoin/idkit 0.5.1 → 1.0.0-alpha.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.
Files changed (70) hide show
  1. package/LICENSE +7 -0
  2. package/build/chunk-EXZRURG3.js +246 -0
  3. package/build/config-cd2f02fe.d.ts +36 -0
  4. package/build/index.d.ts +31 -0
  5. package/build/index.js +2094 -3
  6. package/build/internal.d.ts +55 -0
  7. package/build/internal.js +12 -0
  8. package/build/verified-O6D4JQCX.webp +0 -0
  9. package/package.json +34 -79
  10. package/src/index.ts +11 -0
  11. package/build/idkit-js.js +0 -155
  12. package/build/index.cjs +0 -3
  13. package/build/index.cjs.map +0 -7
  14. package/build/index.css +0 -2
  15. package/build/index.js.map +0 -7
  16. package/build/jest.config.d.ts +0 -21
  17. package/build/jest.setup.d.ts +0 -1
  18. package/build/src/components/AboutWorldID.d.ts +0 -6
  19. package/build/src/components/Button.d.ts +0 -3
  20. package/build/src/components/Frame.d.ts +0 -4
  21. package/build/src/components/IDKitWidget/BaseWidget.d.ts +0 -4
  22. package/build/src/components/IDKitWidget/States/ErrorState.d.ts +0 -3
  23. package/build/src/components/IDKitWidget/States/HostAppVerificationState.d.ts +0 -7
  24. package/build/src/components/IDKitWidget/States/PrivacyState.d.ts +0 -3
  25. package/build/src/components/IDKitWidget/States/SuccessState.d.ts +0 -3
  26. package/build/src/components/IDKitWidget/States/WorldID/QRState.d.ts +0 -11
  27. package/build/src/components/IDKitWidget/States/WorldIDState.d.ts +0 -3
  28. package/build/src/components/IDKitWidget/experimental/components/CountryCodeSelect.d.ts +0 -7
  29. package/build/src/components/IDKitWidget/experimental/states/EnterPhoneState.d.ts +0 -3
  30. package/build/src/components/IDKitWidget/experimental/states/SelectMethodState.d.ts +0 -3
  31. package/build/src/components/IDKitWidget/experimental/states/VerifyCodeState.d.ts +0 -3
  32. package/build/src/components/IDKitWidget/index.d.ts +0 -3
  33. package/build/src/components/Icons/ArrowLongLeftIcon.d.ts +0 -3
  34. package/build/src/components/Icons/CheckIcon.d.ts +0 -3
  35. package/build/src/components/Icons/ChevronDownIcon.d.ts +0 -3
  36. package/build/src/components/Icons/DevicePhoneMobileIcon.d.ts +0 -3
  37. package/build/src/components/Icons/HumanIcon.d.ts +0 -3
  38. package/build/src/components/Icons/InfoIcon.d.ts +0 -3
  39. package/build/src/components/Icons/LoadingIcon.d.ts +0 -5
  40. package/build/src/components/Icons/LockIcon.d.ts +0 -3
  41. package/build/src/components/Icons/QuestionMarkIcon.d.ts +0 -5
  42. package/build/src/components/Icons/WorldIDWordmark.d.ts +0 -3
  43. package/build/src/components/Icons/WorldcoinIcon.d.ts +0 -3
  44. package/build/src/components/Icons/XMarkIcon.d.ts +0 -3
  45. package/build/src/components/PhoneInput.d.ts +0 -6
  46. package/build/src/components/QRCode.d.ts +0 -7
  47. package/build/src/components/ResendButton.d.ts +0 -3
  48. package/build/src/components/SMSCodeInput.d.ts +0 -6
  49. package/build/src/components/SignInButton.d.ts +0 -7
  50. package/build/src/components/SignInWithWorldID.d.ts +0 -11
  51. package/build/src/components/WorldIDIcon.d.ts +0 -7
  52. package/build/src/hooks/useIDKit.d.ts +0 -7
  53. package/build/src/hooks/useMedia.d.ts +0 -2
  54. package/build/src/index.d.ts +0 -34
  55. package/build/src/lang/index.d.ts +0 -9
  56. package/build/src/lib/consts.d.ts +0 -1
  57. package/build/src/lib/hashing.d.ts +0 -20
  58. package/build/src/lib/qr.d.ts +0 -4
  59. package/build/src/lib/telemetry.d.ts +0 -6
  60. package/build/src/lib/utils.d.ts +0 -2
  61. package/build/src/services/phone.d.ts +0 -21
  62. package/build/src/services/walletconnect.d.ts +0 -15
  63. package/build/src/store/idkit.d.ts +0 -41
  64. package/build/src/types/app.d.ts +0 -22
  65. package/build/src/types/config.d.ts +0 -48
  66. package/build/src/types/index.d.ts +0 -63
  67. package/build/src/vanilla.d.ts +0 -12
  68. package/build/stitches.config.d.ts +0 -45
  69. package/build/tests/lib/hashing.test.d.ts +0 -1
  70. package/build/tsconfig.tsbuildinfo +0 -1
@@ -1,3 +0,0 @@
1
- import type { FC, HTMLAttributes } from 'react';
2
- declare const InfoIcon: FC<HTMLAttributes<SVGElement>>;
3
- export default InfoIcon;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare const LoadingIcon: ({ className }: {
3
- className?: string | undefined;
4
- }) => JSX.Element;
5
- export default LoadingIcon;
@@ -1,3 +0,0 @@
1
- import type { FC, HTMLAttributes } from 'react';
2
- declare const LockIcon: FC<HTMLAttributes<SVGElement>>;
3
- export default LockIcon;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare const QuestionMarkIcon: ({ className }: {
3
- className?: string | undefined;
4
- }) => JSX.Element;
5
- export default QuestionMarkIcon;
@@ -1,3 +0,0 @@
1
- import type { HTMLAttributes, FC } from 'react';
2
- declare const WorldIDWordmark: FC<HTMLAttributes<SVGElement>>;
3
- export default WorldIDWordmark;
@@ -1,3 +0,0 @@
1
- import type { HTMLAttributes, FC } from 'react';
2
- declare const WorldcoinIcon: FC<HTMLAttributes<SVGElement>>;
3
- export default WorldcoinIcon;
@@ -1,3 +0,0 @@
1
- import type { FC, HTMLAttributes } from 'react';
2
- declare const XMarkIcon: FC<HTMLAttributes<SVGElement>>;
3
- export default XMarkIcon;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").MemoExoticComponent<({ disabled, onSubmit }: {
3
- disabled?: boolean | undefined;
4
- onSubmit?: (() => void | Promise<void>) | undefined;
5
- }) => JSX.Element>;
6
- export default _default;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- type Props = {
3
- data: string;
4
- size?: number;
5
- };
6
- declare const _default: import("react").MemoExoticComponent<({ data, size }: Props) => JSX.Element>;
7
- export default _default;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").MemoExoticComponent<() => JSX.Element>;
3
- export default _default;
@@ -1,6 +0,0 @@
1
- import type { RefObject } from 'react';
2
- declare const _default: import("react").MemoExoticComponent<({ submitRef, disabled }: {
3
- submitRef: RefObject<HTMLButtonElement>;
4
- disabled?: boolean | undefined;
5
- }) => JSX.Element>;
6
- export default _default;
@@ -1,7 +0,0 @@
1
- import type { MotionProps } from 'framer-motion';
2
- import type { ButtonHTMLAttributes, FC } from 'react';
3
- type Props = ButtonHTMLAttributes<HTMLButtonElement> & MotionProps & {
4
- theme?: 'dark' | 'light';
5
- };
6
- declare const SignInButton: FC<Props>;
7
- export default SignInButton;
@@ -1,11 +0,0 @@
1
- import type { FC } from 'react';
2
- import type { IDKitConfig, WidgetConfig } from '../types/config';
3
- type Props = Omit<WidgetConfig, 'autoClose' | 'experimental_methods' | 'handleVerify'> & Pick<IDKitConfig, 'app_id' | 'walletConnectProjectId'> & {
4
- nonce?: string;
5
- onSuccess: (jwt: string) => void;
6
- children?: ({ open }: {
7
- open: () => void;
8
- }) => JSX.Element;
9
- };
10
- declare const SignInWithWorldID: FC<Props>;
11
- export default SignInWithWorldID;
@@ -1,7 +0,0 @@
1
- import type { DetailedHTMLProps, ImgHTMLAttributes } from 'react';
2
- type Props = Omit<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & {
3
- border?: string;
4
- size?: 'md' | 'sm';
5
- }, 'height' | 'src' | 'width'>;
6
- declare const WorldIDIcon: ({ border, size, ...props }: Props) => JSX.Element;
7
- export default WorldIDIcon;
@@ -1,7 +0,0 @@
1
- import type { Config } from '../types/config';
2
- type HookConfig = Partial<Pick<Config, 'handleVerify' | 'onSuccess'>>;
3
- declare const useIDKit: ({ handleVerify, onSuccess }?: HookConfig) => {
4
- open: boolean;
5
- setOpen: (open: boolean) => void;
6
- };
7
- export default useIDKit;
@@ -1,2 +0,0 @@
1
- declare const useMedia: () => 'desktop' | 'mobile';
2
- export default useMedia;
@@ -1,34 +0,0 @@
1
- /// <reference types="react" />
2
- import useIDKit from './hooks/useIDKit';
3
- import { CredentialType } from './types';
4
- import type { ISuccessResult } from './types';
5
- import { solidityEncode } from './lib/hashing';
6
- import IDKitWidget from './components/IDKitWidget';
7
- import SignInButton from './components/SignInButton';
8
- import type { WidgetProps, Config } from './types/config';
9
- import { VerificationState, AppErrorCodes } from './types/app';
10
- import SignInWithWorldID from './components/SignInWithWorldID';
11
- import { hashToField } from './lib/hashing';
12
- declare const internal: {
13
- hashToField: typeof hashToField;
14
- validateABILikeEncoding: (value: string) => boolean;
15
- generateExternalNullifier: (app_id: string, action: string | import("./types").AbiEncodedValue | undefined) => import("./lib/hashing").HashFunctionOutput;
16
- QRCode: import("react").MemoExoticComponent<({ data, size }: {
17
- data: string;
18
- size?: number | undefined;
19
- }) => JSX.Element>;
20
- useAppConnection: (app_id: string, action: string | import("./types").AbiEncodedValue | undefined, signal?: string | import("./types").AbiEncodedValue | undefined, credential_types?: CredentialType[] | undefined, action_description?: string | undefined, walletConnectProjectId?: string | undefined) => {
21
- reset: () => void;
22
- result: ISuccessResult | null;
23
- errorCode: AppErrorCodes | null;
24
- verificationState: VerificationState;
25
- qrData: {
26
- default: string;
27
- mobile: string;
28
- } | null;
29
- };
30
- VerificationState: typeof VerificationState;
31
- AppErrorCodes: typeof AppErrorCodes;
32
- };
33
- export { IDKitWidget, useIDKit, solidityEncode, internal, SignInWithWorldID, CredentialType, SignInButton };
34
- export type { ISuccessResult, Config, WidgetProps };
@@ -1,9 +0,0 @@
1
- type CleanWord<T> = T extends `${string}${' ' | ',' | '!' | '?' | '.' | '`'}${string}` ? never : T extends '' ? never : T;
2
- type ExtractPlaceholders<S extends string> = S extends `${string}:${infer Placeholder}` ? Placeholder extends `${infer Word}${' ' | ',' | '!' | '?' | '.' | '`'}${infer Rest}` ? CleanWord<Word> | ExtractPlaceholders<Rest> : never : never;
3
- type NoPlaceholder<S extends string> = S extends `${string}:${string}` ? never : S;
4
- type PlaceholderValues<S extends string> = {
5
- [K in ExtractPlaceholders<S>]: string;
6
- };
7
- export declare function __<S extends `${string}:${string}`>(str: S, params: PlaceholderValues<S>): string;
8
- export declare function __<S extends string>(str: NoPlaceholder<S>): string;
9
- export {};
@@ -1 +0,0 @@
1
- export declare const WC_PROJECT_ID = "c3e6053f10efbb423808783ee874cf6a";
@@ -1,20 +0,0 @@
1
- import type { AbiEncodedValue } from '../types';
2
- import type { IDKitConfig } from '../types/config';
3
- export type HashFunctionOutput = {
4
- hash: BigInt;
5
- digest: `0x${string}`;
6
- };
7
- /**
8
- * Hashes an input using the `keccak256` hashing function used across the World ID protocol, to be used as
9
- * a ZKP input. The function will try to determine the best hashing mechanism, if the string already looks like hex-encoded
10
- * bytes (e.g. `0x0000000000000000000000000000000000000000`), it will be hashed directly.
11
- * @param input Any string, hex-like string, bytes represented as a hex string.
12
- * @returns
13
- */
14
- export declare function hashToField(input: Uint8Array | string | `0x${string}`): HashFunctionOutput;
15
- export declare function packAndEncode(input: [string, unknown][]): HashFunctionOutput;
16
- export declare const validateABILikeEncoding: (value: string) => boolean;
17
- export declare const solidityEncode: (types: string[], values: unknown[]) => AbiEncodedValue;
18
- export declare const generateSignal: (signal: IDKitConfig['signal']) => HashFunctionOutput;
19
- export declare const generateExternalNullifier: (app_id: IDKitConfig['app_id'], action: IDKitConfig['action']) => HashFunctionOutput;
20
- export declare const encodeAction: (action: IDKitConfig['action']) => string;
@@ -1,4 +0,0 @@
1
- /**
2
- * Build data for QR Code
3
- */
4
- export declare function buildQRData(uri: string, returnUrl?: string): string;
@@ -1,6 +0,0 @@
1
- import type { PhoneVerificationChannel } from '../types';
2
- export declare const getTelemetryId: () => string;
3
- export declare const initTelemetry: (enableTelemetry?: boolean) => void;
4
- export declare const telemetryModalOpened: () => void;
5
- export declare const telemetryPhoneTyped: () => void;
6
- export declare const telemetryRetryCode: (channel: PhoneVerificationChannel) => void;
@@ -1,2 +0,0 @@
1
- export declare const classNames: (...classes: unknown[]) => string;
2
- export declare const randomNumber: (min: number, max: number) => number;
@@ -1,21 +0,0 @@
1
- /**
2
- * This module is fully experimental. Usage is not yet supported except as individually shared.
3
- */
4
- import type { PhoneRequestErrorCodes, PhoneSignalProof, PhoneVerificationChannel } from '../types';
5
- export declare function requestCode(phone_number: string, app_id: string, channel: PhoneVerificationChannel, ph_distinct_id: string): Promise<void>;
6
- interface VerifyCodeSuccess extends Pick<PhoneSignalProof, 'signature' | 'timestamp'> {
7
- success: true;
8
- nullifier_hash: string;
9
- }
10
- export declare function verifyCode(phone_number: string, code: string, app_id: string, ph_distinct_id: string): Promise<VerifyCodeSuccess>;
11
- interface RequestCodeError {
12
- code: PhoneRequestErrorCodes;
13
- detail: string;
14
- }
15
- export declare function isRequestCodeError(error: unknown): error is RequestCodeError;
16
- export interface VerifyCodeError {
17
- code: 'invalid_code';
18
- details: string;
19
- }
20
- export declare function isVerifyCodeError(error: unknown): error is VerifyCodeError;
21
- export {};
@@ -1,15 +0,0 @@
1
- import type { IDKitConfig } from '../types/config';
2
- import { AppErrorCodes, VerificationState } from '../types/app';
3
- import type { ISuccessResult } from '../types';
4
- type UseAppConnectionResponse = {
5
- reset: () => void;
6
- result: ISuccessResult | null;
7
- errorCode: AppErrorCodes | null;
8
- verificationState: VerificationState;
9
- qrData: {
10
- default: string;
11
- mobile: string;
12
- } | null;
13
- };
14
- declare const useAppConnection: (app_id: IDKitConfig['app_id'], action: IDKitConfig['action'], signal?: IDKitConfig['signal'], credential_types?: IDKitConfig['credential_types'], action_description?: IDKitConfig['action_description'], walletConnectProjectId?: IDKitConfig['walletConnectProjectId']) => UseAppConnectionResponse;
15
- export default useAppConnection;
@@ -1,41 +0,0 @@
1
- import { IDKITStage } from '../types';
2
- import type { VerificationMethods } from '../types/config';
3
- import type { Config, ConfigSource, IDKitConfig } from '../types/config';
4
- import type { CallbackFn, IErrorState, IExperimentalSuccessResult, ISuccessResult } from '../types';
5
- export type IDKitStore = {
6
- app_id: IDKitConfig['app_id'];
7
- action: IDKitConfig['action'];
8
- signal: IDKitConfig['signal'];
9
- action_description?: IDKitConfig['action_description'];
10
- walletConnectProjectId?: IDKitConfig['walletConnectProjectId'];
11
- credential_types?: IDKitConfig['credential_types'];
12
- phoneNumber: string;
13
- code: string;
14
- open: boolean;
15
- stage: IDKITStage;
16
- autoClose: boolean;
17
- processing: boolean;
18
- theme: Config['theme'];
19
- result: IExperimentalSuccessResult | ISuccessResult | null;
20
- methods: VerificationMethods[];
21
- errorState: IErrorState | null;
22
- verifyCallbacks: Record<ConfigSource, CallbackFn<IExperimentalSuccessResult> | CallbackFn<ISuccessResult> | undefined> | Record<string, never>;
23
- successCallbacks: Record<ConfigSource, CallbackFn<IExperimentalSuccessResult> | CallbackFn<ISuccessResult> | undefined> | Record<string, never>;
24
- computed: {
25
- canGoBack: (stage: IDKITStage) => boolean;
26
- getDefaultStage: (methods?: Config['experimental_methods']) => IDKITStage;
27
- };
28
- retryFlow: () => void;
29
- setCode: (code: string) => void;
30
- setStage: (stage: IDKITStage) => void;
31
- onOpenChange: (open: boolean) => void;
32
- setProcessing: (processing: boolean) => void;
33
- handleVerify: (result: IExperimentalSuccessResult | ISuccessResult) => void;
34
- setErrorState: (state: IErrorState | null) => void;
35
- setOptions: (options: Config, source: ConfigSource) => void;
36
- addSuccessCallback: (cb: CallbackFn<IExperimentalSuccessResult> | CallbackFn<ISuccessResult>, source: ConfigSource) => void;
37
- addVerificationCallback: (cb: CallbackFn<IExperimentalSuccessResult> | CallbackFn<ISuccessResult>, source: ConfigSource) => void;
38
- setPhoneNumber: (phoneNumber: string) => void;
39
- };
40
- declare const useIDKitStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IDKitStore>>;
41
- export default useIDKitStore;
@@ -1,22 +0,0 @@
1
- export declare enum AppErrorCodes {
2
- ConnectionFailed = "connection_failed",
3
- VerificationRejected = "verification_rejected",
4
- MaxVerificationsReached = "max_verifications_reached",
5
- AlreadySigned = "already_signed",
6
- CredentialUnavailable = "credential_unavailable",
7
- MalformedRequest = "malformed_request",
8
- InvalidNetwork = "invalid_network",
9
- InclusionProofFailed = "inclusion_proof_failed",
10
- InclusionProofPending = "inclusion_proof_pending",
11
- UnexpectedResponse = "unexpected_response",
12
- FailedByHostApp = "failed_by_host_app",
13
- GenericError = "generic_error",
14
- InvalidPhoneOTP = "invalid_phone_otp"
15
- }
16
- export declare enum VerificationState {
17
- LoadingWidget = "loading_widget",
18
- AwaitingConnection = "awaiting_connection",
19
- AwaitingVerification = "awaiting_verification",
20
- Confirmed = "confirmed",
21
- Failed = "failed"
22
- }
@@ -1,48 +0,0 @@
1
- /// <reference types="react" />
2
- import type { AbiEncodedValue, CallbackFn, CredentialType, IExperimentalSuccessResult, ISuccessResult } from '.';
3
- export type VerificationMethods = 'orb' | 'phone';
4
- export declare enum ConfigSource {
5
- HOOK = "hook",
6
- PROPS = "props",
7
- MANUAL = "manual"
8
- }
9
- export type IDKitConfig = {
10
- /** Unique identifier for the app verifying the action. This should be the app ID obtained from the Developer Portal. */
11
- app_id: string;
12
- /** The description of the specific action (shown to users in World App). Only recommended for actions created on-the-fly. */
13
- action_description?: string;
14
- /** Encodes data into a proof that must match when validating. Read more on the [On-chain section](https://docs.worldcoin.org/advanced/on-chain). */
15
- signal?: AbiEncodedValue | string;
16
- /** Identifier for the action the user is performing. Should be left blank for [Sign in with Worldcoin](https://docs.worldcoin.org/id/sign-in). */
17
- action?: AbiEncodedValue | string;
18
- walletConnectProjectId?: string;
19
- /** An array of credential types to allow for verification. Will accept any combination of "orb" & "phone". Defaults to orb. TypeScript apps can use the `CredentialType` enum. */
20
- credential_types?: CredentialType[];
21
- };
22
- export type WidgetConfig = {
23
- /** Whether to automatically close the widget after a successful verification. Defaults to `false`. */
24
- autoClose?: boolean;
25
- /** The theme to apply to the widget's UI. Defaults to `light`. */
26
- theme?: 'dark' | 'light';
27
- /** Whether opt-in telemetry is enabled. Very few events are sent, with no PII to help improve the project. Defaults to `false`. */
28
- enableTelemetry?: boolean;
29
- } & ({
30
- /** Optionally enable the experimental verification flow. This flow is not recommended for production apps. */
31
- experimental_methods?: VerificationMethods[];
32
- /** Function to trigger when verification is successful. Should receive a single parameter of type `IExperimentalSuccessResult` which contains the proof details. */
33
- onSuccess: CallbackFn<IExperimentalSuccessResult>;
34
- /** Called after the proof is returned from the World App, but before showing the success screen. Throwing an error in this screen will show the user a custom error. Used to perform additional validation when needed. */
35
- handleVerify?: CallbackFn<IExperimentalSuccessResult>;
36
- } | {
37
- experimental_methods?: never;
38
- /** Function to trigger when verification is successful. Should receive a single parameter of type `ISuccessResult` which contains the proof details. */
39
- onSuccess: CallbackFn<ISuccessResult>;
40
- /** Called after the proof is returned from the World App, but before showing the success screen. Throwing in this screen will show the user a custom error. Used to perform additional validation when needed. */
41
- handleVerify?: CallbackFn<ISuccessResult>;
42
- });
43
- export type Config = IDKitConfig & Required<Pick<IDKitConfig, 'action'>> & WidgetConfig;
44
- export type WidgetProps = Config & {
45
- children?: ({ open }: {
46
- open: () => void;
47
- }) => JSX.Element;
48
- };
@@ -1,63 +0,0 @@
1
- import type { AppErrorCodes } from './app';
2
- import type { VerificationMethods } from './config';
3
- declare const brand: unique symbol;
4
- type Brand<T, TBrand extends string> = T & {
5
- [brand]: TBrand;
6
- };
7
- export type AbiEncodedValue = Brand<{
8
- types: string[];
9
- values: unknown[];
10
- }, 'AbiEncodedValue'>;
11
- export declare enum IDKITStage {
12
- SELECT_METHOD = "SELECT_METHOD",
13
- ENTER_PHONE = "ENTER_PHONE",
14
- ENTER_CODE = "ENTER_CODE",
15
- WORLD_ID = "WORLD_ID",
16
- PRIVACY = "PRIVACY",
17
- SUCCESS = "SUCCESS",
18
- ERROR = "ERROR",
19
- HOST_APP_VERIFICATION = "HOST_APP_VERIFICATION"
20
- }
21
- export declare enum CredentialType {
22
- Orb = "orb",
23
- Phone = "phone"
24
- }
25
- export interface IExperimentalSuccessResult {
26
- nullifier_hash: string;
27
- credential_type: VerificationMethods;
28
- proof_payload: OrbSignalProof | PhoneSignalProof;
29
- }
30
- export interface ISuccessResult {
31
- proof: string;
32
- merkle_root: string;
33
- nullifier_hash: string;
34
- credential_type: CredentialType;
35
- }
36
- export type CallbackFn<T> = (result: T) => Promise<void> | void;
37
- export interface ExpectedErrorResponse {
38
- message: string;
39
- stack: string;
40
- }
41
- export interface IErrorState {
42
- code: AppErrorCodes;
43
- message?: string;
44
- }
45
- export declare enum PhoneVerificationChannel {
46
- SMS = "sms",
47
- Call = "call"
48
- }
49
- export declare enum PhoneRequestErrorCodes {
50
- MAX_ATTEMPTS = "max_attempts",
51
- TIMEOUT = "timeout",
52
- UNSUPPORTED_COUNTRY = "unsupported_country",
53
- SERVER_ERROR = "server_error"
54
- }
55
- export interface OrbSignalProof {
56
- merkle_root: string;
57
- proof: string;
58
- }
59
- export interface PhoneSignalProof {
60
- timestamp: number;
61
- signature: string;
62
- }
63
- export {};
@@ -1,12 +0,0 @@
1
- import type { Config } from './types/config';
2
- /**
3
- * Initializes IDKitWidget, should only be called once per app. Note that nothing will be shown until you call `open()`
4
- * @param config The IDKit configuration object
5
- */
6
- export declare const init: (config: Config) => void;
7
- export declare const update: (config: Config) => void;
8
- export declare const open: () => Promise<unknown>;
9
- /**
10
- * Reset internal state. Useful for unit-testing
11
- */
12
- export declare const reset: () => void;
@@ -1,45 +0,0 @@
1
- /// <reference types="react" />
2
- export type { CSS } from '@stitches/react/types/css-util';
3
- export declare const stitches: import("@stitches/react/types/stitches").default<"", {}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>;
4
- export declare const css: <Composers extends (string | import("@stitches/react/types/util").Function | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | {
5
- [name: string]: unknown;
6
- })[], CSS = import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("@stitches/react/types/util").Function | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
7
- variants?: {
8
- [x: string]: {
9
- [x: string]: CSS;
10
- [x: number]: CSS;
11
- };
12
- } | undefined;
13
- compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : never : import("@stitches/react/types/util").WideObject) & {
14
- css: CSS;
15
- })[] | undefined;
16
- defaultVariants?: ("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : never : import("@stitches/react/types/util").WideObject) | undefined;
17
- } & CSS & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; } : never); }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>, styled: <Type extends import("@stitches/react/types/util").Function | import("react").ComponentType<any> | keyof JSX.IntrinsicElements, Composers extends (string | import("@stitches/react/types/util").Function | import("react").ComponentType<any> | {
18
- [name: string]: unknown;
19
- })[], CSS = import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("@stitches/react/types/util").Function | import("react").ComponentType<any> ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
20
- variants?: {
21
- [x: string]: {
22
- [x: string]: CSS;
23
- [x: number]: CSS;
24
- };
25
- } | undefined;
26
- compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T ? { [Name in keyof T]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : never : import("@stitches/react/types/util").WideObject) & {
27
- css: CSS;
28
- })[] | undefined;
29
- defaultVariants?: ("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"] extends infer T_1 ? { [Name_1 in keyof T_1]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : never : import("@stitches/react/types/util").WideObject) | undefined;
30
- } & CSS & (Composers[K] extends infer T_2 ? { [K2 in keyof T_2]: K2 extends "variants" | "compoundVariants" | "defaultVariants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; } : never); }) => import("@stitches/react/types/styled-component").StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>>, globalCss: <Styles extends {
31
- [K: string]: any;
32
- }>(...styles: ({
33
- '@import'?: unknown;
34
- '@font-face'?: unknown;
35
- } & { [K in keyof Styles]: K extends "@import" ? string | string[] : K extends "@font-face" ? import("@stitches/react/types/css").AtRule.FontFace | import("@stitches/react/types/css").AtRule.FontFace[] : K extends `@keyframes ${string}` ? {
36
- [x: string]: import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>;
37
- } : K extends `@property ${string}` ? import("@stitches/react/types/css").AtRule.Property : import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>; })[]) => () => string, theme: string & {
38
- className: string;
39
- selector: string;
40
- } & {}, keyframes: (style: {
41
- [offset: string]: import("@stitches/react/types/css-util").CSS<{}, {}, import("@stitches/react/types/config").DefaultThemeMap, {}>;
42
- }) => {
43
- (): string;
44
- name: string;
45
- }, getCssText: () => string;
@@ -1 +0,0 @@
1
- export {};