@moonbeam-network/xcm-config 1.0.0-dev.240 → 1.0.0-dev.242
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/build/assets.d.ts +4 -3
- package/build/assets.mjs +7 -5
- package/build/chains.mjs +2 -2
- package/build/{chunk-EPEG6T7K.mjs → chunk-ANZ5O3HM.mjs} +17 -11
- package/build/chunk-ANZ5O3HM.mjs.map +1 -0
- package/build/{chunk-B3S2H2Z4.mjs → chunk-XQKX4PX2.mjs} +53 -10
- package/build/chunk-XQKX4PX2.mjs.map +1 -0
- package/build/index.d.ts +175 -12
- package/build/index.mjs +7672 -36
- package/build/index.mjs.map +1 -1
- package/package.json +4 -4
- package/build/chunk-23FA33VA.mjs +0 -127
- package/build/chunk-23FA33VA.mjs.map +0 -1
- package/build/chunk-4KU7G625.mjs +0 -59
- package/build/chunk-4KU7G625.mjs.map +0 -1
- package/build/chunk-AACHRWYT.mjs +0 -32
- package/build/chunk-AACHRWYT.mjs.map +0 -1
- package/build/chunk-B3S2H2Z4.mjs.map +0 -1
- package/build/chunk-BE5TS2QQ.mjs +0 -25
- package/build/chunk-BE5TS2QQ.mjs.map +0 -1
- package/build/chunk-EPEG6T7K.mjs.map +0 -1
- package/build/chunk-IHY6QF2X.mjs +0 -5759
- package/build/chunk-IHY6QF2X.mjs.map +0 -1
- package/build/chunk-JBQOYNQY.mjs +0 -31
- package/build/chunk-JBQOYNQY.mjs.map +0 -1
- package/build/chunk-WZ3E3RZB.mjs +0 -1378
- package/build/chunk-WZ3E3RZB.mjs.map +0 -1
- package/build/chunk-Y5YMRWCV.mjs +0 -38
- package/build/chunk-Y5YMRWCV.mjs.map +0 -1
- package/build/chunk-ZKK445MT.mjs +0 -210
- package/build/chunk-ZKK445MT.mjs.map +0 -1
- package/build/config-service.d.ts +0 -65
- package/build/config-service.mjs +0 -10
- package/build/config-service.mjs.map +0 -1
- package/build/config-utils.d.ts +0 -6
- package/build/config-utils.mjs +0 -11
- package/build/config-utils.mjs.map +0 -1
- package/build/cross-ecosystem-configs.d.ts +0 -9
- package/build/cross-ecosystem-configs.mjs +0 -14
- package/build/cross-ecosystem-configs.mjs.map +0 -1
- package/build/mrl-configs.d.ts +0 -11
- package/build/mrl-configs.mjs +0 -16
- package/build/mrl-configs.mjs.map +0 -1
- package/build/types/asset-route.d.ts +0 -43
- package/build/types/asset-route.mjs +0 -7
- package/build/types/asset-route.mjs.map +0 -1
- package/build/types/chain-routes.d.ts +0 -23
- package/build/types/chain-routes.mjs +0 -11
- package/build/types/chain-routes.mjs.map +0 -1
- package/build/types/mrl-asset-route.d.ts +0 -36
- package/build/types/mrl-asset-route.mjs +0 -8
- package/build/types/mrl-asset-route.mjs.map +0 -1
- package/build/types/mrl-chain-routes.d.ts +0 -20
- package/build/types/mrl-chain-routes.mjs +0 -13
- package/build/types/mrl-chain-routes.mjs.map +0 -1
- package/build/xcm-configs.d.ts +0 -9
- package/build/xcm-configs.mjs +0 -14
- package/build/xcm-configs.mjs.map +0 -1
package/build/index.d.ts
CHANGED
|
@@ -1,13 +1,176 @@
|
|
|
1
|
-
export { aca, agng, alan, ampe, apillon, aseed, assetsList, assetsMap, astr, auq, axlusdc, bnc, cfg, crab, csm, dai, ded, dev, devBeta, devStage, dot, eq, eqd, eth, eurc, fil, ftm, ftmwh, glmr, hdx, ibtc, intr, kar, kbtc, kint, ksm,
|
|
2
|
-
|
|
1
|
+
export { aca, agng, alan, ampe, apillon, aseed, assetsList, assetsMap, astr, auq, axlusdc, bnc, cfg, crab, csm, dai, ded, dev, devBeta, devStage, dot, eq, eqd, eth, eurc, fil, ftm, ftmwh, glmr, hdx, ibtc, intr, kar, kbtc, kint, ksm, lamaGLMR, laos, ldot, lit, manta, maos, movr, neuro, nodl, otp, para, paring, peaq, pen, pha, pica, pink, pizza, pizzaUSDC, ring, rmrk, samaMOVR, sdn, soon, stink, sub, teer, tnkr, tt1, tur, unit, usdc, usdcwh, usdt, usdtwh, vastr, vbnc, vdot, vfil, vglmr, vksm, vmanta, vmovr, wbtc, wbtce, weth, wethe, wftm, wifd, wstethe, xrt, ztg } from './assets.js';
|
|
2
|
+
import { Asset, AnyChain, SetOptional, ChainAsset, AnyAsset, Ecosystem, EvmParachain } from '@moonbeam-network/xcm-types';
|
|
3
|
+
import { BalanceConfigBuilder, AssetMinConfigBuilder, FeeConfigBuilder, ContractConfigBuilder, ExtrinsicConfigBuilder, EventMonitoringConfig, MrlConfigBuilder } from '@moonbeam-network/xcm-builder';
|
|
3
4
|
export { acala, alphanetAssetHub, alphanetRelay, astar, bifrostKusama, bifrostPolkadot, centrifuge, chainsList, chainsMap, crustShadow, darwinia, darwiniaCrab, ethereum, fantomTestnet, hydration, hydrationAlphanet, integritee, interlay, karura, kintsugi, kusama, kusamaAssetHub, laosAlphanet, laosMainnet, mantaParachain, moonbaseAlpha, moonbaseBeta, moonbaseStage, moonbeam, moonlama, moonriver, moonsama, neuroweb, originTrailAlphanet, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pendulum, pendulumAlphanet, phala, polkadot, polkadotAssetHub, robonomics, shiden, turingAlphanet, uniqueAlpha, zeitgeist } from './chains.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
|
|
6
|
+
interface AssetRouteConstructorParams {
|
|
7
|
+
source: SourceConfig;
|
|
8
|
+
destination: DestinationConfig;
|
|
9
|
+
contract?: ContractConfigBuilder;
|
|
10
|
+
extrinsic?: ExtrinsicConfigBuilder;
|
|
11
|
+
monitoring?: EventMonitoringConfig;
|
|
12
|
+
}
|
|
13
|
+
interface SourceConfig {
|
|
14
|
+
asset: Asset;
|
|
15
|
+
chain: AnyChain;
|
|
16
|
+
balance: BalanceConfigBuilder;
|
|
17
|
+
fee: FeeConfig;
|
|
18
|
+
destinationFee?: {
|
|
19
|
+
asset?: Asset;
|
|
20
|
+
balance: BalanceConfigBuilder;
|
|
21
|
+
};
|
|
22
|
+
min?: AssetMinConfigBuilder;
|
|
23
|
+
}
|
|
24
|
+
interface DestinationConfig extends Omit<SourceConfig, 'fee'> {
|
|
25
|
+
fee: DestinationFeeConfig;
|
|
26
|
+
}
|
|
27
|
+
interface FeeConfig {
|
|
28
|
+
asset: Asset;
|
|
29
|
+
balance: BalanceConfigBuilder;
|
|
30
|
+
extra?: number;
|
|
31
|
+
}
|
|
32
|
+
interface DestinationFeeConfig extends SetOptional<FeeConfig, 'balance'> {
|
|
33
|
+
amount: number | FeeConfigBuilder;
|
|
34
|
+
}
|
|
35
|
+
declare class AssetRoute {
|
|
36
|
+
readonly source: SourceConfig;
|
|
37
|
+
readonly destination: DestinationConfig;
|
|
38
|
+
readonly contract?: ContractConfigBuilder;
|
|
39
|
+
readonly extrinsic?: ExtrinsicConfigBuilder;
|
|
40
|
+
readonly monitoring?: EventMonitoringConfig;
|
|
41
|
+
constructor({ source, destination, contract, extrinsic, monitoring, }: AssetRouteConstructorParams);
|
|
42
|
+
getDestinationFeeAssetOnSource(): ChainAsset;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface ChainRoutesConstructorParams {
|
|
46
|
+
chain: AnyChain;
|
|
47
|
+
routes: RoutesParam[];
|
|
48
|
+
}
|
|
49
|
+
interface RoutesParam extends Omit<AssetRouteConstructorParams, 'source'> {
|
|
50
|
+
source: Omit<SourceConfig, 'chain'>;
|
|
51
|
+
}
|
|
52
|
+
declare class ChainRoutes {
|
|
53
|
+
readonly chain: AnyChain;
|
|
54
|
+
protected routes: Map<string, AssetRoute>;
|
|
55
|
+
constructor({ chain, routes }: ChainRoutesConstructorParams);
|
|
56
|
+
getRoutes(): AssetRoute[];
|
|
57
|
+
getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[];
|
|
58
|
+
getAssetDestinations(keyOrAsset: string | AnyAsset): AnyChain[];
|
|
59
|
+
getDestinationAssets(keyOrChain: string | AnyChain): Asset[];
|
|
60
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): AssetRoute;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface MrlAssetRouteConstructorParams extends AssetRouteConstructorParams {
|
|
64
|
+
source: MrlSourceConfig;
|
|
65
|
+
mrl: MrlConfig;
|
|
66
|
+
}
|
|
67
|
+
interface MrlConfig {
|
|
68
|
+
isAutomaticPossible: boolean;
|
|
69
|
+
transfer: MrlConfigBuilder;
|
|
70
|
+
moonChain: MoonChainConfig;
|
|
71
|
+
}
|
|
72
|
+
interface MrlSourceConfig extends SourceConfig {
|
|
73
|
+
moonChainFee?: {
|
|
74
|
+
asset: Asset;
|
|
75
|
+
balance: BalanceConfigBuilder;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
interface MoonChainConfig {
|
|
79
|
+
asset: Asset;
|
|
80
|
+
balance: BalanceConfigBuilder;
|
|
81
|
+
fee: MoonChainFeeConfig;
|
|
82
|
+
}
|
|
83
|
+
interface MoonChainFeeConfig extends FeeConfig {
|
|
84
|
+
amount: number | FeeConfigBuilder;
|
|
85
|
+
}
|
|
86
|
+
declare class MrlAssetRoute extends AssetRoute {
|
|
87
|
+
readonly mrl: MrlConfig;
|
|
88
|
+
readonly source: MrlSourceConfig;
|
|
89
|
+
constructor({ source, destination, contract, extrinsic, mrl, }: MrlAssetRouteConstructorParams & {
|
|
90
|
+
source: MrlSourceConfig;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface MrlChainRoutesConstructorParams extends ChainRoutesConstructorParams {
|
|
95
|
+
routes: MrlRoutesParam[];
|
|
96
|
+
}
|
|
97
|
+
interface MrlRoutesParam extends Omit<MrlAssetRouteConstructorParams, 'source'> {
|
|
98
|
+
source: Omit<MrlSourceConfig, 'chain'>;
|
|
99
|
+
}
|
|
100
|
+
declare class MrlChainRoutes extends ChainRoutes {
|
|
101
|
+
protected routes: Map<string, MrlAssetRoute>;
|
|
102
|
+
constructor({ chain, routes }: MrlChainRoutesConstructorParams);
|
|
103
|
+
getRoutes(): MrlAssetRoute[];
|
|
104
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): MrlAssetRoute;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Configuration options for initializing the ConfigService.
|
|
109
|
+
* This interface defines the structure for configuring assets, chains, routes, and endpoints.
|
|
110
|
+
*/
|
|
111
|
+
interface ConfigServiceOptions {
|
|
112
|
+
/**
|
|
113
|
+
* Optional map of assets where the key is the asset identifier and the value is the Asset object.
|
|
114
|
+
* If not provided, defaults to the predefined assetsMap.
|
|
115
|
+
*/
|
|
116
|
+
assets?: Map<string, Asset>;
|
|
117
|
+
/**
|
|
118
|
+
* Optional map of chains where the key is the chain identifier and the value is the Chain object.
|
|
119
|
+
* If not provided, defaults to the predefined chainsMap.
|
|
120
|
+
*/
|
|
121
|
+
chains?: Map<string, AnyChain>;
|
|
122
|
+
/**
|
|
123
|
+
* Routes configuration.
|
|
124
|
+
*/
|
|
125
|
+
routes: Map<string, ChainRoutes | MrlChainRoutes>;
|
|
126
|
+
}
|
|
127
|
+
declare class ConfigService {
|
|
128
|
+
protected assets: Map<string, Asset>;
|
|
129
|
+
protected chains: Map<string, AnyChain>;
|
|
130
|
+
protected routes: Map<string, ChainRoutes | MrlChainRoutes>;
|
|
131
|
+
constructor(options: ConfigServiceOptions);
|
|
132
|
+
getAsset(keyOrAsset: string | Asset): Asset;
|
|
133
|
+
getEcosystemAssets(ecosystem?: Ecosystem): Asset[];
|
|
134
|
+
getChain(keyOrChain: string | AnyChain): AnyChain;
|
|
135
|
+
getChainRoutes(keyOrChain: string | AnyChain): ChainRoutes | MrlChainRoutes;
|
|
136
|
+
getSourceChains({ asset, ecosystem, }: {
|
|
137
|
+
asset?: string | Asset;
|
|
138
|
+
ecosystem?: Ecosystem;
|
|
139
|
+
}): AnyChain[];
|
|
140
|
+
getDestinationChains({ asset, source, }: {
|
|
141
|
+
asset?: string | AnyAsset;
|
|
142
|
+
source: string | AnyChain;
|
|
143
|
+
}): AnyChain[];
|
|
144
|
+
getAssetRoute({ asset, source, destination, }: {
|
|
145
|
+
asset: string | AnyAsset;
|
|
146
|
+
source: string | AnyChain;
|
|
147
|
+
destination: string | AnyChain;
|
|
148
|
+
}): AssetRoute | MrlAssetRoute;
|
|
149
|
+
getRouteAssets({ source, destination, }: {
|
|
150
|
+
source: string | AnyChain;
|
|
151
|
+
destination: string | AnyChain;
|
|
152
|
+
}): Asset[];
|
|
153
|
+
updateAsset(asset: Asset): void;
|
|
154
|
+
updateChain(chain: AnyChain): void;
|
|
155
|
+
updateChainRoute(route: ChainRoutes): void;
|
|
156
|
+
updateEndpoints(endpoints: {
|
|
157
|
+
[key: string]: {
|
|
158
|
+
rpc: string;
|
|
159
|
+
ws: string[];
|
|
160
|
+
};
|
|
161
|
+
}): void;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
declare function getKey(keyOrModel: string | AnyAsset | AnyChain): string;
|
|
165
|
+
declare function getMoonChain(chain: AnyChain): EvmParachain;
|
|
166
|
+
|
|
167
|
+
declare const crossEcosystemsRoutesList: ChainRoutes[];
|
|
168
|
+
declare const crossEcosystemsRoutesMap: Map<string, ChainRoutes>;
|
|
169
|
+
|
|
170
|
+
declare const mrlRoutesList: MrlChainRoutes[];
|
|
171
|
+
declare const mrlRoutesMap: Map<string, MrlChainRoutes>;
|
|
172
|
+
|
|
173
|
+
declare const xcmRoutesList: ChainRoutes[];
|
|
174
|
+
declare const xcmRoutesMap: Map<string, ChainRoutes>;
|
|
175
|
+
|
|
176
|
+
export { AssetRoute, type AssetRouteConstructorParams, ChainRoutes, type ChainRoutesConstructorParams, ConfigService, type ConfigServiceOptions, type DestinationConfig, type DestinationFeeConfig, type FeeConfig, type MoonChainConfig, type MoonChainFeeConfig, MrlAssetRoute, type MrlAssetRouteConstructorParams, MrlChainRoutes, type MrlChainRoutesConstructorParams, type MrlConfig, type MrlSourceConfig, type SourceConfig, crossEcosystemsRoutesList, crossEcosystemsRoutesMap, getKey, getMoonChain, mrlRoutesList, mrlRoutesMap, xcmRoutesList, xcmRoutesMap };
|