@galacticcouncil/sdk 1.2.0 → 1.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.
|
@@ -2,7 +2,7 @@ import type { HydradxRuntimeXcmAssetLocation, PalletStableswapPoolInfo } from '@
|
|
|
2
2
|
import { ITuple } from '@polkadot/types-codec/types';
|
|
3
3
|
import { u32, u64 } from '@polkadot/types-codec';
|
|
4
4
|
import { ApiPromise } from '@polkadot/api';
|
|
5
|
-
import { Asset, AssetMetadata,
|
|
5
|
+
import { Asset, AssetMetadata, ExternalAsset } from '../types';
|
|
6
6
|
import { PolkadotApiClient } from './PolkadotApi';
|
|
7
7
|
export declare class AssetClient extends PolkadotApiClient {
|
|
8
8
|
private SUPPORTED_TYPES;
|
|
@@ -14,7 +14,7 @@ export declare class AssetClient extends PolkadotApiClient {
|
|
|
14
14
|
private getTokens;
|
|
15
15
|
private getBonds;
|
|
16
16
|
private getShares;
|
|
17
|
-
getOnChainAssets(external?:
|
|
17
|
+
getOnChainAssets(external?: ExternalAsset[]): Promise<Asset[]>;
|
|
18
18
|
private isSupportedAsset;
|
|
19
19
|
private parseLocation;
|
|
20
20
|
}
|
|
@@ -3,7 +3,7 @@ import { OmniPoolClient } from './omni/OmniPoolClient';
|
|
|
3
3
|
import { XykPoolClient } from './xyk/XykPoolClient';
|
|
4
4
|
import { StableSwapClient } from './stable/StableSwapClient';
|
|
5
5
|
import { AssetClient } from '../client';
|
|
6
|
-
import { Hop, PoolBase, IPoolService, PoolType, Transaction, PoolFees, Pool, Asset,
|
|
6
|
+
import { Hop, PoolBase, IPoolService, PoolType, Transaction, PoolFees, Pool, Asset, ExternalAsset } from '../types';
|
|
7
7
|
import { BigNumber } from '../utils/bignumber';
|
|
8
8
|
import { ApiPromise } from '@polkadot/api';
|
|
9
9
|
export declare class PoolService implements IPoolService {
|
|
@@ -16,7 +16,7 @@ export declare class PoolService implements IPoolService {
|
|
|
16
16
|
protected onChainAssets: Asset[];
|
|
17
17
|
protected onChainAssetsLoaded: boolean;
|
|
18
18
|
constructor(api: ApiPromise);
|
|
19
|
-
syncRegistry(external?:
|
|
19
|
+
syncRegistry(external?: ExternalAsset[]): Promise<void>;
|
|
20
20
|
getPools(includeOnly: PoolType[]): Promise<PoolBase[]>;
|
|
21
21
|
unsubscribe(): void;
|
|
22
22
|
private withMetadata;
|
package/build/types/types.d.ts
CHANGED
|
@@ -117,15 +117,18 @@ export type Amount = {
|
|
|
117
117
|
amount: BigNumber;
|
|
118
118
|
decimals: number;
|
|
119
119
|
};
|
|
120
|
-
export interface Asset extends
|
|
120
|
+
export interface Asset extends AssetMetadata {
|
|
121
|
+
id: string;
|
|
122
|
+
name: string;
|
|
121
123
|
icon: string;
|
|
122
124
|
type: string;
|
|
123
125
|
existentialDeposit: string;
|
|
124
126
|
origin?: number;
|
|
125
127
|
meta?: Record<string, string>;
|
|
126
128
|
}
|
|
127
|
-
export interface
|
|
129
|
+
export interface ExternalAsset extends AssetMetadata {
|
|
128
130
|
id: string;
|
|
131
|
+
origin: number;
|
|
129
132
|
name: string;
|
|
130
133
|
}
|
|
131
134
|
export interface AssetMetadata {
|