@cryptorubic/core 0.0.17 → 0.0.37-alpha-1212.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 (120) hide show
  1. package/package.json +26 -15
  2. package/src/index.d.ts +30 -6
  3. package/src/index.js +31 -6
  4. package/src/lib/blockchains/backend-labels.d.ts +13 -3
  5. package/src/lib/blockchains/backend-labels.js +14 -4
  6. package/src/lib/blockchains/blockchain-id.d.ts +1 -1
  7. package/src/lib/blockchains/blockchain-id.js +14 -3
  8. package/src/lib/blockchains/blockchain-name.d.ts +31 -9
  9. package/src/lib/blockchains/blockchain-name.js +17 -7
  10. package/src/lib/blockchains/blockchains-info.d.ts +3 -2
  11. package/src/lib/blockchains/blockchains-info.js +6 -3
  12. package/src/lib/blockchains/chain-type-storage.d.ts +3 -3
  13. package/src/lib/blockchains/chain-type-storage.js +2 -0
  14. package/src/lib/blockchains/chain-type.d.ts +2 -0
  15. package/src/lib/blockchains/chain-type.js +3 -1
  16. package/src/lib/blockchains/wrapped-addresses.d.ts +2 -2
  17. package/src/lib/blockchains/wrapped-addresses.js +16 -5
  18. package/src/lib/models/api/celer-refund-request.interface.d.ts +5 -0
  19. package/src/lib/models/api/claim-request.interface.d.ts +5 -0
  20. package/src/lib/models/api/cross-chain-provider.interface.d.ts +12 -0
  21. package/src/lib/models/api/error.interface.d.ts +14 -0
  22. package/src/lib/models/api/estimates.interface.d.ts +11 -0
  23. package/src/lib/models/api/failed-quote.interface.d.ts +17 -0
  24. package/src/lib/models/api/fee-info.d.ts +19 -0
  25. package/src/lib/models/api/fee-info.js +2 -0
  26. package/src/lib/models/api/fees.interface.d.ts +14 -0
  27. package/src/lib/models/api/fees.interface.js +2 -0
  28. package/src/lib/models/api/foreign-blacklist.interface.d.ts +4 -0
  29. package/src/lib/models/api/foreign-blacklist.interface.js +6 -0
  30. package/src/lib/models/api/gas-fee.interface.d.ts +6 -0
  31. package/src/lib/models/api/gas-fee.interface.js +2 -0
  32. package/src/lib/models/api/on-chain-provider.interface.d.ts +12 -0
  33. package/src/lib/models/api/on-chain-provider.interface.js +2 -0
  34. package/src/lib/models/api/percent-fee.interface.d.ts +11 -0
  35. package/src/lib/models/api/percent-fee.interface.js +2 -0
  36. package/src/lib/models/api/protocol-fee.interface.d.ts +5 -0
  37. package/src/lib/models/api/protocol-fee.interface.js +2 -0
  38. package/src/lib/models/api/provider-chain.interface.d.ts +11 -0
  39. package/src/lib/models/api/provider-chain.interface.js +2 -0
  40. package/src/lib/models/api/provider-fee.interface.d.ts +5 -0
  41. package/src/lib/models/api/provider-fee.interface.js +2 -0
  42. package/src/lib/models/api/quote-all.interface.d.ts +17 -0
  43. package/src/lib/models/api/quote-all.interface.js +2 -0
  44. package/src/lib/models/api/quote-options.interface.d.ts +15 -0
  45. package/src/lib/models/api/quote-options.interface.js +2 -0
  46. package/src/lib/models/api/quote-request.interface.d.ts +11 -0
  47. package/src/lib/models/api/quote-request.interface.js +2 -0
  48. package/src/lib/models/api/quote-response.interface.d.ts +51 -0
  49. package/src/lib/models/api/quote-response.interface.js +2 -0
  50. package/src/lib/models/api/quote-tokens.interface.d.ts +5 -0
  51. package/src/lib/models/api/quote-tokens.interface.js +2 -0
  52. package/src/lib/models/api/quote-trade.interface.d.ts +8 -0
  53. package/src/lib/models/api/quote-trade.interface.js +2 -0
  54. package/src/lib/models/api/routing.interface.d.ts +7 -0
  55. package/src/lib/models/api/routing.interface.js +2 -0
  56. package/src/lib/models/api/swap-best-request.interface.d.ts +2 -0
  57. package/src/lib/models/api/swap-best-request.interface.js +2 -0
  58. package/src/lib/models/api/swap-request.interface.d.ts +10 -0
  59. package/src/lib/models/api/swap-request.interface.js +2 -0
  60. package/src/lib/models/api/swap-response.interface.d.ts +24 -0
  61. package/src/lib/models/api/swap-response.interface.js +2 -0
  62. package/src/lib/models/api/swap-type.d.ts +1 -0
  63. package/src/lib/models/api/swap-type.js +2 -0
  64. package/src/lib/models/api/token-amount.interface.d.ts +4 -0
  65. package/src/lib/models/api/token-amount.interface.js +2 -0
  66. package/src/lib/models/api/token.inerface.d.ts +11 -0
  67. package/src/lib/models/api/token.inerface.js +2 -0
  68. package/src/lib/models/api/ton-transaction.interface.d.ts +6 -0
  69. package/src/lib/models/api/ton-transaction.interface.js +2 -0
  70. package/src/lib/models/api/transaction.interface.d.ts +11 -0
  71. package/src/lib/models/api/transaction.interface.js +2 -0
  72. package/src/lib/models/api/unique-provider-info.interface.d.ts +13 -0
  73. package/src/lib/models/api/unique-provider-info.interface.js +2 -0
  74. package/src/lib/models/api/ws-quote-error.interface.d.ts +21 -0
  75. package/src/lib/models/api/ws-quote-error.interface.js +2 -0
  76. package/src/lib/models/api/ws-quote-request.interface.d.ts +4 -0
  77. package/src/lib/models/api/ws-quote-request.interface.js +2 -0
  78. package/src/lib/models/api/ws-quote-response.interface.d.ts +21 -0
  79. package/src/lib/models/api/ws-quote-response.interface.js +2 -0
  80. package/src/lib/models/custom-logger.d.ts +2 -1
  81. package/src/lib/providers/backend-onchain-providers.d.ts +279 -0
  82. package/src/lib/providers/backend-onchain-providers.js +178 -0
  83. package/src/lib/providers/cross-chain-trade-type.d.ts +16 -1
  84. package/src/lib/providers/cross-chain-trade-type.js +17 -2
  85. package/src/lib/providers/from-backend-cross-chain-providers.js +17 -2
  86. package/src/lib/providers/on-chain-trade-type.d.ts +21 -2
  87. package/src/lib/providers/on-chain-trade-type.js +25 -6
  88. package/src/lib/providers/to-backend-cross-chain-providers.d.ts +16 -1
  89. package/src/lib/providers/to-backend-cross-chain-providers.js +17 -2
  90. package/src/lib/tokens/constants/native-token-list.d.ts +2 -2
  91. package/src/lib/tokens/constants/native-token-list.js +291 -19
  92. package/src/lib/tokens/constants/wrapped-native-tokens.d.ts +1 -1
  93. package/src/lib/tokens/constants/wrapped-native-tokens.js +80 -17
  94. package/src/lib/tokens/price-token-amount-struct.d.ts +1 -1
  95. package/src/lib/tokens/price-token-amount.d.ts +2 -1
  96. package/src/lib/tokens/price-token-amount.js +5 -2
  97. package/src/lib/tokens/price-token-struct.d.ts +1 -1
  98. package/src/lib/tokens/price-token.d.ts +16 -1
  99. package/src/lib/tokens/price-token.js +22 -0
  100. package/src/lib/tokens/token-amount-struct.d.ts +1 -1
  101. package/src/lib/tokens/token-amount.d.ts +2 -1
  102. package/src/lib/tokens/token-amount.js +4 -1
  103. package/src/lib/tokens/token-base-struct.d.ts +1 -1
  104. package/src/lib/tokens/token-struct.d.ts +1 -1
  105. package/src/lib/tokens/token.d.ts +3 -2
  106. package/src/lib/tokens/token.js +16 -11
  107. package/src/lib/utils/cache.decorator.d.ts +1 -1
  108. package/src/lib/utils/cache.decorator.js +2 -2
  109. package/src/lib/models/quote-all-response.d.ts +0 -15
  110. package/src/lib/models/quote-best-response.d.ts +0 -3
  111. package/src/lib/models/quote-request.d.ts +0 -18
  112. package/src/lib/models/route.d.ts +0 -80
  113. package/src/lib/models/swap-request.d.ts +0 -7
  114. package/src/lib/models/swap-response.d.ts +0 -82
  115. /package/src/lib/models/{quote-all-response.js → api/celer-refund-request.interface.js} +0 -0
  116. /package/src/lib/models/{quote-best-response.js → api/claim-request.interface.js} +0 -0
  117. /package/src/lib/models/{quote-request.js → api/cross-chain-provider.interface.js} +0 -0
  118. /package/src/lib/models/{route.js → api/error.interface.js} +0 -0
  119. /package/src/lib/models/{swap-request.js → api/estimates.interface.js} +0 -0
  120. /package/src/lib/models/{swap-response.js → api/failed-quote.interface.js} +0 -0
@@ -0,0 +1,12 @@
1
+ import { ProviderChainInterface } from './provider-chain.interface';
2
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
3
+ export interface CrossChainProviderInterface {
4
+ /**
5
+ * Cross chain provider name
6
+ */
7
+ name: CrossChainTradeType;
8
+ /**
9
+ * Chains supported by the provider
10
+ */
11
+ chains: ProviderChainInterface[];
12
+ }
@@ -0,0 +1,14 @@
1
+ export interface ErrorInterface {
2
+ /**
3
+ * Error code
4
+ */
5
+ code: number;
6
+ /**
7
+ * Error message
8
+ */
9
+ reason: string;
10
+ /**
11
+ * Error specific data
12
+ */
13
+ data?: object;
14
+ }
@@ -0,0 +1,11 @@
1
+ export interface EstimatesInterface {
2
+ destinationTokenAmount: string;
3
+ destinationTokenMinAmount: string;
4
+ destinationWeiAmount: string;
5
+ destinationWeiMinAmount: string;
6
+ destinationUsdAmount?: number;
7
+ destinationUsdMinAmount?: number;
8
+ durationInMinutes: number;
9
+ slippage: number;
10
+ priceImpact: number | null;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { ErrorInterface } from './error.interface';
2
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
3
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
4
+ export interface FailedQuoteInterface {
5
+ /**
6
+ * Type of the trade
7
+ */
8
+ providerType: CrossChainTradeType | OnChainTradeType;
9
+ /**
10
+ * Error data
11
+ */
12
+ data: ErrorInterface;
13
+ /**
14
+ * Inner id
15
+ */
16
+ id: string;
17
+ }
@@ -0,0 +1,19 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { PriceToken } from '../../tokens/price-token';
3
+ export interface FeeInfo {
4
+ rubicProxy: {
5
+ fixedFee: FixedFee;
6
+ platformFee: PlatformFee;
7
+ } | null;
8
+ provider: {
9
+ fixedFee: FixedFee;
10
+ } | null;
11
+ }
12
+ export interface FixedFee {
13
+ amount: BigNumber;
14
+ token: PriceToken;
15
+ }
16
+ export interface PlatformFee {
17
+ percent: number;
18
+ token: PriceToken;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { GasFeeInterface } from './gas-fee.interface';
2
+ import { ProtocolFeeInterface } from './protocol-fee.interface';
3
+ import { ProviderFeeInterface } from './provider-fee.interface';
4
+ import { TokenInerface } from './token.inerface';
5
+ import { PercentFeeInterface } from './percent-fee.interface';
6
+ export interface FeesInterface {
7
+ gasTokenFees: {
8
+ gas: GasFeeInterface;
9
+ protocol: ProtocolFeeInterface;
10
+ provider: ProviderFeeInterface;
11
+ nativeToken: TokenInerface;
12
+ };
13
+ percentFees: PercentFeeInterface;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare class ForeignBlacklistInterface {
2
+ lifi?: string[];
3
+ rango?: string[];
4
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ForeignBlacklistInterface = void 0;
4
+ class ForeignBlacklistInterface {
5
+ }
6
+ exports.ForeignBlacklistInterface = ForeignBlacklistInterface;
@@ -0,0 +1,6 @@
1
+ export interface GasFeeInterface {
2
+ gasPrice: string;
3
+ gasLimit: string;
4
+ totalWeiAmount: string;
5
+ totalUsdAmount: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { ProviderChainInterface } from './provider-chain.interface';
2
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
3
+ export interface OnChainProviderInterface {
4
+ /**
5
+ * On chain provider name
6
+ */
7
+ name: OnChainTradeType;
8
+ /**
9
+ * Chains supported by the provider
10
+ */
11
+ chains: ProviderChainInterface[];
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { TokenInerface } from './token.inerface';
2
+ export interface PercentFeeInterface {
3
+ /**
4
+ * Percent
5
+ */
6
+ percent: number;
7
+ /**
8
+ * Token
9
+ */
10
+ token: TokenInerface | null;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface ProtocolFeeInterface {
2
+ fixedAmount: string;
3
+ fixedWeiAmount: string;
4
+ fixedUsdAmount: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { BlockchainName } from '../../blockchains/blockchain-name';
2
+ export interface ProviderChainInterface {
3
+ /**
4
+ * Chain name
5
+ */
6
+ name: BlockchainName;
7
+ /**
8
+ * Is proxy available for trade
9
+ */
10
+ proxyAvailable: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface ProviderFeeInterface {
2
+ fixedAmount: string;
3
+ fixedWeiAmount: string;
4
+ fixedUsdAmount: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { QuoteRequestInterface } from './quote-request.interface';
2
+ import { QuoteResponseInterface } from './quote-response.interface';
3
+ import { FailedQuoteInterface } from './failed-quote.interface';
4
+ export interface QuoteAllInterface {
5
+ /**
6
+ * Quote response data
7
+ */
8
+ quote: QuoteRequestInterface;
9
+ /**
10
+ * Successful routes
11
+ */
12
+ routes: Omit<QuoteResponseInterface, 'quote'>[];
13
+ /**
14
+ * Failed routes
15
+ */
16
+ failed?: Omit<FailedQuoteInterface, 'quote'>[];
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { ForeignBlacklistInterface } from './foreign-blacklist.interface';
2
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
3
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
4
+ export interface QuoteOptionsInterface {
5
+ integratorAddress?: string;
6
+ fromAddress?: string;
7
+ slippage?: number;
8
+ receiver?: string | undefined;
9
+ nativeBlacklist?: (CrossChainTradeType | OnChainTradeType)[];
10
+ preferredProvider?: CrossChainTradeType | OnChainTradeType;
11
+ foreignBlacklist?: ForeignBlacklistInterface;
12
+ timeout?: number;
13
+ enableTestnets?: boolean;
14
+ enableChecks?: boolean;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { QuoteOptionsInterface } from './quote-options.interface';
2
+ import { QuoteTradeInterface } from './quote-trade.interface';
3
+ export interface QuoteRequestInterface extends QuoteTradeInterface, QuoteOptionsInterface {
4
+ showFailedRoutes?: boolean;
5
+ showDangerousRoutes?: boolean;
6
+ depositTradeParams?: 'onlyDeposits' | 'noDeposits' | 'all';
7
+ /**
8
+ * client ref_code for PrivateMode access
9
+ */
10
+ privacyRefCode?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,51 @@
1
+ import { EstimatesInterface } from './estimates.interface';
2
+ import { RoutingInterface } from './routing.interface';
3
+ import { SwapType } from './swap-type';
4
+ import { TransactionInterface } from './transaction.interface';
5
+ import { ErrorInterface } from './error.interface';
6
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
7
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
8
+ import { FeesInterface } from './fees.interface';
9
+ import { QuoteTokensInterface } from './quote-tokens.interface';
10
+ export interface QuoteResponseInterface {
11
+ /**
12
+ * Trade identifier
13
+ */
14
+ id: string;
15
+ /**
16
+ * Quote response data
17
+ */
18
+ tokens: QuoteTokensInterface;
19
+ /**
20
+ * Swap type
21
+ */
22
+ swapType: SwapType;
23
+ /**
24
+ * Provider type
25
+ */
26
+ providerType: CrossChainTradeType | OnChainTradeType;
27
+ /**
28
+ * Estimates
29
+ */
30
+ estimate: EstimatesInterface;
31
+ /**
32
+ * Fees
33
+ */
34
+ fees: FeesInterface;
35
+ /**
36
+ * Routing data
37
+ */
38
+ routing: RoutingInterface[];
39
+ /**
40
+ * Transaction data
41
+ */
42
+ transaction: TransactionInterface;
43
+ /**
44
+ * Specific info about quote params provider
45
+ */
46
+ warnings: ErrorInterface[];
47
+ /**
48
+ * Does transaction go through rubic contracts or not
49
+ */
50
+ useRubicContract: boolean;
51
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { TokenInerface } from './token.inerface';
2
+ export interface QuoteTokensInterface {
3
+ from: TokenInerface;
4
+ to: TokenInerface;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { BlockchainName } from '../../blockchains/blockchain-name';
2
+ export interface QuoteTradeInterface {
3
+ srcTokenAddress: string;
4
+ dstTokenBlockchain: BlockchainName;
5
+ srcTokenBlockchain: BlockchainName;
6
+ srcTokenAmount: string;
7
+ dstTokenAddress: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { SwapType } from './swap-type';
2
+ import { TokenAmountInterface } from './token-amount.interface';
3
+ export interface RoutingInterface {
4
+ type: SwapType;
5
+ provider: string;
6
+ path: TokenAmountInterface[];
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { SwapRequestInterface } from './swap-request.interface';
2
+ export type SwapBestRequestInterface = Omit<SwapRequestInterface, 'id'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { QuoteRequestInterface } from './quote-request.interface';
2
+ export interface SwapRequestInterface extends Omit<QuoteRequestInterface, 'fromAddress'> {
3
+ id: string;
4
+ enableChecks?: boolean;
5
+ fromAddress: string;
6
+ receiver: string | undefined;
7
+ signature?: string;
8
+ publicKey?: string;
9
+ refundAddress?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { EstimatesInterface } from './estimates.interface';
2
+ import { SwapRequestInterface } from './swap-request.interface';
3
+ import { TransactionInterface } from './transaction.interface';
4
+ import { ErrorInterface } from './error.interface';
5
+ import { RoutingInterface } from './routing.interface';
6
+ import { FeesInterface } from './fees.interface';
7
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
8
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
9
+ import { SwapType } from './swap-type';
10
+ import { UniqueProviderInfoInterface } from './unique-provider-info.interface';
11
+ export interface SwapResponseInterface {
12
+ quote: SwapRequestInterface;
13
+ estimate: EstimatesInterface;
14
+ fees: FeesInterface;
15
+ transaction: TransactionInterface;
16
+ uniqueInfo?: UniqueProviderInfoInterface;
17
+ /**
18
+ * Specific info about quote params provide
19
+ */
20
+ warnings: ErrorInterface[];
21
+ routing: RoutingInterface[];
22
+ providerType: CrossChainTradeType | OnChainTradeType;
23
+ swapType: SwapType;
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type SwapType = 'cross-chain' | 'on-chain';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { TokenInerface } from './token.inerface';
2
+ export interface TokenAmountInterface extends TokenInerface {
3
+ amount: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { BlockchainName } from '../../blockchains/blockchain-name';
2
+ export interface TokenInerface {
3
+ address: string;
4
+ decimals: number;
5
+ symbol: string;
6
+ name: string;
7
+ blockchainId: number;
8
+ blockchain: BlockchainName;
9
+ price?: number;
10
+ amount?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface TonEncodedConfigInterface {
2
+ address: string;
3
+ amount: string;
4
+ payload?: string;
5
+ stateInit?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { TonEncodedConfigInterface } from './ton-transaction.interface';
2
+ export interface TransactionInterface {
3
+ approvalAddress?: string;
4
+ data?: string;
5
+ to?: string;
6
+ value?: string;
7
+ depositAddress?: string;
8
+ extraFields?: object;
9
+ feeLimit?: number;
10
+ tonMessages?: TonEncodedConfigInterface[];
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ export interface UniqueProviderInfoInterface {
2
+ changenowId?: string;
3
+ changellyId?: string;
4
+ simpleSwapId?: string;
5
+ retroBridgeId?: string;
6
+ squidrouterRequestId?: string;
7
+ rangoRequestId?: string;
8
+ relayId?: string;
9
+ exolixId?: string;
10
+ additionalData?: {
11
+ [key: string]: unknown;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { ErrorInterface } from './error.interface';
2
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
3
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
4
+ export interface WsQuoteErrorInterface {
5
+ /**
6
+ * Total amount of trades
7
+ */
8
+ total: number;
9
+ /**
10
+ * Amount of calculated trades
11
+ */
12
+ calculated: number;
13
+ /**
14
+ * Trade data
15
+ */
16
+ data: ErrorInterface;
17
+ /**
18
+ * Trade type
19
+ */
20
+ type: CrossChainTradeType | OnChainTradeType | null;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { QuoteRequestInterface } from './quote-request.interface';
2
+ export interface WsQuoteRequestInterface extends QuoteRequestInterface {
3
+ calculationTimeout: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { QuoteResponseInterface } from './quote-response.interface';
2
+ import { CrossChainTradeType } from '../../providers/cross-chain-trade-type';
3
+ import { OnChainTradeType } from '../../providers/on-chain-trade-type';
4
+ export interface WsQuoteResponseInterface {
5
+ /**
6
+ * Total amount of trades
7
+ */
8
+ total: number;
9
+ /**
10
+ * Amount of calculated trades
11
+ */
12
+ calculated: number;
13
+ /**
14
+ * Trade data
15
+ */
16
+ trade: QuoteResponseInterface | null;
17
+ /**
18
+ * Trade type
19
+ */
20
+ type: CrossChainTradeType | OnChainTradeType | null;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
- import { CrossChainTradeType, OnChainTradeType } from "@cryptorubic/core";
1
+ import { CrossChainTradeType } from '../providers/cross-chain-trade-type';
2
+ import { OnChainTradeType } from '../providers/on-chain-trade-type';
2
3
  export type LogLevel = 'log' | 'error' | 'warn' | 'debug' | 'verbose';
3
4
  /**
4
5
  * @publicApi