@paraspell/sdk-pjs 8.11.0 → 8.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -68,25 +68,17 @@ import { Native, Foreign, ForeignAbstract } from '@paraspell/sdk-pjs'; //Only ne
68
68
 
69
69
  ```
70
70
  NOTES:
71
- - If you wish to transfer from Parachain that uses long IDs for example Moonbeam you have to add the character 'n' to the end of currencyID. Eg: .currency({id: 42259045809535163221576417993425387648n}) will mean you transfer xcDOT.
72
- - You can now use custom ParachainIDs if you wish to test in TestNet. Just add parachainID as an additional parameter eg: .to('Basilisk', 2948).
73
- - POLKADOT <> KUSAMA Bridge is now available! Try sending DOT or KSM between AssetHubs - More information here: https://paraspell.github.io/docs/sdk/xcmPallet.html#ecosystem-bridges.
74
- - You can now customize XCM Version! Try using .xcmVersion parameter after address in builder.
75
- - POLKADOT <> ETHEREUM Bridge is now available! Try sending WETH between the ecosystems - More information here: https://paraspell.github.io/docs/sdk/xcmPallet.html#ecosystem-bridges.
76
- - ParaSpell now offers advanced asset symbol selection {symbol: "symbol"} for non duplicate assets, {symbol: Native("symbol")} or {symbol: Foreign("symbol")} if the duplicates are between native and foreign assets and {symbol: ForeignAbstract("symbol")} if the duplicates are in foreign assets only. You will get an error that will guide you further if you simply start with {symbol: "symbol"}.
77
- - You can now select assets by multilocation by simply using { multilocation: string | JSON }. The custom multilocation selection remains supported, but in order to use it you now have to use override - {multilocation: Override('Custom Multilocation')}.
78
- - The balance queries also support multilocation asset selection
79
- - You can now query foreign asset minimal deposits also.
80
- ```
81
-
82
- ```
83
- Latest news:
84
71
  - Since v8, amount moved closer to currency selection and specifying from and to parameters is no longer optional to save code.
85
72
  - More information on v8 major breaking change: https://github.com/paraspell/xcm-tools/pull/554
86
73
  - XCM SDK Now supports API Failsafe - If one endpoint doesn't work it automatically switches to the next one.
87
74
  - Builder now allows you to directly disconnect API.
88
75
  ```
89
76
 
77
+ ```
78
+ Latest news:
79
+ - Local transfers are now available for every currency and every chain. To try them, simply use same origin and destination parameters.
80
+ ```
81
+
90
82
  ### Builder pattern:
91
83
 
92
84
  ##### Transfer assets from Parachain to Parachain
@@ -246,6 +238,38 @@ const tx = await builder.build()
246
238
  await builder.disconnect()
247
239
  ```
248
240
 
241
+ ### Local transfers
242
+ ```ts
243
+ const builder = Builder(/*node api/ws_url_string/ws_url_array - optional*/)
244
+ .from(NODE)
245
+ .to(NODE) //Has to be same as origin (from)
246
+ .currency({id: currencyID, amount: amount} | {symbol: currencySymbol, amount: amount} | {symbol: Native('currencySymbol'), amount: amount} | {symbol: Foreign('currencySymbol'), amount: amount} | {symbol: ForeignAbstract('currencySymbol'), amount: amount} | {multilocation: AssetMultilocationString, amount: amount | AssetMultilocationJson, amount: amount} | {multilocation: Override('Custom Multilocation'), amount: amount} | {multiasset: {currencySelection, isFeeAsset?: true /* for example symbol: symbol or id: id, or multilocation: multilocation*/, amount: amount}})
247
+ .address(address)
248
+
249
+ const tx = await builder.build()
250
+
251
+ //Make sure to disconnect API after it is no longer used (eg. after transaction)
252
+ await builder.disconnect()
253
+
254
+ /*
255
+ EXAMPLE:
256
+ const builder = Builder()
257
+ .from('Hydration')
258
+ .to('Hydration')
259
+ .currency({
260
+ symbol: 'DOT',
261
+ amount: '1000000000'
262
+ })
263
+ .address(address)
264
+
265
+ const tx = await builder.build()
266
+
267
+ //Disconnect API after TX
268
+ await builder.disconnect()
269
+ */
270
+ ```
271
+
272
+
249
273
  ### Asset queries:
250
274
 
251
275
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "8.11.0",
3
+ "version": "8.11.1",
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.1.45",
28
28
  "ethers": "^6.13.5",
29
29
  "viem": "^2.23.15",
30
- "@paraspell/sdk-core": "8.11.0"
30
+ "@paraspell/sdk-core": "8.11.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 15.0 < 16",