@moonbeam-network/mrl 3.0.0 → 3.0.1
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 +135 -1
- package/build/index.mjs +8 -1
- package/build/index.mjs.map +1 -1
- package/package.json +25 -19
- package/build/index.d.mts +0 -78
package/package.json
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbeam-network/mrl",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Moonbeam Routed Liquidity",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "tsup",
|
|
7
|
-
"dev": "tsup --watch",
|
|
8
|
-
"link": "pnpm ln --global",
|
|
9
|
-
"typecheck": "tsc --noEmit",
|
|
10
|
-
"test": "vitest --run",
|
|
11
|
-
"test:watch": "vitest",
|
|
12
|
-
"test:update": "vitest -u"
|
|
13
|
-
},
|
|
14
5
|
"repository": {
|
|
15
6
|
"directory": "packages/mrl",
|
|
16
7
|
"type": "git",
|
|
17
8
|
"url": "git+https://github.com/moonbeam-foundation/xcm-sdk.git"
|
|
18
9
|
},
|
|
19
|
-
"keywords": [
|
|
10
|
+
"keywords": [
|
|
11
|
+
"moonbeam",
|
|
12
|
+
"moonriver",
|
|
13
|
+
"mrl"
|
|
14
|
+
],
|
|
20
15
|
"author": "moonbeam-foundation",
|
|
21
16
|
"license": "MIT",
|
|
22
17
|
"bugs": {
|
|
23
18
|
"url": "https://github.com/moonbeam-foundation/xcm-sdk/issues"
|
|
24
19
|
},
|
|
25
20
|
"homepage": "https://moonbeam-foundation.github.io/xcm-sdk/latest",
|
|
26
|
-
"files": [
|
|
21
|
+
"files": [
|
|
22
|
+
"build"
|
|
23
|
+
],
|
|
27
24
|
"type": "module",
|
|
28
25
|
"exports": {
|
|
29
26
|
"import": "./build/index.mjs",
|
|
@@ -33,12 +30,12 @@
|
|
|
33
30
|
"types": "./build/index.d.ts",
|
|
34
31
|
"main": "./build/index.mjs",
|
|
35
32
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"@moonbeam-network/xcm-
|
|
38
|
-
"@moonbeam-network/xcm-
|
|
39
|
-
"@moonbeam-network/xcm-
|
|
40
|
-
"@moonbeam-network/xcm-
|
|
41
|
-
"
|
|
33
|
+
"big.js": "^6.2.1",
|
|
34
|
+
"@moonbeam-network/xcm-builder": "3.0.1",
|
|
35
|
+
"@moonbeam-network/xcm-config": "3.0.1",
|
|
36
|
+
"@moonbeam-network/xcm-sdk": "3.0.1",
|
|
37
|
+
"@moonbeam-network/xcm-types": "3.0.1",
|
|
38
|
+
"@moonbeam-network/xcm-utils": "3.0.1"
|
|
42
39
|
},
|
|
43
40
|
"peerDependencies": {
|
|
44
41
|
"@polkadot/api": "14.3.1",
|
|
@@ -49,5 +46,14 @@
|
|
|
49
46
|
"@wormhole-foundation/sdk-connect": "^0.10.7",
|
|
50
47
|
"@wormhole-foundation/sdk-evm": "^0.10.7",
|
|
51
48
|
"viem": "^2.21.7"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"dev": "tsup --watch",
|
|
53
|
+
"link": "pnpm ln --global",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "vitest --run",
|
|
56
|
+
"test:watch": "vitest",
|
|
57
|
+
"test:update": "vitest -u"
|
|
52
58
|
}
|
|
53
|
-
}
|
|
59
|
+
}
|
package/build/index.d.mts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { SourceChainTransferData, EvmSigner } from '@moonbeam-network/xcm-sdk';
|
|
2
|
-
import * as _moonbeam_network_xcm_types from '@moonbeam-network/xcm-types';
|
|
3
|
-
import { AssetAmount, EvmParachain, AnyChain, EvmChain, Ecosystem, AnyAsset } from '@moonbeam-network/xcm-types';
|
|
4
|
-
import { Signer } from '@polkadot/api/types';
|
|
5
|
-
import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types';
|
|
6
|
-
import { TokenTransfer } from '@wormhole-foundation/sdk-connect';
|
|
7
|
-
import { WalletClient } from 'viem';
|
|
8
|
-
import { ConfigService } from '@moonbeam-network/xcm-config';
|
|
9
|
-
|
|
10
|
-
interface Signers {
|
|
11
|
-
evmSigner?: WalletClient;
|
|
12
|
-
polkadotSigner?: Signer | IKeyringPair;
|
|
13
|
-
}
|
|
14
|
-
interface TransferData {
|
|
15
|
-
destination: DestinationTransferData;
|
|
16
|
-
getEstimate(amount: number | string): AssetAmount;
|
|
17
|
-
isAutomaticPossible: boolean;
|
|
18
|
-
max: AssetAmount;
|
|
19
|
-
min: AssetAmount;
|
|
20
|
-
moonChain: MoonChainTransferData;
|
|
21
|
-
source: SourceTransferData;
|
|
22
|
-
transfer(amount: bigint | number | string, isAutomatic: boolean, signers: Signers, statusCallback?: (params: ISubmittableResult) => void, sendOnlyRemoteExecution?: boolean): Promise<string[]>;
|
|
23
|
-
}
|
|
24
|
-
interface SourceTransferData extends SourceChainTransferData {
|
|
25
|
-
destinationFeeBalance: AssetAmount;
|
|
26
|
-
moonChainFeeBalance?: AssetAmount;
|
|
27
|
-
relayerFee?: AssetAmount;
|
|
28
|
-
feeBalance: AssetAmount;
|
|
29
|
-
max: AssetAmount;
|
|
30
|
-
}
|
|
31
|
-
interface DestinationTransferData extends ChainTransferData {
|
|
32
|
-
}
|
|
33
|
-
type MoonChainTransferData = Omit<ChainTransferData, 'min'> & {
|
|
34
|
-
chain: EvmParachain;
|
|
35
|
-
address: string;
|
|
36
|
-
feeBalance: AssetAmount;
|
|
37
|
-
};
|
|
38
|
-
interface ChainTransferData {
|
|
39
|
-
chain: AnyChain;
|
|
40
|
-
balance: AssetAmount;
|
|
41
|
-
fee: AssetAmount;
|
|
42
|
-
min: AssetAmount;
|
|
43
|
-
}
|
|
44
|
-
interface ExecuteTransferData {
|
|
45
|
-
vaa: TokenTransfer.VAA;
|
|
46
|
-
tokenTransfer: TokenTransfer;
|
|
47
|
-
executeTransfer(signer: EvmSigner): Promise<string>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface WormholeExecuteTransferParams {
|
|
51
|
-
txId: string;
|
|
52
|
-
chain: EvmChain | EvmParachain;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface MrlOptions {
|
|
56
|
-
configService?: ConfigService;
|
|
57
|
-
ecosystem?: Ecosystem;
|
|
58
|
-
}
|
|
59
|
-
declare function Mrl(options?: MrlOptions): {
|
|
60
|
-
sources: AnyChain[];
|
|
61
|
-
setSource(source: string | AnyChain): {
|
|
62
|
-
destinations: AnyChain[];
|
|
63
|
-
setDestination(destination: string | AnyChain): {
|
|
64
|
-
assets: _moonbeam_network_xcm_types.Asset[];
|
|
65
|
-
setAsset(asset: string | AnyAsset): {
|
|
66
|
-
setIsAutomatic(isAutomatic: boolean): {
|
|
67
|
-
setAddresses({ sourceAddress, destinationAddress, }: {
|
|
68
|
-
sourceAddress: string;
|
|
69
|
-
destinationAddress: string;
|
|
70
|
-
}): Promise<TransferData>;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
getExecuteTransferData({ txId, chain }: WormholeExecuteTransferParams): Promise<ExecuteTransferData>;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export { type ChainTransferData, type DestinationTransferData, type ExecuteTransferData, type MoonChainTransferData, Mrl, type MrlOptions, type Signers, type SourceTransferData, type TransferData };
|