@moonbeam-network/mrl 3.1.22 → 4.0.0
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 +11 -8
- package/build/index.d.ts +9 -2
- package/build/index.mjs +5961 -357
- package/build/index.mjs.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -29,13 +29,13 @@ import { Mrl } from '@moonbeam-network/mrl';
|
|
|
29
29
|
|
|
30
30
|
const fromEvm = async () => {
|
|
31
31
|
const transferData = await Mrl()
|
|
32
|
-
.setSource(
|
|
33
|
-
.setDestination(
|
|
34
|
-
.setAsset(
|
|
35
|
-
.setIsAutomatic(
|
|
32
|
+
.setSource(ethereum)
|
|
33
|
+
.setDestination(moonbeam)
|
|
34
|
+
.setAsset(eth)
|
|
35
|
+
.setIsAutomatic(false)
|
|
36
36
|
.setAddresses({
|
|
37
|
-
sourceAddress:
|
|
38
|
-
destinationAddress:
|
|
37
|
+
sourceAddress: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
38
|
+
destinationAddress: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -47,8 +47,11 @@ fromEvm();
|
|
|
47
47
|
```js
|
|
48
48
|
...
|
|
49
49
|
|
|
50
|
-
const hash = await transferData.transfer(
|
|
51
|
-
|
|
50
|
+
const hash = await transferData.transfer({
|
|
51
|
+
amount: 0.1,
|
|
52
|
+
isAutomatic: false,
|
|
53
|
+
signers: { evmSigner: ethereumWalletClient }, // Ethereum Signer, for example created with wagmi
|
|
54
|
+
});
|
|
52
55
|
```
|
|
53
56
|
|
|
54
57
|
# Examples
|
package/build/index.d.ts
CHANGED
|
@@ -19,7 +19,14 @@ interface TransferData {
|
|
|
19
19
|
min: AssetAmount;
|
|
20
20
|
moonChain: MoonChainTransferData;
|
|
21
21
|
source: SourceTransferData;
|
|
22
|
-
transfer(
|
|
22
|
+
transfer(params: TransferParams): Promise<string[]>;
|
|
23
|
+
}
|
|
24
|
+
interface TransferParams {
|
|
25
|
+
amount: number | string;
|
|
26
|
+
isAutomatic: boolean;
|
|
27
|
+
signers: Signers;
|
|
28
|
+
statusCallback?: (status: ISubmittableResult) => void;
|
|
29
|
+
sendOnlyRemoteExecution?: boolean;
|
|
23
30
|
}
|
|
24
31
|
interface SourceTransferData extends SourceChainTransferData {
|
|
25
32
|
destinationFeeBalance: AssetAmount;
|
|
@@ -75,4 +82,4 @@ declare function Mrl(options?: MrlOptions): {
|
|
|
75
82
|
getExecuteTransferData({ txId, chain }: WormholeExecuteTransferParams): Promise<ExecuteTransferData>;
|
|
76
83
|
};
|
|
77
84
|
|
|
78
|
-
export { type ChainTransferData, type DestinationTransferData, type ExecuteTransferData, type MoonChainTransferData, Mrl, type MrlOptions, type Signers, type SourceTransferData, type TransferData };
|
|
85
|
+
export { type ChainTransferData, type DestinationTransferData, type ExecuteTransferData, type MoonChainTransferData, Mrl, type MrlOptions, type Signers, type SourceTransferData, type TransferData, type TransferParams };
|