@swapkit/helpers 1.0.0-rc.83 → 1.0.0-rc.85
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.js +956 -0
- package/dist/index.js.map +22 -0
- package/package.json +19 -28
- package/src/helpers/__tests__/asset.test.ts +82 -66
- package/src/helpers/__tests__/memo.test.ts +2 -2
- package/src/helpers/__tests__/others.test.ts +11 -33
- package/src/helpers/__tests__/validators.test.ts +24 -0
- package/src/helpers/asset.ts +1 -1
- package/src/helpers/others.ts +17 -22
- package/src/helpers/validators.ts +8 -0
- package/src/modules/__tests__/assetValue.test.ts +3 -3
- package/src/modules/__tests__/bigIntArithmetics.test.ts +1 -1
- package/src/modules/__tests__/swapKitNumber.test.ts +1 -1
- package/src/modules/assetValue.ts +4 -4
- package/src/modules/bigIntArithmetics.ts +7 -7
- package/src/modules/swapKitError.ts +1 -1
- package/LICENSE +0 -201
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -408
- package/dist/index.es.js +0 -856
- package/dist/index.es.js.map +0 -1
package/dist/index.d.ts
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { BaseDecimal } from '@swapkit/types';
|
|
2
|
-
import { Chain } from '@swapkit/types';
|
|
3
|
-
import type { ChainflipList } from '@swapkit/tokens';
|
|
4
|
-
import { ChainId } from '@swapkit/types';
|
|
5
|
-
import type { CoinGeckoList } from '@swapkit/tokens';
|
|
6
|
-
import type { EVMChain } from '@swapkit/types';
|
|
7
|
-
import { FeeOption } from '@swapkit/types';
|
|
8
|
-
import type { MayaList } from '@swapkit/tokens';
|
|
9
|
-
import { MemoType } from '@swapkit/types';
|
|
10
|
-
import type { PancakeswapETHList } from '@swapkit/tokens';
|
|
11
|
-
import type { PancakeswapList } from '@swapkit/tokens';
|
|
12
|
-
import type { PangolinList } from '@swapkit/tokens';
|
|
13
|
-
import type { StargateARBList } from '@swapkit/tokens';
|
|
14
|
-
import type { SushiswapList } from '@swapkit/tokens';
|
|
15
|
-
import type { ThorchainList } from '@swapkit/tokens';
|
|
16
|
-
import type { TraderjoeList } from '@swapkit/tokens';
|
|
17
|
-
import type { UniswapList } from '@swapkit/tokens';
|
|
18
|
-
import type { WoofiList } from '@swapkit/tokens';
|
|
19
|
-
|
|
20
|
-
declare type AllowedNumberTypes = "bigint" | "number" | "string";
|
|
21
|
-
|
|
22
|
-
export declare const assetFromString: (assetString: string) => {
|
|
23
|
-
chain: Chain;
|
|
24
|
-
symbol: string;
|
|
25
|
-
ticker: string;
|
|
26
|
-
synth: boolean;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export declare class AssetValue extends BigIntArithmetics {
|
|
30
|
-
address?: string;
|
|
31
|
-
chain: Chain;
|
|
32
|
-
isGasAsset: boolean;
|
|
33
|
-
isSynthetic: boolean;
|
|
34
|
-
symbol: string;
|
|
35
|
-
tax?: TokenTax;
|
|
36
|
-
ticker: string;
|
|
37
|
-
type: ReturnType<typeof getAssetType>;
|
|
38
|
-
constructor({ value, decimal, tax, chain, symbol, identifier, }: {
|
|
39
|
-
decimal: number;
|
|
40
|
-
value: SwapKitValueType;
|
|
41
|
-
tax?: TokenTax;
|
|
42
|
-
} & ({
|
|
43
|
-
chain: Chain;
|
|
44
|
-
symbol: string;
|
|
45
|
-
identifier?: never;
|
|
46
|
-
} | {
|
|
47
|
-
identifier: string;
|
|
48
|
-
chain?: never;
|
|
49
|
-
symbol?: never;
|
|
50
|
-
}));
|
|
51
|
-
toString(): string;
|
|
52
|
-
toUrl(): string;
|
|
53
|
-
eq({ chain, symbol }: {
|
|
54
|
-
chain: Chain;
|
|
55
|
-
symbol: string;
|
|
56
|
-
}): boolean;
|
|
57
|
-
chainId(): ChainId;
|
|
58
|
-
static fromUrl(urlAsset: string, value?: NumberPrimitives): Promise<AssetValue>;
|
|
59
|
-
static fromString(assetString: string, value?: NumberPrimitives): Promise<AssetValue>;
|
|
60
|
-
static fromIdentifier(assetString: `${Chain}.${string}` | `${Chain}/${string}` | `${Chain}.${string}-${string}` | TokenNames, value?: NumberPrimitives): Promise<AssetValue>;
|
|
61
|
-
static fromStringSync(assetString: string, value?: NumberPrimitives): AssetValue;
|
|
62
|
-
static fromStringWithBase(assetString: string, value?: NumberPrimitives, baseDecimal?: number): Promise<AssetValue>;
|
|
63
|
-
static fromStringWithBaseSync(assetString: string, value?: NumberPrimitives, baseDecimal?: number): AssetValue;
|
|
64
|
-
static fromIdentifierSync(assetString: TokenNames, value?: NumberPrimitives): AssetValue;
|
|
65
|
-
static fromChainOrSignature(assetString: CommonAssetString, value?: NumberPrimitives): AssetValue;
|
|
66
|
-
static loadStaticAssets(): Promise<{
|
|
67
|
-
ok: true;
|
|
68
|
-
} | {
|
|
69
|
-
ok: false;
|
|
70
|
-
message: string;
|
|
71
|
-
error: any;
|
|
72
|
-
}>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export declare class BigIntArithmetics {
|
|
76
|
-
|
|
77
|
-
decimalMultiplier: bigint;
|
|
78
|
-
bigIntValue: bigint;
|
|
79
|
-
decimal?: number;
|
|
80
|
-
static fromBigInt(value: bigint, decimal?: number): BigIntArithmetics;
|
|
81
|
-
static shiftDecimals({ value, from, to, }: {
|
|
82
|
-
value: InstanceType<typeof SwapKitNumber>;
|
|
83
|
-
from: number;
|
|
84
|
-
to: number;
|
|
85
|
-
}): BigIntArithmetics;
|
|
86
|
-
constructor(params: SKBigIntParams);
|
|
87
|
-
set(value: SKBigIntParams): this;
|
|
88
|
-
add(...args: InitialisationValueType[]): this;
|
|
89
|
-
sub(...args: InitialisationValueType[]): this;
|
|
90
|
-
mul(...args: InitialisationValueType[]): this;
|
|
91
|
-
div(...args: InitialisationValueType[]): this;
|
|
92
|
-
gt(value: InitialisationValueType): boolean;
|
|
93
|
-
gte(value: InitialisationValueType): boolean;
|
|
94
|
-
lt(value: InitialisationValueType): boolean;
|
|
95
|
-
lte(value: InitialisationValueType): boolean;
|
|
96
|
-
eqValue(value: InitialisationValueType): boolean;
|
|
97
|
-
getValue<T extends AllowedNumberTypes>(type: T): NumberPrimitivesType[T];
|
|
98
|
-
getBaseValue<T extends AllowedNumberTypes>(type: T): NumberPrimitivesType[T];
|
|
99
|
-
getBigIntValue(value: InitialisationValueType, decimal?: number): bigint;
|
|
100
|
-
toSignificant(significantDigits?: number): string;
|
|
101
|
-
toFixed(fixedDigits?: number): string;
|
|
102
|
-
toAbbreviation(digits?: number): string;
|
|
103
|
-
toCurrency(currency?: string, { currencyPosition, decimal, decimalSeparator, thousandSeparator, }?: {
|
|
104
|
-
currencyPosition?: string | undefined;
|
|
105
|
-
decimal?: number | undefined;
|
|
106
|
-
decimalSeparator?: string | undefined;
|
|
107
|
-
thousandSeparator?: string | undefined;
|
|
108
|
-
}): string;
|
|
109
|
-
formatBigIntToSafeValue(value: bigint, decimal?: number): string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export declare type CommonAssetString = `${Chain.Maya}.MAYA` | `${Chain.Ethereum}.THOR` | `${Chain.Ethereum}.vTHOR` | `${Chain.Kujira}.USK` | Chain;
|
|
113
|
-
|
|
114
|
-
export declare function derivationPathToString([network, chainId, account, change, index]: [
|
|
115
|
-
number,
|
|
116
|
-
number,
|
|
117
|
-
number,
|
|
118
|
-
number,
|
|
119
|
-
number | undefined
|
|
120
|
-
]): string;
|
|
121
|
-
|
|
122
|
-
export declare type ErrorKeys = keyof typeof errorMessages;
|
|
123
|
-
|
|
124
|
-
declare const errorMessages: {
|
|
125
|
-
/**
|
|
126
|
-
* Core
|
|
127
|
-
*/
|
|
128
|
-
readonly core_wallet_connection_not_found: 10001;
|
|
129
|
-
readonly core_estimated_max_spendable_chain_not_supported: 10002;
|
|
130
|
-
readonly core_extend_error: 10003;
|
|
131
|
-
readonly core_inbound_data_not_found: 10004;
|
|
132
|
-
readonly core_approve_asset_address_or_from_not_found: 10005;
|
|
133
|
-
readonly core_plugin_not_found: 10006;
|
|
134
|
-
readonly core_chain_halted: 10099;
|
|
135
|
-
/**
|
|
136
|
-
* Core - Wallet Connection
|
|
137
|
-
*/
|
|
138
|
-
readonly core_wallet_xdefi_not_installed: 10101;
|
|
139
|
-
readonly core_wallet_evmwallet_not_installed: 10102;
|
|
140
|
-
readonly core_wallet_walletconnect_not_installed: 10103;
|
|
141
|
-
readonly core_wallet_keystore_not_installed: 10104;
|
|
142
|
-
readonly core_wallet_ledger_not_installed: 10105;
|
|
143
|
-
readonly core_wallet_trezor_not_installed: 10106;
|
|
144
|
-
readonly core_wallet_keplr_not_installed: 10107;
|
|
145
|
-
readonly core_wallet_okx_not_installed: 10108;
|
|
146
|
-
readonly core_wallet_keepkey_not_installed: 10109;
|
|
147
|
-
/**
|
|
148
|
-
* Core - Swap
|
|
149
|
-
*/
|
|
150
|
-
readonly core_swap_invalid_params: 10200;
|
|
151
|
-
readonly core_swap_route_not_complete: 10201;
|
|
152
|
-
readonly core_swap_asset_not_recognized: 10202;
|
|
153
|
-
readonly core_swap_contract_not_found: 10203;
|
|
154
|
-
readonly core_swap_route_transaction_not_found: 10204;
|
|
155
|
-
readonly core_swap_contract_not_supported: 10205;
|
|
156
|
-
readonly core_swap_transaction_error: 10206;
|
|
157
|
-
readonly core_swap_quote_mode_not_supported: 10207;
|
|
158
|
-
/**
|
|
159
|
-
* Core - Transaction
|
|
160
|
-
*/
|
|
161
|
-
readonly core_transaction_deposit_error: 10301;
|
|
162
|
-
readonly core_transaction_create_liquidity_rune_error: 10302;
|
|
163
|
-
readonly core_transaction_create_liquidity_asset_error: 10303;
|
|
164
|
-
readonly core_transaction_create_liquidity_invalid_params: 10304;
|
|
165
|
-
readonly core_transaction_add_liquidity_invalid_params: 10305;
|
|
166
|
-
readonly core_transaction_add_liquidity_no_rune_address: 10306;
|
|
167
|
-
readonly core_transaction_add_liquidity_rune_error: 10307;
|
|
168
|
-
readonly core_transaction_add_liquidity_asset_error: 10308;
|
|
169
|
-
readonly core_transaction_withdraw_error: 10309;
|
|
170
|
-
readonly core_transaction_deposit_to_pool_error: 10310;
|
|
171
|
-
readonly core_transaction_deposit_insufficient_funds_error: 10311;
|
|
172
|
-
readonly core_transaction_deposit_gas_error: 10312;
|
|
173
|
-
readonly core_transaction_invalid_sender_address: 10313;
|
|
174
|
-
readonly core_transaction_deposit_server_error: 10314;
|
|
175
|
-
readonly core_transaction_user_rejected: 10315;
|
|
176
|
-
/**
|
|
177
|
-
* Wallets
|
|
178
|
-
*/
|
|
179
|
-
readonly wallet_ledger_connection_error: 20001;
|
|
180
|
-
readonly wallet_ledger_connection_claimed: 20002;
|
|
181
|
-
readonly wallet_ledger_get_address_error: 20003;
|
|
182
|
-
readonly wallet_ledger_device_not_found: 20004;
|
|
183
|
-
readonly wallet_ledger_device_locked: 20005;
|
|
184
|
-
/**
|
|
185
|
-
* Chainflip
|
|
186
|
-
*/
|
|
187
|
-
readonly chainflip_channel_error: 30001;
|
|
188
|
-
readonly chainflip_broker_recipient_error: 30002;
|
|
189
|
-
/**
|
|
190
|
-
* THORChain
|
|
191
|
-
*/
|
|
192
|
-
/**
|
|
193
|
-
* Helpers
|
|
194
|
-
*/
|
|
195
|
-
readonly helpers_number_different_decimals: 99101;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export declare const filterAssets: (tokens: {
|
|
199
|
-
value: string;
|
|
200
|
-
decimal: number;
|
|
201
|
-
chain: Chain;
|
|
202
|
-
symbol: string;
|
|
203
|
-
}[]) => {
|
|
204
|
-
value: string;
|
|
205
|
-
decimal: number;
|
|
206
|
-
chain: Chain;
|
|
207
|
-
symbol: string;
|
|
208
|
-
}[];
|
|
209
|
-
|
|
210
|
-
export declare function findAssetBy(params: {
|
|
211
|
-
chain: EVMChain;
|
|
212
|
-
contract: string;
|
|
213
|
-
} | {
|
|
214
|
-
identifier: `${Chain}.${string}`;
|
|
215
|
-
}): Promise<TokenNames | undefined>;
|
|
216
|
-
|
|
217
|
-
export declare function formatBigIntToSafeValue({ value, bigIntDecimal, decimal, }: {
|
|
218
|
-
value: bigint;
|
|
219
|
-
bigIntDecimal?: number;
|
|
220
|
-
decimal?: number;
|
|
221
|
-
}): string;
|
|
222
|
-
|
|
223
|
-
export declare const gasFeeMultiplier: Record<FeeOption, number>;
|
|
224
|
-
|
|
225
|
-
export declare const getAssetType: ({ chain, symbol }: {
|
|
226
|
-
chain: Chain;
|
|
227
|
-
symbol: string;
|
|
228
|
-
}) => Chain.Avalanche | Chain.Cosmos | Chain.Kujira | "Synth" | "Native" | "BEP2" | "BEP20" | "ERC20" | "POLYGON" | "ARBITRUM" | "OPTIMISM";
|
|
229
|
-
|
|
230
|
-
export declare function getAsymmetricAssetShare({ liquidityUnits, poolUnits, assetDepth, }: ShareParams<{
|
|
231
|
-
assetDepth: string;
|
|
232
|
-
}>): SwapKitNumber;
|
|
233
|
-
|
|
234
|
-
export declare function getAsymmetricAssetWithdrawAmount({ percent, assetDepth, liquidityUnits, poolUnits, }: ShareParams<{
|
|
235
|
-
percent: number;
|
|
236
|
-
assetDepth: string;
|
|
237
|
-
}>): SwapKitNumber;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Ref: https://gitlab.com/thorchain/thornode/-/issues/657
|
|
241
|
-
* share = (s * A * (2 * T^2 - 2 * T * s + s^2))/T^3
|
|
242
|
-
* s = stakeUnits for member (after factoring in withdrawBasisPoints)
|
|
243
|
-
* T = totalPoolUnits for pool
|
|
244
|
-
* A = assetDepth to be withdrawn
|
|
245
|
-
*
|
|
246
|
-
* Formula:
|
|
247
|
-
* share = (s * A * (2 * T^2 - 2 * T * s + s^2))/T^3
|
|
248
|
-
* (part1 * (part2 - part3 + part4)) / part5
|
|
249
|
-
*/
|
|
250
|
-
export declare function getAsymmetricRuneShare({ liquidityUnits, poolUnits, runeDepth, }: ShareParams<{
|
|
251
|
-
runeDepth: string;
|
|
252
|
-
}>): SwapKitNumber;
|
|
253
|
-
|
|
254
|
-
export declare function getAsymmetricRuneWithdrawAmount({ percent, runeDepth, liquidityUnits, poolUnits, }: ShareParams<{
|
|
255
|
-
percent: number;
|
|
256
|
-
runeDepth: string;
|
|
257
|
-
}>): SwapKitNumber;
|
|
258
|
-
|
|
259
|
-
export declare const getCommonAssetInfo: (assetString: CommonAssetString) => {
|
|
260
|
-
identifier: string;
|
|
261
|
-
decimal: number;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
export declare const getDecimal: ({ chain, symbol }: {
|
|
265
|
-
chain: Chain;
|
|
266
|
-
symbol: string;
|
|
267
|
-
}) => BaseDecimal | Promise<number>;
|
|
268
|
-
|
|
269
|
-
export declare function getEstimatedPoolShare({ runeDepth, poolUnits, assetDepth, liquidityUnits, runeAmount, assetAmount, }: ShareParams<{
|
|
270
|
-
runeAmount: string;
|
|
271
|
-
assetAmount: string;
|
|
272
|
-
runeDepth: string;
|
|
273
|
-
assetDepth: string;
|
|
274
|
-
}>): number;
|
|
275
|
-
|
|
276
|
-
export declare function getLiquiditySlippage({ runeAmount, assetAmount, runeDepth, assetDepth, }: PoolParams): number;
|
|
277
|
-
|
|
278
|
-
export declare function getMAYANameCost(year: number): number;
|
|
279
|
-
|
|
280
|
-
export declare const getMemoFor: <T extends MemoType>(memoType: T, options: MemoOptions<T>) => string;
|
|
281
|
-
|
|
282
|
-
export declare function getMinAmountByChain(chain: Chain): AssetValue;
|
|
283
|
-
|
|
284
|
-
export declare function getSymmetricPoolShare({ liquidityUnits, poolUnits, runeDepth, assetDepth, }: ShareParams<{
|
|
285
|
-
runeDepth: string;
|
|
286
|
-
assetDepth: string;
|
|
287
|
-
}>): {
|
|
288
|
-
assetAmount: SwapKitNumber;
|
|
289
|
-
runeAmount: SwapKitNumber;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
export declare function getSymmetricWithdraw({ liquidityUnits, poolUnits, runeDepth, assetDepth, percent, }: ShareParams<{
|
|
293
|
-
runeDepth: string;
|
|
294
|
-
assetDepth: string;
|
|
295
|
-
percent: number;
|
|
296
|
-
}>): {
|
|
297
|
-
[k: string]: SwapKitNumber;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export declare function getTHORNameCost(year: number): number;
|
|
301
|
-
|
|
302
|
-
declare type InitialisationValueType = NumberPrimitives | BigIntArithmetics | SwapKitNumber;
|
|
303
|
-
|
|
304
|
-
export declare const isGasAsset: ({ chain, symbol }: {
|
|
305
|
-
chain: Chain;
|
|
306
|
-
symbol: string;
|
|
307
|
-
}) => boolean;
|
|
308
|
-
|
|
309
|
-
export declare type MemoOptions<T extends MemoType> = {
|
|
310
|
-
[MemoType.BOND]: {
|
|
311
|
-
address: string;
|
|
312
|
-
};
|
|
313
|
-
[MemoType.LEAVE]: {
|
|
314
|
-
address: string;
|
|
315
|
-
};
|
|
316
|
-
[MemoType.CLOSE_LOAN]: {
|
|
317
|
-
address: string;
|
|
318
|
-
asset: string;
|
|
319
|
-
minAmount?: string;
|
|
320
|
-
};
|
|
321
|
-
[MemoType.OPEN_LOAN]: {
|
|
322
|
-
address: string;
|
|
323
|
-
asset: string;
|
|
324
|
-
minAmount?: string;
|
|
325
|
-
};
|
|
326
|
-
[MemoType.UNBOND]: {
|
|
327
|
-
address: string;
|
|
328
|
-
unbondAmount: number;
|
|
329
|
-
};
|
|
330
|
-
[MemoType.DEPOSIT]: WithChain<{
|
|
331
|
-
symbol: string;
|
|
332
|
-
address?: string;
|
|
333
|
-
singleSide?: boolean;
|
|
334
|
-
}>;
|
|
335
|
-
[MemoType.WITHDRAW]: WithChain<{
|
|
336
|
-
ticker: string;
|
|
337
|
-
symbol: string;
|
|
338
|
-
basisPoints: number;
|
|
339
|
-
targetAssetString?: string;
|
|
340
|
-
singleSide?: boolean;
|
|
341
|
-
}>;
|
|
342
|
-
[MemoType.THORNAME_REGISTER]: Omit<ThornameRegisterParam, "preferredAsset" | "expiryBlock">;
|
|
343
|
-
}[T];
|
|
344
|
-
|
|
345
|
-
export declare type NumberPrimitives = bigint | number | string;
|
|
346
|
-
|
|
347
|
-
declare type NumberPrimitivesType = {
|
|
348
|
-
bigint: bigint;
|
|
349
|
-
number: number;
|
|
350
|
-
string: string;
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
declare type PoolParams = {
|
|
354
|
-
runeAmount: string;
|
|
355
|
-
assetAmount: string;
|
|
356
|
-
runeDepth: string;
|
|
357
|
-
assetDepth: string;
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
declare type ShareParams<T extends {}> = T & {
|
|
361
|
-
liquidityUnits: string;
|
|
362
|
-
poolUnits: string;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
declare type SKBigIntParams = InitialisationValueType | {
|
|
366
|
-
decimal?: number;
|
|
367
|
-
value: number | string;
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
export declare class SwapKitError extends Error {
|
|
371
|
-
constructor(errorKey: ErrorKeys, sourceError?: any);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export declare class SwapKitNumber extends BigIntArithmetics {
|
|
375
|
-
eq(value: SwapKitValueType): boolean;
|
|
376
|
-
static fromBigInt(value: bigint, decimal?: number): SwapKitNumber;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export declare type SwapKitValueType = BigIntArithmetics | string | number;
|
|
380
|
-
|
|
381
|
-
export declare type ThornameRegisterParam = {
|
|
382
|
-
name: string;
|
|
383
|
-
chain: string;
|
|
384
|
-
address: string;
|
|
385
|
-
owner?: string;
|
|
386
|
-
preferredAsset?: string;
|
|
387
|
-
expiryBlock?: string;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
declare type TokenNames = (typeof ThorchainList)["tokens"][number]["identifier"] | (typeof CoinGeckoList)["tokens"][number]["identifier"] | (typeof MayaList)["tokens"][number]["identifier"] | (typeof PancakeswapETHList)["tokens"][number]["identifier"] | (typeof PancakeswapList)["tokens"][number]["identifier"] | (typeof PangolinList)["tokens"][number]["identifier"] | (typeof StargateARBList)["tokens"][number]["identifier"] | (typeof SushiswapList)["tokens"][number]["identifier"] | (typeof TraderjoeList)["tokens"][number]["identifier"] | (typeof WoofiList)["tokens"][number]["identifier"] | (typeof UniswapList)["tokens"][number]["identifier"] | (typeof ChainflipList)["tokens"][number]["identifier"];
|
|
391
|
-
|
|
392
|
-
declare type TokenTax = {
|
|
393
|
-
buy: number;
|
|
394
|
-
sell: number;
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
export declare function validateMAYAName(name: string): boolean;
|
|
398
|
-
|
|
399
|
-
export declare function validateTHORName(name: string): boolean;
|
|
400
|
-
|
|
401
|
-
declare type WithChain<T extends {}> = T & {
|
|
402
|
-
chain: Chain;
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
export * from "@swapkit/api";
|
|
407
|
-
|
|
408
|
-
export { }
|