@paraspell/sdk 12.9.1 → 12.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,18 +47,31 @@ npm install | pnpm add | yarn add @paraspell/sdk
|
|
|
47
47
|
|
|
48
48
|
### Install Swap extension
|
|
49
49
|
|
|
50
|
-
If you plan to do Swap XCMs 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.
|
|
50
|
+
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.
|
|
51
51
|
|
|
52
52
|
> [!IMPORTANT]
|
|
53
|
-
> - ⚠️ **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.
|
|
53
|
+
> - ⚠️ **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.
|
|
54
54
|
>
|
|
55
|
-
> - ⚠️
|
|
55
|
+
> - ⚠️ Additionally, Hydration requires the use of the **augment package** (see: https://github.com/galacticcouncil/sdk/issues/114).
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
npm install | pnpm add | yarn add @paraspell/swap
|
|
58
|
+
npm install | pnpm add | yarn add @paraspell/swap @galacticcouncil/api-augment
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
###
|
|
61
|
+
### Setup Swap extension
|
|
62
|
+
|
|
63
|
+
Add the `@paraspell/swap` import to your application's root component (Usually `App.tsx`). This ensures the extension is registered before using Builder.
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
// Import swap extension here
|
|
67
|
+
import '@paraspell/swap';
|
|
68
|
+
|
|
69
|
+
export default function App() {
|
|
70
|
+
return {/* Your app here */};
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Importing SDK functionality
|
|
62
75
|
|
|
63
76
|
Named import:
|
|
64
77
|
```ts
|
|
@@ -78,7 +91,7 @@ import * as paraspell from '@paraspell/sdk'
|
|
|
78
91
|
> - Transact is here! Find out more: https://paraspell.github.io/docs/sdk/xcmPallet.html#transact
|
|
79
92
|
>
|
|
80
93
|
> **Latest news:**
|
|
81
|
-
> - Swap is here! Find out more: https://paraspell.github.io/docs/sdk/
|
|
94
|
+
> - Swap is here! Find out more: https://paraspell.github.io/docs/sdk/getting-started.html#install-swap-extension
|
|
82
95
|
|
|
83
96
|
### Sending XCM
|
|
84
97
|
For full documentation on XCM Transfers head over to [official documentation](https://paraspell.github.io/docs/sdk/xcmPallet.html).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "12.9.
|
|
3
|
+
"version": "12.9.3",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@polkadot-labs/hdkd": "^0.0.26",
|
|
29
29
|
"@polkadot-labs/hdkd-helpers": "^0.0.27",
|
|
30
30
|
"viem": "^2.47.1",
|
|
31
|
-
"@paraspell/sdk-core": "12.9.
|
|
31
|
+
"@paraspell/sdk-core": "12.9.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"polkadot-api": ">= 1.23.3 < 2"
|