diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js
index 3979b168..1192f7b7 100644
--- a/docs/.vitepress/config.js
+++ b/docs/.vitepress/config.js
@@ -34,7 +34,7 @@ export default {
]
},
{
- text: '
XCM API ',
+ text: '
XCM API ',
items: [
{ text: 'Getting started', link: '/api/g-started' },
{ text: 'XCM SDK🪄', link: '/api/xcmP' },
@@ -77,6 +77,7 @@ export default {
items: [
{ text: 'From v10 to v11', link: '/migration/v10-to-v11' },
{ text: 'From v11 to v12', link: '/migration/v11-to-v12' },
+ { text: 'From v12 to v13', link: '/migration/v12-to-v13' },
]
}
]
diff --git a/docs/api/deploy.md b/docs/api/deploy.md
index c21f4359..1e8ee683 100644
--- a/docs/api/deploy.md
+++ b/docs/api/deploy.md
@@ -78,7 +78,7 @@ Recently, LightSpell introduced the Sentry error tracking service implementation
Open your REST API client, client we use is [Insomnia](https://insomnia.rest/).
Paste in the following details and input the following link to test out Sentry:
-`http://localhost:3001/v5/sentry-test`
+`http://localhost:3001/v1/sentry-test`
LightSpell has integrated this test for you so you can test out error 500 in localhost mode.
Once you paste the link into the browser, Sentry should notify you about a new error 500. It should look like this in your project:
diff --git a/docs/api/g-started.md b/docs/api/g-started.md
index 7ca1d8fa..3940f464 100644
--- a/docs/api/g-started.md
+++ b/docs/api/g-started.md
@@ -1,15 +1,10 @@
-Getting started with
-
-
-
-
-
+Getting started with ParaSpell✨ XCM API
This section guides you on how to use our XCM API.
-Deployed on [https://api.lightspell.xyz/v5](https://api.lightspell.xyz/v5)
+Deployed on [https://api.paraspell.xyz/v1](https://api.lightspell.xyz/v1)
[[Github repository]](https://github.com/paraspell/xcm-tools/tree/main/apps/xcm-api)
diff --git a/docs/api/upgrade.md b/docs/api/upgrade.md
index 3058afd3..f5ba1e87 100644
--- a/docs/api/upgrade.md
+++ b/docs/api/upgrade.md
@@ -20,7 +20,7 @@ Before you proceed with verification note the following:
You can claim your token on the following site (API has to be running):
-`http://localhost:3001/v5/app/generate-api-key`
+`http://localhost:3001/v1/app/generate-api-key`
The limit for this level is:
`100 requests per minute`
@@ -44,7 +44,7 @@ Before you proceed with the request note the following:
Request for higher limit can be done in the following form (API and Database have to be running. Both need to be correctly configured):
-`http://localhost:3001/v5/app/higher-request-limit`
+`http://localhost:3001/v1/app/higher-request-limit`
The limit for this level is:
`Per request`
@@ -78,7 +78,7 @@ Make sure to name the key as `X-API-KEY` otherwise your key won't be recognized.
The following snippet can be observed. See the `Headers` section where the API key is inserted.
```ts
const response = await fetch(
- 'http://localhost:3001/v5/x-transfer?' +
+ 'http://localhost:3001/v1/x-transfer?' +
new URLSearchParams({
//Method parameters should be here
//For eg. from: 'Basilisk'
diff --git a/docs/api/xcmAnalyser.md b/docs/api/xcmAnalyser.md
index 5b463457..88f370e7 100644
--- a/docs/api/xcmAnalyser.md
+++ b/docs/api/xcmAnalyser.md
@@ -3,7 +3,7 @@
Following section covers implementation of XCM Analyser in LightSpell XCM API. Users can analyse either independent locations or entire XCM Calls.
## Analyse Location
-**Endpoint**: `POST /v5/xcm-analyser`
+**Endpoint**: `POST /v1/xcm-analyser`
::: details Parameters
@@ -20,7 +20,7 @@ Following section covers implementation of XCM Analyser in LightSpell XCM API. U
:::
```ts
-const response = await fetch("http://localhost:3001/v5/xcm-analyser", {
+const response = await fetch("http://localhost:3001/v1/xcm-analyser", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -31,7 +31,7 @@ const response = await fetch("http://localhost:3001/v5/xcm-analyser", {
});
```
## Analyse XCM call
-**Endpoint**: `POST /v5/xcm-analyser`
+**Endpoint**: `POST /v1/xcm-analyser`
::: details Parameters
@@ -48,7 +48,7 @@ const response = await fetch("http://localhost:3001/v5/xcm-analyser", {
:::
```ts
-const response = await fetch("http://localhost:3001/v5/xcm-analyser", {
+const response = await fetch("http://localhost:3001/v1/xcm-analyser", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
diff --git a/docs/api/xcmP.md b/docs/api/xcmP.md
index 5749256a..a6791b5d 100644
--- a/docs/api/xcmP.md
+++ b/docs/api/xcmP.md
@@ -12,13 +12,13 @@ const provider = getWsProvider('YourChainWSPort') // Specify "YourChainWSPort" w
const client = createClient(withPolkadotSdkCompat(provider))
const response = await fetch(
- "http://localhost:3001/v5/x-transfer”,
+ "http://localhost:3001/v1/x-transfer”,
{
method: ‘POST’,
body: JSON.stringify({
"from": "origin",
"to": "destination",
- "address": "address",
+ "recipient": "recipient",
"currency": {currencySpec, amount: amount /*Use "ALL" to transfer everything*/},
})
});
@@ -43,14 +43,14 @@ tx.signAndSubmit(signer)
### Substrate to Substrate (HRMP)
The following endpoint enables the creation of a variety of `Substrate-to-Substrate` XCM calls. It provides a unified interface for constructing cross-chain messages between Substrate-based networks using XCM. This endpoint is intended to simplify interoperability workflows and reduce the complexity of composing XCM transactions programmatically.
-**Endpoint**: `POST /v5/x-transfer`
+**Endpoint**: `POST /v1/x-transfer`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
- `xcmVersion` (Inside JSON body): (optional): Specifies manually selected XCM version if pre-selected does not work. Format: Vx - where x = version number eg. V4.
:::
@@ -64,7 +64,7 @@ The following endpoint enables the creation of a variety of `Substrate-to-Substr
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
:::
@@ -140,7 +140,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -155,7 +155,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer", {
+const response = await fetch("http://localhost:3001/v1/x-transfer", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -164,8 +164,8 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
from: "TChain", // Replace "TChain" with sender Chain, for example, "Acala" or "Polkadot"
to: "TChain", // Replace "TChain" with destination Chain, for example, "Hydration" or custom Location
currency: {currency spec} //Refer to currency spec options above
- address: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: "senderAddress" //Optional but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT Existential deposit.
+ recipient: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: "sender" //Optional but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT Existential deposit.
//ahAddress: ahAddress //Optional parameter - used when origin is EVM chain and XCM goes through AssetHub (Multihop transfer where we are unable to convert Key20 to ID32 address eg. origin: Moonbeam & destination: Ethereum (Multihop goes from Moonbeam > AssetHub > BridgeHub > Ethereum)
})
});
@@ -174,14 +174,14 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
## Local transfers
The following endpoint allows creation of Local asset transfers for any chain and any currency registered on it. This call is specified by same Chain selected as origin - `from` and destination - `to` parameters.
-**Endpoint**: `POST /v5/x-transfer`
+**Endpoint**: `POST /v1/x-transfer`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `to` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
:::
@@ -194,7 +194,7 @@ The following endpoint allows creation of Local asset transfers for any chain a
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `400` (Bad request exception) - Returned when query parameter 'keepAlive' does not have valid input
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
@@ -251,7 +251,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
}
@@ -264,7 +264,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/x-transfer', {
+const response = await fetch('http://localhost:3001/v1/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -273,7 +273,7 @@ const response = await fetch('http://localhost:3001/v5/x-transfer', {
from: 'Chain', // Replace "Chain" with sender Chain, e.g., "Acala"
to: 'Chain' // Replace Chain with same parameter as "from" parameter
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
/* keepAlive: bool - Optional: Allows draining the account below the existential deposit. */
}),
});
@@ -282,15 +282,15 @@ const response = await fetch('http://localhost:3001/v5/x-transfer', {
## Transact
The Api gives the ability to perform Transact, which enables execution of calls on a remote chain in the context of the destination environment. This allows applications to trigger cross-chain actions without direct interaction from users on the target chain.
-**Endpoint**: `POST /v5/x-transfer`
+**Endpoint**: `POST /v1/x-transfer`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `to` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender.
- `transact` (Inside JSON body): (required): Specifies the transact which should execute on destination.
:::
@@ -304,7 +304,7 @@ The Api gives the ability to perform Transact, which enables execution of calls
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `400` (Bad request exception) - Returned when body of 'transact' is not a valid
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
@@ -365,7 +365,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
}
@@ -378,7 +378,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/x-transfer', {
+const response = await fetch('http://localhost:3001/v1/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -387,8 +387,8 @@ const response = await fetch('http://localhost:3001/v5/x-transfer', {
from: 'Chain', // Replace "Chain" with sender Chain, e.g., "Acala"
to: 'Chain' // Replace Chain with same parameter as "from" parameter
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'SenderAddress' //Replace "SenderAddress" with sender wallet address (In AccountID32 or AccountKey20 Format)
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'SenderAddress' //Replace "SenderAddress" with sender wallet address (In AccountID32 or AccountKey20 Format)
transact: {
hex: Destination call hex //Function that should execute on destination
/*originKind: "SovereignAccount" || "XCM" || "Native" || "SuperUser" - Optional, "SovereignAccount" by default
@@ -401,15 +401,15 @@ const response = await fetch('http://localhost:3001/v5/x-transfer', {
## Swap
This feature allows you to send Swap XCMs, meaning you send one currency and receive another at the destination chain.
-**Endpoint**: `POST /v5/x-transfers`
+**Endpoint**: `POST /v1/x-transfers`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `to` (Inside JSON body): (required): Represents the Chain on which the asset is transfered locally.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender.
- `swapOptions` (Inside JSON body): (required): Specifies the swap to currency that should occur during XCM.
:::
@@ -423,7 +423,7 @@ This feature allows you to send Swap XCMs, meaning you send one currency and rec
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `400` (Bad request exception) - Returned when body of 'swapOptions' is not a valid
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
@@ -475,7 +475,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
}
@@ -547,7 +547,7 @@ swapOptions:{
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/x-transfers', {
+const response = await fetch('http://localhost:3001/v1/x-transfers', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -556,8 +556,8 @@ const response = await fetch('http://localhost:3001/v5/x-transfers', {
from: 'Chain', // Replace "Chain" with sender Chain, e.g., "Acala"
to: 'Chain' // Replace Chain with same parameter as "from" parameter
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'SenderAddress' //Replace "SenderAddress" with sender wallet address (In AccountID32 or AccountKey20 Format)
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'SenderAddress' //Replace "SenderAddress" with sender wallet address (In AccountID32 or AccountKey20 Format)
swapOptions: {
currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
// exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
@@ -571,15 +571,15 @@ const response = await fetch('http://localhost:3001/v5/x-transfers', {
## Dry run
You can determine whether your XCM message will execute successfully or fail with an error. The XCM message dry run provides a concrete execution error, allowing you to validate the message before submission. This makes it possible to verify correct execution without ever submitting the XCM message on-chain.
-**Endpoint**: `POST /v5/dry-run`
+**Endpoint**: `POST /v1/dry-run`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -592,7 +592,7 @@ You can determine whether your XCM message will execute successfully or fail wit
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -669,7 +669,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -684,7 +684,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/dry-run', {
+const response = await fetch('http://localhost:3001/v1/dry-run', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -693,23 +693,23 @@ const response = await fetch('http://localhost:3001/v5/dry-run', {
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Dry run preview
By using preview with dry-run, you can determine the result of a call using a fictional currency amount. This effectively allows you to simulate and demo calls with custom asset values of assets you don't need to own.
-**Endpoint**: `POST /v5/dry-run-preview`
+**Endpoint**: `POST /v1/dry-run-preview`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -722,7 +722,7 @@ By using preview with dry-run, you can determine the result of a call using a fi
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -793,7 +793,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
AssetHubPolkadot: // ws_url | [ws_url, ws_url,..]
@@ -807,7 +807,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/dry-run-preview', {
+const response = await fetch('http://localhost:3001/v1/dry-run-preview', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -816,8 +816,8 @@ const response = await fetch('http://localhost:3001/v5/dry-run-preview', {
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
@@ -838,7 +838,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -853,7 +853,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer", {
+const response = await fetch("http://localhost:3001/v1/x-transfer", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -862,7 +862,7 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
from: "AssetHubPolkadot", // Or AssetHubKusama
to: "AssetHubKusama", // Or AssetHubPolkadot
currency: {symbol: "KSM", amount: amount /*Use "ALL" to transfer everything*/}, // DOT | USDT | USDC
- address: "Address" // AccountID 32 address
+ recipient: "Address" // AccountID 32 address
})
});
```
@@ -882,7 +882,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -897,7 +897,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer", {
+const response = await fetch("http://localhost:3001/v1/x-transfer", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -906,7 +906,7 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
from: "AssetHubPolkadot",
to: "Ethereum",
currency: {symbol: "WETH", amount: amount /*Use "ALL" to transfer everything*/}, // Any supported asset - WBTC, WETH.. - {symbol: currencySymbol} | {id: currencyID}
- address: "Address" // Ethereum Address
+ recipient: "Address" // Ethereum Address
})
});
```
@@ -925,7 +925,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -940,7 +940,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer", {
+const response = await fetch("http://localhost:3001/v1/x-transfer", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -949,9 +949,9 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
from: "Chain",
to: "Ethereum",
currency: {symbol: "WETH", amount: amount /*Use "ALL" to transfer everything*/}, // Any supported asset - WBTC, WETH.. - {symbol: currencySymbol} | {id: currencyID}
- address: "Address", // Ethereum Address
+ recipient: "Address", // Ethereum Address
ahAddress: "Address", //Asset hub address (Needs to be sender address)
- senderAddress: "Address" //Origin chain sender address
+ sender: "Address" //Origin chain sender address
})
});
```
@@ -959,7 +959,7 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
### Snowbridge health check
Query for Snowbridge status
-**Endpoint**: `GET /v5/x-transfer/eth-bridge-status`
+**Endpoint**: `GET /v1/x-transfer/eth-bridge-status`
- **Parameters**:
@@ -971,13 +971,13 @@ Query for Snowbridge status
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer/eth-bridge-status");
+const response = await fetch("http://localhost:3001/v1/x-transfer/eth-bridge-status");
```
## Batch call
XCM API allows you to batch your XCM calls and send multiple at the same time via batch feature.
-**Endpoint** `POST /v5/x-transfer-batch`
+**Endpoint** `POST /v1/x-transfer-batch`
::: details Parameters
@@ -1000,7 +1000,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1016,7 +1016,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer-batch", {
+const response = await fetch("http://localhost:3001/v1/x-transfer-batch", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -1033,13 +1033,13 @@ const response = await fetch("http://localhost:3001/v5/x-transfer-batch", {
"from": "Kusama"
"to": "Moonriver",
"currency": { symbol: "DOT", amount: amount /*Use "ALL" to transfer everything*/},
- "address": "0x939229F9c6E2b97589c4a5A0B3Eb8664FFc00502"
+ "recipient": "0x939229F9c6E2b97589c4a5A0B3Eb8664FFc00502"
},
{
"from": "Kusama"
"to": "Basilisk",
"currency": { symbol: "DOT", amount: amount /*Use "ALL" to transfer everything*/},
- "address": "bXgnPigqWnUTb9PxgCvnt61bsQoRQFnzLYYyRPV1bvB6DLu87"
+ "recipient": "bXgnPigqWnUTb9PxgCvnt61bsQoRQFnzLYYyRPV1bvB6DLu87"
}
],
"options": {
@@ -1051,12 +1051,12 @@ const response = await fetch("http://localhost:3001/v5/x-transfer-batch", {
## Asset claim
Assets that have been trapped in the cross-chain transfers can be recovered through the asset claim feature.
-**Endpoint**: `POST /v5/asset-claim`
+**Endpoint**: `POST /v1/asset-claim`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain on which the asset will be claimed.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
- `currency` (Inside JSON body): (required): Represents the asset being claimed. It should be a location.
@@ -1065,7 +1065,7 @@ Assets that have been trapped in the cross-chain transfers can be recovered thro
::: details Errors
- `400` (Bad request exception) - Returned when parameter 'from' is not provided
- - `400` (Bad request exception) - Returned when parameter 'address' is not provided
+ - `400` (Bad request exception) - Returned when parameter 'recipient' is not provided
- `400` (Bad request exception) - Returned when query parameter 'currency' is expected but not provided
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
@@ -1073,14 +1073,14 @@ Assets that have been trapped in the cross-chain transfers can be recovered thro
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/asset-claim", {
+const response = await fetch("http://localhost:3001/v1/asset-claim", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: "Chain", // Replace "from" with the numeric value you wish to transfer
- address: "Address", // Replace "address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ recipient: "Address", // Replace "recipient" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
currency: "Asset Location array" //Replace "Asset location array" with specific asset location along with amount specification
})
});
@@ -1146,7 +1146,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1161,14 +1161,14 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/x-transfer", {
+const response = await fetch("http://localhost:3001/v1/x-transfer", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
- senderAddress: "1pze8UbJDcDAacrXcwkpqeRSYLphaAiXB8rUaC6Z3V1kBLq",
- address: "0x1501C1413e4178c38567Ada8945A80351F7B8496",
+ sender: "1pze8UbJDcDAacrXcwkpqeRSYLphaAiXB8rUaC6Z3V1kBLq",
+ recipient: "0x1501C1413e4178c38567Ada8945A80351F7B8496",
from: "Hydration",
to: "Ethereum",
currency: {
@@ -1191,7 +1191,7 @@ const response = await fetch("http://localhost:3001/v5/x-transfer", {
API allows you to use prederived accounts for testing (As sender or receiver address). For example Alice, Bob, Charlie, Alith, Balthathar and others.
-**Endpoint**: `POST /v5/sign-and-submit`
+**Endpoint**: `POST /v1/sign-and-submit`
::: details Parameters
@@ -1231,7 +1231,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1246,14 +1246,14 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/sign-and-submit", {
+const response = await fetch("http://localhost:3001/v1/sign-and-submit", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
- senderAddress: "//Alice", //You can use prederived accounts - //Alice, //Bob... //Alith, //Balthathar...
- address: "0x1501C1413e4178c38567Ada8945A80351F7B8496", //You can also use prederived accounts here - //Alice, //Bob... //Alith, //Balthathar...
+ sender: "//Alice", //You can use prederived accounts - //Alice, //Bob... //Alith, //Balthathar...
+ recipient: "0x1501C1413e4178c38567Ada8945A80351F7B8496", //You can also use prederived accounts here - //Alice, //Bob... //Alith, //Balthathar...
from: "Hydration",
to: "Moonbeam",
currency: {
@@ -1277,15 +1277,15 @@ const response = await fetch("http://localhost:3001/v5/sign-and-submit", {
The following endpoint allows is designed to retrieve you XCM fee at any cost, but fallbacking to Payment info if DryRun query fails or is not supported by either origin or destination.
-**Endpoint**: `POST /v5/xcm-fee`
+**Endpoint**: `POST /v1/xcm-fee`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the XCM sender.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the XCM sender.
:::
@@ -1298,7 +1298,7 @@ The following endpoint allows is designed to retrieve you XCM fee at any cost, b
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
:::
@@ -1384,7 +1384,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1399,7 +1399,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/xcm-fee", {
+const response = await fetch("http://localhost:3001/v1/xcm-fee", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -1408,8 +1408,8 @@ const response = await fetch("http://localhost:3001/v5/xcm-fee", {
from: "Chain", // Replace "Chain" with sender Chain, e.g., "Acala"
to: "Chain", // Replace "Chain" with destination Chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format)
- senderAddress: "Address" // Replace "Address" with sender wallet address (In AccountID32 or AccountKey20 Format)
+ recipient: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format)
+ sender: "Address" // Replace "Address" with sender wallet address (In AccountID32 or AccountKey20 Format)
})
});
```
@@ -1417,15 +1417,15 @@ const response = await fetch("http://localhost:3001/v5/xcm-fee", {
## XCM Fee (Origin only)
Following queries allow you to query XCM fee from Origin chain. The query is designed to retrieve you XCM fee at any cost, but fallbacking to Payment info if DryRun query fails or is not supported by origin.
-**Endpoint**: `POST /v5/origin-xcm-fee`
+**Endpoint**: `POST /v1/origin-xcm-fee`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the XCM sender.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the XCM sender.
:::
@@ -1438,7 +1438,7 @@ Following queries allow you to query XCM fee from Origin chain. The query is des
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
:::
@@ -1515,7 +1515,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1530,7 +1530,7 @@ options: ({
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/origin-xcm-fee", {
+const response = await fetch("http://localhost:3001/v1/origin-xcm-fee", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -1539,8 +1539,8 @@ const response = await fetch("http://localhost:3001/v5/origin-xcm-fee", {
from: "Chain", // Replace "Chain" with sender Chain, e.g., "Acala"
to: "Chain", // Replace "Chain" with destination Chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format)
- senderAddress: "Address" // Replace "Address" with sender wallet address (In AccountID32 or AccountKey20 Format)
+ recipient: "Address" // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format)
+ sender: "Address" // Replace "Address" with sender wallet address (In AccountID32 or AccountKey20 Format)
})
});
```
@@ -1548,15 +1548,15 @@ const response = await fetch("http://localhost:3001/v5/origin-xcm-fee", {
## XCM Transfer info
To comprehensively assess whether a message will execute successfully without failure, use this query. It provides detailed information on currency balances before and after the transaction, including all relevant fees. This data is essential for accurately evaluating potential balance or fee-related issues that could cause message failure.
-**Endpoint**: `POST /v5/transfer-info`
+**Endpoint**: `POST /v1/transfer-info`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -1569,7 +1569,7 @@ To comprehensively assess whether a message will execute successfully without fa
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -1641,7 +1641,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1657,7 +1657,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/transfer-info' , {
+ 'http://localhost:3001/v1/transfer-info' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -1665,23 +1665,23 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Transferable amount
To retrieve information on how much of the selected currency can be transfered from specific account you can use transferable balance.
-**Endpoint**: `POST /v5/transferable-amount`
+**Endpoint**: `POST /v1/transferable-amount`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -1694,7 +1694,7 @@ To retrieve information on how much of the selected currency can be transfered f
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -1773,7 +1773,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1789,7 +1789,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/transferable-amount' , {
+ 'http://localhost:3001/v1/transferable-amount' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -1797,23 +1797,23 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Minimal transferable amount
You can use the minimal transferable balance to retrieve information on minimum of the selected currency can be transferred from a specific account to specific destination, so that the Existential deposit and destination or origin fee is paid fully.
-**Endpoint**: `POST /v5/min-transferable-amount`
+**Endpoint**: `POST /v1/min-transferable-amount`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -1826,7 +1826,7 @@ You can use the minimal transferable balance to retrieve information on minimum
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -1906,7 +1906,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -1922,7 +1922,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/min-transferable-amount' , {
+ 'http://localhost:3001/v1/min-transferable-amount' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -1930,23 +1930,23 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Predicted received amount
You can predict the amount to be received on destination, granted, that the destination chain and hops have dry-run.
-**Endpoint**: `POST /v5/receivable-amount`
+**Endpoint**: `POST /v1/receivable-amount`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -1959,7 +1959,7 @@ You can predict the amount to be received on destination, granted, that the dest
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -2020,7 +2020,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -2035,7 +2035,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/receivable-amount' , {
+ 'http://localhost:3001/v1/receivable-amount' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -2043,23 +2043,23 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Verify ED on destination
To retrieve information on whether the selected currency from specific account will meet existential deposit on destination chain you can use this query.
-**Endpoint**: `POST /v5/verify-ed-on-destination`
+**Endpoint**: `POST /v1/verify-ed-on-destination`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
:::
@@ -2072,7 +2072,7 @@ To retrieve information on whether the selected currency from specific account w
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
:::
@@ -2145,7 +2145,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -2161,7 +2161,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/verify-ed-on-destination' , {
+ 'http://localhost:3001/v1/verify-ed-on-destination' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -2169,23 +2169,23 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address' //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address' //Replace "Address" with sender address from origin chain
}),
```
## Best amount out
Following endpoint gives you best amount out for specific dex. Works with swapOptions defined only.
-**Endpoint**: `POST /v5/best-amount-out`
+**Endpoint**: `POST /v1/best-amount-out`
::: details Parameters
- `from` (Inside JSON body): (required): Represents the Chain from which the assets will be transferred.
- `to` (Inside JSON body): (required): Represents the Chain to which the assets will be transferred.
- `currency` (Inside JSON body): (required): Represents the asset being sent. It should be a string value.
- - `address` (Inside JSON body): (required): Specifies the address of the recipient.
- - `senderAddress` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
+ - `recipient` (Inside JSON body): (required): Specifies the address of the recipient.
+ - `sender` (Inside JSON body): (required): Specifies the address of the sender (Origin chain one).
- `swapOptions` (Inside JSON Body): (required): Specifies Swap to specific currency.
:::
@@ -2199,7 +2199,7 @@ Following endpoint gives you best amount out for specific dex. Works with swapOp
- `400` (Bad request exception) - Returned when entered chains 'from' and 'to' are not compatible for the transaction
- `400` (Bad request exception) - Returned when query parameter 'amount' is expected but not provided
- `400` (Bad request exception) - Returned when query parameter 'amount' is not a valid amount
- - `400` (Bad request exception) - Returned when query parameter 'address' is not a valid address
+ - `400` (Bad request exception) - Returned when query parameter 'recipient' is not a valid address
- `400` (Bad request exception) - Returned when query parameter 'swapOptions' is not a valid
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue
@@ -2269,7 +2269,7 @@ You can customize following API settings, to further tailor your experience with
```ts
options: ({
development: true, // Optional: Enforces WS overrides for all chains used
- abstractDecimals: true, // Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
+ abstractDecimals: true, // TURNED ON BY DEFAULT Abstracts decimals from amount - so 1 in amount for DOT equals 10_000_000_000
xcmFormatCheck: true, // Dryruns each call under the hood with dryrun bypass to confirm message passes with fictional balance
apiOverrides: {
Hydration: // ws_url | [ws_url, ws_url,..]
@@ -2284,7 +2284,7 @@ options: ({
**Example of request:**
```ts
const response = await fetch(
- 'http://localhost:3001/v5/best-amount-out' , {
+ 'http://localhost:3001/v1/best-amount-out' , {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -2292,8 +2292,8 @@ const response = await fetch(
from: 'Chain', // Replace "Chain" with sender Chain or Relay chain, e.g., "Acala"
to: 'Chain', // Replace "Chain" with destination Chain or Relay chain, e.g., "Moonbeam" or custom Location
currency: { currencySpec }, // Refer to currency spec options above
- address: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
- senderAddress: 'Address', //Replace "Address" with sender address from origin chain
+ recipient: 'Address', // Replace "Address" with destination wallet address (In AccountID32 or AccountKey20 Format) or custom Location
+ sender: 'Address', //Replace "Address" with sender address from origin chain
swapOptions: {
currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
// exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
@@ -2306,12 +2306,12 @@ const response = await fetch(
## SS58 Address conversion
Following functionality allows you to convert any SS58 address to Chain specific address.
- **Endpoint**: `GET /v5/convert-ss58?address=:address&chain=:chain`
+ **Endpoint**: `GET /v1/convert-ss58?address=:address&chain=:chain`
::: details Parameters
- `chain` (query parameter): Specifies the name of the Chain.
- - `address` (query parameter): Specifies the SS58 Address.
+ - `recipient` (query parameter): Specifies the SS58 Address.
:::
@@ -2325,7 +2325,7 @@ Following functionality allows you to convert any SS58 address to Chain specific
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/convert-ss58?address=:address&chain=:chain');
+const response = await fetch('http://localhost:3001/v1/convert-ss58?address=:address&chain=:chain');
```
## Asset queries
@@ -2335,7 +2335,7 @@ This functionality allows you to perform various asset queries with compatible C
```ts
const response = await fetch(
- "http://localhost:3001/v5/assets/" + //Replace "action" with your desired action eg. "Acala/native"
+ "http://localhost:3001/v1/assets/" + //Replace "action" with your desired action eg. "Acala/native"
);
console.log(response) //use response data as necessary
@@ -2344,7 +2344,7 @@ console.log(response) //use response data as necessary
### Query asset paths
The following endpoint allows you to query the asset paths related to origin chain.
-**Endpoint**: `POST /v5/assets/:chain/supported-destinations`
+**Endpoint**: `POST /v1/assets/:chain/supported-destinations`
::: details Currency spec options
@@ -2401,7 +2401,7 @@ Asset selection of multiple assets:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/:chain/supported-destinations", {
+const response = await fetch("http://localhost:3001/v1/assets/:chain/supported-destinations", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2415,7 +2415,7 @@ const response = await fetch("http://localhost:3001/v5/assets/:chain/supported-d
### Query asset reserve
The following endpoint allows you to query the asset reserve for specific asset on specific chain.
-**Endpoint**: `POST /v5/assets/:chain/reserve-chain`
+**Endpoint**: `POST /v1/assets/:chain/reserve-chain`
::: details Currency spec options
@@ -2472,7 +2472,7 @@ Asset selection of multiple assets:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/:chain/reserve-chain", {
+const response = await fetch("http://localhost:3001/v1/assets/:chain/reserve-chain", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2486,12 +2486,12 @@ const response = await fetch("http://localhost:3001/v5/assets/:chain/reserve-cha
### Query asset balance
The following endpoint allows you to query asset balance for on specific chain.
-**Endpoint**: `POST /v5/balance/:chain`
+**Endpoint**: `POST /v1/balance/:chain`
::: details Parameters
- `chain` (Path parameter): Specifies the name of the Chain.
- - `address` (Inside JSON body): (required): Specifies the address of the account.
+ - `recipient` (Inside JSON body): (required): Specifies the address of the account.
- `currency` (Inside JSON body): (required): Specifies the currency to query.
:::
@@ -2499,7 +2499,7 @@ The following endpoint allows you to query asset balance for on specific chain.
::: details Errors
- `400` (Bad request exception) - Returned when parameter 'chain' is not provided
- - `400` (Bad request exception) - Returned when body parameter 'address' is not provided
+ - `400` (Bad request exception) - Returned when body parameter 'recipient' is not provided
- `400` (Bad request exception) - Returned when body parameter 'currency' is not provided
- `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
@@ -2546,13 +2546,13 @@ Asset selection of multiple assets:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/balance/:chain/asset", {
+const response = await fetch("http://localhost:3001/v1/balance/:chain/asset", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
- address: "Address" // Replace "Address" with wallet address (In AccountID32 or AccountKey20 Format)
+ recipient: "Address" // Replace "Address" with wallet address (In AccountID32 or AccountKey20 Format)
currency: {currencySpec}, // Refer to currency spec options above
})
});
@@ -2561,7 +2561,7 @@ const response = await fetch("http://localhost:3001/v5/balance/:chain/asset", {
### Query asset existential deposit
The following endpoint allows you to query the existential deposit for currency in a specific chain.
-**Endpoint**: `POST /v5/balance/:chain/existential-deposit`
+**Endpoint**: `POST /v1/balance/:chain/existential-deposit`
::: details Parameters
@@ -2619,7 +2619,7 @@ Asset selection of multiple assets:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/balance/:chain/existential-deposit", {
+const response = await fetch("http://localhost:3001/v1/balance/:chain/existential-deposit", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2633,7 +2633,7 @@ const response = await fetch("http://localhost:3001/v5/balance/:chain/existentia
### Query Fee assets
The following endpoint retrieves Fee asset queries (Assets accepted as XCM Fee on specific chain)
-**Endpoint**: `GET /v5/assets/:chain/fee-assets`
+**Endpoint**: `GET /v1/assets/:chain/fee-assets`
::: details Parameters
@@ -2650,13 +2650,13 @@ The following endpoint retrieves Fee asset queries (Assets accepted as XCM Fee o
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/assets/:chain/fee-assets');
+const response = await fetch('http://localhost:3001/v1/assets/:chain/fee-assets');
```
### Query assets object
The following endpoint retrieves all assets on a specific Chain as an object.
-**Endpoint**: `GET /v5/assets/:chain`
+**Endpoint**: `GET /v1/assets/:chain`
::: details Parameters
@@ -2673,13 +2673,13 @@ The following endpoint retrieves all assets on a specific Chain as an object.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/Moonbeam");
+const response = await fetch("http://localhost:3001/v1/assets/Moonbeam");
```
### Query asset Location
The following endpoint retrieves asset location from the asset ID or asset symbol.
-**Endpoint**: `POST /v5/assets/:chain/location`
+**Endpoint**: `POST /v1/assets/:chain/location`
::: details Parameters
@@ -2730,7 +2730,7 @@ Asset selection by asset Symbol:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/:chain/location", {
+const response = await fetch("http://localhost:3001/v1/assets/:chain/location", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2744,7 +2744,7 @@ const response = await fetch("http://localhost:3001/v5/assets/:chain/location",
### Query asset Location
The following endpoint retrieves asset location from the asset ID or asset symbol.
-**Endpoint**: `POST /v5/assets/:chain/asset-info`
+**Endpoint**: `POST /v1/assets/:chain/asset-info`
::: details Parameters
@@ -2799,7 +2799,7 @@ Asset selection by asset Symbol:
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/:chain/asset-info", {
+const response = await fetch("http://localhost:3001/v1/assets/:chain/asset-info", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2811,35 +2811,10 @@ const response = await fetch("http://localhost:3001/v5/assets/:chain/asset-info"
});
```
-### Query asset ID
-The following endpoint returns the asset id for the specific asset on a specific Chain.
-
-**Endpoint**: `GET /v5/assets/:chain/id?symbol=:symbol`
-
- ::: details Parameters
-
- - `chain` (path parameter): Specifies the name of the Chain.
- - `symbol` (path parameter): Specifies the currency symbol of the asset.
-
- :::
-
- ::: details Errors
-
- - `400` (Bad request): When a specified Chain does not exist.
- - `404` (Bad request): When an asset with a specified currency symbol does not exist.
- - `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
-
- :::
-
-**Example of request:**
-```ts
-const response = await fetch("http://localhost:3001/v5/assets/Interlay/id?symbol=USDT");
-```
-
### Query Relay chain asset symbol
The following endpoint returns the Relay chain asset symbol for a specific Chain.
-**Endpoint**: `GET /v5/assets/:chain/relay-chain-symbol`
+**Endpoint**: `GET /v1/assets/:chain/relay-chain-symbol`
::: details Parameters
@@ -2856,13 +2831,13 @@ The following endpoint returns the Relay chain asset symbol for a specific Chain
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/Astar/relay-chain-symbol");
+const response = await fetch("http://localhost:3001/v1/assets/Astar/relay-chain-symbol");
```
### Query native assets
The following endpoint returns native assets of specific Chain.
-**Endpoint**: `GET /v5/assets/:chain/native`
+**Endpoint**: `GET /v1/assets/:chain/native`
::: details Parameters
@@ -2879,13 +2854,13 @@ The following endpoint returns native assets of specific Chain.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/Hydration/native");
+const response = await fetch("http://localhost:3001/v1/assets/Hydration/native");
```
### Query foreign assets
The following endpoint returns foreign assets of specific Chain.
-**Endpoint**: `GET /v5/assets/:chain/other`
+**Endpoint**: `GET /v1/assets/:chain/other`
::: details Parameters
@@ -2902,13 +2877,13 @@ The following endpoint returns foreign assets of specific Chain.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/Astar/other");
+const response = await fetch("http://localhost:3001/v1/assets/Astar/other");
```
### Query all asset symbols
The following endpoint returns all asset symbols for specific Chain.
-**Endpoint**: `GET /v5/assets/:chain/all-symbols`
+**Endpoint**: `GET /v1/assets/:chain/all-symbols`
::: details Parameters
@@ -2925,38 +2900,13 @@ The following endpoint returns all asset symbols for specific Chain.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/assets/Moonbeam/all-symbols");
-```
-
-### Query asset support
-The following endpoint returns a boolean value that confirms if the asset is registered on a specific Chain or not.
-
-**Endpoint**: `GET /v5/assets/:chain/has-support?symbol=:symbol`
-
- ::: details Parameters
-
- - `chain` (path parameter): Specifies the name of the Chain.
- - `symbol` (path parameter): Specifies the symbol of the asset.
-
- :::
-
- ::: details Errors
-
- - `400` (Bad request): When a specified Chain does not exist.
- - `404` (Bad request): When an asset with a specified currency symbol does not exist.
- - `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
-
- :::
-
-**Example of request:**
-```ts
-const response = await fetch("http://localhost:3001/v5/assets/Hydration/has-support?symbol=DOT");
+const response = await fetch("http://localhost:3001/v1/assets/Moonbeam/all-symbols");
```
### Query asset support between two chains
The following endpoint retrieves assets supported by both chains.
-**Endpoint**: `GET /v5/supported-assets?origin=:chain&destination=:chain`
+**Endpoint**: `GET /v1/supported-assets?origin=:chain&destination=:chain`
::: details Parameters
@@ -2974,38 +2924,13 @@ The following endpoint retrieves assets supported by both chains.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/supported-assets?origin=Acala&destination=Astar");
-```
-
-### Query asset decimals
-The following endpoint retrieves specific asset decimals on specific Chain.
-
-**Endpoint**: `GET /v5/assets/:chain/decimals?symbol=:symbol`
-
- ::: details Parameters
-
- - `chain` (path parameter): Specifies the name of the Chain.
- - `symbol` (path parameter): Specifies the currency symbol.
-
- :::
-
- ::: details Errors
-
- - `400` (Bad request): When a specified Chain does not exist.
- - `404` (Bad request): When an asset with a specified currency symbol does not exist.
- - `500` (Internal server error) - Returned when an unknown error has occurred. In this case please open an issue.
-
- :::
-
-**Example of request:**
-```ts
-const response = await fetch("http://localhost:3001/v5/assets/Basilisk/decimals?symbol=BSX");
+const response = await fetch("http://localhost:3001/v1/supported-assets?origin=Acala&destination=Astar");
```
### Query Chain ws endpoints
The following endpoint retrieves the Chain's WS endpoints.
-**Endpoint**: `GET /v5/chains/:chain/ws-endpoints`
+**Endpoint**: `GET /v1/chains/:chain/ws-endpoints`
::: details Parameters
@@ -3022,13 +2947,13 @@ The following endpoint retrieves the Chain's WS endpoints.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/chains/Acala/ws-endpoints");
+const response = await fetch("http://localhost:3001/v1/chains/Acala/ws-endpoints");
```
### Query Chain ID
The following endpoint retrieves Chain's ID from Chain's name
- **Endpoint**: `GET /v5/chains/:chain/para-id`
+ **Endpoint**: `GET /v1/chains/:chain/para-id`
::: details Parameters
@@ -3045,13 +2970,13 @@ The following endpoint retrieves Chain's ID from Chain's name
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/chains/Acala/para-id");
+const response = await fetch("http://localhost:3001/v1/chains/Acala/para-id");
```
### Query Chain name
The following endpoint retrieves the Chain's name from the Chain's ID. (Options for ecosystem - Polkadot, Kusama, Passeo, Westend, Ethereum)
-**Endpoint**: `GET /v5/chains/:paraId?ecosystem=eco`
+**Endpoint**: `GET /v1/chains/:paraId?ecosystem=eco`
::: details Parameters
@@ -3068,13 +2993,13 @@ The following endpoint retrieves the Chain's name from the Chain's ID. (Options
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/chains/2090?ecosystem=Polkadot");
+const response = await fetch("http://localhost:3001/v1/chains/2090?ecosystem=Polkadot");
```
### Query list of implemented Chains
The following endpoint retrieves an array of implemented Chains.
-**Endpoint**: `GET /v5/chains`
+**Endpoint**: `GET /v1/chains`
- **Parameters**: None.
- **Errors**:
@@ -3083,7 +3008,7 @@ The following endpoint retrieves an array of implemented Chains.
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/chains");
+const response = await fetch("http://localhost:3001/v1/chains");
```
## XCM pallet queries
@@ -3094,7 +3019,7 @@ This functionality allows you to query the `XCM pallets` that Chains currently s
```ts
const response = await fetch(
- "http://localhost:3001/v5/pallets/" + //Replace "action" with your desired action eg. "Acala/default"
+ "http://localhost:3001/v1/pallets/" + //Replace "action" with your desired action eg. "Acala/default"
);
console.log(response) //use response data as necessary
@@ -3103,7 +3028,7 @@ console.log(response) //use response data as necessary
### Get default XCM pallet
The following endpoint returns the default pallet for specific Chain
-**Endpoint**: `GET /v5/pallets/:chain/default`
+**Endpoint**: `GET /v1/pallets/:chain/default`
::: details Parameters
@@ -3120,13 +3045,13 @@ The following endpoint returns the default pallet for specific Chain
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/pallets/Acala/default");
+const response = await fetch("http://localhost:3001/v1/pallets/Acala/default");
```
### Get XCM pallet index
The following endpoint returns the index of specific cross-chain pallet for specific chain.
-**Endpoint**: `GET /v5/pallets/:chain/index`
+**Endpoint**: `GET /v1/pallets/:chain/index`
::: details Parameters
@@ -3145,13 +3070,13 @@ The following endpoint returns the index of specific cross-chain pallet for spec
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/pallets/Acala/index?pallet=XTokens');
+const response = await fetch('http://localhost:3001/v1/pallets/Acala/index?pallet=XTokens');
```
### Get all supported XCM pallets
The following endpoint returns all XCM Pallets that are supported on specific Chain
-**Endpoint**: `GET /v5/pallets/:chain`
+**Endpoint**: `GET /v1/pallets/:chain`
::: details Parameters
@@ -3168,13 +3093,13 @@ The following endpoint returns all XCM Pallets that are supported on specific Ch
**Example of request:**
```ts
-const response = await fetch("http://localhost:3001/v5/pallets/Basilisk");
+const response = await fetch("http://localhost:3001/v1/pallets/Basilisk");
```
### Get chain DryRun support
The following endpoint returns whether selected Chain has DryRun support
-**Endpoint**: `GET /v5/chains/:chain/has-dry-run-support`
+**Endpoint**: `GET /v1/chains/:chain/has-dry-run-support`
::: details Parameters
@@ -3191,13 +3116,13 @@ The following endpoint returns whether selected Chain has DryRun support
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/chains/:chain/has-dry-run-support');
+const response = await fetch('http://localhost:3001/v1/chains/:chain/has-dry-run-support');
```
### Print local pallets for native assets
Following endpoint returns all pallets for local transfers of native assets for specific chain.
-**Endpoint**: `GET /v5/pallets/:chain/native-assets`
+**Endpoint**: `GET /v1/pallets/:chain/native-assets`
::: details Parameters
@@ -3214,14 +3139,14 @@ Following endpoint returns all pallets for local transfers of native assets for
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/pallets/:chain/native-assets');
+const response = await fetch('http://localhost:3001/v1/pallets/:chain/native-assets');
```
### Print local pallets for foreign assets
Following endpoint returns all pallets for local transfers of foreign assets for specific chain.
-**Endpoint**: `GET /v5/pallets/:chain/other-assets`
+**Endpoint**: `GET /v1/pallets/:chain/other-assets`
::: details Parameters
@@ -3238,5 +3163,5 @@ Following endpoint returns all pallets for local transfers of foreign assets for
**Example of request:**
```ts
-const response = await fetch('http://localhost:3001/v5/pallets/:chain/other-assets');
+const response = await fetch('http://localhost:3001/v1/pallets/:chain/other-assets');
```
diff --git a/docs/migration/v12-to-v13.md b/docs/migration/v12-to-v13.md
new file mode 100644
index 00000000..ed472d3b
--- /dev/null
+++ b/docs/migration/v12-to-v13.md
@@ -0,0 +1,443 @@
+# Migration Guide — v12 ➡ v13
+
+This guide covers all **breaking changes**, **API updates**, and **new features** introduced in **v13** of ParaSpell XCM Tools.
+
+The update focuses on:
+- Simplifying the **builder API**
+- Removing deprecated and legacy functionality
+- Unifying **Swap integration support for all XCM SDKs**
+
+---
+
+### **Tracking issue (For deep dive code checking):**
+
+https://github.com/paraspell/xcm-tools/issues/1624
+
+
+## ⚠️ Breaking Changes
+
+### 🛠️ Specific XCM API breaking changes changes
+
+XCM API is now moved under paraspell.xyz domain, so instead of `https://api.lightspell.xyz/v5/assets/Astar` you now use `https://api.paraspell.xyz/v1/assets/Astar`.
+
+
+### 🛠️ XCM Tools related changes (SDKs + API)
+
+#### 1. Builder API renaming
+
+##### What changed
+- `.senderAddress()` → `.sender()`
+- `.address()` → `.recipient()`
+
+This improves readability and aligns with natural terminology.
+
+##### Before (v12)
+```ts
+builder
+ .senderAddress(sender)
+ .address(recipient)
+```
+
+##### After (v13)
+```ts
+builder
+ .sender(sender)
+ .recipient(recipient)
+```
+
+---
+
+#### 2. Fee estimation functions removed
+
+##### What changed
+All deprecated fee estimation functions (based on `paymentInfo`) have been **removed**.
+
+List of functions and what they should be replaced by:
+
+```ts
+.getXcmFeeEstimate() -> .getXcmFee()
+.getOriginXcmFeeEstimate() -> .getOriginXcmFee()
+```
+
+##### Migration
+- Remove any usage of fee estimation helpers
+- Use [**XCM fee queries**](https://paraspell.github.io/docs/sdk/xcmUtils.html#xcm-fee-origin-and-dest) instead
+
+---
+
+#### 3. `/router` API endpoint removed
+
+##### What changed
+The `/router` API endpoint has been removed.
+
+Routing functionality is now fully integrated into the **SDK builder**.
+
+Available as [swap endpoint](https://paraspell.github.io/docs/api/xcmP.html#swap) in API.
+
+##### Migration
+- Replace `/router` endpoint with [swap endpoint](https://paraspell.github.io/docs/api/xcmP.html#swap)
+
+---
+
+#### 4. RouterBuilder usage change
+
+##### What changed
+- `RouterBuilder` is now **generic**
+- It is **no longer intended to be used directly from the swap package**
+
+
+##### Before (v12)
+```ts
+await RouterBuilder()
+ .from(TSubstrateChain)
+ .to(TChain)
+ .currencyFrom(currencyFrom)
+ .currencyTo(currencyTo)
+ .amount(amount)
+ .slippagePct(pct)
+ .senderAddress(injectorAddress)
+ .recipientAddress(recipientAddress)
+ .signer(signer)
+ .onStatusChange((status: TRouterEvent) => {
+ console.log(status.type);
+ console.log(status.routerPlan);
+ console.log(status.chain);
+ console.log(status.destinationChain);
+ console.log(status.currentStep);
+ })
+ .buildAndSend()
+```
+
+##### After (v13)
+```ts
+const builder = Builder()
+ .from(TSubstrateChain)
+ .to(TChain)
+ .currency(CURRENCY_SPEC)
+ .recipient(address)
+ .sender(address)
+ .swap({
+ currencyTo: CURRENCY_SPEC,
+ })
+
+const tx = await builder.buildAll()
+
+await builder.disconnect()
+```
+
+---
+
+#### 5. `TSendOptions` renamed
+
+##### What changed
+```ts
+TSendOptions → TTransferOptions
+```
+
+##### Migration
+- Replace all usages of `TSendOptions` with `TTransferOptions`
+
+---
+
+#### 6. Deprecated asset helpers
+
+##### What changed
+The following functions are now deprecated:
+- `hasSupportForAsset`
+- `getAssetId`
+- `getAssetDecimals`
+
+
+In favor of `findAssetInfo`.
+
+##### Migration
+```ts
+// ❌ Old
+hasSupportForAsset(...)
+getAssetId(...)
+getAssetDecimals(...)
+
+// ✅ New (Has all three information in one place)
+findAssetInfo(...)
+```
+
+---
+
+#### 7. `findAssetInfo` update
+
+##### What changed
+- Third parameter `destination` is now **optional**
+
+
+##### Before (v12)
+```ts
+findAssetInfo(chain, CURRENCY_SPEC, destination)
+```
+
+##### After (v13)
+```ts
+//If not given, nothing changes (unless destination is Ethereum and you are searching by Asset symbol, make sure to provide it in that case because you can get duplicite asset error)
+findAssetInfo(chain, CURRENCY_SPEC, destination?)
+```
+
+---
+
+#### 8. `getXcmFee` response change
+
+##### What changed
+- `isExchange` flag has been moved
+- It now exists inside each `hop.result`
+
+
+##### Before (v12)
+
+Accessing result:
+
+```ts
+result.hops[i].isExchange
+```
+
+Example result:
+
+```ts
+{
+ "origin": {
+ "weight": {
+ "refTime": "18446744073709551615",
+ "proofSize": "22338"
+ },
+ "fee": "14901746512880889",
+ "feeType": "dryRun",
+ "sufficient": false,
+ "asset": {
+ "symbol": "ASTR",
+ "isNative": true,
+ "decimals": 18,
+ "existentialDeposit": "1000000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "X1": [
+ {
+ "Parachain": 2006
+ }
+ ]
+ }
+ }
+ }
+ },
+ "destination": {
+ "fee": "149",
+ "feeType": "dryRun",
+ "asset": {
+ "assetId": "10",
+ "symbol": "USDT",
+ "decimals": 6,
+ "existentialDeposit": "10000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "X3": [
+ {
+ "Parachain": 1000
+ },
+ {
+ "PalletInstance": 50
+ },
+ {
+ "GeneralIndex": 1984
+ }
+ ]
+ }
+ },
+ "isFeeAsset": true,
+ "alias": "USDT1"
+ }
+ },
+ "hops": [
+ {
+ "chain": "AssetHubPolkadot",
+ "result": {
+ "fee": "327948830",
+ "feeType": "dryRun",
+ "sufficient": true,
+ "asset": {
+ "symbol": "DOT",
+ "isNative": true,
+ "decimals": 10,
+ "existentialDeposit": "100000000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "Here": null
+ }
+ },
+ "isFeeAsset": true
+ },
+ "forwardedXcms": [],
+ "weight": {
+ "refTime": "530928826",
+ "proofSize": "16264"
+ },
+ "isExchange": true
+ },
+ "isExchange": true
+ }
+ ]
+}
+```
+
+
+##### After (v13)
+
+Accessing result:
+
+```ts
+result.hops[i].result.isExchange
+```
+
+Example result:
+
+```ts
+{
+ "origin": {
+ "weight": {
+ "refTime": "18446744073709551615",
+ "proofSize": "22338"
+ },
+ "fee": "14901746512880889",
+ "feeType": "dryRun",
+ "sufficient": false,
+ "asset": {
+ "symbol": "ASTR",
+ "isNative": true,
+ "decimals": 18,
+ "existentialDeposit": "1000000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "X1": [
+ {
+ "Parachain": 2006
+ }
+ ]
+ }
+ }
+ }
+ },
+ "destination": {
+ "fee": "149",
+ "feeType": "dryRun",
+ "asset": {
+ "assetId": "10",
+ "symbol": "USDT",
+ "decimals": 6,
+ "existentialDeposit": "10000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "X3": [
+ {
+ "Parachain": 1000
+ },
+ {
+ "PalletInstance": 50
+ },
+ {
+ "GeneralIndex": 1984
+ }
+ ]
+ }
+ },
+ "isFeeAsset": true,
+ "alias": "USDT1"
+ }
+ },
+ "hops": [
+ {
+ "chain": "AssetHubPolkadot",
+ "result": {
+ "fee": "327948830",
+ "feeType": "dryRun",
+ "sufficient": true,
+ "asset": {
+ "symbol": "DOT",
+ "isNative": true,
+ "decimals": 10,
+ "existentialDeposit": "100000000",
+ "location": {
+ "parents": 1,
+ "interior": {
+ "Here": null
+ }
+ },
+ "isFeeAsset": true
+ },
+ "forwardedXcms": [],
+ "weight": {
+ "refTime": "530928826",
+ "proofSize": "16264"
+ },
+ "isExchange": true
+ },
+ }
+ ]
+}
+```
+
+##### Migration
+- Update any logic relying on `isExchange` to use the new location
+
+
+## ✨ New Defaults & Behavior Changes
+
+#### 9. Abstract decimals enabled by default
+
+##### What changed
+- `abstractDecimals` is now **enabled by default**
+
+
+
+##### Before (v12)
+```ts
+abstractDecimals: false
+```
+
+
+
+##### After (v13)
+```ts
+abstractDecimals: true
+```
+
+
+
+##### Migration
+If you rely on raw decimals:
+```ts
+abstractDecimals: false
+```
+
+
+## 🚀 New Features
+
+### 10. `signAndSubmitAll`
+
+#### What changed
+A new method has been introduced:
+
+```ts
+signAndSubmitAll()
+```
+
+#### Behavior
+- Returns **array of transaction hexes**
+- Allows tracking of all submitted transactions
+
+#### Comparison
+
+```ts
+// v13
+signAndSubmit() // Used in one click scenarios & basic transfers when signer is provided into sender()
+signAndSubmitAll() // Used in two click swap scenarios when signer is provided into sender()
+```
diff --git a/docs/sdk/AssetPallet.md b/docs/sdk/AssetPallet.md
index 15168625..bcbcef07 100644
--- a/docs/sdk/AssetPallet.md
+++ b/docs/sdk/AssetPallet.md
@@ -25,12 +25,10 @@ import {
getSupportedAssets,
getFeeAssets,
getAssetsObject,
- getAssetId,
getRelayChainSymbol,
getNativeAssets,
getOtherAssets,
getAllAssetsSymbols,
- hasSupportForAsset,
getAssetDecimals,
getParaId,
getTChain,
@@ -556,20 +554,6 @@ getAssetsObject(TChain)
}
```
-```
-
-## Query asset ID
-This function returns `assetId` for `particular Parachain` and `asset symbol`. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
-```ts
-getAssetId(TChain, ASSET_SYMBOL)
-```
-
-**Example output:**
-
-```json
-"340282366920938463463374607431768211455"
-```
-
## Query Relay chain asset symbol
This function returns the `symbol` of the Relay chain for a particular Parachain. Either `DOT` or `KSM` or `WND` or `PAS`. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
```ts
@@ -728,20 +712,7 @@ getAllAssetsSymbols(TChain)
]
```
-## Query asset support I
-The function checks if Parachain supports a particular asset. (Both native and foreign assets are searched). Returns boolean. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
-
-```ts
-hasSupportForAsset(TChain, ASSET_SYMBOL)
-```
-
-**Example output:**
-
-```json
-true
-```
-
-## Query asset support II
+## Query asset support
The function checks if Parachain supports a particular asset. Returns asset object or null. `Destination` parameter is optional and should be set to Ethereum when using snowbridge assets. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
```ts
@@ -804,19 +775,6 @@ findAssetInfoOrThrow(TChain, CURRENCY, DESTINATION?)
}
```
-
-## Query asset decimals
-The function returns decimals for a specific asset. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
-```ts
-getAssetDecimals(TChain, ASSET_SYMBOL)
-```
-
-**Example output:**
-
-```json
-12
-```
-
## Query Parachain ID
The function returns specific Parachain id. Function uses [TChain](https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types) types.
```ts
diff --git a/docs/sdk/getting-started.md b/docs/sdk/getting-started.md
index 307ba074..7d038544 100644
--- a/docs/sdk/getting-started.md
+++ b/docs/sdk/getting-started.md
@@ -58,7 +58,7 @@ XCM SDK supports three different Javascript client providers. It is advised to u
## Install swap extension
-If you plan to [do Swap XCMs](https://paraspell.github.io/docs/sdk/xcmPallet.html#swap) you can install Swap package which allows you to do cross-chain swaps on popular Polkadot, Kusama, Paseo, Westend exchanges. Only available in **PAPI** version of SDK.
+If you plan to [do Swap XCMs](https://paraspell.github.io/docs/sdk/xcmPallet.html#swap) you can install Swap package which allows you to do cross-chain swaps on popular Polkadot, Kusama, Paseo, Westend exchanges. Now available in **ALL** versions of SDK.
> [!IMPORTANT]
> - ⚠️ **WebAssembly (Wasm) must be enabled in your project** because of the Hydration SDK (One of the exchanges implemented in XCM Router). Wasm can be enabled either through the web application configuration or through the appropriate plugin.
diff --git a/docs/sdk/xcmPallet.md b/docs/sdk/xcmPallet.md
index 37896ab2..36d20e24 100644
--- a/docs/sdk/xcmPallet.md
+++ b/docs/sdk/xcmPallet.md
@@ -13,8 +13,8 @@ const builder = Builder(/*client | builder_config |ws_url | [ws_url, ws_url,..]
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain /*,customParaId - optional*/ | Location object /*Only works for PolkadotXCM pallet*/) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address | Location object /*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
- .senderAddress(address | PAPI_SIGNER /*Only in PAPI SDK*/ | {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
+ .recipient(address | Location object /*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
+ .sender(address | PAPI_SIGNER /*Only in PAPI SDK*/ | {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
const tx = await builder.build()
// Or if you use signers in senderAddress:
@@ -108,7 +108,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -164,9 +164,9 @@ const builder = Builder()
.to('AssetHubPolkadot')
.currency({
id: 10,
- amount: '1000000'
+ amount: '1'
})
- .address(address)
+ .recipient(address)
const tx = await builder.build()
@@ -182,7 +182,7 @@ const builder = Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..]
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) // Has to be same as origin (from)
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address)
+ .recipient(address)
const tx = await builder.build()
@@ -262,7 +262,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -297,9 +297,9 @@ const builder = Builder()
.to('Hydration')
.currency({
symbol: 'DOT',
- amount: '10000000000'
+ amount: '1'
})
- .address(address)
+ .recipient(address)
const tx = await builder.build()
@@ -317,8 +317,8 @@ const builder = Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..]
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) // Has to be same as origin (from)
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .senderAddress(senderAddress)
- .address(address)
+ .sender(senderAddress)
+ .recipient(address)
.transact(hex, /* originType, TWeight - Optional */) // Reffer to transact spec below
const tx = await builder.build()
@@ -409,7 +409,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -444,10 +444,10 @@ const builder = Builder()
.to('BifrostPolkadot')
.currency({
symbol: 'DOT',
- amount: '10000000000'
+ amount: '1'
})
- .senderAddress(senderAddress)
- .address(address)
+ .sender(senderAddress)
+ .recipient(address)
.transact(0x0a040042ac083419496cb97115aff8f79eb7bb96ceaad18e99e310f526503fdd161b7500)
@@ -467,8 +467,8 @@ const builder = Builder(/*client | builder_config |ws_url | [ws_url, ws_url,..]
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain /*,customParaId - optional*/ | Location object /*Only works for PolkadotXCM pallet*/) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address | Location object /*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
- .senderAddress(address | PAPI_SIGNER /*Only in PAPI SDK*/ | {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
+ .recipient(address | Location object /*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
+ .sender(address | PAPI_SIGNER /*Only in PAPI SDK*/ | {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
.swap({
currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
// exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
@@ -480,7 +480,8 @@ const builder = Builder(/*client | builder_config |ws_url | [ws_url, ws_url,..]
const tx = await builder.buildAll()
// Or if you use signers in senderAddress:
-// await builder.signAndSubmit() - Signs and submits the transaction; returns TX hash for tracking
+// await builder.signAndSubmit() - Signs and submits the transaction (only working in 1click scenarios); returns TX hash for tracking
+// await builder.signAndSubmitAll() - Signs and submits transactions (required in 2click scenarios); returns array of TX hashes for tracking
// Make sure to disconnect API after it is no longer used (eg. after transaction)
await builder.disconnect()
@@ -622,7 +623,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -678,9 +679,9 @@ const builder = Builder()
.to('AssetHubPolkadot')
.currency({
id: 10,
- amount: '1000000'
+ amount: '1'
})
- .address(address)
+ .recipient(address)
.swap({
currencyTo: { symbol: 'USDC' }
})
@@ -702,8 +703,8 @@ const result = await Builder(/*client | builder_config | ws_url | [ws_url, ws_ur
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(ADDRESS)
+ .sender(SENDER_ADDRESS)
.dryRun()
```
@@ -809,7 +810,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1027,8 +1028,8 @@ const result = await Builder(/*client | builder_config | ws_url | [ws_url, ws_ur
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(ADDRESS)
+ .sender(SENDER_ADDRESS)
.dryRunPreview(/*{ mintFeeAssets: true } - false by default - Mints fee assets also, if user does not have enough to cover fees on origin.*/)
```
@@ -1109,7 +1110,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1318,7 +1319,7 @@ await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..] - Optiona
.from('AssetHubPolkadot') // 'AssetHubPolkadot' | 'AssetHubKusama'
.to('AssetHubKusama') // 'AssetHubPolkadot' | 'AssetHubKusama'
.currency({symbol: 'DOT', amount: amount /*Use "ALL" to transfer everything*/}) // 'KSM' | 'DOT' | 'USDC' | 'USDT'
- .address(address)
+ .recipient(address)
.build()
```
@@ -1354,7 +1355,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1403,8 +1404,8 @@ await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..] - Optiona
.from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to('Ethereum')
.currency({symbol: 'WETH', amount: amount /*Use "ALL" to transfer everything*/}) // Any supported asset by bridge - WETH, WBTC, SHIB and more - {symbol: currencySymbol} | {id: currencyID}
- .address(eth_address) // AccountKey20 recipient address
- .senderAddress(sender_address) // Injector SS58 address
+ .recipient(eth_address) // AccountKey20 recipient address
+ .sender(sender_address) // Injector SS58 address
.ahAddress(ahAddress) // Recommended! ahAddress is optional but should be used always, as in scenarios where it isn't necessary it will be ignored. It is used when origin chain is EVM style because we are unable to convert your sender Key20 address to ID32 address.
.build()
```
@@ -1440,7 +1441,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1491,7 +1492,7 @@ await EvmBuilder(provider) // Ethereum provider
.from('Ethereum')
.to(TChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency({symbol: 'WETH', amount: amount /*Use "ALL" to transfer everything*/}) // Any supported asset by bridge eg. WETH, WBTC, SHIB and more - {symbol: currencySymbol} | {id: currencyID}
- .address(address) // AccountID32 recipient address
+ .recipient(address) // AccountID32 recipient address
//.ahAddress(ahAddress) - ahAddress is optional and used in Ethereum>EVM Substrate chain (eg. Moonbeam) transfer.
.signer(signer) // Ethereum signer address
.build();
@@ -1523,13 +1524,13 @@ await Builder(/*CHAIN api/ws_url_string - optional*/)
.from(TSubstrateChain) // Ensure, that origin CHAIN is the same in all batched XCM Calls.
.to(Tchain2) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address | Location object)
+ .recipient(address | Location object)
.addToBatch()
.from(TSubstrateChain) // Ensure, that origin CHAIN is the same in all batched XCM Calls.
.to(TChain3) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address | Location object)
+ .recipient(address | Location object)
.addToBatch()
.buildBatch({
// This settings object is optional and batch all is the default option
@@ -1581,7 +1582,7 @@ const hash = await EvmBuilder()
.from('Moonbeam') // 'Moonbeam' | 'Polkadot' | 'Moonriver'
.to(TChain) // 'Polkadot' | 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency({id: currencyID, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: currencySymbol, amount: amount /*Use "ALL" to transfer everything*/}) //Select currency by ID or Symbol
- .address(address)
+ .recipient(address)
.signer(signer) // Ethers Signer or Viem Wallet Client
.build()
```
@@ -1602,8 +1603,8 @@ const builder = await Builder({
.from(TSubstrateChain)
.to(TChain)
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address) //You can also use prederived accounts - //Alice, //Bob... //Alith, //Balthathar...
- .senderAddress(address) //You can also use prederived accounts //Alice, //Bob... //Alith, //Balthathar...
+ .recipient(address) //You can also use prederived accounts - //Alice, //Bob... //Alith, //Balthathar...
+ .sender(address) //You can also use prederived accounts //Alice, //Bob... //Alith, //Balthathar...
const tx = await builder.build()
// Or if you use prederived account as senderAddress:
@@ -1683,7 +1684,7 @@ const builder = await Builder({
.from('Hydration')
.to('Ethereum')
.currency({ symbol: 'USDC.e', amount: '1' })
- .address('0x24D18dbFBcEd732EAdF98EE520853e13909fE258')
+ .recipient('0x24D18dbFBcEd732EAdF98EE520853e13909fE258')
const tx = await builder.build()
@@ -1699,7 +1700,7 @@ Claim XCM trapped assets from the selected chain.
const builder = Builder(/*client | ws_url | [ws_url, ws_url,..] - Optional*/)
.claimfrom(TSubstrateChain) // 'AssetHubPolkadot' | 'AssetHubKusama' | 'Polkadot' | 'Kusama'
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(address | Location object)
+ .recipient(address | Location object)
/*.xcmVersion(Version.V3) Optional parameter, by default chain specific version. XCM Version ENUM if a different XCM version is needed (Supported V3, V4, V5). Requires importing Version enum.*/
const tx = await builder.build()
diff --git a/docs/sdk/xcmUtils.md b/docs/sdk/xcmUtils.md
index 696a2bfd..602d3fe3 100644
--- a/docs/sdk/xcmUtils.md
+++ b/docs/sdk/xcmUtils.md
@@ -10,8 +10,8 @@ const fee = await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,.
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getXcmFee(/*{disableFallback: true / false}*/) //Fallback is optional. When fallback is disabled, you only get notified of DryRun error, but no Payment info query fallback is performed. Payment info is still performed if Origin or Destination chain do not support DryRun out of the box.
```
@@ -105,7 +105,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -228,8 +228,8 @@ const fee = await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,.
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getOriginXcmFee(/*{disableFallback: true / false}*/) //Fallback is optional. When fallback is disabled, you only get notified of DryRun error, but no Payment info query fallback is performed. Payment info is still performed if Origin do not support DryRun out of the box.
```
@@ -315,7 +315,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -567,8 +567,8 @@ const info = await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getTransferInfo()
```
@@ -652,7 +652,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -838,8 +838,8 @@ const transferable = await Builder(/*client | builder_config | ws_url | [ws_url,
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getTransferableAmount()
```
@@ -933,7 +933,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1000,8 +1000,8 @@ const transferable = await Builder(/*client | builder_config | ws_url | [ws_url,
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getMinTransferableAmount()
```
@@ -1095,7 +1095,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1162,8 +1162,8 @@ const ed = await Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.verifyEdOnDestination()
```
**Initial setup:**
@@ -1248,7 +1248,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1315,8 +1315,8 @@ const transferable = await Builder(/*client | builder_config | ws_url | [ws_url,
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.getReceivableAmount()
```
@@ -1402,7 +1402,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.
@@ -1456,8 +1456,8 @@ const result = await Builder(/*chain api/builder_config/ws_url_string/ws_url_arr
.from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
.currency(CURRENCY_SPEC) // Refer to currency spec options below
- .address(RECIPIENT_ADDRESS)
- .senderAddress(SENDER_ADDRESS)
+ .recipient(RECIPIENT_ADDRESS)
+ .sender(SENDER_ADDRESS)
.swap({
currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
// exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
@@ -1549,7 +1549,7 @@ const builder = await Builder({
**Decimal abstraction:**
-Following setting will abstract decimals from the .currency builder functionality.
+**TURNED ON BY DEFAULT** Following setting will abstract decimals from the .currency builder functionality.
>[!Note]
>Types in amount parameter are **(number | string | bigint)**. If bigint is provided and decimal abstraction is turned on, it will automatically turn it off as bigint does not support float numbers.