@moonbeam-network/xcm-config 1.0.0-dev.163 → 1.0.0-dev.165
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 +14 -8
- package/build/index.d.ts +21 -21
- package/build/index.mjs +216 -238
- package/build/index.mjs.map +1 -1
- package/package.json +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,12 +1,11 @@
|
|
|
1
1
|
import { Asset, AnyChain, SetOptional, ChainAsset, AnyAsset, Ecosystem, Parachain, EvmParachain, EvmChain } from '@moonbeam-network/xcm-types';
|
|
2
|
-
import { ContractConfigBuilder, ExtrinsicConfigBuilder, BalanceConfigBuilder, AssetMinConfigBuilder,
|
|
2
|
+
import { ContractConfigBuilder, ExtrinsicConfigBuilder, BalanceConfigBuilder, AssetMinConfigBuilder, FeeConfigBuilder, MrlConfigBuilder } from '@moonbeam-network/xcm-builder';
|
|
3
3
|
|
|
4
4
|
interface AssetRouteConstructorParams {
|
|
5
5
|
source: SourceConfig;
|
|
6
6
|
destination: DestinationConfig;
|
|
7
7
|
contract?: ContractConfigBuilder;
|
|
8
8
|
extrinsic?: ExtrinsicConfigBuilder;
|
|
9
|
-
mrl?: MrlConfig;
|
|
10
9
|
}
|
|
11
10
|
interface SourceConfig {
|
|
12
11
|
asset: Asset;
|
|
@@ -27,29 +26,15 @@ interface FeeConfig {
|
|
|
27
26
|
balance: BalanceConfigBuilder;
|
|
28
27
|
extra?: number;
|
|
29
28
|
}
|
|
30
|
-
interface MrlConfig {
|
|
31
|
-
isAutomaticPossible: boolean;
|
|
32
|
-
transfer: MrlConfigBuilder;
|
|
33
|
-
moonChain: MoonChainConfig;
|
|
34
|
-
}
|
|
35
29
|
interface DestinationFeeConfig extends SetOptional<FeeConfig, 'balance'> {
|
|
36
30
|
amount: number | FeeConfigBuilder;
|
|
37
31
|
}
|
|
38
|
-
interface MoonChainConfig {
|
|
39
|
-
asset: Asset;
|
|
40
|
-
balance: BalanceConfigBuilder;
|
|
41
|
-
fee: MoonChainFeeConfig;
|
|
42
|
-
}
|
|
43
|
-
interface MoonChainFeeConfig extends FeeConfig {
|
|
44
|
-
amount: number | FeeConfigBuilder;
|
|
45
|
-
}
|
|
46
32
|
declare class AssetRoute {
|
|
47
33
|
readonly source: SourceConfig;
|
|
48
34
|
readonly destination: DestinationConfig;
|
|
49
35
|
readonly contract?: ContractConfigBuilder;
|
|
50
36
|
readonly extrinsic?: ExtrinsicConfigBuilder;
|
|
51
|
-
|
|
52
|
-
constructor({ source, destination, contract, extrinsic, mrl, }: AssetRouteConstructorParams);
|
|
37
|
+
constructor({ source, destination, contract, extrinsic, }: AssetRouteConstructorParams);
|
|
53
38
|
getDestinationFeeAssetOnSource(): ChainAsset;
|
|
54
39
|
}
|
|
55
40
|
|
|
@@ -61,8 +46,8 @@ interface RoutesParam extends Omit<AssetRouteConstructorParams, 'source'> {
|
|
|
61
46
|
source: Omit<SourceConfig, 'chain'>;
|
|
62
47
|
}
|
|
63
48
|
declare class ChainRoutes {
|
|
64
|
-
#private;
|
|
65
49
|
readonly chain: AnyChain;
|
|
50
|
+
protected routes: Map<string, AssetRoute>;
|
|
66
51
|
constructor({ chain, routes }: ChainRoutesConstructorParams);
|
|
67
52
|
getRoutes(): AssetRoute[];
|
|
68
53
|
getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[];
|
|
@@ -73,6 +58,12 @@ declare class ChainRoutes {
|
|
|
73
58
|
|
|
74
59
|
interface MrlAssetRouteConstructorParams extends AssetRouteConstructorParams {
|
|
75
60
|
source: MrlSourceConfig;
|
|
61
|
+
mrl: MrlConfig;
|
|
62
|
+
}
|
|
63
|
+
interface MrlConfig {
|
|
64
|
+
isAutomaticPossible: boolean;
|
|
65
|
+
transfer: MrlConfigBuilder;
|
|
66
|
+
moonChain: MoonChainConfig;
|
|
76
67
|
}
|
|
77
68
|
interface MrlSourceConfig extends SourceConfig {
|
|
78
69
|
moonChainFee?: {
|
|
@@ -80,7 +71,16 @@ interface MrlSourceConfig extends SourceConfig {
|
|
|
80
71
|
balance: BalanceConfigBuilder;
|
|
81
72
|
};
|
|
82
73
|
}
|
|
74
|
+
interface MoonChainConfig {
|
|
75
|
+
asset: Asset;
|
|
76
|
+
balance: BalanceConfigBuilder;
|
|
77
|
+
fee: MoonChainFeeConfig;
|
|
78
|
+
}
|
|
79
|
+
interface MoonChainFeeConfig extends FeeConfig {
|
|
80
|
+
amount: number | FeeConfigBuilder;
|
|
81
|
+
}
|
|
83
82
|
declare class MrlAssetRoute extends AssetRoute {
|
|
83
|
+
readonly mrl: MrlConfig;
|
|
84
84
|
readonly source: MrlSourceConfig;
|
|
85
85
|
constructor({ source, destination, contract, extrinsic, mrl, }: MrlAssetRouteConstructorParams & {
|
|
86
86
|
source: MrlSourceConfig;
|
|
@@ -94,9 +94,10 @@ interface MrlRoutesParam extends Omit<MrlAssetRouteConstructorParams, 'source'>
|
|
|
94
94
|
source: Omit<MrlSourceConfig, 'chain'>;
|
|
95
95
|
}
|
|
96
96
|
declare class MrlChainRoutes extends ChainRoutes {
|
|
97
|
-
|
|
97
|
+
protected routes: Map<string, MrlAssetRoute>;
|
|
98
98
|
constructor({ chain, routes }: MrlChainRoutesConstructorParams);
|
|
99
99
|
getRoutes(): MrlAssetRoute[];
|
|
100
|
+
getAssetRoute(asset: string | AnyAsset, destination: string | AnyChain): MrlAssetRoute;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
interface ConfigServiceOptions {
|
|
@@ -264,7 +265,6 @@ declare const polkadotAssetHub: Parachain;
|
|
|
264
265
|
declare const robonomics: Parachain;
|
|
265
266
|
declare const shiden: Parachain;
|
|
266
267
|
declare const subsocial: Parachain;
|
|
267
|
-
declare const tinkernet: Parachain;
|
|
268
268
|
declare const turing: Parachain;
|
|
269
269
|
declare const turingAlphanet: Parachain;
|
|
270
270
|
declare const uniqueAlpha: Parachain;
|
|
@@ -281,4 +281,4 @@ declare const mrlRoutesMap: Map<string, MrlChainRoutes>;
|
|
|
281
281
|
declare const xcmRoutesList: ChainRoutes[];
|
|
282
282
|
declare const xcmRoutesMap: Map<string, ChainRoutes>;
|
|
283
283
|
|
|
284
|
-
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, aca, acala, agng, alan, alphanetAssetHub, alphanetRelay, ampe, apillon, aseed, assetsList, assetsMap, astar, astr, atom, auq, axlusdc, betaDEV, bifrostKusama, bifrostPolkadot, bnc, bncs, calamari, centrifuge, cfg, chainsList, chainsMap, crab, crustShadow, csm, dai, darwinia, darwiniaCrab, ded, dev, dot, eq, eqd, eth, ethereum, fantomTestnet, fil, ftm, ftmwh, getKey, getMoonChain, glmr, hdx, hydration, hydrationAlphanet, ibtc, integritee, interlay, intr, kar, karura, kbtc, khala, kint, kintsugi, kma, ksm, kusama, kusamaAssetHub, ldot, lit, mangataKusama, manta, mantaParachain, mgx, moonbaseAlpha, moonbaseBeta, moonbeam, moonriver, movr, mrlRoutesList, mrlRoutesMap, neuro, neuroweb, nodl, originTrailAlphanet, otp, para, paring, peaq, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pen, pendulum, pendulumAlphanet, pha, phala, pica, picasso, picassoAlphanet, pink, polkadot, polkadotAssetHub, ring, rmrk, robonomics, sdn, shiden, soon, stink, sub, subsocial, teer,
|
|
284
|
+
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, aca, acala, agng, alan, alphanetAssetHub, alphanetRelay, ampe, apillon, aseed, assetsList, assetsMap, astar, astr, atom, auq, axlusdc, betaDEV, bifrostKusama, bifrostPolkadot, bnc, bncs, calamari, centrifuge, cfg, chainsList, chainsMap, crab, crustShadow, csm, dai, darwinia, darwiniaCrab, ded, dev, dot, eq, eqd, eth, ethereum, fantomTestnet, fil, ftm, ftmwh, getKey, getMoonChain, glmr, hdx, hydration, hydrationAlphanet, ibtc, integritee, interlay, intr, kar, karura, kbtc, khala, kint, kintsugi, kma, ksm, kusama, kusamaAssetHub, ldot, lit, mangataKusama, manta, mantaParachain, mgx, moonbaseAlpha, moonbaseBeta, moonbeam, moonriver, movr, mrlRoutesList, mrlRoutesMap, neuro, neuroweb, nodl, originTrailAlphanet, otp, para, paring, peaq, peaqAlphanet, peaqChain, peaqEvm, peaqEvmAlphanet, pen, pendulum, pendulumAlphanet, pha, phala, pica, picasso, picassoAlphanet, pink, polkadot, polkadotAssetHub, ring, rmrk, robonomics, sdn, shiden, soon, stink, sub, subsocial, teer, tnkr, tt1, tur, turing, 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 };
|