diff --git a/examples/mrl-simple/index.ts b/examples/mrl-simple/index.ts
index ece0e94b..6b415ac7 100644
--- a/examples/mrl-simple/index.ts
+++ b/examples/mrl-simple/index.ts
@@ -5,12 +5,12 @@ import {
moonbaseAlpha,
peaqAlphanet,
} from '@moonbeam-network/xcm-config';
+import type { EvmSigner } from '@moonbeam-network/xcm-sdk';
import { type Asset, EvmChain, Parachain } from '@moonbeam-network/xcm-types';
import { Keyring } from '@polkadot/api';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { http, type Address, createWalletClient } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
-import type { EvmSigner } from '../../packages/sdk/build';
const { EVM_PRIVATE_KEY, POLKADOT_PRIVATE_KEY } = process.env;
diff --git a/examples/mrl-simple/package.json b/examples/mrl-simple/package.json
index 32caee9d..f7a5b89a 100644
--- a/examples/mrl-simple/package.json
+++ b/examples/mrl-simple/package.json
@@ -10,7 +10,8 @@
"@moonbeam-network/mrl": "workspace:*",
"@moonbeam-network/xcm-config": "workspace:*",
"@moonbeam-network/xcm-types": "workspace:*",
- "@moonbeam-network/xcm-utils": "workspace:*"
+ "@moonbeam-network/xcm-utils": "workspace:*",
+ "@moonbeam-network/xcm-sdk": "workspace:*"
},
"devDependencies": {
"bun": "^1.1.31"
diff --git a/mkdocs/docs/.pages b/mkdocs/docs/.pages
index 2ad76777..841b4149 100644
--- a/mkdocs/docs/.pages
+++ b/mkdocs/docs/.pages
@@ -1,5 +1,6 @@
nav:
- 'index.md'
- 'SDK Reference': 'reference'
- - 'Using the XCM SDK': 'example-usage.md'
- - 'Contribute': 'contribute.md'
+ - 'Using the SDK': 'example-usage'
+ - 'Contribute': 'contribute'
+
diff --git a/mkdocs/docs/contribute.md b/mkdocs/docs/contribute.md
deleted file mode 100644
index 22f77cd1..00000000
--- a/mkdocs/docs/contribute.md
+++ /dev/null
@@ -1,372 +0,0 @@
----
-title: Add Assets or Chains to the XCM SDK
-description: Learn how to add an asset or chain within the Polkadot or Kusama ecosystems to the Moonbeam XCM SDK.
-template: tutorial.html
----
-
-# Contribute to the XCM SDK
-
-## Get Started
-
-To contribute to the XCM SDK, you'll first need to clone the GitHub repository:
-
-```bash
-git clone git@github.com:moonbeam-foundation/xcm-sdk.git
-```
-
-Then, install dependencies:
-
-```bash
-npm install
-```
-
-## Add an Asset
-
-The first step in adding support for a new asset is to define the asset in the [assets configuration file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/assets.ts){target=\_blank}. At this stage, assets are not bound to any chain, you are only creating a representation of the asset.
-
-Follow these steps:
-
-1. Open the `xcm-sdk/packages/config/src/assets.ts` file
-2. Create a new variable for your asset. You'll need to create an [Asset Object](./reference/interfaces.md#the-asset-object), providing the `key` and `originSymbol` of the asset
-
- ```ts
- export const INSERT_ASSET_NAME = new Asset({
- key: 'INSERT_KEY',
- originSymbol: 'INSERT_ORIGIN_SYMBOL',
- });
- ```
-
- For example, this is the configuration used for USDT:
-
- ```ts
- export const usdt = new Asset({
- key: 'usdt',
- originSymbol: 'USDT',
- });
- ```
-
-3. Add your asset to the `assetsList` array at the end of the file
-
-!!! note
-Assets are listed in alphabetical order. Please make sure you follow this order when adding new assets.
-
-## Add a Chain
-
-The next step to support an asset integration is to add chain information for the chains in which your asset can be sent to and from to the [chains configuration file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/chains.ts){target=\_blank}.
-
-To add a chain, take the following steps:
-
-1. Open the `xcm-sdk/packages/config/src/chains.ts` file
-2. Add your asset to the list of imported assets from the assets configuration file (`./assets.ts`)
-3. Create a new variable for each chain if an entry doesn't already exist. You'll need to create a [Chain Object](./reference/interfaces.md#the-chain-object), providing metadata related to the chain
-
- === "Parachain"
-
- ```ts
- new Parachain({
- assetsData: [], // Optional - In the next step, you'll add assets here
- ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
- genesisHash: 'INSERT_GENESIS_HASH',
- isTestChain: INSERT_BOOLEAN, // Optional
- key: 'INSERT_KEY',
- name: 'INSERT_NAME',
- parachainId: INSERT_PARACHAIN_ID,
- ss58Format: INSERT_SS58_FORMAT,
- usesChainDecimals: INSERT_BOOLEAN, // Optional
- ws: 'INSERT_WSS_ENDPOINT',
- })
- ```
-
- === "EVM Parachain"
-
- ```ts
- new EvmParachain({
- assetsData: [], // Optional - In the next step, you'll add assets here
- ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
- genesisHash: 'INSERT_GENESIS_HASH',
- id: INSERT_EVM_CHAIN_ID,
- isTestChain: INSERT_BOOLEAN, // Optional
- key: 'INSERT_KEY',
- name: 'INSERT_NAME',
- nativeCurrency: {
- decimals: INSERT_ASSET_DECIMALS,
- name: 'INSERT_ASSET_NAME',
- symbol: 'INSERT_ASSET_SYMBOL',
- },
- parachainId: INSERT_PARACHAIN_ID,
- rpc: 'INSERT_RPC_ENDPOINT',
- ss58Format: INSERT_SS58_FORMAT,
- usesChainDecimals: INSERT_BOOLEAN, // Optional
- ws: 'INSERT_WSS_ENDPOINT',
- })
- ```
-
- For example, this is the configuration for the Polkadot Asset Hub:
-
- ```ts
- export const polkadotAssetHub = new Parachain({
- assetsData: [ ... ],
- ecosystem: Ecosystem.Polkadot,
- genesisHash:
- '0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f',
- key: 'Polkadot-asset-hub',
- name: 'Polkadot Asset Hub',
- parachainId: 1000,
- ss58Format: 42,
- ws: 'wss://polkadot-asset-hub-rpc.polkadot.io',
- });
- ```
-
-4. Add the newly created chain to the `chainsList` array at the end of the file
-
-!!! note
-Chains are listed in alphabetical order. Please make sure you follow this order when adding new chains.
-
-Now that you've added the chain, you can continue to the next section to add the assets that this chain supports.
-
-## Configure a Chain's Assets
-
-To designate a chain as a destination or source chain for an asset, you must specify the asset within the `assetsData` array of the chain's configuration. This array outlines the supported assets on the chain, and the asset information within it determines how the asset is identified or targeted on that specific chain. For example, when adding a chain's native asset, you'll need to define how the chain sees its own asset, and when adding the asset to a destination chain, you'll need to define how the destination chain sees the asset.
-
-To enable an asset to move between chains, follow these steps to configure the source and destination chains of an asset:
-
-1. In the `assetsData` array of the source chain, you'll need to create a [Chain Asset Data Object](./reference/interfaces.md#the-chain-assets-data-object) for the asset, specifying how the asset is seen on that chain
-
- ```ts
- {
- asset: INSERT_IMPORTED_ASSET, // The asset created in the previous section
- balanceId: INSERT_CHAIN_ASSET_ID, // (Optional) The balance ID of the asset
- decimals: INSERT_ASSET_DECIMALS // (Optional) The decimals of the asset
- id: INSERT_CHAIN_ASSET_ID, // (Optional) Location of the asset on the chain. Different for every chain
- metadata: INSERT_CHAIN_ASSET_ID // (Optional) The metadata of the asset
- min: INSERT_MIN // (Optional) The minimum amount of the asset that is required to be left in the account
- minId: INSERT_CHAIN_ASSET_ID // (Optional) The minimum ID of the asset
- palletInstance: INSERT_PALLET_INSTANCE // (Optional) The pallet instance the asset belongs to
- }
- ```
-
- For example, this is the configuration for USDT on the Polkadot Asset Hub:
-
- ```ts
- export const polkadotAssetHub = new Parachain({
- assetsData: [
- {
- asset: usdt,
- id: 1984, // The asset ID for USDT
- palletInstance: 50, // The index of the Assets pallet (where USDT lives)
- },
- ],
- ...
- });
- ```
-
-2. In the destination chain's `assetsData` array, create a [Chain Asset Data Object](./reference/interfaces.md#the-chain-assets-data-object) that defines the asset as seen on the destination chain. This will be different than the source chain's configurations, as every chain manages assets differently
-
- For example, to add support for USDT on Moonbeam, Moonbeam's chain configuration needs to include the configuration for USDT:
-
- ```ts
- export const moonbeam = new EvmParachain({
- assetsData: [
- ...
- {
- asset: usdt,
- id: '311091173110107856861649819128533077277', // The asset ID of USDT on Moonbeam
- },
- ...
- ]
- ...
- });
- ```
-
-The integration isn't complete yet; you'll need to define the methods used for cross-chain transfers for any new chains added. This will be covered in the following section.
-
-## Configure a Chain's Extrinsics
-
-In this step, you have to create or update the configuration files of the chains between which you can transfer the asset. These files define the asset being transferred, the destination chain, information associated to fees, and builder functions. These builders define the pallets and methods necessary to achieve the specific goals of each type. They are as follows:
-
-- **Minimum Asset Builder** - builds a query to retrieve the minimum amount of an asset required to be left in an account
-- **Balance Builder** - builds a query to retrieve the balance of an asset for a given account
-- **Contract Builder** - builds the contract call for the cross-chain transfer. This is specific to EVM chains that use contracts to interact with Substrate pallets for cross-chain transfers, such as [Moonbeam's X-Tokens precompiled contract](https://docs.moonbeam.network/builders/interoperability/xcm/xc20/send-xc20s/xtokens-precompile/){target=\_blank}
-- **Extrinsic Builder** - builds the extrinsic for the cross-chain transfer
-- **Fee Builder** - builds the query to retrieve the fee for the execution of the cross-chain transfer
-
-You will need to know which pallet and method each chain is using for its XCM transactions and for fetching asset balances, and make sure that said pallets and methods are already available in the [xcm-builder package](https://github.com/moonbeam-foundation/xcm-sdk/tree/main/packages/builder){target=\_blank}.
-
-If they aren't available, feel free to open a PR or [submit an issue on GitHub](https://github.com/moonbeam-foundation/xcm-sdk/issues/new){target=\_blank}.
-
-Assuming that all of the required pallets and methods are already supported, you can create the configuration file for the source chain:
-
-1. In the `xcm-sdk/packages/config/src/configs/` directory, add a TypeScript file for the new chain
-2. Use the following snippet as a starting point for adding the chain configuration:
-
- ```ts
- import { INSERT_REQUIRED_BUILDERS } from '@moonbeam-network/xcm-builder';
- import { INSERT_REQUIRED_ASSETS } from '../assets';
- import { INSERT_SOURCE_CHAIN, INSERT_DESTINATION_CHAIN } from '../chains';
- import { AssetConfig } from '../types/AssetConfig';
- import { ChainConfig } from '../types/ChainConfig';
-
- // The chain config name should be formatted as: 'chainName' + 'Config'
- export const INSERT_CHAIN_CONFIG_NAME = new ChainConfig({
- assets: [], // In the next step, you'll add asset configs here
- chain: INSERT_SOURCE_CHAIN, // The source chain
- });
- ```
-
-3. As seen in the above example, an `assets` array contains the chain's asset configurations. The asset configuration defines the asset being transferred, the destination chain, information associated with fees, and the builder functions. The builder functions must be used to build the queries or calls as if they were being executed from this chain.
-
- You'll need to create an Asset Config object for each asset, for example:
-
- ```ts
- new AssetConfig({
- asset: INSERT_ASSET,
- balance: INSERT_BALANCE_BUILDER,
- contract: INSERT_CONTRACT_BUILDER, // Optional
- destination: INSERT_DESTINATION_CHAIN,
- destinationFee: {
- amount: INSERT_FEE_BUILDER,
- asset: INSERT_ASSET,
- balance: INSERT_BALANCE_BUILDER,
- },
- extrinsic: INSERT_EXTRINSIC_BUILDER, // Optional
- fee: {
- // Optional
- asset: INSERT_ASSET,
- balance: INSERT_BALANCE_BUILDER,
- xcmDeliveryFeeAmount: INSERT_FEE_AMOUNT, // Optional
- },
- min: INSERT_MIN_ASSET_BUILDER, // Optional
- });
- ```
-
-4. Add the newly created chain configurations to the `chainsConfigList` in the `xcm-sdk/blob/main/packages/config/src/configs/index.ts` file
-
-!!! note
-Chain configurations are listed in alphabetical order. Please follow this order when adding new chain configurations.
-
-For example, to add support to transfer USDT from the Polkadot Asset Hub to Moonbeam, the Polkadot Asset Hub configuration file is as follows:
-
-```ts
-import {
- AssetMinBuilder,
- BalanceBuilder,
- ExtrinsicBuilder,
- FeeBuilder,
-} from '@moonbeam-network/xcm-builder';
-import { usdt } from '../assets';
-import { moonbeam, polkadotAssetHub } from '../chains';
-import { AssetConfig } from '../types/AssetConfig';
-import { ChainConfig } from '../types/ChainConfig';
-
-const xcmDeliveryFeeAmount = 0.036;
-
-export const polkadotAssetHubConfig = new ChainConfig({
- assets: [
- ...new AssetConfig({
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- destination: moonbeam,
- destinationFee: {
- amount: FeeBuilder()
- .xcmPaymentApi()
- .xcmPaymentFee({ isAssetReserveChain: false }),
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- },
- extrinsic: ExtrinsicBuilder()
- .polkadotXcm()
- .limitedReserveTransferAssets()
- .X2(),
- fee: {
- asset: dot,
- balance: BalanceBuilder().substrate().system().account(),
- xcmDeliveryFeeAmount,
- },
- min: AssetMinBuilder().assets().asset(),
- }),
- ],
- chain: polkadotAssetHub,
-});
-```
-
-You're almost there. With this configuration, you can send the asset one-way from the configured chain to the asset's specified destination chain. To send the asset back to the original source chain, you must update (or create) the specified destination chain's configurations. Considering the above example, the Moonbeam configuration file would need to be updated to transfer USDT from Moonbeam back to the Polkadot Asset Hub.
-
-You must take the same steps in the destination chain's configuration file. If a configuration file does not exist, you must create one. Otherwise, update the chain's configuration file to include the asset configuration, as step three outlines.
-
-For example, enabling USDT transfers from Moonbeam back to the Polkadot Asset Hub requires the following Moonbeam chain configuration:
-
-```ts
-import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder';
-import {
- ...
- usdt,
-} from '../assets';
-import {
- ...
- polkadotAssetHub,
-} from '../chains';
-import { AssetConfig } from '../types/AssetConfig';
-import { ChainConfig } from '../types/ChainConfig';
-
-export const moonbeamConfig = new ChainConfig({
- assets: [
- ...
- new AssetConfig({
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- contract: ContractBuilder().Xtokens().transfer(),
- destination: polkadotAssetHub,
- destinationFee: {
- amount: 0.7,
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- },
- fee: {
- asset: glmr,
- balance: BalanceBuilder().substrate().system().account(),
- },
- }),
- ],
- chain: moonbeam,
-});
-```
-
-And that's it! You now know how to add new assets and chains and configure the chains that an asset can be sent to and from. To ensure that you've properly set everything up, read on to the next section.
-
-## Test New Configurations
-
-The SDK is configured to work for most parachains in the Polkadot ecosystem. However, any given chain might have a different or particular way of requesting a specific piece of information, for example, if it uses unconventional pallets or different methods for existing pallets.
-
-You can use the following queries to ensure that the new configurations have been properly set up.
-
-- `assetRegistry.assetMetadatas` - From here, we extract the `decimals` and the `minBalance` for
- `aSEED`:
-
- ```js
- {
- name: aUSD SEED
- symbol: aSEED
- decimals: 12
- minimalBalance: 100,0
- }
- ```
-
-- `assets.metadata` - Here, we get the `decimals` for `DOT`
-
- ```js
- {
- deposit: 0;
- name: xcDOT;
- symbol: xcDOT;
- decimals: 10;
- isFrozen: false;
- }
- ```
-
-- `balances.existentialDeposit` - This is the standard way of querying the existential deposit for most chains
-
- ```js
- 100000000000;
- ```
-
-Most cases are considered already, but for newly integrated chains, this data might be queried by a different pallet or function. You can check if the pallet is supported in the [Polkadot Service file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/sdk/src/polkadot/PolkadotService.ts).
diff --git a/mkdocs/docs/contribute/.pages b/mkdocs/docs/contribute/.pages
new file mode 100644
index 00000000..0f319088
--- /dev/null
+++ b/mkdocs/docs/contribute/.pages
@@ -0,0 +1,3 @@
+nav:
+ - 'XCM': 'xcm.md'
+ - 'MRL': 'mrl.md'
diff --git a/mkdocs/docs/contribute/mrl.md b/mkdocs/docs/contribute/mrl.md
new file mode 100644
index 00000000..2c6e1adc
--- /dev/null
+++ b/mkdocs/docs/contribute/mrl.md
@@ -0,0 +1,379 @@
+---
+title: Add Assets or Chains to the MRL SDK
+description: Learn how to add an asset or chain to the Moonbeam MRL SDK.
+template: tutorial.html
+---
+
+# Contribute to the MRL SDK
+
+## Get Started
+
+To contribute to the MRL SDK, you'll first need to fork the [GitHub repository](https://github.com/moonbeam-foundation/xcm-sdk){target=\_blank}, and then clone the repository to your local machine.
+
+```bash
+git clone https://github.com/YOUR_GITHUB_USERNAME/xcm-sdk.git
+```
+
+Then, install dependencies:
+
+```bash
+npm install
+```
+
+## Add an Asset
+
+Follow the steps outlined in the [Add an Asset](./xcm.md#add-an-asset){target=\_blank} section of the XCM SDK documentation. The process is the same for this step
+
+## Add a Chain
+
+The next step to support an asset integration is to add chain information for the chains in which your asset can be sent to and from to the [chains configuration file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/chains.ts){target=\_blank}.
+
+To add a chain, take the following steps:
+
+1. Open the `xcm-sdk/packages/config/src/chains.ts` file
+2. Add your asset to the list of imported assets from the assets configuration file (`./assets.ts`)
+3. Create a new variable for each chain if an entry doesn't already exist. You'll need to create a [Chain Object](../reference/xcm.md#the-chain-object), providing metadata related to the chain
+
+ === "Parachain"
+
+ ```ts
+ new Parachain({
+ assetsData: [], // Optional - In the next step, you'll add assets here
+ ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
+ genesisHash: 'INSERT_GENESIS_HASH',
+ isTestChain: INSERT_BOOLEAN, // Optional
+ key: 'INSERT_KEY',
+ name: 'INSERT_NAME',
+ nativeAsset: INSERT_NATIVE_ASSET, // from the assets.ts file
+ parachainId: INSERT_PARACHAIN_ID,
+ ss58Format: INSERT_SS58_FORMAT,
+ ws: ['INSERT_WSS_ENDPOINTS'],
+ });
+ ```
+
+ === "EVM Parachain"
+
+ ```ts
+ new EvmParachain({
+ assetsData: [], // Optional - In the next step, you'll add assets here
+ ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
+ genesisHash: 'INSERT_GENESIS_HASH',
+ id: INSERT_EVM_CHAIN_ID,
+ isTestChain: INSERT_BOOLEAN, // Optional
+ key: 'INSERT_KEY',
+ name: 'INSERT_NAME',
+ nativeAsset: INSERT_NATIVE_ASSET, // from the assets.ts file
+ parachainId: INSERT_PARACHAIN_ID,
+ ss58Format: INSERT_SS58_FORMAT,
+ rpc: 'INSERT_RPC_ENDPOINT',
+ ws: ['INSERT_WSS_ENDPOINTS'],
+ });
+ ```
+
+ === "EVM Chain"
+
+ ```ts
+ new EvmChain({
+ assetsData: [], // Optional - In the next step, you'll add assets here
+ ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
+ id: INSERT_EVM_CHAIN_ID,
+ isTestChain: INSERT_BOOLEAN, // Optional
+ key: 'INSERT_KEY',
+ name: 'INSERT_NAME',
+ nativeAsset: INSERT_NATIVE_ASSET, // from the assets.ts file
+ rpc: 'INSERT_RPC_ENDPOINT',
+ wh: {
+ name: 'INSERT_WORMHOLE_NAME',
+ }, // Optional - if using Wormhole for MRL
+ });
+ ```
+
+ For example, this is the configuration for adding the Ethereum chain:
+
+ ```ts
+ export const ethereum = new EvmChain({
+ assets: [],
+ ecosystem: Ecosystem.Polkadot,
+ explorer: 'https://etherscan.io',
+ id: 1,
+ key: 'ethereum',
+ name: 'Ethereum',
+ nativeAsset: eth,
+ rpc: 'https://ethereum-rpc.publicnode.com',
+ wh: {
+ name: 'Ethereum',
+ },
+ });
+ ```
+
+4. Add the newly created chain to the `chainsList` array at the end of the file
+
+!!! note
+Chains are listed in alphabetical order. Please make sure you follow this order when adding new chains.
+
+## Configure a Chain's Assets
+
+Similar to the [XCM SDK](./xcm.md#configure-a-chain-s-assets){target=\_blank}, you'll need to configure the source and destination chains of an asset.
+
+Here are the steps to configure the source and destination chains of an asset, specifically for an MRL route.
+
+1. In the `assetsData` array of the source chain, you'll need to create a [Chain Asset Object](../reference/xcm.md#the-chain-asset-object) for the asset, specifying how the asset is seen on that chain.
+
+ For example, this is the configuration for USDT on Ethereum:
+
+ ```ts
+ export const ethereum = new EvmChain({
+ ...
+ assetsData: [
+ ...
+ ChainAsset.fromAsset(usdt, {
+ address: '0xdac17f958d2ee523a2206206994597c13d831ec7', // address of the asset on Ethereum
+ decimals: 6,
+ }),
+ ...
+ ],
+ ...
+ });
+ ```
+
+2. In the destination chain's `assetsData` array, create a [Chain Asset Object](../reference/xcm.md#the-chain-asset-object) that defines the asset as seen on the destination chain. This will be different than the source chain's configurations, as every chain manages assets differently
+
+ For example, to add support for USDT on Moonbeam, Moonbeam's chain configuration needs to include the configuration for USDT:
+
+ ```ts
+ export const moonbeam = new EvmParachain({
+ assetsData: [
+ ...
+ ChainAsset.fromAsset(usdtwh, {
+ address: '0xc30E9cA94CF52f3Bf5692aaCF81353a27052c46f', // address of the asset on Moonbeam
+ decimals: 6,
+ ids: {
+ palletInstance: 110, // index of the Assets pallet, used for the MRL integration
+ },
+ }),
+ ...
+ ]
+ ...
+ });
+ ```
+
+!!! note
+Note that the asset we're using is different in each chain, `usdt` in Ethereum and `usdtwh` in Moonbeam. This is because the symbol of the asset is different on each chain, in this case because USDT.wh is a representation of USDT on Wormhole. You'll need to determine which representation of the asset you're using on each chain.
+
+## Configure a Chain Route
+
+### Prerequisites
+
+These steps are the same as the [XCM SDK](./xcm.md#configure-a-chain-route){target=\_blank}, but you'll need to create the builders for the MRL routes as well. So you'll need to know which pallet, method and provider you're using for the MRL routes.
+Also, you'll need to know the [type of transfer](../reference/mrl.md#transfer-types){target=\_blank} you're using, as the builders will be different depending on the type of transfer.
+
+### Creating the routes in the configuration files
+
+Assuming that all of the required pallets and methods are already supported, you can create the configuration file for the source chain:
+
+1. In the `xcm-sdk/packages/config/src/mrl-configs` directory, add a TypeScript file for the new chain. If the chain already has a configuration file, you can update it instead adding the new routes, go to step 3.
+2. Use the following snippet as a starting point for adding the chain routes:
+
+ ```ts
+ import { INSERT_REQUIRED_BUILDERS } from '@moonbeam-network/xcm-builder';
+ import { INSERT_REQUIRED_ASSETS } from '../assets';
+ import { INSERT_SOURCE_CHAIN, INSERT_DESTINATION_CHAIN, INSERT_MOON_CHAIN } from '../chains';
+ import { MrlChainRoutes } from '../types/MrlChainRoutes';
+
+ // The chain config name should be formatted as: 'chainName' + 'Routes'
+ export const INSERT_CHAIN_CONFIG_NAME = new MrlChainRoutes({
+ chain: INSERT_SOURCE_CHAIN, // The source chain
+ routes: [], // In the next step, you'll add routes here
+ });
+ ```
+
+3. As seen in the above example, a `routes` array contains the chain's routes. The route configuration defines the asset being transferred, the destination chain, the moonchain, information associated with fees, and the builder functions. The builder functions must be used to build the queries or calls as if they were being executed from this chain.
+
+ You'll need to create a [Route](../reference/mrl.md#the-mrl-asset-route-object) for each asset, for example:
+
+ ```ts
+ {
+ source: {
+ asset: INSERT_ASSET,
+ balance: INSERT_BALANCE_BUILDER,
+ destinationFee: {
+ asset: INSERT_DESTINATION_FEE_ASSET,
+ balance: INSERT_DESTINATION_FEE_BALANCE_BUILDER,
+ },
+ },
+ destination: {
+ asset: INSERT_ASSET,
+ chain: INSERT_DESTINATION_CHAIN,
+ balance: INSERT_BALANCE_BUILDER,
+ fee: {
+ asset: INSERT_DESTINATION_FEE_ASSET,
+ amount: INSERT_FEE_AMOUNT,
+ },
+ },
+ mrl: {
+ isAutomaticPossible: INSERT_IS_AUTOMATIC_POSSIBLE,
+ transfer: INSERT_MRL_BUILDER,
+ moonChain: {
+ asset: INSERT_ASSET_IN_MOON_CHAIN,
+ balance: INSERT_BALANCE_BUILDER,
+ fee: {
+ asset: INSERT_FEE_ASSET_MOON_CHAIN,
+ amount: INSERT_FEE_AMOUNT,
+ balance: INSERT_FEE_BALANCE_BUILDER,
+ },
+ },
+ },
+ },
+ ```
+
+4. Add the newly created chain configurations to the `mrlRoutesList` in the `xcm-sdk/blob/main/packages/config/src/mrl-configs/index.ts` file
+
+!!! note
+Chain configurations are listed in alphabetical order. Please follow this order when adding new chain configurations.
+
+For example, to add support to transfer USDT from Ethereum to Hydration, and ETH from Ethereum to Moonbeam, the Ethereum configuration file is as follows:
+
+```ts
+import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder';
+import { eth, glmr, usdt, usdtwh, weth } from '../assets';
+import { ethereum, hydration, moonbeam } from '../chains';
+import { MrlChainRoutes } from '../types/MrlChainRoutes';
+
+export const ethereumRoutes = new MrlChainRoutes({
+ chain: ethereum,
+ routes: [
+ /**
+ * Destination Hydration
+ */
+ {
+ source: {
+ asset: usdt,
+ balance: BalanceBuilder().evm().erc20(),
+ destinationFee: {
+ asset: usdt,
+ balance: BalanceBuilder().evm().erc20(),
+ },
+ },
+ destination: {
+ asset: usdtwh,
+ chain: hydration,
+ balance: BalanceBuilder().substrate().tokens().accounts(),
+ fee: {
+ asset: usdtwh,
+ amount: 0.004,
+ },
+ },
+ mrl: {
+ isAutomaticPossible: false,
+ transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(),
+ moonChain: {
+ asset: usdtwh,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: glmr,
+ amount: 0.15,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ },
+ },
+ /**
+ * Destination Moonbeam
+ */
+ {
+ source: {
+ asset: eth,
+ balance: BalanceBuilder().evm().native(),
+ destinationFee: {
+ asset: eth,
+ balance: BalanceBuilder().evm().native(),
+ },
+ },
+ destination: {
+ asset: weth,
+ chain: moonbeam,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: weth,
+ amount: 0,
+ },
+ },
+ mrl: {
+ isAutomaticPossible: true,
+ transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(),
+ moonChain: {
+ asset: weth,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: glmr,
+ amount: 0.15,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ },
+ },
+ ],
+});
+
+```
+
+With this configuration, you can send the asset one-way from the configured chain to the asset's specified destination chain. To send the asset back to the original source chain, you must update (or create) the specified destination chain's configurations. Considering the above example, the Hydration configuration file would need to be updated to transfer USDT from Hydration back to Ethereum.
+
+You must take the same steps in the destination chain's configuration file. If a configuration file does not exist, you must create one. Otherwise, update the chain's configuration file to include the asset route, as step three outlines.
+
+For example, enabling USDT transfers from Hydration back to Ethereum requires the following Hydration chain configuration:
+
+```ts
+import { BalanceBuilder, MrlBuilder } from '@moonbeam-network/xcm-builder';
+import { glmr, hdx, usdt, usdtwh } from '../assets';
+import { ethereum, hydration } from '../chains';
+import { MrlChainRoutes } from '../types/MrlChainRoutes';
+
+export const hydrationRoutes = new MrlChainRoutes({
+ chain: hydration,
+ routes: [
+ {
+ source: {
+ asset: usdtwh,
+ balance: BalanceBuilder().substrate().tokens().accounts(),
+ destinationFee: {
+ asset: usdtwh,
+ balance: BalanceBuilder().substrate().tokens().accounts(),
+ },
+ moonChainFee: {
+ asset: glmr,
+ balance: BalanceBuilder().substrate().tokens().accounts(),
+ },
+ fee: {
+ asset: hdx,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ destination: {
+ asset: usdt,
+ chain: ethereum,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: usdt,
+ amount: 0,
+ },
+ },
+ mrl: {
+ isAutomaticPossible: true,
+ transfer: MrlBuilder().wormhole().extrinsic().polkadotXcm().send(),
+ moonChain: {
+ asset: usdtwh,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: glmr,
+ amount: 0.1,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ },
+ },
+ ],
+});
+```
+
+And that's it! You now know how to add new assets and chains and configure the chains that an asset can be sent to and from. To ensure that you've properly set everything up, read on to the next section.
diff --git a/mkdocs/docs/contribute/xcm.md b/mkdocs/docs/contribute/xcm.md
new file mode 100644
index 00000000..9509677c
--- /dev/null
+++ b/mkdocs/docs/contribute/xcm.md
@@ -0,0 +1,413 @@
+---
+title: Add Assets or Chains to the XCM SDK
+description: Learn how to add an asset or chain within the Polkadot or Kusama ecosystems to the Moonbeam XCM SDK.
+template: tutorial.html
+---
+
+# Contribute to the XCM SDK
+
+## Get Started
+
+To contribute to the XCM SDK, you'll first need to fork the [GitHub repository](https://github.com/moonbeam-foundation/xcm-sdk){target=\_blank}, and then clone the repository to your local machine.
+
+```bash
+git clone https://github.com/YOUR_GITHUB_USERNAME/xcm-sdk.git
+```
+
+Then, install dependencies:
+
+```bash
+npm install
+```
+
+## Add an Asset
+
+The first step in adding support for a new asset is to define the asset in the [assets configuration file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/assets.ts){target=\_blank}. At this stage, assets are not bound to any chain, you are only creating a representation of the asset.
+
+Follow these steps:
+
+1. Open the `xcm-sdk/packages/config/src/assets.ts` file
+2. Create a new variable for your asset. You'll need to create an [Asset Object](../reference/xcm.md#the-asset-object), providing the `key` and `originSymbol` of the asset
+
+ ```ts
+ export const INSERT_ASSET_NAME = new Asset({
+ key: 'INSERT_KEY',
+ originSymbol: 'INSERT_ORIGIN_SYMBOL',
+ });
+ ```
+
+ For example, this is the configuration used for USDT:
+
+ ```ts
+ export const usdt = new Asset({
+ key: 'usdt',
+ originSymbol: 'USDT',
+ });
+ ```
+
+3. Add your asset to the `assetsList` array at the end of the file
+
+!!! note
+Assets are listed in alphabetical order. Please make sure you follow this order when adding new assets.
+
+## Add a Chain
+
+The next step in supporting a new asset is to add chain information for all the chains to and from which your asset can be transferred. This is done in the [chains configuration file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/chains.ts){target=\_blank}.
+
+To add a chain, take the following steps:
+
+1. Open the `xcm-sdk/packages/config/src/chains.ts` file
+2. Add your asset to the list of imported assets from the assets configuration file (`./assets.ts`)
+3. Create a new variable for each chain if an entry doesn't already exist. You'll need to create a [Chain Object](../reference/xcm.md#the-chain-object), providing metadata related to the chain
+
+ === "Parachain"
+
+ ```ts
+ new Parachain({
+ assetsData: [], // Optional - In the next step, you'll add assets here
+ ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
+ genesisHash: 'INSERT_GENESIS_HASH',
+ isTestChain: INSERT_BOOLEAN, // Optional
+ key: 'INSERT_KEY',
+ name: 'INSERT_NAME',
+ nativeAsset: INSERT_NATIVE_ASSET, // from the assets.ts file
+ parachainId: INSERT_PARACHAIN_ID,
+ ss58Format: INSERT_SS58_FORMAT,
+ ws: ['INSERT_WSS_ENDPOINTS'],
+ })
+
+ ;
+ ```
+
+ === "EVM Parachain"
+
+ ```ts
+ new EvmParachain({
+ assetsData: [], // Optional - In the next step, you'll add assets here
+ ecosystem: Ecosystem.INSERT_ECOSYSTEM_TYPE, // Optional
+ genesisHash: 'INSERT_GENESIS_HASH',
+ id: INSERT_EVM_CHAIN_ID,
+ isTestChain: INSERT_BOOLEAN, // Optional
+ key: 'INSERT_KEY',
+ name: 'INSERT_NAME',
+ nativeAsset: INSERT_NATIVE_ASSET, // from the assets.ts file
+ parachainId: INSERT_PARACHAIN_ID,
+ ss58Format: INSERT_SS58_FORMAT,
+ rpc: 'INSERT_RPC_ENDPOINT',
+ ws: ['INSERT_WSS_ENDPOINTS'],
+ })
+ ```
+
+ For example, this is the configuration for the Polkadot Asset Hub:
+
+ ```ts
+ export const polkadotAssetHub = new Parachain({
+ assets: [],
+ ecosystem: Ecosystem.Polkadot,
+ genesisHash:
+ '0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f',
+ key: 'Polkadot-asset-hub',
+ name: 'Polkadot Asset Hub',
+ nativeAsset: dot,
+ parachainId: 1000,
+ ss58Format: 42,
+ ws: [
+ 'wss://asset-hub-polkadot-rpc.dwellir.com',
+ 'wss://polkadot-asset-hub-rpc.polkadot.io',
+ 'wss://statemint.api.onfinality.io/public-ws',
+ ],
+ checkSovereignAccountBalances: true, // one of the optional params - in this case we want to perform a check on the sovereign account balances when transferring to Polkadot Asset Hub
+ })
+ ```
+
+4. Add the newly created chain to the `chainsList` array at the end of the file
+
+!!! note
+Chains are listed in alphabetical order. Please make sure you follow this order when adding new chains.
+
+Now that you've added the chain, you can continue to the next section to add the assets that this chain supports.
+
+## Configure a Chain's Assets {#configure-a-chain-s-assets}
+
+To designate a chain as a destination or source chain for an asset, you must specify the asset within the `assetsData` array of the chain's configuration. This array outlines the supported assets on the chain, and the asset information within it determines how the asset is identified or targeted on that specific chain. For example, when adding a chain's native asset, you'll need to define how the chain sees its own asset, and when adding the asset to a destination chain, you'll need to define how the destination chain sees the asset.
+
+To enable an asset to move between chains, follow these steps to configure the source and destination chains of an asset:
+
+1. In the `assetsData` array of the source chain, you'll need to create a [Chain Asset Object](../reference/xcm.md#the-chain-asset-object) for the asset, specifying how the asset is seen on that chain. Since the asset is already defined in the assets configuration file, you can use the `fromAsset` method to create the Chain Asset Object.
+
+ ```ts
+ new ChainAsset.fromAsset(INSERT_ASSET_FROM_ASSETS_CONFIG, {
+ address: 'INSERT_ADDRESS', // Optional
+ decimals: INSERT_DECIMALS,
+ ids: {
+ id: INSERT_CHAIN_ASSET_ID, // Optional
+ balanceId: INSERT_BALANCE_ID, // Optional, asset id for balance queries
+ minId: INSERT_MIN_ID, // Optional, asset id for minimum amount queries
+ palletInstance: INSERT_PALLET_INSTANCE, // Optional, index of the Assets pallet
+ },
+ })
+ ```
+
+ For example, this is the configuration for USDT on the Polkadot Asset Hub:
+
+ ```ts
+ export const polkadotAssetHub = new Parachain({
+ ...
+ assetsData: [
+ ChainAsset.fromAsset(usdt, {
+ decimals: 6,
+ ids: {
+ id: 1984, // id of the asset on Polkadot Asset Hub
+ palletInstance: 50, // index of the Assets pallet, used in building the XCM extrinsic
+ },
+ }),
+ ],
+ ...
+ });
+ ```
+
+2. In the destination chain's `assetsData` array, create a [Chain Asset Object](../reference/xcm.md#the-chain-asset-object) that defines the asset as seen on the destination chain. This will be different than the source chain's configurations, as every chain manages assets differently
+
+ For example, to add support for USDT on Moonbeam, Moonbeam's chain configuration needs to include the configuration for USDT:
+
+ ```ts
+ export const moonbeam = new EvmParachain({
+ assetsData: [
+ ...
+ ChainAsset.fromAsset(usdt, {
+ address: '0xFFFFFFfFea09FB06d082fd1275CD48b191cbCD1d', // address of the asset on Moonbeam
+ decimals: 6,
+ ids: {
+ id: '311091173110107856861649819128533077277', // id of the asset on Moonbeam
+ },
+ }),
+ ...
+ ]
+ ...
+ });
+ ```
+
+
+The integration isn't complete yet; you'll need to define the methods used for cross-chain transfers for any new chains added. This will be covered in the following section.
+
+## Configure a Chain Route
+
+### Prerequisites
+In this step, you have to create or update the configuration files of the chains between which you can transfer the asset. These files define the asset being transferred, the destination chain, information associated to fees, and builder functions. These builders define the pallets and methods necessary to achieve the specific goals of each type. They are as follows:
+
+- **Balance Builder** - builds a query to retrieve the balance of an asset for a given account
+- **Contract Builder** - builds the contract call for the cross-chain transfer. This is specific to EVM chains that use contracts to interact with Substrate pallets for cross-chain transfers, such as [Moonbeam's X-Tokens precompiled contract](https://docs.moonbeam.network/builders/interoperability/xcm/xc20/send-xc20s/xtokens-precompile/){target=\_blank}
+- **Extrinsic Builder** - builds the extrinsic for the cross-chain transfer
+- **Fee Builder** - builds the query to retrieve the fee for the execution of the cross-chain transfer
+- **Minimum Asset Builder** - builds a query to retrieve the minimum amount of an asset required to be left in an account
+
+You will need to know which pallet and method each chain is using for its XCM transactions and for fetching asset balances, and make sure that said pallets and methods are already available in the [xcm-builder package](https://github.com/moonbeam-foundation/xcm-sdk/tree/main/packages/builder){target=\_blank}.
+
+If they aren't available, feel free to open a PR or [submit an issue on GitHub](https://github.com/moonbeam-foundation/xcm-sdk/issues/new){target=\_blank}.
+
+### Creating the routes in the configuration files
+
+Assuming that all of the required pallets and methods are already supported, you can create the configuration file for the source chain:
+
+1. In the `xcm-sdk/packages/config/src/xcm-configs` directory, add a TypeScript file for the new chain. If the chain already has a configuration file, you can update it instead by adding the new routes, so you can go directly to step 3.
+2. Use the following snippet as a starting point for adding the chain routes:
+
+ ```ts
+ import { INSERT_REQUIRED_BUILDERS } from '@moonbeam-network/xcm-builder';
+ import { INSERT_REQUIRED_ASSETS } from '../assets';
+ import { INSERT_SOURCE_CHAIN, INSERT_DESTINATION_CHAIN } from '../chains';
+ import { ChainRoutes } from '../types/ChainRoutes';
+
+ // The chain config name should be formatted as: 'chainName' + 'Routes'
+ export const INSERT_CHAIN_CONFIG_NAME = new ChainRoutes({
+ chain: INSERT_SOURCE_CHAIN, // The source chain
+ routes: [], // In the next step, you'll add routes here
+ });
+ ```
+
+3. As seen in the above example, a `routes` array contains the chain's routes. The route configuration defines the asset being transferred, the destination chain, information associated with fees, and the builder functions. The builder functions must be used to build the queries or calls as if they were being executed from this chain.
+
+ You'll need to create a [Route](../reference/xcm.md#the-asset-route-object) for each asset, for example:
+
+ ```ts
+ {
+ source: {
+ asset: INSERT_ASSET,
+ balance: INSERT_BALANCE_BUILDER,
+ fee: {
+ asset: INSERT_FEE_ASSET,
+ balance: INSERT_FEE_BALANCE_BUILDER,
+ extra: INSERT_FEE_AMOUNT, // Optional
+ },
+ destinationFee: {
+ asset: INSERT_DESTINATION_FEE_ASSET, // Optional, if the fee asset in destination have different representation in the source chain
+ balance: INSERT_DESTINATION_FEE_BALANCE_BUILDER, // The builder function for the balance in the source chain for the asset used for fees in the destination chain
+ },
+ min: INSERT_MIN_ASSET_BUILDER, // Optional
+ },
+ destination: {
+ asset: INSERT_ASSET, // The asset being transferred, but the representation in the destination chain
+ chain: INSERT_DESTINATION_CHAIN,
+ balance: INSERT_BALANCE_BUILDER,
+ fee: {
+ amount: INSERT_FEE_BUILDER, // Ideally a builder function, but can be a number with the specific amount of the fee
+ asset: INSERT_DESTINATION_FEE_ASSET,
+ balance: INSERT_DESTINATION_FEE_BALANCE_BUILDER, // Optional
+ extra: INSERT_EXTRA_FEE_AMOUNT, // Optional
+ },
+ min: INSERT_MIN_ASSET_BUILDER, // Optional
+ },
+ extrinsic: INSERT_EXTRINSIC_BUILDER,
+ }
+ ```
+
+4. Add the newly created chain configurations to the `xcmRoutesList` in the `xcm-sdk/blob/main/packages/config/src/xcm-configs/index.ts` file
+
+!!! note
+Chain configurations are listed in alphabetical order. Please follow this order when adding new chain configurations.
+
+For example, to add support to transfer USDT from the Polkadot Asset Hub to Moonbeam, the Polkadot Asset Hub configuration file is as follows:
+
+```ts
+import {
+ AssetMinBuilder,
+ BalanceBuilder,
+ ExtrinsicBuilder,
+ FeeBuilder,
+} from '@moonbeam-network/xcm-builder';
+import { dot, usdt } from '../assets';
+import { moonbeam, polkadotAssetHub } from '../chains';
+import { ChainRoutes } from '../types/ChainRoutes';
+
+const extra = 0.036;
+
+export const polkadotAssetHubRoutes = new ChainRoutes({
+ chain: polkadotAssetHub,
+ routes: [
+ {
+ source: {
+ asset: usdt,
+ balance: BalanceBuilder().substrate().assets().account(),
+ fee: {
+ asset: dot, // fees in Polkadot Asset Hub are paid in DOT
+ balance: BalanceBuilder().substrate().system().account(),
+ extra,
+ },
+ min: AssetMinBuilder().assets().asset(),
+ destinationFee: {
+ balance: BalanceBuilder().substrate().assets().account(),
+ },
+ },
+ destination: {
+ asset: usdt,
+ chain: moonbeam,
+ balance: BalanceBuilder().substrate().assets().account(),
+ fee: {
+ amount: FeeBuilder()
+ .xcmPaymentApi()
+ .xcmPaymentFee({ isAssetReserveChain: false }),
+ asset: usdt, // fees in Moonbeam are paid in USDT, in this case is the same asset as the one being transferred, but it is not always the case
+ },
+ },
+ extrinsic: ExtrinsicBuilder()
+ .polkadotXcm()
+ .limitedReserveTransferAssets()
+ .X2(),
+ },
+ ],
+});
+```
+
+You're almost there. With this configuration, you can send the asset one-way from the configured chain to the asset's specified destination chain. To send the asset back to the original source chain, you must update (or create) the specified destination chain's configurations. Considering the above example, the Moonbeam configuration file would need to be updated to transfer USDT from Moonbeam back to the Polkadot Asset Hub.
+
+You must take the same steps in the destination chain's configuration file. If a configuration file does not exist, you must create one. Otherwise, update the chain's configuration file to include the asset route, as step three outlines.
+
+For example, enabling USDT transfers from Moonbeam back to the Polkadot Asset Hub requires the following Moonbeam chain configuration:
+
+```ts
+import {
+ AssetMinBuilder,
+ BalanceBuilder,
+ ContractBuilder,
+} from '@moonbeam-network/xcm-builder';
+import { glmr, usdt } from '../assets';
+import { moonbeam, polkadotAssetHub } from '../chains';
+import { ChainRoutes } from '../types/ChainRoutes';
+
+export const moonbeamRoutes = new ChainRoutes({
+ chain: moonbeam,
+ routes: [
+ {
+ source: {
+ asset: usdt,
+ balance: BalanceBuilder().substrate().assets().account(),
+ fee: {
+ asset: glmr,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ destinationFee: {
+ balance: BalanceBuilder().substrate().assets().account(),
+ },
+ },
+ destination: {
+ asset: usdt,
+ chain: polkadotAssetHub,
+ balance: BalanceBuilder().substrate().assets().account(),
+ fee: {
+ amount: 0.02,
+ asset: usdt,
+ },
+ min: AssetMinBuilder().assets().asset(),
+ },
+ contract: ContractBuilder().Xtokens().transfer(),
+ },
+ ],
+});
+```
+
+And that's it! You now know how to add new assets and chains and configure the chains that an asset can be sent to and from. To ensure that you've properly set everything up, read on to the next section.
+
+## Test New Configurations
+
+The SDK is configured to work for most parachains in the Polkadot ecosystem. However, any given chain might have a different or particular way of requesting a specific piece of information, for example, if it uses unconventional pallets or different methods for existing pallets.
+
+You can use the following queries to ensure that the new configurations have been properly set up.
+
+- `assetRegistry.assetMetadatas` - From here, we extract the `minBalance` for
+ `aSEED`:
+
+ ```js
+ {
+ name: aUSD SEED
+ symbol: aSEED
+ decimals: 12
+ minimalBalance: 100,0
+ }
+ ```
+
+- `assets.assetMetadatas` - Here, we get the `minBalance` for `USDT`
+
+ ```js
+ {
+ owner: 15uPcYeUE2XaMiMJuR6W7QGW2LsLdKXX7F3PxKG8gcizPh3X
+ issuer: 15uPcYeUE2XaMiMJuR6W7QGW2LsLdKXX7F3PxKG8gcizPh3X
+ admin: 15uPcYeUE2XaMiMJuR6W7QGW2LsLdKXX7F3PxKG8gcizPh3X
+ freezer: 15uPcYeUE2XaMiMJuR6W7QGW2LsLdKXX7F3PxKG8gcizPh3X
+ supply: 77,998,715,321,907
+ deposit: 1,000,000,000,000
+ minBalance: 10,000
+ isSufficient: true
+ accounts: 9,151
+ sufficients: 9,042
+ approvals: 14
+ status: Live
+ }
+ ```
+
+- `balances.existentialDeposit` - This is the standard way of querying the existential deposit for most chains
+
+ ```js
+ 100000000000;
+ ```
+
+Most cases are considered already, but for newly integrated chains, this data might be queried by a different pallet or function.
diff --git a/mkdocs/docs/example-usage.md b/mkdocs/docs/example-usage.md
deleted file mode 100644
index 361531fe..00000000
--- a/mkdocs/docs/example-usage.md
+++ /dev/null
@@ -1,892 +0,0 @@
----
-title: Using the XCM SDK v2
-description: Use the Moonbeam XCM SDK to easily transfer cross-chain assets between parachains or between a parachain and relay chain within the Polkadot/Kusama ecosystems.
-template: tutorial.html
----
-
-# Using the Moonbeam XCM SDK
-
-## Introduction {: #introduction }
-
-The Moonbeam XCM SDK enables developers to easily transfer assets between chains, either between parachains or between a parachain and the relay chain, within the Polkadot/Kusama ecosystem. With the SDK, you don't need to worry about determining the multilocation of the origin or destination assets or which extrinsics are used on which networks to send XCM transfers.
-
-The XCM SDK offers helper functions that provide a very simple interface for executing XCM transfers between chains in the Polkadot/Kusama ecosystem. In addition, the XCM config package allows any parachain project to [add their information](./contribute.md) in a standard way, so the XCM SDK can immediately support them.
-
-For an overview of the available methods and interfaces in the Moonbeam XCM SDK, please refer to the [Reference](./reference/interfaces.md){target=\_blank} page.
-
-This guide shows how to transfer DOT from Polkadot to Moonbeam.
-
-## Install the XCM SDK {: #install-the-xcm-sdk }
-
-To get started with the Moonbeam XCM SDK, you'll need first to install the SDK:
-
-```bash
-npm install @moonbeam-network/xcm-sdk
-```
-
-You'll also need to install a few additional dependencies that you'll use to interact with the SDK in this guide. You'll need the Polkadot.js API to create a Polkadot signer:
-
-```bash
-npm install @polkadot/api @polkadot/util-crypto
-```
-
-You'll also need an Ethereum signer if you're interacting with an Ethereum-compatible chain like Moonbeam. This guide will cover using Ethers.js and viem. You'll need to install whichever library you want to use:
-
-=== "Ethers.js"
-
- ```bash
- npm install ethers@6
- ```
-
-=== "viem"
-
- ```bash
- npm install viem@2
- ```
-
-## Create Signers {: #create-signers }
-
-When transferring assets between chains, you'll need signers in place to sign the transactions. If you're interacting with an Ethereum-compatible chain that uses standard Ethereum-style H160 addresses, such as Moonbeam, you'll need to have an Ethereum signer, which can be an [Ethers.js](https://docs.ethers.org/v5/){target=\_blank} signer or a [viem Wallet Client](https://viem.sh/docs/clients/wallet.html){target=\_blank}. To interact with the relay chain or other parachains, you'll need a [Polkadot](https://polkadot.js.org/docs/api/){target=\_blank} signer.
-
-You can pass, for example, a [browser extension wallet as a signer into Ethers](https://docs.ethers.org/v5/getting-started/#getting-started--connecting){target=\_blank} or [viem](https://viem.sh/docs/clients/wallet.html#json-rpc-accounts){target=\_blank}, such as MetaMask. Similarly, with Polkadot, you can [pass a compatible wallet to the signer using the `@polkadot/extension-dapp` library](https://polkadot.js.org/docs/extension/){target=\_blank}.
-
-To create an EVM signer and a Polkadot signer, you can refer to the following sections.
-
-!!! warning
-**Never store your private key or mnemonic in a JavaScript or TypeScript file.**
-
-### Create an EVM Signer {: #create-a-evm-signer }
-
-To create an Ethers signer, you can use the following code snippet:
-
-```js
-import { ethers } from 'ethers';
-
-const privateKey = 'INSERT_PRIVATE_KEY';
-const provider = new ethers.WebSocketProvider('INSERT_WS_ENDPOINT', {
- chainId: INSERT_CHAIN_ID,
- name: 'INSERT_CHAIN_NAME',
-});
-const evmSigner = new ethers.Wallet(privateKey, provider);
-```
-
-For Moonbeam specifically, you can use the following configurations:
-
-=== "Moonbeam"
-
- ```js
- import { ethers } from 'ethers';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const provider = new ethers.WebSocketProvider(
- '{{ networks.moonbeam.wss_url }}',
- {
- chainId: {{ networks.moonbeam.chain_id }},
- name: 'moonbeam',
- }
- );
- const evmSigner = new ethers.Wallet(privateKey, provider);
- ```
-
-=== "Moonriver"
-
- ```js
- import { ethers } from 'ethers';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const provider = new ethers.WebSocketProvider(
- '{{ networks.moonriver.wss_url }}',
- {
- chainId: {{ networks.moonriver.chain_id }},
- name: 'moonriver',
- }
- );
- const evmSigner = new ethers.Wallet(privateKey, provider);
- ```
-
-=== "Moonbase Alpha"
-
- ```js
- import { ethers } from 'ethers';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const provider = new ethers.WebSocketProvider(
- '{{ networks.moonbase.wss_url }}',
- {
- chainId: {{ networks.moonbase.chain_id }},
- name: 'moonbase',
- }
- );
- const evmSigner = new ethers.Wallet(privateKey, provider);
- ```
-
-Alternatively, you can create a viem Wallet Client to pass as an EVM signer:
-
-=== "Moonbeam"
-
- ```js
- import { createWalletClient, http } from 'viem';
- import { privateKeyToAccount } from 'viem/accounts'
- import { moonbeam } from 'viem/chains';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const account = privateKeyToAccount(privateKey);
-
- const evmSigner = createWalletClient({
- account,
- chain: moonbeam,
- transport: http(),
- });
- ```
-
-=== "Moonriver"
-
- ```js
- import { createWalletClient, http } from 'viem';
- import { privateKeyToAccount } from 'viem/accounts'
- import { moonriver } from 'viem/chains';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const account = privateKeyToAccount(privateKey);
-
- const evmSigner = createWalletClient({
- account,
- chain: moonriver,
- transport: http(),
- });
- ```
-
-=== "Moonbase Alpha"
-
- ```js
- import { createWalletClient, http } from 'viem';
- import { privateKeyToAccount } from 'viem/accounts'
- import { moonbaseAlpha } from 'viem/chains';
-
- const privateKey = 'INSERT_PRIVATE_KEY';
- const account = privateKeyToAccount(privateKey);
-
- const evmSigner = createWalletClient({
- account,
- chain: moonbaseAlpha,
- transport: http(),
- });
- ```
-
-If you want to pass in a browser extension wallet to viem, you can use the following code:
-
-=== "Moonbeam"
-
- ```js
- import { createWalletClient, custom } from 'viem';
- import { moonbeam } from 'viem/chains';
-
- const evmSigner = createWalletClient({
- chain: moonbeam,
- transport: custom(window.ethereum),
- });
- ```
-
-=== "Moonriver"
-
- ```js
- import { createWalletClient, custom } from 'viem';
- import { moonriver } from 'viem/chains';
-
- const evmSigner = createWalletClient({
- chain: moonriver,
- transport: custom(window.ethereum),
- });
- ```
-
-=== "Moonbase Alpha"
-
- ```js
- import { createWalletClient, custom } from 'viem';
- import { moonbaseAlpha } from 'viem/chains';
-
- const evmSigner = createWalletClient({
- chain: moonbaseAlpha,
- transport: custom(window.ethereum),
- });
- ```
-
-!!! note
---8<-- 'text/endpoint-setup.md'
-
-### Create a Polkadot Signer {: #create-a-polkadot-signer }
-
-In this example, you can use a [Polkadot.js Keyring](https://polkadot.js.org/docs/api/start/keyring/){target=\_blank} to sign transactions. Please note that this approach is not recommended for production applications.
-
-```js
-import { Keyring } from '@polkadot/api';
-import { cryptoWaitReady } from '@polkadot/util-crypto';
-
-const privateKey = 'INSERT_PRIVATE_KEY';
-
-const createPolkadotSigner = async () => {
- await cryptoWaitReady();
- const keyring = new Keyring({
- ss58Format: 'INSERT_SS58_FORMAT',
- type: 'sr25519',
- });
- const pair = keyring.createFromUri(privateKey);
-};
-
-createPolkadotSigner();
-```
-
-!!! note
-In the above `INSERT_PRIVATE_KEY` field, you can specify a seed phrase instead of a private key.
-
-## Get Asset and Chain Data {: #asset-chain-data }
-
-You can use any of the following code examples to retrieve information on the supported assets and the chains that support these assets.
-
-### Get List of Supported Assets {: #get-list-of-supported-assets }
-
-To get a list of all of the assets supported by the XCM SDK, you can instantiate the XCM SDK and call the [`assets`](./reference/methods.md#the-assets-method) function.
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const assets = sdkInstance.assets();
-
-console.log('The supported assets are as follows:');
-assets.assets.forEach((asset) => {
- console.log(`- ${asset.originSymbol}`);
-});
-```
-
-### Get List of Supported Assets by Ecosystem {: #get-supported-assets-by-ecosystem }
-
-To get a list of the supported assets for a particular [ecosystem](./reference/interfaces.md#the-ecosystem-type), you can pass in the ecosystem name: `polkadot`, `kusama`, or `alphanet-relay`. For example, the following snippet will get all of the Polkadot assets supported:
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const assets = sdkInstance.assets('polkadot');
-
-console.log(
- 'The supported assets within the Polkadot ecosystem are as follows:',
-);
-assets.assets.forEach((asset) => {
- console.log(`- ${asset.originSymbol}`);
-});
-```
-
-### Get List of Supported Chains by Asset {: #get-list-of-supported-assets-by-chain }
-
-To get a list of the supported [source](./reference/methods.md#the-source-method) and [destination](./reference/methods.md#the-destination-method) chains for a given asset, you can use the following code snippet, which logs the supported chains by asset for all of the supported assets in the Polkadot ecosystem:
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const assets = sdkInstance.assets('polkadot');
-
-assets.assets.forEach((asset) => {
- const { sourceChains, source } = assets.asset(asset);
- console.log(`You can send ${asset.originSymbol}...`);
- if (sourceChains.length > 1) {
- sourceChains.forEach((sourceChain) => {
- const { destinationChains } = source(sourceChain);
- if (destinationChains.length > 0) {
- destinationChains.forEach((destination) => {
- console.log(`- From ${source.name} to ${destination.name}`);
- });
- }
- });
- }
-});
-```
-
-## Build XCM Transfer Data {: #build-xcm-transfer-data }
-
-To transfer an asset from one chain to another, you'll need to first build the transfer data, which defines the asset to be transferred, the source chain and address, the destination chain and address, and the associated signer for the transaction. Building the transfer data is the first step; in the next section, you'll learn how to use it to actually transfer the asset.
-
-To get started, you'll use the [`Sdk`](./reference/methods.md#initialize-the-sdk) function, which will expose two methods for building the XCM transfer data: [`assets`](./reference/methods.md#the-assets-method) and [`getTransferData`](./reference/methods.md#the-get-transfer-data-method).
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-```
-
-You can choose either method, as both will return the data necessary to initiate an asset transfer between the source and destination chains. Using `assets` will provide additional data along the way, including the list of supported assets and, once an asset is selected, the supported source and destination chains that can send and receive it.
-
-The process for using `assets` to build the transfer data is as follows:
-
-1. Call the `assets` function and optionally pass in the ecosystem that you want to retrieve a list of assets for or that the asset you want to transfer belongs to. The available ecosystems are: `polkadot`, `kusama`, and `alphanet-relay`. For example:
-
- ```js
- const { assets, asset } = sdkInstance.assets('polkadot');
- ```
-
- This will return a list of the supported assets and the [`asset`](./reference/methods.md#the-asset-method) function that can be used to define the asset to be transferred
-
-2. Call the `asset` function and pass in the key or asset object (which includes the key and the origin symbol) to define the asset to be transferred. For example:
-
- ```js
- // Using the key
- const { sourceChains, source } = asset('dot');
- ```
-
- This will return a list of the supported source chains and the [`source`](./reference/methods.md#the-source-method) function, which is used to define the source chain to transfer the asset from
-
-3. Call the `source` function and pass in the key or the chain object (which includes the key, name, and chain type). For example:
-
- ```js
- // Using the key
- const { destinationChains, destination } = source('polkadot');
- ```
-
- This will return a list of the supported destination chains where there is an open XCM channel from the source chain for the given asset and the [`destination`](./reference/methods.md#the-destination-method) function, which is used to define the destination chain to transfer the asset to
-
-4. Call the `destination` function and pass in the key or the chain object (which includes the key, name, and chain type). For example:
-
- ```js
- // Using the key
- const { accounts } = destination('moonbeam');
- ```
-
- This will return the [`accounts`](./reference/methods.md#the-accounts-method) function, which is used to define the source and destination addresses and the associated signers for each address
-
-The asset and chain objects are managed within the `@moonbeam-network/xcm-config` package. You do not need to directly interact with this package as the SDK exposes this data, but there you can find the list of [assets](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/assets.ts){target=\_blank} and [chain data](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/chains.ts){target=\_blank}.
-
-An example of the steps described above to build the transfer data to transfer DOT from the Polkadot relay chain to Moonbeam is as follows:
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-
-const fromPolkadot = async () => {
- const { assets, asset } = sdkInstance.assets();
- console.log(
- `The supported assets are: ${assets.map((asset) => asset.originSymbol)}`,
- );
-
- const { sourceChains, source } = asset('dot');
- console.log(
- `The supported source chains are: ${sourceChains.map(
- (chain) => chain.name,
- )}`,
- );
-
- const { destinationChains, destination } = source('polkadot');
- console.log(
- `The supported destination chains are: ${destinationChains.map(
- (chain) => chain.name,
- )}`,
- );
-
- const { accounts } = destination('moonbeam');
- const data = await accounts(
- pair.address,
- evmSigner.address, // If using viem, use evmSigner.account.address
- {
- evmSigner,
- polkadotSigner: pair,
- },
- );
-};
-
-fromPolkadot();
-```
-
-!!! note
-For more information on each of the `Sdk().assets()` builder functions, including the parameters and returned data, please refer to the [XCM SDK Reference](./reference/methods.md#build-the-transfer-data-starting-with-assets){target=\_blank}.
-
-If you don't need any of the asset or chain information, you can use the `getTransferData` function:
-
-```js
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-
-const fromPolkadot = async () => {
- const data = await sdkInstance.getTransferData({
- destinationAddress: evmSigner.address, // If using viem, use evmSigner.account.address
- destinationKeyOrChain: 'moonbeam',
- keyOrAsset: 'dot',
- polkadotSigner: pair,
- sourceAddress: pair.address,
- sourceKeyOrChain: 'polkadot',
- evmSigner,
- });
-};
-
-fromPolkadot();
-```
-
-!!! note
-For more information on the `Sdk().getTransferData()` function, including the parameters and returned data, please refer to the [XCM SDK Reference](./reference/methods.md#the-get-transfer-data-method){target=\_blank}.
-
-As previously mentioned, the same output will be generated regardless of which method you use to build the transfer data.
-
-??? code "Example response"
-
- ```js
- // Send DOT from Polkadot to Moonbeam
- // data
- {
- destination: {
- balance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: l {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- existentialDeposit: e {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: m {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://rpc.polkadot.io'
- },
- destinationFeeBalance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 169328990n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
- }
- ```
-
-As you may have noticed in the example response, the transfer data contains information on the asset, source, and destination chain. In addition, a few functions have been exposed:
-
-- [`swap`](./reference/methods.md#the-swap-method) - returns the transfer data necessary to swap the asset from the destination chain back to the source chain
-- [`transfer`](./reference/methods.md#the-transfer-method) - transfers a given amount of the asset from the source chain to the destination chain
-- [`getEstimate`](./reference/methods.md#the-get-estimate-method) - returns an estimated amount of the asset that will be received on the destination chain, less any destination fees
-
-## Transfer an Asset {: #transfer-an-asset }
-
-Now that you've built the transfer data, you can transfer the asset from the source chain to the destination chain. To do so, you can use the [`transfer`](./reference/methods.md#the-transfer-method) function, but first, you'll need to specify an amount to send. You can specify the amount in integer or decimal format. For example, if you wanted to send 0.1 DOT, you could use `1000000000n` or `'0.1'`. You can use [asset conversion methods](./reference/methods.md#asset-utilities){target=\_blank}, like [`toDecimal`](./reference/methods.md#the-to-decimal-method) to convert the asset to decimal format.
-
-For this example, you can transfer twice the minimum amount required of DOT:
-
-```js
-...
-
-const amount = data.min.toDecimal() * 2;
-console.log(`Sending from ${data.source.chain.name} amount: ${amount}`);
-const hash = await data.transfer(amount);
-console.log(`${data.source.chain.name} tx hash: ${hash}`);
-```
-
-As the above snippet shows, the `transfer` function returns a transaction hash on the source chain.
-
-!!! note
-For more information on the parameters and returned data for `transfer`, please refer to the [XCM SDK Reference](./reference/methods.md#the-transfer-method){target=\_blank}.
-
-## Swap an Asset {: #swap-an-asset}
-
-To swap an asset, you can use the same transfer data and call `data.swap()` to switch the source and destination chain information. You can call the `transfer` function to execute the swap from there.
-
-```js
-...
-
-const swapData = await data.swap();
-const amount = swapData.min.toDecimal() * 2;
-console.log(`Sending from ${swapData.source.chain.name} amount: ${amount}`);
-const hash = await swapData.transfer(amount);
-console.log(`${swapData.source.chain.name} tx hash: ${hash}`);
-```
-
-The `swap` function returns the transfer data with the original source chain and destination chains swapped. Using the previous example of sending DOT from Polkadot to Moonbeam, the swap transfer data would send DOT from Moonbeam to Polkadot.
-
-??? code "Example response"
-
- ```js
- // swapData
- {
- destination: {
- balance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: m {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://rpc.polkadot.io'
- },
- existentialDeposit: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 169328990n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: l {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- destinationFeeBalance: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: e {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: e {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
- }
- ```
-
-!!! note
-For more information on the parameters and returned data for `swap`, please refer to the [XCM SDK Reference](./reference/methods.md#the-swap-method){target=\_blank}.
-
-## Get an Estimate of the Asset to Be Received on the Destination Chain {: #get-estimate }
-
-When you send an XCM message, you typically pay fees on the destination chain to execute the XCM instructions. Before you transfer the asset, you can use the [`getEstimate`](./reference/methods.md#the-get-estimate-method) function to calculate an estimated amount of the asset that will be received on the destination chain minus any fees.
-
-The `getEstimate` function is tied to a specific transfer request as it is based on the asset being transferred and the destination chain fees, so you'll need to create the [transfer data](#build-xcm-transfer-data) first.
-
-You must provide the amount to be transferred to the `getEstimate` function. In the following example, you'll get the estimated amount of DOT that will be received on Moonbeam when 0.1 DOT is transferred. You can specify the amount in integer (`1000000000n`) or decimal (`'0.1'`) format.
-
-```js
-...
-
-const amount = '0.1';
-const estimatedAmount = data.getEstimate(amount);
-
-console.log(
- `The estimated amount of ${
- data.source.balance.originSymbol
- } to be received on ${
- data.destination.chain.name
- } is: ${estimatedAmount.toDecimal()} ${data.destination.balance.symbol}`
-);
-```
-
-The `getEstimate` function returns the estimated amount along with information on the asset being transferred.
-
-??? code "Example response"
-
- ```js
- // estimatedAmount
- {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 966931217n,
- decimals: 10,
- symbol: 'DOT'
- }
- ```
-
-!!! note
-For more information on the parameters and returned data for `getEstimate`, please refer to the [XCM SDK Reference](./reference/methods.md#the-get-estimate-method){target=\_blank}.
-
-## Get Transfer Minimum and Maximum Amounts {: #transfer-min-max-amounts }
-
-You can use [transfer data](#build-xcm-transfer-data) to retrieve the minimum and maximum amount of an asset that can be transferred. To do so, you'll access the `min` and `max` properties of the asset being transferred:
-
-=== "Minimum"
-
- ```js
- ...
-
- const amount = data.min.toDecimal();
- const symbol = data.min.originSymbol;
-
- console.log(`You can send min: ${amount} ${symbol}`);
- ```
-
-=== "Maximum"
-
- ```js
- ...
-
- const amount = data.max.toDecimal();
- const symbol = data.max.originSymbol;
-
- console.log(`You can send max: ${amount} ${symbol}`);
- ```
-
-The `min` and `max` properties return the minimum and maximum amount of the asset that can be transferred, along with information on the asset. If the source account does not hold a balance of the chosen asset, the `data.max` amount will be `0n`.
-
-??? code "Example response"
-
- ```js
- // data.min
- {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- }
- // data.max
- {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- ```
-
-!!! note
-For more information on assets and asset amounts, please refer to the [XCM SDK Reference](./reference/interfaces.md#assets){target=\_blank}.
-
-## Get Transfer Fees {: #get-transfer-fees }
-
-The [transfer data](#build-xcm-transfer-data) provides information on transfer fees for the source and destination chains. You can retrieve the fees using the following snippet:
-
-```js
-...
-const sourceChain = data.source.chain.name;
-const sourceFee = data.source.fee;
-
-const destinationChain = data.destination.chain.name;
-const destinationFee = data.destination.fee;
-
-console.log(
- `You will pay ${sourceFee.toDecimal()} ${
- sourceFee.symbol
- } fee on ${
- sourceChain
- } and ${destinationFee.toDecimal()} ${
- destinationFee.symbol
- } fee on ${destinationChain}.`
-);
-```
-
-The `fee` property returns the fees to be paid along with information on the asset.
-
-??? code "Example response"
-
- ```js
- // sourceFee
- {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 169328990n,
- decimals: 10,
- symbol: 'DOT'
- }
- // destinationFee
- {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- }
- ```
-
-!!! note
-For more information on assets and asset amounts, including fees, please refer to the [XCM SDK Reference](./reference/interfaces.md#assets){target=\_blank}.
-
---8<-- 'text/third-party-content.md'
diff --git a/mkdocs/docs/example-usage/.pages b/mkdocs/docs/example-usage/.pages
new file mode 100644
index 00000000..0f319088
--- /dev/null
+++ b/mkdocs/docs/example-usage/.pages
@@ -0,0 +1,3 @@
+nav:
+ - 'XCM': 'xcm.md'
+ - 'MRL': 'mrl.md'
diff --git a/mkdocs/docs/example-usage/mrl.md b/mkdocs/docs/example-usage/mrl.md
new file mode 100644
index 00000000..9fd5939e
--- /dev/null
+++ b/mkdocs/docs/example-usage/mrl.md
@@ -0,0 +1,912 @@
+---
+title: Using the MRL SDK
+description: Use the Moonbeam XCM SDK to easily transfer liquidity into and across the Polkadot ecosystem from other ecosystems like Ethereum
+template: tutorial.html
+---
+# Using the Moonbeam MRL SDK
+
+## Introduction {: #introduction }
+
+Moonbeam Routed Liquidity (MRL) allows liquidity from any blockchain connected to Moonbeam to be seamlessly routed to Polkadot parachains. The MRL SDK simplifies the process of routing liquidity from various blockchains into the Polkadot ecosystem by providing a set of tools and functions that abstract away the complexities of cross-chain communication, by leveraging GMP, XCM, and XC-20s.
+
+The SDK allows the three [types of transfers](../reference/mrl.md#transfer-types). Here is a brief description of what happens in each:
+
+1. **From EVM chains to parachains**: Assets are sent from the EVM chain to Moonbeam via a GMP provider bridge (like Wormhole). A contract call is executed in Moonbeam which initiates the XCM transfer to the destination parachain.
+2. **From parachains to EVM chains**: Assets are sent alongside a remote execution message from the parachain to Moonbeam via XCM. The message then is executed in Moonbeam, which bridges the assets to the destination EVM chain via a GMP provider bridge.
+3. **Bewtween Moonbeam and EVM chains**: Assets move between Moonbeam and EVM chains via the GMP provider bridge.
+
+In MRL transfers, the transaction must be completed in the destination chain of the bridge. This can be done automatically by a relayer or manually by the user, and the SDK supports both options.
+
+Regardless of the type of transfer you're making, the usage of the MRL SDK is the same, with only a few considerations to be made when executing or completing the transfer.
+
+## Install the MRL SDK {: #install-the-mrl-sdk }
+
+To get started with the Moonbeam MRL SDK, you'll need first to install the SDK:
+
+```bash
+npm install @moonbeam-network/mrl
+```
+
+You'll also need to install a few additional dependencies that you'll use to interact with the SDK in this guide. You'll need the Polkadot.js API to create a Polkadot signer:
+
+```bash
+npm install @polkadot/api @polkadot/util-crypto
+```
+
+You'll also need an Ethereum signer if you're interacting with an Ethereum-compatible chain like Moonbeam. For that you'll need to install [viem](https://viem.sh/docs/installation){target=\_blank}:
+
+
+```bash
+npm install viem@2
+```
+
+## Create Signers {: #create-signers }
+
+Similar to the XCM SDK, you'll need to create signers to interact with the SDK. You can refer to the [Create Signers](./xcm.md#create-signers) section in the XCM SDK guide for more information.
+
+## Get Chain Data {: #get-chain-data }
+
+You can use any of the following code examples to retrieve information on the supported assets and the chains that support these assets.
+
+### Get List of Supported Source chains {: #get-list-of-supported-source-chains }
+
+To get a list of all of the sources supported by the MRL SDK, you can instantiate the MRL SDK and get the sources property.
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+
+const mrlInstance = Mrl();
+const sources = mrlInstance.sources;
+
+console.log('The supported sources are as follows:');
+sources.forEach((source) => {
+ console.log(`- ${source.name}`);
+});
+```
+
+### Get List of Supported Sources by Ecosystem {: #get-supported-sources-by-ecosystem }
+To get a list of the supported sources for a particular ecosystem, you can pass in the ecosystem `polkadot`, `kusama`, or `alphanet-relay`. Under the hood, the ecosystems for MRL are `Mainnet` or `Testnet`, you can extract the ecosystem from the chain configuration you're going to use. For example, the following snippet will get all of the sources supported in the ecosystem associated with Moonbeam:
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+import { moonbeam } from '@moonbeam-network/xcm-config';
+
+const mrlInstance = Mrl({ ecosystem: moonbeam.ecosystem });
+const sources = mrlInstance.sources;
+
+console.log('The supported sources are as follows:');
+sources.forEach((source) => {
+ console.log(`- ${source.name}`);
+});
+```
+
+### Get List of Supported Routes by Ecosystem {: #get-list-of-supported-routes-by-ecosystem }
+
+To get a list of the supported routes for a particular ecosystem, you can use the following code snippet:
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const mrlInstance = Mrl({ ecosystem: Ecosystem.Polkadot });
+const sources = mrlInstance.sources;
+
+sources.forEach((source) => {
+ const { destinations, setDestination } = mrlInstance.setSource(source);
+ if (destinations.length > 0) {
+ destinations.forEach((destination) => {
+ console.log(`You can transfer from ${source.name} to ${destination.name}:`);
+ const { assets } = setDestination(destination);
+ if (assets.length > 0) {
+ assets.forEach((asset) => {
+ console.log(`- ${asset.originSymbol}`);
+ });
+ }
+ });
+ }
+});
+```
+
+## Build MRL Transfer Data {: #build-mrl-transfer-data }
+
+Much like in XCM, to transfer an asset from one chain to another, you'll need to first build the transfer data, which defines the asset to be transferred, the source chain and address, the destination chain and address, and the associated signer for the transaction. Building the transfer data is the first step; in the next section, you'll learn how to use it to actually transfer the asset.
+
+In MRL transfers, the assets must be redeemed, or the transfer must be executed in the destination chain of the bridge. This can be done automatically by a relayer or manually by the user. For manual executions, the SDK also provides a `executeTransfer` function that can be used after the transaction is completed. It will be explained in a following section.
+
+
+In this guide, we'll show you first how to build the transfer data if you already know the route you want to use and don't need chain or asset information. Then, we'll show you how to build the transfer data if you need to retrieve the list of supported assets and chains for a given asset, which is useful if you're building a UI to allow users to select the asset, source, and destination chains.
+
+
+### Simple Example {: #build-mrl-transfer-data-simple }
+In this example, if you want to transfer USDC from Ethereum to Hydration, you'll need to set the source, and destination chains, and the asset to get the transfer data. First you'll need to instantiate the SDK, by calling the [`Mrl`](../reference/mrl.md#the-mrl-method) function and then calling the `setAsset`, `setSource`, and `setDestination` functions.
+You can optionally pass in the ecosystem to the `Mrl` function, but in this example, you know the route you want to use, so there is no need to pass in the ecosystem.
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+import { ethereum, hydration, usdc } from '@moonbeam-network/xcm-config';
+
+const fromEvm = async () => {
+ const transferData = await Mrl()
+ .setSource(ethereum)
+ .setDestination(hydration)
+ .setAsset(usdc)
+ .setIsAutomatic(false)
+ .setAddresses({
+ sourceAddress: account.address,
+ destinationAddress: account.address,
+ });
+};
+
+fromEvm();
+```
+
+### Example with assets and chains information {: #build-mrl-transfer-data-information }
+
+To get started, you'll use the [`Mrl`](../reference/mrl.md#the-mrl-method) function, which eventually will return the transfer data after calling a series of chained methods. In this case you'll want to include the ecosystem, as you'll need to retrieve the list of supported assets and chains for the asset you want to transfer.
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const mrlInstance = Mrl({ ecosystem: Ecosystem.Polkadot });
+```
+
+The chained methods will provide data on the assets and chains along the way, but the final method will return the transfer data. The process of calling the methods is as follows:
+
+1. Get the list of supported sources for the specified ecosystem
+
+ ```js
+ const { sources, setSource } = mrlInstance;
+ ```
+
+2. Call the `setSource` function and pass in the source chain object or chain key to define the source chain for the transfer
+
+ ```js
+ import { ethereum } from '@moonbeam-network/xcm-config';
+
+ // Using the object
+ const { destinations, setDestination } = mrlInstance.setSource(ethereum);
+
+ // Using the key
+ const { destinations, setDestination } = mrlInstance.setSource('ethereum');
+ ```
+
+3. Call the `setDestination` function and pass in the destination chain object or chain key to define the destination chain for the transfer
+
+ ```js
+ import { hydration } from '@moonbeam-network/xcm-config';
+
+ const { assets, setAsset } = mrlInstance.setDestination(hydration);
+ ```
+
+4. Call the `setAsset` function and pass in the asset object or asset key to define the asset to be transferred
+
+ ```js
+ import { usdc } from '@moonbeam-network/xcm-config';
+
+ const { setIsAutomatic } = setAsset(usdc);
+ ```
+
+5. Call the `setIsAutomatic` function and pass in the boolean value to define if the transfer should be automatic or not.
+
+ ```js
+ const { setAddresses } = setIsAutomatic(false);
+ ```
+ There are routes in which the automatic transfer is not supported. You can check it in the [chains routes file](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/mrl-configs/moonbeam.ts). If you set automatic as `true` for a route that is not supported, the SDK will throw an error at the moment of fetching the transfer data.
+
+6. Finally call the `setAddresses` function and pass in the source and destination addresses to define the addresses for the ransfer. This will return the transfer data including the balances of the source and destination addresses. Take into account that depending on the source or the destination chain, the address format will be different. For example, from Ethereum to Hydration, you can pass as the source the address from the EVM signer, but as the destination the address from the Polkadot signer.
+
+An example of the steps described above to build the transfer data to transfer USDC from Ethereym to Hydration is as follows:
+
+```js
+import { Mrl } from '@moonbeam-network/mrl';
+import { hydration, usdc } from '@moonbeam-network/xcm-config';
+import { ethereum } from '@moonbeam-network/xcm-config';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const fromEvm = async () => {
+ const mrlInstance = Mrl({ ecosystem: Ecosystem.Polkadot });
+ const { sources, setSource } = mrlInstance;
+
+ console.log(
+ `The supported sources are: ${sources.map((asset) => asset.name)}`,
+ );
+
+ const { destinations, setDestination } = setSource(ethereum);
+ console.log(
+ `The supported destinations are: ${destinations.map((asset) => asset.name)}`,
+ );
+
+ const { assets, setAsset } = setDestination(hydration);
+ console.log(
+ `The supported assets are: ${assets.map((asset) => asset.originSymbol)}`,
+ );
+
+ const { setIsAutomatic } = setAsset(usdc);
+
+ const { setAddresses } = setIsAutomatic(false);
+
+ const transferData = await setAddresses({
+ sourceAddress: account.address,
+ destinationAddress: pair.address,
+ });
+
+ console.log(transferData);
+
+};
+
+fromEvm();
+
+```
+
+The same output will be generated regardless of which example you used to build the transfer data.
+
+??? code "Example response"
+
+ ```js
+ // Send USDC from Ethereum to Hydration
+ // transfer data
+ {
+ destination: {
+ chain: _Parachain {
+ assets: Map(7) {
+ "hdx": [Object ...],
+ "glmr": [Object ...],
+ "dai": [Object ...],
+ "usdcwh": [Object ...],
+ "usdtwh": [Object ...],
+ "wbtc": [Object ...],
+ "weth": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://hydradx.subscan.io",
+ isTestChain: false,
+ key: "hydration",
+ name: "Hydration",
+ wh: undefined,
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d",
+ isRelay: false,
+ parachainId: 2034,
+ ss58Format: 63,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://rpc.hydradx.cloud", "wss://rpc.helikon.io/hydradx", "wss://hydradx.paras.dotters.network",
+ "wss://hydradx-rpc.dwellir.com"
+ ],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ balance: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 8271697n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "hdx",
+ originSymbol: "HDX",
+ address: undefined,
+ decimals: 12,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 1000000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ sovereignAccountBalances: undefined,
+ },
+ getEstimate: [Function: getEstimate],
+ isAutomaticPossible: false,
+ max: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ moonChain: {
+ address: "0x98891e5FD24Ef33A488A47101F65D212Ff6E650E",
+ balance: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: "0x931715FEE2d06333043d11F658C8CE934aC61D0c",
+ decimals: 6,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 2081768n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object ...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 206735189943789999813n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _EvmParachain {
+ assets: Map(45) {
+ "aca": [Object ...],
+ "astr": [Object ...],
+ "aseed": [Object ...],
+ "axlusdc": [Object ...],
+ "bnc": [Object ...],
+ "bncs": [Object ...],
+ "cfg": [Object ...],
+ "dai": [Object ...],
+ "ded": [Object ...],
+ "dot": [Object ...],
+ "eq": [Object ...],
+ "eqd": [Object ...],
+ "fil": [Object ...],
+ "glmr": [Object ...],
+ "hdx": [Object ...],
+ "ibtc": [Object ...],
+ "intr": [Object ...],
+ "ldot": [Object ...],
+ "manta": [Object ...],
+ "nodl": [Object ...],
+ "neuro": [Object ...],
+ "peaq": [Object ...],
+ "pha": [Object ...],
+ "pen": [Object ...],
+ "ring": [Object ...],
+ "sub": [Object ...],
+ "usdc": [Object ...],
+ "usdcwh": [Object ...],
+ "usdtwh": [Object ...],
+ "usdt": [Object ...],
+ "vastr": [Object ...],
+ "vdot": [Object ...],
+ "vfil": [Object ...],
+ "vglmr": [Object ...],
+ "vmanta": [Object ...],
+ "wbtc": [Object ...],
+ "weth": [Object ...],
+ "ztg": [Object ...],
+ "pink": [Object ...],
+ "stink": [Object ...],
+ "apillon": [Object ...],
+ "wifd": [Object ...],
+ "wbtce": [Object ...],
+ "wethe": [Object ...],
+ "wstethe": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://moonbeam.moonscan.io",
+ isTestChain: false,
+ key: "moonbeam",
+ name: "Moonbeam",
+ wh: [Object ...],
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d",
+ isRelay: false,
+ parachainId: 2004,
+ ss58Format: 1284,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://wss.api.moonbeam.network" ],
+ id: 1284,
+ rpc: "https://rpc.api.moonbeam.network",
+ isEvmSigner: true,
+ contracts: undefined,
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ fee: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object ...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 150000000000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ source: {
+ balance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _EvmChain {
+ assets: Map(7) {
+ "eth": [Object ...],
+ "usdc": [Object ...],
+ "usdt": [Object ...],
+ "dai": [Object ...],
+ "wbtc": [Object ...],
+ "glmr": [Object ...],
+ "peaq": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://etherscan.io",
+ isTestChain: false,
+ key: "ethereum",
+ name: "Ethereum",
+ wh: [Object ...],
+ id: 1,
+ rpc: "https://ethereum-rpc.publicnode.com",
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ destinationFee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ destinationFeeBalance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ moonChainFeeBalance: undefined,
+ existentialDeposit: undefined,
+ fee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ max: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ relayerFee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ transfer: [AsyncFunction: transfer],
+ }
+
+ ```
+As you may have noticed in the example response, the transfer data contains information on the asset, source, and destination chain, and also the [moonChain](../reference/mrl.md#the-moon-chain). In addition, a couple of functions have been exposed:
+
+- [`transfer`](../reference/mrl.md#the-transfer-method) - transfers a given amount of the asset from the source chain to the destination chain
+- [`getEstimate`](../reference/mrl.md#the-transfer-data-object) - returns an estimated amount of the asset that will be received on the destination chain, less any destination fees
+
+## Transfer an Asset {: #transfer-an-asset }
+
+Now that you've built the transfer data, you can transfer the asset from the source chain to the destination chain. To do so, you can use the [`transfer`](../reference/mrl.md#the-transfer-method) function, but first, you'll need to specify an amount to send. You can specify the amount in integer or decimal format. For example, if you wanted to send 0.1 USDC, you could use `100000n` or `'0.1'`. You can use [asset conversion methods](../reference/xcm.md#asset-utility-methods){target=\_blank}, like `toDecimal` to convert the asset to decimal format.
+You'll also need to specify if the transfer is automatic or not and the signer you're using for the transfer.
+
+
+For this example, you can transfer twice the minimum amount required of USDC:
+
+```js
+...
+
+const amount = +transferData.min.toDecimal() * 1.5 + 0.000001;
+console.log(
+ `\nSending ${amount} ${transferData.source.balance.getSymbol()} from ${transferData.source.chain.name} to ${transferData.destination.chain.name}`,
+);
+const result = await transferData.transfer(amount, false, {
+ evmSigner: walletClient,
+});
+```
+
+The `transfer` function returns an array of strings that represent the transaction hashes. It is an array because for some assets coming from EVM chains, two transactions are sent in the process: one Approve and the actual Transfer. Where applicable, the first transaction is the Approve and the second is the Transfer. Where an Approve is not needed, only one transaction is returned.
+
+!!! note
+The transfer function also admits other optional parameters, which are not needed for this example. For more information on the parameters and returned data for `transfer`, please refer to the [MRL SDK Reference](../reference/mrl.md#the-transfer-method){target=\_blank}.
+
+## Execute the Transfer {: #execute-the-transfer }
+
+As mentioned before, if the isAutomatic flag is set to false, a manual execution is required to complete the transfer in the destination chain of the bridge (redeem chain). Take into account that, if the transfer is from EVM chains to a Parachain, the redeem chain is the [MoonChain](../reference/mrl.md#the-moon-chain), which is where the GMP contract call is made to initiate the XCM transfer to the destination parachain. For other types of transfers, the redeem chain is the destination chain.
+
+This SDK also provides a function for executing the transfer, but the same way as with the transfer, you first have to build the execute transfer data.
+
+### Build the Execute Transfer Data {: #build-the-execute-transfer-data }
+
+Following the example above, you can build the execute transfer data by calling the [`getExecuteTransferData`](../reference/mrl.md#the-get-execute-transfer-data-method) function, with the transfer hash that was returned from the transfer function.
+
+Remember that for this example (Ethereum to Hydration), the redeem chain is going to be Moonbeam, which can be extracted from the transfer data as moonChain.
+
+```js
+...
+
+const hash = result.pop();
+
+if (!isAutomatic && hash) {
+ const executeTransferData = await Mrl().getExecuteTransferData({
+ txId: hash,
+ chain: transferData.moonChain.chain,
+ });
+}
+```
+
+### Execute the Transfer {: #execute-the-transfer }
+
+Once you have the execute transfer data, you can execute the transfer by calling the [`executeTransfer`](../reference/mrl.md#the-execute-transfer-method) function.
+You'll need to specify the signer you're using for the redeem chain. Note that the signer is different from the signer used for the transfer, as the chains are different.
+
+```js
+...
+
+const moonChainWalletClient = createWalletClient({
+ account,
+ chain: transferData.moonChain.chain.getViemChain(),
+ transport: http(),
+});
+
+
+const executeTransferResult = await executeTransferData.executeTransfer(moonChainWalletClient);
+```
+
+## Get an Estimate of the Asset to Be Received on the Destination Chain {: #get-estimate }
+
+When you send an MRL message, you typically pay fees on the destination chain to execute the XCM instructions, if any, or to pay the relayer if the transfer is set as automatic. Before you transfer the asset, you can use the [`getEstimate`](../reference/mrl.md#the-transfer-data-object) function to calculate an estimated amount of the asset that will be received on the destination chain minus any fees.
+
+The `getEstimate` function is tied to a specific transfer request as it is based on the asset being transferred and the destination chain fees, so you'll need to create the [transfer data](#build-mrl-transfer-data) first.
+
+You must provide the amount to be transferred to the `getEstimate` function. In the following example, you'll get the estimated amount of DOT that will be received on Moonbeam when 0.1 DOT is transferred. You can specify the amount in integer (`1000000000n`) or decimal (`'0.1'`) format.
+
+```js
+...
+
+const amount = '0.1';
+const estimatedAmount = transferData.getEstimate(amount);
+
+console.log(
+ `The estimated amount of ${
+ transferData.source.balance.originSymbol
+ } to be received on ${
+ transferData.destination.chain.name
+ } is: ${estimatedAmount.toDecimal()} ${transferData.destination.balance.getSymbol()}`,
+);
+```
+
+## Get information about the MoonChain {: #get-moonchain-info }
+
+The [MoonChain](../reference/mrl.md#the-moon-chain) (Moonbeam for Mainnet and Moonbase Alpha for Testnet) is the chain which serves as intermediary between the Polkadot Ecosystem and external chains.
+
+Depending on the type of transfer you're making, you may need to have balance in the MoonChain to pay for the fees. You can see the information about the balance by looking at the `moonChain` property in the transfer data.
+
+```js
+...
+
+console.log(
+ `This transfer will need to pay ${transferData.moonChain.fee.amount} ${transferData.moonChain.fee.getSymbol()} in ${transferData.moonChain.chain.name}`,
+);
+console.log(
+ `The current balance in ${transferData.moonChain.chain.name} for the address ${transferData.moonChain.address} is ${transferData.moonChain.feeBalance.toDecimal()} ${transferData.moonChain.feeBalance.getSymbol()}`,
+);
+```
\ No newline at end of file
diff --git a/mkdocs/docs/example-usage/xcm.md b/mkdocs/docs/example-usage/xcm.md
new file mode 100644
index 00000000..0dbb277f
--- /dev/null
+++ b/mkdocs/docs/example-usage/xcm.md
@@ -0,0 +1,1019 @@
+---
+title: Using the XCM SDK v3
+description: Use the Moonbeam XCM SDK to easily transfer cross-chain assets between parachains or between a parachain and relay chain within the Polkadot/Kusama ecosystems.
+template: tutorial.html
+---
+
+# Using the Moonbeam XCM SDK
+
+## Introduction {: #introduction }
+
+The Moonbeam XCM SDK enables developers to easily transfer assets between chains, either between parachains or between a parachain and the relay chain, within the Polkadot/Kusama ecosystem. With the SDK, you don't need to worry about determining the multilocation of the origin or destination assets or which extrinsics are used on which networks to send XCM transfers.
+
+The XCM SDK offers helper functions that provide a very simple interface for executing XCM transfers between chains in the Polkadot/Kusama ecosystem. In addition, the XCM config package allows any parachain project to [add their information](../contribute/xcm.md){target=\_blank} in a standard way, so the XCM SDK can immediately support them.
+
+For an overview of the available methods and interfaces in the Moonbeam XCM SDK, please refer to the [Reference](../reference/xcm.md){target=\_blank} page.
+
+This guide shows how to transfer DOT from Polkadot to Moonbeam.
+
+## Install the XCM SDK {: #install-the-xcm-sdk }
+
+To get started with the Moonbeam XCM SDK, you'll need first to install the SDK:
+
+```bash
+npm install @moonbeam-network/xcm-sdk
+```
+
+You'll also need to install a few additional dependencies that you'll use to interact with the SDK in this guide. You'll need the Polkadot.js API to create a Polkadot signer:
+
+```bash
+npm install @polkadot/api @polkadot/util-crypto
+```
+
+You'll also need an Ethereum signer if you're interacting with an Ethereum-compatible chain like Moonbeam. For that you'll need to install [viem](https://viem.sh/docs/installation){target=\_blank}:
+
+
+```bash
+npm install viem@2
+```
+
+## Create Signers {: #create-signers }
+
+When transferring assets between chains, you'll need signers in place to sign the transactions. If you're interacting with an Ethereum-compatible chain that uses standard Ethereum-style H160 addresses, such as Moonbeam, you'll need to have an Ethereum signer, like a [viem Wallet Client](https://viem.sh/docs/clients/wallet.html){target=\_blank}. To interact with the relay chain or other parachains, you'll need a [Polkadot](https://polkadot.js.org/docs/api/){target=\_blank} signer.
+
+You can pass, for example, a [browser extension wallet as a signer into viem](https://viem.sh/docs/clients/wallet.html#json-rpc-accounts){target=\_blank}, such as MetaMask. Similarly, with Polkadot, you can [pass a compatible wallet to the signer using the `@polkadot/extension-dapp` library](https://polkadot.js.org/docs/extension/){target=\_blank}.
+
+To create an EVM signer and a Polkadot signer, you can refer to the following sections.
+
+!!! warning
+**Never store your private key or mnemonic in a JavaScript or TypeScript file.**
+
+### Create an EVM Signer {: #create-a-evm-signer }
+
+You can create a viem Wallet Client to pass as an EVM signer. Here are some examples of configurations:
+
+=== "Moonbeam"
+
+ ```js
+ import { moonbeam } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, http, type Address } from 'viem';
+ import { privateKeyToAccount } from 'viem/accounts'
+
+ const privateKey = 'INSERT_PRIVATE_KEY';
+ const account = privateKeyToAccount(privateKey as Address);
+
+ const evmSigner = createWalletClient({
+ account,
+ chain: moonbeam.getViemChain(),
+ transport: http(),
+ });
+ ```
+
+=== "Moonriver"
+
+ ```js
+ import { moonriver } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, http, type Address } from 'viem';
+ import { privateKeyToAccount } from 'viem/accounts'
+
+ const privateKey = 'INSERT_PRIVATE_KEY';
+ const account = privateKeyToAccount(privateKey as Address);
+
+ const evmSigner = createWalletClient({
+ account,
+ chain: moonriver.getViemChain(),
+ transport: http(),
+ });
+ ```
+
+=== "Moonbase Alpha"
+
+ ```js
+ import { moonbaseAlpha } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, http, type Address } from 'viem';
+ import { privateKeyToAccount } from 'viem/accounts'
+
+ const privateKey = 'INSERT_PRIVATE_KEY';
+ const account = privateKeyToAccount(privateKey as Address);
+
+ const evmSigner = createWalletClient({
+ account,
+ chain: moonbaseAlpha.getViemChain(),
+ transport: http(),
+ });
+ ```
+
+If you want to pass in a browser extension wallet to viem, you can use the following code:
+
+=== "Moonbeam"
+
+ ```js
+ import { moonbeam } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, custom } from 'viem';
+
+ const evmSigner = createWalletClient({
+ chain: moonbeam.getViemChain(),
+ transport: custom(window.ethereum),
+ });
+ ```
+
+=== "Moonriver"
+
+ ```js
+ import { moonriver } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, custom } from 'viem';
+
+ const evmSigner = createWalletClient({
+ chain: moonriver.getViemChain(),
+ transport: custom(window.ethereum),
+ });
+ ```
+
+=== "Moonbase Alpha"
+
+ ```js
+ import { moonbaseAlpha } from '@moonbeam-network/xcm-config';
+ import { createWalletClient, custom } from 'viem';
+
+ const evmSigner = createWalletClient({
+ chain: moonbaseAlpha.getViemChain(),
+ transport: custom(window.ethereum),
+ });
+ ```
+
+!!! note
+--8<-- 'text/endpoint-setup.md'
+
+### Create a Polkadot Signer {: #create-a-polkadot-signer }
+
+In this example, you can use a [Polkadot.js Keyring](https://polkadot.js.org/docs/api/start/keyring/){target=\_blank} to sign transactions. Please note that this approach is not recommended for production applications.
+
+```js
+import { polkadot } from '@moonbeam-network/xcm-config';
+import { Keyring } from '@polkadot/api';
+import { cryptoWaitReady } from '@polkadot/util-crypto';
+
+const privateKey = 'INSERT_PRIVATE_KEY';
+
+const createPolkadotSigner = async () => {
+ await cryptoWaitReady();
+ const keyring = new Keyring({
+ ss58Format: polkadot.ss58Format,
+ type: 'sr25519',
+ });
+ const pair = keyring.createFromUri(privateKey);
+};
+
+createPolkadotSigner();
+```
+
+!!! note
+In the above `INSERT_PRIVATE_KEY` field, you can specify a seed phrase instead of a private key.
+
+## Get Asset and Chain Data {: #asset-chain-data }
+
+You can use any of the following code examples to retrieve information on the supported assets and the chains that support these assets.
+
+### Get List of Supported Assets {: #get-list-of-supported-assets }
+
+To get a list of all of the assets supported by the XCM SDK, you can instantiate the XCM SDK and get the assets property.
+
+```js
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+
+const sdkInstance = Sdk();
+const assets = sdkInstance.assets;
+
+console.log('The supported assets are as follows:');
+assets.forEach((asset) => {
+ console.log(`- ${asset.originSymbol}`);
+});
+```
+
+### Get List of Supported Assets by Ecosystem {: #get-supported-assets-by-ecosystem }
+
+To get a list of the supported assets for a particular ecosystem, you can pass in the ecosystem: `polkadot`, `kusama`, or `alphanet-relay`. For example, the following snippet will get all of the Polkadot assets supported:
+
+```js
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const sdkInstance = Sdk({ ecosystem: Ecosystem.Polkadot });
+const assets = sdkInstance.assets;
+
+console.log(
+ 'The supported assets within the Polkadot ecosystem are as follows:',
+);
+assets.forEach((asset) => {
+ console.log(`- ${asset.originSymbol}`);
+});
+
+```
+
+### Get List of Supported Routes by Asset {: #get-list-of-supported-routes-by-asset }
+To get a list of the supported [source and destination](../reference/xcm.md#transfer-data) chains for a given asset, you can use the following code snippet, which logs the supported routes by asset for all of the supported assets in the Polkadot ecosystem:
+
+```js
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const sdkInstance = Sdk({ ecosystem: Ecosystem.Polkadot });
+const assets = sdkInstance.assets;
+
+assets.forEach((asset) => {
+ const { sources, setSource } = sdkInstance.setAsset(asset);
+
+ console.log(`You can send ${asset.originSymbol}...`);
+
+ if (sources.length > 1) {
+ sources.forEach((source) => {
+ const { destinations } = setSource(source);
+
+ if (destinations.length > 0) {
+ destinations.forEach((destination) => {
+ console.log(`- From ${source.name} to ${destination.name}`);
+ });
+ }
+ });
+ }
+});
+```
+
+## Build XCM Transfer Data {: #build-xcm-transfer-data }
+
+To transfer an asset from one chain to another, you'll need to first build the transfer data, which defines the asset to be transferred, the source chain and address, the destination chain and address, and the associated signer for the transaction. Building the transfer data is the first step; in the next section, you'll learn how to use it to actually transfer the asset.
+
+In this guide, we'll show you first how to build the transfer data if you already know the route you want to use and don't need chain or asset information. Then, we'll show you how to build the transfer data if you need to retrieve the list of supported assets and chains for a given asset, which is useful if you're building a UI to allow users to select the asset, source, and destination chains.
+
+
+### Simple Example {: #build-xcm-transfer-data-simple }
+In this example, we want to transfer DOT from Polkadot to Moonbeam. So to get the transfer data, we'll need to set the asset, source, and destination chains. First we'll need to instantiate the SDK, by calling the [`Sdk`](../reference/xcm.md#the-sdk-method) method and then calling the `setAsset`, `setSource`, and `setDestination` methods.
+You can optionally pass in the ecosystem to the `Sdk` method, but in this example, we know the route we want to use, so there is no need to pass in the ecosystem.
+
+```js
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+import { dot, polkadot, moonbeam } from '@moonbeam-network/xcm-config';
+
+const fromPolkadot = async () => {
+ const transferData = await Sdk()
+ .setAsset(dot)
+ .setSource(polkadot)
+ .setDestination(moonbeam)
+ .setAddresses({
+ sourceAddress: pair.address,
+ destinationAddress: account.address,
+ });
+ };
+
+fromPolkadot();
+```
+
+### Example with assets and chains information {: #build-xcm-transfer-data-information }
+
+To get started, you'll use the [`Sdk`](../reference/xcm.md#the-sdk-method) method, which eventually will return the transfer data after calling a series of chained methods. In this case you'll want to include the ecosystem, as you'll need to retrieve the list of supported assets and chains for the asset you want to transfer.
+
+
+```js
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+const sdkInstance = Sdk({ ecosystem: Ecosystem.Polkadot });
+```
+
+The chained methods will provide data on the assets and chains along the way, but the final method will return the transfer data. The process of calling the methods is as follows:
+
+1. Get the list of supported assets for the specified ecosystem
+
+ ```js
+ const { assets, setAsset } = sdkInstance;
+ ```
+
+2. Call the `setAsset` function and pass in the key or asset object (which includes the key and the origin symbol) to define the asset to be transferred. For example:
+
+ ```js
+ import { dot } from '@moonbeam-network/xcm-config';
+
+ // Using the object
+ const { sources, setSource } = setAsset(dot);
+
+ // Using the key
+ const { sources, setSource } = setAsset('dot');
+ ```
+
+ This will return a list of the supported source chains for this asset and the [`setSource`](../reference/xcm.md#the-sdk-method) function, which is used to define the source chain to transfer the asset from
+
+3. Call the `setSource` function and pass in the chain key or chain object (which includes the key, name, and chain type). For example:
+
+ ```js
+ import { polkadot } from '@moonbeam-network/xcm-config';
+
+ // Using the object
+ const { destinations, setDestination } = setSource(polkadot);
+ ```
+
+ This will return a list of the supported destination chains where there is an open XCM channel from the source chain for the given asset and the [`setDestination`](../reference/xcm.md#the-sdk-method) function, which is used to define the destination chain to transfer the asset to.
+
+4. Call the `setDestination` function and pass in the chain key or chain object (which includes the key, name, and chain type). For example:
+
+ ```js
+ // Using the key
+ const { setAddresses } = setDestination('moonbeam');
+ ```
+
+ This will return the [`setAddresses`](../reference/xcm.md#the-sdk-method) function, which is used to define the source and destination addresses.
+
+The asset and chain objects are managed within the `@moonbeam-network/xcm-config` package. You do not need to directly interact with this package as the SDK exposes this data, but there you can find the list of [assets](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/assets.ts){target=\_blank} and [chain data](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/chains.ts){target=\_blank}.
+
+An example of the steps described above to build the transfer data to transfer DOT from the Polkadot relay chain to Moonbeam is as follows:
+
+```js
+import { dot, moonbeam, polkadot } from '@moonbeam-network/xcm-config';
+import { Sdk } from '@moonbeam-network/xcm-sdk';
+import { Ecosystem } from '@moonbeam-network/xcm-types';
+
+
+const fromPolkadot = async () => {
+ const sdkInstance = Sdk({ ecosystem: Ecosystem.Polkadot });
+
+ const { assets, setAsset } = sdkInstance;
+
+ console.log(
+ `The supported assets are: ${assets.map((asset) => asset.originSymbol)}`,
+ );
+
+ const { sources, setSource } = setAsset(dot);
+ console.log(
+ `The supported source chains are: ${sources.map((chain) => chain.name)}`,
+ );
+
+ const { destinations, setDestination } = setSource(polkadot);
+ console.log(
+ `The supported destination chains are: ${destinations.map(
+ (chain) => chain.name,
+ )}`,
+ );
+
+ const { setAddresses } = setDestination(moonbeam);
+
+ const transferData = await setAddresses({
+ sourceAddress: pair.address,
+ destinationAddress: account.address,
+ });
+
+}
+
+fromPolkadot();
+```
+
+!!! note
+For more information on each of the `Sdk()` builder functions, including the parameters and returned data, please refer to the [XCM SDK Reference](../reference/xcm.md#the-sdk-method){target=\_blank}.
+
+The same output will be generated regardless of which example you used to build the transfer data.
+
+??? code "Example response"
+
+ ```js
+ // Send DOT from Polkadot to Moonbeam
+ // transfer data
+ {
+ destination: {
+ chain: _EvmParachain {
+ assets: Map(45) {
+ "aca": [Object ...],
+ "astr": [Object ...],
+ "aseed": [Object ...],
+ "axlusdc": [Object ...],
+ "bnc": [Object ...],
+ "bncs": [Object ...],
+ "cfg": [Object ...],
+ "dai": [Object ...],
+ "ded": [Object ...],
+ "dot": [Object ...],
+ "eq": [Object ...],
+ "eqd": [Object ...],
+ "fil": [Object ...],
+ "glmr": [Object ...],
+ "hdx": [Object ...],
+ "ibtc": [Object ...],
+ "intr": [Object ...],
+ "ldot": [Object ...],
+ "manta": [Object ...],
+ "nodl": [Object ...],
+ "neuro": [Object ...],
+ "peaq": [Object ...],
+ "pha": [Object ...],
+ "pen": [Object ...],
+ "ring": [Object ...],
+ "sub": [Object ...],
+ "usdc": [Object ...],
+ "usdcwh": [Object ...],
+ "usdtwh": [Object ...],
+ "usdt": [Object ...],
+ "vastr": [Object ...],
+ "vdot": [Object ...],
+ "vfil": [Object ...],
+ "vglmr": [Object ...],
+ "vmanta": [Object ...],
+ "wbtc": [Object ...],
+ "weth": [Object ...],
+ "ztg": [Object ...],
+ "pink": [Object ...],
+ "stink": [Object ...],
+ "apillon": [Object ...],
+ "wifd": [Object ...],
+ "wbtce": [Object ...],
+ "wethe": [Object ...],
+ "wstethe": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://moonbeam.moonscan.io",
+ isTestChain: false,
+ key: "moonbeam",
+ name: "Moonbeam",
+ wh: [Object ...],
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d",
+ isRelay: false,
+ parachainId: 2004,
+ ss58Format: 1284,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://wss.api.moonbeam.network" ],
+ id: 1284,
+ rpc: "https://rpc.api.moonbeam.network",
+ isEvmSigner: true,
+ contracts: undefined,
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ balance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 17683227925n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object ...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ sovereignAccountBalances: undefined,
+ },
+ getEstimate: [Function: getEstimate],
+ max: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 18514479903n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: {
+ id: "42259045809535163221576417993425387648",
+ },
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ source: {
+ balance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _Parachain {
+ assets: Map(1) {
+ "dot": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: undefined,
+ isTestChain: false,
+ key: "polkadot",
+ name: "Polkadot",
+ wh: undefined,
+ checkSovereignAccountBalances: true,
+ genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
+ isRelay: true,
+ parachainId: 0,
+ ss58Format: 0,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://polkadot-rpc.dwellir.com", "wss://polkadot.api.onfinality.io/public-ws",
+ "wss://rpc.polkadot.io/"
+ ],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ destinationFee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ destinationFeeBalance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 10000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 644912800n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ max: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 18514479903n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ transfer: [AsyncFunction: transfer],
+ }
+ ```
+
+As you may have noticed in the example response, the transfer data contains information on the asset, source, and destination chain. In addition, a couple of functions have been exposed:
+
+- [`transfer`](../reference/xcm.md#the-transfer-method) - transfers a given amount of the asset from the source chain to the destination chain
+- [`getEstimate`](../reference/xcm.md#the-transfer-data-object) - returns an estimated amount of the asset that will be received on the destination chain, less any destination fees
+
+## Transfer an Asset {: #transfer-an-asset }
+
+Now that you've built the transfer data, you can transfer the asset from the source chain to the destination chain. To do so, you can use the [`transfer`](../reference/xcm.md#the-transfer-method) function, but first, you'll need to specify an amount to send. You can specify the amount in integer or decimal format. For example, if you wanted to send 0.1 DOT, you could use `1000000000n` or `'0.1'`. You can use [asset conversion methods](../reference/xcm.md#asset-utility-methods){target=\_blank}, like `toDecimal` to convert the asset to decimal format.
+You'll also need to specify the signer you're using for the transfer.
+
+For this example, you can transfer twice the minimum amount required of DOT:
+
+```js
+...
+
+const amount = +transferData.min.toDecimal() * 2;
+console.log(
+ `Sending from ${transferData.source.chain.name} amount: ${amount}`,
+);
+const hash = await transferData.transfer(amount, {
+ polkadotSigner: pair,
+});
+console.log(`${transferData.source.chain.name} tx hash: ${hash}`);
+```
+
+As the above snippet shows, the `transfer` function returns a transaction hash on the source chain.
+
+!!! note
+For more information on the parameters and returned data for `transfer`, please refer to the [XCM SDK Reference](../reference/xcm.md#the-transfer-method){target=\_blank}.
+
+## Get an Estimate of the Asset to Be Received on the Destination Chain {: #get-estimate }
+
+When you send an XCM message, you typically pay fees on the destination chain to execute the XCM instructions. Before you transfer the asset, you can use the `getEstimate` function to calculate an estimated amount of the asset that will be received on the destination chain minus any fees.
+
+The `getEstimate` function is tied to a specific transfer request as it is based on the asset being transferred and the destination chain fees, so you'll need to create the [transfer data](#build-xcm-transfer-data) first.
+
+You must provide the amount to be transferred to the `getEstimate` function. In the following example, you'll get the estimated amount of DOT that will be received on Moonbeam when 0.1 DOT is transferred. You can specify the amount in integer (`1000000000n`) or decimal (`'0.1'`) format.
+
+```js
+...
+
+const amount = '0.1';
+const estimatedAmount = transferData.getEstimate(amount);
+
+console.log(
+ `The estimated amount of ${
+ transferData.source.balance.getSymbol()
+ } to be received on ${
+ transferData.destination.chain.name
+ } is: ${estimatedAmount.toDecimal()} ${transferData.destination.balance.getSymbol()}`,
+);
+```
+
+The `getEstimate` function returns the estimated amount along with information on the asset being transferred.
+
+??? code "Example response"
+
+ ```js
+ // estimatedAmount
+ _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 915994840n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ }
+ ```
+
+## Get Transfer Minimum and Maximum Amounts {: #transfer-min-max-amounts }
+
+You can use [transfer data](#build-xcm-transfer-data) to retrieve the minimum and maximum amount of an asset that can be transferred. To do so, you'll access the `min` and `max` properties of the asset being transferred:
+
+=== "Minimum"
+
+ ```js
+ ...
+
+ const amount = transferData.min.toDecimal();
+ const symbol = transferData.min.getSymbol();
+
+ console.log(`You can send min: ${amount} ${symbol}`);
+ ```
+
+=== "Maximum"
+
+ ```js
+ ...
+
+ const amount = transferData.max.toDecimal();
+ const symbol = transferData.max.getSymbol();
+
+ console.log(`You can send max: ${amount} ${symbol}`);
+ ```
+
+The `min` and `max` properties return the minimum and maximum amount of the asset that can be transferred, along with information on the asset. If the source account does not hold a balance of the chosen asset, the `data.max` amount will be `0n`.
+
+??? code "Example response"
+
+ ```js
+ // min
+ _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: {
+ id: "42259045809535163221576417993425387648",
+ },
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ // max
+ _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 18514479903n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ }
+ ```
+
+!!! note
+For more information on assets and asset amounts, please refer to the [XCM SDK Reference](./reference/interfaces.md#assets){target=\_blank}.
+
+## Get Transfer Fees {: #get-transfer-fees }
+
+The [transfer data](#build-xcm-transfer-data) provides information on transfer fees for the source and destination chains. You can retrieve the fees using the following snippet:
+
+```js
+...
+const sourceChain = transferData.source.chain.name;
+const sourceFee = transferData.source.fee;
+
+const destinationChain = transferData.destination.chain.name;
+const destinationFee = transferData.destination.fee;
+
+console.log(
+ `You will pay ${sourceFee.toDecimal()} ${sourceFee.getSymbol()} fee on ${
+ sourceChain
+ } and ${destinationFee.toDecimal()} ${destinationFee.getSymbol()} fee on ${destinationChain}.`,
+);
+```
+
+The `fee` property returns the fees to be paid along with information on the asset.
+
+
+--8<-- 'text/third-party-content.md'
diff --git a/mkdocs/docs/reference/.pages b/mkdocs/docs/reference/.pages
index 2d90e78b..854f35be 100644
--- a/mkdocs/docs/reference/.pages
+++ b/mkdocs/docs/reference/.pages
@@ -1,3 +1,3 @@
nav:
- - 'Types and Interfaces': 'interfaces.md'
- - 'Methods': 'methods.md'
+ - 'XCM Reference': 'xcm.md'
+ - 'MRL Reference': 'mrl.md'
diff --git a/mkdocs/docs/reference/interfaces.md b/mkdocs/docs/reference/interfaces.md
deleted file mode 100644
index 06ce3b85..00000000
--- a/mkdocs/docs/reference/interfaces.md
+++ /dev/null
@@ -1,845 +0,0 @@
----
-title: XCM SDK Reference - Interfaces - v2
-description: A reference for the types and interfaces in the Moonbeam XCM SDK that can be used to send XCM transfers between chains within the Polkadot/Kusama ecosystems.
----
-
-# Moonbeam XCM SDK Reference: Types and Interfaces
-
-The XCM SDK is based on defining an asset to transfer, then the source chain to send the asset from, and the destination chain to send the asset to, which, together, build the transfer data.
-
-The following sections cover the types and interfaces you'll encounter when working with assets, chains, and transfer data.
-
-## Assets
-
-### The Asset Object
-
-
-
-Defines an asset's key and symbol used on the asset's origin chain.
-
-**Attributes**
-
-- `key` ++"string"++ - Identifies an asset
-- `originSymbol` ++"string"++ - The symbol of the asset on the asset's origin chain
-
-
-
-```js title="Example"
-// The Asset object
-// For GLMR on Moonbeam
-{
- key: 'glmr',
- originSymbol: 'GLMR'
-}
-```
-
-
-
----
-
-### The Asset Amount Object
-
-
-
-Defines properties related to an asset, including `Asset` properties, the decimals and symbol of the asset, and the amount an associated source or destination address has of the asset.
-
-!!! note
-A few utility methods are available for working with the `AssetAmount` class that converts the amount to various formats. Please refer to the [Methods for Asset Conversions](./methods.md#asset-utilities) section.
-
-**Attributes**
-
-- `key` ++"string"++ - Identifies an asset
-- `originSymbol` ++"string"++ - The symbol of the asset on the asset's origin chain
-- `amount` ++"bigint"++ - Identifies a particular amount of the asset (i.e., balance, minimum, maximum, etc.)
-- `decimals` ++"number"++ - The number of decimals the asset has
-- `symbol` ++"string"++ - The symbol of the asset
-
-
-
-```js title="Example"
-// The Asset Amount object
-// For GLMR on Moonbeam
-{
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
-}
-```
-
-
-
----
-
-## Chains
-
-### The Ecosystem Type
-
-
-
-Specifies the relay chain ecosystem a chain belongs to. Can be any of the following ecosystems as defined by the `Ecosystem` enum:
-
-```ts
-enum Ecosystem {
- Polkadot = 'polkadot',
- Kusama = 'kusama',
- AlphanetRelay = 'alphanet-relay',
-}
-```
-
-
-
-```js title="Example"
-// The Ecosystem Type
-{
- ecosystem: 'polkadot',
-}
-```
-
-
-
----
-
-### The Chain Type
-
-
-
-Specifies what kind of parachain a chain is.
-
-```ts
-enum ChainType {
- 'Parachain' = 'parachain',
- 'EvmParachain' = 'evm-parachain',
-}
-```
-
-
-
-```js title="Example"
-// The Chain Type
-{
- type: 'evm-parachain',
-}
-```
-
-
-
----
-
-### The Chain Asset ID Type
-
-
-
-A generic type used to specify the location of the asset on the chain, which is different on every chain.
-
-```ts
-type ChainAssetId = string | number | bigint | { [key: string]: ChainAssetId };
-```
-
-
-
-```js title="Example"
-// The Chain Asset ID Type
-// To target DOT on Moonbeam
-{
- id: '42259045809535163221576417993425387648',
-}
-```
-
-
-
----
-
-### The Chain Object
-
-
-
-Defines properties related to a chain and is used to define the source and destination chains. If a chain is an EVM parachain, there are a couple of additional properties.
-
-**Attributes**
-
-- `ecosystem` ++"Ecosystem"++ [:material-link-variant:](#the-ecosystem-type) - Identifies the ecosystem the chain belongs to: `polkadot`, `kusama`, or `alphanet-relay`
-- `isTestChain` ++"boolean"++ - Whether the chain is a testnet
-- `key` ++"string"++ - Identifies a chain
-- `name` ++"string"++ - The name of the chain
-- `type` ++"ChainType"++ [:material-link-variant:](#the-chain-type) - The type of the chain: `parachain` or `evm-parachain`
-- `assetsData` ++"Map"++ [:material-link-variant:](#the-chain-assets-data-object) - A list of the assets that the chain supports
-- `genesisHash` ++"string"++ - The hash of the genesis block
-- `parachainId` ++"number"++ - The ID of the parachain (not the EVM chain ID)
-- `ss58Format` ++"number"++ - The [ss58 format](https://polkadot.js.org/docs/keyring/start/ss58/){target=\_blank} for the chain
-- `usesChainDecimals` ++"boolean"++ - A flag indicating if the chain uses its own decimals in balance queries for all the assets. Defaults to `false`
-- `checkSovereignAccountBalances` ++"boolean"++ - Indicates whether a check of the sovereign account balances for the asset is required when transferring to this chain. Defaults to `false`
-- `ws` ++"string"++ - The WebSocket endpoint for the chain
-- `id` ++"number"++ - **For EVM parachains only** - The chain ID
-- `rpc` ++"string"++ - **For EVM parachains only** - The HTTP RPC endpoint for the chain
-
-
-
-```js title="Example"
-// The Chain object
-// Moonbeam's Chain Object
-{
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
-}
-```
-
-
-
----
-
-### The Chain Assets Data Object
-
-
-
-Defines the information needed to target the asset on the chain. This is mostly for internal usage to accommodate how chains store their assets. The SDK defaults to the asset ID if certain properties do not apply to the given chain.
-
-**Attributes**
-
-- `asset` ++"Asset"++ - The asset's key and origin symbol
-- `balanceId` ++"ChainAssetId"++ [:material-link-variant:](#the-chain-asset-id-type) - The balance ID of the asset. Defaults to the asset ID
-- `decimals` ++"number"++ - The number of decimals the asset has
-- `id` ++"ChainAssetId"++ [:material-link-variant:](#the-chain-asset-id-type) - The asset ID
-- `metadataId` ++"ChainAssetId"++ [:material-link-variant:](#the-chain-asset-id-type) - The metadata ID of the asset
-- `minId` ++"ChainAssetId"++ [:material-link-variant:](#the-chain-asset-id-type) - The minimum ID of the asset
-- `palletInstance` ++"number"++ - The number of the pallet instance the asset belongs to
-- `min` ++"number"++ - The minimum amount of the asset that is required to be left in the account for it to be active. Similar to the existential deposit, except it is for non-native assets
-
-
-
-```js title="Example"
-// The Chain Assets Data object
-// To target DOT on Moonbeam
-{
- asset: dot,
- id: '42259045809535163221576417993425387648',
-}
-```
-
-
-
----
-
-## Transfer Data
-
-### The Transfer Data Object
-
-
-
-Defines the complete transfer data for transferring an asset, including asset, source chain, and destination chain information, as well as a few helper functions for the transfer process.
-
-**Attributes**
-
-- `destination` ++"DestinationChainTransferData"++ [:material-link-variant:](#the-destination-chain-transfer-data-object) - The assembled destination chain and address information
-- `getEstimate` ++"function"++ [:material-link-variant:](./methods.md#the-get-estimate-method) - Gets the estimated amount of the asset that the destination address will receive
-- `isSwapPossible` ++"boolean"++ - Returns whether or not the swap is possible
-- `max` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The maximum amount of the asset that _can_ be transferred
-- `min` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The minimum amount of the asset that _can_ be transferred
-- `source` ++"SourceChainTransferData"++ [:material-link-variant:](#the-source-chain-transfer-data-object) - The assembled source chain and address information
-- `swap` ++"function"++ [:material-link-variant:](./methods.md#the-swap-method) - Swaps the destination and the source chains and returns the swapped transfer data
-- `transfer` ++"function"++ [:material-link-variant:](./methods.md#the-transfer-method) - Transfers a given amount of the asset from the source chain to the destination chain
-
-
-
-```js title="Example"
-// The Transfer Data object
-// For sending DOT from Polkadot to Moonbeam
-{
- destination: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- existentialDeposit: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://rpc.polkadot.io'
- },
- destinationFeeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 169328990n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
-}
-```
-
-
-
----
-
-### The Destination Chain Transfer Data Object
-
-
-
-Defines the destination chain data for the transfer.
-
-**Attributes**
-
-- `balance` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The balance of the asset being transferred on the destination address
-- `chain` ++"AnyChain"++ [:material-link-variant:](#the-chain-object) - The destination chain information
-- `existentialDeposit` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The existential deposit for the asset being transferred on the destination chain
-- `fee` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The amount of fees for the asset being transferred on the destination chain
-- `min` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The minimum amount of the asset to transfer. This is different than `TransferData.min`, as this dictates the minimum amount that should be received on the destination chain
-
-
-
-```js title="Example"
-// The Destination Chain Transfer Data object
-// For sending DOT from Polkadot to Moonbeam
-{
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- existentialDeposit: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 33068783n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
-}
-```
-
-
-
----
-
-### The Source Chain Transfer Data Object
-
-
-
-Defines the source chain data for the transfer.
-
-**Attributes**
-
-- `balance` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The balance of the asset being transferred for the source address
-- `chain` ++"AnyChain"++ [:material-link-variant:](#the-chain-object) - The source chain information
-- `destinationFeeBalance` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The balance of the asset used to pay for fees in the destination chain
-- `existentialDeposit` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The existential deposit for the asset being transferred on the source chain
-- `fee` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The amount of fees for the asset being transferred on the source chain
-- `feeBalance` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The balance of the asset being transferred on the source chain
-- `min` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The minimum amount of the asset that should be kept on the source chain, taking into consideration the `existentialDeposit` and `fee` for the transfer
-- `max` ++"AssetAmount"++ [:material-link-variant:](#the-asset-amount-object) - The maximum amount of the asset that _can_ be transferred
-
-
-
-```js title="Example"
-// The Source Chain Transfer Data object
-// For sending DOT from Polkadot to Moonbeam
-{
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: 1000000000,
- ws: 'wss://rpc.polkadot.io'
- },
- destinationFeeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 169328990n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
-}
-```
-
-
-
----
-
-## SDK Options
-
-### The SDK Options Object
-
-
-
-Defines options to initialize the SDK, including EVM and Polkadot signers and a custom configuration service.
-
-**Attributes**
-
-- `evmSigner` ++"EvmSigner"++ [:material-link-variant:](#the-evm-signer-type) - The signer for transfers involving EVM chains
-- `polkadotSigner` ++"Signer | IKeyringPair"++ [:material-link-variant:](#the-polkadot-signer-type) - The signer for transfers involving non-EVM chains
-
-
-
-```js title="Example"
-// The Sdk Options object
-{
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- configService: {
- assets: INSERT_ASSETS_MAPPING,
- chains: INSERT_CHAINS_MAPPING,
- chainsConfig: INSERT_CHAIN_CONFIG_MAPPING,
- }
-}
-```
-
-
-
----
-
-## Signers
-
-### The EVM Signer Type
-
-
-
-Defines the EVM signer for transfers involving EVM chains. Can be an [Ethers signer](https://docs.ethers.org/v6/api/wallet/#Wallet) or [viem Wallet Client](https://viem.sh/docs/clients/wallet).
-
-
-
-```js title="Example"
-import { ethers } from 'ethers';
-
-const provider = new ethers.WebSocketProvider(
- 'wss://wss.api.moonbeam.network',
- {
- chainId: 1284,
- name: 'moonbeam',
- },
-);
-const evmSigner = new ethers.Wallet('INSERT_PRIVATE_KEY', provider);
-```
-
-
-
----
-
-### The Polkadot Signer Type
-
-
-
-Defines the signer for transfers involving non-EVM chains. Can be a [signer](https://github.com/polkadot-js/api/blob/v11.0.2/packages/types/src/types/extrinsic.ts#L135) or a [Keyring pair](https://polkadot.js.org/docs/keyring/start/create).
-
-
-
-```js title="Example"
-import { Keyring } from '@polkadot/api';
-import { cryptoWaitReady } from '@polkadot/util-crypto';
-
-await cryptoWaitReady();
-const keyring = new Keyring({ type: 'sr25519' });
-const pair = keyring.addFromUri('INSERT_MNEMONIC');
-```
-
-
-
----
-
-## Configurations
-
-The interfaces in this section are primarily used for defining your own custom configuration source and adding or updating new asset and chain configurations to the XCM SDK. To learn how to add new configurations, please refer to the [Contribute to the XCM SDK](./../contribute.md) guide.
-
-### The Config Service Object
-
-
-
-Defines a custom configuration service. This overrides the asset and chain configurations in the [xcm-config package](https://github.com/moonbeam-foundation/xcm-sdk/tree/main/packages/config){target=\_blank}, which is exposed by default by the SDK.
-
-**Attributes**
-
-- `assets` ++"Map"++ [:material-link-variant:](#the-asset-object) - A list of the supported assets mapping each asset key to its corresponding `Asset` object
-- `chains` ++"Map"++ [:material-link-variant:](#the-chain-object) - A list of the supported assets mapping each chain key to its corresponding `Chain` object
-- `chainsConfig` ++"Map"++ [:material-link-variant:](#the-chain-config-object) - A list of the supported chain configurations mapping each chain key to its corresponding `ChainConfig` object
-
-
-
-```js title="Example"
-import { Keyring } from '@polkadot/api';
-import { cryptoWaitReady } from '@polkadot/util-crypto';
-
-await cryptoWaitReady();
-const keyring = new Keyring({ type: 'sr25519' });
-const pair = keyring.addFromUri('INSERT_MNEMONIC');
-```
-
-
-
----
-
-### The Chain Config Object
-
-
-
-Defines a chain's configurations, including information for each chain's supported assets.
-
-**Attributes**
-
-- `assets` ++"AssetConfig[]"++ [:material-link-variant:](#the-asset-object) - The supported asset configurations
-- `chain` ++"AnyChain"++ [:material-link-variant:](#the-chain-object) - The chain's properties
-
-
-
-```js title="Example"
-// The Chain Config object
-// For configuring the Polkadot Asset Hub
-{
- assets: [
- ...new AssetConfig({
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- destination: moonbeam,
- destinationFee: {
- amount: FeeBuilder()
- .xcmPaymentApi()
- .xcmPaymentFee({ isAssetReserveChain: false }),
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- },
- extrinsic: ExtrinsicBuilder()
- .polkadotXcm()
- .limitedReserveTransferAssets()
- .X2(),
- fee: {
- asset: dot,
- balance: BalanceBuilder().substrate().system().account(),
- xcmDeliveryFeeAmount,
- },
- min: AssetMinBuilder().assets().asset(),
- }),
- ...
- ],
- chain: new Parachain({
- assetsData: [
- {
- asset: usdt,
- id: 1984,
- palletInstance: 50,
- },
- ...
- ],
- ecosystem: Ecosystem.Polkadot,
- genesisHash:
- '0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f',
- key: 'Polkadot-asset-hub',
- name: 'Polkadot Asset Hub',
- parachainId: 1000,
- ss58Format: 42,
- ws: 'wss://polkadot-asset-hub-rpc.polkadot.io',
- })
-}
-```
-
-
-
----
-
-### The Asset Config Object
-
-
-
-Defines an asset's configurations for a source chain and includes information about the destination chain, associated fees for transferring the asset from the source chain to the destination chain, and builder functions that define how to transfer the asset.
-
-**Attributes**
-
-- `asset` ++"Asset"++ [:material-link-variant:](#the-asset-object) - The asset's key and origin symbol
-- `balance` ++"BalanceConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/balance/BalanceBuilder.interfaces.ts){target=\_blank} - The query builder for retrieving the balance of an asset for a given account
-- `contract` ++"ContractConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/contract/ContractBuilder.interfaces.ts){target=\_blank} - The contract call builder for a cross-chain transfer. This is specific to EVM chains that use contracts to interact with Substrate pallets for cross-chain transfers, such as [Moonbeam's X-Tokens precompiled contract](https://docs.moonbeam.network/builders/interoperability/xcm/xc20/send-xc20s/xtokens-precompile/)
-- `destination` ++"AnyChain"++ [:material-link-variant:](#the-chain-object) - The destination chain information
-- `destinationFee` ++"DestinationFeeConfig"++ - The destination chain fees
-- `extrinsic` ++"ExtrinsicConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/extrinsic/ExtrinsicBuilder.interfaces.ts){target=\_blank} - The extrinsic builder for a cross-chain transfer
-- `fee` ++"FeeAssetConfig"++ [:material-link-variant:](#the-fee-asset-config) - The source chain fees
-- `min` ++"AssetMinConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/asset-min/AssetMinBuilder.interfaces.ts){target=\_blank} - The query builder for retrieving the minimum amount of an asset required to be left in an account
-
-
-
-```js title="Example"
-// The Asset Config object
-// For configuring USDT to be sent from
-// the Polkadot Asset Hub to Moonbeam
-{
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- destination: moonbeam,
- destinationFee: {
- amount: FeeBuilder()
- .xcmPaymentApi()
- .xcmPaymentFee({ isAssetReserveChain: false }),
- asset: usdt,
- balance: BalanceBuilder().substrate().assets().account(),
- },
- extrinsic: ExtrinsicBuilder()
- .polkadotXcm()
- .limitedReserveTransferAssets()
- .X2(),
- fee: {
- asset: dot,
- balance: BalanceBuilder().substrate().system().account(),
- xcmDeliveryFeeAmount,
- },
- min: AssetMinBuilder().assets().asset(),
-}
-```
-
-
-
----
-
-### The Fee Asset Config
-
-
-
-Defines the fees for a particular asset on the source chain.
-
-**Attributes**
-
-- `asset` ++"Asset"++ [:material-link-variant:](#the-asset-object) - The asset's key and origin symbol
-- `balance` ++"BalanceConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/balance/BalanceBuilder.interfaces.ts){target=\_blank} - The query builder for retrieving the balance of an asset for a given account
-- `xcmDeliveryFeeAmount` ++"number"++ - The delivery fee amount for the cross-chain transfer
-
-
-
-```js title="Example"
-// The Fee Asset Config object
-// For configuring USDT to be sent from
-// the Polkadot Asset Hub to Moonbeam
-{
- asset: dot,
- balance: BalanceBuilder().substrate().system().account(),
- xcmDeliveryFeeAmount: 0.036,
-}
-```
-
-
-
-### The Destination Fee Asset Config
-
-
-
-Defines the fees for a particular asset on the destination chain.
-
-**Attributes**
-
-- `asset` ++"Asset"++ [:material-link-variant:](#the-asset-object) - The asset's key and origin symbol
-- `balance` ++"BalanceConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/balance/BalanceBuilder.interfaces.ts){target=\_blank} - The query builder for retrieving the balance of an asset for a given account
-- `xcmDeliveryFeeAmount` ++"number"++ - The delivery fee amount for the cross-chain transfer
-- `amount` ++"number | FeeConfigBuilder"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/@moonbeam-network/xcm-sdk@2.2.3/packages/builder/src/fee/FeeBuilder.interfaces.ts){target=\_blank} - The fee amount or the query builder for retrieving the fee amount for the execution of the cross-chain transfer
-
-
-
-```js title="Example"
-// The Destination Fee Asset Config object
-// For configuring USDT to be sent from
-// the Polkadot Asset Hub to Moonbeam
-{
- asset: dot,
- balance: BalanceBuilder().substrate().system().account(),
- amount: amount: FeeBuilder()
- .xcmPaymentApi()
- .xcmPaymentFee({ isAssetReserveChain: false }),
-}
-```
-
-
diff --git a/mkdocs/docs/reference/methods.md b/mkdocs/docs/reference/methods.md
deleted file mode 100644
index 6c2de27c..00000000
--- a/mkdocs/docs/reference/methods.md
+++ /dev/null
@@ -1,1365 +0,0 @@
----
-title: XCM SDK Reference - Methods - v2
-description: A reference for the available methods in the Moonbeam XCM SDK that can be used to send XCM transfers between chains within the Polkadot/Kusama ecosystems.
----
-
-# Moonbeam XCM SDK Reference: Methods
-
-The SDK provides an API that enables you to get asset information for each supported asset, the source chains where a given asset can be sent from, and, given a source chain, the supported destination chains where the given asset can be sent. The SDK also includes helper methods related to transferring cross-chain assets, such as getting an estimated amount of the asset the destination account will receive, less any execution fees, and asset conversion methods based on the asset and the number of decimals it has. All of these enable you to transfer assets across chains easily and seamlessly.
-
-The following sections cover the available methods in the XCM SDK.
-
-## Initialize the SDK
-
-
-
-
-`Sdk()` - Exposes the methods of the XCM SDK. **Must be called first to access other SDK methods**.
-
-**Parameters**
-
-- `options?` ++"SdkOptions"++ - Allows you to specify an `evmSigner` or `polkadotSigner`
-
-**Returns**
-
-- `assets` ++"function"++ [:material-link-variant:](#the-assets-method) - Provides an entry point to building the data necessary to transfer an asset between a source chain and a destination chain
-- `getTransferData` ++"function"++ [:material-link-variant:](#the-get-transfer-data-method) - Builds the data necessary to transfer an asset between a source chain and a destination chain
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-console.log(sdkInstance);
-```
-
-```js title="Response"
-{
- assets: [Function: assets],
- getTransferData: [AsyncFunction: getTransferData]
-}
-```
-
-
-
-
----
-
-### The Get Transfer Data Method
-
-
-
-
-`getTransferData()` - Builds the data necessary to transfer an asset between a source chain and a destination chain.
-
-**Parameters**
-
-- `destinationAddress` ++"string"++ - The address of the receiving account on the destination chain
-- `destinationKeyorChain` ++"string | AnyChain"++ [:material-link-variant:](./interfaces.md#the-chain-object) - The key or `Chain` data for the destination chain
-- `evmSigner?` ++"EvmSigner"++ [:material-link-variant:](./interfaces.md#the-evm-signer-type) - The signer for Ethereum-compatible chains that use H160 Ethereum-style accounts. Can be an Ethers signer or a viem Wallet Client
-- `keyOrAsset` ++"string | Asset"++ [:material-link-variant:](./interfaces.md#the-asset-object) - The key or `Asset` data for the asset being transferred
-- `polkadotSigner?` ++"PolkadotSigner | IKeyringPair"++ [:material-link-variant:](./interfaces.md#the-polkadot-signer-type) - The Polkadot signer or Keyring pair
-- `sourceAddress` ++"string"++ - The address of the sending account on the source chain
-- `sourceKeyOrChain` ++"string | AnyChain"++ [:material-link-variant:](./interfaces.md#the-chain-object) - The key or `Chain` data for the source chain
-
-**Returns**
-
-- ++"Promise"++ - The assembled transfer data, which includes the following:
-
- - `destination` ++"DestinationChainTransferData"++ [:material-link-variant:](./interfaces.md#the-destination-chain-transfer-data-object) - The assembled destination chain and address information
- - `getEstimate` ++"function"++ [:material-link-variant:](#the-get-estimate-method) - Gets the estimated amount of the asset that the destination address will receive
- - `isSwapPossible` ++"boolean"++ - Returns whether or not the swap is possible
- - `max` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The maximum amount of the asset that can be transferred
- - `min` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The minimum amount of the asset that can be transferred
- - `source` ++"SourceChainTransferData"++ [:material-link-variant:](./interfaces.md#the-source-chain-transfer-data-object) - The assembled source chain and address information
- - `swap` ++"function"++ [:material-link-variant:](#the-swap-method) - Swaps the destination and the source chains and returns the swapped transfer data
- - `transfer` ++"function"++ [:material-link-variant:](#the-transfer-method) - Transfers a given amount of the asset from the source chain to the destination chain
-
-
-
-
-```js title="Example Usage"
-const transferData = await Sdk().getTransferData({
- destinationAddress: 'INSERT_MOONBEAM_ADDRESS',
- destinationKeyOrChain: 'moonbeam',
- evmSigner: INSERT_EVM_SIGNER,
- keyOrAsset: 'dot',
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- sourceAddress: 'INSERT_POLKADOT_ADDRESS',
- sourceKeyOrChain: {
- key: 'polkadot',
- name: 'polkadot',
- type: 'parachain',
- },
-});
-console.log(transferData);
-```
-
-```js title="Response"
-{
- destination: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- existentialDeposit: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 20080321n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 20080321n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://polkadot-rpc.dwellir.com'
- },
- destinationFeeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 163633495n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
-}
-```
-
-
-
-
----
-
-### The Assets Method
-
-
-
-
-`assets()` - Provides an entry point for building the data necessary to transfer an asset between a source chain and a destination chain.
-
-**Parameters**
-
-- `ecosystem?` ++"Ecosystem"++ - Specify the ecosystem for a set of assets: `polkadot`, `kusama`, or `alphanet-relay`
-
-**Returns**
-
-- `assets` ++"Asset[]"++ - A list of the supported assets
-- `asset` ++"function"++ [:material-link-variant:](#the-asset-method) - Sets the asset to be transferred. Refer to the following section on how to continue to build the transfer data using the `asset` function
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const assets = sdkInstance.assets();
-console.log(assets);
-```
-
-```js title="Response"
-{
- assets: [
- { key: 'aca', originSymbol: 'ACA' },
- { key: 'alan', originSymbol: 'ALAN' },
- { key: 'ampe', originSymbol: 'AMPE' },
- { key: 'aseed', originSymbol: 'aSEED' },
- { key: 'astr', originSymbol: 'ASTR' },
- ...
- ],
- asset: [Function: asset]
-}
-```
-
-
-
-
----
-
-## Build the Transfer Data Starting with Assets
-
-When building transfer data with the `Sdk().assets()` function, you'll use multiple methods to build and send the underlying XCM message.
-
-### The Asset Method
-
-
-
-
-`asset()` - Sets the asset to be transferred. **Must call `assets()` first**.
-
-**Parameters**
-
-- `keyOrAsset` ++"string | Asset"++ [:material-link-variant:](./interfaces.md#the-asset-object) - The key or `Asset` data for the asset being transferred
-
-**Returns**
-
-- `sourceChains` ++"AnyChain[]"++ [:material-link-variant:](./interfaces.md#the-chain-object) - A list of the supported source chains for the specified asset
-- `source` ++"function"++ [:material-link-variant:](#the-source-method) - Sets the source chain to transfer the asset from
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const sourceData = sdkInstance.assets().asset('dot');
-console.log(sourceData);
-```
-
-```js title="Response"
-{
- sourceChains: [
- {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: {
- 'aca' => {
- asset: { key: 'aca', originSymbol: 'ACA' },
- id: '224821240862170613278369189818311486111'
- },
- 'astr' => {
- asset: { key: 'astr', originSymbol: 'ASTR' },
- id: '224077081838586484055667086558292981199'
- },
- ...
- },
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network',
- nativeCurrency: {
- decimals: 18,
- name: 'GLMR',
- symbol: 'GLMR'
- }
- },
- {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://polkadot-rpc.dwellir.com'
- }
- ],
- source: [Function: source]
-}
-```
-
-
-
-
----
-
-### The Source Method
-
-
-
-
-`source()` - Sets the source chain from which to transfer the asset. **Must call `asset()` first**.
-
-**Parameters**
-
-- `keyOrChain` ++"string | AnyChain"++ [:material-link-variant:](./interfaces.md#the-chain-object) - The key or `Chain` data for the source chain
-
-**Returns**
-
-- `destinationChains` ++"AnyChain[]"++ [:material-link-variant:](./interfaces.md#the-chain-object) - A list of the supported destination chains for the specified asset and source chain
-- `destination` ++"function"++ [:material-link-variant:](#the-destination-method) - Sets the destination chain to transfer the asset from
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const destinationData = sdkInstance.assets().asset('dot').source('polkadot');
-console.log(destinationData);
-```
-
-```js title="Response"
-{
- destinationChains: [
- {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: {
- 'aca' => {
- asset: { key: 'aca', originSymbol: 'ACA' },
- id: '224821240862170613278369189818311486111'
- },
- 'astr' => {
- asset: { key: 'astr', originSymbol: 'ASTR' },
- id: '224077081838586484055667086558292981199'
- },
- ...
- },
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network',
- nativeCurrency: {
- decimals: 18,
- name: 'GLMR',
- symbol: 'GLMR'
- }
- }
- ],
- destination: [Function: destination]
-}
-```
-
-
-
-
----
-
-### The Destination Method
-
-
-
-
-`destination()` - Sets the destination chain to which to transfer the asset. **Must call `source()` first**.
-
-**Parameters**
-
-- `keyOrChain` ++"string | AnyChain"++ [:material-link-variant:](./interfaces.md#the-chain-object) - The key or `Chain` data for the destination chain
-
-**Returns**
-
-- `accounts` ++"function"++ [:material-link-variant:](#the-accounts-method) - Sets the source address, the destination address, and the signer(s) required for the transfer
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferDataWithoutAccounts = sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam');
-console.log(transferDataWithoutAccounts);
-```
-
-```js title="Response"
-{ accounts: [AsyncFunction: accounts] }
-```
-
-
-
-
----
-
-### The Accounts Method
-
-
-
-
-`accounts()` - Sets the source address, the destination address, and the signer(s) required for the transfer. **Must call `destination()` first**.
-
-**Parameters**
-
-- `sourceAddress` ++"string"++ - The address of the sending account on the source chain
-- `destinationAddress` ++"string"++ - The address of the receiving account on the destination chain
-- `signers?` ++"Partial(signers)"++ [:material-link-variant:](./interfaces.md#signers) - The EVM or Polkadot signers required to sign transactions
-
-**Returns**
-
-- ++"Promise"++ - The assembled transfer data, which includes the following:
-
- - `destination` ++"DestinationChainTransferData"++ [:material-link-variant:](./interfaces.md#the-destination-chain-transfer-data-object) - The assembled destination chain and address information
- - `getEstimate` ++"function"++ [:material-link-variant:](#the-get-estimate-method) - Gets the estimated amount of the asset that the destination address will receive
- - `isSwapPossible` ++"boolean"++ - Returns whether or not the swap is possible
- - `max` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The maximum amount of the asset that can be transferred
- - `min` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The minimum amount of the asset that can be transferred
- - `source` ++"SourceChainTransferData"++ [:material-link-variant:](./interfaces.md#the-source-chain-transfer-data-object) - The assembled source chain and address information
- - `swap` ++"function"++ [:material-link-variant:](#the-swap-method) - Swaps the destination and the source chains and returns the swapped transfer data
- - `transfer` ++"function"++ [:material-link-variant:](#the-transfer-method) - Transfers a given amount of the asset from the source chain to the destination chain
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-console.log(transferData);
-```
-
-```js title="Response"
-{
- destination: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: [Map],
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network'
- },
- existentialDeposit: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 20080321n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 20080321n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://polkadot-rpc.dwellir.com'
- },
- destinationFeeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 163633495n,
- decimals: 10,
- symbol: 'DOT'
- },
- feeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
-}
-```
-
-
-
-
----
-
-## Consume Transfer Data
-
-### The Swap Method
-
-
-
-
-`swap()` - Returns the transfer data necessary to swap the asset from the destination chain back to the source chain.
-
-**Parameters**
-
-None.
-
-**Returns**
-
-- ++"Promise"++ - If the swap is not possible, `undefined` is returned. If the swap is possible, the assembled transfer data is returned, which includes the following:
-
- - `destination` ++"DestinationChainTransferData"++ [:material-link-variant:](./interfaces.md#the-destination-chain-transfer-data-object) - The assembled destination chain and address information
- - `getEstimate` ++"function"++ [:material-link-variant:](#the-get-estimate-method) - Gets the estimated amount of the asset that the destination address will receive
- - `isSwapPossible` ++"boolean"++ - Returns whether or not the swap is possible
- - `max` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The maximum amount of the asset that can be transferred
- - `min` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The minimum amount of the asset that can be transferred
- - `source` ++"SourceChainTransferData"++ [:material-link-variant:](./interfaces.md#the-source-chain-transfer-data-object) - The assembled source chain and address information
- - `swap` ++"function"++ [:material-link-variant:](#the-swap-method) - Swaps the destination and the source chains and returns the swapped transfer data
- - `transfer` ++"function"++ [:material-link-variant:](#the-transfer-method) - Transfers a given amount of the asset from the source chain to the destination chain
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const swapData = await transferData.swap();
-console.log(swapData);
-```
-
-```js title="Response"
-{
- destination: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'polkadot',
- name: 'Polkadot',
- type: 'parachain',
- assetsData: Map(0) {},
- genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3',
- parachainId: 0,
- ss58Format: 0,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://polkadot-rpc.dwellir.com'
- },
- existentialDeposit: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10000000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- fee: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 520000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- getEstimate: [Function: getEstimate],
- isSwapPossible: true,
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 10520000000n,
- decimals: 10,
- symbol: 'DOT'
- },
- source: {
- balance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- chain: {
- ecosystem: 'polkadot',
- isTestChain: false,
- key: 'moonbeam',
- name: 'Moonbeam',
- type: 'evm-parachain',
- assetsData: {
- 'aca' => {
- asset: { key: 'aca', originSymbol: 'ACA' },
- id: '224821240862170613278369189818311486111'
- },
- 'astr' => {
- asset: { key: 'astr', originSymbol: 'ASTR' },
- id: '224077081838586484055667086558292981199'
- },
- ...
- },
- genesisHash: '0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d',
- parachainId: 2004,
- ss58Format: 1284,
- usesChainDecimals: false,
- weight: undefined,
- ws: 'wss://wss.api.moonbeam.network',
- id: 1284,
- rpc: 'https://rpc.api.moonbeam.network',
- nativeCurrency: {
- decimals: 18,
- name: 'GLMR',
- symbol: 'GLMR'
- }
- },
- destinationFeeBalance: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- existentialDeposit: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- fee: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- feeBalance: {
- key: 'glmr',
- originSymbol: 'GLMR',
- amount: 0n,
- decimals: 18,
- symbol: 'GLMR'
- },
- max: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- },
- min: {
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
- }
- },
- swap: [AsyncFunction: swap],
- transfer: [AsyncFunction: transfer]
-}
-```
-
-
-
-
----
-
-### The Transfer Method
-
-
-
-
-`transfer()` - Transfers a given amount of the asset from the source chain to the destination chain.
-
-**Parameters**
-
-- `amount` ++"bigint | number| string"++ - The amount of the asset to transfer between the source and destination chains
-
-**Returns**
-
-- ++"Promise(string)"++ - The transaction hash for the transfer on the source chain
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const transferTxHash = await transferData.transfer();
-console.log(transferTxHash);
-```
-
-```js title="Response"
-0x2a1ec19aa360111c0e499c90b5a2747f2e87f49966e280daf831b856996f3952;
-```
-
-
-
-
----
-
-### The Get Estimate Method
-
-
-
-
-`getEstimate()` - Returns an estimated amount of the asset that will be received on the destination chain, less any destination fees.
-
-**Parameters**
-
-- `amount` ++"number | string"++ - The amount of the asset to transfer between the source and destination chains
-
-**Returns**
-
-- ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - An estimated amount of the asset that the destination address will receive
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const estimate = transferData.getEstimate(1);
-console.log(estimate);
-```
-
-```js title="Response"
-{
- key: 'dot',
- originSymbol: 'DOT',
- amount: 9979919679n,
- decimals: 10,
- symbol: 'DOT'
-}
-```
-
-
-
-
----
-
-## Asset Utilities
-
-The `AssetAmount` class contains the following utility functions.
-
-### The From Asset Method
-
-
-
-
-`fromAsset()` - Creates an [`AssetAmount`](./interfaces.md#the-asset-amount-object) instance from an [`Asset`](./interfaces.md#the-asset-object) and some additional parameters.
-
-!!! note
-To use the `fromAsset` method, you'll need to import it from the [xcm-types package](https://github.com/moonbeam-foundation/xcm-sdk/tree/main/packages/types){target=\_blank}. To install the xcm-types package, run the following:
-
- ```bash
- npm i @moonbeam-network/xcm-types
- ```
-
-**Parameters**
-
-- `asset` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - An `AssetAmount` instance to compare
-- `params` ++"AssetAmountParams"++ - Additional parameters needed to create the `AssetAmount` instance. The `AssetAmountParams` are as follows:
- - `amount` ++"bigint"++ - Identifies a particular amount of the asset (i.e., balance, minimum, maximum, etc.)
- - `decimals` ++"number"++ - The number of decimals the asset has
- - `symbol` ++"string"++ - The symbol of the asset
-
-**Returns**
-
-**Returns**
-
-- ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The new `AssetAmount` instance
-
-
-
-
-```js title="Example Usage"
-import { Asset, AssetAmount } from '@moonbeam-network/xcm-types';
-
-const dot = new Asset({
- key: 'dot',
- originSymbol: 'DOT',
-});
-const zeroAmount = AssetAmount.fromAsset(dot, {
- amount: 0n,
- decimals: 10,
-});
-```
-
-```js title="Response"
-{
- key: 'dot',
- originSymbol: 'DOT',
- amount: 0n,
- decimals: 10,
- symbol: 'DOT'
-}
-```
-
-
-
-
----
-
-### The Is Same Method
-
-
-
-
-`isSame()` - Compares two instances of [`AssetAmount`](./interfaces.md#the-asset-amount-object) and checks whether they have the same `name`, `symbol`, and `decimals` properties. This method does not compare the `amount` properties.
-
-**Parameters**
-
-- `asset` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - An `AssetAmount` instance to compare
-
-**Returns**
-
-- ++"boolean"++ - `true` if the `AssetAmount` instances are the same or `false` if they are different
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const isSame = transferData.max.isSame(transferData.min);
-console.log(isSame);
-```
-
-```js title="Response"
-true;
-```
-
-
-
-
----
-
-### The Is Equal Method
-
-
-
-
-`isEqual()` - Compares two instances of [`AssetAmount`](./interfaces.md#the-asset-amount-object) and checks whether they have all of the same properties. This compares the `name`, `symbol`, `decimals`, and `amount` properties.
-
-**Parameters**
-
-- `asset` ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - An `AssetAmount` instance to compare
-
-**Returns**
-
-- ++"boolean"++ - `true` if the `AssetAmount` instances are the same or `false` if they are different
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const isEqual = transferData.max.isEqual(transferData.min);
-console.log(isEqual);
-```
-
-```js title="Response"
-false;
-```
-
-
-
-
----
-
-### The Copy With Method
-
-
-
-
-`copyWith()` - Creates a new instance of [`AssetAmount`](./interfaces.md#the-asset-amount-object) with properties of the original instance and overrides properties that are passed as options.
-
-**Parameters**
-
-- `params` ++"Partial
"++ - The properties to apply to the new `AssetAmount` instance. The `AssetAmountConstructorParams` are as follows:
- - `amount` ++"bigint"++ - Identifies a particular amount of the asset (i.e., balance, minimum, maximum, etc.)
- - `decimals` ++"number"++ - The number of decimals the asset has
- - `symbol` ++"string"++ - The symbol of the asset
-
-**Returns**
-
-- ++"AssetAmount"++ [:material-link-variant:](./interfaces.md#the-asset-amount-object) - The new `AssetAmount` instance
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const estimate = transferData.getEstimate(1);
-const estimateCopy = estimate.copyWith({ amount: 2 });
-console.log(estimateCopy);
-```
-
-```js title="Response"
-{
- key: 'dot',
- originSymbol: 'DOT',
- amount: 2n,
- decimals: 10,
- symbol: 'DOT'
-}
-```
-
-
-
-
----
-
-### The To Decimal Method
-
-
-
-
-`toDecimal()` - Converts an [`AssetAmount`](./interfaces.md#the-asset-amount-object) to a decimal. The number to convert to decimal format and the number of decimals the asset uses are pulled automatically from the `AssetAmount`.
-
-**Parameters**
-
-- `maxDecimal?` ++"number"++ - The maximum number of decimal places to use. the default is `6`
-- `roundType?` ++"RoundingMode"++ - Accepts an index that dictates the [rounding method](https://mikemcl.github.io/big.js/#rm){target=\_blank} to use based on the `RoundingMode` enum:
-
- ```js
- enum RoundingMode {
- RoundDown = 0,
- RoundHalfUp = 1,
- RoundHalfEven = 2,
- RoundUp = 3
- }
- ```
-
-**Returns**
-
-- ++"string"++ - The given amount in decimal format
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const estimate = transferData.getEstimate(1);
-const estimateAmount = estimate.toDecimal();
-console.log(estimateAmount);
-```
-
-```js title="Response"
-0.997992;
-```
-
-
-
-
----
-
-### The To Big Number Method
-
-
-
-
-`toBig()` - Converts an [`AssetAmount`](./interfaces.md#the-asset-amount-object) to a big number.
-
-**Parameters**
-
-None.
-
-**Returns**
-
-- ++"Big"++ - The given amount in big number format
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const fee = transferData.destination.fee.toBig();
-console.log(fee);
-```
-
-```js title="Response"
-20080321;
-```
-
-
-
-
----
-
-### The To Big Decimal Method
-
-
-
-
-`toBigDecimal()` - Converts an [`AssetAmount`](./interfaces.md#the-asset-amount-object) to a decimal and then to a big number. The number to convert to decimal format and the number of decimals the asset uses are pulled automatically from the `AssetAmount`.
-
-**Parameters**
-
-- `maxDecimal?` ++"number"++ - The maximum number of decimal places to use. the default is `6`
-- `roundType?` ++"RoundingMode"++ - Accepts an index that dictates the [rounding method](https://mikemcl.github.io/big.js/#rm){target=\_blank} to use based on the `RoundingMode` enum:
-
- ```js
- enum RoundingMode {
- RoundDown = 0,
- RoundHalfUp = 1,
- RoundHalfEven = 2,
- RoundUp = 3
- }
- ```
-
-**Returns**
-
-- ++"Big"++ - The given amount in big number decimal format
-
-
-
-
-```js title="Example Usage"
-import { Sdk } from '@moonbeam-network/xcm-sdk';
-
-const sdkInstance = Sdk();
-const transferData = await sdkInstance
- .assets()
- .asset('dot')
- .source('polkadot')
- .destination('moonbeam')
- .accounts(
- INSERT_POLKADOT_ADDRESS, // Source chain address
- INSERT_MOONBEAM_ADDRESS, // Destination chain address
- {
- evmSigner: INSERT_EVM_SIGNER,
- polkadotSigner: INSERT_POLKADOT_SIGNER,
- },
- );
-
-const fee = transferData.destination.fee.toBigDecimal();
-console.log(fee);
-```
-
-```js title="Response"
-0.002008;
-```
-
-
-
diff --git a/mkdocs/docs/reference/mrl.md b/mkdocs/docs/reference/mrl.md
new file mode 100644
index 00000000..c9545e8b
--- /dev/null
+++ b/mkdocs/docs/reference/mrl.md
@@ -0,0 +1,886 @@
+---
+title: MRL SDK Reference
+description: A reference for the types and interfaces in the Moonbeam MRL SDK that can be used to send transfers between chains from the Polkadot ecosystem and external chains from outside the Polkadot ecosystem.
+---
+
+# Moonbeam MRL SDK Reference
+
+A new module, `@moonbeam-foundation/mrl`, has been added to the Moonbeam SDK to support transfers between chains from the Polkadot ecosystem and external chains from outside the Polkadot ecosystem.
+
+For more details about Moonbeam Routed Liquidity (MRL) itself, refer to the [MRL Documentation](https://docs.moonbeam.network/builders/interoperability/mrl/){target=\_blank}.
+
+The MRL SDK simplifies the process of routing liquidity from various blockchains into the Polkadot ecosystem by providing a set of tools and functions that abstract away the complexities of cross-chain communication, by leveraging GMP, XCM, and XC-20s.
+
+To use it, chains are configured following an iterface which contains all the necessary information to perform the transfers.
+
+This sdk uses the [XCM-SDK types and concepts as base](../reference/xcm.md). In this section we'll provide a detailed reference for the most important concepts, types, interfaces and methods related to the MRL SDK.
+
+---
+
+## Transfer types
+To understand how to use the MRL SDK, we can identify three different types of transfers, which ultimately don't affect the way the SDK is used, but depending on the type of transfer, the logic behind each one is going to be different.
+
+Always refer to the [MRL Documentation](https://docs.moonbeam.network/builders/interoperability/mrl/){target=\_blank} for a full explanation of the process, but here is a brief overview of what happens in each type of transfers, which will help you understand how the SDK works.
+
+---
+
+### From EVM chains to parachains. {: #from-evm-chains-to-parachains }
+Here the source chain is an [EVM chain](../reference/xcm.md#the-evm-chain-object) and the destination chain either a [Parachain](../reference/xcm.md#the-parachain-object) or an [EVM Parachain](../reference/xcm.md#the-evm-parachain-object).
+
+1. A contract call is made in the source chain, which triggers the assets to be sent to Moonbeam ([moon chain](#the-moon-chain)). This process is done in this sdk by leveraging a [GMP provider](https://docs.moonbeam.network/builders/interoperability/protocols/){target=\_blank}. Currently the only one supported is [Wormhole](https://docs.moonbeam.network/builders/interoperability/protocols/wormhole/){target=\_blank}.
+2. Next, to complete the transfer in Moonbeam, it must be executed, either manually or automatically by a relayer from the GMP provider. This execution consists of calling the [GMP precompile](https://docs.moonbeam.network/builders/ethereum/precompiles/interoperability/gmp/){target=\_blank}, which triggers the next step.
+3. An XCM message is sent from Moonbeam to the destination chain, containing the assets that were sent from the source chain.
+
+---
+
+### From parachains to EVM chains. {: #from-parachains-to-evm-chains }
+
+Here the source chain is a [Parachain](../reference/xcm.md#the-parachain-object) or an [EVM Parachain](../reference/xcm.md#the-evm-parachain-object) and the destination chain an [EVM chain](../reference/xcm.md#the-evm-chain-object).
+
+1. An XCM message is sent from the source chain to Moonbeam, this message is a batch call containing the following information:
+ - A 'transfer assets' message, containing the asset that the user wants to transfer, plus the fees necessary to complete the transfer in Moonbeam, if any.
+ - A 'remote execution' message, which will be executed in Moonbeam.
+ - The assets are sent to the [computed origin account](https://docs.moonbeam.network/builders/interoperability/mrl/#calculate-computed-origin-account){target=\_blank}, which is an account that can only be manipulated remotely by the source address.
+ - *Note*: It is possible to only send the remote execution message, in cases where the computed origin account already has the assets necessary to complete the transfer. Refer to the [transfer method](#the-transfer-method) for information on how to do this.
+
+2. Now that the computed origin account has the assets, the remote execution message is executed in Moonbeam, which will send the assets to the destination chain through a GMP provider. It is the same first step described in the [From EVM chains to parachains](#from-evm-chains-to-parachains) section, but in reverse.
+
+3. The transaction must be executed in the destination chain, either manually or automatically by a relayer.
+
+---
+
+### Between Moon Chain and EVM chains. {: #from-moonchain-to-evm-chains }
+This is the simplest type of transfer, as it only involves moving assets between Moonbeam and an EVM chain.
+
+1. The assets are sent from the source chain to the destination chain through a GMP provider, like in the first step of the [From EVM chains to parachains](#from-evm-chains-to-parachains) section.
+2. The transaction must be executed in the destination chain, either manually or automatically by a relayer.
+
+For this type of transfer there is no need for a polkadot signer.
+
+---
+## MRL Asset Routes
+
+These objects define the routes for transferring assets between chains. For a more detailed explanation on how to implement them, refer to the [Contribute Section](../contribute/mrl.md#configure-a-chain-route){target=\_blank}.
+
+
+
+
+### The [Mrl Asset Route](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/types/MrlAssetRoute.ts){target=\_blank} Object
+Each asset route is an object that contains the source and destination chains, the assets to be transferred, the fees, and the extrinsic or contract calls to be executed.
+
+**Attributes**
+
+- `source` ++"MrlSourceConfig"++ - Contains the information about the transfer regarding the source chain
+- `destination` ++"DestinationConfig"++ - Contains the information about the transfer regarding the destination chain
+- `mrl` ++"MrlConfig"++ [:material-link-variant:](#mrl-config) - Contains the information about the transfer exclusive to MRL, like information about the transfer calls and the [moon chain](#the-moon-chain)
+
+#### MRL Config
+
+**Attributes**
+
+- `isAutomaticPossible` ++"boolean"++ - Whether or not the automatic transfer is possible
+- `transfer` ++"MrlConfigBuilder"++ - Contains the builder for the transfer call, either an extrinsic or a contract call
+- `moonChain` ++"MoonChainConfig"++ - Contains the information about the transfer regarding the [moon chain](#the-moon-chain)
+
+
+
+```js title="Example"
+// MRL Asset Route for ETH from Ethereum to Moonbeam
+{
+ source: {
+ asset: weth,
+ balance: BalanceBuilder().evm().erc20(),
+ destinationFee: {
+ asset: weth,
+ balance: BalanceBuilder().evm().erc20(),
+ },
+ },
+ destination: {
+ asset: eth,
+ chain: ethereum,
+ balance: BalanceBuilder().evm().native(),
+ fee: {
+ asset: eth,
+ amount: 0,
+ },
+ },
+ mrl: {
+ isAutomaticPossible: true,
+ transfer: MrlBuilder().wormhole().wormhole().tokenTransfer(),
+ moonChain: {
+ asset: weth,
+ balance: BalanceBuilder().evm().erc20(),
+ fee: {
+ asset: glmr,
+ amount: 0,
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ },
+},
+```
+
+
+### The [Mrl Chain Routes](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/types/MrlChainRoutes.ts){target=\_blank} Object
+
+This object contains the routes for a specific chain.
+
+**Attributes**
+
+- `chain` ++"Chain"++ [:material-link-variant:](./reference/xcm.md#the-chain-object) - The chain the routes are for
+- `routes` ++"MrlAssetRoute[]"++ [:material-link-variant:](#the-mrl-asset-route-object) - The list of asset routes for the chain
+
+Chain routes are defined in the [MRL Config](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/mrl-configs/){target=\_blank} files.
+
+---
+
+## Transfer Data
+
+In the process of transferring the assets, you must get the transfer data first and then use it to transfer the assets.
+
+### The Transfer Data Object
+
+
+
+
+Defines the complete transfer data for transferring an asset, including asset balances, source and destination chain information, and a new concept exlusive to MRL which is the [moon chain](#the-moon-chain)
+
+**Attributes**
+
+- `source` ++"SourceTransferData"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/mrl/src/mrl.interfaces.ts) - The assembled source chain and address information
+- `destination` ++"DestinationTransferData"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/mrl/src/mrl.interfaces.ts) - The assembled destination chain and address information
+- `moonChain` ++"MoonChainTransferData"++ [:material-link-variant:](#the-moon-chain) - The assembled moon chain and address information
+- `getEstimate` ++"function"++ - Gets the estimated amount of the asset that the destination address will receive
+- `isAutomaticPossible` ++"boolean"++ - Returns whether or not the automatic transfer is possible
+- `max` ++"AssetAmount"++ [:material-link-variant:](xcm.md#the-asset-amount-object) - The maximum amount of the asset that _can_ be transferred
+- `min` ++"AssetAmount"++ [:material-link-variant:](xcm.md#the-asset-amount-object) - The minimum amount of the asset that _can_ be transferred
+- `transfer` ++"function"++ [:material-link-variant:](./#the-transfer-method) - Transfers a given amount of the asset from the source chain to the destination chain
+
+
+
+
+
+```js title="Example"
+// USDC from Ethereum to Hydration
+{
+ destination: {
+ chain: _Parachain {
+ assets: Map(7) {
+ "hdx": [Object...],
+ "glmr": [Object...],
+ "dai": [Object...],
+ "usdcwh": [Object...],
+ "usdtwh": [Object...],
+ "wbtc": [Object...],
+ "weth": [Object...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://hydradx.subscan.io",
+ isTestChain: false,
+ key: "hydration",
+ name: "Hydration",
+ wh: undefined,
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xafdc188f45c71dacbaa0b62e16a91f726c7b8699a9748cdf715459de6b7f366d",
+ isRelay: false,
+ parachainId: 2034,
+ ss58Format: 63,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: ["wss://rpc.hydradx.cloud", "wss://rpc.helikon.io/hydradx", "wss://hydradx.paras.dotters.network",
+ "wss://hydradx-rpc.dwellir.com"
+ ],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ balance: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object...],
+ min: undefined,
+ symbol: undefined,
+ amount: 8271697n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "hdx",
+ originSymbol: "HDX",
+ address: undefined,
+ decimals: 12,
+ ids: [Object...],
+ min: undefined,
+ symbol: undefined,
+ amount: 1000000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object...],
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: [Object...],
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ sovereignAccountBalances: undefined,
+ },
+ getEstimate: [Function: getEstimate],
+ isAutomaticPossible: false,
+ max: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ moonChain: {
+ address: "0x98891e5FD24Ef33A488A47101F65D212Ff6E650E",
+ balance: _AssetAmount {
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: "0x931715FEE2d06333043d11F658C8CE934aC61D0c",
+ decimals: 6,
+ ids: [Object...],
+ min: undefined,
+ symbol: undefined,
+ amount: 2081768n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 206735189943789999813n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _EvmParachain {
+ assets: Map(45) {
+ "aca": [Object...],
+ "astr": [Object...],
+ "aseed": [Object...],
+ "axlusdc": [Object...],
+ "bnc": [Object...],
+ "bncs": [Object...],
+ "cfg": [Object...],
+ "dai": [Object...],
+ "ded": [Object...],
+ "dot": [Object...],
+ "eq": [Object...],
+ "eqd": [Object...],
+ "fil": [Object...],
+ "glmr": [Object...],
+ "hdx": [Object...],
+ "ibtc": [Object...],
+ "intr": [Object...],
+ "ldot": [Object...],
+ "manta": [Object...],
+ "nodl": [Object...],
+ "neuro": [Object...],
+ "peaq": [Object...],
+ "pha": [Object...],
+ "pen": [Object...],
+ "ring": [Object...],
+ "sub": [Object...],
+ "usdc": [Object...],
+ "usdcwh": [Object...],
+ "usdtwh": [Object...],
+ "usdt": [Object...],
+ "vastr": [Object...],
+ "vdot": [Object...],
+ "vfil": [Object...],
+ "vglmr": [Object...],
+ "vmanta": [Object...],
+ "wbtc": [Object...],
+ "weth": [Object...],
+ "ztg": [Object...],
+ "pink": [Object...],
+ "stink": [Object...],
+ "apillon": [Object...],
+ "wifd": [Object...],
+ "wbtce": [Object...],
+ "wethe": [Object...],
+ "wstethe": [Object...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://moonbeam.moonscan.io",
+ isTestChain: false,
+ key: "moonbeam",
+ name: "Moonbeam",
+ wh: [Object...],
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d",
+ isRelay: false,
+ parachainId: 2004,
+ ss58Format: 1284,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: ["wss://wss.api.moonbeam.network"],
+ id: 1284,
+ rpc: "https://rpc.api.moonbeam.network",
+ isEvmSigner: true,
+ contracts: undefined,
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ fee: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 150000000000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ source: {
+ balance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _EvmChain {
+ assets: Map(7) {
+ "eth": [Object...],
+ "usdc": [Object...],
+ "usdt": [Object...],
+ "dai": [Object...],
+ "wbtc": [Object...],
+ "glmr": [Object...],
+ "peaq": [Object...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://etherscan.io",
+ isTestChain: false,
+ key: "ethereum",
+ name: "Ethereum",
+ wh: [Object...],
+ id: 1,
+ rpc: "https://ethereum-rpc.publicnode.com",
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ destinationFee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 4000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ destinationFeeBalance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ moonChainFeeBalance: undefined,
+ existentialDeposit: undefined,
+ fee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ max: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 3328424n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ relayerFee: _AssetAmount {
+ key: "usdc",
+ originSymbol: "USDC",
+ address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ decimals: 6,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ transfer: [AsyncFunction: transfer],
+}
+```
+
+
+
+---
+
+### The Moon Chain
+
+We call Moon Chain to the intermediary chain that is used to transfer the assets between the Polkadot ecosystem and the external chains. For `Mainnet` Moonbeam is the moon chain, and for `Testnet` it is `Moonbase Alpha`.
+
+- In [EVM to parachain cases](#from-evm-chains-to-parachains) the moon chain triggers the XCM transfer to the destination chain, and in the [transfer data](#transfer-data-object) it contains the information of the sender's address in the moon chain.
+- In [parachain to EVM cases](#from-parachains-to-evm-chains) the moon chain receives the XCM message and executes the remote execution message, and in the [transfer data](#transfer-data-object) it contains the information of the computed origin account.
+- In [Moon Chain to EVM cases](#from-moonchain-to-evm-chains) is either the source or the destination of the transfer, and in the [transfer data](#transfer-data-object) it contains the information of the sender's address.
+
+---
+
+### The Transfer Method
+
+
+
+
+
+**Parameters**
+
+- `amount` ++"bigint | number | string"++ - The amount of the asset to transfer
+- `isAutomatic` ++"boolean"++ - Whether or not the transfer should be automatic
+- `signers` ++"Signers"++ - The signers of the transaction
+- `statusCallback` ++"function"++ (optional) - Comes from the polkadot api. A callback function that can be passed to the signAndSend method, and will be called with the status of the transaction. Only applicable for polkadot signers, when the source chain is a parachain.
+- `sendOnlyRemoteExecution` ++"boolean"++ (optional) - When this flag is set to true, instead of sending a transfer assets message plus a remote execution message from the parachain to the moon chain, only the remote execution message is sent. Applicable only when the source chain is a parachain. This is useful when some assets are stuck in the moon chain in the [computed origin account](https://docs.moonbeam.network/builders/interoperability/mrl/#calculate-computed-origin-account){target=\_blank} of the sender, in which case sending the assets would not be necessary from the source chain.
+
+
+
+
+```js title="Example Usage"
+import { Mrl } from '@moonbeam-network/mrl';
+import { ethereum, hydration, usdcwh } from '@moonbeam-network/xcm-config';
+import type { ISubmittableResult } from '@polkadot/types/types';
+
+const isAutomatic = false;
+
+const transferData = await Mrl()
+ .setSource(hydration)
+ .setDestination(ethereum)
+ .setAsset(usdcwh)
+ .setIsAutomatic(isAutomatic)
+ .setAddresses({
+ sourceAddress: 'INSERT_POLKADOT_ADDRESS', // pair.address,
+ destinationAddress: 'INSERT_ETHEREUM_ADDRESS', // account.address,
+ });
+
+const statusCallback = ({ status }: ISubmittableResult) => {
+ if (status.isInBlock) {
+ console.log(
+ `Transaction sent, do something with the hash ${status.hash.toHex()}`,
+ );
+ }
+};
+
+await transferData.transfer(
+ 0.1,
+ isAutomatic,
+ {
+ polkadotSigner: INSERT_POLKADOT_SIGNER, // pair
+ },
+ statusCallback,
+);
+
+```
+
+
+
+
+
+### The Relayer Fee
+
+This is a concept that is not present in XCM, it represents the fee that the relayer charges for executing the transfer automatically. Note that if the transfer is not automatic, the relayer fee will be 0.
+
+In the [transfer data](#transfer-data-object) you can find the relayer fee in the `relayerFee` attribute in the `source` object, and it is represented as an [Asset Amount](./xcm.md#the-asset-amount-object) object.
+
+## Execute Transfer Data
+
+Apart from transferring the assets, the MRL SDK also provides a way to execute the transfer in the destination chain. This is useful when the transfer needs to be completed manually.
+
+Similar to the [transfer data](#transfer-data), first you need to get the execute transfer data, and then you can execute the transfer.
+
+### The Execute Transfer Data Object
+
+Defines the data needed to execute the transfer in the destination chain. Usually it is related to the bridge you're using to transfer the assets. Currently, the only bridge supported is Wormhole.
+
+**Attributes**
+
+- `vaa` ++"VAA"++ - The [VAA](https://wormhole.com/docs/learn/infrastructure/vaas/) of the transfer. Related to Wormhole
+- `tokenTransfer` ++"TokenTransfer"++ - The token transfer of the transfer. Related to Wormhole
+- `executeTransfer` ++"function"++ [:material-link-variant:](#the-execute-transfer-method) - The function to execute the transfer
+
+
+### The Execute Transfer Method
+
+
+
+
+**Parameters**
+
+- `signer` ++"EvmSigner"++ - The signer to use to execute the transfer
+
+
+
+```js title="Example Usage"
+ const data = await Mrl().getExecuteTransferData({
+ txId: INSERT_TX_HASH_TO_BE_EXECUTED,
+ chain: INSERT_DESTINATION_CHAIN,
+ });
+
+ await data.executeTransfer(INSERT_SIGNER_OR_WALLET_CLIENT);
+```
+
+
+
+## The MRL Method
+
+
+
+
+This is the main method that you'll use to build the transfer data, and the execute transfer data. It contains a series of chained methods that you'll use to set the information about the transfer.
+
+**Methods**
+
+- `Mrl()` [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/mrl/src/mrl.ts#L10){:target="_blank"} - Initializes the MRL, returns all the sources supported by a given ecosystem
+- `setSource()` - Sets the source chain of the transfer, returns all the available destinations for this source chain
+- `setDestination()` - Sets the destination chain of the transfer, returns all the available assets for this source and destination chain
+- `setAsset()` - Sets the asset to be transferred
+- `setIsAutomatic()` - Sets whether the transfer is going to be completed automatically
+- `setAddresses()` - Sets the addresses for the transfer, returns the [transfer data](#the-transfer-data-object)
+- `transfer()` [:material-link-variant:](#the-transfer-method) - Transfers the assets
+- `executeTransfer()` [:material-link-variant:](#the-execute-transfer-method) - Executes the transfer
+- `getExecuteTransferData()` [:material-link-variant:](#the-get-execute-transfer-data-method) - Returns the [execute transfer data](#the-execute-transfer-data-object)
+
+
+
+
+```js title="Example Usage"
+const transferData = await Mrl()
+ .setSource(INSERT_SOURCE_CHAIN)
+ .setDestination(INSERT_DESTINATION_CHAIN)
+ .setAsset(INSERT_ASSET)
+ .setIsAutomatic(INSERT_IS_AUTOMATIC)
+ .setAddresses({
+ sourceAddress: INSERT_SOURCE_ADDRESS,
+ destinationAddress: INSERT_DESTINATION_ADDRESS,
+ });
+```
+
+
+### The Get Execute Transfer Data Method
+
+
+
+
+**Parameters**
+
+- `txId` ++"string"++ - The transaction hash to be executed. This is the transaction hash of the bridge between the EVM chain and the Moon Chain
+- `chain` ++"EvmChain | EvmParachain"++ - The chain to execute the transfer on
+
+
+
+```js title="Example Usage"
+const data = await Mrl().getExecuteTransferData({
+ txId: INSERT_TX_HASH_TO_BE_EXECUTED,
+ chain: INSERT_DESTINATION_CHAIN,
+});
+```
+
\ No newline at end of file
diff --git a/mkdocs/docs/reference/xcm.md b/mkdocs/docs/reference/xcm.md
new file mode 100644
index 00000000..6f4f6a96
--- /dev/null
+++ b/mkdocs/docs/reference/xcm.md
@@ -0,0 +1,902 @@
+---
+title: XCM SDK Reference - v3
+description: A reference for the types and classes in the Moonbeam XCM SDK that can be used to send XCM transfers between chains within the Polkadot/Kusama ecosystems.
+---
+
+# Moonbeam XCM SDK Reference
+
+The XCM SDK is based on defining an asset to transfer, then the source chain to send the asset from, and the destination chain to send the asset to, which, together, build the transfer data.
+
+The following sections cover the most important types, interfaces and classes you'll encounter when working with assets, chains, and transfer data.
+
+---
+
+## Assets
+
+### The [Asset](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/asset/Asset.ts){target=\_blank} Object
+Defines an asset's key and symbol used on the asset's origin chain.
+
+**Attributes**
+
+- `key` ++"string"++ - Identifies an asset
+- `originSymbol` ++"string"++ - The symbol of the asset on the asset's origin chain
+
+---
+
+### The [Chain Asset](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/asset/ChainAsset.ts){target=\_blank} Object
+It extends the `Asset` object and adds properties related to the asset information in a specific chain.
+
+**Attributes**
+
+- `address` ++"string"++ - The address of the asset on the chain
+- `decimals` ++"number"++ - The number of decimals the asset has
+- `ids` ++"ChainAssetIds"++ - Different identifiers of the asset on the chain for getting balances and other information
+- `min` ++"bigint"++ - The minimum amount of the asset that can be transferred
+- `symbol` ++"string"++ - The symbol of the asset in the chain, if different from the origin symbol
+
+It contains methods to get the different asset's ids in the chain, and some utility methods, among which:
+
+- `fromAsset` - Creates a new `ChainAsset` object using an `Asset` object as a base
+- `copyWith` - Creates a new `ChainAsset` object copy, with the specified properties
+
+---
+
+### The [Asset Amount](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/asset/AssetAmount.ts){target=\_blank} Object
+
+It's the Chain Asset object with an amount.
+
+
+
+**Attributes**
+
+- `amount` ++"bigint"++ - The amount of the asset
+
+It contains methods for converting the amount to different formats, comparing amounts, and more. Some of the most important methods are:
+
+- `isSame` - Checks if the asset in question is the same as another asset, without considering the amount
+- `isEqual` - Checks if the asset in question is the same as another asset, and also the amount is the same
+- `copyWith` - Creates a new `AssetAmount` object copy, with the specified properties
+
+It also leverages the [asset utility methods](#asset-utility-methods) using the properties of the `AssetAmount` object.
+
+
+
+```js title="Example"
+// The Asset Amount object
+// USDC.Wh
+{
+ key: "usdcwh",
+ originSymbol: "USDC.Wh",
+ address: undefined,
+ decimals: 6,
+ ids: {
+ id: 21,
+ },
+ min: undefined,
+ symbol: undefined,
+ amount: 8261697n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+}
+```
+
+
+
+---
+
+## Chains
+
+### The [Chain](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/chain/Chain.ts){target=\_blank} Object
+It is the base object for all chains. Contains the information that is relevant to all types of chains.
+
+**Attributes**
+
+- `assets` ++"Map"++ [:material-link-variant:](#the-chain-asset-object) - A map of all assets in the chain
+- `ecosystem` ++"Ecosystem"++ - The ecosystem the chain belongs to
+- `explorer` ++"string"++ - The explorer URL for the chain
+- `isTestChain` ++"boolean"++ - Whether the chain is a test chain
+- `key` ++"string"++ - The key of the chain
+- `name` ++"string"++ - The name of the chain
+- `nativeAsset` ++"Asset"++ - The native asset of the chain
+- `wh` ++"WormholeConfig"++ - The Wormhole configuration for the chain (for [MRL](./mrl.md){target=\_blank} only)
+
+It has some methods that are useful for getting information about the chain or comparing chains. One method worth mentioning is:
+
+- `getChainAsset` - Returns the [Chain Asset](./#the-chain-asset-object) for the chain for a given asset key, [Asset](./#the-asset-object) or [Asset Amount](./#the-asset-amount-object)
+
+---
+
+### The [Parachain](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/chain/parachain/Parachain.ts){target=\_blank} Object
+It contains information exclusive to chains in the Polkadot Ecosystem
+
+**Example**: Hydration
+
+**Attributes**
+
+- `parachainId` ++"number"++ - The parachain Id in the Polkadot ecosystem
+- `ss58Format` ++"number"++ - The SS58 format of the chain
+- `genesisHash` ++"string"++ - The genesis hash of the chain
+- `isRelay` ++"boolean"++ - Whether the chain is a relay chain
+- `weight` ++"number"++ - The weight of the chain
+- `ws` ++"string"++ - The WebSocket URL
+- `checkSovereignAccountBalances` ++"boolean"++ - Indicates whether a check of the sovereign account balances for the asset is required when transferring to this chain. If true, a validation is made at the moment of the transfer. Defaults to `false`.
+- `usesChainDecimals` ++"boolean"++ - Used for chains that use the chain's own decimal number for some balances calculations. This case is uncommon.
+
+The [EVM Parachain](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/chain/parachain/EvmParachain.ts){target=\_blank} object is similar to the [Parachain](./#the-parachain-object) object, but it contains additional properties for EVM chains.
+
+---
+
+### The [EVM Parachain](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/chain/parachain/EvmParachain.ts){target=\_blank} Object
+These are parachains that use EVM signers or Ethereum type addresses.
+
+**Example**: Moonbeam
+
+**Attributes**
+
+- `id` ++"number"++ - The chain Id in the Ethereum ecosystem
+- `rpc` ++"string"++ - The RPC URL
+- `isEvmSigner` ++"boolean"++ - Whether the chain uses an EVM signer
+- `contracts` ++"Contracts"++ - Some contract addresses for the chain, used for building the transactions
+
+---
+
+### The [EVM Chain](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/types/src/chain/EvmChain.ts){target=\_blank} Object
+It contains information exclusive to chains in the Ethereum Ecosystem. This type of chain is used for the [MRL](./mrl.md){target=\_blank} module
+
+**Example**: Ethereum
+
+**Attributes**
+
+- `id` ++"number"++ - The chain Id in the Ethereum ecosystem
+- `rpc` ++"string"++ - The RPC URL
+
+---
+
+## XCM Routes
+
+These objects define the routes for transferring assets between chains. For a more detailed explanation on how to implement them, refer to the [Contribute Section](../contribute/xcm.md#configure-a-chain-route){target=\_blank}.
+
+
+
+
+### The [Asset Route](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/types/AssetRoute.ts){target=\_blank} Object
+
+An `AssetRoute` object contains the information for a route between an asset and a chain. It contains the configuration necessary for getting the transfer data of that specific asset on that chain, and in the chain that serves as the destination.
+
+It includes builders for the queries to get the balances, fees, which asset is used for fees when transferring, the contract calls, the extrinsics and any other configuration necessary for completing the transfer.
+
+**Attributes**
+
+- `source` ++"SourceConfig"++ - Contains the information about the transfer regarding the source chain
+- `destination` ++"DestinationConfig"++ - Contains the information about the transfer regarding the destination chain
+- `contract` ++"ContractConfigBuilder"++ - Contains the builder for the contract call for the transfer, in case the transfer is done through a contract, like in [EVM Parachains](./#the-evm-parachain-object)
+- `extrinsic` ++"ExtrinsicConfigBuilder"++ - Contains the builder for the extrinsic call for the transfer, in case the transfer is done through an extrinsic, like in [Parachains](./#the-parachain-object)
+
+
+
+```js title="Example"
+// Asset route for DOT from Polkadot to Moonbeam
+{
+ source: {
+ asset: dot,
+ balance: BalanceBuilder().substrate().system().account(),
+ fee: {
+ asset: dot,
+ balance: BalanceBuilder().substrate().system().account(),
+ extra: 0.047,
+ },
+ destinationFee: {
+ balance: BalanceBuilder().substrate().system().account(),
+ },
+ },
+ destination: {
+ asset: dot,
+ chain: moonbeam,
+ balance: BalanceBuilder().substrate().assets().account(),
+ fee: {
+ amount: FeeBuilder()
+ .xcmPaymentApi()
+ .xcmPaymentFee({ isAssetReserveChain: false }),
+ asset: dot,
+ },
+ },
+ extrinsic: ExtrinsicBuilder()
+ .xcmPallet()
+ .transferAssetsUsingTypeAndThen()
+ .here(),
+},
+```
+
+
+
+---
+
+### The [Chain Routes](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/types/ChainRoutes.ts){target=\_blank} Object
+
+It represents a list of [Asset Routes](./#the-asset-route-object) for a given chain.
+
+**Attributes**
+
+- `chain` ++"Chain"++ [:material-link-variant:](#the-chain-object) - The chain the routes are for
+- `routes` ++"AssetRoute[]"++ [:material-link-variant:](#the-asset-route-object) - The list of asset routes for the chain
+
+Chain routes are defined in the [XCM Config](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/config/src/xcm-configs){target=\_blank} files.
+
+---
+
+## Transfer Data
+
+In the process of transferring the assets, you must get the transfer data first and then use it to transfer the assets.
+
+### The Transfer Data Object
+
+
+
+Defines the complete transfer data for transferring an asset, including asset, source chain, and destination chain information, as well as a few helper functions for the transfer process.
+
+**Attributes**
+
+- `source` ++"SourceChainTransferData"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/sdk/src/sdk.interfaces.ts){target=\_blank} - Contains all the information about the source chain and the balances of the asset to transfer and the asset used for fees.
+- `destination` ++"DestinationChainTransferData"++ [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/sdk/src/sdk.interfaces.ts){target=\_blank} - Contains all the information about the destination chain and the balances of the asset to transfer and the asset used for fees.
+- `getEstimate` ++"function"++ - Returns the estimated amount of the asset to transfer to the destination chain
+- `max` ++"AssetAmount"++ - The maximum amount of the asset that can be transferred
+- `min` ++"AssetAmount"++ - The minimum amount of the asset that can be transferred
+- `transfer` ++"function"++ [:material-link-variant:](#the-transfer-method) - The function to transfer the asset to the destination chain
+
+
+
+```js title="Example"
+// Send DOT from Polkadot to Moonbeam
+// transfer data
+{
+ destination: {
+ chain: _EvmParachain {
+ assets: Map(45) {
+ "aca": [Object ...],
+ "astr": [Object ...],
+ "aseed": [Object ...],
+ "axlusdc": [Object ...],
+ "bnc": [Object ...],
+ "bncs": [Object ...],
+ "cfg": [Object ...],
+ "dai": [Object ...],
+ "ded": [Object ...],
+ "dot": [Object ...],
+ "eq": [Object ...],
+ "eqd": [Object ...],
+ "fil": [Object ...],
+ "glmr": [Object ...],
+ "hdx": [Object ...],
+ "ibtc": [Object ...],
+ "intr": [Object ...],
+ "ldot": [Object ...],
+ "manta": [Object ...],
+ "nodl": [Object ...],
+ "neuro": [Object ...],
+ "peaq": [Object ...],
+ "pha": [Object ...],
+ "pen": [Object ...],
+ "ring": [Object ...],
+ "sub": [Object ...],
+ "usdc": [Object ...],
+ "usdcwh": [Object ...],
+ "usdtwh": [Object ...],
+ "usdt": [Object ...],
+ "vastr": [Object ...],
+ "vdot": [Object ...],
+ "vfil": [Object ...],
+ "vglmr": [Object ...],
+ "vmanta": [Object ...],
+ "wbtc": [Object ...],
+ "weth": [Object ...],
+ "ztg": [Object ...],
+ "pink": [Object ...],
+ "stink": [Object ...],
+ "apillon": [Object ...],
+ "wifd": [Object ...],
+ "wbtce": [Object ...],
+ "wethe": [Object ...],
+ "wstethe": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: "https://moonbeam.moonscan.io",
+ isTestChain: false,
+ key: "moonbeam",
+ name: "Moonbeam",
+ wh: [Object ...],
+ checkSovereignAccountBalances: false,
+ genesisHash: "0xfe58ea77779b7abda7da4ec526d14db9b1e9cd40a217c34892af80a9b332b76d",
+ isRelay: false,
+ parachainId: 2004,
+ ss58Format: 1284,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://wss.api.moonbeam.network" ],
+ id: 1284,
+ rpc: "https://rpc.api.moonbeam.network",
+ isEvmSigner: true,
+ contracts: undefined,
+ getViemChain: [Function: getViemChain],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ balance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 17683227925n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "glmr",
+ originSymbol: "GLMR",
+ address: "0x0000000000000000000000000000000000000802",
+ decimals: 18,
+ ids: [Object ...],
+ min: 100000000000000000n,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: [Object ...],
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ sovereignAccountBalances: undefined,
+ },
+ getEstimate: [Function: getEstimate],
+ max: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 18514479903n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080",
+ decimals: 10,
+ ids: {
+ id: "42259045809535163221576417993425387648",
+ },
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ source: {
+ balance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ chain: _Parachain {
+ assets: Map(1) {
+ "dot": [Object ...],
+ },
+ ecosystem: "polkadot",
+ explorer: undefined,
+ isTestChain: false,
+ key: "polkadot",
+ name: "Polkadot",
+ wh: undefined,
+ checkSovereignAccountBalances: true,
+ genesisHash: "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
+ isRelay: true,
+ parachainId: 0,
+ ss58Format: 0,
+ usesChainDecimals: false,
+ weight: undefined,
+ ws: [ "wss://polkadot-rpc.dwellir.com", "wss://polkadot.api.onfinality.io/public-ws",
+ "wss://rpc.polkadot.io/"
+ ],
+ nativeAsset: [Getter],
+ isEqual: [Function: isEqual],
+ getChainAsset: [Function: getChainAsset],
+ getWormholeName: [Function: getWormholeName],
+ },
+ destinationFee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 84005160n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ destinationFeeBalance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ existentialDeposit: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 10000000000n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ fee: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 644912800n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ feeBalance: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 29159392703n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ max: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 18514479903n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ min: _AssetAmount {
+ key: "dot",
+ originSymbol: "DOT",
+ address: undefined,
+ decimals: 10,
+ ids: undefined,
+ min: undefined,
+ symbol: undefined,
+ amount: 0n,
+ isSame: [Function: isSame],
+ isEqual: [Function: isEqual],
+ copyWith: [Function: copyWith],
+ convertDecimals: [Function: convertDecimals],
+ toBig: [Function: toBig],
+ toBigDecimal: [Function: toBigDecimal],
+ toDecimal: [Function: toDecimal],
+ getSymbol: [Function: getSymbol],
+ getAssetId: [Function: getAssetId],
+ getBalanceAssetId: [Function: getBalanceAssetId],
+ getMinAssetId: [Function: getMinAssetId],
+ getAssetPalletInstance: [Function: getAssetPalletInstance],
+ getAssetMin: [Function: getAssetMin],
+ hasOnlyAddress: [Function: hasOnlyAddress],
+ },
+ },
+ transfer: [AsyncFunction: transfer],
+}
+```
+
+
+
+---
+
+### The Transfer Method
+
+
+
+
+`transfer()` - This is the method that actually sends the asset to the destination chain. To use it, you must first [build the transfer data](../example-usage/xcm.md#build-xcm-transfer-data) with the [Sdk method](#the-sdk-method).
+
+**Parameters**
+
+- `amount` ++"number | string | bigint"++ - The amount of the asset to transfer
+- `signers` ++"Signers"++ - The signers to use for the transfer
+
+**Returns**
+
+- `Promise` - The transaction hash of the transfer on the source chain
+
+
+
+```js title="Example Usage"
+const data = await Sdk()
+ .setAsset(INSERT_ASSET)
+ .setSource(INSERT_SOURCE_CHAIN)
+ .setDestination(INSERT_DESTINATION_CHAIN)
+ .setAddresses({
+ sourceAddress: INSERT_SOURCE_ADDRESS,
+ destinationAddress: INSERT_DESTINATION_ADDRESS,
+ });
+
+const txHash = await data.transfer(INSERT_AMOUNT, {
+ polkadotSigner: INSERT_POLKADOT_SIGNER,
+ evmSigner: INSERT_EVM_SIGNER_OR_WALLET_CLIENT,
+});
+```
+
+
+---
+
+## The SDK Method
+
+
+
+
+This is the main method that you'll use to build the transfer data. It contains a series of chained methods that you'll use to set the information about the transfer.
+
+**Methods**
+
+- `Sdk()` [:material-link-variant:](https://github.com/moonbeam-foundation/xcm-sdk/blob/main/packages/sdk/src/sdk.ts#L10){:target="_blank"} - Initializes the SDK, returns all the assets supported by a given ecosystem
+- `setAsset()` - Sets the asset to be transferred, returns all the available sources for the asset
+- `setSource()` - Sets the source chain to transfer the asset from, returns all the available destinations for the asset from the source chain
+- `setDestination()` - Sets the destination chain to transfer the asset to
+- `setAddresses()` - Sets the addresses for the transfer, returns the transfer data
+
+
+
+```js title="Example Usage"
+const data = await Sdk()
+ .setAsset(INSERT_ASSET)
+ .setSource(INSERT_SOURCE_CHAIN)
+ .setDestination(INSERT_DESTINATION_CHAIN)
+ .setAddresses({
+ sourceAddress: INSERT_SOURCE_ADDRESS,
+ destinationAddress: INSERT_DESTINATION_ADDRESS,
+ });
+
+```
+
+
+---
+
+## Asset Utility Methods
+
+### The To Decimal Method
+
+
+
+
+`toDecimal()` - Converts an asset amount to a decimal string. Useful for handling amounts in Wei and presenting them in a more readable format.
+
+**Parameters**
+
+- `number` ++"bigint | number | string"++ - The amount to convert to decimal format
+- `decimals` ++"number"++ - The number of decimals the asset uses
+- `maxDecimal` ++"number"++ - The maximum number of decimals to display in the string, defaults to `6`
+- `roundType` ++"RoundingMode"++ - The [rounding mode](https://mikemcl.github.io/big.js/#rm){target=\_blank} to use, defaults to `Big.roundDown`
+
+**Returns**
+
+- `string` - The amount in decimal format
+
+
+
+
+```js title="Example Usage"
+import { toDecimal } from '@moonbeam-network/xcm-utils';
+
+const amount = 1000000000000000000n;
+const decimals = 18;
+const symbol = 'GLMR';
+
+const decimalValue = toDecimal(amount, decimals);
+
+console.log(`${decimalValue} ${symbol}`);
+```
+
+```js title="Response"
+1 GLMR
+```
+
+
+
+
+---
+
+### The To Big Int Method
+
+
+
+
+`toBigInt()` - Converts an asset amount to a bigint. Useful for transforming all the amounts to the same format to perform operations.
+
+**Parameters**
+
+- `number` ++"bigint | number | string"++ - The amount to convert to bigint format
+- `decimals` ++"number"++ - The number of decimals the asset uses
+
+**Returns**
+
+- `bigint` - The amount in bigint format
+
+
+
+
+```js title="Example Usage"
+import { toBigInt } from '@moonbeam-network/xcm-utils';
+
+const amount = '1';
+const decimals = 18;
+
+const bigintValue = toBigInt(amount, decimals);
+
+console.log(bigintValue);
+```
+
+```js title="Response"
+1000000000000000000n
+```
+
+
+
+
+---
+
+### The Convert Decimals Method
+
+
+
+
+`convertDecimals()` - Converts an asset amount to a different number of decimals. Useful when chains have different decimals for the same asset, for example when [usesChainDecimals](../reference/xcm.md#the-parachain-object) is set to `true` in a chain.
+
+**Parameters**
+
+- `number` ++"bigint | string"++ - The amount to convert to decimal format
+- `decimals` ++"number"++ - The number of decimals the asset uses
+- `targetDecimals` ++"number"++ - The number of decimals to convert the amount to
+
+**Returns**
+
+- `bigint` - The amount in bigint format
+
+
+
+
+```js title="Example Usage"
+import { convertDecimals } from '@moonbeam-network/xcm-utils';
+
+const amount = 1000000000000000000n;
+const decimals = 18;
+const targetDecimals = 9;
+
+const convertedAmount = convertDecimals(amount, decimals, targetDecimals);
+
+console.log(convertedAmount);
+```
+
+```js title="Response"
+1000000000n
+```
+
+
+
diff --git a/mkdocs/material-overrides/assets/stylesheets/home.css b/mkdocs/material-overrides/assets/stylesheets/home.css
index e568ed0a..8f9a9fdf 100644
--- a/mkdocs/material-overrides/assets/stylesheets/home.css
+++ b/mkdocs/material-overrides/assets/stylesheets/home.css
@@ -36,11 +36,12 @@
.hero h1 {
font-size: 36px;
color: var(--md-default-fg-color);
+ margin-bottom: 20px;
}
.hero p {
font-size: 18px;
- margin-top: 20px;
+ margin-bottom: 0;
}
.md-typeset .hero-content hr {
@@ -61,6 +62,8 @@
}
.feature {
+ display: flex;
+ flex-direction: column;
text-align: center;
padding: 20px;
box-shadow: 0px 0px 1px var(--md-default-fg-color);
@@ -74,6 +77,7 @@
}
.feature img {
+ align-self: center;
width: 60px;
max-width: 100%;
height: auto;
@@ -108,6 +112,7 @@
}
.md-typeset pre {
+ height: 5em;
margin: 0;
}
@@ -134,3 +139,21 @@
width: 100%;
}
}
+
+.button-container {
+ display: flex;
+ justify-content: center;
+ gap: 10px;
+ margin-top: auto;
+}
+
+.button {
+ display: inline-block;
+ padding: 10px 20px;
+ border: 0.1px solid rgb(54, 53, 53);
+ color: var(--md-default-fg-color) !important;
+ text-decoration: none;
+ border-radius: 5px;
+ transition: background-color 0.3s ease;
+ font-size: 12px;
+}
diff --git a/mkdocs/material-overrides/home.html b/mkdocs/material-overrides/home.html
index 27538579..b581c47d 100644
--- a/mkdocs/material-overrides/home.html
+++ b/mkdocs/material-overrides/home.html
@@ -23,27 +23,48 @@ Documentation for the XCM SDK
+ Introducing the MRL package documentation, which allows you to move liquidity between chains in the Polkadot
+ ecosystem and external chains.
+
+
+
+ npm install @moonbeam-foundation/mrl
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/packages/config/src/types/AssetRoute.ts b/packages/config/src/types/AssetRoute.ts
index 34574411..e63896a0 100644
--- a/packages/config/src/types/AssetRoute.ts
+++ b/packages/config/src/types/AssetRoute.ts
@@ -4,7 +4,6 @@ import type {
ContractConfigBuilder,
ExtrinsicConfigBuilder,
FeeConfigBuilder,
- MrlConfigBuilder,
} from '@moonbeam-network/xcm-builder';
import type {
AnyChain,
@@ -18,7 +17,6 @@ export interface AssetRouteConstructorParams {
destination: DestinationConfig;
contract?: ContractConfigBuilder;
extrinsic?: ExtrinsicConfigBuilder;
- mrl?: MrlConfig;
}
export interface SourceConfig {
@@ -45,27 +43,11 @@ export interface FeeConfig {
extra?: number;
}
-export interface MrlConfig {
- isAutomaticPossible: boolean;
- transfer: MrlConfigBuilder;
- moonChain: MoonChainConfig;
-}
-
export interface DestinationFeeConfig
extends SetOptional {
amount: number | FeeConfigBuilder;
}
-export interface MoonChainConfig {
- asset: Asset;
- balance: BalanceConfigBuilder;
- fee: MoonChainFeeConfig;
-}
-
-export interface MoonChainFeeConfig extends FeeConfig {
- amount: number | FeeConfigBuilder;
-}
-
export class AssetRoute {
readonly source: SourceConfig;
@@ -75,20 +57,16 @@ export class AssetRoute {
readonly extrinsic?: ExtrinsicConfigBuilder;
- readonly mrl?: MrlConfig;
-
constructor({
source,
destination,
contract,
extrinsic,
- mrl,
}: AssetRouteConstructorParams) {
this.source = source;
this.destination = destination;
this.contract = contract;
this.extrinsic = extrinsic;
- this.mrl = mrl;
}
getDestinationFeeAssetOnSource(): ChainAsset {
diff --git a/packages/config/src/types/ChainRoutes.ts b/packages/config/src/types/ChainRoutes.ts
index 35046e9e..732ddf30 100644
--- a/packages/config/src/types/ChainRoutes.ts
+++ b/packages/config/src/types/ChainRoutes.ts
@@ -18,26 +18,25 @@ interface RoutesParam extends Omit {
export class ChainRoutes {
readonly chain: AnyChain;
- readonly #routes: Map;
+ protected routes: Map;
constructor({ chain, routes }: ChainRoutesConstructorParams) {
this.chain = chain;
- this.#routes = new Map(
- routes.map(({ source, destination, contract, extrinsic, mrl }) => [
+ this.routes = new Map(
+ routes.map(({ source, destination, contract, extrinsic }) => [
`${source.asset.key}-${destination.chain.key}`,
new AssetRoute({
source: { ...source, chain },
destination,
contract,
extrinsic,
- mrl,
}),
]),
);
}
getRoutes(): AssetRoute[] {
- return Array.from(this.#routes.values());
+ return Array.from(this.routes.values());
}
getAssetRoutes(keyOrAsset: string | AnyAsset): AssetRoute[] {
@@ -66,7 +65,7 @@ export class ChainRoutes {
): AssetRoute {
const assetKey = getKey(asset);
const destKey = getKey(destination);
- const route = this.#routes.get(`${assetKey}-${destKey}`);
+ const route = this.routes.get(`${assetKey}-${destKey}`);
if (!route) {
throw new Error(
diff --git a/packages/config/src/types/MrlAssetRoute.ts b/packages/config/src/types/MrlAssetRoute.ts
index f23d05a0..00a42f00 100644
--- a/packages/config/src/types/MrlAssetRoute.ts
+++ b/packages/config/src/types/MrlAssetRoute.ts
@@ -1,14 +1,26 @@
-import type { BalanceConfigBuilder } from '@moonbeam-network/xcm-builder';
+import type {
+ BalanceConfigBuilder,
+ FeeConfigBuilder,
+ MrlConfigBuilder,
+} from '@moonbeam-network/xcm-builder';
import type { Asset } from '@moonbeam-network/xcm-types';
import {
AssetRoute,
type AssetRouteConstructorParams,
+ type FeeConfig,
type SourceConfig,
} from './AssetRoute';
export interface MrlAssetRouteConstructorParams
extends AssetRouteConstructorParams {
source: MrlSourceConfig;
+ mrl: MrlConfig;
+}
+
+export interface MrlConfig {
+ isAutomaticPossible: boolean;
+ transfer: MrlConfigBuilder;
+ moonChain: MoonChainConfig;
}
export interface MrlSourceConfig extends SourceConfig {
@@ -18,7 +30,18 @@ export interface MrlSourceConfig extends SourceConfig {
};
}
+export interface MoonChainConfig {
+ asset: Asset;
+ balance: BalanceConfigBuilder;
+ fee: MoonChainFeeConfig;
+}
+
+export interface MoonChainFeeConfig extends FeeConfig {
+ amount: number | FeeConfigBuilder;
+}
+
export class MrlAssetRoute extends AssetRoute {
+ readonly mrl: MrlConfig;
readonly source: MrlSourceConfig;
constructor({
@@ -28,7 +51,8 @@ export class MrlAssetRoute extends AssetRoute {
extrinsic,
mrl,
}: MrlAssetRouteConstructorParams & { source: MrlSourceConfig }) {
- super({ source, destination, contract, extrinsic, mrl });
+ super({ source, destination, contract, extrinsic });
+ this.mrl = mrl;
this.source = source;
}
}
diff --git a/packages/config/src/types/MrlChainRoutes.ts b/packages/config/src/types/MrlChainRoutes.ts
index 4aa9b88d..2b4f5431 100644
--- a/packages/config/src/types/MrlChainRoutes.ts
+++ b/packages/config/src/types/MrlChainRoutes.ts
@@ -1,3 +1,4 @@
+import type { AnyAsset, AnyChain } from '@moonbeam-network/xcm-types';
import { ChainRoutes, type ChainRoutesConstructorParams } from './ChainRoutes';
import {
MrlAssetRoute,
@@ -16,11 +17,11 @@ interface MrlRoutesParam
}
export class MrlChainRoutes extends ChainRoutes {
- readonly #routes: Map;
+ protected routes: Map;
constructor({ chain, routes }: MrlChainRoutesConstructorParams) {
super({ chain, routes });
- this.#routes = new Map(
+ this.routes = new Map(
routes.map(({ source, destination, contract, extrinsic, mrl }) => [
`${source.asset.key}-${destination.chain.key}`,
new MrlAssetRoute({
@@ -35,6 +36,16 @@ export class MrlChainRoutes extends ChainRoutes {
}
getRoutes(): MrlAssetRoute[] {
- return Array.from(this.#routes.values());
+ return Array.from(this.routes.values());
+ }
+
+ getAssetRoute(
+ asset: string | AnyAsset,
+ destination: string | AnyChain,
+ ): MrlAssetRoute {
+ const route = super.getAssetRoute(asset, destination);
+ // Since we know this class only stores MrlAssetRoute instances,
+ // we can safely cast the parent's return value
+ return route as MrlAssetRoute;
}
}
diff --git a/packages/mrl/src/getTransferData/getTransferData.utils.ts b/packages/mrl/src/getTransferData/getTransferData.utils.ts
index e6293943..9aabccf9 100644
--- a/packages/mrl/src/getTransferData/getTransferData.utils.ts
+++ b/packages/mrl/src/getTransferData/getTransferData.utils.ts
@@ -9,7 +9,7 @@ import {
type Transact,
} from '@moonbeam-network/xcm-builder';
import {
- type AssetRoute,
+ type MrlAssetRoute,
getMoonChain,
moonbaseAlpha,
moonbeam,
@@ -101,7 +101,7 @@ export interface BuildTransferParams {
destinationAddress: string;
feeAsset: AssetAmount;
isAutomatic: boolean;
- route: AssetRoute;
+ route: MrlAssetRoute;
sendOnlyRemoteExecution?: boolean;
sourceAddress: string;
}
diff --git a/packages/mrl/src/mrl.ts b/packages/mrl/src/mrl.ts
index 05341f49..9849c91f 100644
--- a/packages/mrl/src/mrl.ts
+++ b/packages/mrl/src/mrl.ts
@@ -1,4 +1,8 @@
-import { ConfigService, mrlRoutesMap } from '@moonbeam-network/xcm-config';
+import {
+ ConfigService,
+ MrlAssetRoute,
+ mrlRoutesMap,
+} from '@moonbeam-network/xcm-config';
import type {
AnyAsset,
AnyChain,
@@ -39,6 +43,11 @@ export function Mrl(options?: MrlOptions) {
source,
destination,
});
+
+ if (!(route instanceof MrlAssetRoute)) {
+ throw new Error('Route must be an MrlAssetRoute');
+ }
+
return {
setIsAutomatic(isAutomatic: boolean) {
return {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9938c80d..f89e5845 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -16,7 +16,7 @@ importers:
version: 14.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
'@polkadot/apps-config':
specifier: 0.146.1
- version: 0.146.1(@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)
+ version: 0.146.1(@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)
'@polkadot/types':
specifier: 14.3.1
version: 14.3.1
@@ -96,6 +96,9 @@ importers:
'@moonbeam-network/xcm-config':
specifier: workspace:*
version: link:../../packages/config
+ '@moonbeam-network/xcm-sdk':
+ specifier: workspace:*
+ version: link:../../packages/sdk
'@moonbeam-network/xcm-types':
specifier: workspace:*
version: link:../../packages/types
@@ -288,7 +291,7 @@ importers:
version: 14.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
'@polkadot/apps-config':
specifier: 0.146.1
- version: 0.146.1(@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)
+ version: 0.146.1(@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)
'@polkadot/util':
specifier: 13.2.3
version: 13.2.3
@@ -1214,8 +1217,8 @@ packages:
resolution: {integrity: sha512-PE6DW+8kRhbnGKn7qCF7yM6eEt/kqrY8bh1i0RZcPY9QgwXW4bZZrtMK4WssX6Z70NTEoOW6xHYIjc7gFZuz8g==}
engines: {node: '>=18'}
- '@polkadot/api-augment@15.0.2':
- resolution: {integrity: sha512-7qtfTihLKS7cT2kEsd8Y1+MJ+2n4Sl0y9BHuPhdNfKcDbGwCxIB7JzXNujww4Is4bF7w1lXcM2U0E/XwJi1BbQ==}
+ '@polkadot/api-augment@15.4.1':
+ resolution: {integrity: sha512-mq/m5eC5hzxzsYfbYoLxdqRgH3/hf60DYoVN1f8P7m798cHXE/8DjCSwgtb5QDiWfp+CifaI5O/PcgL8YNj6jw==}
engines: {node: '>=18'}
'@polkadot/api-augment@7.15.1':
@@ -1234,8 +1237,8 @@ packages:
resolution: {integrity: sha512-GZT6rTpT3HYZ/C3rLPjoX3rX3DOxNG/zgts+jKjNrCumAeZkVq5JErKIX8/3f2TVaE2Kbqniy3d1TH/AL4HBPA==}
engines: {node: '>=18'}
- '@polkadot/api-base@15.0.2':
- resolution: {integrity: sha512-5++EjpuCxzmrL2JJj511RrPK+IovuIQa8DJhyOp62VDMXPkqS/O6Df5wjYzQh/ftT1ZysftXqJAUA/LSUsH+2g==}
+ '@polkadot/api-base@15.4.1':
+ resolution: {integrity: sha512-7a0wsLPpnEDLXhPmaLds03XchCnj7oP7MbdoULVKzIjYDq0MjYasigAz0Vs/QR6O5qodZWmgS2gA+VG+Ga5OMA==}
engines: {node: '>=18'}
'@polkadot/api-base@7.15.1':
@@ -1254,8 +1257,8 @@ packages:
resolution: {integrity: sha512-PhqUEJCY54vXtIaoYqGUtJY06wHd/K0cBmBz9yCLxp8UZkLoGWhfJRTruI25Jnucf9awS5cZKYqbsoDrL09Oqg==}
engines: {node: '>=18'}
- '@polkadot/api-derive@15.0.2':
- resolution: {integrity: sha512-nD8hXZxEv2/wuhjMmVP09lTAYd8inNgrLpLGUR+7hBQeVEQQTdNatkqMKpNIOk2MO46mtUK35NepvDBK9DWZzA==}
+ '@polkadot/api-derive@15.4.1':
+ resolution: {integrity: sha512-0EFrp0kNNpDWqtuSKbNe8+V1iEz1cXAiL+G7UM0oWae/U2xpbi0zdCMeC7hstUoJS//py1vPnDo0nkVfrdhT/A==}
engines: {node: '>=18'}
'@polkadot/api-derive@7.15.1':
@@ -1274,8 +1277,8 @@ packages:
resolution: {integrity: sha512-ZBKSXEVJa1S1bnmpnA7KT/fX3sJDIJOdVD9Hp3X+G73yvXzuK5k1Mn5z9bD/AcMs/HAGcbuYU+b9+b9IByH9YQ==}
engines: {node: '>=18'}
- '@polkadot/api@15.0.2':
- resolution: {integrity: sha512-CA8Pq2Gsz2MJvpkpIVNzaBs2eJGCr0sEodAb0vTOZW/ZlIDHcBWyWq3KXE+lBMWVzYBEC4Vz6MafNgq6Bsshlw==}
+ '@polkadot/api@15.4.1':
+ resolution: {integrity: sha512-o+5WmEt38rs+Enk2XTE5Mn3Vne+gbolvca7nl+hB/VOr5cK+ZAwhMfEt/ZFXzdAQOA9ePO91FLRsS48mimZ8PA==}
engines: {node: '>=18'}
'@polkadot/api@7.15.1':
@@ -1311,6 +1314,13 @@ packages:
'@polkadot/util': 13.2.3
'@polkadot/util-crypto': 13.2.3
+ '@polkadot/keyring@13.3.1':
+ resolution: {integrity: sha512-PT3uG9MqciPyoEz/f23RRMSlht77fo1hZaA1Vbcs1Rz7h7qFC0+7jFI9Ak30EJh9V0I2YugfzqAe3NjjyDxlvw==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1
+
'@polkadot/keyring@6.11.1':
resolution: {integrity: sha512-rW8INl7pO6Dmaffd6Df1yAYCRWa2RmWQ0LGfJeA/M6seVIkI6J3opZqAd4q2Op+h9a7z4TESQGk8yggOEL+Csg==}
engines: {node: '>=14.0.0'}
@@ -1348,6 +1358,10 @@ packages:
resolution: {integrity: sha512-mG+zkXg/33AyPrkv2xBbAo3LBUwOwBn6qznBU/4jxiZPnVvCwMaxE7xHM22B5riItbNJ169FXv3wy0v6ZmkFbw==}
engines: {node: '>=18'}
+ '@polkadot/networks@13.3.1':
+ resolution: {integrity: sha512-g/0OmCMUrbbW4RQ/xajTYd2SMJvFKY4kmMvpxtNN57hWQpY7c5oDXSz57jGH2uwvcBWeDfaNokcS+9hJL1RBcA==}
+ engines: {node: '>=18'}
+
'@polkadot/networks@6.11.1':
resolution: {integrity: sha512-0C6Ha2kvr42se3Gevx6UhHzv3KnPHML0N73Amjwvdr4y0HLZ1Nfw+vcm5yqpz5gpiehqz97XqFrsPRauYdcksQ==}
engines: {node: '>=14.0.0'}
@@ -1375,8 +1389,8 @@ packages:
resolution: {integrity: sha512-Z8Hp8fFHwFCiTX0bBCDqCZ4U26wLIJl1NRSjJTsAr+SS68pYZBDGCwhKztpKGqndk1W1akRUaxrkGqYdIFmspQ==}
engines: {node: '>=18'}
- '@polkadot/rpc-augment@15.0.2':
- resolution: {integrity: sha512-of88GdzsOs15HP+Gowh4G/iKKFkCNIeF0Wes8LiONfn+j2TmWt8blbyGhrIZZeApzbFUDFjnxUPGT40uWJcMpw==}
+ '@polkadot/rpc-augment@15.4.1':
+ resolution: {integrity: sha512-DiNSSK+UFkAnF0UtVWr6HSCDio74LWjVjLsh9csAKfqy8bXzTVshl8VjZR2G9nuW9YxoJjQREN8wEcM9F+kL3Q==}
engines: {node: '>=18'}
'@polkadot/rpc-augment@7.15.1':
@@ -1395,8 +1409,8 @@ packages:
resolution: {integrity: sha512-FV2NPhFwFxmX8LqibDcGc6IKTBqmvwr7xwF2OA60Br4cX+AQzMSVpFlfQcETll+0M+LnRhqGKGkP0EQWXaSowA==}
engines: {node: '>=18'}
- '@polkadot/rpc-core@15.0.2':
- resolution: {integrity: sha512-KOUnfXOAFCN0N23sEbS+FzXhX88JCvJst/nKzO9+q67NgYBEqgcaoG4tqt/VVedgkNi0kA7WAA3wyjt5UYMnrg==}
+ '@polkadot/rpc-core@15.4.1':
+ resolution: {integrity: sha512-llAtGpKQgtmsy5+320T0Dr8Lxse77eN0NVbpWr7cQo8R5If8YM9cAMNETMtrY1S9596aaLX/GrThp5Zvt6Z5Aw==}
engines: {node: '>=18'}
'@polkadot/rpc-core@7.15.1':
@@ -1415,8 +1429,8 @@ packages:
resolution: {integrity: sha512-NF/Z/7lzT+jp5LZzC49g+YIjRzXVI0hFag3+B+4zh6E/kKADdF59EHj2Im4LDhRGOnEO9AE4H6/UjNEbZ94JtA==}
engines: {node: '>=18'}
- '@polkadot/rpc-provider@15.0.2':
- resolution: {integrity: sha512-BwLP8gNskzqtQ2kMk+EX6WK4d9TU0XJ/nJg0TKC2dX5sSTpTF2JQIYp1wuOik4rKNXIU/1hKaDSSylMJj7AHeQ==}
+ '@polkadot/rpc-provider@15.4.1':
+ resolution: {integrity: sha512-GOtU8fBczbpEa3U4nQxBvwCtYyP1fYbi6vWBnA/YiwQY6RWqMBY2Tfo9fw0MfYqZVpYvbUoaER4akTrtVvCoVA==}
engines: {node: '>=18'}
'@polkadot/rpc-provider@7.15.1':
@@ -1435,8 +1449,8 @@ packages:
resolution: {integrity: sha512-SC4M6TBlgCglNz+gRbvfoVRDz0Vyeev6v0HeAdw0H6ayEW4BXUdo5bFr0092bdS5uTrEPgiSyUry5TJs2KoXig==}
engines: {node: '>=18'}
- '@polkadot/types-augment@15.0.2':
- resolution: {integrity: sha512-UiFJVEYML30+V9GdFAHPbA3s4MVQTL1CevsZMnX0+ApvlgEHJMZnVFfYF7jL2bl9BcUYM/zoxEAhj2MpqFFfxw==}
+ '@polkadot/types-augment@15.4.1':
+ resolution: {integrity: sha512-40X4UVEHmJhNV+gYS79RY38rv3shFEGd9H8xTas91IgZtT12mRw1kH5vjLHk+nYTVAAR1ml3D3IStILAwzikgQ==}
engines: {node: '>=18'}
'@polkadot/types-augment@7.15.1':
@@ -1455,8 +1469,8 @@ packages:
resolution: {integrity: sha512-3y3RBGd+8ebscGbNUOjqUjnRE7hgicgid5LtofHK3O1EDcJQJnYBDkJ7fOAi96CDgHsg+f2FWWkBWEPgpOQoMQ==}
engines: {node: '>=18'}
- '@polkadot/types-codec@15.0.2':
- resolution: {integrity: sha512-44Q40p1rl0t7Bl1QUamewqXNVPway9xgqByyifv6ODSGhtt+lFoarb3U4JzqRUuuK0PP57ePB0L8q81Totxeew==}
+ '@polkadot/types-codec@15.4.1':
+ resolution: {integrity: sha512-LksB8JBdu8ysYWsRbE1U+cv8svUpSddalR6mg0pP0H/ngj58PWrRUWJBRw2LDw65B4Dw1AIJ0QrbigmCjCyz+A==}
engines: {node: '>=18'}
'@polkadot/types-codec@7.15.1':
@@ -1475,8 +1489,8 @@ packages:
resolution: {integrity: sha512-F4EBvF3Zvym0xrkAA5Yz01IAVMepMV3w2Dwd0C9IygEAQ5sYLLPHmf72/aXn+Ag+bSyT2wlJHpDc+nEBXNQ3Gw==}
engines: {node: '>=18'}
- '@polkadot/types-create@15.0.2':
- resolution: {integrity: sha512-YhpcqbH3oI87PkgrV6Fez9jWDqFIep0KcS1YWQcwc9gsBNnuour80t2AAK41/tqAYwOZi6tpJwIevnEhVkxFYA==}
+ '@polkadot/types-create@15.4.1':
+ resolution: {integrity: sha512-NP1YGsLdGii0FNAKeKHNxpvLZCusEugs+g21vHHmdtFLC08ngU7pNJGERteo6vDNr5JDejzVbB+i94Y9RzKC0Q==}
engines: {node: '>=18'}
'@polkadot/types-create@7.15.1':
@@ -1495,8 +1509,8 @@ packages:
resolution: {integrity: sha512-58b3Yc7+sxwNjs8axmrA9OCgnxmEKIq7XCH2VxSgLqTeqbohVtxwUSCW/l8NPrq1nxzj4J2sopu0PPg8/++q4g==}
engines: {node: '>=18'}
- '@polkadot/types-known@15.0.2':
- resolution: {integrity: sha512-SyBo4xBoesHYiEfdW/nOgaftKgM7+puBWqQXq1Euz0MM5LDLjxBw22Srgk9ulGM6l9MsekIwCyX8geJ6/6J3Cg==}
+ '@polkadot/types-known@15.4.1':
+ resolution: {integrity: sha512-LF9estF7y7sXHQ7tA9QoVzAmtkglJdcqMbj70H70V+CBZjiyAgd84PvBtQ6mcIywJ54iCyBBLbhlqcbH/zgUdw==}
engines: {node: '>=18'}
'@polkadot/types-known@4.17.1':
@@ -1523,8 +1537,8 @@ packages:
resolution: {integrity: sha512-MfVe4iIOJIfBr+gj8Lu8gwIvhnO6gDbG5LeaKAjY6vS6Oh0y5Ztr8NdMIl8ccSpoyt3LqIXjfApeGzHiLzr6bw==}
engines: {node: '>=18'}
- '@polkadot/types-support@15.0.2':
- resolution: {integrity: sha512-I7Im/4K2/XDZ1LfeQeeNyvIkfvozIPQs8K1/nsICDOmBbvIsjxSeKWHOcFDMJ8AlPEer6bqNQavOyZA/pg9R/Q==}
+ '@polkadot/types-support@15.4.1':
+ resolution: {integrity: sha512-BeMi+780cP0jb4HTwovjcNt/Yf/lgKkXGlfu/gZhLb6eu7Sz3VzAxI8z2WdMWE/NiXMEHeC0YpwOowhRS2tEVA==}
engines: {node: '>=18'}
'@polkadot/types-support@7.15.1':
@@ -1543,8 +1557,8 @@ packages:
resolution: {integrity: sha512-O748XgCLDQYxS5nQ6TJSqW88oC4QNIoNVlWZC2Qq4SmEXuSzaNHQwSVtdyPRJCCc4Oi1DCQvGui4O+EukUl7HA==}
engines: {node: '>=18'}
- '@polkadot/types@15.0.2':
- resolution: {integrity: sha512-6gZBnuXU58hQAXWI2daED2OaQwFMxbQdkE8HVGMovMobEf0PxPfIqf+GdnVmWbe09EU9mv2gCWBcdnvHSRBlQg==}
+ '@polkadot/types@15.4.1':
+ resolution: {integrity: sha512-5Oh6iwdtXg9/CN55c2IzNx90/ALK1DlP/OswN9vERp6rqZttAEGTQgSiYFHP0+7WhDB8H6v8jVutHadqv7lhMg==}
engines: {node: '>=18'}
'@polkadot/types@4.17.1':
@@ -1595,6 +1609,12 @@ packages:
peerDependencies:
'@polkadot/util': 13.2.3
+ '@polkadot/util-crypto@13.3.1':
+ resolution: {integrity: sha512-FU6yf3IY++DKlf0eqO9/obe2y1zuZ5rbqRs75fyOME/5VXio1fA3GIpW7aFphyneFRd78G8QLh8kn0oIwBGMNg==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ '@polkadot/util': 13.3.1
+
'@polkadot/util-crypto@6.11.1':
resolution: {integrity: sha512-fWA1Nz17FxWJslweZS4l0Uo30WXb5mYV1KEACVzM+BSZAvG5eoiOAYX6VYZjyw6/7u53XKrWQlD83iPsg3KvZw==}
engines: {node: '>=14.0.0'}
@@ -1619,6 +1639,10 @@ packages:
resolution: {integrity: sha512-pioNnsig3qHXrfOKMe4Yqos8B8N3/EZUpS+WfTpWnn1VjYban/0GrTXeavPlAwggnY27b8fS6rBzQBhnVYDw8g==}
engines: {node: '>=18'}
+ '@polkadot/util@13.3.1':
+ resolution: {integrity: sha512-5crLP/rUZOJzuo/W8t73J8PxpibJ5vrxY57rR6V+mIpCZd1ORiw0wxeHcV5F9Adpn7yJyuGBwxPbueNR5Rr1Zw==}
+ engines: {node: '>=18'}
+
'@polkadot/util@6.11.1':
resolution: {integrity: sha512-TEdCetr9rsdUfJZqQgX/vxLuV4XU8KMoKBMJdx+JuQ5EWemIdQkEtMBdL8k8udNGbgSNiYFA6rPppATeIxAScg==}
engines: {node: '>=14.0.0'}
@@ -1755,6 +1779,10 @@ packages:
resolution: {integrity: sha512-VKgEAh0LsxTd/Hg517Tt5ZU4CySjBwMpaojbkjgv3fOdg1cN7t4eFEUxpyj7mlO0cp22SzDh7nmy4TO98qhLQA==}
engines: {node: '>=18'}
+ '@polkadot/x-bigint@13.3.1':
+ resolution: {integrity: sha512-ewc708a7LUdrT92v9DsSAIbcJQBn3aR9/LavF/iyMOq5lZJyPXDSjAnskfMs818R3RLCrKVKfs+aKkxt2eqo8g==}
+ engines: {node: '>=18'}
+
'@polkadot/x-bigint@8.7.1':
resolution: {integrity: sha512-ClkhgdB/KqcAKk3zA6Qw8wBL6Wz67pYTPkrAtImpvoPJmR+l4RARauv+MH34JXMUNlNb3aUwqN6lq2Z1zN+mJg==}
engines: {node: '>=14.0.0'}
@@ -1771,6 +1799,10 @@ packages:
resolution: {integrity: sha512-7Nmk+8ieEGzz43nc1rX6nH3rQo6rhGmAaIXJWnXY9gOHY0k1me1bJYbP+xDdh8vcLh8eY3D1sESUwG6QYZW2lg==}
engines: {node: '>=18'}
+ '@polkadot/x-fetch@13.3.1':
+ resolution: {integrity: sha512-J+HM42j0KGqdC/eo7vmsdLPz74MR7+0My4km6TG9HGjKqqztwygtenpopPod2SbRnL4nHiEG0wZzpVOW6HN2gw==}
+ engines: {node: '>=18'}
+
'@polkadot/x-fetch@8.7.1':
resolution: {integrity: sha512-ygNparcalYFGbspXtdtZOHvNXZBkNgmNO+um9C0JYq74K5OY9/be93uyfJKJ8JcRJtOqBfVDsJpbiRkuJ1PRfg==}
engines: {node: '>=14.0.0'}
@@ -1787,6 +1819,10 @@ packages:
resolution: {integrity: sha512-7MYQIAEwBkRcNrgqac5PbB0kNPlI6ISJEy6/Nb+crj8BFjQ8rf11PF49fq0QsvDeuYM1aNLigrvYZNptQs4lbw==}
engines: {node: '>=18'}
+ '@polkadot/x-global@13.3.1':
+ resolution: {integrity: sha512-861TeIw49a3JvkwlUWrddfG+JaUqtFZDsemYxxZIjjcRJLrKOsoKNqHbiHi2OPrwlX8PwAA/wc5I9Q4XRQ7KEg==}
+ engines: {node: '>=18'}
+
'@polkadot/x-global@6.11.1':
resolution: {integrity: sha512-lsBK/e4KbjfieyRmnPs7bTiGbP/6EoCZz7rqD/voNS5qsJAaXgB9LR+ilubun9gK/TDpebyxgO+J19OBiQPIRw==}
engines: {node: '>=14.0.0'}
@@ -1813,6 +1849,13 @@ packages:
'@polkadot/util': 13.2.3
'@polkadot/wasm-util': '*'
+ '@polkadot/x-randomvalues@13.3.1':
+ resolution: {integrity: sha512-GIb0au3vIX2U/DRH0PRckM+1I4EIbU8PLX1roGJgN1MAYKWiylJTKPVoBMafMM87o8qauOevJ46uYB/qlfbiWg==}
+ engines: {node: '>=18'}
+ peerDependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-util': '*'
+
'@polkadot/x-randomvalues@6.11.1':
resolution: {integrity: sha512-2MfUfGZSOkuPt7GF5OJkPDbl4yORI64SUuKM25EGrJ22o1UyoBnPOClm9eYujLMD6BfDZRM/7bQqqoLW+NuHVw==}
engines: {node: '>=14.0.0'}
@@ -1837,6 +1880,10 @@ packages:
resolution: {integrity: sha512-i8hRXPtGknmdm3FYv6/94I52VXHJZa5sgYNw1+Hqb4Jqmq4awUjea35CKXd/+aw70Qn8Ngg31l2GoiH494fa+Q==}
engines: {node: '>=18'}
+ '@polkadot/x-textdecoder@13.3.1':
+ resolution: {integrity: sha512-g2R9O1p0ZsNDhZ3uEBZh6fQaVLlo3yFr0YNqt15v7e9lBI4APvTJ202EINlo2jB5lz/R438/BdjEA3AL+0zUtQ==}
+ engines: {node: '>=18'}
+
'@polkadot/x-textdecoder@6.11.1':
resolution: {integrity: sha512-DI1Ym2lyDSS/UhnTT2e9WutukevFZ0WGpzj4eotuG2BTHN3e21uYtYTt24SlyRNMrWJf5+TkZItmZeqs1nwAfQ==}
engines: {node: '>=14.0.0'}
@@ -1857,6 +1904,10 @@ packages:
resolution: {integrity: sha512-wJI3Bb/dC4zyBXJFm5+ZhyBXWoI5wvP8k8qX0/ZC0PQsgSAqs7LVhiofk4Wd94n0P41W5re58LrGXLyziSAshw==}
engines: {node: '>=18'}
+ '@polkadot/x-textencoder@13.3.1':
+ resolution: {integrity: sha512-DnHLUdoKDYxekfxopuUuPB+j5Mu7Jemejcduu5gz3/89GP/sYPAu0CAVbq9B+hK1yGjBBj31eA4wkAV1oktYmg==}
+ engines: {node: '>=18'}
+
'@polkadot/x-textencoder@6.11.1':
resolution: {integrity: sha512-8ipjWdEuqFo+R4Nxsc3/WW9CSEiprX4XU91a37ZyRVC4e9R1bmvClrpXmRQLVcAQyhRvG8DKOOtWbz8xM+oXKg==}
engines: {node: '>=14.0.0'}
@@ -1877,6 +1928,10 @@ packages:
resolution: {integrity: sha512-Y6MTAWgcnrnx/LkBx65X3ZyoJH5EFj3tXtflRoKg1+PLHSLuNBV7Wi5mLcE70z4e5c+4hgBbLq+8SqCqzFtSPw==}
engines: {node: '>=18'}
+ '@polkadot/x-ws@13.3.1':
+ resolution: {integrity: sha512-ytqkC7FwVs4BlzNFAmPMFp+xD1KIdMMP/mvCSOrnxjlsyM5DVGop4x4c2ZgDUBmrFqmIiVkWDfMIZeOxui2OLQ==}
+ engines: {node: '>=18'}
+
'@polkadot/x-ws@8.7.1':
resolution: {integrity: sha512-Mt0tcNzGXyKnN3DQ06alkv+JLtTfXWu6zSypFrrKHSQe3u79xMQ1nSicmpT3gWLhIa8YF+8CYJXMrqaXgCnDhw==}
engines: {node: '>=14.0.0'}
@@ -4870,14 +4925,14 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/api-augment@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/api-augment@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/api-base': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/rpc-augment': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/types-augment': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/api-base': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/rpc-augment': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-augment': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
transitivePeerDependencies:
- bufferutil
@@ -4935,11 +4990,11 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/api-base@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/api-base@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/rpc-core': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/rpc-core': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/util': 13.3.1
rxjs: 7.8.1
tslib: 2.8.1
transitivePeerDependencies:
@@ -5004,16 +5059,16 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/api-derive@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/api-derive@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/api': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/api-augment': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/api-base': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/rpc-core': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/util': 13.2.3
- '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
+ '@polkadot/api': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/api-augment': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/api-base': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/rpc-core': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1(@polkadot/util@13.3.1)
rxjs: 7.8.1
tslib: 2.8.1
transitivePeerDependencies:
@@ -5102,22 +5157,22 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/api@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
- dependencies:
- '@polkadot/api-augment': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/api-base': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/api-derive': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
- '@polkadot/rpc-augment': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/rpc-core': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/rpc-provider': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/types-augment': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/types-create': 15.0.2
- '@polkadot/types-known': 15.0.2
- '@polkadot/util': 13.2.3
- '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
+ '@polkadot/api@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ dependencies:
+ '@polkadot/api-augment': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/api-base': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/api-derive': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/keyring': 13.3.1(@polkadot/util-crypto@13.3.1(@polkadot/util@13.3.1))(@polkadot/util@13.3.1)
+ '@polkadot/rpc-augment': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/rpc-core': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/rpc-provider': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-augment': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/types-create': 15.4.1
+ '@polkadot/types-known': 15.4.1
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1(@polkadot/util@13.3.1)
eventemitter3: 5.0.1
rxjs: 7.8.1
tslib: 2.8.1
@@ -5173,7 +5228,7 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/apps-config@0.146.1(@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)':
+ '@polkadot/apps-config@0.146.1(@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)(utf-8-validate@5.0.10)':
dependencies:
'@acala-network/type-definitions': 5.1.2(@polkadot/types@14.3.1)
'@bifrost-finance/type-definitions': 1.11.3(@polkadot/api@14.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))
@@ -5199,7 +5254,7 @@ snapshots:
'@polkadot/api': 14.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
'@polkadot/api-derive': 14.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
'@polkadot/networks': 13.2.3
- '@polkadot/react-identicon': 3.11.3(@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(@polkadot/networks@13.2.3)(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)
+ '@polkadot/react-identicon': 3.11.3(@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(@polkadot/networks@13.2.3)(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)
'@polkadot/types': 14.3.1
'@polkadot/types-codec': 14.3.1
'@polkadot/util': 13.2.3
@@ -5249,6 +5304,18 @@ snapshots:
'@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
tslib: 2.8.1
+ '@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)':
+ dependencies:
+ '@polkadot/util': 13.2.3
+ '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
+ tslib: 2.8.1
+
+ '@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.3.1(@polkadot/util@13.3.1))(@polkadot/util@13.3.1)':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1(@polkadot/util@13.3.1)
+ tslib: 2.8.1
+
'@polkadot/keyring@6.11.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)':
dependencies:
'@babel/runtime': 7.25.6
@@ -5299,6 +5366,12 @@ snapshots:
'@substrate/ss58-registry': 1.51.0
tslib: 2.8.1
+ '@polkadot/networks@13.3.1':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@substrate/ss58-registry': 1.51.0
+ tslib: 2.8.1
+
'@polkadot/networks@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -5309,9 +5382,9 @@ snapshots:
'@polkadot/util': 8.7.1
'@substrate/ss58-registry': 1.51.0
- '@polkadot/react-identicon@3.11.3(@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(@polkadot/networks@13.2.3)(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)':
+ '@polkadot/react-identicon@3.11.3(@polkadot/keyring@13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3))(@polkadot/networks@13.2.3)(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)':
dependencies:
- '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
+ '@polkadot/keyring': 13.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
'@polkadot/ui-settings': 3.11.3(@polkadot/networks@13.2.3)(@polkadot/util@13.2.3)
'@polkadot/ui-shared': 3.11.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
'@polkadot/util': 13.2.3
@@ -5351,12 +5424,12 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/rpc-augment@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/rpc-augment@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/rpc-core': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/rpc-core': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
transitivePeerDependencies:
- bufferutil
@@ -5412,12 +5485,12 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/rpc-core@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/rpc-core@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/rpc-augment': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/rpc-provider': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
- '@polkadot/types': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/rpc-augment': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/rpc-provider': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/types': 15.4.1
+ '@polkadot/util': 13.3.1
rxjs: 7.8.1
tslib: 2.8.1
transitivePeerDependencies:
@@ -5492,16 +5565,16 @@ snapshots:
- supports-color
- utf-8-validate
- '@polkadot/rpc-provider@15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ '@polkadot/rpc-provider@15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
- '@polkadot/types': 15.0.2
- '@polkadot/types-support': 15.0.2
- '@polkadot/util': 13.2.3
- '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
- '@polkadot/x-fetch': 13.2.3
- '@polkadot/x-global': 13.2.3
- '@polkadot/x-ws': 13.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/keyring': 13.3.1(@polkadot/util-crypto@13.3.1(@polkadot/util@13.3.1))(@polkadot/util@13.3.1)
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-support': 15.4.1
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1(@polkadot/util@13.3.1)
+ '@polkadot/x-fetch': 13.3.1
+ '@polkadot/x-global': 13.3.1
+ '@polkadot/x-ws': 13.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
eventemitter3: 5.0.1
mock-socket: 9.3.1
nock: 13.5.5
@@ -5567,11 +5640,11 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
- '@polkadot/types-augment@15.0.2':
+ '@polkadot/types-augment@15.4.1':
dependencies:
- '@polkadot/types': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
'@polkadot/types-augment@7.15.1':
@@ -5600,10 +5673,10 @@ snapshots:
'@polkadot/x-bigint': 13.2.3
tslib: 2.8.1
- '@polkadot/types-codec@15.0.2':
+ '@polkadot/types-codec@15.4.1':
dependencies:
- '@polkadot/util': 13.2.3
- '@polkadot/x-bigint': 13.2.3
+ '@polkadot/util': 13.3.1
+ '@polkadot/x-bigint': 13.3.1
tslib: 2.8.1
'@polkadot/types-codec@7.15.1':
@@ -5629,10 +5702,10 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
- '@polkadot/types-create@15.0.2':
+ '@polkadot/types-create@15.4.1':
dependencies:
- '@polkadot/types-codec': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
'@polkadot/types-create@7.15.1':
@@ -5665,13 +5738,13 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
- '@polkadot/types-known@15.0.2':
+ '@polkadot/types-known@15.4.1':
dependencies:
- '@polkadot/networks': 13.2.3
- '@polkadot/types': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/types-create': 15.0.2
- '@polkadot/util': 13.2.3
+ '@polkadot/networks': 13.3.1
+ '@polkadot/types': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/types-create': 15.4.1
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
'@polkadot/types-known@4.17.1':
@@ -5716,9 +5789,9 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
- '@polkadot/types-support@15.0.2':
+ '@polkadot/types-support@15.4.1':
dependencies:
- '@polkadot/util': 13.2.3
+ '@polkadot/util': 13.3.1
tslib: 2.8.1
'@polkadot/types-support@7.15.1':
@@ -5753,14 +5826,14 @@ snapshots:
rxjs: 7.8.1
tslib: 2.8.1
- '@polkadot/types@15.0.2':
+ '@polkadot/types@15.4.1':
dependencies:
- '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)
- '@polkadot/types-augment': 15.0.2
- '@polkadot/types-codec': 15.0.2
- '@polkadot/types-create': 15.0.2
- '@polkadot/util': 13.2.3
- '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3)
+ '@polkadot/keyring': 13.3.1(@polkadot/util-crypto@13.3.1(@polkadot/util@13.3.1))(@polkadot/util@13.3.1)
+ '@polkadot/types-augment': 15.4.1
+ '@polkadot/types-codec': 15.4.1
+ '@polkadot/types-create': 15.4.1
+ '@polkadot/util': 13.3.1
+ '@polkadot/util-crypto': 13.3.1(@polkadot/util@13.3.1)
rxjs: 7.8.1
tslib: 2.8.1
@@ -5857,6 +5930,19 @@ snapshots:
'@scure/base': 1.1.8
tslib: 2.8.1
+ '@polkadot/util-crypto@13.3.1(@polkadot/util@13.3.1)':
+ dependencies:
+ '@noble/curves': 1.6.0
+ '@noble/hashes': 1.5.0
+ '@polkadot/networks': 13.3.1
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/x-bigint': 13.3.1
+ '@polkadot/x-randomvalues': 13.3.1(@polkadot/util@13.3.1)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
+ '@scure/base': 1.1.8
+ tslib: 2.8.1
+
'@polkadot/util-crypto@6.11.1(@polkadot/util@6.11.1)':
dependencies:
'@babel/runtime': 7.25.6
@@ -5920,6 +6006,16 @@ snapshots:
bn.js: 5.2.1
tslib: 2.8.1
+ '@polkadot/util@13.3.1':
+ dependencies:
+ '@polkadot/x-bigint': 13.3.1
+ '@polkadot/x-global': 13.3.1
+ '@polkadot/x-textdecoder': 13.3.1
+ '@polkadot/x-textencoder': 13.3.1
+ '@types/bn.js': 5.1.6
+ bn.js: 5.2.1
+ tslib: 2.8.1
+
'@polkadot/util@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -5961,6 +6057,13 @@ snapshots:
'@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
tslib: 2.8.1
+ '@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/x-randomvalues': 13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
+ tslib: 2.8.1
+
'@polkadot/wasm-crypto-asmjs@4.6.1(@polkadot/util@6.11.1)':
dependencies:
'@babel/runtime': 7.25.6
@@ -5986,6 +6089,11 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
+ '@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.3.1)':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/wasm-crypto-init@6.4.1(@polkadot/util@10.4.2)(@polkadot/x-randomvalues@10.4.2)':
dependencies:
'@babel/runtime': 7.25.6
@@ -6015,6 +6123,16 @@ snapshots:
'@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
tslib: 2.8.1
+ '@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))
+ '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/x-randomvalues': 13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
+ tslib: 2.8.1
+
'@polkadot/wasm-crypto-wasm@4.6.1(@polkadot/util@6.11.1)':
dependencies:
'@babel/runtime': 7.25.6
@@ -6043,6 +6161,12 @@ snapshots:
'@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3)
tslib: 2.8.1
+ '@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.3.1)':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.3.1)
+ tslib: 2.8.1
+
'@polkadot/wasm-crypto@4.6.1(@polkadot/util@6.11.1)(@polkadot/x-randomvalues@6.11.1)':
dependencies:
'@babel/runtime': 7.25.6
@@ -6092,6 +6216,17 @@ snapshots:
'@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
tslib: 2.8.1
+ '@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))
+ '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.3.1)(@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))
+ '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.3.1)
+ '@polkadot/x-randomvalues': 13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))
+ tslib: 2.8.1
+
'@polkadot/wasm-util@6.4.1(@polkadot/util@10.4.2)':
dependencies:
'@babel/runtime': 7.25.6
@@ -6107,6 +6242,11 @@ snapshots:
'@polkadot/util': 13.2.3
tslib: 2.8.1
+ '@polkadot/wasm-util@7.4.1(@polkadot/util@13.3.1)':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/x-bigint@10.4.2':
dependencies:
'@babel/runtime': 7.25.6
@@ -6122,6 +6262,11 @@ snapshots:
'@polkadot/x-global': 13.2.3
tslib: 2.8.1
+ '@polkadot/x-bigint@13.3.1':
+ dependencies:
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/x-bigint@8.7.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6146,6 +6291,12 @@ snapshots:
node-fetch: 3.3.2
tslib: 2.8.1
+ '@polkadot/x-fetch@13.3.1':
+ dependencies:
+ '@polkadot/x-global': 13.3.1
+ node-fetch: 3.3.2
+ tslib: 2.8.1
+
'@polkadot/x-fetch@8.7.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6167,6 +6318,10 @@ snapshots:
dependencies:
tslib: 2.8.1
+ '@polkadot/x-global@13.3.1':
+ dependencies:
+ tslib: 2.8.1
+
'@polkadot/x-global@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6194,6 +6349,20 @@ snapshots:
'@polkadot/x-global': 13.2.3
tslib: 2.8.1
+ '@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))':
+ dependencies:
+ '@polkadot/util': 13.2.3
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3)
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+
+ '@polkadot/x-randomvalues@13.3.1(@polkadot/util@13.3.1)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))':
+ dependencies:
+ '@polkadot/util': 13.3.1
+ '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3)
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/x-randomvalues@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6224,6 +6393,11 @@ snapshots:
'@polkadot/x-global': 13.2.3
tslib: 2.8.1
+ '@polkadot/x-textdecoder@13.3.1':
+ dependencies:
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/x-textdecoder@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6249,6 +6423,11 @@ snapshots:
'@polkadot/x-global': 13.2.3
tslib: 2.8.1
+ '@polkadot/x-textencoder@13.3.1':
+ dependencies:
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+
'@polkadot/x-textencoder@6.11.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6286,6 +6465,15 @@ snapshots:
- bufferutil
- utf-8-validate
+ '@polkadot/x-ws@13.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
+ dependencies:
+ '@polkadot/x-global': 13.3.1
+ tslib: 2.8.1
+ ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
'@polkadot/x-ws@8.7.1':
dependencies:
'@babel/runtime': 7.25.6
@@ -6445,7 +6633,7 @@ snapshots:
'@subsocial/definitions@0.8.14(bufferutil@4.0.8)(utf-8-validate@5.0.10)':
dependencies:
- '@polkadot/api': 15.0.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
+ '@polkadot/api': 15.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)
lodash.camelcase: 4.3.0
transitivePeerDependencies:
- bufferutil