@paraspell/assets 10.11.9 → 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/dist/index.d.ts CHANGED
@@ -1,58 +1,58 @@
1
- import { TMultiLocation, TRelayChainSymbol, TNodeWithRelayChains, TNodeDotKsmWithRelayChains, Version } from '@paraspell/sdk-common';
1
+ import { TLocation, TChain, Version } from '@paraspell/sdk-common';
2
+
3
+ type TAsset<T = bigint> = TAssetV3<T> | TAssetV4<T>;
4
+ interface TAssetV3<T = bigint> {
5
+ id: {
6
+ Concrete: TLocation;
7
+ };
8
+ fun: {
9
+ Fungible: T;
10
+ };
11
+ }
12
+ interface TAssetV4<T = bigint> {
13
+ id: TLocation;
14
+ fun: {
15
+ Fungible: T;
16
+ };
17
+ }
2
18
 
3
19
  type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
4
20
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
5
21
  }[Keys];
6
- type TBaseAsset = {
22
+ type TBaseAssetInfo = {
7
23
  symbol: string;
8
- decimals?: number;
24
+ decimals: number;
9
25
  manuallyAdded?: boolean;
10
26
  alias?: string;
11
27
  existentialDeposit?: string;
12
28
  isFeeAsset?: boolean;
13
29
  };
14
- type TNativeAsset = TBaseAsset & {
30
+ type TNativeAssetInfo = TBaseAssetInfo & {
15
31
  isNative: true;
16
- multiLocation?: TMultiLocation;
32
+ location?: TLocation;
17
33
  };
18
- type TForeignAsset = TBaseAsset & AtLeastOne<{
34
+ type TForeignAssetInfo = TBaseAssetInfo & AtLeastOne<{
19
35
  assetId?: string;
20
- multiLocation?: TMultiLocation;
36
+ location?: TLocation;
21
37
  }>;
22
- type TForeignAssetWithId = TForeignAsset & {
38
+ type TForeignAssetWithId = TForeignAssetInfo & {
23
39
  assetId: string;
24
40
  };
25
- type TAsset = TNativeAsset | TForeignAsset;
26
- type TAssetWithLocation = TAsset & {
27
- multiLocation: TMultiLocation;
41
+ type TAssetInfo = TNativeAssetInfo | TForeignAssetInfo;
42
+ type TAssetWithLocation = TAssetInfo & {
43
+ location: TLocation;
28
44
  };
29
- type TNodeAssets = {
30
- relayChainAssetSymbol: TRelayChainSymbol;
45
+ type TChainAssetsInfo = {
46
+ relaychainSymbol: string;
31
47
  nativeAssetSymbol: string;
32
48
  isEVM: boolean;
33
49
  ss58Prefix: number;
34
50
  supportsDryRunApi: boolean;
35
51
  supportsXcmPaymentApi: boolean;
36
- nativeAssets: TNativeAsset[];
37
- otherAssets: TForeignAsset[];
52
+ nativeAssets: TNativeAssetInfo[];
53
+ otherAssets: TForeignAssetInfo[];
38
54
  };
39
- type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
40
-
41
- type TMultiAsset<T = bigint> = TMultiAssetV3<T> | TMultiAssetV4<T>;
42
- interface TMultiAssetV3<T = bigint> {
43
- id: {
44
- Concrete: TMultiLocation;
45
- };
46
- fun: {
47
- Fungible: T;
48
- };
49
- }
50
- interface TMultiAssetV4<T = bigint> {
51
- id: TMultiLocation;
52
- fun: {
53
- Fungible: T;
54
- };
55
- }
55
+ type TAssetJsonMap = Record<TChain, TChainAssetsInfo>;
56
56
 
57
57
  type TAmount = string | number | bigint;
58
58
  type TCurrency = string | number | bigint;
@@ -60,9 +60,9 @@ type TSymbolSpecifier = {
60
60
  type: 'Native' | 'Foreign' | 'ForeignAbstract';
61
61
  value: string;
62
62
  };
63
- type TOverrideMultiLocationSpecifier = {
63
+ type TOverrideLocationSpecifier = {
64
64
  type: 'Override';
65
- value: TMultiLocation;
65
+ value: TLocation;
66
66
  };
67
67
  type TCurrencySymbolValue = string | TSymbolSpecifier;
68
68
  type TCurrencySymbol = {
@@ -71,152 +71,148 @@ type TCurrencySymbol = {
71
71
  type TCurrencyCore = TCurrencySymbol | {
72
72
  id: TCurrency;
73
73
  } | {
74
- multilocation: TMultiLocationValue;
74
+ location: TLocationValue;
75
75
  };
76
- type TMultiAssetWithFee = TMultiAsset & {
76
+ type TAssetWithFee = TAsset & {
77
77
  isFeeAsset?: boolean;
78
78
  };
79
- type TMultiLocationValue = string | TMultiLocation;
80
- type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
79
+ type TLocationValue = string | TLocation;
80
+ type TLocationValueWithOverride = TLocationValue | TOverrideLocationSpecifier;
81
81
  type TCurrencyInputWithAmount = WithComplexAmount<TCurrencySymbol | {
82
82
  id: TCurrency;
83
83
  } | {
84
- multilocation: TMultiLocationValueWithOverride;
85
- }> | {
86
- multiasset: TMultiAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
87
- };
84
+ location: TLocationValueWithOverride;
85
+ }> | TAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
88
86
  type TCurrencyInput = TCurrencySymbol | {
89
87
  id: TCurrency;
90
88
  } | {
91
- multilocation: TMultiLocationValueWithOverride;
92
- } | {
93
- multiasset: TMultiAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
94
- };
89
+ location: TLocationValueWithOverride;
90
+ } | TAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
95
91
  type WithAmount<TBase, T = bigint> = TBase & {
96
92
  amount: T;
97
93
  };
98
94
  type WithComplexAmount<TBase> = WithAmount<TBase, TAmount>;
99
95
 
100
96
  /**
101
- * Retrieves the existential deposit value for a given node.
97
+ * Retrieves the existential deposit value for a given chain.
102
98
  *
103
- * @param node - The node for which to get the existential deposit.
104
- * @returns The existential deposit as a string if available; otherwise, null.
99
+ * @param chain - The chain for which to get the existential deposit.
100
+ * @returns The existential deposit as a bigint if available; otherwise, null.
105
101
  */
106
- declare const getExistentialDeposit: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => string | null;
107
- declare const getExistentialDepositOrThrow: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => bigint;
102
+ declare const getExistentialDeposit: (chain: TChain, currency?: TCurrencyCore) => bigint | null;
103
+ declare const getExistentialDepositOrThrow: (chain: TChain, currency?: TCurrencyCore) => bigint;
108
104
 
109
- declare const getFeeAssets: (node: TNodeDotKsmWithRelayChains) => Omit<TAsset, "isFeeAsset">[];
105
+ declare const getFeeAssets: (chain: TChain) => Omit<TAssetInfo, "isFeeAsset">[];
110
106
 
111
107
  /**
112
- * Retrieves the assets object for a given node containing the native and foreign assets.
108
+ * Retrieves the assets object for a given chain containing the native and foreign assets.
113
109
  *
114
- * @param node - The node for which to retrieve the assets object.
115
- * @returns The assets object associated with the given node.
110
+ * @param chain - The chain for which to retrieve the assets object.
111
+ * @returns The assets object associated with the given chain.
116
112
  */
117
- declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
118
- declare const isNodeEvm: (node: TNodeWithRelayChains) => boolean;
113
+ declare const getAssetsObject: (chain: TChain) => TChainAssetsInfo;
114
+ declare const isChainEvm: (chain: TChain) => boolean;
119
115
  /**
120
- * Retrieves the asset ID for a given symbol on a specified node.
116
+ * Retrieves the asset ID for a given symbol on a specified chain.
121
117
  *
122
- * @param node - The node to search for the asset.
118
+ * @param chain - The chain to search for the asset.
123
119
  * @param symbol - The symbol of the asset.
124
120
  * @returns The asset ID if found; otherwise, null.
125
121
  */
126
- declare const getAssetId: (node: TNodeWithRelayChains, symbol: string) => string | null;
122
+ declare const getAssetId: (chain: TChain, symbol: string) => string | null;
127
123
  /**
128
- * Retrieves the relay chain asset symbol for a specified node.
124
+ * Retrieves the relay chain asset symbol for a specified chain.
129
125
  *
130
- * @param node - The node for which to get the relay chain symbol.
126
+ * @param chain - The chain for which to get the relay chain symbol.
131
127
  * @returns The relay chain asset symbol.
132
128
  */
133
- declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSymbol;
129
+ declare const getRelayChainSymbol: (chain: TChain) => string;
134
130
  /**
135
- * Retrieves the list of native assets for a specified node.
131
+ * Retrieves the list of native assets for a specified chain.
136
132
  *
137
- * @param node - The node for which to get native assets.
133
+ * @param chain - The chain for which to get native assets.
138
134
  * @returns An array of native asset details.
139
135
  */
140
- declare const getNativeAssets: (node: TNodeWithRelayChains) => TNativeAsset[];
136
+ declare const getNativeAssets: (chain: TChain) => TNativeAssetInfo[];
141
137
  /**
142
- * Retrieves the list of other (non-native) assets for a specified node.
138
+ * Retrieves the list of other (non-native) assets for a specified chain.
143
139
  *
144
- * @param node - The node for which to get other assets.
140
+ * @param chain - The chain for which to get other assets.
145
141
  * @returns An array of other asset details.
146
142
  */
147
- declare const getOtherAssets: (node: TNodeWithRelayChains) => TForeignAsset[];
143
+ declare const getOtherAssets: (chain: TChain) => TForeignAssetInfo[];
148
144
  /**
149
- * Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
145
+ * Retrieves the complete list of assets for a specified chain, including relay chain asset, native, and other assets.
150
146
  *
151
- * @param node - The node for which to get the assets.
152
- * @returns An array of objects of all assets associated with the node.
147
+ * @param chain - The chain for which to get the assets.
148
+ * @returns An array of objects of all assets associated with the chain.
153
149
  */
154
- declare const getAssets: (node: TNodeWithRelayChains) => TAsset[];
150
+ declare const getAssets: (chain: TChain) => TAssetInfo[];
155
151
  /**
156
- * Retrieves the symbols of all assets (relay chain, native, and other assets) for a specified node.
152
+ * Retrieves the symbols of all assets (relay chain, native, and other assets) for a specified chain.
157
153
  *
158
- * @param node - The node for which to get asset symbols.
154
+ * @param chain - The chain for which to get asset symbols.
159
155
  * @returns An array of asset symbols.
160
156
  */
161
- declare const getAllAssetsSymbols: (node: TNodeWithRelayChains) => string[];
157
+ declare const getAllAssetsSymbols: (chain: TChain) => string[];
162
158
  /**
163
- * Retrieves the symbol of the native asset for a specified node.
159
+ * Retrieves the symbol of the native asset for a specified chain.
164
160
  *
165
- * @param node - The node for which to get the native asset symbol.
161
+ * @param chain - The chain for which to get the native asset symbol.
166
162
  * @returns The symbol of the native asset.
167
163
  */
168
- declare const getNativeAssetSymbol: (node: TNodeWithRelayChains) => string;
164
+ declare const getNativeAssetSymbol: (chain: TChain) => string;
169
165
  /**
170
- * Determines whether a specified node supports an asset with the given symbol.
166
+ * Determines whether a specified chain supports an asset with the given symbol.
171
167
  *
172
- * @param node - The node to check for asset support.
168
+ * @param chain - The chain to check for asset support.
173
169
  * @param symbol - The symbol of the asset to check.
174
170
  * @returns True if the asset is supported; otherwise, false.
175
171
  */
176
- declare const hasSupportForAsset: (node: TNodeWithRelayChains, symbol: string) => boolean;
172
+ declare const hasSupportForAsset: (chain: TChain, symbol: string) => boolean;
177
173
  /**
178
- * Retrieves the number of decimals for an asset with the given symbol on a specified node.
174
+ * Retrieves the number of decimals for an asset with the given symbol on a specified chain.
179
175
  *
180
- * @param node - The node where the asset is located.
176
+ * @param chain - The chain where the asset is located.
181
177
  * @param symbol - The symbol of the asset.
182
178
  * @returns The number of decimals if the asset is found; otherwise, null.
183
179
  */
184
- declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
185
- declare const hasDryRunSupport: (node: TNodeWithRelayChains) => boolean;
186
- declare const hasXcmPaymentApiSupport: (node: TNodeWithRelayChains) => boolean;
180
+ declare const getAssetDecimals: (chain: TChain, symbol: string) => number | null;
181
+ declare const hasDryRunSupport: (chain: TChain) => boolean;
182
+ declare const hasXcmPaymentApiSupport: (chain: TChain) => boolean;
187
183
 
188
184
  declare const Native: (symbol: string) => TSymbolSpecifier;
189
185
  declare const Foreign: (symbol: string) => TSymbolSpecifier;
190
186
  declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
191
- declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
187
+ declare const Override: (location: TLocation) => TOverrideLocationSpecifier;
192
188
 
193
- declare const filterEthCompatibleAssets: (assets: TForeignAsset[]) => TForeignAsset[];
189
+ declare const filterEthCompatibleAssets: (assets: TForeignAssetInfo[]) => TForeignAssetInfo[];
194
190
 
195
191
  /**
196
- * Retrieves the list of assets that are supported for transfers between two specified nodes.
192
+ * Retrieves the list of assets that are supported for transfers between two specified chains.
197
193
  *
198
- * @param origin - The origin node.
199
- * @param destination - The destination node.
200
- * @returns An array of assets supported between the origin and destination nodes.
194
+ * @param origin - The origin chain.
195
+ * @param destination - The destination chain.
196
+ * @returns An array of assets supported between the origin and destination chains.
201
197
  */
202
- declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains) => TAsset[];
198
+ declare const getSupportedAssets: (origin: TChain, destination: TChain) => TAssetInfo[];
203
199
 
204
- declare const getSupportedDestinations: (origin: TNodeWithRelayChains, currency: TCurrencyCore) => TNodeWithRelayChains[];
200
+ declare const getSupportedDestinations: (origin: TChain, currency: TCurrencyCore) => TChain[];
205
201
 
206
- declare const isAssetEqual: (asset1: TAsset, asset2: TAsset) => boolean;
202
+ declare const isAssetEqual: (asset1: TAssetInfo, asset2: TAssetInfo) => boolean;
207
203
 
208
204
  declare const isSymbolMatch: (symbolA: string, symbolB: string) => boolean;
209
205
 
210
206
  /**
211
- * Converts a multi-location to a specific XCM version . Defaults to XCM v4.
207
+ * Converts a location to a specific XCM version
212
208
  *
213
209
  * In XCM v3, `interior.X1` is a single `Object`. In XCM V4, `interior.X1` is an `Array<Object>`.
214
210
  *
215
- * @param multiLocation - The multi-location to normalize.
216
- * @param version - The target XCM version: `'V3'`, `'V4'` or `'V5'`. Defaults to `'V4'`.
217
- * @returns A new transformed `TMultiLocation`
211
+ * @param location - The location to normalize.
212
+ * @param version - The target XCM version: `'V3'`, `'V4'` or `'V5'`. Defaults to `'V5'`.
213
+ * @returns A new transformed `TLocation`
218
214
  */
219
- declare const normalizeMultiLocation: (multiLocation: TMultiLocation, version?: Version) => TMultiLocation;
215
+ declare const normalizeLocation: (location: TLocation, version?: Version) => TLocation;
220
216
 
221
217
  /**
222
218
  * Normalizes an asset symbol by stripping the 'xc' prefix (if present) and converting it to lowercase.
@@ -226,18 +222,18 @@ declare const normalizeMultiLocation: (multiLocation: TMultiLocation, version?:
226
222
  */
227
223
  declare const normalizeSymbol: (symbol: string | undefined) => string;
228
224
 
229
- declare const findAsset: (node: TNodeWithRelayChains, currency: TCurrencyInput, destination: TNodeWithRelayChains | null) => TAsset | null;
225
+ declare const findAssetInfo: (chain: TChain, currency: TCurrencyInput, destination: TChain | null) => TAssetInfo | null;
230
226
 
231
- declare const findAssetById: (assets: TForeignAsset[], assetId: TCurrency) => TForeignAsset | undefined;
227
+ declare const findAssetInfoById: (assets: TForeignAssetInfo[], assetId: TCurrency) => TForeignAssetInfo | undefined;
232
228
 
233
- declare const findAssetByMultiLocation: (foreignAssets: TForeignAsset[], multiLocation: string | TMultiLocation) => TForeignAsset | undefined;
229
+ declare const findAssetInfoByLoc: (foreignAssets: TForeignAssetInfo[], location: string | TLocation) => TForeignAssetInfo | undefined;
234
230
 
235
- declare const findAssetBySymbol: (destination: TNodeWithRelayChains | null, otherAssets: TForeignAsset[], nativeAssets: TNativeAsset[], symbol: TCurrencySymbolValue) => TAsset | undefined;
231
+ declare const findAssetInfoBySymbol: (destination: TChain | null, otherAssets: TForeignAssetInfo[], nativeAssets: TNativeAssetInfo[], symbol: TCurrencySymbolValue) => TAssetInfo | undefined;
236
232
 
237
- declare const findAssetForNodeOrThrow: (node: TNodeWithRelayChains, currency: TCurrencyInput, destination: TNodeWithRelayChains | null) => TAsset;
233
+ declare const findAssetInfoOnDest: (origin: TChain, destination: TChain, currency: TCurrencyInput, originAsset?: TAssetInfo | null) => TAssetInfo | null;
234
+ declare const findAssetOnDestOrThrow: (origin: TChain, destination: TChain, currency: TCurrencyInput) => TAssetInfo;
238
235
 
239
- declare const findAssetOnDest: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains, currency: TCurrencyInput, originAsset?: TAsset | null) => TAsset | null;
240
- declare const findAssetOnDestOrThrow: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains, currency: TCurrencyInput) => TAsset;
236
+ declare const findAssetInfoOrThrow: (chain: TChain, currency: TCurrencyInput, destination: TChain | null) => TAssetInfo;
241
237
 
242
238
  declare const findBestMatches: <T extends {
243
239
  symbol: string;
@@ -280,19 +276,19 @@ declare class InvalidCurrencyError extends Error {
280
276
  constructor(message: string);
281
277
  }
282
278
 
283
- declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
279
+ declare const isForeignAsset: (asset: TAssetInfo) => asset is TForeignAssetInfo;
284
280
 
285
- declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
281
+ declare const isOverrideLocationSpecifier: (locationSpecifier: TLocationValueWithOverride) => locationSpecifier is TOverrideLocationSpecifier;
286
282
 
287
283
  declare const isSymbolSpecifier: (currencySymbolValue: TCurrencySymbolValue) => currencySymbolValue is TSymbolSpecifier;
288
284
 
289
- declare const isTMultiAsset: <T = bigint>(value: unknown) => value is TMultiAsset<T>;
285
+ declare const isTAsset: <T = bigint>(value: unknown) => value is TAsset<T>;
290
286
 
291
- declare const compareMultiLocations: (input: string, asset: TForeignAsset) => boolean;
287
+ declare const compareLocations: (input: string, asset: TForeignAssetInfo) => boolean;
292
288
 
293
- declare const extractMultiAssetLoc: <T = bigint>(multiAsset: TMultiAsset<T>) => TMultiLocation;
289
+ declare const extractAssetLocation: <T = bigint>(asset: TAsset<T>) => TLocation;
294
290
 
295
- declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
291
+ declare const getAssetLocation: (chain: TChain, currency: TCurrencyInput) => TLocation | null;
296
292
 
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 };
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 };
293
+ export { DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, InvalidCurrencyError, Native, Override, compareLocations, extractAssetLocation, filterEthCompatibleAssets, findAssetInfo, findAssetInfoById, findAssetInfoByLoc, findAssetInfoBySymbol, findAssetInfoOnDest, findAssetInfoOrThrow, findAssetOnDestOrThrow, findBestMatches, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetLocation, getAssets, getAssetsObject, getExistentialDeposit, getExistentialDepositOrThrow, getFeeAssets, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getSupportedDestinations, hasDryRunSupport, hasSupportForAsset, hasXcmPaymentApiSupport, isAssetEqual, isChainEvm, isForeignAsset, isOverrideLocationSpecifier, isSymbolMatch, isSymbolSpecifier, isTAsset, normalizeLocation, normalizeSymbol };
294
+ export type { TAmount, TAsset, TAssetInfo, TAssetJsonMap, TAssetV3, TAssetV4, TAssetWithFee, TAssetWithLocation, TChainAssetsInfo, TCurrency, TCurrencyCore, TCurrencyInput, TCurrencyInputWithAmount, TCurrencySymbol, TCurrencySymbolValue, TForeignAssetInfo, TForeignAssetWithId, TLocationValue, TLocationValueWithOverride, TNativeAssetInfo, TOverrideLocationSpecifier, TSymbolSpecifier, WithAmount, WithComplexAmount };