@paraspell/assets 10.10.9 → 10.10.11

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
@@ -121,13 +121,19 @@ getAssetMultiLocation(chainFrom, { symbol: symbol } | { id: assetId })
121
121
 
122
122
  Assets can be tested in [Playground](https://playground.paraspell.xyz/xcm-sdk/assets).
123
123
 
124
+ ## Get Support 🚑
125
+
126
+ - Contact form on our [landing page](https://paraspell.xyz/#contact-us).
127
+ - Message us on our [X](https://x.com/paraspell).
128
+ - Support channel on [telegram](https://t.me/paraspell).
129
+
124
130
  ## License
125
131
 
126
132
  Made with 💛 by [ParaSpell✨](https://paraspell.xyz/)
127
133
 
128
134
  Published under [MIT License](https://github.com/paraspell/xcm-tools/blob/main/packages/assets/LICENSE).
129
135
 
130
- ## Support
136
+ ## Supported by
131
137
 
132
138
  <div align="center">
133
139
  <p align="center">
package/dist/index.d.ts CHANGED
@@ -19,6 +19,9 @@ type TForeignAsset = TBaseAsset & AtLeastOne<{
19
19
  assetId?: string;
20
20
  multiLocation?: TMultiLocation;
21
21
  }>;
22
+ type TForeignAssetWithId = TForeignAsset & {
23
+ assetId: string;
24
+ };
22
25
  type TAsset = TNativeAsset | TForeignAsset;
23
26
  type TAssetWithLocation = TAsset & {
24
27
  multiLocation: TMultiLocation;
@@ -35,19 +38,19 @@ type TNodeAssets = {
35
38
  };
36
39
  type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
37
40
 
38
- type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
39
- interface TMultiAssetV3 {
41
+ type TMultiAsset<T = bigint> = TMultiAssetV3<T> | TMultiAssetV4<T>;
42
+ interface TMultiAssetV3<T = bigint> {
40
43
  id: {
41
44
  Concrete: TMultiLocation;
42
45
  };
43
46
  fun: {
44
- Fungible: TAmount;
47
+ Fungible: T;
45
48
  };
46
49
  }
47
- interface TMultiAssetV4 {
50
+ interface TMultiAssetV4<T = bigint> {
48
51
  id: TMultiLocation;
49
52
  fun: {
50
- Fungible: TAmount;
53
+ Fungible: T;
51
54
  };
52
55
  }
53
56
 
@@ -75,23 +78,24 @@ type TMultiAssetWithFee = TMultiAsset & {
75
78
  };
76
79
  type TMultiLocationValue = string | TMultiLocation;
77
80
  type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
78
- type TCurrencyInputWithAmount = WithAmount<TCurrencySymbol | {
81
+ type TCurrencyInputWithAmount = WithComplexAmount<TCurrencySymbol | {
79
82
  id: TCurrency;
80
83
  } | {
81
84
  multilocation: TMultiLocationValueWithOverride;
82
85
  }> | {
83
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
86
+ multiasset: TMultiAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
84
87
  };
85
88
  type TCurrencyInput = TCurrencySymbol | {
86
89
  id: TCurrency;
87
90
  } | {
88
91
  multilocation: TMultiLocationValueWithOverride;
89
92
  } | {
90
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
93
+ multiasset: TMultiAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
91
94
  };
92
- type WithAmount<TBase> = TBase & {
93
- amount: TAmount;
95
+ type WithAmount<TBase, T = bigint> = TBase & {
96
+ amount: T;
94
97
  };
98
+ type WithComplexAmount<TBase> = WithAmount<TBase, TAmount>;
95
99
 
96
100
  /**
97
101
  * Retrieves the existential deposit value for a given node.
@@ -282,13 +286,13 @@ declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiL
282
286
 
283
287
  declare const isSymbolSpecifier: (currencySymbolValue: TCurrencySymbolValue) => currencySymbolValue is TSymbolSpecifier;
284
288
 
285
- declare const isTMultiAsset: (value: unknown) => value is TMultiAsset;
289
+ declare const isTMultiAsset: <T = bigint>(value: unknown) => value is TMultiAsset<T>;
286
290
 
287
291
  declare const compareMultiLocations: (input: string, asset: TForeignAsset) => boolean;
288
292
 
289
- declare const extractMultiAssetLoc: (multiAsset: TMultiAsset) => TMultiLocation;
293
+ declare const extractMultiAssetLoc: <T = bigint>(multiAsset: TMultiAsset<T>) => TMultiLocation;
290
294
 
291
295
  declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
292
296
 
293
297
  export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareMultiLocations, extractMultiAssetLoc, filterEthCompatibleAssets, findAsset, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findAssetForNodeOrThrow, findAssetOnDest, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTMultiAsset, normalizeMultiLocation, normalizeSymbol };
294
- export type { TAmount, TAsset, TAssetJsonMap, TAssetWithLocation, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount };
298
+ export type { TAmount, TAsset, TAssetJsonMap, TAssetWithLocation, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAsset, TForeignAssetWithId, TMultiAsset, TMultiAssetV3, TMultiAssetV4, TMultiAssetWithFee, TMultiLocationValue, TMultiLocationValueWithOverride, TNativeAsset, TNodeAssets, TOverrideMultiLocationSpecifier, TSymbolSpecifier, WithAmount, WithComplexAmount };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/assets",
3
- "version": "10.10.9",
3
+ "version": "10.10.11",
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": "10.10.9"
26
+ "@paraspell/sdk-common": "10.10.11"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/plugin-syntax-import-attributes": "^7.27.1",