@moonbeam-network/xcm-config 1.0.0-dev.24 → 1.0.0-dev.240
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/assets.d.ts +91 -0
- package/build/assets.mjs +179 -0
- package/build/assets.mjs.map +1 -0
- package/build/chains.d.ts +52 -0
- package/build/chains.mjs +102 -0
- package/build/chains.mjs.map +1 -0
- package/build/chunk-23FA33VA.mjs +127 -0
- package/build/chunk-23FA33VA.mjs.map +1 -0
- package/build/chunk-4KU7G625.mjs +59 -0
- package/build/chunk-4KU7G625.mjs.map +1 -0
- package/build/chunk-AACHRWYT.mjs +32 -0
- package/build/chunk-AACHRWYT.mjs.map +1 -0
- package/build/chunk-B3S2H2Z4.mjs +2329 -0
- package/build/chunk-B3S2H2Z4.mjs.map +1 -0
- package/build/chunk-BE5TS2QQ.mjs +25 -0
- package/build/chunk-BE5TS2QQ.mjs.map +1 -0
- package/build/chunk-EPEG6T7K.mjs +523 -0
- package/build/chunk-EPEG6T7K.mjs.map +1 -0
- package/build/chunk-IHY6QF2X.mjs +5759 -0
- package/build/chunk-IHY6QF2X.mjs.map +1 -0
- package/build/chunk-JBQOYNQY.mjs +31 -0
- package/build/chunk-JBQOYNQY.mjs.map +1 -0
- package/build/chunk-WZ3E3RZB.mjs +1378 -0
- package/build/chunk-WZ3E3RZB.mjs.map +1 -0
- package/build/chunk-Y5YMRWCV.mjs +38 -0
- package/build/chunk-Y5YMRWCV.mjs.map +1 -0
- package/build/chunk-ZKK445MT.mjs +210 -0
- package/build/chunk-ZKK445MT.mjs.map +1 -0
- package/build/config-service.d.ts +65 -0
- package/build/config-service.mjs +10 -0
- package/build/config-service.mjs.map +1 -0
- package/build/config-utils.d.ts +6 -0
- package/build/config-utils.mjs +11 -0
- package/build/config-utils.mjs.map +1 -0
- package/build/cross-ecosystem-configs.d.ts +9 -0
- package/build/cross-ecosystem-configs.mjs +14 -0
- package/build/cross-ecosystem-configs.mjs.map +1 -0
- package/build/index.d.ts +13 -359
- package/build/index.mjs +320 -1
- package/build/index.mjs.map +1 -1
- package/build/mrl-configs.d.ts +11 -0
- package/build/mrl-configs.mjs +16 -0
- package/build/mrl-configs.mjs.map +1 -0
- package/build/types/asset-route.d.ts +43 -0
- package/build/types/asset-route.mjs +7 -0
- package/build/types/asset-route.mjs.map +1 -0
- package/build/types/chain-routes.d.ts +23 -0
- package/build/types/chain-routes.mjs +11 -0
- package/build/types/chain-routes.mjs.map +1 -0
- package/build/types/mrl-asset-route.d.ts +36 -0
- package/build/types/mrl-asset-route.mjs +8 -0
- package/build/types/mrl-asset-route.mjs.map +1 -0
- package/build/types/mrl-chain-routes.d.ts +20 -0
- package/build/types/mrl-chain-routes.mjs +13 -0
- package/build/types/mrl-chain-routes.mjs.map +1 -0
- package/build/xcm-configs.d.ts +9 -0
- package/build/xcm-configs.mjs +14 -0
- package/build/xcm-configs.mjs.map +1 -0
- package/package.json +36 -32
- package/build/index.cjs +0 -2
- package/build/index.cjs.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/types/AssetRoute.ts
|
|
2
|
+
var AssetRoute = class {
|
|
3
|
+
source;
|
|
4
|
+
destination;
|
|
5
|
+
contract;
|
|
6
|
+
extrinsic;
|
|
7
|
+
monitoring;
|
|
8
|
+
constructor({
|
|
9
|
+
source,
|
|
10
|
+
destination,
|
|
11
|
+
contract,
|
|
12
|
+
extrinsic,
|
|
13
|
+
monitoring
|
|
14
|
+
}) {
|
|
15
|
+
this.source = source;
|
|
16
|
+
this.destination = destination;
|
|
17
|
+
this.contract = contract;
|
|
18
|
+
this.extrinsic = extrinsic;
|
|
19
|
+
this.monitoring = monitoring;
|
|
20
|
+
}
|
|
21
|
+
getDestinationFeeAssetOnSource() {
|
|
22
|
+
return this.source.chain.getChainAsset(
|
|
23
|
+
this.source.destinationFee?.asset || this.destination.fee.asset
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
AssetRoute
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-JBQOYNQY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/AssetRoute.ts"],"sourcesContent":["import type {\n AssetMinConfigBuilder,\n BalanceConfigBuilder,\n ContractConfigBuilder,\n EventMonitoringConfig,\n ExtrinsicConfigBuilder,\n FeeConfigBuilder,\n} from '@moonbeam-network/xcm-builder';\nimport type {\n AnyChain,\n Asset,\n ChainAsset,\n SetOptional,\n} from '@moonbeam-network/xcm-types';\n\nexport interface AssetRouteConstructorParams {\n source: SourceConfig;\n destination: DestinationConfig;\n contract?: ContractConfigBuilder;\n extrinsic?: ExtrinsicConfigBuilder;\n monitoring?: EventMonitoringConfig;\n}\n\nexport interface SourceConfig {\n asset: Asset;\n chain: AnyChain;\n balance: BalanceConfigBuilder;\n fee: FeeConfig;\n destinationFee?: {\n asset?: Asset;\n balance: BalanceConfigBuilder;\n };\n min?: AssetMinConfigBuilder;\n}\n\nexport interface DestinationConfig extends Omit<SourceConfig, 'fee'> {\n fee: DestinationFeeConfig;\n}\n\nexport interface FeeConfig {\n asset: Asset;\n balance: BalanceConfigBuilder;\n // NOTE: Sometimes we need to add some extra amount (\"XCM Delivery Fee\") to a fee\n // that is returned by \"paymentInfo\" for extrinsic to not fail.\n extra?: number;\n}\n\nexport interface DestinationFeeConfig\n extends SetOptional<FeeConfig, 'balance'> {\n amount: number | FeeConfigBuilder;\n}\n\nexport class AssetRoute {\n readonly source: SourceConfig;\n\n readonly destination: DestinationConfig;\n\n readonly contract?: ContractConfigBuilder;\n\n readonly extrinsic?: ExtrinsicConfigBuilder;\n\n readonly monitoring?: EventMonitoringConfig;\n\n constructor({\n source,\n destination,\n contract,\n extrinsic,\n monitoring,\n }: AssetRouteConstructorParams) {\n this.source = source;\n this.destination = destination;\n this.contract = contract;\n this.extrinsic = extrinsic;\n this.monitoring = monitoring;\n }\n\n getDestinationFeeAssetOnSource(): ChainAsset {\n return this.source.chain.getChainAsset(\n this.source.destinationFee?.asset || this.destination.fee.asset,\n );\n }\n}\n"],"mappings":";AAoDO,IAAM,aAAN,MAAiB;AAAA,EACb;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAET,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAgC;AAC9B,SAAK,SAAS;AACd,SAAK,cAAc;AACnB,SAAK,WAAW;AAChB,SAAK,YAAY;AACjB,SAAK,aAAa;AAAA,EACpB;AAAA,EAEA,iCAA6C;AAC3C,WAAO,KAAK,OAAO,MAAM;AAAA,MACvB,KAAK,OAAO,gBAAgB,SAAS,KAAK,YAAY,IAAI;AAAA,IAC5D;AAAA,EACF;AACF;","names":[]}
|