@moonbeam-network/xcm-builder 1.0.0-dev.226 → 1.0.0-dev.227
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 +16 -4
- package/build/index.mjs +15 -8
- package/build/index.mjs.map +1 -1
- package/package.json +5 -5
package/build/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Abi, PublicClient, HttpTransport } from 'viem';
|
|
|
6
6
|
import { SubmittableExtrinsicFunction } from '@polkadot/api/types';
|
|
7
7
|
import { EventRecord } from '@polkadot/types/interfaces';
|
|
8
8
|
import { HexString } from '@polkadot/util/types';
|
|
9
|
-
import {
|
|
9
|
+
import { TokenId, ChainAddress, TokenTransfer, Wormhole } from '@wormhole-foundation/sdk-connect';
|
|
10
10
|
|
|
11
11
|
interface ConfigBuilder<Config, Params = BuilderParams> {
|
|
12
12
|
build: (params: Params) => Config;
|
|
@@ -519,8 +519,20 @@ interface EventMonitoringConfig {
|
|
|
519
519
|
checkDestination: DestinationChecker;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
+
declare enum Protocols {
|
|
523
|
+
TokenBridge = "TokenBridge",
|
|
524
|
+
AutomaticTokenBridge = "AutomaticTokenBridge",
|
|
525
|
+
ExecutorTokenBridge = "ExecutorTokenBridge"
|
|
526
|
+
}
|
|
522
527
|
type WormholeTransferFunctions = 'tokenTransfer';
|
|
523
|
-
|
|
528
|
+
interface WormholeFunctionArgs {
|
|
529
|
+
token: TokenId;
|
|
530
|
+
amount: bigint;
|
|
531
|
+
from: ChainAddress;
|
|
532
|
+
to: ChainAddress;
|
|
533
|
+
protocol: TokenTransfer.Protocol;
|
|
534
|
+
payload?: Uint8Array;
|
|
535
|
+
}
|
|
524
536
|
interface WormholeConfigConstructorParams {
|
|
525
537
|
args: WormholeFunctionArgs;
|
|
526
538
|
func: WormholeTransferFunctions;
|
|
@@ -536,7 +548,7 @@ declare function wormhole$1(): {
|
|
|
536
548
|
tokenTransfer: () => MrlConfigBuilder;
|
|
537
549
|
};
|
|
538
550
|
|
|
539
|
-
declare function wormholeFactory(chain: AnyChain): Wormhole<"
|
|
551
|
+
declare function wormholeFactory(chain: AnyChain): Wormhole<"Testnet" | "Mainnet">;
|
|
540
552
|
|
|
541
553
|
type MrlConfigBuilder = ConfigBuilder<ContractConfig | ExtrinsicConfig | WormholeConfig, MrlBuilderParams>;
|
|
542
554
|
type MrlExecuteConfigBuilder = ConfigBuilder<ContractConfig, MrlExecuteBuilderParams>;
|
|
@@ -696,4 +708,4 @@ declare function MrlBuilder(): {
|
|
|
696
708
|
|
|
697
709
|
declare const BATCH_CONTRACT_ADDRESS = "0x0000000000000000000000000000000000000808";
|
|
698
710
|
|
|
699
|
-
export { AssetMinBuilder, type AssetMinConfigBuilder, type AssetMinConfigBuilderParams, BATCH_CONTRACT_ABI, BATCH_CONTRACT_ADDRESS, BalanceBuilder, type BalanceBuilderParams, type BalanceConfigBuilder, type BuilderParams, type ConfigBuilder, ContractBuilder, ContractConfig, type ContractConfigBuilder, type ContractConfigConstructorParams, ERC20_ABI, type EquilibriumSystemBalanceData, type EventMonitoringConfig, type EvmFunctionArgs, EvmQueryConfig, type EvmQueryConfigParams, type EvmQueryFunctions, ExtrinsicBuilder, ExtrinsicConfig, type ExtrinsicConfigBuilder, type ExtrinsicConfigConstructorParams, FeeBuilder, type FeeConfigBuilder, type FeeConfigBuilderParams, type GetVersionedAssetId, MonitoringBuilder, type MonitoringBuilderConfig, type MoonbeamRuntimeXcmConfigAssetType, MrlBuilder, type MrlBuilderParams, type MrlConfigBuilder, type MrlExecuteBuilderParams, type MrlExecuteConfigBuilder, type PalletBalancesAccountDataOld, type Parents, type QueryConfigConstructorParams, SubstrateCallConfig, type SubstrateCallConfigConstructorParams, SubstrateQueryConfig, type TokensPalletAccountData, type Transact, WormholeConfig, type WormholeConfigConstructorParams, type WormholeFunctionArgs, type WormholeTransferFunctions, type XcmPaymentFeeProps, XcmVersion, calculateSystemAccountBalance, evm, substrate, wormhole, wormholeFactory };
|
|
711
|
+
export { AssetMinBuilder, type AssetMinConfigBuilder, type AssetMinConfigBuilderParams, BATCH_CONTRACT_ABI, BATCH_CONTRACT_ADDRESS, BalanceBuilder, type BalanceBuilderParams, type BalanceConfigBuilder, type BuilderParams, type ConfigBuilder, ContractBuilder, ContractConfig, type ContractConfigBuilder, type ContractConfigConstructorParams, ERC20_ABI, type EquilibriumSystemBalanceData, type EventMonitoringConfig, type EvmFunctionArgs, EvmQueryConfig, type EvmQueryConfigParams, type EvmQueryFunctions, ExtrinsicBuilder, ExtrinsicConfig, type ExtrinsicConfigBuilder, type ExtrinsicConfigConstructorParams, FeeBuilder, type FeeConfigBuilder, type FeeConfigBuilderParams, type GetVersionedAssetId, MonitoringBuilder, type MonitoringBuilderConfig, type MoonbeamRuntimeXcmConfigAssetType, MrlBuilder, type MrlBuilderParams, type MrlConfigBuilder, type MrlExecuteBuilderParams, type MrlExecuteConfigBuilder, type PalletBalancesAccountDataOld, type Parents, Protocols, type QueryConfigConstructorParams, SubstrateCallConfig, type SubstrateCallConfigConstructorParams, SubstrateQueryConfig, type TokensPalletAccountData, type Transact, WormholeConfig, type WormholeConfigConstructorParams, type WormholeFunctionArgs, type WormholeTransferFunctions, type XcmPaymentFeeProps, XcmVersion, calculateSystemAccountBalance, evm, substrate, wormhole, wormholeFactory };
|
package/build/index.mjs
CHANGED
|
@@ -4256,6 +4256,12 @@ function Gmp() {
|
|
|
4256
4256
|
import { convertAddressTo32Bytes } from "@moonbeam-network/xcm-utils";
|
|
4257
4257
|
|
|
4258
4258
|
// src/mrl/providers/wormhole/wormhole/WormholeConfig.ts
|
|
4259
|
+
var Protocols = /* @__PURE__ */ ((Protocols2) => {
|
|
4260
|
+
Protocols2["TokenBridge"] = "TokenBridge";
|
|
4261
|
+
Protocols2["AutomaticTokenBridge"] = "AutomaticTokenBridge";
|
|
4262
|
+
Protocols2["ExecutorTokenBridge"] = "ExecutorTokenBridge";
|
|
4263
|
+
return Protocols2;
|
|
4264
|
+
})(Protocols || {});
|
|
4259
4265
|
var WormholeConfig = class _WormholeConfig {
|
|
4260
4266
|
args;
|
|
4261
4267
|
func;
|
|
@@ -4334,14 +4340,14 @@ function wormhole() {
|
|
|
4334
4340
|
isDestinationMoonChain || isDestinationEvmChain ? destinationAddress : GMP_CONTRACT_ADDRESS
|
|
4335
4341
|
);
|
|
4336
4342
|
return new WormholeConfig({
|
|
4337
|
-
args:
|
|
4338
|
-
whAsset,
|
|
4339
|
-
asset.amount,
|
|
4340
|
-
whSourceAddress,
|
|
4341
|
-
whDestinationAddress,
|
|
4342
|
-
isAutomatic
|
|
4343
|
-
isDestinationMoonChain || isDestinationEvmChain ? void 0 : getPayload({ destination, destinationAddress, moonApi })
|
|
4344
|
-
|
|
4343
|
+
args: {
|
|
4344
|
+
token: whAsset,
|
|
4345
|
+
amount: asset.amount,
|
|
4346
|
+
from: whSourceAddress,
|
|
4347
|
+
to: whDestinationAddress,
|
|
4348
|
+
protocol: isAutomatic ? "AutomaticTokenBridge" /* AutomaticTokenBridge */ : "TokenBridge" /* TokenBridge */,
|
|
4349
|
+
payload: isDestinationMoonChain || isDestinationEvmChain ? void 0 : getPayload({ destination, destinationAddress, moonApi })
|
|
4350
|
+
},
|
|
4345
4351
|
func: "tokenTransfer"
|
|
4346
4352
|
});
|
|
4347
4353
|
}
|
|
@@ -5988,6 +5994,7 @@ export {
|
|
|
5988
5994
|
FeeBuilder,
|
|
5989
5995
|
MonitoringBuilder,
|
|
5990
5996
|
MrlBuilder,
|
|
5997
|
+
Protocols,
|
|
5991
5998
|
SubstrateCallConfig,
|
|
5992
5999
|
SubstrateQueryConfig,
|
|
5993
6000
|
WormholeConfig,
|