@galacticcouncil/sdk 1.0.0 → 1.0.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.
@@ -1,9 +1,9 @@
1
1
  import type { PalletAssetRegistryAssetMetadata, PalletStableswapPoolInfo } from '@polkadot/types/lookup';
2
+ import { ITuple } from '@polkadot/types-codec/types';
3
+ import { u32, u64 } from '@polkadot/types-codec';
2
4
  import { ApiPromise } from '@polkadot/api';
3
5
  import { Asset } from '../types';
4
6
  import { PolkadotApiClient } from './PolkadotApi';
5
- import { ITuple } from '@polkadot/types-codec/types';
6
- import { u32, u64 } from '@polkadot/types-codec';
7
7
  export declare class AssetClient extends PolkadotApiClient {
8
8
  private SUPPORTED_TYPES;
9
9
  constructor(api: ApiPromise);
@@ -7,6 +7,7 @@ export declare abstract class PoolClient extends BalanceClient {
7
7
  protected subs: VoidFn[];
8
8
  private poolsLoaded;
9
9
  constructor(api: ApiPromise);
10
+ abstract isSupported(): boolean;
10
11
  protected abstract loadPools(): Promise<PoolBase[]>;
11
12
  abstract getPoolType(): PoolType;
12
13
  abstract getPoolFees(feeAsset: string, address: string): Promise<PoolFees>;
@@ -8,3 +8,5 @@ export { OmniPool } from './omni/OmniPool';
8
8
  export { OmniMath } from './omni/OmniMath';
9
9
  export { LbpPool } from './lbp/LbpPool';
10
10
  export { LbpMath } from './lbp/LbpMath';
11
+ export { StableMath } from './stable/StableMath';
12
+ export { StableSwap } from './stable/StableSwap';
@@ -4,6 +4,7 @@ import { PoolClient } from '../PoolClient';
4
4
  export declare class LbpPoolClient extends PoolClient {
5
5
  private readonly MAX_FINAL_WEIGHT;
6
6
  private poolsData;
7
+ isSupported(): boolean;
7
8
  loadPools(): Promise<PoolBase[]>;
8
9
  getPoolFees(_feeAsset: string, address: string): Promise<PoolFees>;
9
10
  getPoolType(): PoolType;
@@ -2,6 +2,7 @@ import { UnsubscribePromise } from '@polkadot/api-base/types';
2
2
  import { PoolBase, PoolType, PoolFees } from '../../types';
3
3
  import { PoolClient } from '../PoolClient';
4
4
  export declare class OmniPoolClient extends PoolClient {
5
+ isSupported(): boolean;
5
6
  loadPools(): Promise<PoolBase[]>;
6
7
  getPoolFees(feeAsset: string, _address: string): Promise<PoolFees>;
7
8
  getPoolType(): PoolType;
@@ -3,6 +3,7 @@ import { PoolBase, PoolType, PoolFees } from '../../types';
3
3
  import { PoolClient } from '../PoolClient';
4
4
  export declare class StableSwapClient extends PoolClient {
5
5
  private stablePools;
6
+ isSupported(): boolean;
6
7
  loadPools(): Promise<PoolBase[]>;
7
8
  getPoolFees(_feeAsset: string, address: string): Promise<PoolFees>;
8
9
  getPoolType(): PoolType;
@@ -2,6 +2,7 @@ import { UnsubscribePromise } from '@polkadot/api-base/types';
2
2
  import { PoolBase, PoolType, PoolFees } from '../../types';
3
3
  import { PoolClient } from '../PoolClient';
4
4
  export declare class XykPoolClient extends PoolClient {
5
+ isSupported(): boolean;
5
6
  loadPools(): Promise<PoolBase[]>;
6
7
  getPoolFees(_feeAsset: string, _address: string): Promise<PoolFees>;
7
8
  getPoolType(): PoolType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacticcouncil/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Galactic off-chain routing & optimization of orders across pools for best price execution",
5
5
  "author": "GalacticCouncil",
6
6
  "repository": {
@@ -58,7 +58,6 @@
58
58
  "@polkadot/types-known": "^10.9.1",
59
59
  "@polkadot/keyring": "^12.3.2",
60
60
  "@polkadot/util": "^12.3.2",
61
- "@polkadot/util-crypto": "^12.3.2",
62
- "ethers": "^5.7.2"
61
+ "@polkadot/util-crypto": "^12.3.2"
63
62
  }
64
63
  }