@galacticcouncil/sdk 0.1.0 → 0.2.1
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 +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/types/api/Router.d.ts +3 -3
- package/dist/types/client/AssetApiClient.d.ts +8 -0
- package/dist/types/client/BalanceApiClient.d.ts +11 -0
- package/dist/types/client/PolkadotApi.d.ts +3 -13
- package/dist/types/client/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/pool/PoolApiClient.d.ts +12 -0
- package/dist/types/pool/PoolService.d.ts +17 -0
- package/dist/types/pool/index.d.ts +1 -1
- package/dist/types/pool/lbp/{LbpPolkadotApiClient.d.ts → LbpPoolApiClient.d.ts} +2 -2
- package/dist/types/pool/omni/OmniMath.d.ts +2 -2
- package/dist/types/pool/omni/{OmniPolkadotApiClient.d.ts → OmniPoolApiClient.d.ts} +2 -4
- package/dist/types/pool/xyk/{XykPolkadotApiClient.d.ts → XykPoolApiClient.d.ts} +2 -2
- package/dist/types/types.d.ts +10 -1
- package/package.json +5 -5
- package/dist/types/pool/PolkadotApiPoolService.d.ts +0 -17
package/README.md
CHANGED
|
@@ -57,14 +57,14 @@ For type signature visit [types.ts](src/types.ts)<br />
|
|
|
57
57
|
```typescript
|
|
58
58
|
// Import
|
|
59
59
|
import { ApiPromise, WsProvider } from '@polkadot/api';
|
|
60
|
-
import { TradeRouter,
|
|
60
|
+
import { TradeRouter, PoolService } from '@galacticcouncil/sdk';
|
|
61
61
|
|
|
62
62
|
// Initialize Polkadot API
|
|
63
63
|
const wsProvider = new WsProvider('wss://rpc.basilisk.cloud');
|
|
64
64
|
const api = await ApiPromise.create({ provider: wsProvider });
|
|
65
65
|
|
|
66
66
|
// Initialize Trade Router
|
|
67
|
-
const poolService = new
|
|
67
|
+
const poolService = new PoolService(api);
|
|
68
68
|
const tradeRouter = new TradeRouter(poolService, { includeOnly: [PoolType.XYK] });
|
|
69
69
|
|
|
70
70
|
// Do something
|