@bluxcc/core 0.1.9 → 0.1.11

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 (112) hide show
  1. package/dist/assets/Icons.d.ts +107 -0
  2. package/dist/assets/Logos.d.ts +30 -0
  3. package/dist/assets/bluxLogo.d.ts +8 -0
  4. package/dist/components/Alert/index.d.ts +9 -0
  5. package/dist/components/AssetsList/index.d.ts +6 -0
  6. package/dist/components/Button/index.d.ts +19 -0
  7. package/dist/components/CardItem/index.d.ts +16 -0
  8. package/dist/components/Divider/index.d.ts +2 -0
  9. package/dist/components/Header/index.d.ts +10 -0
  10. package/dist/components/Input/OTPInput.d.ts +8 -0
  11. package/dist/components/Input/index.d.ts +19 -0
  12. package/dist/components/Modal/index.d.ts +11 -0
  13. package/dist/components/Provider.d.ts +1 -0
  14. package/dist/components/QRCode/index.d.ts +11 -0
  15. package/dist/components/TabBox/index.d.ts +12 -0
  16. package/dist/components/Transaction/History/index.d.ts +12 -0
  17. package/dist/components/Transaction/Summary/index.d.ts +10 -0
  18. package/dist/constants/assets.d.ts +18 -0
  19. package/dist/constants/consts.d.ts +4 -0
  20. package/dist/constants/explorers.d.ts +9 -0
  21. package/dist/constants/locales.d.ts +9 -0
  22. package/dist/constants/networkDetails.d.ts +14 -0
  23. package/dist/constants/routes.d.ts +7 -0
  24. package/dist/constants/themes.d.ts +3 -0
  25. package/dist/enums.d.ts +39 -0
  26. package/dist/exports/blux.d.ts +21 -0
  27. package/dist/exports/core/callBuilder.d.ts +59 -0
  28. package/dist/exports/core/getAccount.d.ts +7 -0
  29. package/dist/exports/core/getAccounts.d.ts +14 -0
  30. package/dist/exports/core/getAssets.d.ts +12 -0
  31. package/dist/exports/core/getBalances.d.ts +8 -0
  32. package/dist/exports/core/getClaimableBalances.d.ts +13 -0
  33. package/dist/exports/core/getEffects.d.ts +15 -0
  34. package/dist/exports/core/getLedgers.d.ts +11 -0
  35. package/dist/exports/core/getLiquidityPools.d.ts +12 -0
  36. package/dist/exports/core/getNetwork.d.ts +1 -0
  37. package/dist/exports/core/getOffers.d.ts +15 -0
  38. package/dist/exports/core/getOperations.d.ts +16 -0
  39. package/dist/exports/core/getOrderbook.d.ts +8 -0
  40. package/dist/exports/core/getPayments.d.ts +11 -0
  41. package/dist/exports/core/getStrictReceivePaths.d.ts +8 -0
  42. package/dist/exports/core/getStrictSendPaths.d.ts +8 -0
  43. package/dist/exports/core/getTradeAggregation.d.ts +4 -0
  44. package/dist/exports/core/getTrades.d.ts +15 -0
  45. package/dist/exports/core/getTransactions.d.ts +15 -0
  46. package/dist/exports/core/index.d.ts +20 -0
  47. package/dist/exports/core/networks.d.ts +8 -0
  48. package/dist/exports/core/switchNetwork.d.ts +1 -0
  49. package/dist/exports/createConfig.d.ts +3 -0
  50. package/dist/exports/exportedStore.d.ts +15 -0
  51. package/dist/exports/index.d.ts +3 -0
  52. package/dist/exports/utils.d.ts +14 -0
  53. package/dist/hooks/useBalances.d.ts +8 -0
  54. package/dist/hooks/useCheckWalletNetwork.d.ts +3 -0
  55. package/dist/hooks/useDynamicHeight.d.ts +5 -0
  56. package/dist/hooks/useIsMobile.d.ts +1 -0
  57. package/dist/hooks/useLang.d.ts +2 -0
  58. package/dist/hooks/useLockBodyScroll.d.ts +1 -0
  59. package/dist/hooks/useModalAnimation.d.ts +5 -0
  60. package/dist/hooks/useTransactions.d.ts +11 -0
  61. package/dist/hooks/useUpdateAccount.d.ts +2 -0
  62. package/dist/index.cjs.js +35 -0
  63. package/dist/index.d.ts +2 -0
  64. package/dist/index.esm.js +35 -0
  65. package/dist/index.iife.js +43 -0
  66. package/dist/pages/About/index.d.ts +2 -0
  67. package/dist/pages/Failed/index.d.ts +2 -0
  68. package/dist/pages/Onboarding/OTP/index.d.ts +2 -0
  69. package/dist/pages/Onboarding/index.d.ts +2 -0
  70. package/dist/pages/Profile/Activity/index.d.ts +2 -0
  71. package/dist/pages/Profile/Balances/AddToken/index.d.ts +2 -0
  72. package/dist/pages/Profile/Balances/BalanceDetails/index.d.ts +2 -0
  73. package/dist/pages/Profile/Balances/index.d.ts +2 -0
  74. package/dist/pages/Profile/Receive/index.d.ts +2 -0
  75. package/dist/pages/Profile/SelectAsset/index.d.ts +2 -0
  76. package/dist/pages/Profile/Send/index.d.ts +2 -0
  77. package/dist/pages/Profile/Swap/AssetBox/index.d.ts +7 -0
  78. package/dist/pages/Profile/Swap/index.d.ts +2 -0
  79. package/dist/pages/Profile/index.d.ts +2 -0
  80. package/dist/pages/SendTransaction/index.d.ts +2 -0
  81. package/dist/pages/SignMessage/index.d.ts +2 -0
  82. package/dist/pages/Successful/index.d.ts +2 -0
  83. package/dist/pages/Waiting/index.d.ts +2 -0
  84. package/dist/pages/WalletConnect/index.d.ts +2 -0
  85. package/dist/pages/WrongNetwork/index.d.ts +2 -0
  86. package/dist/stellar/getTransactionDetails.d.ts +8 -0
  87. package/dist/stellar/handleSignMessage.d.ts +3 -0
  88. package/dist/stellar/handleTransactionSigning.d.ts +3 -0
  89. package/dist/stellar/paymentTransaction.d.ts +4 -0
  90. package/dist/stellar/processes/connectWalletProcess.d.ts +4 -0
  91. package/dist/stellar/processes/sendTransactionProcess.d.ts +3 -0
  92. package/dist/stellar/processes/signMessageProcess.d.ts +3 -0
  93. package/dist/stellar/signTransaction.d.ts +3 -0
  94. package/dist/stellar/submitTransaction.d.ts +5 -0
  95. package/dist/stellar/swapTransaction.d.ts +4 -0
  96. package/dist/store.d.ts +87 -0
  97. package/dist/types.d.ts +114 -0
  98. package/dist/utils/animatedGradient.d.ts +18 -0
  99. package/dist/utils/helpers.d.ts +40 -0
  100. package/dist/utils/initializeWalletConnect.d.ts +7 -0
  101. package/dist/utils/walletLogos.d.ts +2 -0
  102. package/dist/wallets/albedo.d.ts +2 -0
  103. package/dist/wallets/freighter.d.ts +2 -0
  104. package/dist/wallets/hana.d.ts +2 -0
  105. package/dist/wallets/hot.d.ts +2 -0
  106. package/dist/wallets/index.d.ts +3 -0
  107. package/dist/wallets/klever.d.ts +2 -0
  108. package/dist/wallets/lobstr.d.ts +2 -0
  109. package/dist/wallets/rabet.d.ts +2 -0
  110. package/dist/wallets/walletConnect.d.ts +2 -0
  111. package/dist/wallets/xbull.d.ts +2 -0
  112. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ declare const About: () => import("react/jsx-runtime").JSX.Element;
2
+ export default About;
@@ -0,0 +1,2 @@
1
+ declare const Failed: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Failed;
@@ -0,0 +1,2 @@
1
+ declare const OTP: () => import("react/jsx-runtime").JSX.Element;
2
+ export default OTP;
@@ -0,0 +1,2 @@
1
+ declare const Onboarding: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Onboarding;
@@ -0,0 +1,2 @@
1
+ declare const Activity: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Activity;
@@ -0,0 +1,2 @@
1
+ declare const AddToken: () => import("react/jsx-runtime").JSX.Element;
2
+ export default AddToken;
@@ -0,0 +1,2 @@
1
+ declare const BalanceDetails: () => import("react/jsx-runtime").JSX.Element;
2
+ export default BalanceDetails;
@@ -0,0 +1,2 @@
1
+ declare const Balances: () => "Loading" | import("react/jsx-runtime").JSX.Element | "Error, try again.";
2
+ export default Balances;
@@ -0,0 +1,2 @@
1
+ declare const Receive: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Receive;
@@ -0,0 +1,2 @@
1
+ declare const SelectAsset: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SelectAsset;
@@ -0,0 +1,2 @@
1
+ declare const SendForm: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SendForm;
@@ -0,0 +1,7 @@
1
+ import { IAsset } from '../../../../types';
2
+ type AssetBoxProps = {
3
+ asset: IAsset;
4
+ handleOpenAssets: () => void;
5
+ };
6
+ declare const AssetBox: ({ handleOpenAssets, asset }: AssetBoxProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default AssetBox;
@@ -0,0 +1,2 @@
1
+ declare const Swap: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Swap;
@@ -0,0 +1,2 @@
1
+ declare const Profile: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Profile;
@@ -0,0 +1,2 @@
1
+ declare const SendTransaction: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SendTransaction;
@@ -0,0 +1,2 @@
1
+ declare const SignMessage: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default SignMessage;
@@ -0,0 +1,2 @@
1
+ declare const Successful: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Successful;
@@ -0,0 +1,2 @@
1
+ declare const Waiting: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Waiting;
@@ -0,0 +1,2 @@
1
+ declare const WalletConnect: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default WalletConnect;
@@ -0,0 +1,2 @@
1
+ declare const WrongNetwork: () => import("react/jsx-runtime").JSX.Element;
2
+ export default WrongNetwork;
@@ -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 { IWallet } from "../types";
2
+ declare const handleSignMessage: (wallet: IWallet, message: string, address: string, network: string) => Promise<string>;
3
+ export default handleSignMessage;
@@ -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,4 @@
1
+ import { IStore } from '../../store';
2
+ import { IWallet } from '../../types';
3
+ declare const connectWalletProcess: (store: IStore, wallet: IWallet) => Promise<void>;
4
+ export default connectWalletProcess;
@@ -0,0 +1,3 @@
1
+ import { IStore } from "../../store";
2
+ declare const sendTransactionProcess: (store: IStore) => Promise<void>;
3
+ export default sendTransactionProcess;
@@ -0,0 +1,3 @@
1
+ import { IStore } from "../../store";
2
+ declare const signMessageProcess: (store: IStore) => Promise<void>;
3
+ export default signMessageProcess;
@@ -0,0 +1,3 @@
1
+ import { IWallet } from "../types";
2
+ declare const signTransaction: (wallet: IWallet, xdr: string, address: string, network: string) => Promise<string>;
3
+ export default signTransaction;
@@ -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;
@@ -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;
@@ -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
+ }>;
@@ -0,0 +1,2 @@
1
+ declare const handleLogos: (walletName: string, isDark: boolean) => import("react/jsx-runtime").JSX.Element | null;
2
+ export default handleLogos;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const albedoConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const freighterConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const hanaConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const hotConfig: IWallet;
@@ -0,0 +1,3 @@
1
+ import { IWallet } from '../types';
2
+ import { SupportedWallet } from '../enums';
3
+ export declare const walletsConfig: Record<SupportedWallet, IWallet>;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const kleverConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const lobstrConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const rabetConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const walletConnectConfig: IWallet;
@@ -0,0 +1,2 @@
1
+ import { IWallet } from '../types';
2
+ export declare const xBullConfig: IWallet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluxcc/core",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "homepage": "https://blux.cc",
5
5
  "description": "Blux is a wallet infra for the Stellar network",
6
6
  "type": "module",