@galacticcouncil/sdk 0.0.7 → 0.1.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.
@@ -49,9 +49,9 @@ export declare class TradeRouter extends Router {
49
49
  *
50
50
  * @param {string} assetIn - Storage key of tokenIn
51
51
  * @param {string} assetOut - Storage key of tokenOut
52
- * @return Best possible spot price of given token pair
52
+ * @return Best possible spot price of given token pair, or undefined if given pair trade not supported
53
53
  */
54
- getBestSpotPrice(assetIn: string, assetOut: string): Promise<Amount>;
54
+ getBestSpotPrice(assetIn: string, assetOut: string): Promise<Amount | undefined>;
55
55
  /**
56
56
  * Find best buy swap without errors, if there is none return first one found
57
57
  *
@@ -9,8 +9,8 @@ export declare class PolkadotApiClient {
9
9
  constructor(api: ApiPromise);
10
10
  getStorageKey(asset: [StorageKey<AnyTuple>, Codec], index: number): string;
11
11
  getStorageEntryArray(asset: [StorageKey<AnyTuple>, Codec]): string[];
12
- getPoolTokens(poolAddress: string, assetKeys: string[]): Promise<PoolToken[]>;
13
- syncPoolTokens(poolAddress: string, poolTokens: PoolToken[]): Promise<PoolToken[]>;
12
+ protected getPoolTokens(poolAddress: string, assetKeys: string[]): Promise<PoolToken[]>;
13
+ protected syncPoolTokens(poolAddress: string, poolTokens: PoolToken[]): Promise<PoolToken[]>;
14
14
  getAssetMetadata(tokenKey: string): Promise<AssetMetadata>;
15
15
  getAccountBalance(accountId: string, tokenKey: string): Promise<string>;
16
16
  getSystemAccountBalance(accountId: string): Promise<string>;
@@ -16,8 +16,8 @@ export declare class LbpPolkadotApiClient extends PolkadotApiClient {
16
16
  private pools;
17
17
  private _poolsLoaded;
18
18
  getPools(): Promise<PoolBase[]>;
19
- loadPools(): Promise<PoolBase[]>;
20
- syncPools(): Promise<PoolBase[]>;
19
+ private loadPools;
20
+ private syncPools;
21
21
  getLinearWeight(poolEntry: LbpPoolData): Promise<string>;
22
22
  isRepayFeeApplied(assetKey: string, poolEntry: LbpPoolData): Promise<boolean>;
23
23
  getRepayFee(): PoolFee;
@@ -6,8 +6,8 @@ export declare class OmniPolkadotApiClient extends PolkadotApiClient {
6
6
  private _poolLoaded;
7
7
  constructor(api: ApiPromise);
8
8
  getPools(): Promise<PoolBase[]>;
9
- loadPool(): Promise<PoolBase>;
10
- syncPool(): Promise<PoolBase>;
9
+ private loadPool;
10
+ private syncPool;
11
11
  private getPoolTokenState;
12
12
  getTradeFee(): PoolFee;
13
13
  getAssetFee(): PoolFee;
@@ -4,8 +4,8 @@ export declare class XykPolkadotApiClient extends PolkadotApiClient {
4
4
  private pools;
5
5
  private _poolsLoaded;
6
6
  getPools(): Promise<PoolBase[]>;
7
- loadPools(): Promise<PoolBase[]>;
8
- syncPools(): Promise<PoolBase[]>;
7
+ private loadPools;
8
+ private syncPools;
9
9
  getTradeFee(): PoolFee;
10
10
  getPoolLimits(): PoolLimits;
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacticcouncil/sdk",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "description": "Galactic SDK",
6
6
  "author": "Pavol Noha <palo@hydradx.io>",