@bluxcc/core 0.1.0 → 0.1.2

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/index.d.ts CHANGED
@@ -1,149 +1,146 @@
1
- import { Horizon } from "@stellar/stellar-sdk";
2
- import { IConfig } from "./types";
3
- import "./tailwind.css";
4
- declare function createConfig(config: IConfig): void;
5
- declare const exs: {
6
- createConfig: typeof createConfig;
7
- core: {
8
- getAccount: (options: {
9
- address?: string;
10
- network?: string;
11
- }) => Promise<Horizon.AccountResponse | null>;
12
- getAccounts: (options: import("./exports/utils").CallBuilderOptions & {
13
- forSigner?: string;
14
- forAsset?: import("@stellar/stellar-base").Asset;
15
- sponsor?: string;
16
- forLiquidityPool?: string;
17
- }) => Promise<{
18
- builder: import("@stellar/stellar-sdk/lib/horizon/account_call_builder").AccountCallBuilder;
19
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AccountRecord>;
20
- }>;
21
- getAssets: (options: import("./exports/utils").CallBuilderOptions & {
22
- forCode?: string;
23
- forIssuer?: string;
24
- }) => Promise<{
25
- builder: import("@stellar/stellar-sdk/lib/horizon/assets_call_builder").AssetsCallBuilder;
26
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.AssetRecord>;
27
- }>;
28
- getBalances: (options: {
29
- address?: string;
30
- network?: string;
31
- includeZeroBalances?: boolean;
32
- }) => Promise<Horizon.HorizonApi.BalanceLine[]>;
33
- getClaimableBalances: (options: import("./exports/utils").CallBuilderOptions & {
34
- asset: import("@stellar/stellar-base").Asset;
35
- sponsor?: string;
36
- claimant: string;
37
- }) => Promise<{
38
- builder: import("@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder").ClaimableBalanceCallBuilder;
39
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.ClaimableBalanceRecord>;
40
- }>;
41
- getEffects: (options: import("./exports/utils").CallBuilderOptions & {
42
- forAccount?: string;
43
- forLedger?: string | number;
44
- forTransaction?: string;
45
- forOperation?: string;
46
- forLiquidityPool?: string;
47
- }) => Promise<{
48
- builder: import("@stellar/stellar-sdk/lib/horizon/effect_call_builder").EffectCallBuilder;
49
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.EffectRecord>;
50
- }>;
51
- getLedgers: (options: import("./exports/utils").CallBuilderOptions & {
52
- ledger?: number | string;
53
- }) => Promise<{
54
- builder: import("@stellar/stellar-sdk/lib/horizon/ledger_call_builder").LedgerCallBuilder;
55
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LedgerRecord>;
56
- }>;
57
- getLiquidityPools: (options: import("./exports/utils").CallBuilderOptions & {
58
- forAssets?: Array<import("@stellar/stellar-base").Asset>;
59
- forAccount?: string;
60
- }) => Promise<{
61
- builder: import("@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder").LiquidityPoolCallBuilder;
62
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.LiquidityPoolRecord>;
63
- }>;
64
- getNetwork: () => string;
65
- getOffers: (options: import("./exports/utils").CallBuilderOptions & {
66
- forAccount?: string;
67
- buying?: import("@stellar/stellar-base").Asset;
68
- selling?: import("@stellar/stellar-base").Asset;
69
- sponsor?: string;
70
- seller?: string;
71
- }) => Promise<{
72
- builder: import("@stellar/stellar-sdk/lib/horizon/offer_call_builder").OfferCallBuilder;
73
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OfferRecord>;
74
- }>;
75
- getOperations: (options: import("./exports/utils").CallBuilderOptions & {
76
- forAccount?: string;
77
- forClaimableBalance?: string;
78
- forLedger?: string | number;
79
- forTransaction?: string;
80
- forLiquidityPool?: string;
81
- includeFailed?: boolean;
82
- }) => Promise<{
83
- builder: import("@stellar/stellar-sdk/lib/horizon/operation_call_builder").OperationCallBuilder;
84
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.OperationRecord>;
85
- }>;
86
- getOrderbook: (args: [selling: import("@stellar/stellar-base").Asset, buying: import("@stellar/stellar-base").Asset], options: import("./exports/utils").CallBuilderOptions) => Promise<{
87
- builder: import("@stellar/stellar-sdk/lib/horizon/orderbook_call_builder").OrderbookCallBuilder;
88
- response: Horizon.ServerApi.OrderbookRecord;
89
- }>;
90
- getPayments: (options: import("./exports/utils").CallBuilderOptions & {
91
- forAccount?: string;
92
- forLedger?: string | number;
93
- forTransaction?: string;
94
- includeFailed?: boolean;
95
- }) => Promise<{
96
- builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
97
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.CreateAccountOperationRecord | Horizon.ServerApi.PaymentOperationRecord | Horizon.ServerApi.PathPaymentOperationRecord | Horizon.ServerApi.AccountMergeOperationRecord | Horizon.ServerApi.PathPaymentStrictSendOperationRecord | Horizon.ServerApi.InvokeHostFunctionOperationRecord>;
98
- }>;
99
- getStrictReceivePaths: (args: [source: string | import("@stellar/stellar-base").Asset[], destinationAsset: import("@stellar/stellar-base").Asset, destinationAmount: string], options: import("./exports/utils").CallBuilderOptions) => Promise<{
100
- builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
101
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
102
- }>;
103
- getStrictSendPaths: (args: [sourceAsset: import("@stellar/stellar-base").Asset, sourceAmount: string, destination: string | import("@stellar/stellar-base").Asset[]], options: import("./exports/utils").CallBuilderOptions) => Promise<{
104
- builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
105
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.PaymentPathRecord>;
106
- }>;
107
- 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("./exports/utils").CallBuilderOptions) => Promise<any>;
108
- getTrades: (options: import("./exports/utils").CallBuilderOptions & {
109
- forAssetPair?: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset];
110
- forOffer?: string;
111
- forType?: Horizon.ServerApi.TradeType;
112
- forAccount?: string;
113
- forLiquidityPool?: string;
114
- }) => Promise<{
115
- builder: import("@stellar/stellar-sdk/lib/horizon/trades_call_builder").TradesCallBuilder;
116
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TradeRecord>;
117
- }>;
118
- getTransactions: (options: import("./exports/utils").CallBuilderOptions & {
119
- forAccount?: string;
120
- forClaimableBalance?: string;
121
- forLedger?: string | number;
122
- forLiquidityPool?: string;
123
- includeFailed?: boolean;
124
- }) => Promise<{
125
- builder: import("@stellar/stellar-sdk/lib/horizon/transaction_call_builder").TransactionCallBuilder;
126
- response: Horizon.ServerApi.CollectionPage<Horizon.ServerApi.TransactionRecord>;
127
- }>;
128
- networks: {
129
- mainnet: import("@stellar/stellar-base").Networks;
130
- testnet: import("@stellar/stellar-base").Networks;
131
- sandbox: import("@stellar/stellar-base").Networks;
132
- futurenet: import("@stellar/stellar-base").Networks;
133
- standalone: import("@stellar/stellar-base").Networks;
134
- };
135
- switchNetwork: (newNetwork: string) => void;
136
- };
137
- blux: {
138
- login: () => Promise<void>;
139
- logout: () => void;
140
- profile: () => void;
141
- sendTransaction: (xdr: string, options: {
142
- network: string;
143
- }) => Promise<unknown>;
144
- readonly isReady: boolean;
145
- readonly isAuthenticated: boolean;
146
- readonly user: import("./store").IUser | undefined;
1
+ import { createConfig as cc } from "./exports/createConfig";
2
+ export declare const createConfig: typeof cc;
3
+ export declare const core: {
4
+ getAccount: (options: {
5
+ address?: string;
6
+ network?: string;
7
+ }) => Promise<import("@stellar/stellar-sdk/lib/horizon").AccountResponse | null>;
8
+ getAccounts: (options: import("./exports/utils").CallBuilderOptions & {
9
+ forSigner?: string;
10
+ forAsset?: import("@stellar/stellar-base").Asset;
11
+ sponsor?: string;
12
+ forLiquidityPool?: string;
13
+ }) => Promise<{
14
+ builder: import("@stellar/stellar-sdk/lib/horizon/account_call_builder").AccountCallBuilder;
15
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AccountRecord>;
16
+ }>;
17
+ getAssets: (options: import("./exports/utils").CallBuilderOptions & {
18
+ forCode?: string;
19
+ forIssuer?: string;
20
+ }) => Promise<{
21
+ builder: import("@stellar/stellar-sdk/lib/horizon/assets_call_builder").AssetsCallBuilder;
22
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.AssetRecord>;
23
+ }>;
24
+ getBalances: (options: {
25
+ address?: string;
26
+ network?: string;
27
+ includeZeroBalances?: boolean;
28
+ }) => Promise<import("@stellar/stellar-sdk/lib/horizon").HorizonApi.BalanceLine[]>;
29
+ getClaimableBalances: (options: import("./exports/utils").CallBuilderOptions & {
30
+ asset: import("@stellar/stellar-base").Asset;
31
+ sponsor?: string;
32
+ claimant: string;
33
+ }) => Promise<{
34
+ builder: import("@stellar/stellar-sdk/lib/horizon/claimable_balances_call_builder").ClaimableBalanceCallBuilder;
35
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.ClaimableBalanceRecord>;
36
+ }>;
37
+ getEffects: (options: import("./exports/utils").CallBuilderOptions & {
38
+ forAccount?: string;
39
+ forLedger?: string | number;
40
+ forTransaction?: string;
41
+ forOperation?: string;
42
+ forLiquidityPool?: string;
43
+ }) => Promise<{
44
+ builder: import("@stellar/stellar-sdk/lib/horizon/effect_call_builder").EffectCallBuilder;
45
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.EffectRecord>;
46
+ }>;
47
+ getLedgers: (options: import("./exports/utils").CallBuilderOptions & {
48
+ ledger?: number | string;
49
+ }) => Promise<{
50
+ builder: import("@stellar/stellar-sdk/lib/horizon/ledger_call_builder").LedgerCallBuilder;
51
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LedgerRecord>;
52
+ }>;
53
+ getLiquidityPools: (options: import("./exports/utils").CallBuilderOptions & {
54
+ forAssets?: Array<import("@stellar/stellar-base").Asset>;
55
+ forAccount?: string;
56
+ }) => Promise<{
57
+ builder: import("@stellar/stellar-sdk/lib/horizon/liquidity_pool_call_builder").LiquidityPoolCallBuilder;
58
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.LiquidityPoolRecord>;
59
+ }>;
60
+ getNetwork: () => string;
61
+ getOffers: (options: import("./exports/utils").CallBuilderOptions & {
62
+ forAccount?: string;
63
+ buying?: import("@stellar/stellar-base").Asset;
64
+ selling?: import("@stellar/stellar-base").Asset;
65
+ sponsor?: string;
66
+ seller?: string;
67
+ }) => Promise<{
68
+ builder: import("@stellar/stellar-sdk/lib/horizon/offer_call_builder").OfferCallBuilder;
69
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OfferRecord>;
70
+ }>;
71
+ getOperations: (options: import("./exports/utils").CallBuilderOptions & {
72
+ forAccount?: string;
73
+ forClaimableBalance?: string;
74
+ forLedger?: string | number;
75
+ forTransaction?: string;
76
+ forLiquidityPool?: string;
77
+ includeFailed?: boolean;
78
+ }) => Promise<{
79
+ builder: import("@stellar/stellar-sdk/lib/horizon/operation_call_builder").OperationCallBuilder;
80
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.OperationRecord>;
81
+ }>;
82
+ getOrderbook: (args: [selling: import("@stellar/stellar-base").Asset, buying: import("@stellar/stellar-base").Asset], options: import("./exports/utils").CallBuilderOptions) => Promise<{
83
+ builder: import("@stellar/stellar-sdk/lib/horizon/orderbook_call_builder").OrderbookCallBuilder;
84
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.OrderbookRecord;
85
+ }>;
86
+ getPayments: (options: import("./exports/utils").CallBuilderOptions & {
87
+ forAccount?: string;
88
+ forLedger?: string | number;
89
+ forTransaction?: string;
90
+ includeFailed?: boolean;
91
+ }) => Promise<{
92
+ builder: import("@stellar/stellar-sdk/lib/horizon/payment_call_builder").PaymentCallBuilder;
93
+ 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>;
94
+ }>;
95
+ getStrictReceivePaths: (args: [source: string | import("@stellar/stellar-base").Asset[], destinationAsset: import("@stellar/stellar-base").Asset, destinationAmount: string], options: import("./exports/utils").CallBuilderOptions) => Promise<{
96
+ builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
97
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
98
+ }>;
99
+ getStrictSendPaths: (args: [sourceAsset: import("@stellar/stellar-base").Asset, sourceAmount: string, destination: string | import("@stellar/stellar-base").Asset[]], options: import("./exports/utils").CallBuilderOptions) => Promise<{
100
+ builder: import("@stellar/stellar-sdk/lib/horizon/path_call_builder").PathCallBuilder;
101
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.PaymentPathRecord>;
102
+ }>;
103
+ 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("./exports/utils").CallBuilderOptions) => Promise<any>;
104
+ getTrades: (options: import("./exports/utils").CallBuilderOptions & {
105
+ forAssetPair?: [base: import("@stellar/stellar-base").Asset, counter: import("@stellar/stellar-base").Asset];
106
+ forOffer?: string;
107
+ forType?: import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeType;
108
+ forAccount?: string;
109
+ forLiquidityPool?: string;
110
+ }) => Promise<{
111
+ builder: import("@stellar/stellar-sdk/lib/horizon/trades_call_builder").TradesCallBuilder;
112
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TradeRecord>;
113
+ }>;
114
+ getTransactions: (options: import("./exports/utils").CallBuilderOptions & {
115
+ forAccount?: string;
116
+ forClaimableBalance?: string;
117
+ forLedger?: string | number;
118
+ forLiquidityPool?: string;
119
+ includeFailed?: boolean;
120
+ }) => Promise<{
121
+ builder: import("@stellar/stellar-sdk/lib/horizon/transaction_call_builder").TransactionCallBuilder;
122
+ response: import("@stellar/stellar-sdk/lib/horizon").ServerApi.CollectionPage<import("@stellar/stellar-sdk/lib/horizon").ServerApi.TransactionRecord>;
123
+ }>;
124
+ networks: {
125
+ mainnet: import("@stellar/stellar-base").Networks;
126
+ testnet: import("@stellar/stellar-base").Networks;
127
+ sandbox: import("@stellar/stellar-base").Networks;
128
+ futurenet: import("@stellar/stellar-base").Networks;
129
+ standalone: import("@stellar/stellar-base").Networks;
147
130
  };
131
+ switchNetwork: (newNetwork: string) => void;
132
+ };
133
+ export declare const blux: {
134
+ login: () => Promise<void>;
135
+ logout: () => void;
136
+ profile: () => void;
137
+ signMessage: (message: string, options?: {
138
+ network: string;
139
+ }) => Promise<unknown>;
140
+ sendTransaction: (xdr: string, options?: {
141
+ network: string;
142
+ }) => Promise<unknown>;
143
+ readonly isReady: boolean;
144
+ readonly isAuthenticated: boolean;
145
+ readonly user: import("./store").IUser | undefined;
148
146
  };
149
- export default exs;