@bluxcc/core 0.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.
Files changed (98) hide show
  1. package/dist/assets/Icons.d.ts +98 -0
  2. package/dist/assets/Logos.d.ts +24 -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 +17 -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 +18 -0
  12. package/dist/components/Modal/Backdrop/index.d.ts +7 -0
  13. package/dist/components/Modal/index.d.ts +11 -0
  14. package/dist/components/Provider.d.ts +1 -0
  15. package/dist/components/QRCode/index.d.ts +10 -0
  16. package/dist/components/TabBox/index.d.ts +12 -0
  17. package/dist/components/Transaction/History/index.d.ts +12 -0
  18. package/dist/components/Transaction/Summary/index.d.ts +10 -0
  19. package/dist/constants/consts.d.ts +2 -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 +9 -0
  24. package/dist/constants/themes.d.ts +3 -0
  25. package/dist/enums.d.ts +33 -0
  26. package/dist/exports/blux.d.ts +15 -0
  27. package/dist/exports/core/callBuilder.d.ts +59 -0
  28. package/dist/exports/core/getAccount.d.ts +8 -0
  29. package/dist/exports/core/getAccounts.d.ts +15 -0
  30. package/dist/exports/core/getAssets.d.ts +13 -0
  31. package/dist/exports/core/getBalances.d.ts +8 -0
  32. package/dist/exports/core/getClaimableBalances.d.ts +14 -0
  33. package/dist/exports/core/getEffects.d.ts +16 -0
  34. package/dist/exports/core/getLedgers.d.ts +12 -0
  35. package/dist/exports/core/getLiquidityPools.d.ts +13 -0
  36. package/dist/exports/core/getNetwork.d.ts +2 -0
  37. package/dist/exports/core/getOffers.d.ts +16 -0
  38. package/dist/exports/core/getOperations.d.ts +17 -0
  39. package/dist/exports/core/getOrderbook.d.ts +9 -0
  40. package/dist/exports/core/getPayments.d.ts +12 -0
  41. package/dist/exports/core/getStrictReceivePaths.d.ts +9 -0
  42. package/dist/exports/core/getStrictSendPaths.d.ts +9 -0
  43. package/dist/exports/core/getTradeAggregation.d.ts +5 -0
  44. package/dist/exports/core/getTrades.d.ts +16 -0
  45. package/dist/exports/core/getTransactions.d.ts +16 -0
  46. package/dist/exports/core/index.d.ts +131 -0
  47. package/dist/exports/core/networks.d.ts +9 -0
  48. package/dist/exports/core/switchNetwork.d.ts +2 -0
  49. package/dist/exports/index.d.ts +144 -0
  50. package/dist/exports/utils.d.ts +14 -0
  51. package/dist/hooks/useBalances.d.ts +8 -0
  52. package/dist/hooks/useDynamicHeight.d.ts +4 -0
  53. package/dist/hooks/useIsMobile.d.ts +1 -0
  54. package/dist/hooks/useLang.d.ts +2 -0
  55. package/dist/hooks/useModalAnimation.d.ts +7 -0
  56. package/dist/hooks/useTransactions.d.ts +11 -0
  57. package/dist/hooks/useUpdateAccount.d.ts +2 -0
  58. package/dist/index.cjs.js +6 -0
  59. package/dist/index.d.ts +149 -0
  60. package/dist/index.esm.js +6 -0
  61. package/dist/index.iife.js +6 -0
  62. package/dist/pages/About/index.d.ts +2 -0
  63. package/dist/pages/Onboarding/OTP/index.d.ts +2 -0
  64. package/dist/pages/Onboarding/index.d.ts +2 -0
  65. package/dist/pages/Profile/Activity/index.d.ts +2 -0
  66. package/dist/pages/Profile/Balances/AddToken/index.d.ts +2 -0
  67. package/dist/pages/Profile/Balances/BalanceDetails/index.d.ts +2 -0
  68. package/dist/pages/Profile/Balances/index.d.ts +2 -0
  69. package/dist/pages/Profile/Receive/index.d.ts +2 -0
  70. package/dist/pages/Profile/SelectAsset/index.d.ts +9 -0
  71. package/dist/pages/Profile/Send/SendForm.d.ts +2 -0
  72. package/dist/pages/Profile/Send/index.d.ts +2 -0
  73. package/dist/pages/Profile/Swap/AssetBox/index.d.ts +4 -0
  74. package/dist/pages/Profile/Swap/index.d.ts +2 -0
  75. package/dist/pages/Profile/index.d.ts +2 -0
  76. package/dist/pages/SendTransaction/index.d.ts +2 -0
  77. package/dist/pages/SignMessage/index.d.ts +2 -0
  78. package/dist/pages/Successful/index.d.ts +2 -0
  79. package/dist/pages/Waiting/index.d.ts +2 -0
  80. package/dist/pages/WrongNetwork/index.d.ts +2 -0
  81. package/dist/stellar/getTransactionDetails.d.ts +8 -0
  82. package/dist/stellar/handleTransactionSigning.d.ts +5 -0
  83. package/dist/stellar/paymentTransaction.d.ts +4 -0
  84. package/dist/stellar/signTransaction.d.ts +3 -0
  85. package/dist/stellar/submitTransaction.d.ts +7 -0
  86. package/dist/store.d.ts +72 -0
  87. package/dist/types.d.ts +109 -0
  88. package/dist/utils/animatedGradient.d.ts +18 -0
  89. package/dist/utils/helpers.d.ts +31 -0
  90. package/dist/utils/walletLogos.d.ts +2 -0
  91. package/dist/wallets/albedo.d.ts +2 -0
  92. package/dist/wallets/freighter.d.ts +2 -0
  93. package/dist/wallets/hana.d.ts +2 -0
  94. package/dist/wallets/index.d.ts +3 -0
  95. package/dist/wallets/lobstr.d.ts +2 -0
  96. package/dist/wallets/rabet.d.ts +2 -0
  97. package/dist/wallets/xbull.d.ts +2 -0
  98. package/package.json +61 -0
@@ -0,0 +1,98 @@
1
+ export declare const AboutIcon: ({ fill }: {
2
+ fill?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const ArrowRight: ({ fill }: {
5
+ fill?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ArrowLeft: ({ fill }: {
8
+ fill?: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Close: ({ fill }: {
11
+ fill?: string;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Loading: ({ fill }: {
14
+ fill?: string;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Search: ({ fill }: {
17
+ fill?: string;
18
+ }) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const GreenCheck: ({ fill }: {
20
+ fill?: string;
21
+ }) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const LogOut: ({ fill }: {
23
+ fill?: string;
24
+ }) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const Copy: ({ fill }: {
26
+ fill?: string;
27
+ }) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const LargeCopy: ({ fill }: {
29
+ fill?: string;
30
+ }) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const History: ({ fill }: {
32
+ fill?: string;
33
+ }) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const Send: ({ fill }: {
35
+ fill?: string;
36
+ }) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const ArrowDropUp: ({ fill }: {
38
+ fill?: string;
39
+ }) => import("react/jsx-runtime").JSX.Element;
40
+ export declare const ArrowDropDown: ({ fill }: {
41
+ fill?: string;
42
+ }) => import("react/jsx-runtime").JSX.Element;
43
+ export declare const RedAlert: () => import("react/jsx-runtime").JSX.Element;
44
+ export declare const Upstream: () => import("react/jsx-runtime").JSX.Element;
45
+ export declare const MultiOperation: () => import("react/jsx-runtime").JSX.Element;
46
+ export declare const Downstream: () => import("react/jsx-runtime").JSX.Element;
47
+ export declare const Globe: () => import("react/jsx-runtime").JSX.Element;
48
+ export declare const SmallEmailIcon: ({ fill }: {
49
+ fill?: string;
50
+ }) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const EmailIcon: ({ fill }: {
52
+ fill?: string;
53
+ }) => import("react/jsx-runtime").JSX.Element;
54
+ export declare const RedExclamation: () => import("react/jsx-runtime").JSX.Element;
55
+ export declare const WrongNetworkIcon: () => import("react/jsx-runtime").JSX.Element;
56
+ export declare const SwapIcon: ({ fill }: {
57
+ fill?: string;
58
+ }) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const ReceiveIcon: ({ fill }: {
60
+ fill?: string;
61
+ }) => import("react/jsx-runtime").JSX.Element;
62
+ export declare const BalancesIcon: ({ fill }: {
63
+ fill?: string;
64
+ }) => import("react/jsx-runtime").JSX.Element;
65
+ export declare const NFTsIcon: ({ fill }: {
66
+ fill?: string;
67
+ }) => import("react/jsx-runtime").JSX.Element;
68
+ export declare const AssetsIcon: ({ fill }: {
69
+ fill?: string;
70
+ }) => import("react/jsx-runtime").JSX.Element;
71
+ export declare const TokenIcon: ({ fill }: {
72
+ fill?: string;
73
+ }) => import("react/jsx-runtime").JSX.Element;
74
+ export declare const PlusIcon: ({ fill }: {
75
+ fill?: string;
76
+ }) => import("react/jsx-runtime").JSX.Element;
77
+ export declare const OpenEye: ({ fill }: {
78
+ fill?: string;
79
+ }) => import("react/jsx-runtime").JSX.Element;
80
+ export declare const CloseEye: ({ fill }: {
81
+ fill?: string;
82
+ }) => import("react/jsx-runtime").JSX.Element;
83
+ export declare const WarnIcon: () => import("react/jsx-runtime").JSX.Element;
84
+ export declare const ErrorIcon: () => import("react/jsx-runtime").JSX.Element;
85
+ export declare const InfoIcon: () => import("react/jsx-runtime").JSX.Element;
86
+ export declare const SuccessIcon: () => import("react/jsx-runtime").JSX.Element;
87
+ export declare const KeyIcon: ({ fill }: {
88
+ fill?: string;
89
+ }) => import("react/jsx-runtime").JSX.Element;
90
+ export declare const ChipIcon: ({ fill }: {
91
+ fill?: string;
92
+ }) => import("react/jsx-runtime").JSX.Element;
93
+ export declare const ShieldIcon: ({ fill }: {
94
+ fill?: string;
95
+ }) => import("react/jsx-runtime").JSX.Element;
96
+ export declare const WalletIcon: ({ fill }: {
97
+ fill?: string;
98
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ export declare const AlbedoLogo: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HanaLogo: ({ fill }: {
3
+ fill?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const HotLogo: () => import("react/jsx-runtime").JSX.Element;
6
+ export declare const RabetLogo: ({ fill }: {
7
+ fill?: string;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const FreighterLogo: ({ fill }: {
10
+ fill?: string;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const XBullLogo: ({ fill }: {
13
+ fill?: string;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const LobstrLogo: ({ fill }: {
16
+ fill?: string;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const StellarLogo: ({ fill }: {
19
+ fill?: string;
20
+ }) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const StellarSmallLogo: ({ fill }: {
22
+ fill?: string;
23
+ }) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const GoogleLogo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ declare const BluxLogo: ({ fill }: {
2
+ fill?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default BluxLogo;
5
+ export declare const SmallBlux: ({ fill, background, }: {
6
+ fill?: string;
7
+ background?: string;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { AlertType } from "../../store";
3
+ interface AlertProps {
4
+ type: AlertType;
5
+ message: string;
6
+ className?: string;
7
+ }
8
+ declare const Alert: React.FC<AlertProps>;
9
+ export default Alert;
@@ -0,0 +1,6 @@
1
+ import { IAsset } from "../../types";
2
+ type AssetsProps = {
3
+ assets: IAsset[];
4
+ };
5
+ declare const Assets: ({ assets }: AssetsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Assets;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ type ButtonSize = "small" | "medium" | "large";
3
+ type ButtonVariant = "outline" | "text" | "fill" | "tonal";
4
+ type ButtonState = "enabled" | "disabled" | "selected";
5
+ interface ButtonProps {
6
+ size?: ButtonSize;
7
+ variant?: ButtonVariant;
8
+ state?: ButtonState;
9
+ children: React.ReactNode;
10
+ startIcon?: React.ReactNode;
11
+ endIcon?: React.ReactNode;
12
+ onClick?: () => void;
13
+ style?: React.CSSProperties;
14
+ className?: string;
15
+ }
16
+ declare const Button: ({ size, variant, state, children, startIcon, endIcon, onClick, style, className, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default Button;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ type CardItemProps = {
3
+ variant?: "social" | "default" | "input";
4
+ size?: "small" | "medium";
5
+ startIcon: React.ReactNode;
6
+ endArrow?: boolean;
7
+ isRecent?: boolean;
8
+ label?: string;
9
+ onClick?: () => void;
10
+ onChange?: (value: string) => void;
11
+ onEnter?: (value: string) => void;
12
+ onSubmit?: (value: string) => void;
13
+ inputType?: "text" | "password" | "number" | "email" | string;
14
+ };
15
+ declare const CardItem: ({ variant, size, startIcon, endArrow, isRecent, label, onClick, onChange, onEnter, onSubmit, inputType, }: CardItemProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default CardItem;
@@ -0,0 +1,2 @@
1
+ declare const Divider: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Divider;
@@ -0,0 +1,10 @@
1
+ interface HeaderProps {
2
+ icon?: "info" | "back";
3
+ onInfo?: () => void;
4
+ onBack?: () => void;
5
+ title: string;
6
+ closeButton?: boolean;
7
+ onClose: () => void;
8
+ }
9
+ declare const Header: ({ icon, onInfo, onBack, title, closeButton, onClose, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default Header;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface OTPInputProps {
3
+ otp: string[];
4
+ setOtp: (otp: string[]) => void;
5
+ error?: boolean;
6
+ }
7
+ declare const OTPInput: React.FC<OTPInputProps>;
8
+ export default OTPInput;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ type InputFieldProps = {
3
+ label?: string;
4
+ placeholder?: string;
5
+ error?: string;
6
+ type?: "text" | "password" | "number";
7
+ iconRight?: React.ReactNode;
8
+ iconLeft?: React.ReactNode;
9
+ button?: string | React.ReactNode;
10
+ onButtonClick?: () => void;
11
+ value?: string;
12
+ autoFocus?: boolean;
13
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ customLabel?: React.ReactNode;
15
+ className?: string;
16
+ };
17
+ declare const InputField: ({ label, autoFocus, type, placeholder, error, iconRight, iconLeft, button, onButtonClick, customLabel, value, className, onChange, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default InputField;
@@ -0,0 +1,7 @@
1
+ interface BackdropProps {
2
+ isClosing: boolean;
3
+ isSticky?: boolean;
4
+ onClose: () => void;
5
+ }
6
+ declare const ModalBackdrop: ({ isClosing, onClose, isSticky, }: BackdropProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ModalBackdrop;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { IAppearance } from "../../types";
3
+ interface ModalProps {
4
+ isOpen: boolean;
5
+ isSticky?: boolean;
6
+ onClose?: () => void;
7
+ children: React.ReactNode;
8
+ appearance: IAppearance;
9
+ }
10
+ declare const Modal: ({ isOpen, onClose, children, isSticky, appearance, }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export default Modal;
@@ -0,0 +1 @@
1
+ export declare const Provider: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ interface QRCodeCanvasProps {
2
+ value: string;
3
+ title?: string;
4
+ size?: number;
5
+ bgColor?: string;
6
+ fgColor?: string;
7
+ level?: "L" | "M" | "Q" | "H";
8
+ }
9
+ declare const QRCode: ({ value, title, size, bgColor, fgColor, level, ...rest }: QRCodeCanvasProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default QRCode;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ type Tab = {
3
+ label: string;
4
+ content: React.ReactNode;
5
+ activeIcon: React.JSX.Element;
6
+ inActiveIcon: React.JSX.Element;
7
+ };
8
+ type TabsProps = {
9
+ tabs: Tab[];
10
+ };
11
+ declare const TabBox: ({ tabs }: TabsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default TabBox;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export type TxDetail = {
3
+ hash: string;
4
+ date: string;
5
+ title: string;
6
+ description: string;
7
+ };
8
+ interface TransactionProps {
9
+ tx: TxDetail;
10
+ }
11
+ declare const _default: React.MemoExoticComponent<({ tx }: TransactionProps) => import("react/jsx-runtime").JSX.Element>;
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ interface SummaryProps {
2
+ operationsCount: number;
3
+ sender: string;
4
+ receiver?: string | null;
5
+ estimatedFee: string;
6
+ action: string;
7
+ network: string;
8
+ }
9
+ declare const Summary: ({ operationsCount, sender, receiver, network, estimatedFee, action, }: SummaryProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default Summary;
@@ -0,0 +1,2 @@
1
+ export declare const BLUX_EVENT_NAME = "BLUX_MODAL_OPEN";
2
+ export declare const RECENT_CONNECTION_METHODS = "__BLUX__RECENT_CONNECTION_METHODS";
@@ -0,0 +1,9 @@
1
+ export type IExplorerDetail = {
2
+ ledgerUrl: string;
3
+ accountUrl: string;
4
+ operationUrl?: string;
5
+ transactionUrl: string;
6
+ [key: string]: string | undefined;
7
+ };
8
+ declare const EXPLORERS: Record<string, IExplorerDetail>;
9
+ export default EXPLORERS;
@@ -0,0 +1,9 @@
1
+ import { LanguageKey } from "../types";
2
+ export type Translations = {
3
+ [key: string]: {
4
+ [lang in LanguageKey]: string;
5
+ };
6
+ };
7
+ export type TranslationKey = keyof typeof translations;
8
+ declare const translations: Translations;
9
+ export default translations;
@@ -0,0 +1,14 @@
1
+ import { Networks } from "@stellar/stellar-sdk";
2
+ export interface INetworkTransports {
3
+ name: string;
4
+ horizon: string;
5
+ soroban: string;
6
+ }
7
+ export declare const networks: {
8
+ mainnet: Networks;
9
+ testnet: Networks;
10
+ sandbox: Networks;
11
+ futurenet: Networks;
12
+ standalone: Networks;
13
+ };
14
+ export declare const DEFAULT_NETWORKS_TRANSPORTS: Record<string, INetworkTransports>;
@@ -0,0 +1,9 @@
1
+ import { JSX } from "react";
2
+ import { LanguageKey } from "../types";
3
+ type IRoute = {
4
+ title: string;
5
+ isSticky?: boolean;
6
+ Component: JSX.Element;
7
+ };
8
+ export declare const getModalContent: (lang: LanguageKey) => Record<string, IRoute>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { IAppearance } from "../types";
2
+ export declare const defaultLightTheme: IAppearance;
3
+ export declare const defaultDarkTheme: IAppearance;
@@ -0,0 +1,33 @@
1
+ export declare enum SupportedWallet {
2
+ Rabet = "Rabet",
3
+ Albedo = "Albedo",
4
+ Freighter = "Freighter",
5
+ Xbull = "xBull",
6
+ Lobstr = "LOBSTR",
7
+ Hana = "Hana"
8
+ }
9
+ export declare enum StellarNetwork {
10
+ PUBLIC = "Public Global Stellar Network ; September 2015",
11
+ TESTNET = "Test SDF Network ; September 2015",
12
+ FUTURENET = "Test SDF Future Network ; October 2022",
13
+ SANDBOX = "Local Sandbox Stellar Network ; September 2022",
14
+ STANDALONE = "Standalone Network ; February 2017"
15
+ }
16
+ export declare enum Route {
17
+ ONBOARDING = "ONBOARDING",// View for selecting a wallet
18
+ WRONG_NETWORK = "WRONG_NETWORK",// View for selecting a wallet
19
+ WAITING = "WAITING",// View for connection process
20
+ SUCCESSFUL = "SUCCESSFUL",// View for connection success process
21
+ PROFILE = "PROFILE",// User profile view
22
+ SEND_TRANSACTION = "SEND_TRANSACTION",// User sign transaction view
23
+ SEND = "SEND",// User sign transaction view
24
+ ACTIVITY = "ACTIVITY",// User sign transaction view
25
+ OTP = "OTP",// User Login with Phone ot email
26
+ RECEIVE = "RECEIVE",// View for receive page
27
+ BALANCES = "BALANCES",// View for balances
28
+ SWAP = "SWAP",// View for swap assets
29
+ BALANCE_DETAILS = "BALANCE_DETAILS",// View for asset details
30
+ ABOUT = "ABOUT",// View for what is blux
31
+ ADD_TOKEN = "ADD_TOKEN",// View for adding new token
32
+ SIGN_MESSAGE = "SIGN_MESSAGE"
33
+ }
@@ -0,0 +1,15 @@
1
+ export declare const login: () => Promise<void>;
2
+ export declare const sendTransaction: (xdr: string, options: {
3
+ network: string;
4
+ }) => Promise<unknown>;
5
+ export declare const blux: {
6
+ login: () => Promise<void>;
7
+ logout: () => void;
8
+ profile: () => void;
9
+ sendTransaction: (xdr: string, options: {
10
+ network: string;
11
+ }) => Promise<unknown>;
12
+ readonly isReady: boolean;
13
+ readonly isAuthenticated: boolean;
14
+ readonly user: import("../store").IUser | undefined;
15
+ };
@@ -0,0 +1,59 @@
1
+ import { Asset } from "@stellar/stellar-sdk";
2
+ import { AccountCallBuilder } from "@stellar/stellar-sdk/lib/horizon/account_call_builder";
3
+ import { ClaimableBalanceCallBuilder } from "@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder";
4
+ import { LedgerCallBuilder } from "@stellar/stellar-sdk/lib/horizon/ledger_call_builder";
5
+ import { PathCallBuilder } from "@stellar/stellar-sdk/lib/horizon/path_call_builder";
6
+ import { LiquidityPoolCallBuilder } from "@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder";
7
+ import { OperationCallBuilder } from "@stellar/stellar-sdk/lib/horizon/operation_call_builder";
8
+ import { OrderbookCallBuilder } from "@stellar/stellar-sdk/lib/horizon/orderbook_call_builder";
9
+ import { OfferCallBuilder } from "@stellar/stellar-sdk/lib/horizon/offer_call_builder";
10
+ import { TransactionCallBuilder } from "@stellar/stellar-sdk/lib/horizon/transaction_call_builder";
11
+ import { TradesCallBuilder } from "@stellar/stellar-sdk/lib/horizon/trades_call_builder";
12
+ import { TradeAggregationCallBuilder } from "@stellar/stellar-sdk/lib/horizon/trade_aggregation_call_builder";
13
+ import { EffectCallBuilder } from "@stellar/stellar-sdk/lib/horizon/effect_call_builder";
14
+ import { PaymentCallBuilder } from "@stellar/stellar-sdk/lib/horizon/payment_call_builder";
15
+ import { AssetsCallBuilder } from "@stellar/stellar-sdk/lib/horizon/assets_call_builder";
16
+ import { CallBuilderOptions } from "../utils";
17
+ type CallBuilderMap = {
18
+ accounts: [[], AccountCallBuilder];
19
+ claimableBalances: [[], ClaimableBalanceCallBuilder];
20
+ ledgers: [[], LedgerCallBuilder];
21
+ transactions: [[], TransactionCallBuilder];
22
+ offers: [[], OfferCallBuilder];
23
+ orderbook: [[selling: Asset, buying: Asset], OrderbookCallBuilder];
24
+ trades: [[], TradesCallBuilder];
25
+ operations: [[], OperationCallBuilder];
26
+ liquidityPools: [[], LiquidityPoolCallBuilder];
27
+ strictReceivePaths: [
28
+ [
29
+ source: string | Asset[],
30
+ destinationAsset: Asset,
31
+ destinationAmount: string
32
+ ],
33
+ PathCallBuilder
34
+ ];
35
+ strictSendPaths: [
36
+ [
37
+ sourceAsset: Asset,
38
+ sourceAmount: string,
39
+ destination: string | Asset[]
40
+ ],
41
+ PathCallBuilder
42
+ ];
43
+ payments: [[], PaymentCallBuilder];
44
+ effects: [[], EffectCallBuilder];
45
+ assets: [[], AssetsCallBuilder];
46
+ tradeAggregation: [
47
+ [
48
+ base: Asset,
49
+ counter: Asset,
50
+ start_time: number,
51
+ end_time: number,
52
+ resolution: number,
53
+ offset: number
54
+ ],
55
+ TradeAggregationCallBuilder
56
+ ];
57
+ };
58
+ export declare const callBuilder: <C extends keyof CallBuilderMap>(callName: C, args: CallBuilderMap[C][0], params: CallBuilderOptions) => CallBuilderMap[C][1];
59
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ type GetAccountOptions = {
3
+ address?: string;
4
+ network?: string;
5
+ };
6
+ type GetAccountResult = Horizon.AccountResponse | null;
7
+ declare const getAccount: (options: GetAccountOptions) => Promise<GetAccountResult>;
8
+ export default getAccount;
@@ -0,0 +1,15 @@
1
+ import { Asset, Horizon } from "@stellar/stellar-sdk";
2
+ import { AccountCallBuilder } from "@stellar/stellar-sdk/lib/horizon/account_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetAccountsOptions = CallBuilderOptions & {
5
+ forSigner?: string;
6
+ forAsset?: Asset;
7
+ sponsor?: string;
8
+ forLiquidityPool?: string;
9
+ };
10
+ type GetAccountsResult = {
11
+ builder: AccountCallBuilder;
12
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AccountRecord>;
13
+ };
14
+ declare const getAccounts: (options: GetAccountsOptions) => Promise<GetAccountsResult>;
15
+ export default getAccounts;
@@ -0,0 +1,13 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ import { AssetsCallBuilder } from "@stellar/stellar-sdk/lib/horizon/assets_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetAssetsOptions = CallBuilderOptions & {
5
+ forCode?: string;
6
+ forIssuer?: string;
7
+ };
8
+ type GetAssetsResult = {
9
+ builder: AssetsCallBuilder;
10
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AssetRecord>;
11
+ };
12
+ declare const getAssets: (options: GetAssetsOptions) => Promise<GetAssetsResult>;
13
+ export default getAssets;
@@ -0,0 +1,8 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ type GetBalanceOptions = {
3
+ address?: string;
4
+ network?: string;
5
+ includeZeroBalances?: boolean;
6
+ };
7
+ declare const getBalances: (options: GetBalanceOptions) => Promise<Horizon.HorizonApi.BalanceLine[]>;
8
+ export default getBalances;
@@ -0,0 +1,14 @@
1
+ import { Asset, Horizon } from "@stellar/stellar-sdk";
2
+ import { ClaimableBalanceCallBuilder } from "@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetClaimableBalancesOptions = CallBuilderOptions & {
5
+ asset: Asset;
6
+ sponsor?: string;
7
+ claimant: string;
8
+ };
9
+ type GetClaimableBalancesResult = {
10
+ builder: ClaimableBalanceCallBuilder;
11
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.ClaimableBalanceRecord>;
12
+ };
13
+ declare const getClaimableBalances: (options: GetClaimableBalancesOptions) => Promise<GetClaimableBalancesResult>;
14
+ export default getClaimableBalances;
@@ -0,0 +1,16 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ import { EffectCallBuilder } from "@stellar/stellar-sdk/lib/horizon/effect_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetEffectsOptions = CallBuilderOptions & {
5
+ forAccount?: string;
6
+ forLedger?: string | number;
7
+ forTransaction?: string;
8
+ forOperation?: string;
9
+ forLiquidityPool?: string;
10
+ };
11
+ type GetEffectsResult = {
12
+ builder: EffectCallBuilder;
13
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.EffectRecord>;
14
+ };
15
+ declare const getEffects: (options: GetEffectsOptions) => Promise<GetEffectsResult>;
16
+ export default getEffects;
@@ -0,0 +1,12 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ import { LedgerCallBuilder } from "@stellar/stellar-sdk/lib/horizon/ledger_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetLedgersOptions = CallBuilderOptions & {
5
+ ledger?: number | string;
6
+ };
7
+ type GetLedgersResult = {
8
+ builder: LedgerCallBuilder;
9
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LedgerRecord>;
10
+ };
11
+ declare const getLedgers: (options: GetLedgersOptions) => Promise<GetLedgersResult>;
12
+ export default getLedgers;
@@ -0,0 +1,13 @@
1
+ import { Asset, Horizon } from "@stellar/stellar-sdk";
2
+ import { LiquidityPoolCallBuilder } from "@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetLiquidityPoolsOptions = CallBuilderOptions & {
5
+ forAssets?: Array<Asset>;
6
+ forAccount?: string;
7
+ };
8
+ type GetLiquidityPoolsResult = {
9
+ builder: LiquidityPoolCallBuilder;
10
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LiquidityPoolRecord>;
11
+ };
12
+ declare const getLiquidityPools: (options: GetLiquidityPoolsOptions) => Promise<GetLiquidityPoolsResult>;
13
+ export default getLiquidityPools;
@@ -0,0 +1,2 @@
1
+ declare const getNetwork: () => string;
2
+ export default getNetwork;
@@ -0,0 +1,16 @@
1
+ import { Asset, Horizon } from "@stellar/stellar-sdk";
2
+ import { OfferCallBuilder } from "@stellar/stellar-sdk/lib/horizon/offer_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetOffersOptions = CallBuilderOptions & {
5
+ forAccount?: string;
6
+ buying?: Asset;
7
+ selling?: Asset;
8
+ sponsor?: string;
9
+ seller?: string;
10
+ };
11
+ type GetOffersResult = {
12
+ builder: OfferCallBuilder;
13
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OfferRecord>;
14
+ };
15
+ declare const getOffers: (options: GetOffersOptions) => Promise<GetOffersResult>;
16
+ export default getOffers;
@@ -0,0 +1,17 @@
1
+ import { Horizon } from "@stellar/stellar-sdk";
2
+ import { OperationCallBuilder } from "@stellar/stellar-sdk/lib/horizon/operation_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetOperationsOptions = CallBuilderOptions & {
5
+ forAccount?: string;
6
+ forClaimableBalance?: string;
7
+ forLedger?: string | number;
8
+ forTransaction?: string;
9
+ forLiquidityPool?: string;
10
+ includeFailed?: boolean;
11
+ };
12
+ type GetOperationsResult = {
13
+ builder: OperationCallBuilder;
14
+ response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OperationRecord>;
15
+ };
16
+ declare const getOperations: (options: GetOperationsOptions) => Promise<GetOperationsResult>;
17
+ export default getOperations;
@@ -0,0 +1,9 @@
1
+ import { Asset, Horizon } from "@stellar/stellar-sdk";
2
+ import { OrderbookCallBuilder } from "@stellar/stellar-sdk/lib/horizon/orderbook_call_builder";
3
+ import { CallBuilderOptions } from "../utils";
4
+ type GetOrderbookResult = {
5
+ builder: OrderbookCallBuilder;
6
+ response: Horizon.ServerApi.OrderbookRecord;
7
+ };
8
+ declare const getOrderbook: (args: [selling: Asset, buying: Asset], options: CallBuilderOptions) => Promise<GetOrderbookResult>;
9
+ export default getOrderbook;