@getpara/react-sdk 2.0.0-dev.0 → 2.0.0-dev.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/dist/cli/cli.mjs +1 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +708 -359
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +1 -0
- package/dist/modal/components/common.d.ts +4 -0
- package/dist/modal/constants/constants.d.ts +1 -1
- package/dist/modal/index.d.ts +0 -1
- package/dist/modal/stores/modal/useModalStore.d.ts +11 -4
- package/dist/modal/types/commonTypes.d.ts +0 -42
- package/dist/modal/utils/steps.d.ts +2 -0
- package/dist/provider/actions/getAccount.d.ts +1 -1
- package/dist/provider/actions/index.d.ts +25 -0
- package/dist/provider/actions/utils.d.ts +3 -0
- package/dist/provider/hooks/mutations/index.d.ts +25 -1
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +3 -2
- package/dist/provider/hooks/mutations/utils.d.ts +4 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +1 -1
- package/dist/provider/hooks/utils/useWalletState.d.ts +1 -0
- package/dist/provider/providers/AuthProvider.d.ts +31 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +14 -1
- package/dist/provider/stores/types.d.ts +6 -2
- package/dist/provider/types/externalWalletProviders.d.ts +2 -2
- package/dist/provider/types/provider.d.ts +6 -1
- package/dist/provider/types/utils.d.ts +15 -0
- package/dist/provider/utils/renameMutations.d.ts +3 -0
- package/package.json +12 -12
- package/dist/modal/types/externalWallets.d.ts +0 -31
package/dist/index.js.br
CHANGED
|
Binary file
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ExternalWalletVerificationStep: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,3 +17,7 @@ export declare const StyledCpslTileButton: typeof CpslTileButton;
|
|
|
17
17
|
export declare const HeroIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>, "ref"> & {
|
|
18
18
|
ref?: ((instance: HTMLCpslIconElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLCpslIconElement> | null | undefined;
|
|
19
19
|
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>>, keyof import("react").Component<any, {}, any>>;
|
|
20
|
+
export declare const ErrorContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
+
export declare const ErrorIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>, "ref"> & {
|
|
22
|
+
ref?: ((instance: HTMLCpslIconElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLCpslIconElement> | null | undefined;
|
|
23
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("@getpara/core-components").JSX.CpslIcon & Omit<import("react").HTMLAttributes<HTMLCpslIconElement>, "style"> & import("@getpara/react-components/dist/types/components/stencil-generated/react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLCpslIconElement>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -24,7 +24,7 @@ export declare const ON_RAMP_ASSETS: Record<OnRampAsset, {
|
|
|
24
24
|
export declare function getNetworkName(str: Network | string): string;
|
|
25
25
|
export declare function getNetworkIcon(str: Network | string): IconType;
|
|
26
26
|
export declare function getAssetName(str: OnRampAsset | string): string;
|
|
27
|
-
export declare function getAssetIcon(str: OnRampAsset | string): "code" | "menu" | "image" | "polygon" | "key" | "search" | "download" | "
|
|
27
|
+
export declare function getAssetIcon(str: OnRampAsset | string): "phone" | "farcaster" | "telegram" | "discord" | "x" | "code" | "menu" | "image" | "polygon" | "key" | "search" | "download" | "send" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowNarrow" | "arrow" | "asterisk" | "backupKit" | "bank" | "baseBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "close" | "clubhouseBrand" | "clubhouse" | "copy07" | "copy" | "cosmos" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dots" | "downloadCloud" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "googleBrand" | "google" | "gridDots" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "infoCircle" | "instagramBrand" | "instagram" | "laptop" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "optimismBrand" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "para" | "passcode" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "puzzlePiece" | "qrCode02" | "qrCode" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solana" | "spacingHeight" | "star04Filled" | "stars01Filled" | "stars" | "stopSquare" | "stripeBrand" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "userCircle" | "user" | "wallet" | "youtubeBrand" | "youtube" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BQ2" | "BQ3" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CD2" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SI" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WS" | "YE" | "ZA" | "ZM" | "ZW";
|
|
28
28
|
export declare const MOBILE_SIZE = 480;
|
|
29
29
|
export declare const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
30
30
|
export declare const EMAIL_REGEX: RegExp;
|
package/dist/modal/index.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export * from './utils/openPopup.js';
|
|
|
6
6
|
export { ON_RAMP_PROVIDERS, ON_RAMP_ASSETS, NETWORKS, getAssetIcon, getAssetName, getNetworkIcon, getNetworkName, } from './constants/constants.js';
|
|
7
7
|
export { SaveRecoverySecret } from './components/RecoverySecretStep/RecoverySecretStep.js';
|
|
8
8
|
export * from './utils/validateOnRampConfig.js';
|
|
9
|
-
export * from './types/externalWallets.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ModalStep } from '../../utils/steps.js';
|
|
2
2
|
import { OnRampConfig as OnRampConfigBase, OnRampPurchase, WalletType } from '@getpara/web-sdk';
|
|
3
3
|
import { Tab as AddFundsTabType } from '../../components/AddFunds/AddFunds.js';
|
|
4
|
-
import { AuthMethod } from '@getpara/core-sdk';
|
|
5
|
-
import { BiometricLocationHint } from '@getpara/user-management-client';
|
|
4
|
+
import { AuthStateLogin, AuthStateSignup, AuthMethod, AuthState, AuthStateVerify } from '@getpara/core-sdk';
|
|
6
5
|
import { TAuthLayout } from '../../types/modalProps.js';
|
|
7
6
|
import { MutableRefObject } from 'react';
|
|
8
|
-
|
|
7
|
+
import { BiometricLocationHint, Setup2faResponse } from '@getpara/user-management-client';
|
|
8
|
+
type Flow = AuthStateSignup['stage'] | AuthStateLogin['stage'] | 'account';
|
|
9
9
|
type ActiveWallet = [string | undefined, WalletType | undefined];
|
|
10
10
|
export type OnRampConfig = OnRampConfigBase & {
|
|
11
11
|
testMode?: boolean;
|
|
@@ -19,6 +19,7 @@ interface ModalState {
|
|
|
19
19
|
step: ModalStep;
|
|
20
20
|
stepDirection: 1 | -1;
|
|
21
21
|
flow: Flow | undefined;
|
|
22
|
+
authState: AuthState | undefined;
|
|
22
23
|
webAuthURLForLogin: string | undefined;
|
|
23
24
|
webAuthURLForCreate: string | undefined;
|
|
24
25
|
passwordUrlForLogin: string | undefined;
|
|
@@ -34,6 +35,7 @@ interface ModalState {
|
|
|
34
35
|
externalWalletError?: string[];
|
|
35
36
|
activeWallet: ActiveWallet | undefined;
|
|
36
37
|
farcasterConnectUri: string | undefined;
|
|
38
|
+
twoFactorStatus: Setup2faResponse | undefined;
|
|
37
39
|
biometricLocationHints: BiometricLocationHint[] | undefined;
|
|
38
40
|
iFrameUrl: string | undefined;
|
|
39
41
|
isIFrameReady: boolean | undefined;
|
|
@@ -42,7 +44,7 @@ interface ModalState {
|
|
|
42
44
|
refs: {
|
|
43
45
|
popupWindow: MutableRefObject<Window | null>;
|
|
44
46
|
poll: MutableRefObject<{
|
|
45
|
-
action: 'login' | '
|
|
47
|
+
action: 'login' | 'signup';
|
|
46
48
|
timeout: number;
|
|
47
49
|
} | null>;
|
|
48
50
|
currentStep: MutableRefObject<ModalStep | null>;
|
|
@@ -55,6 +57,10 @@ export interface ModalActions {
|
|
|
55
57
|
decrementStep: () => void;
|
|
56
58
|
hasPreviousStep: () => boolean;
|
|
57
59
|
setFlow: (flow?: Flow) => void;
|
|
60
|
+
setAuthState: (authState?: AuthState | undefined) => void;
|
|
61
|
+
getVerifyState: () => AuthStateVerify | undefined;
|
|
62
|
+
getSignupState: () => AuthStateSignup | undefined;
|
|
63
|
+
getLoginState: () => AuthStateLogin | undefined;
|
|
58
64
|
isLogin: () => boolean;
|
|
59
65
|
isAccount: () => boolean;
|
|
60
66
|
setSupportedAuthMethods: (authMethods: Set<AuthMethod>) => void;
|
|
@@ -72,6 +78,7 @@ export interface ModalActions {
|
|
|
72
78
|
setExternalWalletError: (externalWalletError?: string[]) => void;
|
|
73
79
|
setStepDirection: (stepDirection: 1 | -1) => void;
|
|
74
80
|
setFarcasterConnectUri: (_: string | undefined) => void;
|
|
81
|
+
setTwoFactorStatus: (twoFactorStatus?: Setup2faResponse) => void;
|
|
75
82
|
setBiometricLocationHints: (_?: BiometricLocationHint[]) => void;
|
|
76
83
|
setIFrameUrl: (_?: string) => void;
|
|
77
84
|
setIsIFrameReady: (_?: boolean) => void;
|
|
@@ -1,46 +1,4 @@
|
|
|
1
1
|
import { IconType } from '@getpara/react-components';
|
|
2
|
-
export type WalletMetadata = {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
iconUrl: string;
|
|
6
|
-
installed?: boolean;
|
|
7
|
-
isExtension?: boolean;
|
|
8
|
-
isMobile?: boolean;
|
|
9
|
-
isWeb?: boolean;
|
|
10
|
-
downloadUrl?: string;
|
|
11
|
-
getQrUri?: () => Promise<string>;
|
|
12
|
-
downloadUrls?: {
|
|
13
|
-
android?: string;
|
|
14
|
-
ios?: string;
|
|
15
|
-
mobile?: string;
|
|
16
|
-
qrCode?: string;
|
|
17
|
-
chrome?: string;
|
|
18
|
-
edge?: string;
|
|
19
|
-
firefox?: string;
|
|
20
|
-
opera?: string;
|
|
21
|
-
safari?: string;
|
|
22
|
-
browserExtension?: string;
|
|
23
|
-
macos?: string;
|
|
24
|
-
windows?: string;
|
|
25
|
-
linux?: string;
|
|
26
|
-
desktop?: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export type CommonWallet = {
|
|
30
|
-
connect: () => Promise<{
|
|
31
|
-
address?: string;
|
|
32
|
-
error?: string;
|
|
33
|
-
}>;
|
|
34
|
-
connectMobile: (isManualWalletConnect?: boolean) => Promise<{
|
|
35
|
-
address?: string;
|
|
36
|
-
error?: string;
|
|
37
|
-
}>;
|
|
38
|
-
type: 'EVM' | 'SOLANA' | 'COSMOS';
|
|
39
|
-
} & WalletMetadata;
|
|
40
|
-
export type CommonChain = {
|
|
41
|
-
id: string | number;
|
|
42
|
-
name: string;
|
|
43
|
-
};
|
|
44
2
|
export type Tab<T> = {
|
|
45
3
|
label: string;
|
|
46
4
|
value: T;
|
|
@@ -5,6 +5,7 @@ export declare enum ModalStep {
|
|
|
5
5
|
EX_WALLET_MORE = "EX_WALLET_MORE",
|
|
6
6
|
EX_WALLET_SELECTED = "EX_WALLET_SELECTED",
|
|
7
7
|
VERIFICATIONS = "VERIFICATIONS",
|
|
8
|
+
EXTERNAL_WALLET_VERIFICATION = "EXTERNAL_WALLET_VERIFICATION",
|
|
8
9
|
AWAITING_OAUTH = "AWAITING_OAUTH",
|
|
9
10
|
FARCASTER_OAUTH = "FARCASTER_OAUTH",
|
|
10
11
|
BIOMETRIC_CREATION = "BIOMETRIC_CREATION",
|
|
@@ -55,6 +56,7 @@ declare enum SignUpModalStep {
|
|
|
55
56
|
EX_WALLET_MORE = "EX_WALLET_MORE",
|
|
56
57
|
EX_WALLET_SELECTED = "EX_WALLET_SELECTED",
|
|
57
58
|
VERIFICATIONS = "VERIFICATIONS",
|
|
59
|
+
EXTERNAL_WALLET_VERIFICATION = "EXTERNAL_WALLET_VERIFICATION",
|
|
58
60
|
AWAITING_OAUTH = "AWAITING_OAUTH",
|
|
59
61
|
FARCASTER_OAUTH = "FARCASTER_OAUTH",
|
|
60
62
|
TELEGRAM_OAUTH = "TELEGRAM_OAUTH",
|
|
@@ -3,7 +3,7 @@ type AccountType = {
|
|
|
3
3
|
isConnected: boolean;
|
|
4
4
|
email?: string;
|
|
5
5
|
phone?: string;
|
|
6
|
-
wallets?:
|
|
6
|
+
wallets?: Pick<Wallet, 'id' | 'type' | 'name' | 'address' | 'isExternal'>[];
|
|
7
7
|
userId?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const getAccount: (para?: ParaWeb) => Promise<AccountType>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const signUpOrLogIn: import("./utils.js").CoreAction<"signUpOrLogInV2">;
|
|
2
|
+
export declare const verifyNewAccount: import("./utils.js").CoreAction<"verifyNewAccountV2">;
|
|
3
|
+
export declare const waitForLogin: import("./utils.js").CoreAction<"waitForLoginV2">;
|
|
4
|
+
export declare const waitForSignup: import("./utils.js").CoreAction<"waitForSignupV2">;
|
|
5
|
+
export declare const waitForWalletCreation: import("./utils.js").CoreAction<"waitForWalletCreationV2">;
|
|
6
|
+
export declare const verifyOAuth: import("./utils.js").CoreAction<"verifyOAuthV2">;
|
|
7
|
+
export declare const verifyFarcaster: import("./utils.js").CoreAction<"verifyFarcasterV2">;
|
|
8
|
+
export declare const verifyTelegram: import("./utils.js").CoreAction<"verifyTelegramV2">;
|
|
9
|
+
export declare const loginExternalWallet: import("./utils.js").CoreAction<"loginExternalWalletV2">;
|
|
10
|
+
export declare const verifyExternalWallet: import("./utils.js").CoreAction<"verifyExternalWalletV2">;
|
|
11
|
+
export declare const setup2fa: import("./utils.js").CoreAction<"setup2faV2">;
|
|
12
|
+
export declare const enable2fa: import("./utils.js").CoreAction<"enable2faV2">;
|
|
13
|
+
export declare const verify2fa: import("./utils.js").CoreAction<"verify2faV2">;
|
|
14
|
+
export declare const keepSessionAlive: import("./utils.js").CoreAction<"keepSessionAlive">;
|
|
15
|
+
export declare const logout: import("./utils.js").CoreAction<"logout">;
|
|
16
|
+
export declare const resendVerificationCode: import("./utils.js").CoreAction<"resendVerificationCode">;
|
|
17
|
+
export declare const createWallet: import("./utils.js").CoreAction<"createWallet">;
|
|
18
|
+
export declare const createWalletPerType: import("./utils.js").CoreAction<"createWalletPerType">;
|
|
19
|
+
export declare const createPregenWallet: import("./utils.js").CoreAction<"createPregenWalletV2">;
|
|
20
|
+
export declare const createPregenWalletPerType: import("./utils.js").CoreAction<"createPregenWalletPerTypeV2">;
|
|
21
|
+
export declare const claimPregenWallets: import("./utils.js").CoreAction<"claimPregenWalletsV2">;
|
|
22
|
+
export declare const hasPregenWallet: import("./utils.js").CoreAction<"hasPregenWalletV2">;
|
|
23
|
+
export declare const updatePregenWalletIdentifier: import("./utils.js").CoreAction<"updatePregenWalletIdentifierV2">;
|
|
24
|
+
export declare const signMessage: import("./utils.js").CoreAction<"signMessage">;
|
|
25
|
+
export declare const signTransaction: import("./utils.js").CoreAction<"signTransaction">;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import ParaWeb, { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } from '@getpara/web-sdk';
|
|
2
|
+
export type CoreAction<method extends CoreMethodName & keyof CoreMethods> = (para?: ParaWeb, ...args: [CoreMethodParams<method>]) => Promise<Awaited<CoreMethodResponse<method>>>;
|
|
3
|
+
export declare function generateAction<const method extends CoreMethodName & keyof CoreMethods>(method: method): CoreAction<method>;
|
|
@@ -4,7 +4,31 @@ export { useWaitForPasskeyAndCreateWallet } from './useWaitForPasskeyAndCreateWa
|
|
|
4
4
|
export { useCreateUser } from './useCreateUser.js';
|
|
5
5
|
export { useCheckIfUserExists } from './useCheckIfUserExists.js';
|
|
6
6
|
export { useInitiateLogin } from './useInitiateLogin.js';
|
|
7
|
-
export { useLogout } from './useLogout.js';
|
|
8
7
|
export { useKeepSessionAlive } from './useKeepSessionAlive.js';
|
|
9
8
|
export { useSignMessage } from './useSignMessage.js';
|
|
10
9
|
export { useSignTransaction } from './useSignTransaction.js';
|
|
10
|
+
export declare const useSignUpOrLogIn: () => import("../../types/utils.js").CoreMethodHook<"signUpOrLogInV2">;
|
|
11
|
+
export declare const useVerifyNewAccount: () => import("../../types/utils.js").CoreMethodHook<"verifyNewAccountV2">;
|
|
12
|
+
export declare const useWaitForLogin: () => import("../../types/utils.js").CoreMethodHook<"waitForLoginV2">;
|
|
13
|
+
export declare const useWaitForSignup: () => import("../../types/utils.js").CoreMethodHook<"waitForSignupV2">;
|
|
14
|
+
export declare const useWaitForWalletCreation: () => import("../../types/utils.js").CoreMethodHook<"waitForWalletCreationV2">;
|
|
15
|
+
export declare const useVerifyOAuth: () => import("../../types/utils.js").CoreMethodHook<"verifyOAuthV2">;
|
|
16
|
+
export declare const useVerifyFarcaster: () => import("../../types/utils.js").CoreMethodHook<"verifyFarcasterV2">;
|
|
17
|
+
export declare const useVerifyTelegram: () => import("../../types/utils.js").CoreMethodHook<"verifyTelegramV2">;
|
|
18
|
+
export declare const useLoginExternalWallet: () => import("../../types/utils.js").CoreMethodHook<"loginExternalWalletV2">;
|
|
19
|
+
export declare const useVerifyExternalWallet: () => import("../../types/utils.js").CoreMethodHook<"verifyExternalWalletV2">;
|
|
20
|
+
export declare const useSetup2fa: () => import("../../types/utils.js").CoreMethodHook<"setup2faV2">;
|
|
21
|
+
export declare const useEnable2fa: () => import("../../types/utils.js").CoreMethodHook<"enable2faV2">;
|
|
22
|
+
export declare const useVerify2fa: () => import("../../types/utils.js").CoreMethodHook<"verify2faV2">;
|
|
23
|
+
export declare const useKeepSessionAliveV2: () => import("../../types/utils.js").CoreMethodHook<"keepSessionAlive">;
|
|
24
|
+
export declare const useLogout: () => import("../../types/utils.js").CoreMethodHook<"logout">;
|
|
25
|
+
export declare const useResendVerificationCode: () => import("../../types/utils.js").CoreMethodHook<"resendVerificationCode">;
|
|
26
|
+
export declare const useCreateWallet: () => import("../../types/utils.js").CoreMethodHook<"createWallet">;
|
|
27
|
+
export declare const useCreateWalletPerType: () => import("../../types/utils.js").CoreMethodHook<"createWalletPerType">;
|
|
28
|
+
export declare const useCreatePregenWallet: () => import("../../types/utils.js").CoreMethodHook<"createPregenWalletV2">;
|
|
29
|
+
export declare const useCreatePregenWalletPerType: () => import("../../types/utils.js").CoreMethodHook<"createPregenWalletPerTypeV2">;
|
|
30
|
+
export declare const useClaimPregenWallets: () => import("../../types/utils.js").CoreMethodHook<"claimPregenWalletsV2">;
|
|
31
|
+
export declare const useHasPregenWallet: () => import("../../types/utils.js").CoreMethodHook<"hasPregenWalletV2">;
|
|
32
|
+
export declare const useUpdatePregenWalletIdentifier: () => import("../../types/utils.js").CoreMethodHook<"updatePregenWalletIdentifierV2">;
|
|
33
|
+
export declare const useSignMessageV2: () => import("../../types/utils.js").CoreMethodHook<"signMessage">;
|
|
34
|
+
export declare const useSignTransactionV2: () => import("../../types/utils.js").CoreMethodHook<"signTransaction">;
|
|
@@ -3,12 +3,13 @@ import { SignTransactionArgs } from '../../actions/signTransaction.js';
|
|
|
3
3
|
import { Compute } from '../../types/utils.js';
|
|
4
4
|
import { UseMutationReturnType } from '../../types/query.js';
|
|
5
5
|
import { FullSignatureRes } from '@getpara/web-sdk';
|
|
6
|
-
type
|
|
6
|
+
type SignTransactionMutationArgs = Omit<SignTransactionArgs, 'walletId'> & Partial<Pick<SignTransactionArgs, 'walletId'>>;
|
|
7
|
+
type UseSignTransactionReturnType<TData = FullSignatureRes, TError = Error, TVariables = SignTransactionMutationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
|
|
7
8
|
signTransaction: UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
8
9
|
signTransactionAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
|
|
9
10
|
}>;
|
|
10
11
|
/**
|
|
11
12
|
* Hook for signing a transaction
|
|
12
13
|
*/
|
|
13
|
-
export declare const useSignTransaction: () => UseSignTransactionReturnType<FullSignatureRes, Error,
|
|
14
|
+
export declare const useSignTransaction: () => UseSignTransactionReturnType<FullSignatureRes, Error, SignTransactionMutationArgs, unknown>;
|
|
14
15
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CoreMethodName, CoreMethodParams, CoreMethods } from '@getpara/web-sdk';
|
|
2
|
+
import { CoreMethodHook } from '../../types/utils.js';
|
|
3
|
+
import { CoreAction } from '../../actions/utils.js';
|
|
4
|
+
export declare function generateHook<const method extends CoreMethodName & keyof CoreMethods>(method: method, action: CoreAction<method>, defaultParams?: CoreMethodParams<method>): () => CoreMethodHook<method>;
|
|
@@ -6,6 +6,6 @@ export declare const useAccount: () => import("@tanstack/react-query").UseQueryR
|
|
|
6
6
|
isConnected: boolean;
|
|
7
7
|
email?: string;
|
|
8
8
|
phone?: string;
|
|
9
|
-
wallets?:
|
|
9
|
+
wallets?: Pick<import("@getpara/core-sdk").Wallet, "id" | "type" | "name" | "address" | "isExternal">[];
|
|
10
10
|
userId?: string;
|
|
11
11
|
}, Error>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BiometricHints } from '@getpara/react-common';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { AuthMethod, CoreMethodParams, AuthState, AuthStateSignup, AuthStateLogin } from '@getpara/web-sdk';
|
|
4
|
+
import { ParaModalProps } from '../../modal/types/modalProps.js';
|
|
5
|
+
import { TelegramAuthResponse, VerifiedAuth, VerifyExternalWalletParams } from '@getpara/user-management-client';
|
|
6
|
+
type Value = {
|
|
7
|
+
signUpOrLogIn: [(_: VerifiedAuth) => void, boolean];
|
|
8
|
+
verifyNewAccount: [(_: string) => void, boolean, Error | null];
|
|
9
|
+
verifyOAuth: (_: CoreMethodParams<'verifyOAuthV2'>['method']) => void;
|
|
10
|
+
verifyFarcaster: () => void;
|
|
11
|
+
verifyTelegram: (_: TelegramAuthResponse) => void;
|
|
12
|
+
verifyExternalWallet: (_: VerifyExternalWalletParams) => void;
|
|
13
|
+
onNewAuthState: (_: AuthState) => void;
|
|
14
|
+
presentSignupUi: (_: AuthMethod, __: AuthStateSignup) => void;
|
|
15
|
+
presentLoginUi: (_: AuthMethod, __: AuthStateLogin) => void;
|
|
16
|
+
setup2fa: [boolean];
|
|
17
|
+
logout: () => void;
|
|
18
|
+
biometricHints?: BiometricHints;
|
|
19
|
+
};
|
|
20
|
+
type Props = PropsWithChildren<{
|
|
21
|
+
is2faEnabled?: boolean;
|
|
22
|
+
isRecoverySecretStepEnabled?: boolean;
|
|
23
|
+
overrides?: {
|
|
24
|
+
login?: ParaModalProps['loginTransitionOverride'];
|
|
25
|
+
createWallets?: ParaModalProps['createWalletOverride'];
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export declare const AuthContext: import("react").Context<Value>;
|
|
29
|
+
export declare function AuthProvider({ children, is2faEnabled, isRecoverySecretStepEnabled, overrides, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const useAuthActions: () => Value;
|
|
31
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { CommonChain, CommonWallet } from '
|
|
2
|
+
import type { CommonChain, CommonWallet } from '@getpara/react-common';
|
|
3
3
|
export declare const defaultExternalWallet: {
|
|
4
4
|
wallets: never[];
|
|
5
5
|
chains: never[];
|
|
@@ -20,6 +20,7 @@ export declare const defaultExternalWallet: {
|
|
|
20
20
|
switchChain: () => Promise<void>;
|
|
21
21
|
setChainIdSwitchingTo: () => void;
|
|
22
22
|
connectEmbeddedToExternalConnectors: () => Promise<void>;
|
|
23
|
+
verifyWalletSignature: () => Promise<{}>;
|
|
23
24
|
};
|
|
24
25
|
export declare const ExternalWalletContext: import("react").Context<{
|
|
25
26
|
wallets: CommonWallet[];
|
|
@@ -41,6 +42,12 @@ export declare const ExternalWalletContext: import("react").Context<{
|
|
|
41
42
|
switchChain: (chainId: string) => Promise<void>;
|
|
42
43
|
setChainIdSwitchingTo: (chainId?: string) => void;
|
|
43
44
|
connectEmbeddedToExternalConnectors: () => Promise<void>;
|
|
45
|
+
verifyWalletSignature: () => Promise<{
|
|
46
|
+
address?: string;
|
|
47
|
+
signature?: string;
|
|
48
|
+
cosmosPublicKeyHex?: string;
|
|
49
|
+
cosmosSigner?: string;
|
|
50
|
+
} | undefined>;
|
|
44
51
|
}>;
|
|
45
52
|
export declare function ExternalWalletProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
46
53
|
export declare const useExternalWallets: () => {
|
|
@@ -63,4 +70,10 @@ export declare const useExternalWallets: () => {
|
|
|
63
70
|
switchChain: (chainId: string) => Promise<void>;
|
|
64
71
|
setChainIdSwitchingTo: (chainId?: string) => void;
|
|
65
72
|
connectEmbeddedToExternalConnectors: () => Promise<void>;
|
|
73
|
+
verifyWalletSignature: () => Promise<{
|
|
74
|
+
address?: string;
|
|
75
|
+
signature?: string;
|
|
76
|
+
cosmosPublicKeyHex?: string;
|
|
77
|
+
cosmosSigner?: string;
|
|
78
|
+
} | undefined>;
|
|
66
79
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
1
|
+
import { Context, MutableRefObject } from 'react';
|
|
2
2
|
import ParaWeb, { WalletType } from '@getpara/web-sdk';
|
|
3
3
|
import { EvmExternalWalletContextType, ParaEvmProvider, WalletList as EvmWalletList } from '@getpara/evm-wallet-connectors';
|
|
4
4
|
import { CosmosExternalWalletContextType, ParaCosmosProvider, WalletList as CosmosWalletList } from '@getpara/cosmos-wallet-connectors';
|
|
5
5
|
import { ParaSolanaProvider, SolanaExternalWalletContextType, WalletList as SolanaWalletList } from '@getpara/solana-wallet-connectors';
|
|
6
|
-
import { ParaModalProps
|
|
6
|
+
import { ParaModalProps } from '../../modal/index.js';
|
|
7
7
|
import { OAuthLogoVariantType } from '../../modal/types/modalProps.js';
|
|
8
|
+
import { type TExternalWallet } from '@getpara/react-common';
|
|
8
9
|
export interface ClientSlice {
|
|
9
10
|
client?: ParaWeb;
|
|
10
11
|
setClient: (_: ParaWeb) => void;
|
|
@@ -30,6 +31,8 @@ export interface WalletSlice {
|
|
|
30
31
|
export interface ExternalWalletsSlice {
|
|
31
32
|
externalWallets: TExternalWallet[];
|
|
32
33
|
setExternalWallets: (_: TExternalWallet[]) => void;
|
|
34
|
+
externalWalletsWithFullAuth: TExternalWallet[];
|
|
35
|
+
setExternalWalletsWithFullAuth: (_: TExternalWallet[]) => void;
|
|
33
36
|
evmContext: Context<EvmExternalWalletContextType>;
|
|
34
37
|
setEvmContext: (_: Context<EvmExternalWalletContextType>) => void;
|
|
35
38
|
EvmProvider?: typeof ParaEvmProvider;
|
|
@@ -54,5 +57,6 @@ export interface ExternalWalletsSlice {
|
|
|
54
57
|
setSolanaWallets: (_: SolanaWalletList) => void;
|
|
55
58
|
isLoadingSolanaLib: boolean;
|
|
56
59
|
setIsLoadingSolanaLib: (_: boolean) => void;
|
|
60
|
+
onLoginRef: MutableRefObject<(() => Promise<void>) | null>;
|
|
57
61
|
}
|
|
58
62
|
export type Store = ClientSlice & ModalSlice & WalletSlice & ExternalWalletsSlice & ConfigSlice;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ParaCosmosProviderConfig } from '@getpara/cosmos-wallet-connectors';
|
|
2
|
-
import { TExternalWallet } from '../../modal/index.js';
|
|
3
2
|
import { ParaSolanaProviderConfig } from '@getpara/solana-wallet-connectors';
|
|
4
3
|
import { Chain, Transport } from 'viem';
|
|
5
|
-
import { ParaEvmProviderConfig } from '@getpara/evm-wallet-connectors';
|
|
4
|
+
import { type ParaEvmProviderConfig } from '@getpara/evm-wallet-connectors';
|
|
5
|
+
import { type TExternalWallet } from '@getpara/react-common';
|
|
6
6
|
export type ExternalWalletProviderCommon = {
|
|
7
7
|
isUsing: boolean;
|
|
8
8
|
wallets: TExternalWallet[];
|
|
@@ -2,9 +2,10 @@ import { ParaWagmiProviderProps } from '@getpara/evm-wallet-connectors';
|
|
|
2
2
|
import ParaWeb, { AccountCreationEvent, AccountSetupEvent, ConstructorOpts, Environment, ExternalWalletChangeEvent, LoginEvent, LogoutEvent, PregenWalletClaimedEvent, SignMessageEvent, SignTransactionEvent, WalletCreatedEvent, WalletsChangeEvent } from '@getpara/web-sdk';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
import { Chain, Transport } from 'viem';
|
|
5
|
-
import { ParaModalProps
|
|
5
|
+
import { ParaModalProps } from '../../modal/index.js';
|
|
6
6
|
import { ParaGrazProviderProps } from '@getpara/cosmos-wallet-connectors';
|
|
7
7
|
import { ParaCosmosProviderConfigNoWallets, ParaEvmProviderConfigNoWallets, ParaSolanaProviderConfigNoWallets } from './externalWalletProviders.js';
|
|
8
|
+
import { type TExternalWallet } from '@getpara/react-common';
|
|
8
9
|
export type Callbacks = {
|
|
9
10
|
onLogout?: (event: LogoutEvent) => void;
|
|
10
11
|
onLogin?: (event: LoginEvent) => void;
|
|
@@ -100,6 +101,10 @@ export type ExternalWalletConfig<chains extends readonly [Chain, ...Chain[]], tr
|
|
|
100
101
|
* NOTE: Any wallets that are detected as installed will be sorted first, followed by those that are not detected or not installed.
|
|
101
102
|
*/
|
|
102
103
|
wallets: TExternalWallet[];
|
|
104
|
+
/**
|
|
105
|
+
* Which external wallets will include full verification and Para auth.
|
|
106
|
+
*/
|
|
107
|
+
walletsWithParaAuth?: TExternalWallet[];
|
|
103
108
|
};
|
|
104
109
|
export interface ParaProviderProps<chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]['id'], Transport>> extends PropsWithChildren {
|
|
105
110
|
/**
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } from '@getpara/web-sdk';
|
|
2
|
+
import { UseMutationReturnType } from './query.js';
|
|
3
|
+
import { UseMutateFunction, UseMutateAsyncFunction } from '@tanstack/react-query';
|
|
1
4
|
export type Compute<type> = {
|
|
2
5
|
[key in keyof type]: type[key];
|
|
3
6
|
} & unknown;
|
|
@@ -5,3 +8,15 @@ export type Compute<type> = {
|
|
|
5
8
|
export type StrictOmit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
|
|
6
9
|
export type UnionStrictOmit<type, keys extends keyof type> = type extends any ? StrictOmit<type, keys> : never;
|
|
7
10
|
export type ChangeFields<T, R> = Omit<T, keyof R> & R;
|
|
11
|
+
type SyncHook<method extends CoreMethodName & keyof CoreMethods> = {
|
|
12
|
+
mutate: UseMutateFunction<Awaited<CoreMethodResponse<method>>, Error, CoreMethodParams<method> | void, unknown>;
|
|
13
|
+
} & {
|
|
14
|
+
[K in method]: UseMutateFunction<Awaited<CoreMethodResponse<method>>, Error, CoreMethodParams<method> | void, unknown>;
|
|
15
|
+
};
|
|
16
|
+
type AsyncHook<method extends CoreMethodName & keyof CoreMethods> = {
|
|
17
|
+
mutateAsync: UseMutateAsyncFunction<CoreMethodResponse<method>, Error, CoreMethodParams<method> | void, unknown>;
|
|
18
|
+
} & {
|
|
19
|
+
[K in `${method}Async`]: UseMutateAsyncFunction<CoreMethodResponse<method>, Error, CoreMethodParams<method> | void, unknown>;
|
|
20
|
+
};
|
|
21
|
+
export type CoreMethodHook<method extends CoreMethodName & keyof CoreMethods> = Compute<UseMutationReturnType<CoreMethods[method]['response'], Error, CoreMethods[method]['params'] | void, unknown> & SyncHook<method> & AsyncHook<method>>;
|
|
22
|
+
export {};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { CoreMethodName, CoreMethodParams, CoreMethodResponse, CoreMethods } from '@getpara/web-sdk';
|
|
1
2
|
import { DefaultError, UseMutationResult } from '@tanstack/react-query';
|
|
3
|
+
import { CoreMethodHook } from '../types/utils.js';
|
|
2
4
|
export declare function renameMutations<TResp = unknown, TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(mutationObj: UseMutationResult<TData, TError, TVariables, TContext>, name: string): TResp;
|
|
5
|
+
export declare function renameCoreMutations<method extends CoreMethodName & keyof CoreMethods>(mutationObj: UseMutationResult<CoreMethodResponse<method>, Error, CoreMethodParams<method> | undefined, unknown>, name: method): CoreMethodHook<method>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
"*.css"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@getpara/react-common": "2.0.0-dev.
|
|
19
|
-
"@getpara/react-components": "2.0.0-dev.
|
|
20
|
-
"@getpara/web-sdk": "2.0.0-dev.
|
|
21
|
-
"@tanstack/react-query": "^5.0.0",
|
|
18
|
+
"@getpara/react-common": "2.0.0-dev.1",
|
|
19
|
+
"@getpara/react-components": "2.0.0-dev.1",
|
|
20
|
+
"@getpara/web-sdk": "2.0.0-dev.1",
|
|
22
21
|
"date-fns": "^3.6.0",
|
|
23
22
|
"framer-motion": "11.3.28",
|
|
24
23
|
"libphonenumber-js": "^1.11.1",
|
|
@@ -34,9 +33,9 @@
|
|
|
34
33
|
"cli": "node ./dist/cli/cli.mjs"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@getpara/cosmos-wallet-connectors": "^2.0.0-dev.
|
|
38
|
-
"@getpara/evm-wallet-connectors": "^2.0.0-dev.
|
|
39
|
-
"@getpara/solana-wallet-connectors": "^2.0.0-dev.
|
|
36
|
+
"@getpara/cosmos-wallet-connectors": "^2.0.0-dev.1",
|
|
37
|
+
"@getpara/evm-wallet-connectors": "^2.0.0-dev.1",
|
|
38
|
+
"@getpara/solana-wallet-connectors": "^2.0.0-dev.1",
|
|
40
39
|
"@testing-library/dom": "^10.1.0",
|
|
41
40
|
"@testing-library/react": "^16.0.0",
|
|
42
41
|
"@types/chrome": "^0.0.237",
|
|
@@ -47,9 +46,10 @@
|
|
|
47
46
|
"wagmi": "2.x"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
|
-
"@getpara/cosmos-wallet-connectors": "^2.0.0-dev.
|
|
51
|
-
"@getpara/evm-wallet-connectors": "^2.0.0-dev.
|
|
52
|
-
"@getpara/solana-wallet-connectors": "^2.0.0-dev.
|
|
49
|
+
"@getpara/cosmos-wallet-connectors": "^2.0.0-dev.1",
|
|
50
|
+
"@getpara/evm-wallet-connectors": "^2.0.0-dev.1",
|
|
51
|
+
"@getpara/solana-wallet-connectors": "^2.0.0-dev.1",
|
|
52
|
+
"@tanstack/react-query": ">=5.0.0",
|
|
53
53
|
"react": "*",
|
|
54
54
|
"react-dom": "*"
|
|
55
55
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"resolutions": {
|
|
62
62
|
"styled-components": "^6"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e6e791d4e4f9afd94f2093d6045d686b85e5a682"
|
|
65
65
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare enum EvmWallet {
|
|
2
|
-
METAMASK = "METAMASK",
|
|
3
|
-
RAINBOW = "RAINBOW",
|
|
4
|
-
COINBASE = "COINBASE",
|
|
5
|
-
WALLETCONNECT = "WALLETCONNECT",
|
|
6
|
-
ZERION = "ZERION",
|
|
7
|
-
RABBY = "RABBY"
|
|
8
|
-
}
|
|
9
|
-
export declare enum SolanaWallet {
|
|
10
|
-
PHANTOM = "PHANTOM",
|
|
11
|
-
GLOW = "GLOW",
|
|
12
|
-
BACKPACK = "BACKPACK"
|
|
13
|
-
}
|
|
14
|
-
export declare enum CosmosWallet {
|
|
15
|
-
KEPLR = "KEPLR",
|
|
16
|
-
LEAP = "LEAP"
|
|
17
|
-
}
|
|
18
|
-
export declare const ExternalWallet: {
|
|
19
|
-
KEPLR: CosmosWallet.KEPLR;
|
|
20
|
-
LEAP: CosmosWallet.LEAP;
|
|
21
|
-
PHANTOM: SolanaWallet.PHANTOM;
|
|
22
|
-
GLOW: SolanaWallet.GLOW;
|
|
23
|
-
BACKPACK: SolanaWallet.BACKPACK;
|
|
24
|
-
METAMASK: EvmWallet.METAMASK;
|
|
25
|
-
RAINBOW: EvmWallet.RAINBOW;
|
|
26
|
-
COINBASE: EvmWallet.COINBASE;
|
|
27
|
-
WALLETCONNECT: EvmWallet.WALLETCONNECT;
|
|
28
|
-
ZERION: EvmWallet.ZERION;
|
|
29
|
-
RABBY: EvmWallet.RABBY;
|
|
30
|
-
};
|
|
31
|
-
export type TExternalWallet = keyof typeof ExternalWallet;
|