@paraspell/assets 10.11.10 → 11.0.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.
package/README.md CHANGED
@@ -38,7 +38,7 @@ pnpm | npm install || yarn add @paraspell/assets
38
38
 
39
39
  To use this functionality you first have to import it in the following way.
40
40
  ```ts
41
- import { getAssetsObject, getAssetId, getRelayChainSymbol, getNativeAssets, getNativeAssets, getOtherAssets, getAllAssetsSymbols, hasSupportForAsset, getAssetDecimals, getParaId, getTNode, getAssetMultiLocation, NODE_NAMES } from '@paraspell/assets'
41
+ import { getAssetsObject, getAssetId, getRelayChainSymbol, getNativeAssets, getNativeAssets, getOtherAssets, getAllAssetsSymbols, hasSupportForAsset, getAssetDecimals, getParaId, getTChain, getAssetLocation, CHAINS } from '@paraspell/assets'
42
42
  ```
43
43
 
44
44
 
@@ -76,7 +76,7 @@ getAllAssetsSymbols('Acala')
76
76
  ### Query asset support
77
77
  The function checks if Parachain supports a particular asset. (Both native and foreign assets are searched). Returns boolean
78
78
  ```ts
79
- hasSupportForAsset(node: TNode, symbol: string)
79
+ hasSupportForAsset(chain: TChain, symbol: string)
80
80
  ```
81
81
  ### Query asset decimals
82
82
  The function returns decimals for a specific asset
@@ -90,21 +90,21 @@ getParaId('Basilisk')
90
90
  ```
91
91
 
92
92
  ### Query Parachain name
93
- Function to get specific TNode from Parachain id
93
+ Function to get specific TChain from Parachain id
94
94
  ```ts
95
- getTNode(nodeID: number, ecosystem: 'polkadot' || 'kusama' || 'ethereum') //When Ethereum ecosystem is selected please fill nodeID as 1 to select Ethereum.
95
+ getTChain(chainID: number, ecosystem: 'Polkadot' | 'Kusama' | 'Ethereum' | 'Paseo' | 'Westend') //When Ethereum ecosystem is selected please fill chainID as 1 to select Ethereum.
96
96
  ```
97
97
 
98
- ### Import Parachains as constant
99
- Import all compatible Parachains as constant
98
+ ### Import chains as constant
99
+ Import all compatible chains as constant
100
100
  ```ts
101
- console.log(NODE_NAMES)
101
+ console.log(CHAINS)
102
102
  ```
103
103
 
104
- ### Convert id or symbol to multilocation
105
- Get multilocation for asset id or symbol.
104
+ ### Convert id or symbol to location
105
+ Get location for asset id or symbol.
106
106
  ```ts
107
- getAssetMultiLocation(chainFrom, { symbol: symbol } | { id: assetId })
107
+ getAssetLocation(chainFrom, { symbol: symbol } | { id: assetId })
108
108
  ```
109
109
 
110
110
  ## 💻 Tests