@galacticcouncil/sdk-next 1.0.0-beta.0 → 1.0.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 (151) hide show
  1. package/README.md +131 -78
  2. package/build/aave/AaveClient.d.ts +77 -0
  3. package/build/aave/AaveUtils.d.ts +78 -0
  4. package/build/aave/abi/AavePool.d.ts +208 -0
  5. package/build/aave/abi/AavePoolDataProvider.d.ts +384 -0
  6. package/build/aave/abi/index.d.ts +2 -0
  7. package/build/aave/const.d.ts +6 -0
  8. package/build/aave/index.cjs +1 -0
  9. package/build/aave/index.d.ts +4 -0
  10. package/build/aave/index.mjs +1 -0
  11. package/build/aave/types.d.ts +17 -0
  12. package/build/api/Papi.d.ts +10 -0
  13. package/build/api/Watcher.d.ts +11 -0
  14. package/build/api/index.d.ts +3 -0
  15. package/build/api/probe.d.ts +26 -0
  16. package/build/api/provider/index.d.ts +2 -0
  17. package/build/api/provider/smoldot.d.ts +1 -0
  18. package/build/api/provider/websocket.d.ts +4 -0
  19. package/build/{types/client → client}/AssetClient.d.ts +1 -1
  20. package/build/client/BalanceClient.d.ts +20 -0
  21. package/build/client/ChainParams.d.ts +9 -0
  22. package/build/client/index.cjs +1 -0
  23. package/build/{types/client → client}/index.d.ts +1 -0
  24. package/build/client/index.mjs +1 -0
  25. package/build/{types/consts.d.ts → consts.d.ts} +2 -2
  26. package/build/evm/adapter.d.ts +11 -0
  27. package/build/evm/chain.d.ts +2 -0
  28. package/build/evm/client.d.ts +15 -0
  29. package/build/evm/index.cjs +1 -0
  30. package/build/evm/index.d.ts +4 -0
  31. package/build/evm/index.mjs +1 -0
  32. package/build/evm/types.d.ts +7 -0
  33. package/build/factory.d.ts +29 -0
  34. package/build/farm/LiquidityMiningApi.d.ts +29 -0
  35. package/build/farm/LiquidityMiningClient.d.ts +146 -0
  36. package/build/farm/MultiCurrencyContainer.d.ts +8 -0
  37. package/build/farm/RewardClaimSimulator.d.ts +16 -0
  38. package/build/farm/const.d.ts +4 -0
  39. package/build/farm/index.cjs +1 -0
  40. package/build/farm/index.d.ts +3 -0
  41. package/build/farm/index.mjs +1 -0
  42. package/build/farm/types.d.ts +46 -0
  43. package/build/gho/GhoTokenClient.d.ts +6 -0
  44. package/build/gho/abi.d.ts +124 -0
  45. package/build/gho/index.d.ts +2 -0
  46. package/build/index.cjs +1 -1
  47. package/build/{types/index.d.ts → index.d.ts} +6 -0
  48. package/build/index.mjs +1 -1
  49. package/build/oracle/MmOracleClient.d.ts +7 -0
  50. package/build/oracle/abi.d.ts +196 -0
  51. package/build/oracle/index.d.ts +3 -0
  52. package/build/oracle/types.d.ts +5 -0
  53. package/build/pool/PoolClient.d.ts +75 -0
  54. package/build/pool/PoolContextProvider.d.ts +41 -0
  55. package/build/pool/PoolLog.d.ts +11 -0
  56. package/build/pool/PoolStore.d.ts +20 -0
  57. package/build/pool/aave/AaveAbi.d.ts +126 -0
  58. package/build/pool/aave/AavePool.d.ts +24 -0
  59. package/build/pool/aave/AavePoolClient.d.ts +19 -0
  60. package/build/pool/aave/index.d.ts +2 -0
  61. package/build/pool/aave/types.d.ts +13 -0
  62. package/build/pool/hsm/HsmMath.d.ts +21 -0
  63. package/build/pool/hsm/HsmPool.d.ts +63 -0
  64. package/build/pool/hsm/HsmPoolClient.d.ts +26 -0
  65. package/build/pool/hsm/index.d.ts +3 -0
  66. package/build/pool/hsm/types.d.ts +7 -0
  67. package/build/pool/index.cjs +1 -0
  68. package/build/{types/pool → pool}/index.d.ts +4 -2
  69. package/build/pool/index.mjs +1 -0
  70. package/build/{types/pool → pool}/lbp/LbpPool.d.ts +1 -1
  71. package/build/{types/pool → pool}/lbp/LbpPoolClient.d.ts +9 -7
  72. package/build/{types/pool → pool}/omni/OmniMath.d.ts +7 -6
  73. package/build/{types/pool → pool}/omni/OmniPool.d.ts +14 -1
  74. package/build/pool/omni/OmniPoolClient.d.ts +29 -0
  75. package/build/pool/omni/types.d.ts +11 -0
  76. package/build/{types/pool → pool}/stable/StableMath.d.ts +1 -2
  77. package/build/{types/pool → pool}/stable/StableSwap.d.ts +21 -4
  78. package/build/pool/stable/StableSwapClient.d.ts +23 -0
  79. package/build/pool/stable/types.d.ts +15 -0
  80. package/build/{types/pool → pool}/types.d.ts +14 -3
  81. package/build/{types/pool → pool}/xyk/XykPool.d.ts +13 -1
  82. package/build/pool/xyk/XykPoolClient.d.ts +14 -0
  83. package/build/{types/sor → sor}/Router.d.ts +26 -8
  84. package/build/sor/TradeRouteBuilder.d.ts +4 -0
  85. package/build/sor/TradeRouter.d.ts +207 -0
  86. package/build/sor/TradeScheduler.d.ts +111 -0
  87. package/build/sor/const.d.ts +8 -0
  88. package/build/sor/index.cjs +1 -0
  89. package/build/sor/index.d.ts +6 -0
  90. package/build/sor/index.mjs +1 -0
  91. package/build/{types/sor → sor}/route/bfs.d.ts +11 -2
  92. package/build/{types/sor → sor}/route/index.d.ts +1 -1
  93. package/build/sor/route/suggester.d.ts +33 -0
  94. package/build/sor/types.d.ts +68 -0
  95. package/build/staking/StakingApi.d.ts +66 -0
  96. package/build/staking/StakingClient.d.ts +132 -0
  97. package/build/staking/index.cjs +1 -0
  98. package/build/staking/index.d.ts +2 -0
  99. package/build/staking/index.mjs +1 -0
  100. package/build/staking/types.d.ts +16 -0
  101. package/build/staking/utils.d.ts +1 -0
  102. package/build/tx/OrderTxBuilder.d.ts +21 -0
  103. package/build/tx/TradeTxBuilder.d.ts +18 -0
  104. package/build/tx/TxBuilder.d.ts +19 -0
  105. package/build/tx/TxBuilderFactory.d.ts +12 -0
  106. package/build/tx/index.cjs +1 -0
  107. package/build/tx/index.d.ts +2 -0
  108. package/build/tx/index.mjs +1 -0
  109. package/build/tx/types.d.ts +10 -0
  110. package/build/tx/utils.d.ts +5 -0
  111. package/build/{types/types.d.ts → types.d.ts} +9 -2
  112. package/build/utils/QueryBus.d.ts +10 -0
  113. package/build/utils/async.d.ts +1 -0
  114. package/build/utils/calc.d.ts +52 -0
  115. package/build/utils/format.d.ts +11 -0
  116. package/build/utils/index.cjs +1 -0
  117. package/build/{types/utils → utils}/index.d.ts +3 -3
  118. package/build/utils/index.mjs +1 -0
  119. package/build/{types/utils → utils}/math.d.ts +0 -9
  120. package/package.json +70 -15
  121. package/build/types/api/Papi.d.ts +0 -375
  122. package/build/types/api/client.d.ts +0 -2
  123. package/build/types/api/index.d.ts +0 -2
  124. package/build/types/client/BalanceClient.d.ts +0 -17
  125. package/build/types/pool/PoolClient.d.ts +0 -25
  126. package/build/types/pool/PoolContextProvider.d.ts +0 -26
  127. package/build/types/pool/omni/OmniPoolClient.d.ts +0 -13
  128. package/build/types/pool/stable/StableSwapClient.d.ts +0 -16
  129. package/build/types/pool/xyk/XykPoolClient.d.ts +0 -12
  130. package/build/types/sor/TradeRouter.d.ts +0 -155
  131. package/build/types/sor/TradeUtils.d.ts +0 -12
  132. package/build/types/sor/index.d.ts +0 -4
  133. package/build/types/sor/route/suggester.d.ts +0 -24
  134. package/build/types/sor/types.d.ts +0 -31
  135. package/build/types/utils/big.d.ts +0 -3
  136. package/build/types/utils/evm.d.ts +0 -3
  137. package/build/types/utils/format.d.ts +0 -4
  138. package/build/types/utils/xc.d.ts +0 -1
  139. /package/build/{types/errors.d.ts → errors.d.ts} +0 -0
  140. /package/build/{types/pool → pool}/PoolFactory.d.ts +0 -0
  141. /package/build/{types/pool → pool}/lbp/LbpMath.d.ts +0 -0
  142. /package/build/{types/pool → pool}/lbp/index.d.ts +0 -0
  143. /package/build/{types/pool → pool}/omni/index.d.ts +0 -0
  144. /package/build/{types/pool → pool}/stable/index.d.ts +0 -0
  145. /package/build/{types/pool → pool}/xyk/XykMath.d.ts +0 -0
  146. /package/build/{types/pool → pool}/xyk/index.d.ts +0 -0
  147. /package/build/{types/sor → sor}/route/graph.d.ts +0 -0
  148. /package/build/{types/utils → utils}/Queue.d.ts +0 -0
  149. /package/build/{types/utils → utils}/Stack.d.ts +0 -0
  150. /package/build/{types/utils → utils}/json.d.ts +0 -0
  151. /package/build/{types/utils → utils}/traversal/bfs.d.ts +0 -0
@@ -1,4 +0,0 @@
1
- export { Router } from './Router';
2
- export { TradeRouter } from './TradeRouter';
3
- export { TradeUtils } from './TradeUtils';
4
- export * from './types';
@@ -1,24 +0,0 @@
1
- import { Edge } from './graph';
2
- import { PoolBase } from '../../pool';
3
- export declare class RouteSuggester {
4
- /**
5
- * Proposals are ideal paths from
6
- * 1) tokenIn to tokenOut
7
- * 2) tokenIn to *(all possible paths are requested)
8
- *
9
- * calculated from all permutations of tokens of given pools.
10
- *
11
- * E.g. permutation of pool A={1,3} is 2, such as {1,3}, {3,1} where 1 are 3
12
- * are pool assets(tokens)
13
- *
14
- * Filtering of valid paths and corresponding asset pairs is done by router itself!!!
15
- *
16
- * @param tokenIn - tokenIn
17
- * @param tokenOut - tokenOut or null if all possible paths from tokenIn are requested
18
- * @param pools - substrate based pools
19
- * @returns all possible path proposals
20
- */
21
- getProposals(tokenIn: number, tokenOut: number | null, pools: PoolBase[]): Edge[][];
22
- private parsePaths;
23
- private toEdge;
24
- }
@@ -1,31 +0,0 @@
1
- import type { Hop, PoolBuy, PoolError, PoolSell } from '../pool';
2
- export interface Humanizer {
3
- toHuman(): any;
4
- }
5
- export type Swap = Hop & Humanizer & {
6
- assetInDecimals: number;
7
- assetOutDecimals: number;
8
- amountIn: bigint;
9
- amountOut: bigint;
10
- spotPrice: bigint;
11
- tradeFeePct: number;
12
- tradeFeeRange?: [number, number];
13
- priceImpactPct: number;
14
- errors: PoolError[];
15
- };
16
- export type SellSwap = Swap & PoolSell;
17
- export type BuySwap = Swap & PoolBuy;
18
- export declare enum TradeType {
19
- Buy = "Buy",
20
- Sell = "Sell"
21
- }
22
- export interface Trade extends Humanizer {
23
- type: TradeType;
24
- amountIn: bigint;
25
- amountOut: bigint;
26
- spotPrice: bigint;
27
- tradeFee: bigint;
28
- tradeFeePct: number;
29
- priceImpactPct: number;
30
- swaps: Swap[];
31
- }
@@ -1,3 +0,0 @@
1
- import { RoundingMode } from 'big.js';
2
- export declare function toDecimal(amount: bigint, decimals: number, maxDecimal?: number, roundType?: RoundingMode): string;
3
- export declare function toBigInt(amount: string | number, decimals: number): bigint;
@@ -1,3 +0,0 @@
1
- export declare function convertFromH160(h160addr: string, ss58prefix?: number): string;
2
- export declare function convertToH160(ss58addr: string): string;
3
- export declare function isEvmAccount(ss58addr: string): boolean;
@@ -1,4 +0,0 @@
1
- import { PoolFee } from '../pool';
2
- export declare function toPct(fee: PoolFee): number;
3
- export declare function toDecimals(fee: PoolFee): number;
4
- export declare function fromPermill(permill: number): PoolFee;
@@ -1 +0,0 @@
1
- export declare function convertToId(xcAddress: string): number;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes