@bluxcc/core 0.1.7 → 0.1.8
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/components/Header/index.d.ts +1 -1
- package/dist/constants/routes.d.ts +2 -4
- package/dist/exports/core/getAccount.d.ts +1 -2
- package/dist/exports/core/getAccounts.d.ts +1 -2
- package/dist/exports/core/getAssets.d.ts +1 -2
- package/dist/exports/core/getBalances.d.ts +1 -2
- package/dist/exports/core/getClaimableBalances.d.ts +1 -2
- package/dist/exports/core/getEffects.d.ts +1 -2
- package/dist/exports/core/getLedgers.d.ts +1 -2
- package/dist/exports/core/getLiquidityPools.d.ts +1 -2
- package/dist/exports/core/getNetwork.d.ts +1 -2
- package/dist/exports/core/getOffers.d.ts +1 -2
- package/dist/exports/core/getOperations.d.ts +1 -2
- package/dist/exports/core/getOrderbook.d.ts +1 -2
- package/dist/exports/core/getPayments.d.ts +1 -2
- package/dist/exports/core/getStrictReceivePaths.d.ts +1 -2
- package/dist/exports/core/getStrictSendPaths.d.ts +1 -2
- package/dist/exports/core/getTradeAggregation.d.ts +1 -2
- package/dist/exports/core/getTrades.d.ts +1 -2
- package/dist/exports/core/getTransactions.d.ts +1 -2
- package/dist/exports/core/index.d.ts +20 -32
- package/dist/exports/core/networks.d.ts +2 -3
- package/dist/exports/core/switchNetwork.d.ts +1 -2
- package/dist/exports/exportedStore.d.ts +15 -0
- package/dist/exports/index.d.ts +3 -48
- package/dist/index.cjs.js +11 -11
- package/dist/index.d.ts +2 -47
- package/dist/index.esm.js +11 -11
- package/dist/index.iife.js +13 -13
- package/dist/store.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { LanguageKey } from '../types';
|
|
3
2
|
type IRoute = {
|
|
4
|
-
title
|
|
5
|
-
isSticky?: boolean;
|
|
3
|
+
title?: string;
|
|
6
4
|
Component: JSX.Element;
|
|
7
5
|
};
|
|
8
|
-
export declare const getModalContent: (
|
|
6
|
+
export declare const getModalContent: () => Record<string, IRoute>;
|
|
9
7
|
export {};
|
|
@@ -4,5 +4,4 @@ export type GetAccountOptions = {
|
|
|
4
4
|
network?: string;
|
|
5
5
|
};
|
|
6
6
|
export type GetAccountResult = Horizon.AccountResponse | null;
|
|
7
|
-
declare const getAccount: (options: GetAccountOptions) => Promise<GetAccountResult>;
|
|
8
|
-
export default getAccount;
|
|
7
|
+
export declare const getAccount: (options: GetAccountOptions) => Promise<GetAccountResult>;
|
|
@@ -11,5 +11,4 @@ export type GetAccountsResult = {
|
|
|
11
11
|
builder: AccountCallBuilder;
|
|
12
12
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AccountRecord>;
|
|
13
13
|
};
|
|
14
|
-
declare const getAccounts: (options: GetAccountsOptions) => Promise<GetAccountsResult>;
|
|
15
|
-
export default getAccounts;
|
|
14
|
+
export declare const getAccounts: (options: GetAccountsOptions) => Promise<GetAccountsResult>;
|
|
@@ -9,5 +9,4 @@ export type GetAssetsResult = {
|
|
|
9
9
|
builder: AssetsCallBuilder;
|
|
10
10
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AssetRecord>;
|
|
11
11
|
};
|
|
12
|
-
declare const getAssets: (options: GetAssetsOptions) => Promise<GetAssetsResult>;
|
|
13
|
-
export default getAssets;
|
|
12
|
+
export declare const getAssets: (options: GetAssetsOptions) => Promise<GetAssetsResult>;
|
|
@@ -5,5 +5,4 @@ export type GetBalancesOptions = {
|
|
|
5
5
|
includeZeroBalances?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export type GetBalancesResult = Horizon.HorizonApi.BalanceLine[];
|
|
8
|
-
declare const getBalances: (options: GetBalancesOptions) => Promise<GetBalancesResult>;
|
|
9
|
-
export default getBalances;
|
|
8
|
+
export declare const getBalances: (options: GetBalancesOptions) => Promise<GetBalancesResult>;
|
|
@@ -10,5 +10,4 @@ export type GetClaimableBalancesResult = {
|
|
|
10
10
|
builder: ClaimableBalanceCallBuilder;
|
|
11
11
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.ClaimableBalanceRecord>;
|
|
12
12
|
};
|
|
13
|
-
declare const getClaimableBalances: (options: GetClaimableBalancesOptions) => Promise<GetClaimableBalancesResult>;
|
|
14
|
-
export default getClaimableBalances;
|
|
13
|
+
export declare const getClaimableBalances: (options: GetClaimableBalancesOptions) => Promise<GetClaimableBalancesResult>;
|
|
@@ -12,5 +12,4 @@ export type GetEffectsResult = {
|
|
|
12
12
|
builder: EffectCallBuilder;
|
|
13
13
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.EffectRecord>;
|
|
14
14
|
};
|
|
15
|
-
declare const getEffects: (options: GetEffectsOptions) => Promise<GetEffectsResult>;
|
|
16
|
-
export default getEffects;
|
|
15
|
+
export declare const getEffects: (options: GetEffectsOptions) => Promise<GetEffectsResult>;
|
|
@@ -8,5 +8,4 @@ export type GetLedgersResult = {
|
|
|
8
8
|
builder: LedgerCallBuilder;
|
|
9
9
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LedgerRecord>;
|
|
10
10
|
};
|
|
11
|
-
declare const getLedgers: (options: GetLedgersOptions) => Promise<GetLedgersResult>;
|
|
12
|
-
export default getLedgers;
|
|
11
|
+
export declare const getLedgers: (options: GetLedgersOptions) => Promise<GetLedgersResult>;
|
|
@@ -9,5 +9,4 @@ export type GetLiquidityPoolsResult = {
|
|
|
9
9
|
builder: LiquidityPoolCallBuilder;
|
|
10
10
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LiquidityPoolRecord>;
|
|
11
11
|
};
|
|
12
|
-
declare const getLiquidityPools: (options: GetLiquidityPoolsOptions) => Promise<GetLiquidityPoolsResult>;
|
|
13
|
-
export default getLiquidityPools;
|
|
12
|
+
export declare const getLiquidityPools: (options: GetLiquidityPoolsOptions) => Promise<GetLiquidityPoolsResult>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const getNetwork: () => string;
|
|
2
|
-
export default getNetwork;
|
|
1
|
+
export declare const getNetwork: () => string;
|
|
@@ -12,5 +12,4 @@ export type GetOffersResult = {
|
|
|
12
12
|
builder: OfferCallBuilder;
|
|
13
13
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OfferRecord>;
|
|
14
14
|
};
|
|
15
|
-
declare const getOffers: (options: GetOffersOptions) => Promise<GetOffersResult>;
|
|
16
|
-
export default getOffers;
|
|
15
|
+
export declare const getOffers: (options: GetOffersOptions) => Promise<GetOffersResult>;
|
|
@@ -13,5 +13,4 @@ export type GetOperationsResult = {
|
|
|
13
13
|
builder: OperationCallBuilder;
|
|
14
14
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OperationRecord>;
|
|
15
15
|
};
|
|
16
|
-
declare const getOperations: (options: GetOperationsOptions) => Promise<GetOperationsResult>;
|
|
17
|
-
export default getOperations;
|
|
16
|
+
export declare const getOperations: (options: GetOperationsOptions) => Promise<GetOperationsResult>;
|
|
@@ -5,5 +5,4 @@ export type GetOrderbookResult = {
|
|
|
5
5
|
builder: OrderbookCallBuilder;
|
|
6
6
|
response: Horizon.ServerApi.OrderbookRecord;
|
|
7
7
|
};
|
|
8
|
-
declare const getOrderbook: (args: [selling: Asset, buying: Asset], options: CallBuilderOptions) => Promise<GetOrderbookResult>;
|
|
9
|
-
export default getOrderbook;
|
|
8
|
+
export declare const getOrderbook: (args: [selling: Asset, buying: Asset], options: CallBuilderOptions) => Promise<GetOrderbookResult>;
|
|
@@ -5,8 +5,7 @@ export type GetPaymentsOptions = CallBuilderOptions & {
|
|
|
5
5
|
forTransaction?: string;
|
|
6
6
|
includeFailed?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const getPayments: (options: GetPaymentsOptions) => Promise<{
|
|
8
|
+
export declare const getPayments: (options: GetPaymentsOptions) => Promise<{
|
|
9
9
|
builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
|
|
10
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
11
|
}>;
|
|
12
|
-
export default getPayments;
|
|
@@ -5,5 +5,4 @@ export type GetPaymentPathResult = {
|
|
|
5
5
|
builder: PathCallBuilder;
|
|
6
6
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
7
|
};
|
|
8
|
-
declare const getStrictReceivePaths: (args: [source: string | Asset[], destinationAsset: Asset, destinationAmount: string], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
9
|
-
export default getStrictReceivePaths;
|
|
8
|
+
export declare const getStrictReceivePaths: (args: [source: string | Asset[], destinationAsset: Asset, destinationAmount: string], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
@@ -5,5 +5,4 @@ export type GetPaymentPathResult = {
|
|
|
5
5
|
builder: PathCallBuilder;
|
|
6
6
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
|
|
7
7
|
};
|
|
8
|
-
declare const getStrictSendPaths: (args: [sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
9
|
-
export default getStrictSendPaths;
|
|
8
|
+
export declare const getStrictSendPaths: (args: [sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]], options: CallBuilderOptions) => Promise<GetPaymentPathResult>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Asset } from '@stellar/stellar-sdk';
|
|
2
2
|
import { CallBuilderOptions } from '../utils';
|
|
3
3
|
export 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;
|
|
4
|
+
export declare const getTradeAggregation: (args: [base: Asset, counter: Asset, start_time: number, end_time: number, resolution: number, offset: number], options: CallBuilderOptions) => Promise<GetTradeAggregationResult>;
|
|
@@ -12,5 +12,4 @@ export type GetTradesResult = {
|
|
|
12
12
|
builder: TradesCallBuilder;
|
|
13
13
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TradeRecord>;
|
|
14
14
|
};
|
|
15
|
-
declare const getTrades: (options: GetTradesOptions) => Promise<GetTradesResult>;
|
|
16
|
-
export default getTrades;
|
|
15
|
+
export declare const getTrades: (options: GetTradesOptions) => Promise<GetTradesResult>;
|
|
@@ -12,5 +12,4 @@ export type GetTransactionsResult = {
|
|
|
12
12
|
builder: TransactionCallBuilder;
|
|
13
13
|
response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TransactionRecord>;
|
|
14
14
|
};
|
|
15
|
-
declare const getTransactions: (options: GetTransactionsOptions) => Promise<GetTransactionsResult>;
|
|
16
|
-
export default getTransactions;
|
|
15
|
+
export declare const getTransactions: (options: GetTransactionsOptions) => Promise<GetTransactionsResult>;
|
|
@@ -1,32 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
getTrades: (options: import("./getTrades").GetTradesOptions) => Promise<import("./getTrades").GetTradesResult>;
|
|
22
|
-
getTransactions: (options: import("./getTransactions").GetTransactionsOptions) => Promise<import("./getTransactions").GetTransactionsResult>;
|
|
23
|
-
networks: {
|
|
24
|
-
mainnet: import("@stellar/stellar-base").Networks;
|
|
25
|
-
testnet: import("@stellar/stellar-base").Networks;
|
|
26
|
-
sandbox: import("@stellar/stellar-base").Networks;
|
|
27
|
-
futurenet: import("@stellar/stellar-base").Networks;
|
|
28
|
-
standalone: import("@stellar/stellar-base").Networks;
|
|
29
|
-
};
|
|
30
|
-
switchNetwork: (newNetwork: string) => void;
|
|
31
|
-
};
|
|
32
|
-
export default core;
|
|
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';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Networks } from
|
|
2
|
-
declare const networks: {
|
|
1
|
+
import { Networks } from '@stellar/stellar-sdk';
|
|
2
|
+
export declare const networks: {
|
|
3
3
|
mainnet: Networks;
|
|
4
4
|
testnet: Networks;
|
|
5
5
|
sandbox: Networks;
|
|
6
6
|
futurenet: Networks;
|
|
7
7
|
standalone: Networks;
|
|
8
8
|
};
|
|
9
|
-
export default networks;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const switchNetwork: (newNetwork: string) => void;
|
|
2
|
-
export default switchNetwork;
|
|
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;
|
package/dist/exports/index.d.ts
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
getAccounts: (options: import("./core/getAccounts").GetAccountsOptions) => Promise<import("./core/getAccounts").GetAccountsResult>;
|
|
5
|
-
getAssets: (options: import("./core/getAssets").GetAssetsOptions) => Promise<import("./core/getAssets").GetAssetsResult>;
|
|
6
|
-
getBalances: (options: import("./core/getBalances").GetBalancesOptions) => Promise<import("./core/getBalances").GetBalancesResult>;
|
|
7
|
-
getClaimableBalances: (options: import("./core/getClaimableBalances").GetClaimableBalancesOptions) => Promise<import("./core/getClaimableBalances").GetClaimableBalancesResult>;
|
|
8
|
-
getEffects: (options: import("./core/getEffects").GetEffectsOptions) => Promise<import("./core/getEffects").GetEffectsResult>;
|
|
9
|
-
getLedgers: (options: import("./core/getLedgers").GetLedgersOptions) => Promise<import("./core/getLedgers").GetLedgersResult>;
|
|
10
|
-
getLiquidityPools: (options: import("./core/getLiquidityPools").GetLiquidityPoolsOptions) => Promise<import("./core/getLiquidityPools").GetLiquidityPoolsResult>;
|
|
11
|
-
getNetwork: () => string;
|
|
12
|
-
getOffers: (options: import("./core/getOffers").GetOffersOptions) => Promise<import("./core/getOffers").GetOffersResult>;
|
|
13
|
-
getOperations: (options: import("./core/getOperations").GetOperationsOptions) => Promise<import("./core/getOperations").GetOperationsResult>;
|
|
14
|
-
getOrderbook: (args: [selling: import("@stellar/stellar-base").Asset, buying: import("@stellar/stellar-base").Asset], options: import("./utils").CallBuilderOptions) => Promise<import("./core/getOrderbook").GetOrderbookResult>;
|
|
15
|
-
getPayments: (options: import("./core/getPayments").GetPaymentsOptions) => Promise<{
|
|
16
|
-
builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
|
|
17
|
-
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>;
|
|
18
|
-
}>;
|
|
19
|
-
getStrictReceivePaths: (args: [source: string | import("@stellar/stellar-base").Asset[], destinationAsset: import("@stellar/stellar-base").Asset, destinationAmount: string], options: import("./utils").CallBuilderOptions) => Promise<import("./core/getStrictReceivePaths").GetPaymentPathResult>;
|
|
20
|
-
getStrictSendPaths: (args: [sourceAsset: import("@stellar/stellar-base").Asset, sourceAmount: string, destination: string | import("@stellar/stellar-base").Asset[]], options: import("./utils").CallBuilderOptions) => Promise<import("./core/getStrictSendPaths").GetPaymentPathResult>;
|
|
21
|
-
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<import("./core/getTradeAggregation").GetTradeAggregationResult>;
|
|
22
|
-
getTrades: (options: import("./core/getTrades").GetTradesOptions) => Promise<import("./core/getTrades").GetTradesResult>;
|
|
23
|
-
getTransactions: (options: import("./core/getTransactions").GetTransactionsOptions) => Promise<import("./core/getTransactions").GetTransactionsResult>;
|
|
24
|
-
networks: {
|
|
25
|
-
mainnet: import("@stellar/stellar-base").Networks;
|
|
26
|
-
testnet: import("@stellar/stellar-base").Networks;
|
|
27
|
-
sandbox: import("@stellar/stellar-base").Networks;
|
|
28
|
-
futurenet: import("@stellar/stellar-base").Networks;
|
|
29
|
-
standalone: import("@stellar/stellar-base").Networks;
|
|
30
|
-
};
|
|
31
|
-
switchNetwork: (newNetwork: string) => void;
|
|
32
|
-
};
|
|
33
|
-
blux: {
|
|
34
|
-
login: () => Promise<void>;
|
|
35
|
-
logout: () => void;
|
|
36
|
-
profile: () => void;
|
|
37
|
-
signMessage: (message: string, options?: {
|
|
38
|
-
network: string;
|
|
39
|
-
}) => Promise<unknown>;
|
|
40
|
-
sendTransaction: (xdr: string, options?: {
|
|
41
|
-
network: string;
|
|
42
|
-
}) => Promise<unknown>;
|
|
43
|
-
readonly isReady: boolean;
|
|
44
|
-
readonly isAuthenticated: boolean;
|
|
45
|
-
readonly user: import("../store").IUser | undefined;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export default _default;
|
|
1
|
+
export * from './core';
|
|
2
|
+
export { blux } from './blux';
|
|
3
|
+
export { getState, subscribe, getInitialState, useExportedStore, } from './exportedStore';
|