@paraspell/sdk-pjs 12.3.0 → 12.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +21 -90
  3. package/package.json +2 -2
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ParaSpell
3
+ Copyright (c) 2026 ParaSpell
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
  <h1 align="center">@paraspell/sdk-pjs</h1>
5
- <h4 align="center"> SDK for handling XCM asset transfers across Polkadot and Kusama ecosystems. </h4>
5
+ <h4 align="center"> SDK for handling XCM asset transfers across Polkadot, Kusama, Paseo and Westend ecosystems. </h4>
6
6
  <p align="center">
7
7
  <a href="https://npmjs.com/package/@paraspell/sdk-pjs">
8
8
  <img alt="version" src="https://img.shields.io/npm/v/@paraspell/sdk-pjs?style=flat-square" />
@@ -64,25 +64,21 @@ import { Native, Foreign, ForeignAbstract } from '@paraspell/sdk-pjs'; //Only ne
64
64
 
65
65
  ## Implementation
66
66
 
67
- ```
68
- NOTES:
69
- - Local transfers are now available for every currency and every chain. To try them, simply use the same origin and destination parameters.
70
- - Transfer info queries are now all in the Builder pattern and don't require any imports other than the builder.
71
- - You can now query Ethereum asset balances on Ethereum via balance query
72
- - The Builder() now accepts an optional configuration object (To enhance localhost experience and testing). This object can contain apiOverrides and a development flag. More information in the "Localhost test setup" section.
73
- - V10 > V11 Migration guide https://paraspell.github.io/docs/migration/v10-to-v11.html
74
- - Brand new asset decimal abstraction introduced. It can be turned on in Builder config. Will be turned on by default in next major release.
75
- ```
67
+ > [!NOTE]
68
+ > - Local transfers are now available for every currency and every chain. To try them, simply use the same origin and destination parameters.
69
+ > - Transfer info queries are now all in the Builder pattern and don't require any imports other than the builder.
70
+ > - You can now query Ethereum asset balances on Ethereum via balance query
71
+ > - The Builder() now accepts an optional configuration object (To enhance localhost experience and testing). This object can contain apiOverrides and a development flag. More information in the "Localhost test setup" section.
72
+ > - Brand new asset decimal abstraction introduced. It can be turned on in Builder config. Will be turned on by default in next major release.
73
+ >
74
+ > **Latest news:**
75
+ > - V11 > V12 Migration guide https://paraspell.github.io/docs/migration/v11-to-v12.html
76
76
 
77
- ```
78
- Latest news:
79
- - V11 > V12 Migration guide https://paraspell.github.io/docs/migration/v11-to-v12.html
80
- ```
81
77
 
82
78
  ### Sending XCM
83
79
  For full documentation on XCM Transfers head over to [official documentation](https://paraspell.github.io/docs/sdk/xcmPallet.html).
84
80
 
85
- #### Transfer assets from Parachain to Parachain
81
+ #### Transfer assets from Substrate to Substrate
86
82
 
87
83
  ```ts
88
84
  const builder = Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
@@ -104,75 +100,7 @@ await builder.disconnect()
104
100
  /*
105
101
  EXAMPLE:
106
102
  const builder = Builder()
107
- .from('Acala')
108
- .to('Astar')
109
- .currency({
110
- symbol: 'ACA',
111
- amount: '1000000000'
112
- })
113
- .address(address)
114
-
115
- const tx = await builder.build()
116
-
117
- //Disconnect API after TX
118
- await builder.disconnect()
119
- */
120
- ```
121
-
122
- #### Transfer assets from the Relay chain to the Parachain
123
-
124
- ```ts
125
- const builder = Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
126
- .from(TRelaychain) // Kusama | Polkadot | Westend | Paseo
127
- .to(TChain/*,customParaId - optional*/ | Location object)
128
- .currency({symbol: 'DOT', amount: amount /*Use "ALL" to transfer everything*/})
129
- .address(address | Location object)
130
- /*.xcmVersion(Version.V3/V4/V5) //Optional parameter for manual override of XCM Version used in call
131
- .customPallet('Pallet','pallet_function') //Optional parameter for manual override of XCM Pallet and function used in call (If they are named differently on some chain but syntax stays the same). Both pallet name and function required. Pallet name must be CamelCase, function name snake_case.*/
132
-
133
- const tx = await builder.build()
134
-
135
- //Make sure to disconnect the API after it is no longer used (eg, after a transaction)
136
- await builder.disconnect()
137
-
138
- /*
139
- EXAMPLE:
140
- const builder = await Builder()
141
- .from('Polkadot')
142
- .to('Astar')
143
- .currency({
144
- symbol: 'DOT',
145
- amount: '1000000000'
146
- })
147
- .address(address)
148
-
149
- const tx = await builder.build()
150
-
151
- //Disconnect API after TX
152
- await builder.disconnect()
153
- */
154
- ```
155
-
156
- #### Transfer assets from Parachain to Relay chain
157
-
158
- ```ts
159
- const builder = Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
160
- .from(TSubstrateChain)
161
- .to(TRelaychain) // Kusama | Polkadot | Westend | Paseo
162
- .currency({symbol: 'DOT', amount: amount /*Use "ALL" to transfer everything*/})
163
- .address(address | Location object)
164
- /*.xcmVersion(Version.V3/V4/V5) //Optional parameter for manual override of XCM Version used in call
165
- .customPallet('Pallet','pallet_function') //Optional parameter for manual override of XCM Pallet and function used in call (If they are named differently on some chain but syntax stays the same). Both pallet name and function required. Pallet name must be CamelCase, function name snake_case.*/
166
-
167
- const tx = await builder.build()
168
-
169
- //Make sure to disconnect the API after it is no longer used (eg, after a transaction)
170
- await builder.disconnect()
171
-
172
- /*
173
- EXAMPLE:
174
- const builder = await Builder()
175
- .from('Astar')
103
+ .from('AssetHubPolkadot')
176
104
  .to('Polkadot')
177
105
  .currency({
178
106
  symbol: 'DOT',
@@ -533,7 +461,8 @@ console.log(SUPPORTED_PALLETS)
533
461
 
534
462
  - Run all core tests and checks using `pnpm runAll`
535
463
 
536
- XCM SDK can be tested in [Playground](https://playground.paraspell.xyz/xcm-sdk/xcm-transfer).
464
+ > [!NOTE]
465
+ > XCM SDK can be tested in [Playground](https://playground.paraspell.xyz/xcm-sdk/xcm-transfer).
537
466
 
538
467
  ## Contribute to XCM Tools and earn rewards 💰
539
468
 
@@ -553,8 +482,10 @@ Published under [MIT License](https://github.com/paraspell/xcm-tools/blob/main/p
553
482
 
554
483
  ## Supported by
555
484
 
556
- <div>
557
- <div align="center" style="margin-top: 20px;">
558
- <img width="750" alt="version" src="https://github.com/user-attachments/assets/29e4b099-d90c-46d6-a3ce-94edfbda003c" />
559
- </div>
560
- </div>
485
+ <p align="center">
486
+ <picture>
487
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_transparent.png">
488
+ <source media="(prefers-color-scheme: light)" srcset="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_w3f_standard.png">
489
+ <img width="750" alt="Shows a black logo in light color mode and a white one in dark color mode." src="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_w3f_standard.png">
490
+ </picture>
491
+ </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "12.3.0",
3
+ "version": "12.4.0",
4
4
  "description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "@snowbridge/contract-types": "0.2.20",
28
28
  "ethers": "6.15.0",
29
29
  "viem": "2.40.3",
30
- "@paraspell/sdk-core": "12.3.0"
30
+ "@paraspell/sdk-core": "12.4.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 16.0 < 17",