@moonbeam-network/mrl 1.0.0-dev.158 → 1.0.0-dev.160
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 +6 -12
- package/build/index.mjs +8 -2
- package/build/index.mjs.map +1 -1
- package/package.json +6 -6
package/build/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import * as _moonbeam_network_xcm_sdk from '@moonbeam-network/xcm-sdk';
|
|
2
1
|
import { SourceChainTransferData, EvmSigner } from '@moonbeam-network/xcm-sdk';
|
|
3
|
-
import * as _wormhole_foundation_sdk_connect from '@wormhole-foundation/sdk-connect';
|
|
4
|
-
import { TokenTransfer } from '@wormhole-foundation/sdk-connect';
|
|
5
2
|
import * as _moonbeam_network_xcm_types from '@moonbeam-network/xcm-types';
|
|
6
3
|
import { AssetAmount, AnyChain, EvmChain, EvmParachain, Ecosystem, AnyAsset } from '@moonbeam-network/xcm-types';
|
|
7
4
|
import { Signer } from '@polkadot/api/types';
|
|
8
5
|
import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types';
|
|
6
|
+
import { TokenTransfer } from '@wormhole-foundation/sdk-connect';
|
|
9
7
|
import { WalletClient } from 'viem';
|
|
10
8
|
import { ConfigService } from '@moonbeam-network/xcm-config';
|
|
11
9
|
|
|
@@ -21,7 +19,7 @@ interface TransferData {
|
|
|
21
19
|
min: AssetAmount;
|
|
22
20
|
moonChain: MoonChainTransferData;
|
|
23
21
|
source: SourceTransferData;
|
|
24
|
-
transfer(amount: bigint | number | string, isAutomatic: boolean, signers: Signers, statusCallback?: (params: ISubmittableResult) => void): Promise<string[]>;
|
|
22
|
+
transfer(amount: bigint | number | string, isAutomatic: boolean, signers: Signers, statusCallback?: (params: ISubmittableResult) => void, sendOnlyRemoteExecution?: boolean): Promise<string[]>;
|
|
25
23
|
}
|
|
26
24
|
interface SourceTransferData extends SourceChainTransferData {
|
|
27
25
|
destinationFeeBalance: AssetAmount;
|
|
@@ -41,11 +39,11 @@ interface ChainTransferData {
|
|
|
41
39
|
fee: AssetAmount;
|
|
42
40
|
min: AssetAmount;
|
|
43
41
|
}
|
|
44
|
-
|
|
42
|
+
interface RedeemData {
|
|
45
43
|
vaa: TokenTransfer.VAA;
|
|
46
44
|
tokenTransfer: TokenTransfer;
|
|
47
|
-
|
|
48
|
-
}
|
|
45
|
+
redeem(signer: EvmSigner): Promise<string>;
|
|
46
|
+
}
|
|
49
47
|
|
|
50
48
|
interface WormholeRedeemParams {
|
|
51
49
|
txId: string;
|
|
@@ -72,11 +70,7 @@ declare function Mrl(options?: MrlOptions): {
|
|
|
72
70
|
};
|
|
73
71
|
};
|
|
74
72
|
};
|
|
75
|
-
getRedeemData({ txId, chain }: WormholeRedeemParams): Promise<
|
|
76
|
-
vaa: _wormhole_foundation_sdk_connect.TokenTransfer.VAA;
|
|
77
|
-
tokenTransfer: _wormhole_foundation_sdk_connect.TokenTransfer<"Mainnet" | "Testnet">;
|
|
78
|
-
redeem(signer: _moonbeam_network_xcm_sdk.EvmSigner): Promise<string>;
|
|
79
|
-
}>;
|
|
73
|
+
getRedeemData({ txId, chain }: WormholeRedeemParams): Promise<RedeemData>;
|
|
80
74
|
};
|
|
81
75
|
|
|
82
76
|
export { type ChainTransferData, type DestinationTransferData, type MoonChainTransferData, Mrl, type MrlOptions, type RedeemData, type Signers, type SourceTransferData, type TransferData };
|
package/build/index.mjs
CHANGED
|
@@ -11040,7 +11040,10 @@ var WormholeService = class _WormholeService {
|
|
|
11040
11040
|
};
|
|
11041
11041
|
|
|
11042
11042
|
// src/getTransferData/getRedeemData.ts
|
|
11043
|
-
async function getRedeemData({
|
|
11043
|
+
async function getRedeemData({
|
|
11044
|
+
txId,
|
|
11045
|
+
chain
|
|
11046
|
+
}) {
|
|
11044
11047
|
const wh = WormholeService.create(chain);
|
|
11045
11048
|
const vaa = await wh.getVaa(txId);
|
|
11046
11049
|
if (!vaa) {
|
|
@@ -11248,6 +11251,7 @@ async function getMrlBuilderParams({
|
|
|
11248
11251
|
feeAsset,
|
|
11249
11252
|
isAutomatic,
|
|
11250
11253
|
route,
|
|
11254
|
+
sendOnlyRemoteExecution,
|
|
11251
11255
|
sourceAddress
|
|
11252
11256
|
}) {
|
|
11253
11257
|
if (!route.mrl) {
|
|
@@ -11273,6 +11277,7 @@ async function getMrlBuilderParams({
|
|
|
11273
11277
|
moonApi,
|
|
11274
11278
|
moonAsset: moonChain.nativeAsset,
|
|
11275
11279
|
moonChain,
|
|
11280
|
+
sendOnlyRemoteExecution,
|
|
11276
11281
|
source,
|
|
11277
11282
|
sourceAddress,
|
|
11278
11283
|
sourceApi
|
|
@@ -11605,7 +11610,7 @@ async function getTransferData({
|
|
|
11605
11610
|
}),
|
|
11606
11611
|
moonChain: moonChainData,
|
|
11607
11612
|
source: sourceData,
|
|
11608
|
-
async transfer(amount, isAutomatic2, { evmSigner, polkadotSigner }, statusCallback) {
|
|
11613
|
+
async transfer(amount, isAutomatic2, { evmSigner, polkadotSigner }, statusCallback, sendOnlyRemoteExecution) {
|
|
11609
11614
|
const source = route.source.chain;
|
|
11610
11615
|
const bigintAmount = toBigInt3(amount, sourceData.balance.decimals);
|
|
11611
11616
|
const asset = AssetAmount3.fromChainAsset(
|
|
@@ -11624,6 +11629,7 @@ async function getTransferData({
|
|
|
11624
11629
|
feeAsset,
|
|
11625
11630
|
isAutomatic: isAutomatic2,
|
|
11626
11631
|
route,
|
|
11632
|
+
sendOnlyRemoteExecution,
|
|
11627
11633
|
sourceAddress
|
|
11628
11634
|
});
|
|
11629
11635
|
if (ContractConfig2.is(transfer) && (EvmChain.is(source) || EvmParachain2.is(source))) {
|