@moonbeam-network/xcm-builder 3.3.2 → 3.3.4
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/index.d.ts +13 -13
- package/build/index.mjs +122 -122
- package/build/index.mjs.map +1 -1
- package/package.json +12 -12
package/build/index.d.ts
CHANGED
|
@@ -384,6 +384,15 @@ declare function polkadotXcm$1(): {
|
|
|
384
384
|
};
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
+
declare function xcmPallet(): {
|
|
388
|
+
limitedReserveTransferAssets: (parents?: Parents) => {
|
|
389
|
+
here: () => ExtrinsicConfigBuilder;
|
|
390
|
+
};
|
|
391
|
+
transferAssetsUsingTypeAndThen: () => {
|
|
392
|
+
here: () => ExtrinsicConfigBuilder;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
|
|
387
396
|
declare function xTokens(): {
|
|
388
397
|
transfer: () => ExtrinsicConfigBuilder;
|
|
389
398
|
transferMultiAsset: (originParachainId: number) => {
|
|
@@ -401,15 +410,6 @@ declare function xTransfer(): {
|
|
|
401
410
|
};
|
|
402
411
|
};
|
|
403
412
|
|
|
404
|
-
declare function xcmPallet(): {
|
|
405
|
-
limitedReserveTransferAssets: (parents?: Parents) => {
|
|
406
|
-
here: () => ExtrinsicConfigBuilder;
|
|
407
|
-
};
|
|
408
|
-
transferAssetsUsingTypeAndThen: () => {
|
|
409
|
-
here: () => ExtrinsicConfigBuilder;
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
|
|
413
413
|
declare function ExtrinsicBuilder(): {
|
|
414
414
|
eqBalances: typeof eqBalances;
|
|
415
415
|
xTokens: typeof xTokens;
|
|
@@ -469,10 +469,6 @@ declare function FeeBuilder(): {
|
|
|
469
469
|
xcmPaymentApi: typeof xcmPaymentApi;
|
|
470
470
|
};
|
|
471
471
|
|
|
472
|
-
declare function wormhole$1(): {
|
|
473
|
-
tokenTransfer: () => MrlConfigBuilder;
|
|
474
|
-
};
|
|
475
|
-
|
|
476
472
|
type WormholeTransferFunctions = 'tokenTransfer';
|
|
477
473
|
type WormholeFunctionArgs = Parameters<Wormhole<Network>[WormholeTransferFunctions]>;
|
|
478
474
|
interface WormholeConfigConstructorParams {
|
|
@@ -486,6 +482,10 @@ declare class WormholeConfig {
|
|
|
486
482
|
constructor({ args, func }: WormholeConfigConstructorParams);
|
|
487
483
|
}
|
|
488
484
|
|
|
485
|
+
declare function wormhole$1(): {
|
|
486
|
+
tokenTransfer: () => MrlConfigBuilder;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
489
|
declare function wormholeFactory(chain: AnyChain): Wormhole<"Mainnet" | "Testnet">;
|
|
490
490
|
|
|
491
491
|
type MrlConfigBuilder = ConfigBuilder<ContractConfig | ExtrinsicConfig | WormholeConfig, MrlBuilderParams>;
|
package/build/index.mjs
CHANGED
|
@@ -2161,6 +2161,112 @@ function polkadotXcm() {
|
|
|
2161
2161
|
};
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
+
// src/extrinsic/pallets/xcmPallet/xcmPallet.ts
|
|
2165
|
+
var pallet3 = "xcmPallet";
|
|
2166
|
+
function xcmPallet() {
|
|
2167
|
+
return {
|
|
2168
|
+
limitedReserveTransferAssets: (parents = 1) => {
|
|
2169
|
+
const func = "limitedReserveTransferAssets";
|
|
2170
|
+
return {
|
|
2171
|
+
here: () => ({
|
|
2172
|
+
build: (params) => new ExtrinsicConfig({
|
|
2173
|
+
module: pallet3,
|
|
2174
|
+
func,
|
|
2175
|
+
getArgs: (extrinsicFunction) => {
|
|
2176
|
+
const version = getExtrinsicArgumentVersion(extrinsicFunction);
|
|
2177
|
+
return getPolkadotXcmExtrinsicArgs({
|
|
2178
|
+
...params,
|
|
2179
|
+
parents,
|
|
2180
|
+
func: extrinsicFunction,
|
|
2181
|
+
asset: [
|
|
2182
|
+
{
|
|
2183
|
+
id: normalizeConcrete(version, {
|
|
2184
|
+
parents: 0,
|
|
2185
|
+
interior: "Here"
|
|
2186
|
+
}),
|
|
2187
|
+
fun: {
|
|
2188
|
+
Fungible: params.asset.amount
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
]
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2194
|
+
})
|
|
2195
|
+
})
|
|
2196
|
+
};
|
|
2197
|
+
},
|
|
2198
|
+
transferAssetsUsingTypeAndThen: () => {
|
|
2199
|
+
const func = "transferAssetsUsingTypeAndThen";
|
|
2200
|
+
return {
|
|
2201
|
+
here: () => ({
|
|
2202
|
+
build: (params) => new ExtrinsicConfig({
|
|
2203
|
+
module: pallet3,
|
|
2204
|
+
func,
|
|
2205
|
+
getArgs: () => {
|
|
2206
|
+
const version = "V4" /* v4 */;
|
|
2207
|
+
return [
|
|
2208
|
+
{
|
|
2209
|
+
[version]: {
|
|
2210
|
+
parents: 0,
|
|
2211
|
+
interior: {
|
|
2212
|
+
X1: [
|
|
2213
|
+
{
|
|
2214
|
+
Parachain: params.destination.parachainId
|
|
2215
|
+
}
|
|
2216
|
+
]
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
[version]: [
|
|
2222
|
+
{
|
|
2223
|
+
id: {
|
|
2224
|
+
parents: 0,
|
|
2225
|
+
interior: "Here"
|
|
2226
|
+
},
|
|
2227
|
+
fun: {
|
|
2228
|
+
Fungible: params.asset.amount
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
]
|
|
2232
|
+
},
|
|
2233
|
+
"LocalReserve",
|
|
2234
|
+
{
|
|
2235
|
+
[version]: {
|
|
2236
|
+
parents: 0,
|
|
2237
|
+
interior: "Here"
|
|
2238
|
+
}
|
|
2239
|
+
},
|
|
2240
|
+
"LocalReserve",
|
|
2241
|
+
{
|
|
2242
|
+
[version]: [
|
|
2243
|
+
{
|
|
2244
|
+
DepositAsset: {
|
|
2245
|
+
assets: {
|
|
2246
|
+
Wild: { AllCounted: 1 }
|
|
2247
|
+
},
|
|
2248
|
+
beneficiary: {
|
|
2249
|
+
parents: 0,
|
|
2250
|
+
interior: {
|
|
2251
|
+
X1: [
|
|
2252
|
+
getExtrinsicAccount(params.destinationAddress)
|
|
2253
|
+
]
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
]
|
|
2259
|
+
},
|
|
2260
|
+
"Unlimited"
|
|
2261
|
+
];
|
|
2262
|
+
}
|
|
2263
|
+
})
|
|
2264
|
+
})
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2164
2270
|
// src/extrinsic/pallets/xTokens/xTokens.utils.ts
|
|
2165
2271
|
function getWeight() {
|
|
2166
2272
|
return "Unlimited";
|
|
@@ -2182,12 +2288,12 @@ function getDestination(version, address, destination) {
|
|
|
2182
2288
|
}
|
|
2183
2289
|
|
|
2184
2290
|
// src/extrinsic/pallets/xTokens/xTokens.ts
|
|
2185
|
-
var
|
|
2291
|
+
var pallet4 = "xTokens";
|
|
2186
2292
|
function xTokens() {
|
|
2187
2293
|
return {
|
|
2188
2294
|
transfer: () => ({
|
|
2189
2295
|
build: ({ destinationAddress, asset, destination }) => new ExtrinsicConfig({
|
|
2190
|
-
module:
|
|
2296
|
+
module: pallet4,
|
|
2191
2297
|
func: "transfer",
|
|
2192
2298
|
getArgs: (func) => {
|
|
2193
2299
|
const destIndex = 2;
|
|
@@ -2207,7 +2313,7 @@ function xTokens() {
|
|
|
2207
2313
|
return {
|
|
2208
2314
|
here: () => ({
|
|
2209
2315
|
build: ({ destinationAddress: address, asset, destination }) => new ExtrinsicConfig({
|
|
2210
|
-
module:
|
|
2316
|
+
module: pallet4,
|
|
2211
2317
|
func: funcName,
|
|
2212
2318
|
getArgs: (func) => {
|
|
2213
2319
|
const version = getExtrinsicArgumentVersion(func, destIndex);
|
|
@@ -2231,7 +2337,7 @@ function xTokens() {
|
|
|
2231
2337
|
}),
|
|
2232
2338
|
X1: () => ({
|
|
2233
2339
|
build: ({ destinationAddress: address, asset, destination }) => new ExtrinsicConfig({
|
|
2234
|
-
module:
|
|
2340
|
+
module: pallet4,
|
|
2235
2341
|
func: funcName,
|
|
2236
2342
|
getArgs: (func) => {
|
|
2237
2343
|
const version = getExtrinsicArgumentVersion(func, destIndex);
|
|
@@ -2262,7 +2368,7 @@ function xTokens() {
|
|
|
2262
2368
|
}),
|
|
2263
2369
|
X2: () => ({
|
|
2264
2370
|
build: ({ destinationAddress: address, asset, destination }) => new ExtrinsicConfig({
|
|
2265
|
-
module:
|
|
2371
|
+
module: pallet4,
|
|
2266
2372
|
func: funcName,
|
|
2267
2373
|
getArgs: (func) => {
|
|
2268
2374
|
const version = getExtrinsicArgumentVersion(func, destIndex);
|
|
@@ -2297,7 +2403,7 @@ function xTokens() {
|
|
|
2297
2403
|
},
|
|
2298
2404
|
transferMultiCurrencies: () => ({
|
|
2299
2405
|
build: ({ destinationAddress: address, asset, destination, fee }) => new ExtrinsicConfig({
|
|
2300
|
-
module:
|
|
2406
|
+
module: pallet4,
|
|
2301
2407
|
func: "transferMulticurrencies",
|
|
2302
2408
|
getArgs: () => [
|
|
2303
2409
|
[
|
|
@@ -2314,7 +2420,7 @@ function xTokens() {
|
|
|
2314
2420
|
}
|
|
2315
2421
|
|
|
2316
2422
|
// src/extrinsic/pallets/xTransfer/xTransfer.ts
|
|
2317
|
-
var
|
|
2423
|
+
var pallet5 = "xTransfer";
|
|
2318
2424
|
function xTransfer() {
|
|
2319
2425
|
return {
|
|
2320
2426
|
transfer: () => {
|
|
@@ -2322,7 +2428,7 @@ function xTransfer() {
|
|
|
2322
2428
|
return {
|
|
2323
2429
|
here: () => ({
|
|
2324
2430
|
build: ({ destinationAddress: address, asset, destination }) => new ExtrinsicConfig({
|
|
2325
|
-
module:
|
|
2431
|
+
module: pallet5,
|
|
2326
2432
|
func: method,
|
|
2327
2433
|
getArgs: () => [
|
|
2328
2434
|
{
|
|
@@ -2356,7 +2462,7 @@ function xTransfer() {
|
|
|
2356
2462
|
}),
|
|
2357
2463
|
X2: () => ({
|
|
2358
2464
|
build: ({ destinationAddress, asset, destination }) => new ExtrinsicConfig({
|
|
2359
|
-
module:
|
|
2465
|
+
module: pallet5,
|
|
2360
2466
|
func: method,
|
|
2361
2467
|
getArgs: () => [
|
|
2362
2468
|
{
|
|
@@ -2402,112 +2508,6 @@ function xTransfer() {
|
|
|
2402
2508
|
};
|
|
2403
2509
|
}
|
|
2404
2510
|
|
|
2405
|
-
// src/extrinsic/pallets/xcmPallet/xcmPallet.ts
|
|
2406
|
-
var pallet5 = "xcmPallet";
|
|
2407
|
-
function xcmPallet() {
|
|
2408
|
-
return {
|
|
2409
|
-
limitedReserveTransferAssets: (parents = 1) => {
|
|
2410
|
-
const func = "limitedReserveTransferAssets";
|
|
2411
|
-
return {
|
|
2412
|
-
here: () => ({
|
|
2413
|
-
build: (params) => new ExtrinsicConfig({
|
|
2414
|
-
module: pallet5,
|
|
2415
|
-
func,
|
|
2416
|
-
getArgs: (extrinsicFunction) => {
|
|
2417
|
-
const version = getExtrinsicArgumentVersion(extrinsicFunction);
|
|
2418
|
-
return getPolkadotXcmExtrinsicArgs({
|
|
2419
|
-
...params,
|
|
2420
|
-
parents,
|
|
2421
|
-
func: extrinsicFunction,
|
|
2422
|
-
asset: [
|
|
2423
|
-
{
|
|
2424
|
-
id: normalizeConcrete(version, {
|
|
2425
|
-
parents: 0,
|
|
2426
|
-
interior: "Here"
|
|
2427
|
-
}),
|
|
2428
|
-
fun: {
|
|
2429
|
-
Fungible: params.asset.amount
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
]
|
|
2433
|
-
});
|
|
2434
|
-
}
|
|
2435
|
-
})
|
|
2436
|
-
})
|
|
2437
|
-
};
|
|
2438
|
-
},
|
|
2439
|
-
transferAssetsUsingTypeAndThen: () => {
|
|
2440
|
-
const func = "transferAssetsUsingTypeAndThen";
|
|
2441
|
-
return {
|
|
2442
|
-
here: () => ({
|
|
2443
|
-
build: (params) => new ExtrinsicConfig({
|
|
2444
|
-
module: pallet5,
|
|
2445
|
-
func,
|
|
2446
|
-
getArgs: () => {
|
|
2447
|
-
const version = "V4" /* v4 */;
|
|
2448
|
-
return [
|
|
2449
|
-
{
|
|
2450
|
-
[version]: {
|
|
2451
|
-
parents: 0,
|
|
2452
|
-
interior: {
|
|
2453
|
-
X1: [
|
|
2454
|
-
{
|
|
2455
|
-
Parachain: params.destination.parachainId
|
|
2456
|
-
}
|
|
2457
|
-
]
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
},
|
|
2461
|
-
{
|
|
2462
|
-
[version]: [
|
|
2463
|
-
{
|
|
2464
|
-
id: {
|
|
2465
|
-
parents: 0,
|
|
2466
|
-
interior: "Here"
|
|
2467
|
-
},
|
|
2468
|
-
fun: {
|
|
2469
|
-
Fungible: params.asset.amount
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
]
|
|
2473
|
-
},
|
|
2474
|
-
"LocalReserve",
|
|
2475
|
-
{
|
|
2476
|
-
[version]: {
|
|
2477
|
-
parents: 0,
|
|
2478
|
-
interior: "Here"
|
|
2479
|
-
}
|
|
2480
|
-
},
|
|
2481
|
-
"LocalReserve",
|
|
2482
|
-
{
|
|
2483
|
-
[version]: [
|
|
2484
|
-
{
|
|
2485
|
-
DepositAsset: {
|
|
2486
|
-
assets: {
|
|
2487
|
-
Wild: { AllCounted: 1 }
|
|
2488
|
-
},
|
|
2489
|
-
beneficiary: {
|
|
2490
|
-
parents: 0,
|
|
2491
|
-
interior: {
|
|
2492
|
-
X1: [
|
|
2493
|
-
getExtrinsicAccount(params.destinationAddress)
|
|
2494
|
-
]
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
]
|
|
2500
|
-
},
|
|
2501
|
-
"Unlimited"
|
|
2502
|
-
];
|
|
2503
|
-
}
|
|
2504
|
-
})
|
|
2505
|
-
})
|
|
2506
|
-
};
|
|
2507
|
-
}
|
|
2508
|
-
};
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
2511
|
// src/extrinsic/ExtrinsicBuilder.ts
|
|
2512
2512
|
function ExtrinsicBuilder() {
|
|
2513
2513
|
return {
|
|
@@ -3711,7 +3711,7 @@ var PEAQ_XTOKENS_ABI = [
|
|
|
3711
3711
|
];
|
|
3712
3712
|
|
|
3713
3713
|
// src/mrl/providers/wormhole/contract/Batch/abi/abi.helpers.ts
|
|
3714
|
-
function getAbisForChain(
|
|
3714
|
+
function getAbisForChain(_) {
|
|
3715
3715
|
return {
|
|
3716
3716
|
BatchAbi: PEAQ_BATCH_ABI,
|
|
3717
3717
|
XcmUtilsAbi: PEAQ_XCM_UTILS_ABI,
|
|
@@ -3880,12 +3880,6 @@ function Gmp() {
|
|
|
3880
3880
|
// src/mrl/providers/wormhole/contract/TokenBridge/TokenBridge.ts
|
|
3881
3881
|
import { convertAddressTo32Bytes } from "@moonbeam-network/xcm-utils";
|
|
3882
3882
|
|
|
3883
|
-
// src/mrl/providers/wormhole/wormhole/wormhole.ts
|
|
3884
|
-
import { EvmChain, EvmParachain as EvmParachain4, Parachain as Parachain3 } from "@moonbeam-network/xcm-types";
|
|
3885
|
-
import { getMultilocationDerivedAddresses as getMultilocationDerivedAddresses3 } from "@moonbeam-network/xcm-utils";
|
|
3886
|
-
import { evmToAddress as evmToAddress4 } from "@polkadot/util-crypto/address";
|
|
3887
|
-
import { Wormhole as Wormhole2 } from "@wormhole-foundation/sdk-connect";
|
|
3888
|
-
|
|
3889
3883
|
// src/mrl/providers/wormhole/wormhole/WormholeConfig.ts
|
|
3890
3884
|
var WormholeConfig = class _WormholeConfig {
|
|
3891
3885
|
args;
|
|
@@ -3899,6 +3893,12 @@ var WormholeConfig = class _WormholeConfig {
|
|
|
3899
3893
|
}
|
|
3900
3894
|
};
|
|
3901
3895
|
|
|
3896
|
+
// src/mrl/providers/wormhole/wormhole/wormhole.ts
|
|
3897
|
+
import { EvmChain, EvmParachain as EvmParachain4, Parachain as Parachain3 } from "@moonbeam-network/xcm-types";
|
|
3898
|
+
import { getMultilocationDerivedAddresses as getMultilocationDerivedAddresses3 } from "@moonbeam-network/xcm-utils";
|
|
3899
|
+
import { evmToAddress as evmToAddress4 } from "@polkadot/util-crypto/address";
|
|
3900
|
+
import { Wormhole as Wormhole2 } from "@wormhole-foundation/sdk-connect";
|
|
3901
|
+
|
|
3902
3902
|
// src/mrl/providers/wormhole/wormhole/wormholeFactory.ts
|
|
3903
3903
|
import { EvmParachain as EvmParachain3 } from "@moonbeam-network/xcm-types";
|
|
3904
3904
|
import { Wormhole } from "@wormhole-foundation/sdk-connect";
|