@paraspell/sdk 0.0.16 → 0.0.19
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 +18 -8
- package/dist/index.cjs +1386 -561
- package/dist/index.d.ts +30 -11
- package/dist/index.mjs +1386 -562
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,28 +84,38 @@ paraspell.openChannels.openChannel(api: ApiPromise, origin: origin Parachain I
|
|
|
84
84
|
//Asset pallet
|
|
85
85
|
|
|
86
86
|
//Returns assets object from assets.json for particular node including information about native and foreign assets
|
|
87
|
-
paraspell.getAssetsObject(node: TNode)
|
|
87
|
+
paraspell.assets.getAssetsObject(node: TNode)
|
|
88
88
|
|
|
89
89
|
//Returns foreign assetId for particular node and asset symbol
|
|
90
|
-
paraspell.getAssetId(node: TNode, symbol: string)
|
|
90
|
+
paraspell.assets.getAssetId(node: TNode, symbol: string)
|
|
91
91
|
|
|
92
92
|
//Returns symbol of the relay chain for particular node. Either "DOT" or "KSM"
|
|
93
|
-
paraspell.getRelayChainSymbol(node: TNode)
|
|
93
|
+
paraspell.assets.getRelayChainSymbol(node: TNode)
|
|
94
94
|
|
|
95
95
|
//Returns string array of native assets symbols for particular node
|
|
96
|
-
paraspell.getNativeAssets(node: TNode)
|
|
96
|
+
paraspell.assets.getNativeAssets(node: TNode)
|
|
97
97
|
|
|
98
98
|
//Returns object array of foreign assets for particular node. Each object has symbol and assetId property
|
|
99
|
-
paraspell.getOtherAssets(node: TNode)
|
|
99
|
+
paraspell.assets.getOtherAssets(node: TNode)
|
|
100
100
|
|
|
101
101
|
//Returns string array of all assets symbols. (native and foreign assets are merged to a single array)
|
|
102
|
-
paraspell.getAllAssetsSymbols(node: TNode)
|
|
102
|
+
paraspell.assets.getAllAssetsSymbols(node: TNode)
|
|
103
103
|
|
|
104
104
|
//Checks if node supports particular asset. (Both native and foreign assets are searched). Returns boolean
|
|
105
|
-
paraspell.hasSupportForAsset(node: TNode, symbol: string)
|
|
105
|
+
paraspell.assets.hasSupportForAsset(node: TNode, symbol: string)
|
|
106
|
+
|
|
107
|
+
//Get decimals for specific asset
|
|
108
|
+
paraspell.assets.getAssetDecimals(node: TNode, symbol: string)
|
|
109
|
+
|
|
110
|
+
//Get specific node id
|
|
111
|
+
paraspell.assets.getParaId(node: TNode)
|
|
112
|
+
|
|
113
|
+
//Import all compatible nodes as constant:
|
|
114
|
+
paraspell.NODE_NAMES
|
|
115
|
+
|
|
106
116
|
```
|
|
107
117
|
|
|
108
|
-
##### Example of usage can be found in the UI repository [here](https://github.com/paraspell/ui)
|
|
118
|
+
##### Example of usage can be found in the UI repository [here](https://github.com/paraspell/ui) or in the Astarot repository [here](https://github.com/paraspell/astarot)
|
|
109
119
|
##### List of currently compatible nodes can be found [here](https://github.com/paraspell/sdk/blob/beta-pre-release/docs/supportedNodes.md)
|
|
110
120
|
|
|
111
121
|
|