@paraspell/assets 12.2.2 → 12.4.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/LICENSE +1 -1
- package/README.md +10 -7
- package/dist/index.mjs +280 -6
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<h1 align="center">@paraspell/assets</h1>
|
|
5
|
-
<h4 align="center"> Pallet queries for Polkadot and
|
|
5
|
+
<h4 align="center"> Pallet queries for Polkadot, Kusama, Paseo and Westend Parachains. </h4>
|
|
6
6
|
<p align="center">
|
|
7
7
|
<a href="https://npmjs.com/package/@paraspell/assets">
|
|
8
8
|
<img alt="version" src="https://img.shields.io/npm/v/@paraspell/assets?style=flat-square" />
|
|
@@ -186,7 +186,8 @@ getAssetLocation(TChain, { symbol: symbol } | { id: assetId })
|
|
|
186
186
|
|
|
187
187
|
- Update existential deposits in the map using script - `pnpm updateEds`
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
> [!NOTE]
|
|
190
|
+
> Asset queries can be tested in [XCM Playground](https://github.com/paraspell/xcm-tools/tree/main/apps/playground).
|
|
190
191
|
|
|
191
192
|
## Contribute to XCM Tools and earn rewards 💰
|
|
192
193
|
|
|
@@ -206,8 +207,10 @@ Published under [MIT License](https://github.com/paraspell/xcm-tools/blob/main/p
|
|
|
206
207
|
|
|
207
208
|
## Supported by
|
|
208
209
|
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
<p align="center">
|
|
211
|
+
<picture>
|
|
212
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_transparent.png">
|
|
213
|
+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_w3f_standard.png">
|
|
214
|
+
<img width="750" alt="Shows a black logo in light color mode and a white one in dark color mode." src="https://github.com/paraspell/presskit/blob/main/logos_supporters/polkadot_kusama_w3f_standard.png">
|
|
215
|
+
</picture>
|
|
216
|
+
</p>
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Version, deepEqual, getJunctionValue, hasJunction, replaceBigInt, isSubstrateBridge, CHAINS } from '@paraspell/sdk-common';
|
|
1
|
+
import { Version, deepEqual, isExternalChain, getJunctionValue, hasJunction, replaceBigInt, isSubstrateBridge, CHAINS } from '@paraspell/sdk-common';
|
|
2
2
|
|
|
3
3
|
var Polkadot = {
|
|
4
4
|
relaychainSymbol: "DOT",
|
|
@@ -764,9 +764,15 @@ var Ajuna = {
|
|
|
764
764
|
location: {
|
|
765
765
|
parents: 1,
|
|
766
766
|
interior: {
|
|
767
|
-
|
|
767
|
+
X2: [
|
|
768
768
|
{
|
|
769
769
|
Parachain: 2051
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
GeneralKey: {
|
|
773
|
+
length: 4,
|
|
774
|
+
data: "0x414a554e00000000000000000000000000000000000000000000000000000000"
|
|
775
|
+
}
|
|
770
776
|
}
|
|
771
777
|
]
|
|
772
778
|
}
|
|
@@ -4178,6 +4184,32 @@ var Hydration = {
|
|
|
4178
4184
|
},
|
|
4179
4185
|
isFeeAsset: true
|
|
4180
4186
|
},
|
|
4187
|
+
{
|
|
4188
|
+
assetId: "43",
|
|
4189
|
+
symbol: "PRIME",
|
|
4190
|
+
decimals: 6,
|
|
4191
|
+
existentialDeposit: "9901",
|
|
4192
|
+
location: {
|
|
4193
|
+
parents: 1,
|
|
4194
|
+
interior: {
|
|
4195
|
+
X3: [
|
|
4196
|
+
{
|
|
4197
|
+
Parachain: 2004
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
PalletInstance: 110
|
|
4201
|
+
},
|
|
4202
|
+
{
|
|
4203
|
+
AccountKey20: {
|
|
4204
|
+
network: null,
|
|
4205
|
+
key: "0x52b2f622f5676e92dbea3092004eb9ffb85a8d07"
|
|
4206
|
+
}
|
|
4207
|
+
}
|
|
4208
|
+
]
|
|
4209
|
+
}
|
|
4210
|
+
},
|
|
4211
|
+
isFeeAsset: true
|
|
4212
|
+
},
|
|
4181
4213
|
{
|
|
4182
4214
|
assetId: "5",
|
|
4183
4215
|
symbol: "DOT",
|
|
@@ -11437,6 +11469,7 @@ var Jamton = {
|
|
|
11437
11469
|
assets: [
|
|
11438
11470
|
{
|
|
11439
11471
|
isNative: true,
|
|
11472
|
+
assetId: "0",
|
|
11440
11473
|
symbol: "DOTON",
|
|
11441
11474
|
decimals: 18,
|
|
11442
11475
|
existentialDeposit: "1000000000000000",
|
|
@@ -11453,12 +11486,14 @@ var Jamton = {
|
|
|
11453
11486
|
},
|
|
11454
11487
|
{
|
|
11455
11488
|
isNative: true,
|
|
11489
|
+
assetId: "2",
|
|
11456
11490
|
symbol: "jamTON",
|
|
11457
11491
|
decimals: 9,
|
|
11458
11492
|
existentialDeposit: "1000000"
|
|
11459
11493
|
},
|
|
11460
11494
|
{
|
|
11461
11495
|
isNative: true,
|
|
11496
|
+
assetId: "1",
|
|
11462
11497
|
symbol: "stDOT",
|
|
11463
11498
|
decimals: 10,
|
|
11464
11499
|
existentialDeposit: "10000000"
|
|
@@ -15176,7 +15211,7 @@ var Ethereum = {
|
|
|
15176
15211
|
ss58Prefix: 42,
|
|
15177
15212
|
supportsDryRunApi: false,
|
|
15178
15213
|
supportsXcmPaymentApi: false,
|
|
15179
|
-
relaychainSymbol: "
|
|
15214
|
+
relaychainSymbol: "ETH",
|
|
15180
15215
|
nativeAssetSymbol: "ETH",
|
|
15181
15216
|
assets: [
|
|
15182
15217
|
{
|
|
@@ -16137,6 +16172,244 @@ var Ethereum = {
|
|
|
16137
16172
|
}
|
|
16138
16173
|
]
|
|
16139
16174
|
};
|
|
16175
|
+
var EthereumTestnet = {
|
|
16176
|
+
isEVM: true,
|
|
16177
|
+
ss58Prefix: 42,
|
|
16178
|
+
supportsDryRunApi: false,
|
|
16179
|
+
supportsXcmPaymentApi: false,
|
|
16180
|
+
relaychainSymbol: "ETH",
|
|
16181
|
+
nativeAssetSymbol: "ETH",
|
|
16182
|
+
assets: [
|
|
16183
|
+
{
|
|
16184
|
+
symbol: "ETH",
|
|
16185
|
+
assetId: "0x0000000000000000000000000000000000000000",
|
|
16186
|
+
decimals: 18,
|
|
16187
|
+
existentialDeposit: "15000000000000",
|
|
16188
|
+
location: {
|
|
16189
|
+
parents: 2,
|
|
16190
|
+
interior: {
|
|
16191
|
+
X1: [
|
|
16192
|
+
{
|
|
16193
|
+
GlobalConsensus: {
|
|
16194
|
+
Ethereum: {
|
|
16195
|
+
chainId: 11155111
|
|
16196
|
+
}
|
|
16197
|
+
}
|
|
16198
|
+
}
|
|
16199
|
+
]
|
|
16200
|
+
}
|
|
16201
|
+
}
|
|
16202
|
+
},
|
|
16203
|
+
{
|
|
16204
|
+
symbol: "MUSE",
|
|
16205
|
+
assetId: "0xb34a6924a02100ba6ef12af1c798285e8f7a16ee",
|
|
16206
|
+
decimals: 18,
|
|
16207
|
+
existentialDeposit: "1",
|
|
16208
|
+
location: {
|
|
16209
|
+
parents: 2,
|
|
16210
|
+
interior: {
|
|
16211
|
+
X2: [
|
|
16212
|
+
{
|
|
16213
|
+
GlobalConsensus: {
|
|
16214
|
+
Ethereum: {
|
|
16215
|
+
chainId: 11155111
|
|
16216
|
+
}
|
|
16217
|
+
}
|
|
16218
|
+
},
|
|
16219
|
+
{
|
|
16220
|
+
AccountKey20: {
|
|
16221
|
+
network: null,
|
|
16222
|
+
key: "0xb34a6924a02100ba6ef12af1c798285e8f7a16ee"
|
|
16223
|
+
}
|
|
16224
|
+
}
|
|
16225
|
+
]
|
|
16226
|
+
}
|
|
16227
|
+
}
|
|
16228
|
+
},
|
|
16229
|
+
{
|
|
16230
|
+
symbol: "wPILT",
|
|
16231
|
+
assetId: "0x22e12ed4e6bcde652a73552dde340fcb972eef89",
|
|
16232
|
+
decimals: 15,
|
|
16233
|
+
existentialDeposit: "1",
|
|
16234
|
+
location: {
|
|
16235
|
+
parents: 2,
|
|
16236
|
+
interior: {
|
|
16237
|
+
X2: [
|
|
16238
|
+
{
|
|
16239
|
+
GlobalConsensus: {
|
|
16240
|
+
Ethereum: {
|
|
16241
|
+
chainId: 11155111
|
|
16242
|
+
}
|
|
16243
|
+
}
|
|
16244
|
+
},
|
|
16245
|
+
{
|
|
16246
|
+
AccountKey20: {
|
|
16247
|
+
network: null,
|
|
16248
|
+
key: "0x22e12ed4e6bcde652a73552dde340fcb972eef89"
|
|
16249
|
+
}
|
|
16250
|
+
}
|
|
16251
|
+
]
|
|
16252
|
+
}
|
|
16253
|
+
}
|
|
16254
|
+
},
|
|
16255
|
+
{
|
|
16256
|
+
symbol: "TRAC",
|
|
16257
|
+
assetId: "0xef32abea56beff54f61da319a7311098d6fbcea9",
|
|
16258
|
+
decimals: 18,
|
|
16259
|
+
existentialDeposit: "1",
|
|
16260
|
+
location: {
|
|
16261
|
+
parents: 2,
|
|
16262
|
+
interior: {
|
|
16263
|
+
X2: [
|
|
16264
|
+
{
|
|
16265
|
+
GlobalConsensus: {
|
|
16266
|
+
Ethereum: {
|
|
16267
|
+
chainId: 11155111
|
|
16268
|
+
}
|
|
16269
|
+
}
|
|
16270
|
+
},
|
|
16271
|
+
{
|
|
16272
|
+
AccountKey20: {
|
|
16273
|
+
network: null,
|
|
16274
|
+
key: "0xef32abea56beff54f61da319a7311098d6fbcea9"
|
|
16275
|
+
}
|
|
16276
|
+
}
|
|
16277
|
+
]
|
|
16278
|
+
}
|
|
16279
|
+
}
|
|
16280
|
+
},
|
|
16281
|
+
{
|
|
16282
|
+
symbol: "KILT",
|
|
16283
|
+
assetId: "0x99e743964c036bc28931fb564817db428aa7f752",
|
|
16284
|
+
decimals: 15,
|
|
16285
|
+
existentialDeposit: "1",
|
|
16286
|
+
location: {
|
|
16287
|
+
parents: 2,
|
|
16288
|
+
interior: {
|
|
16289
|
+
X2: [
|
|
16290
|
+
{
|
|
16291
|
+
GlobalConsensus: {
|
|
16292
|
+
Ethereum: {
|
|
16293
|
+
chainId: 11155111
|
|
16294
|
+
}
|
|
16295
|
+
}
|
|
16296
|
+
},
|
|
16297
|
+
{
|
|
16298
|
+
AccountKey20: {
|
|
16299
|
+
network: null,
|
|
16300
|
+
key: "0x99e743964c036bc28931fb564817db428aa7f752"
|
|
16301
|
+
}
|
|
16302
|
+
}
|
|
16303
|
+
]
|
|
16304
|
+
}
|
|
16305
|
+
}
|
|
16306
|
+
},
|
|
16307
|
+
{
|
|
16308
|
+
symbol: "WETH",
|
|
16309
|
+
assetId: "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
|
|
16310
|
+
decimals: 18,
|
|
16311
|
+
existentialDeposit: "15000000000000",
|
|
16312
|
+
location: {
|
|
16313
|
+
parents: 2,
|
|
16314
|
+
interior: {
|
|
16315
|
+
X2: [
|
|
16316
|
+
{
|
|
16317
|
+
GlobalConsensus: {
|
|
16318
|
+
Ethereum: {
|
|
16319
|
+
chainId: 11155111
|
|
16320
|
+
}
|
|
16321
|
+
}
|
|
16322
|
+
},
|
|
16323
|
+
{
|
|
16324
|
+
AccountKey20: {
|
|
16325
|
+
network: null,
|
|
16326
|
+
key: "0xfff9976782d46cc05630d1f6ebab18b2324d6b14"
|
|
16327
|
+
}
|
|
16328
|
+
}
|
|
16329
|
+
]
|
|
16330
|
+
}
|
|
16331
|
+
}
|
|
16332
|
+
},
|
|
16333
|
+
{
|
|
16334
|
+
symbol: "eFRQCY",
|
|
16335
|
+
assetId: "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620",
|
|
16336
|
+
decimals: 12,
|
|
16337
|
+
existentialDeposit: "1",
|
|
16338
|
+
location: {
|
|
16339
|
+
parents: 2,
|
|
16340
|
+
interior: {
|
|
16341
|
+
X2: [
|
|
16342
|
+
{
|
|
16343
|
+
GlobalConsensus: {
|
|
16344
|
+
Ethereum: {
|
|
16345
|
+
chainId: 11155111
|
|
16346
|
+
}
|
|
16347
|
+
}
|
|
16348
|
+
},
|
|
16349
|
+
{
|
|
16350
|
+
AccountKey20: {
|
|
16351
|
+
network: null,
|
|
16352
|
+
key: "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620"
|
|
16353
|
+
}
|
|
16354
|
+
}
|
|
16355
|
+
]
|
|
16356
|
+
}
|
|
16357
|
+
}
|
|
16358
|
+
},
|
|
16359
|
+
{
|
|
16360
|
+
symbol: "XRQCY",
|
|
16361
|
+
assetId: "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f",
|
|
16362
|
+
decimals: 8,
|
|
16363
|
+
existentialDeposit: "1",
|
|
16364
|
+
location: {
|
|
16365
|
+
parents: 2,
|
|
16366
|
+
interior: {
|
|
16367
|
+
X2: [
|
|
16368
|
+
{
|
|
16369
|
+
GlobalConsensus: {
|
|
16370
|
+
Ethereum: {
|
|
16371
|
+
chainId: 11155111
|
|
16372
|
+
}
|
|
16373
|
+
}
|
|
16374
|
+
},
|
|
16375
|
+
{
|
|
16376
|
+
AccountKey20: {
|
|
16377
|
+
network: null,
|
|
16378
|
+
key: "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f"
|
|
16379
|
+
}
|
|
16380
|
+
}
|
|
16381
|
+
]
|
|
16382
|
+
}
|
|
16383
|
+
}
|
|
16384
|
+
},
|
|
16385
|
+
{
|
|
16386
|
+
symbol: "WND",
|
|
16387
|
+
assetId: "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e",
|
|
16388
|
+
decimals: 12,
|
|
16389
|
+
existentialDeposit: "1",
|
|
16390
|
+
location: {
|
|
16391
|
+
parents: 2,
|
|
16392
|
+
interior: {
|
|
16393
|
+
X2: [
|
|
16394
|
+
{
|
|
16395
|
+
GlobalConsensus: {
|
|
16396
|
+
Ethereum: {
|
|
16397
|
+
chainId: 11155111
|
|
16398
|
+
}
|
|
16399
|
+
}
|
|
16400
|
+
},
|
|
16401
|
+
{
|
|
16402
|
+
AccountKey20: {
|
|
16403
|
+
network: null,
|
|
16404
|
+
key: "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e"
|
|
16405
|
+
}
|
|
16406
|
+
}
|
|
16407
|
+
]
|
|
16408
|
+
}
|
|
16409
|
+
}
|
|
16410
|
+
}
|
|
16411
|
+
]
|
|
16412
|
+
};
|
|
16140
16413
|
var Mythos = {
|
|
16141
16414
|
relaychainSymbol: "DOT",
|
|
16142
16415
|
nativeAssetSymbol: "MYTH",
|
|
@@ -20358,6 +20631,7 @@ var assetsMapJson = {
|
|
|
20358
20631
|
Collectives: Collectives,
|
|
20359
20632
|
Phala: Phala,
|
|
20360
20633
|
Ethereum: Ethereum,
|
|
20634
|
+
EthereumTestnet: EthereumTestnet,
|
|
20361
20635
|
Mythos: Mythos,
|
|
20362
20636
|
Peaq: Peaq,
|
|
20363
20637
|
AssetHubWestend: AssetHubWestend,
|
|
@@ -20807,7 +21081,7 @@ var findAssetInfoBySymbol = function findAssetInfoBySymbol(destination, otherAss
|
|
|
20807
21081
|
} else if (type === 'Foreign') {
|
|
20808
21082
|
var lowerSymbol = value.toLowerCase();
|
|
20809
21083
|
var otherAssetsMatches = [];
|
|
20810
|
-
if (destination
|
|
21084
|
+
if (destination && isExternalChain(destination)) {
|
|
20811
21085
|
return findEthMatch(value, otherAssets);
|
|
20812
21086
|
}
|
|
20813
21087
|
if (lowerSymbol.endsWith('.e')) {
|
|
@@ -20843,7 +21117,7 @@ var findAssetInfoBySymbol = function findAssetInfoBySymbol(destination, otherAss
|
|
|
20843
21117
|
var _lowerSymbol = symbol.toLowerCase();
|
|
20844
21118
|
var _otherAssetsMatches = [];
|
|
20845
21119
|
var nativeAssetsMatches = [];
|
|
20846
|
-
if (destination
|
|
21120
|
+
if (destination && isExternalChain(destination)) {
|
|
20847
21121
|
return findEthMatch(symbol, otherAssets);
|
|
20848
21122
|
}
|
|
20849
21123
|
if (_lowerSymbol.endsWith('.e')) {
|
|
@@ -21002,7 +21276,7 @@ var findAssetOnDestOrThrow = function findAssetOnDestOrThrow(origin, destination
|
|
|
21002
21276
|
var createSelection = function createSelection(chain) {
|
|
21003
21277
|
var nativeSymbol = getNativeAssetSymbol(chain);
|
|
21004
21278
|
return {
|
|
21005
|
-
symbol: chain
|
|
21279
|
+
symbol: isExternalChain(chain) ? nativeSymbol : Native(nativeSymbol)
|
|
21006
21280
|
};
|
|
21007
21281
|
};
|
|
21008
21282
|
var findNativeAssetInfo = function findNativeAssetInfo(chain) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/assets",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.0",
|
|
4
4
|
"description": "Assets for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@paraspell/sdk-common": "12.
|
|
26
|
+
"@paraspell/sdk-common": "12.4.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|