@paraspell/sdk 0.0.11-alpha.0 → 0.0.13

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 CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  SDK For XCM & XCMP handling made with ❤️ by ParaSpell✨. It is no longer necessary to construct calls manually. @paraspell/sdk handles this for you. Feel free to become magician and try your paraSPELLS 🧙✨.
14
14
 
15
- ##### Currently supporting 29 Polkadot & Kusama nodes list [here](https://github.com/paraspell/sdk/blob/beta-pre-release/docs/supportedNodes.md).
15
+ ##### Currently supporting 42 Polkadot & Kusama nodes list [here](https://github.com/paraspell/sdk/blob/beta-pre-release/docs/supportedNodes.md).
16
16
 
17
17
 
18
18
 
@@ -58,19 +58,20 @@ const paraspell = require('@paraspell/sdk')
58
58
 
59
59
  ```ts
60
60
 
61
- //xToken pallet:
61
+ //XCM pallet (Combined xTokens, polkadotXCM, ormlXTokens, XcmPallet & relayerXCM):
62
62
 
63
63
  //Transfer tokens from Parachain to Parachain
64
- paraspell.xTokens.transferParaToPara(api: ApiPromise, origin: origin Parachain name string, destination: destination Parachain ID, currency: currency symbol string, currencyID: number, amount: any, to: destination address string)
64
+ paraspell.xcmPallet.send(api: ApiPromise, origin: origin Parachain name string, currency: currency symbol string, currencyID: number (If applicable), amount: any, to: destination address string, destination: destination Parachain ID)
65
65
 
66
66
  //Transfer tokens from Parachain to Relay chain
67
- paraspell.xTokens.transferParaToRelay(api: ApiPromise, origin: origin Parachain name string, currency: currency symbol string, currencyID: number, amount: any, to: destination address string)
67
+ paraspell.xcmPallet.send(api: ApiPromise, origin: origin Parachain name string, currency: currency symbol string, currencyID: number (If applicable), amount: any, to: destination address string)
68
68
 
69
69
  //Transfer tokens from Relay chain to Parachain
70
- paraspell.xTokens.transferRelayToPara(api: ApiPromise, destination: destination Parachain ID, amount: any, to: destination address string)
70
+ paraspell.xcmPallet.transferRelayToPara(api: ApiPromise, destination: destination Parachain ID, amount: any, to: destination address string)
71
71
 
72
72
  //Transfer tokens from Relay chain to Parachain /w specific limit
73
- xTokens.xTokens.limitedTransferRelayToPara(api,destParaID,amount,destinationAddress,yourWeight,true)
73
+ paraspell.xcmPallet.limitedTransferRelayToPara(api,destParaID,amount,destinationAddress,yourWeight,true)
74
+
74
75
 
75
76
  //hrmp pallet:
76
77
 
@@ -83,8 +84,29 @@ paraspell.closeChannels.closeChannel(api: ApiPromise, origin: origin Parachain
83
84
  //Open HRMP channels
84
85
  paraspell.openChannels.openChannel(api: ApiPromise, origin: origin Parachain ID, destination: destination Parachain ID, maxSize: number, maxMessageSize: number)
85
86
 
86
-
87
87
 
88
+ //Asset pallet
89
+
90
+ //Returns assets object from assets.json for particular node including information about native and foreign assets
91
+ paraspell.getAssetsObject(node: TNode)
92
+
93
+ //Returns foreign assetId for particular node and asset symbol
94
+ paraspell.getAssetId(node: TNode, symbol: string)
95
+
96
+ //Returns symbol of the relay chain for particular node. Either "DOT" or "KSM"
97
+ paraspell.getRelayChainSymbol(node: TNode)
98
+
99
+ //Returns string array of native assets symbols for particular node
100
+ paraspell.getNativeAssets(node: TNode)
101
+
102
+ //Returns object array of foreign assets for particular node. Each object has symbol and assetId property
103
+ paraspell.getOtherAssets(node: TNode)
104
+
105
+ //Returns string array of all assets symbols. (native and foreign assets are merged to a single array)
106
+ paraspell.getAllAssetsSymbols(node: TNode)
107
+
108
+ //Checks if node supports particular asset. (Both native and foreign assets are searched). Returns boolean
109
+ paraspell.hasSupportForAsset(node: TNode, symbol: string)
88
110
  ```
89
111
 
90
112
  ##### Example of usage can be found in the UI repository [here](https://github.com/paraspell/ui)
@@ -104,8 +126,11 @@ paraspell.openChannels.openChannel(api: ApiPromise, origin: origin Parachain I
104
126
 
105
127
  - Run interactive tests using `pnpm dev`
106
128
 
129
+ ## Founded by
130
+ [![logo-v1](https://user-images.githubusercontent.com/55763425/204865221-90d2b3cd-f2ac-48a2-a367-08722aa8e923.svg)](https://bsx.fi/)
107
131
 
108
132
 
133
+
109
134
  ## License
110
135
 
111
136
  Made with 💛 by [ParaSpell✨](https://github.com/paraspell)