@paraspell/sdk 5.4.1 → 5.4.2

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 +18 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -73,7 +73,7 @@ NOTES:
73
73
  await Builder(/*node api - optional*/)
74
74
  .from(NODE)
75
75
  .to(NODE /*,customParaId - optional*/ | Multilocation object /*Only works for PolkadotXCM pallet*/)
76
- .currency(CurrencyString| | CurrencyID | Multilocation object | MultilocationArray)
76
+ .currency(CurrencyString| CurrencyID | Multilocation object | MultilocationArray)
77
77
  /*.feeAsset(feeAsset) - Parameter required when using MultilocationArray*/
78
78
  .amount(amount) // Overriden when using MultilocationArray
79
79
  .address(address | Multilocation object /*If you are sending through xTokens, you need to pass the destination and address multilocation in one object (x2)*/)
@@ -292,6 +292,23 @@ import { getExistentialDeposit } from "@paraspell/sdk";
292
292
  const ed = getExistentialDeposit('Acala')
293
293
  ```
294
294
 
295
+ ### XCM Transfer info
296
+ ```ts
297
+ import { getTransferInfo, getBalanceForeign, getBalanceNative, getOriginFeeDetails } from "@paraspell/sdk";
298
+
299
+ //Get balance of foreign currency
300
+ await getBalanceForeign(address, Parachain name, currency)
301
+
302
+ //Get balance of native currency
303
+ await getBalanceNative(address, Parachain name)
304
+
305
+ //Get fee information regarding XCM call
306
+ await getOriginFeeDetails(from, to, currency, amount, originAddress)
307
+
308
+ //Get all the information about XCM transfer
309
+ await getTransferInfo(from, to, address, destinationAddress, currency, amount)
310
+ ```
311
+
295
312
  ## 💻 Tests
296
313
  - Run compilation using `pnpm compile`
297
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": "@paraspell/sdk",
6
6
  "license": "MIT",