@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,16 @@
|
|
|
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
|
+
export type GetOperationsOptions = CallBuilderOptions & {
|
|
5
|
+
forAccount?: string;
|
|
6
|
+
forClaimableBalance?: string;
|
|
7
|
+
forLedger?: string | number;
|
|
8
|
+
forTransaction?: string;
|
|
9
|
+
forLiquidityPool?: string;
|
|
10
|
+
includeFailed?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type GetOperationsResult = {
|
|
13
|
+
builder: OperationCallBuilder;
|
|
14
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OperationRecord>;
|
|
15
|
+
};
|
|
16
|
+
export declare const getOperations: (options: GetOperationsOptions) => Promise<GetOperationsResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export type GetOrderbookResult = {
|
|
5
|
+
builder: OrderbookCallBuilder;
|
|
6
|
+
response: Horizon.ServerApi.OrderbookRecord;
|
|
7
|
+
};
|
|
8
|
+
export declare const getOrderbook: (args: [selling: Asset, buying: Asset], options: CallBuilderOptions) => Promise<GetOrderbookResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CallBuilderOptions } from '../utils';
|
|
2
|
+
export type GetPaymentsOptions = CallBuilderOptions & {
|
|
3
|
+
forAccount?: string;
|
|
4
|
+
forLedger?: string | number;
|
|
5
|
+
forTransaction?: string;
|
|
6
|
+
includeFailed?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export 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
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export type GetPaymentPathResult = {
|
|
5
|
+
builder: PathCallBuilder;
|
|
6
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
|
+
};
|
|
8
|
+
export declare const getStrictReceivePaths: (args: [source: string | Asset[], destinationAsset: Asset, destinationAmount: string], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export type GetPaymentPathResult = {
|
|
5
|
+
builder: PathCallBuilder;
|
|
6
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
|
+
};
|
|
8
|
+
export declare const getStrictSendPaths: (args: [sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Asset } from '@stellar/stellar-sdk';
|
|
2
|
+
import { CallBuilderOptions } from '../utils';
|
|
3
|
+
export type GetTradeAggregationResult = any;
|
|
4
|
+
export declare const getTradeAggregation: (args: [base: Asset, counter: Asset, start_time: number, end_time: number, resolution: number, offset: number], options: CallBuilderOptions) => Promise<GetTradeAggregationResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export 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
|
+
export type GetTradesResult = {
|
|
12
|
+
builder: TradesCallBuilder;
|
|
13
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TradeRecord>;
|
|
14
|
+
};
|
|
15
|
+
export declare const getTrades: (options: GetTradesOptions) => Promise<GetTradesResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export type GetTransactionsOptions = CallBuilderOptions & {
|
|
5
|
+
forAccount?: string;
|
|
6
|
+
forClaimableBalance?: string;
|
|
7
|
+
forLedger?: string | number;
|
|
8
|
+
forLiquidityPool?: string;
|
|
9
|
+
includeFailed?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type GetTransactionsResult = {
|
|
12
|
+
builder: TransactionCallBuilder;
|
|
13
|
+
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TransactionRecord>;
|
|
14
|
+
};
|
|
15
|
+
export declare const getTransactions: (options: GetTransactionsOptions) => Promise<GetTransactionsResult>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { getAccount } from './getAccount';
|
|
2
|
+
export { getAccounts } from './getAccounts';
|
|
3
|
+
export { getAssets } from './getAssets';
|
|
4
|
+
export { getBalances } from './getBalances';
|
|
5
|
+
export { getClaimableBalances } from './getClaimableBalances';
|
|
6
|
+
export { getEffects } from './getEffects';
|
|
7
|
+
export { getLedgers } from './getLedgers';
|
|
8
|
+
export { getLiquidityPools } from './getLiquidityPools';
|
|
9
|
+
export { getNetwork } from './getNetwork';
|
|
10
|
+
export { getOffers } from './getOffers';
|
|
11
|
+
export { getOperations } from './getOperations';
|
|
12
|
+
export { getOrderbook } from './getOrderbook';
|
|
13
|
+
export { getPayments } from './getPayments';
|
|
14
|
+
export { getStrictReceivePaths } from './getStrictReceivePaths';
|
|
15
|
+
export { getStrictSendPaths } from './getStrictSendPaths';
|
|
16
|
+
export { getTradeAggregation } from './getTradeAggregation';
|
|
17
|
+
export { getTrades } from './getTrades';
|
|
18
|
+
export { getTransactions } from './getTransactions';
|
|
19
|
+
export { networks } from './networks';
|
|
20
|
+
export { switchNetwork } from './switchNetwork';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const switchNetwork: (newNetwork: string) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IInternalConfig } from '../types';
|
|
2
|
+
import { IStellarConfig, IUser, store } from '../store';
|
|
3
|
+
export interface IExportedStore {
|
|
4
|
+
config: IInternalConfig;
|
|
5
|
+
user?: IUser;
|
|
6
|
+
authState: {
|
|
7
|
+
isReady: boolean;
|
|
8
|
+
isAuthenticated: boolean;
|
|
9
|
+
};
|
|
10
|
+
stellar?: IStellarConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare const exportedStore: import("zustand").StoreApi<IExportedStore>;
|
|
13
|
+
export declare const syncExportedStore: (mainStore: typeof store) => () => void;
|
|
14
|
+
export declare const useExportedStore: <T>(selector: (state: IExportedStore) => T) => T;
|
|
15
|
+
export declare const getState: () => IExportedStore, subscribe: (listener: (state: IExportedStore, prevState: IExportedStore) => void) => () => void, getInitialState: () => IExportedStore;
|
|
@@ -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 @@
|
|
|
1
|
+
export declare function useLockBodyScroll(lock: boolean): void;
|
|
@@ -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;
|