@moonbeam-network/xcm-config 1.0.0-dev.21 → 1.0.0-dev.211
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/LICENSE +1 -1
- package/README.md +14 -8
- package/build/index.d.ts +260 -273
- package/build/index.mjs +10043 -1
- package/build/index.mjs.map +1 -1
- package/package.json +24 -34
- package/build/index.cjs +0 -2
- package/build/index.cjs.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright
|
|
1
|
+
Copyright 2024 Moonbeam Foundation
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
The Config package contains the chains and assets configuration for the Moonbeam XCM SDK and MRL SDK.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Documentation for the Moonbeam XCM SDK
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## v3 (current)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Usage
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- [XCM SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/example-usage/xcm)
|
|
10
|
+
- [MRL SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/example-usage/mrl)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### References
|
|
12
13
|
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
14
|
+
- [XCM SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/reference/xcm)
|
|
15
|
+
- [MRL SDK](https://moonbeam-foundation.github.io/xcm-sdk/latest/reference/mrl)
|
|
16
|
+
|
|
17
|
+
## v2 (previous)
|
|
18
|
+
|
|
19
|
+
- [usage](https://moonbeam-foundation.github.io/xcm-sdk/v2/example-usage)
|
|
20
|
+
- [references](https://moonbeam-foundation.github.io/xcm-sdk/v2/reference/interfaces)
|
package/build/index.d.ts
CHANGED
|
@@ -1,355 +1,342 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Ecosystem,
|
|
5
|
-
Parachain,
|
|
6
|
-
EvmParachain,
|
|
7
|
-
} from '@moonbeam-network/xcm-types';
|
|
8
|
-
import {
|
|
9
|
-
BalanceConfigBuilder,
|
|
10
|
-
ContractConfigBuilder,
|
|
11
|
-
ExtrinsicConfigBuilder,
|
|
12
|
-
AssetMinConfigBuilder,
|
|
13
|
-
FeeConfigBuilder,
|
|
14
|
-
} from '@moonbeam-network/xcm-builder';
|
|
15
|
-
|
|
16
|
-
interface AssetConfigConstructorParams {
|
|
17
|
-
asset: Asset;
|
|
18
|
-
balance: BalanceConfigBuilder;
|
|
19
|
-
contract?: ContractConfigBuilder;
|
|
20
|
-
destination: AnyChain;
|
|
21
|
-
destinationFee: DestinationFeeConfig;
|
|
22
|
-
extrinsic?: ExtrinsicConfigBuilder;
|
|
23
|
-
fee?: FeeAssetConfig;
|
|
24
|
-
min?: AssetMinConfigBuilder;
|
|
25
|
-
}
|
|
26
|
-
interface DestinationFeeConfig extends FeeAssetConfig {
|
|
27
|
-
amount: number | FeeConfigBuilder;
|
|
28
|
-
}
|
|
29
|
-
interface FeeAssetConfig {
|
|
30
|
-
asset: Asset;
|
|
31
|
-
balance: BalanceConfigBuilder;
|
|
32
|
-
}
|
|
33
|
-
declare class AssetConfig {
|
|
34
|
-
readonly asset: Asset;
|
|
35
|
-
readonly balance: BalanceConfigBuilder;
|
|
36
|
-
readonly contract?: ContractConfigBuilder;
|
|
37
|
-
readonly destination: AnyChain;
|
|
38
|
-
readonly destinationFee: DestinationFeeConfig;
|
|
39
|
-
readonly extrinsic?: ExtrinsicConfigBuilder;
|
|
40
|
-
readonly fee?: FeeAssetConfig;
|
|
41
|
-
readonly min?: AssetMinConfigBuilder;
|
|
42
|
-
constructor({
|
|
43
|
-
asset,
|
|
44
|
-
balance,
|
|
45
|
-
contract,
|
|
46
|
-
destination,
|
|
47
|
-
destinationFee,
|
|
48
|
-
extrinsic,
|
|
49
|
-
fee,
|
|
50
|
-
min,
|
|
51
|
-
}: AssetConfigConstructorParams);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface ChainConfigConstructorParams {
|
|
55
|
-
assets: AssetConfig[];
|
|
56
|
-
chain: AnyChain;
|
|
57
|
-
}
|
|
58
|
-
declare class ChainConfig {
|
|
59
|
-
#private;
|
|
60
|
-
readonly chain: AnyChain;
|
|
61
|
-
constructor({ assets, chain }: ChainConfigConstructorParams);
|
|
62
|
-
getAssetsConfigs(): AssetConfig[];
|
|
63
|
-
getAssetConfigs(asset: Asset): AssetConfig[];
|
|
64
|
-
getAssetDestinations(asset: Asset): AnyChain[];
|
|
65
|
-
getAssetDestinationConfig(asset: Asset, destination: AnyChain): AssetConfig;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
interface IConfigService {
|
|
69
|
-
getEcosystemAssets(ecosystem?: Ecosystem): Asset[];
|
|
70
|
-
getAsset(keyOrAsset: string | Asset): Asset;
|
|
71
|
-
getChain(keyOrAsset: string | AnyChain): AnyChain;
|
|
72
|
-
getSourceChains(asset: Asset, ecosystem: Ecosystem | undefined): AnyChain[];
|
|
73
|
-
getDestinationChains(asset: Asset, source: AnyChain): AnyChain[];
|
|
74
|
-
getAssetDestinationConfig(
|
|
75
|
-
asset: Asset,
|
|
76
|
-
source: AnyChain,
|
|
77
|
-
destination: AnyChain,
|
|
78
|
-
): AssetConfig;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
interface ConfigServiceOptions {
|
|
82
|
-
assets?: Map<string, Asset>;
|
|
83
|
-
chains?: Map<string, AnyChain>;
|
|
84
|
-
chainsConfig?: Map<string, ChainConfig>;
|
|
85
|
-
}
|
|
86
|
-
declare class ConfigService implements IConfigService {
|
|
87
|
-
protected assets: Map<string, Asset>;
|
|
88
|
-
protected chains: Map<string, AnyChain>;
|
|
89
|
-
protected chainsConfig: Map<string, ChainConfig>;
|
|
90
|
-
constructor(options?: ConfigServiceOptions);
|
|
91
|
-
getEcosystemAssets(ecosystem?: Ecosystem): Asset[];
|
|
92
|
-
getAsset(keyOrAsset: string | Asset): Asset;
|
|
93
|
-
getChain(keyOrAsset: string | AnyChain): AnyChain;
|
|
94
|
-
getChainConfig(keyOrAsset: string | AnyChain): ChainConfig;
|
|
95
|
-
getSourceChains(asset: Asset, ecosystem: Ecosystem | undefined): AnyChain[];
|
|
96
|
-
getDestinationChains(asset: Asset, source: AnyChain): AnyChain[];
|
|
97
|
-
getAssetDestinationConfig(
|
|
98
|
-
asset: Asset,
|
|
99
|
-
source: AnyChain,
|
|
100
|
-
destination: AnyChain,
|
|
101
|
-
): AssetConfig;
|
|
102
|
-
updateAsset(asset: Asset): void;
|
|
103
|
-
updateChain(chain: AnyChain): void;
|
|
104
|
-
updateChainConfig(chainConfig: ChainConfig): void;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
interface TransferConfig {
|
|
108
|
-
asset: Asset;
|
|
109
|
-
source: ChainTransferConfig;
|
|
110
|
-
destination: ChainTransferConfig;
|
|
111
|
-
}
|
|
112
|
-
interface ChainTransferConfig {
|
|
113
|
-
chain: AnyChain;
|
|
114
|
-
config: AssetConfig;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
declare function ConfigBuilder(service?: IConfigService): {
|
|
118
|
-
assets: (ecosystem?: Ecosystem) => {
|
|
119
|
-
assets: Asset[];
|
|
120
|
-
asset: (keyOrAsset: string | Asset) => {
|
|
121
|
-
sourceChains: AnyChain[];
|
|
122
|
-
source: (keyOrChain: string | AnyChain) => {
|
|
123
|
-
destinationChains: AnyChain[];
|
|
124
|
-
destination: (keyOrChain: string | AnyChain) => {
|
|
125
|
-
build: () => TransferConfig;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
};
|
|
1
|
+
import { Asset, AnyChain, SetOptional, ChainAsset, AnyAsset, Ecosystem, Parachain, EvmParachain, EvmChain } from '@moonbeam-network/xcm-types';
|
|
2
|
+
import { BalanceConfigBuilder, AssetMinConfigBuilder, FeeConfigBuilder, ContractConfigBuilder, ExtrinsicConfigBuilder, MrlConfigBuilder } from '@moonbeam-network/xcm-builder';
|
|
3
|
+
import { EventRecord, Event } from '@polkadot/types/interfaces';
|
|
131
4
|
|
|
132
5
|
declare const aca: Asset;
|
|
6
|
+
declare const agng: Asset;
|
|
133
7
|
declare const alan: Asset;
|
|
8
|
+
declare const ampe: Asset;
|
|
9
|
+
declare const apillon: Asset;
|
|
10
|
+
declare const aseed: Asset;
|
|
134
11
|
declare const astr: Asset;
|
|
135
|
-
declare const atom: Asset;
|
|
136
12
|
declare const auq: Asset;
|
|
137
|
-
declare const
|
|
138
|
-
declare const betaDEV: Asset;
|
|
13
|
+
declare const axlusdc: Asset;
|
|
139
14
|
declare const bnc: Asset;
|
|
15
|
+
declare const bncs: Asset;
|
|
140
16
|
declare const cfg: Asset;
|
|
141
17
|
declare const crab: Asset;
|
|
142
18
|
declare const csm: Asset;
|
|
19
|
+
declare const dai: Asset;
|
|
20
|
+
declare const ded: Asset;
|
|
143
21
|
declare const dev: Asset;
|
|
22
|
+
declare const devBeta: Asset;
|
|
23
|
+
declare const devStage: Asset;
|
|
144
24
|
declare const dot: Asset;
|
|
145
25
|
declare const eq: Asset;
|
|
146
26
|
declare const eqd: Asset;
|
|
147
|
-
declare const
|
|
27
|
+
declare const eth: Asset;
|
|
28
|
+
declare const eurc: Asset;
|
|
148
29
|
declare const fil: Asset;
|
|
30
|
+
declare const ftm: Asset;
|
|
31
|
+
declare const ftmwh: Asset;
|
|
149
32
|
declare const glmr: Asset;
|
|
150
33
|
declare const hdx: Asset;
|
|
151
|
-
declare const hko: Asset;
|
|
152
34
|
declare const ibtc: Asset;
|
|
153
35
|
declare const intr: Asset;
|
|
154
36
|
declare const kar: Asset;
|
|
155
37
|
declare const kbtc: Asset;
|
|
156
38
|
declare const kint: Asset;
|
|
157
|
-
declare const kma: Asset;
|
|
158
39
|
declare const ksm: Asset;
|
|
40
|
+
declare const ldot: Asset;
|
|
159
41
|
declare const lit: Asset;
|
|
42
|
+
declare const manta: Asset;
|
|
43
|
+
declare const maos: Asset;
|
|
160
44
|
declare const mgx: Asset;
|
|
161
45
|
declare const movr: Asset;
|
|
46
|
+
declare const neuro: Asset;
|
|
162
47
|
declare const nodl: Asset;
|
|
163
48
|
declare const otp: Asset;
|
|
164
49
|
declare const para: Asset;
|
|
165
50
|
declare const paring: Asset;
|
|
51
|
+
declare const peaq: Asset;
|
|
52
|
+
declare const pen: Asset;
|
|
166
53
|
declare const pha: Asset;
|
|
167
54
|
declare const pica: Asset;
|
|
55
|
+
declare const pink: Asset;
|
|
168
56
|
declare const ring: Asset;
|
|
169
57
|
declare const rmrk: Asset;
|
|
170
58
|
declare const sdn: Asset;
|
|
171
59
|
declare const soon: Asset;
|
|
60
|
+
declare const stink: Asset;
|
|
61
|
+
declare const sub: Asset;
|
|
172
62
|
declare const teer: Asset;
|
|
63
|
+
declare const tnkr: Asset;
|
|
173
64
|
declare const tt1: Asset;
|
|
174
65
|
declare const tur: Asset;
|
|
175
66
|
declare const unit: Asset;
|
|
176
67
|
declare const usdc: Asset;
|
|
68
|
+
declare const usdcwh: Asset;
|
|
177
69
|
declare const usdt: Asset;
|
|
178
|
-
declare const
|
|
179
|
-
declare const
|
|
180
|
-
declare const wftm: Asset;
|
|
70
|
+
declare const usdtwh: Asset;
|
|
71
|
+
declare const vastr: Asset;
|
|
181
72
|
declare const vbnc: Asset;
|
|
182
73
|
declare const vdot: Asset;
|
|
183
74
|
declare const vfil: Asset;
|
|
184
75
|
declare const vglmr: Asset;
|
|
185
76
|
declare const vksm: Asset;
|
|
77
|
+
declare const vmanta: Asset;
|
|
186
78
|
declare const vmovr: Asset;
|
|
79
|
+
declare const wbtc: Asset;
|
|
80
|
+
declare const weth: Asset;
|
|
81
|
+
declare const wftm: Asset;
|
|
82
|
+
declare const wifd: Asset;
|
|
187
83
|
declare const xrt: Asset;
|
|
84
|
+
declare const ztg: Asset;
|
|
85
|
+
declare const wbtce: Asset;
|
|
86
|
+
declare const wstethe: Asset;
|
|
87
|
+
declare const wethe: Asset;
|
|
88
|
+
declare const laos: Asset;
|
|
188
89
|
declare const assetsList: Asset[];
|
|
189
90
|
declare const assetsMap: Map<string, Asset>;
|
|
190
91
|
|
|
92
|
+
interface EventConfig {
|
|
93
|
+
section: string;
|
|
94
|
+
method: string;
|
|
95
|
+
}
|
|
96
|
+
interface SourceEventConfig {
|
|
97
|
+
event: EventConfig;
|
|
98
|
+
addressExtractor: (event: EventRecord) => string;
|
|
99
|
+
messageIdExtractor: (event: EventRecord, allEvents?: EventRecord[]) => string;
|
|
100
|
+
}
|
|
101
|
+
interface DestinationEventConfig {
|
|
102
|
+
event: EventConfig;
|
|
103
|
+
messageIdExtractor: (event: Event, allEvents?: EventRecord[]) => string;
|
|
104
|
+
successIndicator?: (event: EventRecord) => boolean;
|
|
105
|
+
}
|
|
106
|
+
interface MonitoringConfig {
|
|
107
|
+
source: SourceEventConfig;
|
|
108
|
+
destination: DestinationEventConfig;
|
|
109
|
+
}
|
|
110
|
+
type SourceChecker = (events: EventRecord[], sourceAddress: string) => {
|
|
111
|
+
matched: boolean;
|
|
112
|
+
messageId?: string;
|
|
113
|
+
event?: EventRecord;
|
|
114
|
+
};
|
|
115
|
+
type DestinationChecker = (events: EventRecord[], messageId?: string) => {
|
|
116
|
+
matched: boolean;
|
|
117
|
+
success: boolean;
|
|
118
|
+
event?: EventRecord;
|
|
119
|
+
};
|
|
120
|
+
interface MonitoringBuilderConfig {
|
|
121
|
+
checkSource: SourceChecker;
|
|
122
|
+
checkDestination: DestinationChecker;
|
|
123
|
+
}
|
|
124
|
+
interface AssetRouteConstructorParams {
|
|
125
|
+
source: SourceConfig;
|
|
126
|
+
destination: DestinationConfig;
|
|
127
|
+
contract?: ContractConfigBuilder;
|
|
128
|
+
extrinsic?: ExtrinsicConfigBuilder;
|
|
129
|
+
monitoring?: MonitoringBuilderConfig;
|
|
130
|
+
}
|
|
131
|
+
interface SourceConfig {
|
|
132
|
+
asset: Asset;
|
|
133
|
+
chain: AnyChain;
|
|
134
|
+
balance: BalanceConfigBuilder;
|
|
135
|
+
fee: FeeConfig;
|
|
136
|
+
destinationFee?: {
|
|
137
|
+
asset?: Asset;
|
|
138
|
+
balance: BalanceConfigBuilder;
|
|
139
|
+
};
|
|
140
|
+
min?: AssetMinConfigBuilder;
|
|
141
|
+
}
|
|
142
|
+
interface DestinationConfig extends Omit<SourceConfig, 'fee'> {
|
|
143
|
+
fee: DestinationFeeConfig;
|
|
144
|
+
}
|
|
145
|
+
interface FeeConfig {
|
|
146
|
+
asset: Asset;
|
|
147
|
+
balance: BalanceConfigBuilder;
|
|
148
|
+
extra?: number;
|
|
149
|
+
}
|
|
150
|
+
interface DestinationFeeConfig extends SetOptional<FeeConfig, 'balance'> {
|
|
151
|
+
amount: number | FeeConfigBuilder;
|
|
152
|
+
}
|
|
153
|
+
declare class AssetRoute {
|
|
154
|
+
readonly source: SourceConfig;
|
|
155
|
+
readonly destination: DestinationConfig;
|
|
156
|
+
readonly contract?: ContractConfigBuilder;
|
|
157
|
+
readonly extrinsic?: ExtrinsicConfigBuilder;
|
|
158
|
+
readonly monitoring?: MonitoringBuilderConfig;
|
|
159
|
+
constructor({ source, destination, contract, extrinsic, monitoring, }: AssetRouteConstructorParams);
|
|
160
|
+
getDestinationFeeAssetOnSource(): ChainAsset;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface ChainRoutesConstructorParams {
|
|
164
|
+
chain: AnyChain;
|
|
165
|
+
routes: RoutesParam[];
|
|
166
|
+
}
|
|
167
|
+
interface RoutesParam extends Omit<AssetRouteConstructorParams, 'source'> {
|
|
168
|
+
source: Omit<SourceConfig, 'chain'>;
|
|
169
|
+
}
|
|
170
|
+
declare class ChainRoutes {
|
|
171
|
+
readonly chain: AnyChain;
|
|
172
|
+
protected routes: Map<string, AssetRoute>;
|
|
173
|
+
constructor({ chain, routes }: ChainRoutesConstructorParams);
|
|
174
|
+
getRoutes(): AssetRoute[];
|
|
175
|
+
getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[];
|
|
176
|
+
getAssetDestinations(keyOrAsset: string | AnyAsset): AnyChain[];
|
|
177
|
+
getDestinationAssets(keyOrChain: string | AnyChain): Asset[];
|
|
178
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): AssetRoute;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
interface MrlAssetRouteConstructorParams extends AssetRouteConstructorParams {
|
|
182
|
+
source: MrlSourceConfig;
|
|
183
|
+
mrl: MrlConfig;
|
|
184
|
+
}
|
|
185
|
+
interface MrlConfig {
|
|
186
|
+
isAutomaticPossible: boolean;
|
|
187
|
+
transfer: MrlConfigBuilder;
|
|
188
|
+
moonChain: MoonChainConfig;
|
|
189
|
+
}
|
|
190
|
+
interface MrlSourceConfig extends SourceConfig {
|
|
191
|
+
moonChainFee?: {
|
|
192
|
+
asset: Asset;
|
|
193
|
+
balance: BalanceConfigBuilder;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
interface MoonChainConfig {
|
|
197
|
+
asset: Asset;
|
|
198
|
+
balance: BalanceConfigBuilder;
|
|
199
|
+
fee: MoonChainFeeConfig;
|
|
200
|
+
}
|
|
201
|
+
interface MoonChainFeeConfig extends FeeConfig {
|
|
202
|
+
amount: number | FeeConfigBuilder;
|
|
203
|
+
}
|
|
204
|
+
declare class MrlAssetRoute extends AssetRoute {
|
|
205
|
+
readonly mrl: MrlConfig;
|
|
206
|
+
readonly source: MrlSourceConfig;
|
|
207
|
+
constructor({ source, destination, contract, extrinsic, mrl, }: MrlAssetRouteConstructorParams & {
|
|
208
|
+
source: MrlSourceConfig;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
interface MrlChainRoutesConstructorParams extends ChainRoutesConstructorParams {
|
|
213
|
+
routes: MrlRoutesParam[];
|
|
214
|
+
}
|
|
215
|
+
interface MrlRoutesParam extends Omit<MrlAssetRouteConstructorParams, 'source'> {
|
|
216
|
+
source: Omit<MrlSourceConfig, 'chain'>;
|
|
217
|
+
}
|
|
218
|
+
declare class MrlChainRoutes extends ChainRoutes {
|
|
219
|
+
protected routes: Map<string, MrlAssetRoute>;
|
|
220
|
+
constructor({ chain, routes }: MrlChainRoutesConstructorParams);
|
|
221
|
+
getRoutes(): MrlAssetRoute[];
|
|
222
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): MrlAssetRoute;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Configuration options for initializing the ConfigService.
|
|
227
|
+
* This interface defines the structure for configuring assets, chains, routes, and endpoints.
|
|
228
|
+
*/
|
|
229
|
+
interface ConfigServiceOptions {
|
|
230
|
+
/**
|
|
231
|
+
* Optional map of assets where the key is the asset identifier and the value is the Asset object.
|
|
232
|
+
* If not provided, defaults to the predefined assetsMap.
|
|
233
|
+
*/
|
|
234
|
+
assets?: Map<string, Asset>;
|
|
235
|
+
/**
|
|
236
|
+
* Optional map of chains where the key is the chain identifier and the value is the Chain object.
|
|
237
|
+
* If not provided, defaults to the predefined chainsMap.
|
|
238
|
+
*/
|
|
239
|
+
chains?: Map<string, AnyChain>;
|
|
240
|
+
/**
|
|
241
|
+
* Routes configuration.
|
|
242
|
+
*/
|
|
243
|
+
routes: Map<string, ChainRoutes | MrlChainRoutes>;
|
|
244
|
+
}
|
|
245
|
+
declare class ConfigService {
|
|
246
|
+
protected assets: Map<string, Asset>;
|
|
247
|
+
protected chains: Map<string, AnyChain>;
|
|
248
|
+
protected routes: Map<string, ChainRoutes | MrlChainRoutes>;
|
|
249
|
+
constructor(options: ConfigServiceOptions);
|
|
250
|
+
getAsset(keyOrAsset: string | Asset): Asset;
|
|
251
|
+
getEcosystemAssets(ecosystem?: Ecosystem): Asset[];
|
|
252
|
+
getChain(keyOrChain: string | AnyChain): AnyChain;
|
|
253
|
+
getChainRoutes(keyOrChain: string | AnyChain): ChainRoutes | MrlChainRoutes;
|
|
254
|
+
getSourceChains({ asset, ecosystem, }: {
|
|
255
|
+
asset?: string | Asset;
|
|
256
|
+
ecosystem?: Ecosystem;
|
|
257
|
+
}): AnyChain[];
|
|
258
|
+
getDestinationChains({ asset, source, }: {
|
|
259
|
+
asset?: string | AnyAsset;
|
|
260
|
+
source: string | AnyChain;
|
|
261
|
+
}): AnyChain[];
|
|
262
|
+
getAssetRoute({ asset, source, destination, }: {
|
|
263
|
+
asset: string | AnyAsset;
|
|
264
|
+
source: string | AnyChain;
|
|
265
|
+
destination: string | AnyChain;
|
|
266
|
+
}): AssetRoute | MrlAssetRoute;
|
|
267
|
+
getRouteAssets({ source, destination, }: {
|
|
268
|
+
source: string | AnyChain;
|
|
269
|
+
destination: string | AnyChain;
|
|
270
|
+
}): Asset[];
|
|
271
|
+
updateAsset(asset: Asset): void;
|
|
272
|
+
updateChain(chain: AnyChain): void;
|
|
273
|
+
updateChainRoute(route: ChainRoutes): void;
|
|
274
|
+
updateEndpoints(endpoints: {
|
|
275
|
+
[key: string]: {
|
|
276
|
+
rpc: string;
|
|
277
|
+
ws: string[];
|
|
278
|
+
};
|
|
279
|
+
}): void;
|
|
280
|
+
}
|
|
281
|
+
|
|
191
282
|
declare const acala: Parachain;
|
|
192
283
|
declare const alphanetAssetHub: Parachain;
|
|
193
284
|
declare const alphanetRelay: Parachain;
|
|
194
285
|
declare const astar: Parachain;
|
|
195
286
|
declare const bifrostKusama: Parachain;
|
|
196
287
|
declare const bifrostPolkadot: Parachain;
|
|
197
|
-
declare const calamari: Parachain;
|
|
198
288
|
declare const centrifuge: Parachain;
|
|
199
289
|
declare const crustShadow: Parachain;
|
|
200
290
|
declare const darwinia: EvmParachain;
|
|
201
291
|
declare const darwiniaCrab: EvmParachain;
|
|
202
|
-
declare const
|
|
203
|
-
declare const
|
|
204
|
-
declare const
|
|
205
|
-
declare const
|
|
206
|
-
declare const interlay: Parachain;
|
|
292
|
+
declare const ethereum: EvmChain;
|
|
293
|
+
declare const fantomTestnet: EvmChain;
|
|
294
|
+
declare const hydration: Parachain;
|
|
295
|
+
declare const hydrationAlphanet: Parachain;
|
|
207
296
|
declare const integritee: Parachain;
|
|
297
|
+
declare const interlay: Parachain;
|
|
208
298
|
declare const karura: Parachain;
|
|
209
|
-
declare const khala: Parachain;
|
|
210
299
|
declare const kintsugi: Parachain;
|
|
211
300
|
declare const kusama: Parachain;
|
|
212
301
|
declare const kusamaAssetHub: Parachain;
|
|
213
|
-
declare const litentryAlphanet: Parachain;
|
|
214
|
-
declare const litmus: Parachain;
|
|
215
302
|
declare const mangataKusama: Parachain;
|
|
303
|
+
declare const mantaParachain: Parachain;
|
|
304
|
+
declare const laosAlphanet: EvmParachain;
|
|
305
|
+
declare const laosMainnet: EvmParachain;
|
|
216
306
|
declare const moonbaseAlpha: EvmParachain;
|
|
217
307
|
declare const moonbaseBeta: EvmParachain;
|
|
308
|
+
declare const moonbaseStage: EvmParachain;
|
|
218
309
|
declare const moonbeam: EvmParachain;
|
|
219
310
|
declare const moonriver: EvmParachain;
|
|
220
|
-
declare const
|
|
221
|
-
declare const originTrail: Parachain;
|
|
311
|
+
declare const neuroweb: Parachain;
|
|
222
312
|
declare const originTrailAlphanet: Parachain;
|
|
223
|
-
declare const
|
|
224
|
-
declare const
|
|
313
|
+
declare const peaqAlphanet: Parachain;
|
|
314
|
+
declare const peaqChain: Parachain;
|
|
315
|
+
declare const peaqEvm: EvmParachain;
|
|
316
|
+
declare const peaqEvmAlphanet: EvmParachain;
|
|
317
|
+
declare const pendulum: Parachain;
|
|
318
|
+
declare const pendulumAlphanet: Parachain;
|
|
225
319
|
declare const phala: Parachain;
|
|
226
|
-
declare const picassoAlphanet: Parachain;
|
|
227
320
|
declare const polkadot: Parachain;
|
|
228
321
|
declare const polkadotAssetHub: Parachain;
|
|
229
322
|
declare const robonomics: Parachain;
|
|
230
323
|
declare const shiden: Parachain;
|
|
231
|
-
declare const turing: Parachain;
|
|
232
324
|
declare const turingAlphanet: Parachain;
|
|
233
|
-
declare const subsocialAlphanet: Parachain;
|
|
234
325
|
declare const uniqueAlpha: Parachain;
|
|
326
|
+
declare const zeitgeist: Parachain;
|
|
235
327
|
declare const chainsList: AnyChain[];
|
|
236
328
|
declare const chainsMap: Map<string, AnyChain>;
|
|
237
329
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
aca,
|
|
252
|
-
acala,
|
|
253
|
-
alan,
|
|
254
|
-
alphanetAssetHub,
|
|
255
|
-
alphanetRelay,
|
|
256
|
-
aseed,
|
|
257
|
-
assetsList,
|
|
258
|
-
assetsMap,
|
|
259
|
-
astar,
|
|
260
|
-
astr,
|
|
261
|
-
atom,
|
|
262
|
-
auq,
|
|
263
|
-
betaDEV,
|
|
264
|
-
bifrostKusama,
|
|
265
|
-
bifrostPolkadot,
|
|
266
|
-
bnc,
|
|
267
|
-
calamari,
|
|
268
|
-
centrifuge,
|
|
269
|
-
cfg,
|
|
270
|
-
chainsList,
|
|
271
|
-
chainsMap,
|
|
272
|
-
crab,
|
|
273
|
-
crustShadow,
|
|
274
|
-
csm,
|
|
275
|
-
dai,
|
|
276
|
-
darwinia,
|
|
277
|
-
darwiniaCrab,
|
|
278
|
-
darwiniaPangoro,
|
|
279
|
-
dev,
|
|
280
|
-
dot,
|
|
281
|
-
eq,
|
|
282
|
-
eqd,
|
|
283
|
-
equilibrium,
|
|
284
|
-
equilibriumAlphanet,
|
|
285
|
-
fil,
|
|
286
|
-
glmr,
|
|
287
|
-
hdx,
|
|
288
|
-
hko,
|
|
289
|
-
hydraDX,
|
|
290
|
-
ibtc,
|
|
291
|
-
integritee,
|
|
292
|
-
interlay,
|
|
293
|
-
intr,
|
|
294
|
-
kar,
|
|
295
|
-
karura,
|
|
296
|
-
kbtc,
|
|
297
|
-
khala,
|
|
298
|
-
kint,
|
|
299
|
-
kintsugi,
|
|
300
|
-
kma,
|
|
301
|
-
ksm,
|
|
302
|
-
kusama,
|
|
303
|
-
kusamaAssetHub,
|
|
304
|
-
lit,
|
|
305
|
-
litentryAlphanet,
|
|
306
|
-
litmus,
|
|
307
|
-
mangataKusama,
|
|
308
|
-
mgx,
|
|
309
|
-
moonbaseAlpha,
|
|
310
|
-
moonbaseBeta,
|
|
311
|
-
moonbeam,
|
|
312
|
-
moonriver,
|
|
313
|
-
movr,
|
|
314
|
-
nodl,
|
|
315
|
-
nodle,
|
|
316
|
-
originTrail,
|
|
317
|
-
originTrailAlphanet,
|
|
318
|
-
otp,
|
|
319
|
-
para,
|
|
320
|
-
parallel,
|
|
321
|
-
parallelHeiko,
|
|
322
|
-
paring,
|
|
323
|
-
pha,
|
|
324
|
-
phala,
|
|
325
|
-
pica,
|
|
326
|
-
picassoAlphanet,
|
|
327
|
-
polkadot,
|
|
328
|
-
polkadotAssetHub,
|
|
329
|
-
ring,
|
|
330
|
-
rmrk,
|
|
331
|
-
robonomics,
|
|
332
|
-
sdn,
|
|
333
|
-
shiden,
|
|
334
|
-
soon,
|
|
335
|
-
subsocialAlphanet,
|
|
336
|
-
teer,
|
|
337
|
-
tt1,
|
|
338
|
-
tur,
|
|
339
|
-
turing,
|
|
340
|
-
turingAlphanet,
|
|
341
|
-
uniqueAlpha,
|
|
342
|
-
unit,
|
|
343
|
-
usdc,
|
|
344
|
-
usdt,
|
|
345
|
-
vbnc,
|
|
346
|
-
vdot,
|
|
347
|
-
vfil,
|
|
348
|
-
vglmr,
|
|
349
|
-
vksm,
|
|
350
|
-
vmovr,
|
|
351
|
-
wbtc,
|
|
352
|
-
weth,
|
|
353
|
-
wftm,
|
|
354
|
-
xrt,
|
|
355
|
-
};
|
|
330
|
+
declare function getKey(keyOrModel: string | AnyAsset | AnyChain): string;
|
|
331
|
+
declare function getMoonChain(chain: AnyChain): EvmParachain;
|
|
332
|
+
|
|
333
|
+
declare const crossEcosystemsRoutesList: ChainRoutes[];
|
|
334
|
+
declare const crossEcosystemsRoutesMap: Map<string, ChainRoutes>;
|
|
335
|
+
|
|
336
|
+
declare const mrlRoutesList: MrlChainRoutes[];
|
|
337
|
+
declare const mrlRoutesMap: Map<string, MrlChainRoutes>;
|
|
338
|
+
|
|
339
|
+
declare const xcmRoutesList: ChainRoutes[];
|
|
340
|
+
declare const xcmRoutesMap: Map<string, ChainRoutes>;
|
|
341
|
+
|
|
342
|
+
export { AssetRoute, type AssetRouteConstructorParams, ChainRoutes, type ChainRoutesConstructorParams, ConfigService, type ConfigServiceOptions, type DestinationChecker, type DestinationConfig, type DestinationEventConfig, type DestinationFeeConfig, type EventConfig, type FeeConfig, type MonitoringBuilderConfig, type MonitoringConfig, type MoonChainConfig, type MoonChainFeeConfig, MrlAssetRoute, type MrlAssetRouteConstructorParams, MrlChainRoutes, type MrlChainRoutesConstructorParams, type MrlConfig, type MrlSourceConfig, type SourceChecker, type SourceConfig, type SourceEventConfig, aca, acala, agng, alan, alphanetAssetHub, alphanetRelay, ampe, apillon, aseed, assetsList, assetsMap, astar, astr, auq, axlusdc, bifrostKusama, bifrostPolkadot, bnc, bncs, centrifuge, cfg, chainsList, chainsMap, crab, crossEcosystemsRoutesList, crossEcosystemsRoutesMap, crustShadow, csm, dai, darwinia, darwiniaCrab, ded, dev, devBeta, devStage, dot, eq, eqd, eth, ethereum, eurc, fantomTestnet, fil, ftm, ftmwh, getKey, getMoonChain, glmr, hdx, hydration, hydrationAlphanet, ibtc, integritee, interlay, intr, kar, karura, kbtc, kint, kintsugi, ksm, kusama, kusamaAssetHub, laos, laosAlphanet, laosMainnet, ldot, lit, mangataKusama, manta, mantaParachain, maos, mgx, moonbaseAlpha, moonbaseBeta, moonbaseStage, moonbeam, moonriver, movr, mrlRoutesList, mrlRoutesMap, neuro, neuroweb, nodl, originTrailAlphanet, otp, para, paring, peaq, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pen, pendulum, pendulumAlphanet, pha, phala, pica, pink, polkadot, polkadotAssetHub, ring, rmrk, robonomics, sdn, shiden, soon, stink, sub, teer, tnkr, tt1, tur, turingAlphanet, uniqueAlpha, unit, usdc, usdcwh, usdt, usdtwh, vastr, vbnc, vdot, vfil, vglmr, vksm, vmanta, vmovr, wbtc, wbtce, weth, wethe, wftm, wifd, wstethe, xcmRoutesList, xcmRoutesMap, xrt, zeitgeist, ztg };
|