@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.
- package/README.md +131 -78
- package/build/aave/AaveClient.d.ts +77 -0
- package/build/aave/AaveUtils.d.ts +78 -0
- package/build/aave/abi/AavePool.d.ts +208 -0
- package/build/aave/abi/AavePoolDataProvider.d.ts +384 -0
- package/build/aave/abi/index.d.ts +2 -0
- package/build/aave/const.d.ts +6 -0
- package/build/aave/index.cjs +1 -0
- package/build/aave/index.d.ts +4 -0
- package/build/aave/index.mjs +1 -0
- package/build/aave/types.d.ts +17 -0
- package/build/api/Papi.d.ts +10 -0
- package/build/api/Watcher.d.ts +11 -0
- package/build/api/index.d.ts +3 -0
- package/build/api/probe.d.ts +26 -0
- package/build/api/provider/index.d.ts +2 -0
- package/build/api/provider/smoldot.d.ts +1 -0
- package/build/api/provider/websocket.d.ts +4 -0
- package/build/{types/client → client}/AssetClient.d.ts +1 -1
- package/build/client/BalanceClient.d.ts +20 -0
- package/build/client/ChainParams.d.ts +9 -0
- package/build/client/index.cjs +1 -0
- package/build/{types/client → client}/index.d.ts +1 -0
- package/build/client/index.mjs +1 -0
- package/build/{types/consts.d.ts → consts.d.ts} +2 -2
- package/build/evm/adapter.d.ts +11 -0
- package/build/evm/chain.d.ts +2 -0
- package/build/evm/client.d.ts +15 -0
- package/build/evm/index.cjs +1 -0
- package/build/evm/index.d.ts +4 -0
- package/build/evm/index.mjs +1 -0
- package/build/evm/types.d.ts +7 -0
- package/build/factory.d.ts +29 -0
- package/build/farm/LiquidityMiningApi.d.ts +29 -0
- package/build/farm/LiquidityMiningClient.d.ts +146 -0
- package/build/farm/MultiCurrencyContainer.d.ts +8 -0
- package/build/farm/RewardClaimSimulator.d.ts +16 -0
- package/build/farm/const.d.ts +4 -0
- package/build/farm/index.cjs +1 -0
- package/build/farm/index.d.ts +3 -0
- package/build/farm/index.mjs +1 -0
- package/build/farm/types.d.ts +46 -0
- package/build/gho/GhoTokenClient.d.ts +6 -0
- package/build/gho/abi.d.ts +124 -0
- package/build/gho/index.d.ts +2 -0
- package/build/index.cjs +1 -1
- package/build/{types/index.d.ts → index.d.ts} +6 -0
- package/build/index.mjs +1 -1
- package/build/oracle/MmOracleClient.d.ts +7 -0
- package/build/oracle/abi.d.ts +196 -0
- package/build/oracle/index.d.ts +3 -0
- package/build/oracle/types.d.ts +5 -0
- package/build/pool/PoolClient.d.ts +75 -0
- package/build/pool/PoolContextProvider.d.ts +41 -0
- package/build/pool/PoolLog.d.ts +11 -0
- package/build/pool/PoolStore.d.ts +20 -0
- package/build/pool/aave/AaveAbi.d.ts +126 -0
- package/build/pool/aave/AavePool.d.ts +24 -0
- package/build/pool/aave/AavePoolClient.d.ts +19 -0
- package/build/pool/aave/index.d.ts +2 -0
- package/build/pool/aave/types.d.ts +13 -0
- package/build/pool/hsm/HsmMath.d.ts +21 -0
- package/build/pool/hsm/HsmPool.d.ts +63 -0
- package/build/pool/hsm/HsmPoolClient.d.ts +26 -0
- package/build/pool/hsm/index.d.ts +3 -0
- package/build/pool/hsm/types.d.ts +7 -0
- package/build/pool/index.cjs +1 -0
- package/build/{types/pool → pool}/index.d.ts +4 -2
- package/build/pool/index.mjs +1 -0
- package/build/{types/pool → pool}/lbp/LbpPool.d.ts +1 -1
- package/build/{types/pool → pool}/lbp/LbpPoolClient.d.ts +9 -7
- package/build/{types/pool → pool}/omni/OmniMath.d.ts +7 -6
- package/build/{types/pool → pool}/omni/OmniPool.d.ts +14 -1
- package/build/pool/omni/OmniPoolClient.d.ts +29 -0
- package/build/pool/omni/types.d.ts +11 -0
- package/build/{types/pool → pool}/stable/StableMath.d.ts +1 -2
- package/build/{types/pool → pool}/stable/StableSwap.d.ts +21 -4
- package/build/pool/stable/StableSwapClient.d.ts +23 -0
- package/build/pool/stable/types.d.ts +15 -0
- package/build/{types/pool → pool}/types.d.ts +14 -3
- package/build/{types/pool → pool}/xyk/XykPool.d.ts +13 -1
- package/build/pool/xyk/XykPoolClient.d.ts +14 -0
- package/build/{types/sor → sor}/Router.d.ts +26 -8
- package/build/sor/TradeRouteBuilder.d.ts +4 -0
- package/build/sor/TradeRouter.d.ts +207 -0
- package/build/sor/TradeScheduler.d.ts +111 -0
- package/build/sor/const.d.ts +8 -0
- package/build/sor/index.cjs +1 -0
- package/build/sor/index.d.ts +6 -0
- package/build/sor/index.mjs +1 -0
- package/build/{types/sor → sor}/route/bfs.d.ts +11 -2
- package/build/{types/sor → sor}/route/index.d.ts +1 -1
- package/build/sor/route/suggester.d.ts +33 -0
- package/build/sor/types.d.ts +68 -0
- package/build/staking/StakingApi.d.ts +66 -0
- package/build/staking/StakingClient.d.ts +132 -0
- package/build/staking/index.cjs +1 -0
- package/build/staking/index.d.ts +2 -0
- package/build/staking/index.mjs +1 -0
- package/build/staking/types.d.ts +16 -0
- package/build/staking/utils.d.ts +1 -0
- package/build/tx/OrderTxBuilder.d.ts +21 -0
- package/build/tx/TradeTxBuilder.d.ts +18 -0
- package/build/tx/TxBuilder.d.ts +19 -0
- package/build/tx/TxBuilderFactory.d.ts +12 -0
- package/build/tx/index.cjs +1 -0
- package/build/tx/index.d.ts +2 -0
- package/build/tx/index.mjs +1 -0
- package/build/tx/types.d.ts +10 -0
- package/build/tx/utils.d.ts +5 -0
- package/build/{types/types.d.ts → types.d.ts} +9 -2
- package/build/utils/QueryBus.d.ts +10 -0
- package/build/utils/async.d.ts +1 -0
- package/build/utils/calc.d.ts +52 -0
- package/build/utils/format.d.ts +11 -0
- package/build/utils/index.cjs +1 -0
- package/build/{types/utils → utils}/index.d.ts +3 -3
- package/build/utils/index.mjs +1 -0
- package/build/{types/utils → utils}/math.d.ts +0 -9
- package/package.json +70 -15
- package/build/types/api/Papi.d.ts +0 -375
- package/build/types/api/client.d.ts +0 -2
- package/build/types/api/index.d.ts +0 -2
- package/build/types/client/BalanceClient.d.ts +0 -17
- package/build/types/pool/PoolClient.d.ts +0 -25
- package/build/types/pool/PoolContextProvider.d.ts +0 -26
- package/build/types/pool/omni/OmniPoolClient.d.ts +0 -13
- package/build/types/pool/stable/StableSwapClient.d.ts +0 -16
- package/build/types/pool/xyk/XykPoolClient.d.ts +0 -12
- package/build/types/sor/TradeRouter.d.ts +0 -155
- package/build/types/sor/TradeUtils.d.ts +0 -12
- package/build/types/sor/index.d.ts +0 -4
- package/build/types/sor/route/suggester.d.ts +0 -24
- package/build/types/sor/types.d.ts +0 -31
- package/build/types/utils/big.d.ts +0 -3
- package/build/types/utils/evm.d.ts +0 -3
- package/build/types/utils/format.d.ts +0 -4
- package/build/types/utils/xc.d.ts +0 -1
- /package/build/{types/errors.d.ts → errors.d.ts} +0 -0
- /package/build/{types/pool → pool}/PoolFactory.d.ts +0 -0
- /package/build/{types/pool → pool}/lbp/LbpMath.d.ts +0 -0
- /package/build/{types/pool → pool}/lbp/index.d.ts +0 -0
- /package/build/{types/pool → pool}/omni/index.d.ts +0 -0
- /package/build/{types/pool → pool}/stable/index.d.ts +0 -0
- /package/build/{types/pool → pool}/xyk/XykMath.d.ts +0 -0
- /package/build/{types/pool → pool}/xyk/index.d.ts +0 -0
- /package/build/{types/sor → sor}/route/graph.d.ts +0 -0
- /package/build/{types/utils → utils}/Queue.d.ts +0 -0
- /package/build/{types/utils → utils}/Stack.d.ts +0 -0
- /package/build/{types/utils → utils}/json.d.ts +0 -0
- /package/build/{types/utils → utils}/traversal/bfs.d.ts +0 -0
|
@@ -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 +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
|