@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.
- package/dist/assets/Icons.d.ts +98 -0
- package/dist/assets/Logos.d.ts +24 -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 +17 -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 +18 -0
- package/dist/components/Modal/Backdrop/index.d.ts +7 -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 +10 -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/consts.d.ts +2 -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 +9 -0
- package/dist/constants/themes.d.ts +3 -0
- package/dist/enums.d.ts +33 -0
- package/dist/exports/blux.d.ts +15 -0
- package/dist/exports/core/callBuilder.d.ts +59 -0
- package/dist/exports/core/getAccount.d.ts +8 -0
- package/dist/exports/core/getAccounts.d.ts +15 -0
- package/dist/exports/core/getAssets.d.ts +13 -0
- package/dist/exports/core/getBalances.d.ts +8 -0
- package/dist/exports/core/getClaimableBalances.d.ts +14 -0
- package/dist/exports/core/getEffects.d.ts +16 -0
- package/dist/exports/core/getLedgers.d.ts +12 -0
- package/dist/exports/core/getLiquidityPools.d.ts +13 -0
- package/dist/exports/core/getNetwork.d.ts +2 -0
- package/dist/exports/core/getOffers.d.ts +16 -0
- package/dist/exports/core/getOperations.d.ts +17 -0
- package/dist/exports/core/getOrderbook.d.ts +9 -0
- package/dist/exports/core/getPayments.d.ts +12 -0
- package/dist/exports/core/getStrictReceivePaths.d.ts +9 -0
- package/dist/exports/core/getStrictSendPaths.d.ts +9 -0
- package/dist/exports/core/getTradeAggregation.d.ts +5 -0
- package/dist/exports/core/getTrades.d.ts +16 -0
- package/dist/exports/core/getTransactions.d.ts +16 -0
- package/dist/exports/core/index.d.ts +131 -0
- package/dist/exports/core/networks.d.ts +9 -0
- package/dist/exports/core/switchNetwork.d.ts +2 -0
- package/dist/exports/index.d.ts +144 -0
- package/dist/exports/utils.d.ts +14 -0
- package/dist/hooks/useBalances.d.ts +8 -0
- package/dist/hooks/useDynamicHeight.d.ts +4 -0
- package/dist/hooks/useIsMobile.d.ts +1 -0
- package/dist/hooks/useLang.d.ts +2 -0
- package/dist/hooks/useModalAnimation.d.ts +7 -0
- package/dist/hooks/useTransactions.d.ts +11 -0
- package/dist/hooks/useUpdateAccount.d.ts +2 -0
- package/dist/index.cjs.js +6 -0
- package/dist/index.d.ts +149 -0
- package/dist/index.esm.js +6 -0
- package/dist/index.iife.js +6 -0
- package/dist/pages/About/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 +9 -0
- package/dist/pages/Profile/Send/SendForm.d.ts +2 -0
- package/dist/pages/Profile/Send/index.d.ts +2 -0
- package/dist/pages/Profile/Swap/AssetBox/index.d.ts +4 -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/WrongNetwork/index.d.ts +2 -0
- package/dist/stellar/getTransactionDetails.d.ts +8 -0
- package/dist/stellar/handleTransactionSigning.d.ts +5 -0
- package/dist/stellar/paymentTransaction.d.ts +4 -0
- package/dist/stellar/signTransaction.d.ts +3 -0
- package/dist/stellar/submitTransaction.d.ts +7 -0
- package/dist/store.d.ts +72 -0
- package/dist/types.d.ts +109 -0
- package/dist/utils/animatedGradient.d.ts +18 -0
- package/dist/utils/helpers.d.ts +31 -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/index.d.ts +3 -0
- package/dist/wallets/lobstr.d.ts +2 -0
- package/dist/wallets/rabet.d.ts +2 -0
- package/dist/wallets/xbull.d.ts +2 -0
- package/package.json +61 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CallBuilderOptions } from "../utils";
|
|
2
|
+
type GetPaymentsOptions = CallBuilderOptions & {
|
|
3
|
+
forAccount?: string;
|
|
4
|
+
forLedger?: string | number;
|
|
5
|
+
forTransaction?: string;
|
|
6
|
+
includeFailed?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const getPayments: (options: GetPaymentsOptions) => Promise<{
|
|
9
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
|
|
10
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.CreateAccountOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountMergeOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentStrictSendOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.InvokeHostFunctionOperationRecord>;
|
|
11
|
+
}>;
|
|
12
|
+
export default getPayments;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Asset, Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { PathCallBuilder } from "@stellar/stellar-sdk/lib/horizon/path_call_builder";
|
|
3
|
+
import { CallBuilderOptions } from "../utils";
|
|
4
|
+
type GetPaymentPathResult = {
|
|
5
|
+
builder: PathCallBuilder;
|
|
6
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
|
+
};
|
|
8
|
+
declare const getStrictReceivePaths: (args: [source: string | Asset[], destinationAsset: Asset, destinationAmount: string], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
9
|
+
export default getStrictReceivePaths;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Asset, Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { PathCallBuilder } from "@stellar/stellar-sdk/lib/horizon/path_call_builder";
|
|
3
|
+
import { CallBuilderOptions } from "../utils";
|
|
4
|
+
type GetPaymentPathResult = {
|
|
5
|
+
builder: PathCallBuilder;
|
|
6
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
|
+
};
|
|
8
|
+
declare const getStrictSendPaths: (args: [sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
9
|
+
export default getStrictSendPaths;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Asset } from "@stellar/stellar-sdk";
|
|
2
|
+
import { CallBuilderOptions } from "../utils";
|
|
3
|
+
type GetTradeAggregationResult = any;
|
|
4
|
+
declare const getTradeAggregation: (args: [base: Asset, counter: Asset, start_time: number, end_time: number, resolution: number, offset: number], options: CallBuilderOptions) => Promise<GetTradeAggregationResult>;
|
|
5
|
+
export default getTradeAggregation;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Asset, Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { TradesCallBuilder } from "@stellar/stellar-sdk/lib/horizon/trades_call_builder";
|
|
3
|
+
import { CallBuilderOptions } from "../utils";
|
|
4
|
+
type GetTradesOptions = CallBuilderOptions & {
|
|
5
|
+
forAssetPair?: [base: Asset, counter: Asset];
|
|
6
|
+
forOffer?: string;
|
|
7
|
+
forType?: Horizon.ServerApi.TradeType;
|
|
8
|
+
forAccount?: string;
|
|
9
|
+
forLiquidityPool?: string;
|
|
10
|
+
};
|
|
11
|
+
type GetTradesResult = {
|
|
12
|
+
builder: TradesCallBuilder;
|
|
13
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TradeRecord>;
|
|
14
|
+
};
|
|
15
|
+
declare const getTrades: (options: GetTradesOptions) => Promise<GetTradesResult>;
|
|
16
|
+
export default getTrades;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
import { TransactionCallBuilder } from "@stellar/stellar-sdk/lib/horizon/transaction_call_builder";
|
|
3
|
+
import { CallBuilderOptions } from "../utils";
|
|
4
|
+
type GetTransactionsOptions = CallBuilderOptions & {
|
|
5
|
+
forAccount?: string;
|
|
6
|
+
forClaimableBalance?: string;
|
|
7
|
+
forLedger?: string | number;
|
|
8
|
+
forLiquidityPool?: string;
|
|
9
|
+
includeFailed?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type GetTransactionsResult = {
|
|
12
|
+
builder: TransactionCallBuilder;
|
|
13
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TransactionRecord>;
|
|
14
|
+
};
|
|
15
|
+
declare const getTransactions: (options: GetTransactionsOptions) => Promise<GetTransactionsResult>;
|
|
16
|
+
export default getTransactions;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
declare const core: {
|
|
2
|
+
getAccount: (options: {
|
|
3
|
+
address?: string;
|
|
4
|
+
network?: string;
|
|
5
|
+
}) => Promise<import("@stellar/stellar-sdk/lib/horizon").AccountResponse | null>;
|
|
6
|
+
getAccounts: (options: import("../utils").CallBuilderOptions & {
|
|
7
|
+
forSigner?: string;
|
|
8
|
+
forAsset?: import("@stellar/stellar-base").Asset;
|
|
9
|
+
sponsor?: string;
|
|
10
|
+
forLiquidityPool?: string;
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/account_call_builder").AccountCallBuilder;
|
|
13
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountRecord>;
|
|
14
|
+
}>;
|
|
15
|
+
getAssets: (options: import("../utils").CallBuilderOptions & {
|
|
16
|
+
forCode?: string;
|
|
17
|
+
forIssuer?: string;
|
|
18
|
+
}) => Promise<{
|
|
19
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/assets_call_builder").AssetsCallBuilder;
|
|
20
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AssetRecord>;
|
|
21
|
+
}>;
|
|
22
|
+
getBalances: (options: {
|
|
23
|
+
address?: string;
|
|
24
|
+
network?: string;
|
|
25
|
+
includeZeroBalances?: boolean;
|
|
26
|
+
}) => Promise<import("@stellar/stellar-sdk/lib/horizon").HorizonApi.BalanceLine[]>;
|
|
27
|
+
getClaimableBalances: (options: import("../utils").CallBuilderOptions & {
|
|
28
|
+
asset: import("@stellar/stellar-base").Asset;
|
|
29
|
+
sponsor?: string;
|
|
30
|
+
claimant: string;
|
|
31
|
+
}) => Promise<{
|
|
32
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder").ClaimableBalanceCallBuilder;
|
|
33
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.ClaimableBalanceRecord>;
|
|
34
|
+
}>;
|
|
35
|
+
getEffects: (options: import("../utils").CallBuilderOptions & {
|
|
36
|
+
forAccount?: string;
|
|
37
|
+
forLedger?: string | number;
|
|
38
|
+
forTransaction?: string;
|
|
39
|
+
forOperation?: string;
|
|
40
|
+
forLiquidityPool?: string;
|
|
41
|
+
}) => Promise<{
|
|
42
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/effect_call_builder").EffectCallBuilder;
|
|
43
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.EffectRecord>;
|
|
44
|
+
}>;
|
|
45
|
+
getLedgers: (options: import("../utils").CallBuilderOptions & {
|
|
46
|
+
ledger?: number | string;
|
|
47
|
+
}) => Promise<{
|
|
48
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/ledger_call_builder").LedgerCallBuilder;
|
|
49
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LedgerRecord>;
|
|
50
|
+
}>;
|
|
51
|
+
getLiquidityPools: (options: import("../utils").CallBuilderOptions & {
|
|
52
|
+
forAssets?: Array<import("@stellar/stellar-base").Asset>;
|
|
53
|
+
forAccount?: string;
|
|
54
|
+
}) => Promise<{
|
|
55
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder").LiquidityPoolCallBuilder;
|
|
56
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LiquidityPoolRecord>;
|
|
57
|
+
}>;
|
|
58
|
+
getNetwork: () => string;
|
|
59
|
+
getOffers: (options: import("../utils").CallBuilderOptions & {
|
|
60
|
+
forAccount?: string;
|
|
61
|
+
buying?: import("@stellar/stellar-base").Asset;
|
|
62
|
+
selling?: import("@stellar/stellar-base").Asset;
|
|
63
|
+
sponsor?: string;
|
|
64
|
+
seller?: string;
|
|
65
|
+
}) => Promise<{
|
|
66
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/offer_call_builder").OfferCallBuilder;
|
|
67
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OfferRecord>;
|
|
68
|
+
}>;
|
|
69
|
+
getOperations: (options: import("../utils").CallBuilderOptions & {
|
|
70
|
+
forAccount?: string;
|
|
71
|
+
forClaimableBalance?: string;
|
|
72
|
+
forLedger?: string | number;
|
|
73
|
+
forTransaction?: string;
|
|
74
|
+
forLiquidityPool?: string;
|
|
75
|
+
includeFailed?: boolean;
|
|
76
|
+
}) => Promise<{
|
|
77
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/operation_call_builder").OperationCallBuilder;
|
|
78
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OperationRecord>;
|
|
79
|
+
}>;
|
|
80
|
+
getOrderbook: (args: [selling: import("@stellar/stellar-base").Asset, buying: import("@stellar/stellar-base").Asset], options: import("../utils").CallBuilderOptions) => Promise<{
|
|
81
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/orderbook_call_builder").OrderbookCallBuilder;
|
|
82
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.OrderbookRecord;
|
|
83
|
+
}>;
|
|
84
|
+
getPayments: (options: import("../utils").CallBuilderOptions & {
|
|
85
|
+
forAccount?: string;
|
|
86
|
+
forLedger?: string | number;
|
|
87
|
+
forTransaction?: string;
|
|
88
|
+
includeFailed?: boolean;
|
|
89
|
+
}) => Promise<{
|
|
90
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
|
|
91
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.CreateAccountOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountMergeOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentStrictSendOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.InvokeHostFunctionOperationRecord>;
|
|
92
|
+
}>;
|
|
93
|
+
getStrictReceivePaths: (args: [source: string | import("@stellar/stellar-base").Asset[], destinationAsset: import("@stellar/stellar-base").Asset, destinationAmount: string], options: import("../utils").CallBuilderOptions) => Promise<{
|
|
94
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
|
|
95
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
|
|
96
|
+
}>;
|
|
97
|
+
getStrictSendPaths: (args: [sourceAsset: import("@stellar/stellar-base").Asset, sourceAmount: string, destination: string | import("@stellar/stellar-base").Asset[]], options: import("../utils").CallBuilderOptions) => Promise<{
|
|
98
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
|
|
99
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
|
|
100
|
+
}>;
|
|
101
|
+
getTradeAggregation: (args: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset, start_time: number, end_time: number, resolution: number, offset: number], options: import("../utils").CallBuilderOptions) => Promise<any>;
|
|
102
|
+
getTrades: (options: import("../utils").CallBuilderOptions & {
|
|
103
|
+
forAssetPair?: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset];
|
|
104
|
+
forOffer?: string;
|
|
105
|
+
forType?: import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeType;
|
|
106
|
+
forAccount?: string;
|
|
107
|
+
forLiquidityPool?: string;
|
|
108
|
+
}) => Promise<{
|
|
109
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/trades_call_builder").TradesCallBuilder;
|
|
110
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeRecord>;
|
|
111
|
+
}>;
|
|
112
|
+
getTransactions: (options: import("../utils").CallBuilderOptions & {
|
|
113
|
+
forAccount?: string;
|
|
114
|
+
forClaimableBalance?: string;
|
|
115
|
+
forLedger?: string | number;
|
|
116
|
+
forLiquidityPool?: string;
|
|
117
|
+
includeFailed?: boolean;
|
|
118
|
+
}) => Promise<{
|
|
119
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/transaction_call_builder").TransactionCallBuilder;
|
|
120
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TransactionRecord>;
|
|
121
|
+
}>;
|
|
122
|
+
networks: {
|
|
123
|
+
mainnet: import("@stellar/stellar-base").Networks;
|
|
124
|
+
testnet: import("@stellar/stellar-base").Networks;
|
|
125
|
+
sandbox: import("@stellar/stellar-base").Networks;
|
|
126
|
+
futurenet: import("@stellar/stellar-base").Networks;
|
|
127
|
+
standalone: import("@stellar/stellar-base").Networks;
|
|
128
|
+
};
|
|
129
|
+
switchNetwork: (newNetwork: string) => void;
|
|
130
|
+
};
|
|
131
|
+
export default core;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
core: {
|
|
3
|
+
getAccount: (options: {
|
|
4
|
+
address?: string;
|
|
5
|
+
network?: string;
|
|
6
|
+
}) => Promise<import("@stellar/stellar-sdk/lib/horizon").AccountResponse | null>;
|
|
7
|
+
getAccounts: (options: import("./utils").CallBuilderOptions & {
|
|
8
|
+
forSigner?: string;
|
|
9
|
+
forAsset?: import("@stellar/stellar-base").Asset;
|
|
10
|
+
sponsor?: string;
|
|
11
|
+
forLiquidityPool?: string;
|
|
12
|
+
}) => Promise<{
|
|
13
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/account_call_builder").AccountCallBuilder;
|
|
14
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountRecord>;
|
|
15
|
+
}>;
|
|
16
|
+
getAssets: (options: import("./utils").CallBuilderOptions & {
|
|
17
|
+
forCode?: string;
|
|
18
|
+
forIssuer?: string;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/assets_call_builder").AssetsCallBuilder;
|
|
21
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AssetRecord>;
|
|
22
|
+
}>;
|
|
23
|
+
getBalances: (options: {
|
|
24
|
+
address?: string;
|
|
25
|
+
network?: string;
|
|
26
|
+
includeZeroBalances?: boolean;
|
|
27
|
+
}) => Promise<import("@stellar/stellar-sdk/lib/horizon").HorizonApi.BalanceLine[]>;
|
|
28
|
+
getClaimableBalances: (options: import("./utils").CallBuilderOptions & {
|
|
29
|
+
asset: import("@stellar/stellar-base").Asset;
|
|
30
|
+
sponsor?: string;
|
|
31
|
+
claimant: string;
|
|
32
|
+
}) => Promise<{
|
|
33
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder").ClaimableBalanceCallBuilder;
|
|
34
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.ClaimableBalanceRecord>;
|
|
35
|
+
}>;
|
|
36
|
+
getEffects: (options: import("./utils").CallBuilderOptions & {
|
|
37
|
+
forAccount?: string;
|
|
38
|
+
forLedger?: string | number;
|
|
39
|
+
forTransaction?: string;
|
|
40
|
+
forOperation?: string;
|
|
41
|
+
forLiquidityPool?: string;
|
|
42
|
+
}) => Promise<{
|
|
43
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/effect_call_builder").EffectCallBuilder;
|
|
44
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.EffectRecord>;
|
|
45
|
+
}>;
|
|
46
|
+
getLedgers: (options: import("./utils").CallBuilderOptions & {
|
|
47
|
+
ledger?: number | string;
|
|
48
|
+
}) => Promise<{
|
|
49
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/ledger_call_builder").LedgerCallBuilder;
|
|
50
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LedgerRecord>;
|
|
51
|
+
}>;
|
|
52
|
+
getLiquidityPools: (options: import("./utils").CallBuilderOptions & {
|
|
53
|
+
forAssets?: Array<import("@stellar/stellar-base").Asset>;
|
|
54
|
+
forAccount?: string;
|
|
55
|
+
}) => Promise<{
|
|
56
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder").LiquidityPoolCallBuilder;
|
|
57
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LiquidityPoolRecord>;
|
|
58
|
+
}>;
|
|
59
|
+
getNetwork: () => string;
|
|
60
|
+
getOffers: (options: import("./utils").CallBuilderOptions & {
|
|
61
|
+
forAccount?: string;
|
|
62
|
+
buying?: import("@stellar/stellar-base").Asset;
|
|
63
|
+
selling?: import("@stellar/stellar-base").Asset;
|
|
64
|
+
sponsor?: string;
|
|
65
|
+
seller?: string;
|
|
66
|
+
}) => Promise<{
|
|
67
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/offer_call_builder").OfferCallBuilder;
|
|
68
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OfferRecord>;
|
|
69
|
+
}>;
|
|
70
|
+
getOperations: (options: import("./utils").CallBuilderOptions & {
|
|
71
|
+
forAccount?: string;
|
|
72
|
+
forClaimableBalance?: string;
|
|
73
|
+
forLedger?: string | number;
|
|
74
|
+
forTransaction?: string;
|
|
75
|
+
forLiquidityPool?: string;
|
|
76
|
+
includeFailed?: boolean;
|
|
77
|
+
}) => Promise<{
|
|
78
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/operation_call_builder").OperationCallBuilder;
|
|
79
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OperationRecord>;
|
|
80
|
+
}>;
|
|
81
|
+
getOrderbook: (args: [selling: import("@stellar/stellar-base").Asset, buying: import("@stellar/stellar-base").Asset], options: import("./utils").CallBuilderOptions) => Promise<{
|
|
82
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/orderbook_call_builder").OrderbookCallBuilder;
|
|
83
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.OrderbookRecord;
|
|
84
|
+
}>;
|
|
85
|
+
getPayments: (options: import("./utils").CallBuilderOptions & {
|
|
86
|
+
forAccount?: string;
|
|
87
|
+
forLedger?: string | number;
|
|
88
|
+
forTransaction?: string;
|
|
89
|
+
includeFailed?: boolean;
|
|
90
|
+
}) => Promise<{
|
|
91
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
|
|
92
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.CreateAccountOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountMergeOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.PathPaymentStrictSendOperationRecord | import("@stellar/stellar-sdk/lib/horizon").ServerApi.InvokeHostFunctionOperationRecord>;
|
|
93
|
+
}>;
|
|
94
|
+
getStrictReceivePaths: (args: [source: string | import("@stellar/stellar-base").Asset[], destinationAsset: import("@stellar/stellar-base").Asset, destinationAmount: string], options: import("./utils").CallBuilderOptions) => Promise<{
|
|
95
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
|
|
96
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
|
|
97
|
+
}>;
|
|
98
|
+
getStrictSendPaths: (args: [sourceAsset: import("@stellar/stellar-base").Asset, sourceAmount: string, destination: string | import("@stellar/stellar-base").Asset[]], options: import("./utils").CallBuilderOptions) => Promise<{
|
|
99
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
|
|
100
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
|
|
101
|
+
}>;
|
|
102
|
+
getTradeAggregation: (args: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset, start_time: number, end_time: number, resolution: number, offset: number], options: import("./utils").CallBuilderOptions) => Promise<any>;
|
|
103
|
+
getTrades: (options: import("./utils").CallBuilderOptions & {
|
|
104
|
+
forAssetPair?: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset];
|
|
105
|
+
forOffer?: string;
|
|
106
|
+
forType?: import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeType;
|
|
107
|
+
forAccount?: string;
|
|
108
|
+
forLiquidityPool?: string;
|
|
109
|
+
}) => Promise<{
|
|
110
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/trades_call_builder").TradesCallBuilder;
|
|
111
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeRecord>;
|
|
112
|
+
}>;
|
|
113
|
+
getTransactions: (options: import("./utils").CallBuilderOptions & {
|
|
114
|
+
forAccount?: string;
|
|
115
|
+
forClaimableBalance?: string;
|
|
116
|
+
forLedger?: string | number;
|
|
117
|
+
forLiquidityPool?: string;
|
|
118
|
+
includeFailed?: boolean;
|
|
119
|
+
}) => Promise<{
|
|
120
|
+
builder: import("@stellar/stellar-sdk/lib/horizon/transaction_call_builder").TransactionCallBuilder;
|
|
121
|
+
response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TransactionRecord>;
|
|
122
|
+
}>;
|
|
123
|
+
networks: {
|
|
124
|
+
mainnet: import("@stellar/stellar-base").Networks;
|
|
125
|
+
testnet: import("@stellar/stellar-base").Networks;
|
|
126
|
+
sandbox: import("@stellar/stellar-base").Networks;
|
|
127
|
+
futurenet: import("@stellar/stellar-base").Networks;
|
|
128
|
+
standalone: import("@stellar/stellar-base").Networks;
|
|
129
|
+
};
|
|
130
|
+
switchNetwork: (newNetwork: string) => void;
|
|
131
|
+
};
|
|
132
|
+
blux: {
|
|
133
|
+
login: () => Promise<void>;
|
|
134
|
+
logout: () => void;
|
|
135
|
+
profile: () => void;
|
|
136
|
+
sendTransaction: (xdr: string, options: {
|
|
137
|
+
network: string;
|
|
138
|
+
}) => Promise<unknown>;
|
|
139
|
+
readonly isReady: boolean;
|
|
140
|
+
readonly isAuthenticated: boolean;
|
|
141
|
+
readonly user: import("../store").IUser | undefined;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Horizon, rpc } from "@stellar/stellar-sdk";
|
|
2
|
+
export type CallBuilderOptions = {
|
|
3
|
+
cursor?: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
network?: string;
|
|
6
|
+
order?: "asc" | "desc";
|
|
7
|
+
};
|
|
8
|
+
export declare const checkConfigCreated: () => boolean;
|
|
9
|
+
export declare const getAddress: (address?: string) => string;
|
|
10
|
+
export declare const getNetwork: (network?: string) => {
|
|
11
|
+
horizon: Horizon.Server;
|
|
12
|
+
soroban: rpc.Server;
|
|
13
|
+
networkPassphrase: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: (breakpoint?: number) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Horizon } from "@stellar/stellar-sdk";
|
|
2
|
+
interface TransactionRecordWithOperations extends Omit<Horizon.ServerApi.TransactionRecord, "operations"> {
|
|
3
|
+
operations: Horizon.ServerApi.OperationRecord[];
|
|
4
|
+
}
|
|
5
|
+
export type UseTransactionsResult = {
|
|
6
|
+
loading: boolean;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
transactions: TransactionRecordWithOperations[];
|
|
9
|
+
};
|
|
10
|
+
declare const useTransactions: () => UseTransactionsResult;
|
|
11
|
+
export default useTransactions;
|