@bluxcc/core 0.1.9 → 0.1.10
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/assets/Icons.d.ts +107 -0
- package/dist/assets/Logos.d.ts +30 -0
- package/dist/assets/bluxLogo.d.ts +8 -0
- package/dist/components/Alert/index.d.ts +9 -0
- package/dist/components/AssetsList/index.d.ts +6 -0
- package/dist/components/Button/index.d.ts +19 -0
- package/dist/components/CardItem/index.d.ts +16 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Header/index.d.ts +10 -0
- package/dist/components/Input/OTPInput.d.ts +8 -0
- package/dist/components/Input/index.d.ts +19 -0
- package/dist/components/Modal/index.d.ts +11 -0
- package/dist/components/Provider.d.ts +1 -0
- package/dist/components/QRCode/index.d.ts +11 -0
- package/dist/components/TabBox/index.d.ts +12 -0
- package/dist/components/Transaction/History/index.d.ts +12 -0
- package/dist/components/Transaction/Summary/index.d.ts +10 -0
- package/dist/constants/assets.d.ts +18 -0
- package/dist/constants/consts.d.ts +4 -0
- package/dist/constants/explorers.d.ts +9 -0
- package/dist/constants/locales.d.ts +9 -0
- package/dist/constants/networkDetails.d.ts +14 -0
- package/dist/constants/routes.d.ts +7 -0
- package/dist/constants/themes.d.ts +3 -0
- package/dist/enums.d.ts +39 -0
- package/dist/exports/blux.d.ts +21 -0
- package/dist/exports/core/callBuilder.d.ts +59 -0
- package/dist/exports/core/getAccount.d.ts +7 -0
- package/dist/exports/core/getAccounts.d.ts +14 -0
- package/dist/exports/core/getAssets.d.ts +12 -0
- package/dist/exports/core/getBalances.d.ts +8 -0
- package/dist/exports/core/getClaimableBalances.d.ts +13 -0
- package/dist/exports/core/getEffects.d.ts +15 -0
- package/dist/exports/core/getLedgers.d.ts +11 -0
- package/dist/exports/core/getLiquidityPools.d.ts +12 -0
- package/dist/exports/core/getNetwork.d.ts +1 -0
- package/dist/exports/core/getOffers.d.ts +15 -0
- package/dist/exports/core/getOperations.d.ts +16 -0
- package/dist/exports/core/getOrderbook.d.ts +8 -0
- package/dist/exports/core/getPayments.d.ts +11 -0
- package/dist/exports/core/getStrictReceivePaths.d.ts +8 -0
- package/dist/exports/core/getStrictSendPaths.d.ts +8 -0
- package/dist/exports/core/getTradeAggregation.d.ts +4 -0
- package/dist/exports/core/getTrades.d.ts +15 -0
- package/dist/exports/core/getTransactions.d.ts +15 -0
- package/dist/exports/core/index.d.ts +20 -0
- package/dist/exports/core/networks.d.ts +8 -0
- package/dist/exports/core/switchNetwork.d.ts +1 -0
- package/dist/exports/createConfig.d.ts +3 -0
- package/dist/exports/exportedStore.d.ts +15 -0
- package/dist/exports/index.d.ts +3 -0
- package/dist/exports/utils.d.ts +14 -0
- package/dist/hooks/useBalances.d.ts +8 -0
- package/dist/hooks/useCheckWalletNetwork.d.ts +3 -0
- package/dist/hooks/useDynamicHeight.d.ts +5 -0
- package/dist/hooks/useIsMobile.d.ts +1 -0
- package/dist/hooks/useLang.d.ts +2 -0
- package/dist/hooks/useLockBodyScroll.d.ts +1 -0
- package/dist/hooks/useModalAnimation.d.ts +5 -0
- package/dist/hooks/useTransactions.d.ts +11 -0
- package/dist/hooks/useUpdateAccount.d.ts +2 -0
- package/dist/index.cjs.js +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +27 -0
- package/dist/index.iife.js +35 -0
- package/dist/pages/About/index.d.ts +2 -0
- package/dist/pages/Failed/index.d.ts +2 -0
- package/dist/pages/Onboarding/OTP/index.d.ts +2 -0
- package/dist/pages/Onboarding/index.d.ts +2 -0
- package/dist/pages/Profile/Activity/index.d.ts +2 -0
- package/dist/pages/Profile/Balances/AddToken/index.d.ts +2 -0
- package/dist/pages/Profile/Balances/BalanceDetails/index.d.ts +2 -0
- package/dist/pages/Profile/Balances/index.d.ts +2 -0
- package/dist/pages/Profile/Receive/index.d.ts +2 -0
- package/dist/pages/Profile/SelectAsset/index.d.ts +2 -0
- package/dist/pages/Profile/Send/index.d.ts +2 -0
- package/dist/pages/Profile/Swap/AssetBox/index.d.ts +7 -0
- package/dist/pages/Profile/Swap/index.d.ts +2 -0
- package/dist/pages/Profile/index.d.ts +2 -0
- package/dist/pages/SendTransaction/index.d.ts +2 -0
- package/dist/pages/SignMessage/index.d.ts +2 -0
- package/dist/pages/Successful/index.d.ts +2 -0
- package/dist/pages/Waiting/index.d.ts +2 -0
- package/dist/pages/WalletConnect/index.d.ts +2 -0
- package/dist/pages/WrongNetwork/index.d.ts +2 -0
- package/dist/stellar/getTransactionDetails.d.ts +8 -0
- package/dist/stellar/handleSignMessage.d.ts +3 -0
- package/dist/stellar/handleTransactionSigning.d.ts +3 -0
- package/dist/stellar/paymentTransaction.d.ts +4 -0
- package/dist/stellar/processes/connectWalletProcess.d.ts +4 -0
- package/dist/stellar/processes/sendTransactionProcess.d.ts +3 -0
- package/dist/stellar/processes/signMessageProcess.d.ts +3 -0
- package/dist/stellar/signTransaction.d.ts +3 -0
- package/dist/stellar/submitTransaction.d.ts +5 -0
- package/dist/stellar/swapTransaction.d.ts +4 -0
- package/dist/store.d.ts +87 -0
- package/dist/types.d.ts +114 -0
- package/dist/utils/animatedGradient.d.ts +18 -0
- package/dist/utils/helpers.d.ts +40 -0
- package/dist/utils/initializeWalletConnect.d.ts +7 -0
- package/dist/utils/walletLogos.d.ts +2 -0
- package/dist/wallets/albedo.d.ts +2 -0
- package/dist/wallets/freighter.d.ts +2 -0
- package/dist/wallets/hana.d.ts +2 -0
- package/dist/wallets/hot.d.ts +2 -0
- package/dist/wallets/index.d.ts +3 -0
- package/dist/wallets/klever.d.ts +2 -0
- package/dist/wallets/lobstr.d.ts +2 -0
- package/dist/wallets/rabet.d.ts +2 -0
- package/dist/wallets/walletConnect.d.ts +2 -0
- package/dist/wallets/xbull.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const getTransactionDetails: (xdr: string, network: string) => {
|
|
2
|
+
action: "createAccount" | "payment" | "pathPaymentStrictReceive" | "pathPaymentStrictSend" | "createPassiveSellOffer" | "manageSellOffer" | "manageBuyOffer" | "setOptions" | "changeTrust" | "allowTrust" | "accountMerge" | "inflation" | "manageData" | "bumpSequence" | "createClaimableBalance" | "claimClaimableBalance" | "beginSponsoringFutureReserves" | "endSponsoringFutureReserves" | "revokeSponsorship" | "clawback" | "clawbackClaimableBalance" | "setTrustLineFlags" | "liquidityPoolDeposit" | "liquidityPoolWithdraw" | "invokeHostFunction" | "extendFootprintTtl" | "restoreFootprint";
|
|
3
|
+
operations: number;
|
|
4
|
+
sender: string;
|
|
5
|
+
receiver: string;
|
|
6
|
+
estimatedFee: number;
|
|
7
|
+
} | null;
|
|
8
|
+
export default getTransactionDetails;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ITransports, IWallet } from "../types";
|
|
2
|
+
declare const handleTransactionSigning: (wallet: IWallet, xdr: string, userAddress: string, network: string, transports: ITransports) => Promise<import("@stellar/stellar-sdk/lib/horizon").HorizonApi.SubmitTransactionResponse>;
|
|
3
|
+
export default handleTransactionSigning;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { IAsset } from "../types";
|
|
3
|
+
declare const paymentTransaction: (memo: string, amount: string, destinationAddress: string, asset: IAsset, sourceAddress: string, server: Horizon.Server, networkPassphrase: string) => Promise<string>;
|
|
4
|
+
export default paymentTransaction;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { ITransports } from "../types";
|
|
3
|
+
declare function submitTransaction(xdr: string, network: string, transports: ITransports): Promise<// | rpc.Api.GetSuccessfulTransactionResponse
|
|
4
|
+
Horizon.HorizonApi.SubmitTransactionResponse>;
|
|
5
|
+
export default submitTransaction;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HorizonServer } from '@stellar/stellar-sdk/lib/horizon/server';
|
|
2
|
+
import { IAsset } from '../types';
|
|
3
|
+
declare const swapTransaction: (rawFromAmount: string, rawToAmount: string, lastFieldChanged: "from" | "to", fromAsset: IAsset, toAsset: IAsset, path: IAsset[], sourceAddress: string, server: HorizonServer, networkPassphrase: string, isChangeTrustNeeded: boolean) => Promise<string>;
|
|
4
|
+
export default swapTransaction;
|
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Horizon, rpc } from '@stellar/stellar-sdk';
|
|
2
|
+
import { SignClient } from '@walletconnect/sign-client/dist/types/client';
|
|
3
|
+
import { Route } from './enums';
|
|
4
|
+
import { UseBalancesResult } from './hooks/useBalances';
|
|
5
|
+
import { UseTransactionsResult } from './hooks/useTransactions';
|
|
6
|
+
import { IAsset, IWallet, ISignMessage, IInternalConfig, ISendTransaction } from './types';
|
|
7
|
+
export type WaitingStatus = 'login' | 'sendTransaction' | 'signMessage';
|
|
8
|
+
export type AlertType = 'error' | 'success' | 'info' | 'warn' | 'none';
|
|
9
|
+
export interface IUser {
|
|
10
|
+
address: string;
|
|
11
|
+
walletPassphrase: string;
|
|
12
|
+
authValue: string;
|
|
13
|
+
authMethod: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IStellarConfig {
|
|
16
|
+
activeNetwork: string;
|
|
17
|
+
servers: {
|
|
18
|
+
horizon: Horizon.Server;
|
|
19
|
+
soroban: rpc.Server;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ISelectAsset {
|
|
23
|
+
field: 'send' | 'swapFrom' | 'swapTo';
|
|
24
|
+
sendAsset: IAsset;
|
|
25
|
+
swapToAsset: IAsset;
|
|
26
|
+
swapFromAsset: IAsset;
|
|
27
|
+
}
|
|
28
|
+
export interface IStoreProperties {
|
|
29
|
+
config: IInternalConfig;
|
|
30
|
+
user?: IUser;
|
|
31
|
+
authState: {
|
|
32
|
+
isReady: boolean;
|
|
33
|
+
isAuthenticated: boolean;
|
|
34
|
+
};
|
|
35
|
+
modal: {
|
|
36
|
+
route: Route;
|
|
37
|
+
isOpen: boolean;
|
|
38
|
+
dynamicTitle: string;
|
|
39
|
+
alert: {
|
|
40
|
+
type: AlertType;
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
showAllWallets: boolean;
|
|
45
|
+
waitingStatus: WaitingStatus;
|
|
46
|
+
wallets: IWallet[];
|
|
47
|
+
stellar?: IStellarConfig;
|
|
48
|
+
sendTransaction?: ISendTransaction;
|
|
49
|
+
signMessage?: ISignMessage;
|
|
50
|
+
balances: UseBalancesResult;
|
|
51
|
+
transactions: UseTransactionsResult;
|
|
52
|
+
selectAsset: ISelectAsset;
|
|
53
|
+
walletConnect?: {
|
|
54
|
+
connection: any;
|
|
55
|
+
client: SignClient;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface IStoreMethods {
|
|
59
|
+
connectEmail: (email: string) => void;
|
|
60
|
+
connectWallet: (walletName: string) => void;
|
|
61
|
+
connectWalletSuccessful: (publicKey: string, passphrase: string) => void;
|
|
62
|
+
closeModal: () => void;
|
|
63
|
+
logoutAction: () => void;
|
|
64
|
+
openModal: (route: Route) => void;
|
|
65
|
+
setConfig: (config: IInternalConfig) => void;
|
|
66
|
+
setIsReady: (isReady: boolean) => void;
|
|
67
|
+
setShowAllWallets: (showAllWallets: boolean) => void;
|
|
68
|
+
setRoute: (route: Route) => void;
|
|
69
|
+
setSendTransaction: (sendTransaction: ISendTransaction, route?: Route) => void;
|
|
70
|
+
setSignMessage: (messageDetails: ISignMessage, route?: Route) => void;
|
|
71
|
+
setStellar: (stellar: IStellarConfig) => void;
|
|
72
|
+
setWallets: (wallets: IWallet[]) => void;
|
|
73
|
+
setAlert: (alert: AlertType, message: string) => void;
|
|
74
|
+
setDynamicTitle: (title: string) => void;
|
|
75
|
+
setBalances: (balances: UseBalancesResult) => void;
|
|
76
|
+
setSelectAsset: (selectAsset: ISelectAsset) => void;
|
|
77
|
+
setTransactions: (transactions: UseTransactionsResult) => void;
|
|
78
|
+
setWalletConnectClient: (client: SignClient, connection: any) => void;
|
|
79
|
+
}
|
|
80
|
+
export interface IStore extends IStoreProperties, IStoreMethods {
|
|
81
|
+
}
|
|
82
|
+
export declare const store: import("zustand").StoreApi<IStore>;
|
|
83
|
+
export declare const getState: () => IStore, setState: {
|
|
84
|
+
(partial: IStore | Partial<IStore> | ((state: IStore) => IStore | Partial<IStore>), replace?: false): void;
|
|
85
|
+
(state: IStore | ((state: IStore) => IStore), replace: true): void;
|
|
86
|
+
}, subscribe: (listener: (state: IStore, prevState: IStore) => void) => () => void, getInitialState: () => IStore;
|
|
87
|
+
export declare const useAppStore: <T>(selector: (state: IStore) => T) => T;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Horizon } from '@stellar/stellar-sdk';
|
|
2
|
+
import { SupportedWallet } from './enums';
|
|
3
|
+
export type LanguageKey = 'en' | 'es';
|
|
4
|
+
export type ITransports = Record<string, IServers>;
|
|
5
|
+
export type IExplorer = 'steexp' | 'stellarchain' | 'stellarexpert' | 'lumenscan';
|
|
6
|
+
export type ILoginMethods = Array<'wallet' | 'sms' | 'email' | 'passkey'>;
|
|
7
|
+
export type IWalletNames = Array<'rabet' | 'albedo' | 'freighter' | 'xbull' | 'lobstr' | 'hana' | 'hot' | 'klever'>;
|
|
8
|
+
interface IServers {
|
|
9
|
+
horizon: string;
|
|
10
|
+
soroban: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IWalletConnectMetaData {
|
|
13
|
+
icons: [];
|
|
14
|
+
url: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IConfig {
|
|
19
|
+
appId?: string;
|
|
20
|
+
appName: string;
|
|
21
|
+
networks: string[];
|
|
22
|
+
defaultNetwork?: string;
|
|
23
|
+
appearance?: Partial<IAppearance>;
|
|
24
|
+
lang?: LanguageKey;
|
|
25
|
+
explorer?: IExplorer;
|
|
26
|
+
showWalletUIs?: boolean;
|
|
27
|
+
loginMethods?: ILoginMethods;
|
|
28
|
+
transports?: ITransports;
|
|
29
|
+
excludeWallets?: IWalletNames;
|
|
30
|
+
walletConnect?: IWalletConnectMetaData;
|
|
31
|
+
promptOnWrongNetwork?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface IInternalConfig extends IConfig {
|
|
34
|
+
explorer: IExplorer;
|
|
35
|
+
appearance: IAppearance;
|
|
36
|
+
showWalletUIs: boolean;
|
|
37
|
+
defaultNetwork: string;
|
|
38
|
+
lang: LanguageKey;
|
|
39
|
+
excludeWallets: IWalletNames;
|
|
40
|
+
promptOnWrongNetwork: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface IAppearance {
|
|
43
|
+
background: string;
|
|
44
|
+
fieldBackground: string;
|
|
45
|
+
accentColor: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
font: string;
|
|
48
|
+
outlineWidth: string;
|
|
49
|
+
borderRadius: string;
|
|
50
|
+
borderColor: string;
|
|
51
|
+
borderWidth: string;
|
|
52
|
+
logo: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IWallet {
|
|
55
|
+
name: SupportedWallet;
|
|
56
|
+
website: string;
|
|
57
|
+
connect: () => Promise<string>;
|
|
58
|
+
disconnect: () => Promise<void>;
|
|
59
|
+
getNetwork: () => Promise<{
|
|
60
|
+
network: string;
|
|
61
|
+
passphrase: string;
|
|
62
|
+
}>;
|
|
63
|
+
isAvailable: () => Promise<boolean>;
|
|
64
|
+
signAuthEntry: (authorizationEntry: string, options: {
|
|
65
|
+
network: string;
|
|
66
|
+
address: string;
|
|
67
|
+
}) => Promise<string>;
|
|
68
|
+
signMessage: (message: string, options: {
|
|
69
|
+
address: string;
|
|
70
|
+
network: string;
|
|
71
|
+
}) => Promise<string>;
|
|
72
|
+
signTransaction: (xdr: string, options: {
|
|
73
|
+
network: string;
|
|
74
|
+
address: string;
|
|
75
|
+
}) => Promise<string>;
|
|
76
|
+
}
|
|
77
|
+
export interface IAccountData {
|
|
78
|
+
id: string;
|
|
79
|
+
sequence: string;
|
|
80
|
+
xlmBalance: string;
|
|
81
|
+
subentry_count: number;
|
|
82
|
+
balances: Horizon.HorizonApi.BalanceLine[];
|
|
83
|
+
thresholds: Horizon.HorizonApi.AccountThresholds;
|
|
84
|
+
transactions?: Horizon.ServerApi.TransactionRecord[];
|
|
85
|
+
}
|
|
86
|
+
export interface IAsset {
|
|
87
|
+
logo?: string | React.ReactNode;
|
|
88
|
+
valueInCurrency?: string;
|
|
89
|
+
assetBalance: string;
|
|
90
|
+
assetCode: string;
|
|
91
|
+
assetType: string;
|
|
92
|
+
assetIssuer: string;
|
|
93
|
+
}
|
|
94
|
+
export interface ISignOptions {
|
|
95
|
+
network: string;
|
|
96
|
+
}
|
|
97
|
+
export type SendTransactionResult = Horizon.HorizonApi.SubmitTransactionResponse;
|
|
98
|
+
export interface ISendTransaction {
|
|
99
|
+
xdr: string;
|
|
100
|
+
wallet: IWallet;
|
|
101
|
+
options: ISignOptions;
|
|
102
|
+
result?: SendTransactionResult;
|
|
103
|
+
rejecter: (reason: any) => void;
|
|
104
|
+
resolver: (value: SendTransactionResult) => void;
|
|
105
|
+
}
|
|
106
|
+
export interface ISignMessage {
|
|
107
|
+
wallet: IWallet;
|
|
108
|
+
message: string;
|
|
109
|
+
options: ISignOptions;
|
|
110
|
+
result?: string;
|
|
111
|
+
rejecter: (reason: any) => void;
|
|
112
|
+
resolver: (value: string) => void;
|
|
113
|
+
}
|
|
114
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const COLOR_THEMES: {
|
|
3
|
+
purple: {
|
|
4
|
+
id: string;
|
|
5
|
+
colors: number[][];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
type AnimatedGradientType = {
|
|
9
|
+
theme: keyof typeof COLOR_THEMES;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
animationSpeed?: number;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
size?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
};
|
|
17
|
+
declare const AnimatedGradient: ({ theme, className, children, animationSpeed, onClick, style, size, }: AnimatedGradientType) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default AnimatedGradient;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Asset, Horizon } from '@stellar/stellar-sdk';
|
|
2
|
+
import translations from '../constants/locales';
|
|
3
|
+
import { Route, SupportedWallet } from '../enums';
|
|
4
|
+
import { IAsset, IWallet, IExplorer, LanguageKey, ITransports, IWalletNames } from '../types';
|
|
5
|
+
import { INetworkTransports } from '../constants/networkDetails';
|
|
6
|
+
export declare const iAssetToAsset: (asset: IAsset) => Asset;
|
|
7
|
+
export declare const addXLMToBalances: (balances: IAsset[]) => {
|
|
8
|
+
assetIssuer: string;
|
|
9
|
+
assetCode: string;
|
|
10
|
+
assetBalance: string;
|
|
11
|
+
assetType: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const isChangeTrustNeeded: (to: string, asset: IAsset, balances: Horizon.HorizonApi.BalanceLine[]) => boolean;
|
|
14
|
+
export declare const balanceToAsset: (balance: Horizon.HorizonApi.BalanceLine) => IAsset;
|
|
15
|
+
export declare const capitalizeFirstLetter: (str: string) => string;
|
|
16
|
+
export declare const copyText: (text: string) => Promise<void>;
|
|
17
|
+
export declare const decideBackRouteFromSelectAsset: (field: "send" | "swapTo" | "swapFrom") => Route.SEND | Route.SWAP;
|
|
18
|
+
export declare const formatDate: (isoString: string) => string;
|
|
19
|
+
export declare const getActiveNetworkTitle: (activeNetwork: string) => string;
|
|
20
|
+
export declare const getContrastColor: (bgColor: string) => string;
|
|
21
|
+
export declare const getExplorerUrl: (networkPassphrase: string, explorerProvider: IExplorer, endpoint: "accountUrl" | "transactionUrl" | "operationUrl" | "ledgerUrl", value: string) => string | null;
|
|
22
|
+
export declare const getMappedWallets: (walletNames: IWalletNames) => Promise<IWallet[]>;
|
|
23
|
+
export declare const getRecentConnectionMethod: () => SupportedWallet[];
|
|
24
|
+
export declare const getNetworkByPassphrase: (passphrase: string) => string;
|
|
25
|
+
export declare const getNetworkRpc: (network: string, transports: ITransports) => INetworkTransports;
|
|
26
|
+
export declare const getSortedCheckedWallets: (wallets: IWallet[]) => IWallet[];
|
|
27
|
+
export declare const getWalletNetwork: (wallet: IWallet) => Promise<string>;
|
|
28
|
+
export declare const handleLoadWallets: (walletNames: IWalletNames) => Promise<IWallet[]>;
|
|
29
|
+
export declare const hexToRgba: (hex: string, alpha: number) => string;
|
|
30
|
+
export declare const humanizeAmount: (amount: number | string, big?: boolean) => string;
|
|
31
|
+
export declare const initializeRabetMobile: () => void;
|
|
32
|
+
export declare const isBackgroundDark: (bgColor: string) => boolean;
|
|
33
|
+
export declare const loadWallets: (excludedWallets: IWalletNames) => Promise<IWallet[]>;
|
|
34
|
+
export declare const setRecentConnectionMethod: (walletName: SupportedWallet) => void;
|
|
35
|
+
export declare const shortenAddress: (address: string, numChars?: number) => string;
|
|
36
|
+
export declare const timeout: (waiter: number) => Promise<unknown>;
|
|
37
|
+
export declare const toTitleFormat: (str: string) => string;
|
|
38
|
+
export declare const translate: (key: keyof typeof translations, lang: LanguageKey, vars?: Record<string, string>) => string;
|
|
39
|
+
export declare const getNetworkNamesFromPassphrase: (userNetworks: string[]) => string[];
|
|
40
|
+
export declare const validateNetworkOptions: (networks: string[], defaultNetwork: string | undefined, transports: ITransports | undefined) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import SignClient from '@walletconnect/sign-client';
|
|
2
|
+
import { IWalletConnectMetaData } from '../types';
|
|
3
|
+
export declare const initializeWalletConnect: (wc: IWalletConnectMetaData, appName: string) => Promise<void>;
|
|
4
|
+
export declare const generateWalletConnectSession: (client: SignClient) => Promise<{
|
|
5
|
+
uri?: string;
|
|
6
|
+
approval: () => Promise<import("@walletconnect/types").SessionTypes.Struct>;
|
|
7
|
+
}>;
|