@getpara/react-sdk-lite 2.0.0-dev.7 → 2.1.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/dist/cli/cli.mjs +26 -1
- package/dist/modal/ParaModal.js +16 -10
- package/dist/modal/components/Account/Account.js +42 -4
- package/dist/modal/components/Account/AccountHeader.js +13 -16
- package/dist/modal/components/Account/AccountProfile.d.ts +1 -1
- package/dist/modal/components/Account/AccountProfile.js +82 -210
- package/dist/modal/components/Account/AccountProfileEntry.d.ts +12 -0
- package/dist/modal/components/Account/AccountProfileEntry.js +228 -0
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +15 -4
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.js +94 -0
- package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendForm.js +343 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.js +53 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +1 -0
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.js +56 -0
- package/dist/modal/components/Account/AccountSend/AssetNetwork.d.ts +5 -0
- package/dist/modal/components/Account/AccountSend/AssetNetwork.js +36 -0
- package/dist/modal/components/Account/AccountSend/context.d.ts +38 -0
- package/dist/modal/components/Account/AccountSend/context.js +418 -0
- package/dist/modal/components/Account/AccountSend/index.d.ts +4 -0
- package/dist/modal/components/Account/AccountSend/index.js +67 -0
- package/dist/modal/components/Account/AccountWallet.d.ts +1 -0
- package/dist/modal/components/Account/AccountWallet.js +134 -0
- package/dist/modal/components/{WalletSelect/WalletSelect.d.ts → Account/AccountWalletSelect.d.ts} +1 -1
- package/dist/modal/components/{WalletSelect/WalletSelect.js → Account/AccountWalletSelect.js} +20 -6
- package/dist/modal/components/AddFunds/AddFunds.js +3 -2
- package/dist/modal/components/AddFunds/AddFundsAsset.js +7 -6
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +5 -5
- package/dist/modal/components/AddFunds/AddFundsProvider.js +1 -2
- package/dist/modal/components/AddFunds/AddFundsSettings.js +13 -54
- package/dist/modal/components/AddFunds/common.d.ts +0 -14
- package/dist/modal/components/AddFunds/common.js +1 -8
- package/dist/modal/components/AuthInput/AuthInput.js +2 -2
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +3 -2
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +8 -33
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +5 -2
- package/dist/modal/components/Body/Body.js +81 -48
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +8 -5
- package/dist/modal/components/Controls/ChainSelect.js +1 -2
- package/dist/modal/components/Controls/Controls.js +3 -1
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +5 -1
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +48 -19
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +5 -2
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +63 -33
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +3 -1
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +22 -12
- package/dist/modal/components/Footer/Footer.js +4 -5
- package/dist/modal/components/Header/Header.js +1 -2
- package/dist/modal/components/Header/hooks/useStepTitle.js +53 -38
- package/dist/modal/components/Hero/Hero.js +5 -3
- package/dist/modal/components/IFrameStep/IFrameStep.js +13 -12
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +4 -1
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +6 -5
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +6 -5
- package/dist/modal/components/OnRampComponents/AddingFunds.js +1 -1
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +1 -2
- package/dist/modal/components/QuantityInput.d.ts +9 -0
- package/dist/modal/components/QuantityInput.js +91 -0
- package/dist/modal/components/SearchableButtonList.d.ts +34 -0
- package/dist/modal/components/SearchableButtonList.js +223 -0
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +4 -1
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +1 -0
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.js +10 -0
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +13 -2
- package/dist/modal/components/Waiting/Waiting.d.ts +1 -1
- package/dist/modal/components/Waiting/Waiting.js +7 -2
- package/dist/modal/components/WalletCard/WalletCard.js +2 -3
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.d.ts +7 -1
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +33 -12
- package/dist/modal/components/common.d.ts +8 -10
- package/dist/modal/components/common.js +16 -36
- package/dist/modal/hooks/index.d.ts +4 -0
- package/dist/modal/hooks/index.js +5 -0
- package/dist/modal/hooks/useDebounce.d.ts +4 -0
- package/dist/modal/hooks/useDebounce.js +16 -0
- package/dist/modal/hooks/useFarcasterLogin.js +8 -1
- package/dist/modal/hooks/useTelegramLogin.js +4 -0
- package/dist/modal/index.d.ts +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/modal/stores/modal/actions.js +9 -2
- package/dist/modal/stores/modal/useModalStore.d.ts +9 -1
- package/dist/modal/stores/modal/useModalStore.js +6 -2
- package/dist/modal/types/modalProps.d.ts +5 -1
- package/dist/modal/utils/authInputHelpers.js +1 -1
- package/dist/modal/utils/countryCodes.js +50 -1
- package/dist/modal/utils/getWalletDisplayName.js +1 -1
- package/dist/modal/utils/openPopup.d.ts +1 -1
- package/dist/modal/utils/openPopup.js +6 -2
- package/dist/modal/utils/renderTextWithLinks.d.ts +2 -0
- package/dist/modal/utils/renderTextWithLinks.js +34 -0
- package/dist/modal/utils/steps.d.ts +24 -3
- package/dist/modal/utils/steps.js +51 -5
- package/dist/modal/utils/stringFormatters.d.ts +2 -3
- package/dist/modal/utils/stringFormatters.js +11 -7
- package/dist/modal/utils/validatePortalOrigin.d.ts +2 -0
- package/dist/modal/utils/validatePortalOrigin.js +15 -0
- package/dist/provider/ParaProviderMin.js +13 -5
- package/dist/provider/actions/getEmbeddedAccount.d.ts +3 -2
- package/dist/provider/actions/getEmbeddedAccount.js +13 -4
- package/dist/provider/actions/index.d.ts +11 -9
- package/dist/provider/actions/index.js +4 -0
- package/dist/provider/components/CosmosWalletWrapper.js +3 -3
- package/dist/provider/components/EvmWalletWrapper.js +3 -3
- package/dist/provider/components/ExternalWalletWrapper.js +7 -1
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
- package/dist/provider/hooks/mutations/index.d.ts +2 -0
- package/dist/provider/hooks/mutations/index.js +4 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +42 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.js +57 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +5 -5
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +15 -0
- package/dist/provider/hooks/mutations/useExportPrivateKey.js +32 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +8 -2
- package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +57 -0
- package/dist/provider/hooks/mutations/useSwitchWallets.js +30 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +18 -27
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +5 -5
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +14 -11
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +5 -5
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
- package/dist/provider/hooks/queries/index.d.ts +1 -0
- package/dist/provider/hooks/queries/index.js +2 -0
- package/dist/provider/hooks/queries/useAccount.js +58 -24
- package/dist/provider/hooks/queries/useLinkedAccounts.js +4 -2
- package/dist/provider/hooks/queries/useProfileBalance.d.ts +29 -0
- package/dist/provider/hooks/queries/useProfileBalance.js +65 -0
- package/dist/provider/hooks/utils/useAssetInfo.d.ts +3 -0
- package/dist/provider/hooks/utils/useAssetInfo.js +21 -0
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +22 -5
- package/dist/provider/hooks/utils/useModal.js +3 -3
- package/dist/provider/hooks/utils/useWalletState.d.ts +2 -1
- package/dist/provider/hooks/utils/useWalletState.js +2 -1
- package/dist/provider/providers/AccountLinkProvider.js +18 -11
- package/dist/provider/providers/AssetsProvider.d.ts +14 -0
- package/dist/provider/providers/AssetsProvider.js +68 -0
- package/dist/provider/providers/AuthProvider.d.ts +4 -0
- package/dist/provider/providers/AuthProvider.js +187 -43
- package/dist/provider/providers/ExternalWalletProvider.d.ts +19 -5
- package/dist/provider/providers/ExternalWalletProvider.js +363 -44
- package/dist/provider/stores/getters.d.ts +2 -2
- package/dist/provider/stores/slices/modal.js +4 -1
- package/dist/provider/stores/types.d.ts +6 -3
- package/package.json +8 -8
- package/dist/modal/constants/constants.d.ts +0 -35
- package/dist/modal/constants/constants.js +0 -148
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk-lite",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"setup-para": "dist/cli/cli.mjs"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@getpara/react-common": "2.
|
|
9
|
-
"@getpara/react-components": "2.
|
|
10
|
-
"@getpara/web-sdk": "2.
|
|
8
|
+
"@getpara/react-common": "2.1.0",
|
|
9
|
+
"@getpara/react-components": "2.1.0",
|
|
10
|
+
"@getpara/web-sdk": "2.1.0",
|
|
11
11
|
"date-fns": "^3.6.0",
|
|
12
12
|
"framer-motion": "^11.3.31",
|
|
13
13
|
"libphonenumber-js": "^1.11.7",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"zustand-sync-tabs": "^0.2.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@getpara/cosmos-wallet-connectors": "2.
|
|
20
|
-
"@getpara/evm-wallet-connectors": "2.
|
|
21
|
-
"@getpara/solana-wallet-connectors": "2.
|
|
19
|
+
"@getpara/cosmos-wallet-connectors": "2.1.0",
|
|
20
|
+
"@getpara/evm-wallet-connectors": "2.1.0",
|
|
21
|
+
"@getpara/solana-wallet-connectors": "2.1.0",
|
|
22
22
|
"@tanstack/react-query": "^5.74.0",
|
|
23
23
|
"@testing-library/dom": "^10.4.0",
|
|
24
24
|
"@testing-library/react": "^16.3.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"package.json",
|
|
39
39
|
"styles.css"
|
|
40
40
|
],
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "3ae7f836324a3a2a8a57156e16304aeaf0d37b42",
|
|
42
42
|
"main": "dist/index.js",
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@tanstack/react-query": ">=5.0.0",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Network, OnRampAsset, OnRampMethod, OnRampProvider, TWalletType } from '@getpara/core-sdk';
|
|
2
|
-
import { IconType } from '@getpara/react-components';
|
|
3
|
-
import { Transition, Variants } from 'framer-motion';
|
|
4
|
-
import { DisplayMetadata } from '@getpara/react-common';
|
|
5
|
-
export declare const PARA_CONNECT = "https://connect.getpara.com/";
|
|
6
|
-
export declare const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
7
|
-
export type OnRampProviderConfig = DisplayMetadata & {
|
|
8
|
-
feeLower: number;
|
|
9
|
-
feeUpper?: number;
|
|
10
|
-
methods: OnRampMethod[];
|
|
11
|
-
backgroundColors: string[];
|
|
12
|
-
};
|
|
13
|
-
export declare const ON_RAMP_PROVIDERS: Record<OnRampProvider, OnRampProviderConfig>;
|
|
14
|
-
type Networks = Record<Network, DisplayMetadata>;
|
|
15
|
-
export declare const WALLET_TYPES_METADATA: Record<TWalletType, DisplayMetadata>;
|
|
16
|
-
export declare const NETWORKS: Networks;
|
|
17
|
-
export declare const ON_RAMP_ASSETS: Record<OnRampAsset, {
|
|
18
|
-
name: string;
|
|
19
|
-
code: string;
|
|
20
|
-
icon: IconType;
|
|
21
|
-
isCircular?: boolean;
|
|
22
|
-
isDark?: boolean;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function getNetworkName(str: Network | string): string;
|
|
25
|
-
export declare function getNetworkIcon(str: Network | string): IconType;
|
|
26
|
-
export declare function getAssetCode(str: OnRampAsset | string): string;
|
|
27
|
-
export declare function getAssetName(str: OnRampAsset | string): string;
|
|
28
|
-
export declare function getAssetIcon(str: OnRampAsset | string): "key" | "phone" | "farcaster" | "telegram" | "discord" | "x" | "search" | "wallet" | "cosmos" | "solana" | "para" | "walletConnect" | "close" | "copy" | "safe" | "stripeBrand" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowCircleDown" | "arrowNarrow" | "arrow" | "asterisk" | "backpack" | "backupKit" | "bank" | "baseBrand" | "beraBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "clubhouseBrand" | "clubhouse" | "code" | "coinbase" | "copy07" | "cosmosCircle" | "cosmostation" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dotsSquare" | "dots" | "downloadCloud" | "download" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "glow" | "googleBrand" | "google" | "gridDots" | "haha" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "image" | "infoCircle" | "instagramBrand" | "instagram" | "keplr" | "laptop" | "leap" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "menu" | "metamask" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "okx" | "optimismBrand" | "paraArrow" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "passcode" | "phantom" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "polygon" | "puzzlePiece" | "qrCode02" | "qrCode" | "rabby" | "rainbow" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "send" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solanaCircle" | "solflare" | "spacingHeight" | "star04Filled" | "star05" | "stars01Filled" | "stars02" | "stars" | "stopSquare" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "user01" | "userCircle" | "userPlus" | "user" | "valora" | "wallet02" | "youtubeBrand" | "youtube" | "zerion" | "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";
|
|
29
|
-
export declare const MOBILE_SIZE = 480;
|
|
30
|
-
export declare const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
31
|
-
export declare const EMAIL_REGEX: RegExp;
|
|
32
|
-
export declare const BODY_MOTION_VARIANTS: Variants;
|
|
33
|
-
export declare const BODY_TRANSITION: Transition;
|
|
34
|
-
export declare const SDK_VERSION: string;
|
|
35
|
-
export {};
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../../chunk-MMUBH76A.js";
|
|
6
|
-
import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from "@getpara/core-sdk";
|
|
7
|
-
const PARA_CONNECT = "https://connect.getpara.com/";
|
|
8
|
-
const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
9
|
-
const ON_RAMP_PROVIDERS = {
|
|
10
|
-
[OnRampProvider.STRIPE]: {
|
|
11
|
-
name: "Stripe",
|
|
12
|
-
feeLower: 0.99,
|
|
13
|
-
feeUpper: 4.49,
|
|
14
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
15
|
-
icon: "stripeBrand",
|
|
16
|
-
backgroundColors: ["#6772E5", "#808AF4"]
|
|
17
|
-
},
|
|
18
|
-
[OnRampProvider.RAMP]: {
|
|
19
|
-
name: "Ramp",
|
|
20
|
-
feeLower: 0.99,
|
|
21
|
-
feeUpper: 4.49,
|
|
22
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
23
|
-
icon: "rampNetworkBrand",
|
|
24
|
-
backgroundColors: ["#21BF73", "#3AE492"]
|
|
25
|
-
},
|
|
26
|
-
[OnRampProvider.MOONPAY]: {
|
|
27
|
-
name: "MoonPay",
|
|
28
|
-
feeLower: 1,
|
|
29
|
-
feeUpper: 4.5,
|
|
30
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
31
|
-
icon: "moonpayBrand",
|
|
32
|
-
backgroundColors: ["#7715F5", "#9647fd"]
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const ICON_TYPES = {
|
|
36
|
-
ethereum: { isDark: true },
|
|
37
|
-
usdcBrand: { isCircular: true },
|
|
38
|
-
arbitrumBrand: { isCircular: true },
|
|
39
|
-
baseBrand: { isCircular: true },
|
|
40
|
-
optimismBrand: { isCircular: true },
|
|
41
|
-
cosmos: { isCircular: true, isDark: true },
|
|
42
|
-
celoBrand: { isCircular: true },
|
|
43
|
-
tetherBrand: { isCircular: true }
|
|
44
|
-
};
|
|
45
|
-
const WALLET_TYPES_METADATA = {
|
|
46
|
-
EVM: { name: "EVM", icon: "ethereum", isDark: true },
|
|
47
|
-
SOLANA: { name: "Solana", icon: "solana" },
|
|
48
|
-
COSMOS: { name: "Cosmos", icon: "cosmos", isCircular: true, isDark: true }
|
|
49
|
-
};
|
|
50
|
-
const NETWORKS = Object.entries({
|
|
51
|
-
[Network.ETHEREUM]: { name: "Ethereum", icon: "ethereum" },
|
|
52
|
-
[Network.SEPOLIA]: { name: "Sepolia", icon: "ethereum" },
|
|
53
|
-
[Network.ARBITRUM]: { name: "Arbitrum", icon: "arbitrumBrand" },
|
|
54
|
-
[Network.BASE]: { name: "Base", icon: "baseBrand" },
|
|
55
|
-
[Network.OPTIMISM]: { name: "Optimism", icon: "optimismBrand" },
|
|
56
|
-
[Network.POLYGON]: { name: "Polygon", icon: "polygonBrand" },
|
|
57
|
-
[Network.SOLANA]: { name: "Solana", icon: "solana" },
|
|
58
|
-
[Network.COSMOS]: { name: "Cosmos", icon: "cosmos" },
|
|
59
|
-
[Network.CELO]: { name: "Celo", icon: "celoBrand" },
|
|
60
|
-
[Network.SOLANA_DEVNET]: { name: "Solana Devnet", icon: "solana" },
|
|
61
|
-
[Network.NOBLE]: { name: "Noble", icon: "nobleBrand" },
|
|
62
|
-
[Network.BERACHAIN]: { name: "Berachain", icon: "beraBrand" }
|
|
63
|
-
}).reduce((acc, [key, entry]) => {
|
|
64
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
65
|
-
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
66
|
-
});
|
|
67
|
-
}, {});
|
|
68
|
-
const ON_RAMP_ASSETS = Object.entries({
|
|
69
|
-
[OnRampAsset.ETHEREUM]: { name: "Ethereum", code: "ETH", icon: "ethereum" },
|
|
70
|
-
[OnRampAsset.USDC]: { name: "USD Coin", code: "USDC", icon: "usdcBrand" },
|
|
71
|
-
[OnRampAsset.POLYGON]: { name: "Polygon", code: "POL", icon: "polygonBrand" },
|
|
72
|
-
[OnRampAsset.SOLANA]: { name: "Solana", code: "SOL", icon: "solana" },
|
|
73
|
-
[OnRampAsset.ATOM]: { name: "Atom", code: "ATOM", icon: "cosmos" },
|
|
74
|
-
[OnRampAsset.CELO]: { name: "Celo", code: "CELO", icon: "celoBrand" },
|
|
75
|
-
[OnRampAsset.TETHER]: { name: "Tether", code: "USDT", icon: "tetherBrand" },
|
|
76
|
-
[OnRampAsset.CUSD]: { name: "Celo Dollar", code: "CUSD", icon: "celoBrand" },
|
|
77
|
-
[OnRampAsset.CEUR]: { name: "Celo Euro", code: "CEUR", icon: "celoBrand" },
|
|
78
|
-
[OnRampAsset.CREAL]: { name: "Celo Real", code: "CREAL", icon: "celoBrand" },
|
|
79
|
-
[OnRampAsset.BERA]: { name: "Berachain", code: "BERA", icon: "beraBrand" }
|
|
80
|
-
}).reduce((acc, [key, entry]) => {
|
|
81
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
82
|
-
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
83
|
-
});
|
|
84
|
-
}, {});
|
|
85
|
-
function getNetworkName(str) {
|
|
86
|
-
var _a, _b;
|
|
87
|
-
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.name) != null ? _b : `${str[0]}${str.slice(1).toLowerCase()}`;
|
|
88
|
-
}
|
|
89
|
-
function getNetworkIcon(str) {
|
|
90
|
-
var _a, _b;
|
|
91
|
-
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.icon) != null ? _b : "globe";
|
|
92
|
-
}
|
|
93
|
-
function getAssetCode(str) {
|
|
94
|
-
var _a, _b;
|
|
95
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.code) != null ? _b : str;
|
|
96
|
-
}
|
|
97
|
-
function getAssetName(str) {
|
|
98
|
-
var _a, _b;
|
|
99
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.name) != null ? _b : str;
|
|
100
|
-
}
|
|
101
|
-
function getAssetIcon(str) {
|
|
102
|
-
var _a, _b;
|
|
103
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.icon) != null ? _b : "emptyCircle";
|
|
104
|
-
}
|
|
105
|
-
const MOBILE_SIZE = 480;
|
|
106
|
-
const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
107
|
-
const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
108
|
-
const BODY_MOTION_VARIANTS = {
|
|
109
|
-
enter: (direction) => {
|
|
110
|
-
return {
|
|
111
|
-
scale: direction > 0 ? 0.9 : 1.1,
|
|
112
|
-
opacity: 0
|
|
113
|
-
};
|
|
114
|
-
},
|
|
115
|
-
center: {
|
|
116
|
-
scale: 1,
|
|
117
|
-
opacity: 1
|
|
118
|
-
},
|
|
119
|
-
exit: (direction) => {
|
|
120
|
-
return {
|
|
121
|
-
scale: direction < 0 ? 0.9 : 1.1,
|
|
122
|
-
opacity: 0
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const BODY_TRANSITION = {
|
|
127
|
-
duration: 0.2
|
|
128
|
-
};
|
|
129
|
-
const SDK_VERSION = "2.0.0-alpha.50";
|
|
130
|
-
export {
|
|
131
|
-
BODY_MOTION_VARIANTS,
|
|
132
|
-
BODY_TRANSITION,
|
|
133
|
-
EMAIL_REGEX,
|
|
134
|
-
MOBILE_SIZE,
|
|
135
|
-
NETWORKS,
|
|
136
|
-
NETWORK_NOT_SUPPORTED_ERROR,
|
|
137
|
-
ON_RAMP_ASSETS,
|
|
138
|
-
ON_RAMP_PROVIDERS,
|
|
139
|
-
PARA_CONNECT,
|
|
140
|
-
PARA_TERMS_AND_CONDITIONS,
|
|
141
|
-
SDK_VERSION,
|
|
142
|
-
WALLET_TYPES_METADATA,
|
|
143
|
-
getAssetCode,
|
|
144
|
-
getAssetIcon,
|
|
145
|
-
getAssetName,
|
|
146
|
-
getNetworkIcon,
|
|
147
|
-
getNetworkName
|
|
148
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const routeMobileExternalWallet: (qrUri?: string) => void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
import { isAndroid, isMobile, isTelegram } from "@getpara/web-sdk";
|
|
4
|
-
const routeMobileExternalWallet = (qrUri) => {
|
|
5
|
-
if (typeof window === "undefined") {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (isMobile()) {
|
|
9
|
-
if (!qrUri) return;
|
|
10
|
-
if (!isTelegram() && qrUri.startsWith("http")) {
|
|
11
|
-
const link = document.createElement("a");
|
|
12
|
-
link.href = qrUri;
|
|
13
|
-
link.target = "_blank";
|
|
14
|
-
link.rel = "noreferrer noopener";
|
|
15
|
-
link.click();
|
|
16
|
-
} else {
|
|
17
|
-
if (isTelegram()) {
|
|
18
|
-
let href = qrUri;
|
|
19
|
-
if (isAndroid()) {
|
|
20
|
-
href = encodeURI(qrUri);
|
|
21
|
-
}
|
|
22
|
-
window.open(href, "_blank", "noreferrer noopener");
|
|
23
|
-
} else {
|
|
24
|
-
window.location.href = qrUri;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
routeMobileExternalWallet
|
|
31
|
-
};
|