@talismn/chaindata-provider 2.0.1 → 2.0.3
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.mts +257 -256
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +283 -282
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +358 -319
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +358 -320
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import z, { z as z$1 } from "zod/v4";
|
|
|
2
2
|
import { Dexie } from "dexie";
|
|
3
3
|
import { Observable, ReplaySubject } from "rxjs";
|
|
4
4
|
//#region src/chaindata/miniMetadata.d.ts
|
|
5
|
-
declare const AnyMiniMetadataSchema: z.ZodObject<{
|
|
5
|
+
export declare const AnyMiniMetadataSchema: z.ZodObject<{
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
source: z.ZodString;
|
|
8
8
|
chainId: z.ZodString;
|
|
@@ -11,10 +11,10 @@ declare const AnyMiniMetadataSchema: z.ZodObject<{
|
|
|
11
11
|
data: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
12
12
|
extra: z.ZodNullable<z.ZodAny>;
|
|
13
13
|
}, z.core.$strict>;
|
|
14
|
-
type AnyMiniMetadata = z.infer<typeof AnyMiniMetadataSchema>;
|
|
14
|
+
export type AnyMiniMetadata = z.infer<typeof AnyMiniMetadataSchema>;
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/chaindata/networks/DotNetwork.d.ts
|
|
17
|
-
declare const DotNetworkBalancesConfigSchema: z.ZodObject<{
|
|
17
|
+
export declare const DotNetworkBalancesConfigSchema: z.ZodObject<{
|
|
18
18
|
"substrate-native": z.ZodOptional<z.ZodObject<{
|
|
19
19
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
}, z.core.$strip>>;
|
|
@@ -27,8 +27,8 @@ declare const DotNetworkBalancesConfigSchema: z.ZodObject<{
|
|
|
27
27
|
"substrate-hydration": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
28
28
|
"substrate-dtao": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
29
29
|
}, z.core.$strict>;
|
|
30
|
-
type DotNetworkBalancesConfig = z.infer<typeof DotNetworkBalancesConfigSchema>;
|
|
31
|
-
declare const DotNetworkTopologySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
export type DotNetworkBalancesConfig = z.infer<typeof DotNetworkBalancesConfigSchema>;
|
|
31
|
+
export declare const DotNetworkTopologySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
32
|
type: z.ZodLiteral<"standalone">;
|
|
33
33
|
}, z.core.$strict>, z.ZodObject<{
|
|
34
34
|
type: z.ZodLiteral<"relay">;
|
|
@@ -37,7 +37,7 @@ declare const DotNetworkTopologySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
37
37
|
relayId: z.ZodString;
|
|
38
38
|
paraId: z.ZodNumber;
|
|
39
39
|
}, z.core.$strict>], "type">;
|
|
40
|
-
declare const DotNetworkSchema: z.ZodObject<{
|
|
40
|
+
export declare const DotNetworkSchema: z.ZodObject<{
|
|
41
41
|
id: z.ZodString;
|
|
42
42
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
43
43
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -97,18 +97,18 @@ declare const DotNetworkSchema: z.ZodObject<{
|
|
|
97
97
|
"substrate-dtao": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
98
98
|
}, z.core.$strict>>;
|
|
99
99
|
}, z.core.$strict>;
|
|
100
|
-
type DotNetwork = z.infer<typeof DotNetworkSchema>;
|
|
101
|
-
type DotNetworkId = DotNetwork["id"];
|
|
102
|
-
type DotNetworkList = Record<DotNetworkId, DotNetwork>;
|
|
100
|
+
export type DotNetwork = z.infer<typeof DotNetworkSchema>;
|
|
101
|
+
export type DotNetworkId = DotNetwork["id"];
|
|
102
|
+
export type DotNetworkList = Record<DotNetworkId, DotNetwork>;
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/chaindata/networks/EthNetwork.d.ts
|
|
105
|
-
declare const EthNetworkBalancesConfigSchema: z.ZodObject<{
|
|
105
|
+
export declare const EthNetworkBalancesConfigSchema: z.ZodObject<{
|
|
106
106
|
"evm-native": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
107
107
|
"evm-erc20": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
108
108
|
"evm-uniswapv2": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
109
109
|
}, z.core.$strict>;
|
|
110
|
-
type EthNetworkBalancesConfig = z.infer<typeof EthNetworkBalancesConfigSchema>;
|
|
111
|
-
declare const EthNetworkSchema: z.ZodObject<{
|
|
110
|
+
export type EthNetworkBalancesConfig = z.infer<typeof EthNetworkBalancesConfigSchema>;
|
|
111
|
+
export declare const EthNetworkSchema: z.ZodObject<{
|
|
112
112
|
id: z.ZodString;
|
|
113
113
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
114
114
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -150,12 +150,12 @@ declare const EthNetworkSchema: z.ZodObject<{
|
|
|
150
150
|
"evm-uniswapv2": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
151
151
|
}, z.core.$strict>>;
|
|
152
152
|
}, z.core.$strict>;
|
|
153
|
-
type EthNetwork = z.infer<typeof EthNetworkSchema>;
|
|
154
|
-
type EthNetworkId = EthNetwork["id"];
|
|
155
|
-
type EthNetworkList = Record<EthNetworkId, EthNetwork>;
|
|
153
|
+
export type EthNetwork = z.infer<typeof EthNetworkSchema>;
|
|
154
|
+
export type EthNetworkId = EthNetwork["id"];
|
|
155
|
+
export type EthNetworkList = Record<EthNetworkId, EthNetwork>;
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/chaindata/networks/Network.d.ts
|
|
158
|
-
declare const NetworkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
158
|
+
export declare const NetworkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
159
159
|
id: z.ZodString;
|
|
160
160
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
161
161
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -282,13 +282,13 @@ declare const NetworkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
282
282
|
"sol-token2022": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
283
283
|
}, z.core.$strict>>;
|
|
284
284
|
}, z.core.$strict>], "platform">;
|
|
285
|
-
type Network = z.infer<typeof NetworkSchema>;
|
|
286
|
-
type NetworkId = Network["id"];
|
|
287
|
-
type NetworkPlatform = Network["platform"];
|
|
288
|
-
type NetworkList = Record<NetworkId, Network>;
|
|
285
|
+
export type Network = z.infer<typeof NetworkSchema>;
|
|
286
|
+
export type NetworkId = Network["id"];
|
|
287
|
+
export type NetworkPlatform = Network["platform"];
|
|
288
|
+
export type NetworkList = Record<NetworkId, Network>;
|
|
289
289
|
//#endregion
|
|
290
290
|
//#region src/chaindata/networks/NetworkBase.d.ts
|
|
291
|
-
declare const NetworkBaseSchema: z$1.ZodObject<{
|
|
291
|
+
export declare const NetworkBaseSchema: z$1.ZodObject<{
|
|
292
292
|
id: z$1.ZodString;
|
|
293
293
|
isTestnet: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
294
294
|
isDefault: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -307,16 +307,16 @@ declare const NetworkBaseSchema: z$1.ZodObject<{
|
|
|
307
307
|
themeColor: z$1.ZodOptional<z$1.ZodString>;
|
|
308
308
|
blockExplorerUrls: z$1.ZodDefault<z$1.ZodArray<z$1.ZodURL>>;
|
|
309
309
|
}, z$1.core.$strict>;
|
|
310
|
-
type NetworkBase = z$1.infer<typeof NetworkBaseSchema>;
|
|
310
|
+
export type NetworkBase = z$1.infer<typeof NetworkBaseSchema>;
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region src/chaindata/networks/SolNetwork.d.ts
|
|
313
|
-
declare const SolNetworkBalancesConfigSchema: z.ZodObject<{
|
|
313
|
+
export declare const SolNetworkBalancesConfigSchema: z.ZodObject<{
|
|
314
314
|
"sol-native": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
315
315
|
"sol-spl": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
316
316
|
"sol-token2022": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
317
317
|
}, z.core.$strict>;
|
|
318
|
-
type SolNetworkBalancesConfig = z.infer<typeof SolNetworkBalancesConfigSchema>;
|
|
319
|
-
declare const SolNetworkSchema: z.ZodObject<{
|
|
318
|
+
export type SolNetworkBalancesConfig = z.infer<typeof SolNetworkBalancesConfigSchema>;
|
|
319
|
+
export declare const SolNetworkSchema: z.ZodObject<{
|
|
320
320
|
id: z.ZodString;
|
|
321
321
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
322
322
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -343,25 +343,25 @@ declare const SolNetworkSchema: z.ZodObject<{
|
|
|
343
343
|
"sol-token2022": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
344
344
|
}, z.core.$strict>>;
|
|
345
345
|
}, z.core.$strict>;
|
|
346
|
-
type SolNetwork = z.infer<typeof SolNetworkSchema>;
|
|
347
|
-
type SolNetworkId = SolNetwork["id"];
|
|
348
|
-
type SolNetworkList = Record<SolNetworkId, SolNetwork>;
|
|
346
|
+
export type SolNetwork = z.infer<typeof SolNetworkSchema>;
|
|
347
|
+
export type SolNetworkId = SolNetwork["id"];
|
|
348
|
+
export type SolNetworkList = Record<SolNetworkId, SolNetwork>;
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region src/chaindata/shared/EthereumAddress.d.ts
|
|
351
|
-
declare const EthereumAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
352
|
-
type EthereumAddress = z.infer<typeof EthereumAddressSchema>;
|
|
351
|
+
export declare const EthereumAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
352
|
+
export type EthereumAddress = z.infer<typeof EthereumAddressSchema>;
|
|
353
353
|
//#endregion
|
|
354
354
|
//#region src/chaindata/shared/HexString.d.ts
|
|
355
|
-
declare const HexStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
356
|
-
type HexString = z.infer<typeof HexStringSchema>;
|
|
355
|
+
export declare const HexStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
356
|
+
export type HexString = z.infer<typeof HexStringSchema>;
|
|
357
357
|
//#endregion
|
|
358
358
|
//#region src/chaindata/shared/SolanaAddress.d.ts
|
|
359
|
-
declare const SolanaAddressSchema: z.ZodString;
|
|
360
|
-
type SolanaAddress = z.infer<typeof SolanaAddressSchema>;
|
|
359
|
+
export declare const SolanaAddressSchema: z.ZodString;
|
|
360
|
+
export type SolanaAddress = z.infer<typeof SolanaAddressSchema>;
|
|
361
361
|
//#endregion
|
|
362
362
|
//#region src/chaindata/tokens/EvmNativeToken.d.ts
|
|
363
363
|
declare const TOKEN_TYPE$12 = "evm-native";
|
|
364
|
-
declare const EvmNativeTokenSchema: z.ZodObject<{
|
|
364
|
+
export declare const EvmNativeTokenSchema: z.ZodObject<{
|
|
365
365
|
id: z.ZodString;
|
|
366
366
|
networkId: z.ZodString;
|
|
367
367
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -375,19 +375,19 @@ declare const EvmNativeTokenSchema: z.ZodObject<{
|
|
|
375
375
|
type: z.ZodLiteral<"evm-native">;
|
|
376
376
|
platform: z.ZodLiteral<"ethereum">;
|
|
377
377
|
}, z.core.$strict>;
|
|
378
|
-
type EvmNativeToken = z.infer<typeof EvmNativeTokenSchema>;
|
|
379
|
-
declare const EvmNativeBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
380
|
-
type EvmNativeBalancesConfig = z.infer<typeof EvmNativeBalancesConfigSchema>;
|
|
381
|
-
type EvmNativeTokenIdSpecs = {
|
|
378
|
+
export type EvmNativeToken = z.infer<typeof EvmNativeTokenSchema>;
|
|
379
|
+
export declare const EvmNativeBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
380
|
+
export type EvmNativeBalancesConfig = z.infer<typeof EvmNativeBalancesConfigSchema>;
|
|
381
|
+
export type EvmNativeTokenIdSpecs = {
|
|
382
382
|
type: typeof TOKEN_TYPE$12;
|
|
383
383
|
networkId: NetworkId;
|
|
384
384
|
};
|
|
385
|
-
declare const evmNativeTokenId: (networkId: NetworkId) => string;
|
|
386
|
-
declare const parseEvmNativeTokenId: (tokenId: TokenId) => EvmNativeTokenIdSpecs;
|
|
385
|
+
export declare const evmNativeTokenId: (networkId: NetworkId) => string;
|
|
386
|
+
export declare const parseEvmNativeTokenId: (tokenId: TokenId) => EvmNativeTokenIdSpecs;
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/chaindata/tokens/EvmUniswapV2Token.d.ts
|
|
389
389
|
declare const TOKEN_TYPE$11 = "evm-uniswapv2";
|
|
390
|
-
declare const EvmUniswapV2TokenSchema: z.ZodObject<{
|
|
390
|
+
export declare const EvmUniswapV2TokenSchema: z.ZodObject<{
|
|
391
391
|
id: z.ZodString;
|
|
392
392
|
networkId: z.ZodString;
|
|
393
393
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -411,20 +411,20 @@ declare const EvmUniswapV2TokenSchema: z.ZodObject<{
|
|
|
411
411
|
coingeckoId0: z.ZodOptional<z.ZodString>;
|
|
412
412
|
coingeckoId1: z.ZodOptional<z.ZodString>;
|
|
413
413
|
}, z.core.$strict>;
|
|
414
|
-
type EvmUniswapV2Token = z.infer<typeof EvmUniswapV2TokenSchema>;
|
|
415
|
-
declare const EvmUniswapV2BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
416
|
-
type EvmUniswapV2BalancesConfig = z.infer<typeof EvmUniswapV2BalancesConfigSchema>;
|
|
417
|
-
type EvmUniswapV2TokenIdSpecs = {
|
|
414
|
+
export type EvmUniswapV2Token = z.infer<typeof EvmUniswapV2TokenSchema>;
|
|
415
|
+
export declare const EvmUniswapV2BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
416
|
+
export type EvmUniswapV2BalancesConfig = z.infer<typeof EvmUniswapV2BalancesConfigSchema>;
|
|
417
|
+
export type EvmUniswapV2TokenIdSpecs = {
|
|
418
418
|
type: typeof TOKEN_TYPE$11;
|
|
419
419
|
networkId: NetworkId;
|
|
420
420
|
contractAddress: `0x${string}`;
|
|
421
421
|
};
|
|
422
|
-
declare const evmUniswapV2TokenId: (networkId: NetworkId, contractAddress: EvmUniswapV2Token["contractAddress"]) => string;
|
|
423
|
-
declare const parseEvmUniswapV2TokenId: (tokenId: TokenId) => EvmUniswapV2TokenIdSpecs;
|
|
422
|
+
export declare const evmUniswapV2TokenId: (networkId: NetworkId, contractAddress: EvmUniswapV2Token["contractAddress"]) => string;
|
|
423
|
+
export declare const parseEvmUniswapV2TokenId: (tokenId: TokenId) => EvmUniswapV2TokenIdSpecs;
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region src/chaindata/tokens/SolNativeToken.d.ts
|
|
426
426
|
declare const TOKEN_TYPE$10 = "sol-native";
|
|
427
|
-
declare const SolNativeTokenSchema: z.ZodObject<{
|
|
427
|
+
export declare const SolNativeTokenSchema: z.ZodObject<{
|
|
428
428
|
id: z.ZodString;
|
|
429
429
|
networkId: z.ZodString;
|
|
430
430
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -438,19 +438,19 @@ declare const SolNativeTokenSchema: z.ZodObject<{
|
|
|
438
438
|
type: z.ZodLiteral<"sol-native">;
|
|
439
439
|
platform: z.ZodLiteral<"solana">;
|
|
440
440
|
}, z.core.$strict>;
|
|
441
|
-
type SolNativeToken = z.infer<typeof SolNativeTokenSchema>;
|
|
442
|
-
declare const SolNativeBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
443
|
-
type SolNativeBalancesConfig = z.infer<typeof SolNativeBalancesConfigSchema>;
|
|
444
|
-
type SolNativeTokenIdSpecs = {
|
|
441
|
+
export type SolNativeToken = z.infer<typeof SolNativeTokenSchema>;
|
|
442
|
+
export declare const SolNativeBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
443
|
+
export type SolNativeBalancesConfig = z.infer<typeof SolNativeBalancesConfigSchema>;
|
|
444
|
+
export type SolNativeTokenIdSpecs = {
|
|
445
445
|
type: typeof TOKEN_TYPE$10;
|
|
446
446
|
networkId: SolNetworkId;
|
|
447
447
|
};
|
|
448
|
-
declare const solNativeTokenId: (networkId: SolNetworkId) => string;
|
|
449
|
-
declare const parseSolNativeTokenId: (tokenId: TokenId) => SolNativeTokenIdSpecs;
|
|
448
|
+
export declare const solNativeTokenId: (networkId: SolNetworkId) => string;
|
|
449
|
+
export declare const parseSolNativeTokenId: (tokenId: TokenId) => SolNativeTokenIdSpecs;
|
|
450
450
|
//#endregion
|
|
451
451
|
//#region src/chaindata/tokens/SolSplToken.d.ts
|
|
452
452
|
declare const TOKEN_TYPE$9 = "sol-spl";
|
|
453
|
-
declare const SolSplTokenSchema: z.ZodObject<{
|
|
453
|
+
export declare const SolSplTokenSchema: z.ZodObject<{
|
|
454
454
|
id: z.ZodString;
|
|
455
455
|
networkId: z.ZodString;
|
|
456
456
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -465,20 +465,20 @@ declare const SolSplTokenSchema: z.ZodObject<{
|
|
|
465
465
|
platform: z.ZodLiteral<"solana">;
|
|
466
466
|
mintAddress: z.ZodString;
|
|
467
467
|
}, z.core.$strict>;
|
|
468
|
-
type SolSplToken = z.infer<typeof SolSplTokenSchema>;
|
|
469
|
-
declare const SolSplBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
470
|
-
type SolSplBalancesConfig = z.infer<typeof SolSplBalancesConfigSchema>;
|
|
471
|
-
type SolSplTokenIdSpecs = {
|
|
468
|
+
export type SolSplToken = z.infer<typeof SolSplTokenSchema>;
|
|
469
|
+
export declare const SolSplBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
470
|
+
export type SolSplBalancesConfig = z.infer<typeof SolSplBalancesConfigSchema>;
|
|
471
|
+
export type SolSplTokenIdSpecs = {
|
|
472
472
|
type: typeof TOKEN_TYPE$9;
|
|
473
473
|
networkId: SolNetworkId;
|
|
474
474
|
mintAddress: string;
|
|
475
475
|
};
|
|
476
|
-
declare const solSplTokenId: (networkId: string, mintAddress: string) => string;
|
|
477
|
-
declare const parseSolSplTokenId: (tokenId: TokenId) => SolSplTokenIdSpecs;
|
|
476
|
+
export declare const solSplTokenId: (networkId: string, mintAddress: string) => string;
|
|
477
|
+
export declare const parseSolSplTokenId: (tokenId: TokenId) => SolSplTokenIdSpecs;
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/chaindata/tokens/SolToken2022Token.d.ts
|
|
480
480
|
declare const TOKEN_TYPE$8 = "sol-token2022";
|
|
481
|
-
declare const SolToken2022TokenSchema: z.ZodObject<{
|
|
481
|
+
export declare const SolToken2022TokenSchema: z.ZodObject<{
|
|
482
482
|
id: z.ZodString;
|
|
483
483
|
networkId: z.ZodString;
|
|
484
484
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -494,20 +494,20 @@ declare const SolToken2022TokenSchema: z.ZodObject<{
|
|
|
494
494
|
mintAddress: z.ZodString;
|
|
495
495
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
496
496
|
}, z.core.$strict>;
|
|
497
|
-
type SolToken2022Token = z.infer<typeof SolToken2022TokenSchema>;
|
|
498
|
-
declare const SolToken2022BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
499
|
-
type SolToken2022BalancesConfig = z.infer<typeof SolToken2022BalancesConfigSchema>;
|
|
500
|
-
type SolToken2022TokenIdSpecs = {
|
|
497
|
+
export type SolToken2022Token = z.infer<typeof SolToken2022TokenSchema>;
|
|
498
|
+
export declare const SolToken2022BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
499
|
+
export type SolToken2022BalancesConfig = z.infer<typeof SolToken2022BalancesConfigSchema>;
|
|
500
|
+
export type SolToken2022TokenIdSpecs = {
|
|
501
501
|
type: typeof TOKEN_TYPE$8;
|
|
502
502
|
networkId: SolNetworkId;
|
|
503
503
|
mintAddress: string;
|
|
504
504
|
};
|
|
505
|
-
declare const solToken2022TokenId: (networkId: string, mintAddress: string) => string;
|
|
506
|
-
declare const parseSolToken2022TokenId: (tokenId: TokenId) => SolToken2022TokenIdSpecs;
|
|
505
|
+
export declare const solToken2022TokenId: (networkId: string, mintAddress: string) => string;
|
|
506
|
+
export declare const parseSolToken2022TokenId: (tokenId: TokenId) => SolToken2022TokenIdSpecs;
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region src/chaindata/tokens/SubstrateAssetsToken.d.ts
|
|
509
509
|
declare const TOKEN_TYPE$7 = "substrate-assets";
|
|
510
|
-
declare const SubAssetsTokenSchema: z.ZodObject<{
|
|
510
|
+
export declare const SubAssetsTokenSchema: z.ZodObject<{
|
|
511
511
|
id: z.ZodString;
|
|
512
512
|
networkId: z.ZodString;
|
|
513
513
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -525,20 +525,20 @@ declare const SubAssetsTokenSchema: z.ZodObject<{
|
|
|
525
525
|
isSufficient: z.ZodBoolean;
|
|
526
526
|
existentialDeposit: z.ZodString;
|
|
527
527
|
}, z.core.$strict>;
|
|
528
|
-
type SubAssetsToken = z.infer<typeof SubAssetsTokenSchema>;
|
|
529
|
-
declare const SubAssetsBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
530
|
-
type SubAssetsBalancesConfig = z.infer<typeof SubAssetsBalancesConfigSchema>;
|
|
531
|
-
type SubAssetTokenIdSpecs = {
|
|
528
|
+
export type SubAssetsToken = z.infer<typeof SubAssetsTokenSchema>;
|
|
529
|
+
export declare const SubAssetsBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
530
|
+
export type SubAssetsBalancesConfig = z.infer<typeof SubAssetsBalancesConfigSchema>;
|
|
531
|
+
export type SubAssetTokenIdSpecs = {
|
|
532
532
|
type: typeof TOKEN_TYPE$7;
|
|
533
533
|
networkId: NetworkId;
|
|
534
534
|
assetId: string;
|
|
535
535
|
};
|
|
536
|
-
declare const subAssetTokenId: (networkId: NetworkId, assetId: string) => string;
|
|
537
|
-
declare const parseSubAssetTokenId: (tokenId: TokenId) => SubAssetTokenIdSpecs;
|
|
536
|
+
export declare const subAssetTokenId: (networkId: NetworkId, assetId: string) => string;
|
|
537
|
+
export declare const parseSubAssetTokenId: (tokenId: TokenId) => SubAssetTokenIdSpecs;
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region src/chaindata/tokens/SubstrateDTaoToken.d.ts
|
|
540
540
|
declare const TOKEN_TYPE$6 = "substrate-dtao";
|
|
541
|
-
declare const SubDTaoTokenSchema: z.ZodObject<{
|
|
541
|
+
export declare const SubDTaoTokenSchema: z.ZodObject<{
|
|
542
542
|
id: z.ZodString;
|
|
543
543
|
networkId: z.ZodString;
|
|
544
544
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -556,21 +556,21 @@ declare const SubDTaoTokenSchema: z.ZodObject<{
|
|
|
556
556
|
hotkey: z.ZodOptional<z.ZodString>;
|
|
557
557
|
isTransferable: z.ZodDefault<z.ZodBoolean>;
|
|
558
558
|
}, z.core.$strict>;
|
|
559
|
-
type SubDTaoToken = z.infer<typeof SubDTaoTokenSchema>;
|
|
560
|
-
declare const SubDTaoBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
561
|
-
type SubDTaoBalancesConfig = z.infer<typeof SubDTaoBalancesConfigSchema>;
|
|
562
|
-
type SubDTaoTokenIdSpecs = {
|
|
559
|
+
export type SubDTaoToken = z.infer<typeof SubDTaoTokenSchema>;
|
|
560
|
+
export declare const SubDTaoBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
561
|
+
export type SubDTaoBalancesConfig = z.infer<typeof SubDTaoBalancesConfigSchema>;
|
|
562
|
+
export type SubDTaoTokenIdSpecs = {
|
|
563
563
|
type: typeof TOKEN_TYPE$6;
|
|
564
564
|
networkId: NetworkId;
|
|
565
565
|
netuid: number;
|
|
566
566
|
hotkey?: string;
|
|
567
567
|
};
|
|
568
|
-
declare const subDTaoTokenId: (networkId: NetworkId, subnetId: number, hotkey?: string) => string;
|
|
569
|
-
declare const parseSubDTaoTokenId: (tokenId: TokenId) => SubDTaoTokenIdSpecs;
|
|
568
|
+
export declare const subDTaoTokenId: (networkId: NetworkId, subnetId: number, hotkey?: string) => string;
|
|
569
|
+
export declare const parseSubDTaoTokenId: (tokenId: TokenId) => SubDTaoTokenIdSpecs;
|
|
570
570
|
//#endregion
|
|
571
571
|
//#region src/chaindata/tokens/SubstrateForeignAssetsToken.d.ts
|
|
572
|
-
declare const TOKEN_TYPE = "substrate-foreignassets";
|
|
573
|
-
declare const SubForeignAssetsTokenSchema: z.ZodObject<{
|
|
572
|
+
export declare const TOKEN_TYPE = "substrate-foreignassets";
|
|
573
|
+
export declare const SubForeignAssetsTokenSchema: z.ZodObject<{
|
|
574
574
|
id: z.ZodString;
|
|
575
575
|
networkId: z.ZodString;
|
|
576
576
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -588,20 +588,20 @@ declare const SubForeignAssetsTokenSchema: z.ZodObject<{
|
|
|
588
588
|
isSufficient: z.ZodBoolean;
|
|
589
589
|
existentialDeposit: z.ZodString;
|
|
590
590
|
}, z.core.$strict>;
|
|
591
|
-
type SubForeignAssetsToken = z.infer<typeof SubForeignAssetsTokenSchema>;
|
|
592
|
-
declare const SubForeignAssetsBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
593
|
-
type SubForeignAssetsBalancesConfig = z.infer<typeof SubForeignAssetsBalancesConfigSchema>;
|
|
594
|
-
type ForeignAssetsTokenIdSpecs = {
|
|
591
|
+
export type SubForeignAssetsToken = z.infer<typeof SubForeignAssetsTokenSchema>;
|
|
592
|
+
export declare const SubForeignAssetsBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
593
|
+
export type SubForeignAssetsBalancesConfig = z.infer<typeof SubForeignAssetsBalancesConfigSchema>;
|
|
594
|
+
export type ForeignAssetsTokenIdSpecs = {
|
|
595
595
|
type: typeof TOKEN_TYPE;
|
|
596
596
|
networkId: NetworkId;
|
|
597
597
|
onChainId: string;
|
|
598
598
|
};
|
|
599
|
-
declare const subForeignAssetTokenId: (networkId: NetworkId, onChainId: string) => string;
|
|
600
|
-
declare const parseSubForeignAssetTokenId: (tokenId: TokenId) => ForeignAssetsTokenIdSpecs;
|
|
599
|
+
export declare const subForeignAssetTokenId: (networkId: NetworkId, onChainId: string) => string;
|
|
600
|
+
export declare const parseSubForeignAssetTokenId: (tokenId: TokenId) => ForeignAssetsTokenIdSpecs;
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region src/chaindata/tokens/SubstrateHydrationToken.d.ts
|
|
603
603
|
declare const TOKEN_TYPE$5 = "substrate-hydration";
|
|
604
|
-
declare const SubHydrationTokenSchema: z.ZodObject<{
|
|
604
|
+
export declare const SubHydrationTokenSchema: z.ZodObject<{
|
|
605
605
|
id: z.ZodString;
|
|
606
606
|
networkId: z.ZodString;
|
|
607
607
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -623,20 +623,20 @@ declare const SubHydrationTokenSchema: z.ZodObject<{
|
|
|
623
623
|
isSufficient: z.ZodBoolean;
|
|
624
624
|
existentialDeposit: z.ZodString;
|
|
625
625
|
}, z.core.$strict>;
|
|
626
|
-
type SubHydrationToken = z.infer<typeof SubHydrationTokenSchema>;
|
|
627
|
-
declare const SubHydrationBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
628
|
-
type SubHydrationBalancesConfig = z.infer<typeof SubHydrationBalancesConfigSchema>;
|
|
629
|
-
type SubHydrationTokenIdSpecs = {
|
|
626
|
+
export type SubHydrationToken = z.infer<typeof SubHydrationTokenSchema>;
|
|
627
|
+
export declare const SubHydrationBalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
628
|
+
export type SubHydrationBalancesConfig = z.infer<typeof SubHydrationBalancesConfigSchema>;
|
|
629
|
+
export type SubHydrationTokenIdSpecs = {
|
|
630
630
|
type: typeof TOKEN_TYPE$5;
|
|
631
631
|
networkId: NetworkId;
|
|
632
632
|
onChainId: number;
|
|
633
633
|
};
|
|
634
|
-
declare const subHydrationTokenId: (networkId: NetworkId, onChainId: number) => string;
|
|
635
|
-
declare const parseSubHydrationTokenId: (tokenId: string) => SubHydrationTokenIdSpecs;
|
|
634
|
+
export declare const subHydrationTokenId: (networkId: NetworkId, onChainId: number) => string;
|
|
635
|
+
export declare const parseSubHydrationTokenId: (tokenId: string) => SubHydrationTokenIdSpecs;
|
|
636
636
|
//#endregion
|
|
637
637
|
//#region src/chaindata/tokens/SubstrateNativeToken.d.ts
|
|
638
638
|
declare const TOKEN_TYPE$4 = "substrate-native";
|
|
639
|
-
declare const SubNativeTokenSchema: z.ZodObject<{
|
|
639
|
+
export declare const SubNativeTokenSchema: z.ZodObject<{
|
|
640
640
|
id: z.ZodString;
|
|
641
641
|
networkId: z.ZodString;
|
|
642
642
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -651,21 +651,21 @@ declare const SubNativeTokenSchema: z.ZodObject<{
|
|
|
651
651
|
platform: z.ZodLiteral<"polkadot">;
|
|
652
652
|
existentialDeposit: z.ZodString;
|
|
653
653
|
}, z.core.$strict>;
|
|
654
|
-
type SubNativeToken = z.infer<typeof SubNativeTokenSchema>;
|
|
655
|
-
declare const SubNativeBalancesConfigSchema: z.ZodObject<{
|
|
654
|
+
export type SubNativeToken = z.infer<typeof SubNativeTokenSchema>;
|
|
655
|
+
export declare const SubNativeBalancesConfigSchema: z.ZodObject<{
|
|
656
656
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
657
657
|
}, z.core.$strip>;
|
|
658
|
-
type SubNativeBalancesConfig = z.infer<typeof SubNativeBalancesConfigSchema>;
|
|
659
|
-
type SubNativeTokenIdSpecs = {
|
|
658
|
+
export type SubNativeBalancesConfig = z.infer<typeof SubNativeBalancesConfigSchema>;
|
|
659
|
+
export type SubNativeTokenIdSpecs = {
|
|
660
660
|
type: typeof TOKEN_TYPE$4;
|
|
661
661
|
networkId: NetworkId;
|
|
662
662
|
};
|
|
663
|
-
declare const subNativeTokenId: (networkId: NetworkId) => string;
|
|
664
|
-
declare const parseSubNativeTokenId: (tokenId: TokenId) => SubNativeTokenIdSpecs;
|
|
663
|
+
export declare const subNativeTokenId: (networkId: NetworkId) => string;
|
|
664
|
+
export declare const parseSubNativeTokenId: (tokenId: TokenId) => SubNativeTokenIdSpecs;
|
|
665
665
|
//#endregion
|
|
666
666
|
//#region src/chaindata/tokens/SubstratePsp22Token.d.ts
|
|
667
667
|
declare const TOKEN_TYPE$3 = "substrate-psp22";
|
|
668
|
-
declare const SubPsp22TokenSchema: z.ZodObject<{
|
|
668
|
+
export declare const SubPsp22TokenSchema: z.ZodObject<{
|
|
669
669
|
id: z.ZodString;
|
|
670
670
|
networkId: z.ZodString;
|
|
671
671
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -680,20 +680,20 @@ declare const SubPsp22TokenSchema: z.ZodObject<{
|
|
|
680
680
|
platform: z.ZodLiteral<"polkadot">;
|
|
681
681
|
contractAddress: z.ZodString;
|
|
682
682
|
}, z.core.$strict>;
|
|
683
|
-
type SubPsp22Token = z.infer<typeof SubPsp22TokenSchema>;
|
|
684
|
-
declare const SubPsp22BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
685
|
-
type SubPsp22BalancesConfig = z.infer<typeof SubPsp22BalancesConfigSchema>;
|
|
686
|
-
type SubPsp22TokenIdSpecs = {
|
|
683
|
+
export type SubPsp22Token = z.infer<typeof SubPsp22TokenSchema>;
|
|
684
|
+
export declare const SubPsp22BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
685
|
+
export type SubPsp22BalancesConfig = z.infer<typeof SubPsp22BalancesConfigSchema>;
|
|
686
|
+
export type SubPsp22TokenIdSpecs = {
|
|
687
687
|
type: typeof TOKEN_TYPE$3;
|
|
688
688
|
networkId: NetworkId;
|
|
689
689
|
contractAddress: string;
|
|
690
690
|
};
|
|
691
|
-
declare const subPsp22TokenId: (networkId: NetworkId, contractAddress: string) => string;
|
|
692
|
-
declare const parseSubPsp22TokenId: (tokenId: TokenId) => SubPsp22TokenIdSpecs;
|
|
691
|
+
export declare const subPsp22TokenId: (networkId: NetworkId, contractAddress: string) => string;
|
|
692
|
+
export declare const parseSubPsp22TokenId: (tokenId: TokenId) => SubPsp22TokenIdSpecs;
|
|
693
693
|
//#endregion
|
|
694
694
|
//#region src/chaindata/tokens/SubstrateTokensToken.d.ts
|
|
695
695
|
declare const TOKEN_TYPE$2 = "substrate-tokens";
|
|
696
|
-
declare const SubTokensTokenSchema: z.ZodObject<{
|
|
696
|
+
export declare const SubTokensTokenSchema: z.ZodObject<{
|
|
697
697
|
id: z.ZodString;
|
|
698
698
|
networkId: z.ZodString;
|
|
699
699
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -709,24 +709,24 @@ declare const SubTokensTokenSchema: z.ZodObject<{
|
|
|
709
709
|
onChainId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
710
710
|
existentialDeposit: z.ZodString;
|
|
711
711
|
}, z.core.$strict>;
|
|
712
|
-
type SubTokensToken = z.infer<typeof SubTokensTokenSchema>;
|
|
713
|
-
declare const SubTokensBalancesConfigSchema: z.ZodObject<{
|
|
712
|
+
export type SubTokensToken = z.infer<typeof SubTokensTokenSchema>;
|
|
713
|
+
export declare const SubTokensBalancesConfigSchema: z.ZodObject<{
|
|
714
714
|
palletId: z.ZodOptional<z.ZodString>;
|
|
715
715
|
}, z.core.$strip>;
|
|
716
|
-
type SubTokensBalancesConfig = z.infer<typeof SubTokensBalancesConfigSchema>;
|
|
717
|
-
type SubTokensTokenIdSpecs = {
|
|
716
|
+
export type SubTokensBalancesConfig = z.infer<typeof SubTokensBalancesConfigSchema>;
|
|
717
|
+
export type SubTokensTokenIdSpecs = {
|
|
718
718
|
type: typeof TOKEN_TYPE$2;
|
|
719
719
|
networkId: NetworkId;
|
|
720
720
|
onChainId: string;
|
|
721
721
|
};
|
|
722
|
-
declare const subTokensTokenId: (networkId: NetworkId, onChainId: string | number) => string;
|
|
723
|
-
declare const parseSubTokensTokenId: (tokenId: string) => SubTokensTokenIdSpecs;
|
|
722
|
+
export declare const subTokensTokenId: (networkId: NetworkId, onChainId: string | number) => string;
|
|
723
|
+
export declare const parseSubTokensTokenId: (tokenId: string) => SubTokensTokenIdSpecs;
|
|
724
724
|
//#endregion
|
|
725
725
|
//#region src/chaindata/tokens/Token.d.ts
|
|
726
726
|
/**
|
|
727
727
|
* The `Token` sum type, which is a union of all of the possible `TokenTypes`.
|
|
728
728
|
*/
|
|
729
|
-
declare const TokenSchemaBase: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
729
|
+
export declare const TokenSchemaBase: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
730
730
|
id: z.ZodString;
|
|
731
731
|
networkId: z.ZodString;
|
|
732
732
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -934,7 +934,7 @@ declare const TokenSchemaBase: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
934
934
|
mintAddress: z.ZodString;
|
|
935
935
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
936
936
|
}, z.core.$strict>], "type">;
|
|
937
|
-
declare const TokenTypeSchema: z.ZodEnum<{
|
|
937
|
+
export declare const TokenTypeSchema: z.ZodEnum<{
|
|
938
938
|
"evm-erc20": "evm-erc20";
|
|
939
939
|
"evm-native": "evm-native";
|
|
940
940
|
"evm-uniswapv2": "evm-uniswapv2";
|
|
@@ -949,12 +949,12 @@ declare const TokenTypeSchema: z.ZodEnum<{
|
|
|
949
949
|
"substrate-psp22": "substrate-psp22";
|
|
950
950
|
"substrate-tokens": "substrate-tokens";
|
|
951
951
|
}>;
|
|
952
|
-
type Token = z.infer<typeof TokenSchemaBase>;
|
|
953
|
-
type TokenId = Token["id"];
|
|
954
|
-
type TokenList = Record<TokenId, Token>;
|
|
955
|
-
type TokenType = z.infer<typeof TokenTypeSchema>;
|
|
956
|
-
type TokenIdSpecs<T extends TokenType> = T extends "evm-erc20" ? EvmErc20TokenIdSpecs : T extends "evm-native" ? EvmNativeTokenIdSpecs : T extends "evm-uniswapv2" ? EvmUniswapV2TokenIdSpecs : T extends "substrate-assets" ? SubAssetTokenIdSpecs : T extends "substrate-dtao" ? SubDTaoTokenIdSpecs : T extends "substrate-foreignassets" ? ForeignAssetsTokenIdSpecs : T extends "substrate-native" ? SubNativeTokenIdSpecs : T extends "substrate-psp22" ? SubPsp22TokenIdSpecs : T extends "substrate-tokens" ? SubTokensTokenIdSpecs : T extends "substrate-hydration" ? SubHydrationToken : T extends "sol-native" ? SolNativeToken : T extends "sol-spl" ? SolSplToken : T extends "sol-token2022" ? SolToken2022Token : never;
|
|
957
|
-
declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
952
|
+
export type Token = z.infer<typeof TokenSchemaBase>;
|
|
953
|
+
export type TokenId = Token["id"];
|
|
954
|
+
export type TokenList = Record<TokenId, Token>;
|
|
955
|
+
export type TokenType = z.infer<typeof TokenTypeSchema>;
|
|
956
|
+
export type TokenIdSpecs<T extends TokenType> = T extends "evm-erc20" ? EvmErc20TokenIdSpecs : T extends "evm-native" ? EvmNativeTokenIdSpecs : T extends "evm-uniswapv2" ? EvmUniswapV2TokenIdSpecs : T extends "substrate-assets" ? SubAssetTokenIdSpecs : T extends "substrate-dtao" ? SubDTaoTokenIdSpecs : T extends "substrate-foreignassets" ? ForeignAssetsTokenIdSpecs : T extends "substrate-native" ? SubNativeTokenIdSpecs : T extends "substrate-psp22" ? SubPsp22TokenIdSpecs : T extends "substrate-tokens" ? SubTokensTokenIdSpecs : T extends "substrate-hydration" ? SubHydrationToken : T extends "sol-native" ? SolNativeToken : T extends "sol-spl" ? SolSplToken : T extends "sol-token2022" ? SolToken2022Token : never;
|
|
957
|
+
export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
958
958
|
id: z.ZodString;
|
|
959
959
|
networkId: z.ZodString;
|
|
960
960
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1571,7 +1571,7 @@ declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1571
1571
|
//#endregion
|
|
1572
1572
|
//#region src/chaindata/tokens/EvmErc20Token.d.ts
|
|
1573
1573
|
declare const TOKEN_TYPE$1 = "evm-erc20";
|
|
1574
|
-
declare const EvmErc20TokenSchema: z.ZodObject<{
|
|
1574
|
+
export declare const EvmErc20TokenSchema: z.ZodObject<{
|
|
1575
1575
|
id: z.ZodString;
|
|
1576
1576
|
networkId: z.ZodString;
|
|
1577
1577
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1586,19 +1586,19 @@ declare const EvmErc20TokenSchema: z.ZodObject<{
|
|
|
1586
1586
|
platform: z.ZodLiteral<"ethereum">;
|
|
1587
1587
|
contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
1588
1588
|
}, z.core.$strict>;
|
|
1589
|
-
type EvmErc20Token = z.infer<typeof EvmErc20TokenSchema>;
|
|
1590
|
-
declare const EvmErc20BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
1591
|
-
type EvmErc20BalancesConfig = z.infer<typeof EvmErc20BalancesConfigSchema>;
|
|
1592
|
-
type EvmErc20TokenIdSpecs = {
|
|
1589
|
+
export type EvmErc20Token = z.infer<typeof EvmErc20TokenSchema>;
|
|
1590
|
+
export declare const EvmErc20BalancesConfigSchema: z.ZodObject<{}, z.core.$strict>;
|
|
1591
|
+
export type EvmErc20BalancesConfig = z.infer<typeof EvmErc20BalancesConfigSchema>;
|
|
1592
|
+
export type EvmErc20TokenIdSpecs = {
|
|
1593
1593
|
type: typeof TOKEN_TYPE$1;
|
|
1594
1594
|
networkId: NetworkId;
|
|
1595
1595
|
contractAddress: `0x${string}`;
|
|
1596
1596
|
};
|
|
1597
|
-
declare const evmErc20TokenId: (networkId: string, contractAddress: `0x${string}`) => string;
|
|
1598
|
-
declare const parseEvmErc20TokenId: (tokenId: TokenId) => EvmErc20TokenIdSpecs;
|
|
1597
|
+
export declare const evmErc20TokenId: (networkId: string, contractAddress: `0x${string}`) => string;
|
|
1598
|
+
export declare const parseEvmErc20TokenId: (tokenId: TokenId) => EvmErc20TokenIdSpecs;
|
|
1599
1599
|
//#endregion
|
|
1600
1600
|
//#region src/chaindata/tokens/TokenBase.d.ts
|
|
1601
|
-
declare const TokenBaseSchema: z.ZodObject<{
|
|
1601
|
+
export declare const TokenBaseSchema: z.ZodObject<{
|
|
1602
1602
|
id: z.ZodString;
|
|
1603
1603
|
networkId: z.ZodString;
|
|
1604
1604
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1610,17 +1610,17 @@ declare const TokenBaseSchema: z.ZodObject<{
|
|
|
1610
1610
|
noDiscovery: z.ZodOptional<z.ZodBoolean>;
|
|
1611
1611
|
mirrorOf: z.ZodOptional<z.ZodString>;
|
|
1612
1612
|
}, z.core.$strict>;
|
|
1613
|
-
type TokenBase = z.infer<typeof TokenBaseSchema>;
|
|
1613
|
+
export type TokenBase = z.infer<typeof TokenBaseSchema>;
|
|
1614
1614
|
//#endregion
|
|
1615
1615
|
//#region src/chaindata/utils.d.ts
|
|
1616
|
-
type NetworkOfPlatform<P extends NetworkPlatform> = Extract<Network, {
|
|
1616
|
+
export type NetworkOfPlatform<P extends NetworkPlatform> = Extract<Network, {
|
|
1617
1617
|
platform: P;
|
|
1618
1618
|
}>;
|
|
1619
|
-
declare const isNetworkOfPlatform: <P extends NetworkPlatform>(network: Network | null | undefined, platform: P) => network is Extract<Network, {
|
|
1619
|
+
export declare const isNetworkOfPlatform: <P extends NetworkPlatform>(network: Network | null | undefined, platform: P) => network is Extract<Network, {
|
|
1620
1620
|
platform: P;
|
|
1621
1621
|
}>;
|
|
1622
|
-
declare const isNetworkInPlatforms: <P extends NetworkPlatform[]>(network: Network | null | undefined, platforms: P) => network is NetworkOfPlatform<P[number]>;
|
|
1623
|
-
declare const isNetworkDot: (network: Network | null | undefined) => network is {
|
|
1622
|
+
export declare const isNetworkInPlatforms: <P extends NetworkPlatform[]>(network: Network | null | undefined, platforms: P) => network is NetworkOfPlatform<P[number]>;
|
|
1623
|
+
export declare const isNetworkDot: (network: Network | null | undefined) => network is {
|
|
1624
1624
|
id: string;
|
|
1625
1625
|
isTestnet?: boolean | undefined;
|
|
1626
1626
|
isDefault?: boolean | undefined;
|
|
@@ -1677,7 +1677,7 @@ declare const isNetworkDot: (network: Network | null | undefined) => network is
|
|
|
1677
1677
|
"substrate-dtao"?: Record<string, never> | undefined;
|
|
1678
1678
|
} | undefined;
|
|
1679
1679
|
};
|
|
1680
|
-
declare const isNetworkEth: (network: Network | null | undefined) => network is {
|
|
1680
|
+
export declare const isNetworkEth: (network: Network | null | undefined) => network is {
|
|
1681
1681
|
id: string;
|
|
1682
1682
|
isTestnet?: boolean | undefined;
|
|
1683
1683
|
isDefault?: boolean | undefined;
|
|
@@ -1716,7 +1716,7 @@ declare const isNetworkEth: (network: Network | null | undefined) => network is
|
|
|
1716
1716
|
"evm-uniswapv2"?: Record<string, never> | undefined;
|
|
1717
1717
|
} | undefined;
|
|
1718
1718
|
};
|
|
1719
|
-
declare const isNetworkSol: (network: Network | null | undefined) => network is {
|
|
1719
|
+
export declare const isNetworkSol: (network: Network | null | undefined) => network is {
|
|
1720
1720
|
id: string;
|
|
1721
1721
|
isTestnet?: boolean | undefined;
|
|
1722
1722
|
isDefault?: boolean | undefined;
|
|
@@ -1743,21 +1743,21 @@ declare const isNetworkSol: (network: Network | null | undefined) => network is
|
|
|
1743
1743
|
"sol-token2022"?: Record<string, never> | undefined;
|
|
1744
1744
|
} | undefined;
|
|
1745
1745
|
};
|
|
1746
|
-
declare const getNetworkGenesisHash: <Net extends Network, Res = Net extends DotNetwork ? DotNetwork["genesisHash"] : undefined>(network: Net | null | undefined) => Res;
|
|
1747
|
-
type TokenOfType<T extends TokenType> = Extract<Token, {
|
|
1746
|
+
export declare const getNetworkGenesisHash: <Net extends Network, Res = Net extends DotNetwork ? DotNetwork["genesisHash"] : undefined>(network: Net | null | undefined) => Res;
|
|
1747
|
+
export type TokenOfType<T extends TokenType> = Extract<Token, {
|
|
1748
1748
|
type: T;
|
|
1749
1749
|
}>;
|
|
1750
|
-
type TokenOfPlatform<P extends NetworkPlatform> = Extract<Token, {
|
|
1750
|
+
export type TokenOfPlatform<P extends NetworkPlatform> = Extract<Token, {
|
|
1751
1751
|
platform: P;
|
|
1752
1752
|
}>;
|
|
1753
|
-
type DotToken = TokenOfPlatform<"polkadot">;
|
|
1754
|
-
type EthToken = TokenOfPlatform<"ethereum">;
|
|
1755
|
-
type SolToken = TokenOfPlatform<"solana">;
|
|
1756
|
-
declare const isTokenOfPlatform: <P extends NetworkPlatform>(token: Token | null | undefined, platform: P) => token is TokenOfPlatform<P>;
|
|
1757
|
-
declare const isTokenEth: (token: Token | null | undefined) => token is TokenOfPlatform<"ethereum">;
|
|
1758
|
-
declare const isTokenDot: (token: Token | null | undefined) => token is TokenOfPlatform<"polkadot">;
|
|
1759
|
-
declare const isTokenSol: (token: Token | null | undefined) => token is TokenOfPlatform<"solana">;
|
|
1760
|
-
declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
1753
|
+
export type DotToken = TokenOfPlatform<"polkadot">;
|
|
1754
|
+
export type EthToken = TokenOfPlatform<"ethereum">;
|
|
1755
|
+
export type SolToken = TokenOfPlatform<"solana">;
|
|
1756
|
+
export declare const isTokenOfPlatform: <P extends NetworkPlatform>(token: Token | null | undefined, platform: P) => token is TokenOfPlatform<P>;
|
|
1757
|
+
export declare const isTokenEth: (token: Token | null | undefined) => token is TokenOfPlatform<"ethereum">;
|
|
1758
|
+
export declare const isTokenDot: (token: Token | null | undefined) => token is TokenOfPlatform<"polkadot">;
|
|
1759
|
+
export declare const isTokenSol: (token: Token | null | undefined) => token is TokenOfPlatform<"solana">;
|
|
1760
|
+
export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
1761
1761
|
id: string;
|
|
1762
1762
|
networkId: string;
|
|
1763
1763
|
isDefault?: boolean | undefined;
|
|
@@ -1838,9 +1838,9 @@ declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1838
1838
|
isSufficient: boolean;
|
|
1839
1839
|
existentialDeposit: string;
|
|
1840
1840
|
};
|
|
1841
|
-
declare const isTokenOfType: <T extends TokenType>(token: Token | null | undefined, type: T) => token is TokenOfType<T>;
|
|
1842
|
-
declare const isTokenInTypes: <T extends TokenType[]>(token: Token | null | undefined, types: T) => token is TokenOfType<T[number]>;
|
|
1843
|
-
declare const isTokenSubNative: (token: Token | null | undefined) => token is {
|
|
1841
|
+
export declare const isTokenOfType: <T extends TokenType>(token: Token | null | undefined, type: T) => token is TokenOfType<T>;
|
|
1842
|
+
export declare const isTokenInTypes: <T extends TokenType[]>(token: Token | null | undefined, types: T) => token is TokenOfType<T[number]>;
|
|
1843
|
+
export declare const isTokenSubNative: (token: Token | null | undefined) => token is {
|
|
1844
1844
|
id: string;
|
|
1845
1845
|
networkId: string;
|
|
1846
1846
|
isDefault?: boolean | undefined;
|
|
@@ -1855,7 +1855,7 @@ declare const isTokenSubNative: (token: Token | null | undefined) => token is {
|
|
|
1855
1855
|
platform: "polkadot";
|
|
1856
1856
|
existentialDeposit: string;
|
|
1857
1857
|
};
|
|
1858
|
-
declare const isTokenSubAssets: (token: Token | null | undefined) => token is {
|
|
1858
|
+
export declare const isTokenSubAssets: (token: Token | null | undefined) => token is {
|
|
1859
1859
|
id: string;
|
|
1860
1860
|
networkId: string;
|
|
1861
1861
|
isDefault?: boolean | undefined;
|
|
@@ -1873,7 +1873,7 @@ declare const isTokenSubAssets: (token: Token | null | undefined) => token is {
|
|
|
1873
1873
|
isSufficient: boolean;
|
|
1874
1874
|
existentialDeposit: string;
|
|
1875
1875
|
};
|
|
1876
|
-
declare const isTokenSubDTao: (token: Token | null | undefined) => token is {
|
|
1876
|
+
export declare const isTokenSubDTao: (token: Token | null | undefined) => token is {
|
|
1877
1877
|
id: string;
|
|
1878
1878
|
networkId: string;
|
|
1879
1879
|
isDefault?: boolean | undefined;
|
|
@@ -1891,7 +1891,7 @@ declare const isTokenSubDTao: (token: Token | null | undefined) => token is {
|
|
|
1891
1891
|
hotkey?: string | undefined;
|
|
1892
1892
|
isTransferable: boolean;
|
|
1893
1893
|
};
|
|
1894
|
-
declare const isTokenSubForeignAssets: (token: Token | null | undefined) => token is {
|
|
1894
|
+
export declare const isTokenSubForeignAssets: (token: Token | null | undefined) => token is {
|
|
1895
1895
|
id: string;
|
|
1896
1896
|
networkId: string;
|
|
1897
1897
|
isDefault?: boolean | undefined;
|
|
@@ -1909,7 +1909,7 @@ declare const isTokenSubForeignAssets: (token: Token | null | undefined) => toke
|
|
|
1909
1909
|
isSufficient: boolean;
|
|
1910
1910
|
existentialDeposit: string;
|
|
1911
1911
|
};
|
|
1912
|
-
declare const isTokenSubPsp22: (token: Token | null | undefined) => token is {
|
|
1912
|
+
export declare const isTokenSubPsp22: (token: Token | null | undefined) => token is {
|
|
1913
1913
|
id: string;
|
|
1914
1914
|
networkId: string;
|
|
1915
1915
|
isDefault?: boolean | undefined;
|
|
@@ -1924,7 +1924,7 @@ declare const isTokenSubPsp22: (token: Token | null | undefined) => token is {
|
|
|
1924
1924
|
platform: "polkadot";
|
|
1925
1925
|
contractAddress: string;
|
|
1926
1926
|
};
|
|
1927
|
-
declare const isTokenSubTokens: (token: Token | null | undefined) => token is {
|
|
1927
|
+
export declare const isTokenSubTokens: (token: Token | null | undefined) => token is {
|
|
1928
1928
|
id: string;
|
|
1929
1929
|
networkId: string;
|
|
1930
1930
|
isDefault?: boolean | undefined;
|
|
@@ -1940,7 +1940,7 @@ declare const isTokenSubTokens: (token: Token | null | undefined) => token is {
|
|
|
1940
1940
|
onChainId: string | number;
|
|
1941
1941
|
existentialDeposit: string;
|
|
1942
1942
|
};
|
|
1943
|
-
declare const isTokenSubHydration: (token: Token | null | undefined) => token is {
|
|
1943
|
+
export declare const isTokenSubHydration: (token: Token | null | undefined) => token is {
|
|
1944
1944
|
id: string;
|
|
1945
1945
|
networkId: string;
|
|
1946
1946
|
isDefault?: boolean | undefined;
|
|
@@ -1958,7 +1958,7 @@ declare const isTokenSubHydration: (token: Token | null | undefined) => token is
|
|
|
1958
1958
|
isSufficient: boolean;
|
|
1959
1959
|
existentialDeposit: string;
|
|
1960
1960
|
};
|
|
1961
|
-
declare const isTokenEvmNative: (token: Token | null | undefined) => token is {
|
|
1961
|
+
export declare const isTokenEvmNative: (token: Token | null | undefined) => token is {
|
|
1962
1962
|
id: string;
|
|
1963
1963
|
networkId: string;
|
|
1964
1964
|
isDefault?: boolean | undefined;
|
|
@@ -1972,7 +1972,7 @@ declare const isTokenEvmNative: (token: Token | null | undefined) => token is {
|
|
|
1972
1972
|
type: "evm-native";
|
|
1973
1973
|
platform: "ethereum";
|
|
1974
1974
|
};
|
|
1975
|
-
declare const isTokenEvmErc20: (token: Token | null | undefined) => token is {
|
|
1975
|
+
export declare const isTokenEvmErc20: (token: Token | null | undefined) => token is {
|
|
1976
1976
|
id: string;
|
|
1977
1977
|
networkId: string;
|
|
1978
1978
|
isDefault?: boolean | undefined;
|
|
@@ -1987,7 +1987,7 @@ declare const isTokenEvmErc20: (token: Token | null | undefined) => token is {
|
|
|
1987
1987
|
platform: "ethereum";
|
|
1988
1988
|
contractAddress: `0x${string}`;
|
|
1989
1989
|
};
|
|
1990
|
-
declare const isTokenEvmUniswapV2: (token: Token | null | undefined) => token is {
|
|
1990
|
+
export declare const isTokenEvmUniswapV2: (token: Token | null | undefined) => token is {
|
|
1991
1991
|
id: string;
|
|
1992
1992
|
networkId: string;
|
|
1993
1993
|
isDefault?: boolean | undefined;
|
|
@@ -2011,7 +2011,7 @@ declare const isTokenEvmUniswapV2: (token: Token | null | undefined) => token is
|
|
|
2011
2011
|
coingeckoId0?: string | undefined;
|
|
2012
2012
|
coingeckoId1?: string | undefined;
|
|
2013
2013
|
};
|
|
2014
|
-
declare const isTokenSolSpl: (token: Token | null | undefined) => token is {
|
|
2014
|
+
export declare const isTokenSolSpl: (token: Token | null | undefined) => token is {
|
|
2015
2015
|
id: string;
|
|
2016
2016
|
networkId: string;
|
|
2017
2017
|
isDefault?: boolean | undefined;
|
|
@@ -2026,7 +2026,7 @@ declare const isTokenSolSpl: (token: Token | null | undefined) => token is {
|
|
|
2026
2026
|
platform: "solana";
|
|
2027
2027
|
mintAddress: string;
|
|
2028
2028
|
};
|
|
2029
|
-
declare const isTokenSolToken2022: (token: Token | null | undefined) => token is {
|
|
2029
|
+
export declare const isTokenSolToken2022: (token: Token | null | undefined) => token is {
|
|
2030
2030
|
id: string;
|
|
2031
2031
|
networkId: string;
|
|
2032
2032
|
isDefault?: boolean | undefined;
|
|
@@ -2042,27 +2042,27 @@ declare const isTokenSolToken2022: (token: Token | null | undefined) => token is
|
|
|
2042
2042
|
mintAddress: string;
|
|
2043
2043
|
isTransferable?: boolean | undefined;
|
|
2044
2044
|
};
|
|
2045
|
-
declare const parseTokenId: <T extends TokenType>(tokenId: TokenId) => TokenIdSpecs<T>;
|
|
2046
|
-
declare const isTokenIdOfType: <T extends TokenType>(tokenId: unknown, type: T) => tokenId is TokenId;
|
|
2047
|
-
declare const isTokenIdInTypes: <T extends TokenType[]>(tokenId: unknown, types: T) => tokenId is TokenId;
|
|
2048
|
-
declare const networkIdFromTokenId: (tokenId: TokenId) => Network["id"];
|
|
2045
|
+
export declare const parseTokenId: <T extends TokenType>(tokenId: TokenId) => TokenIdSpecs<T>;
|
|
2046
|
+
export declare const isTokenIdOfType: <T extends TokenType>(tokenId: unknown, type: T) => tokenId is TokenId;
|
|
2047
|
+
export declare const isTokenIdInTypes: <T extends TokenType[]>(tokenId: unknown, types: T) => tokenId is TokenId;
|
|
2048
|
+
export declare const networkIdFromTokenId: (tokenId: TokenId) => Network["id"];
|
|
2049
2049
|
declare const PLATFORM_NATIVE_TOKENS: {
|
|
2050
2050
|
polkadot: "substrate-native";
|
|
2051
2051
|
ethereum: "evm-native";
|
|
2052
2052
|
solana: "sol-native";
|
|
2053
2053
|
};
|
|
2054
|
-
type NativeTokenType<P extends NetworkPlatform = NetworkPlatform> = (typeof PLATFORM_NATIVE_TOKENS)[P];
|
|
2055
|
-
type NativeToken<P extends NetworkPlatform = NetworkPlatform> = Extract<Token, {
|
|
2054
|
+
export type NativeTokenType<P extends NetworkPlatform = NetworkPlatform> = (typeof PLATFORM_NATIVE_TOKENS)[P];
|
|
2055
|
+
export type NativeToken<P extends NetworkPlatform = NetworkPlatform> = Extract<Token, {
|
|
2056
2056
|
type: NativeTokenType<P>;
|
|
2057
2057
|
}>;
|
|
2058
|
-
declare const isNativeTokenType: <P extends NetworkPlatform = NetworkPlatform>(type: TokenType, platform?: P) => type is NativeTokenType<P>;
|
|
2059
|
-
declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform>(token: Token, platform?: P) => token is NativeToken<P>;
|
|
2058
|
+
export declare const isNativeTokenType: <P extends NetworkPlatform = NetworkPlatform>(type: TokenType, platform?: P) => type is NativeTokenType<P>;
|
|
2059
|
+
export declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform>(token: Token, platform?: P) => token is NativeToken<P>;
|
|
2060
2060
|
//#endregion
|
|
2061
2061
|
//#region src/constants.d.ts
|
|
2062
|
-
declare const MINIMETADATA_VERSION: string;
|
|
2062
|
+
export declare const MINIMETADATA_VERSION: string;
|
|
2063
2063
|
//#endregion
|
|
2064
2064
|
//#region src/getBlockExplorerUrls.d.ts
|
|
2065
|
-
type BlockExplorerQuery = {
|
|
2065
|
+
export type BlockExplorerQuery = {
|
|
2066
2066
|
type: "address";
|
|
2067
2067
|
address: string;
|
|
2068
2068
|
} | {
|
|
@@ -2082,14 +2082,14 @@ type BlockExplorerQuery = {
|
|
|
2082
2082
|
type: "extrinsic-unknown";
|
|
2083
2083
|
hash: `0x${string}`;
|
|
2084
2084
|
};
|
|
2085
|
-
declare const getBlockExplorerUrls: (network: Network, query: BlockExplorerQuery) => string[];
|
|
2086
|
-
declare const getBlockExplorerLabel: (blockExplorerUrl: string) => string;
|
|
2085
|
+
export declare const getBlockExplorerUrls: (network: Network, query: BlockExplorerQuery) => string[];
|
|
2086
|
+
export declare const getBlockExplorerLabel: (blockExplorerUrl: string) => string;
|
|
2087
2087
|
//#endregion
|
|
2088
2088
|
//#region src/legacy/EvmNetwork.d.ts
|
|
2089
2089
|
/** @deprecated */
|
|
2090
|
-
type LegacyEvmNetworkId = string;
|
|
2090
|
+
export type LegacyEvmNetworkId = string;
|
|
2091
2091
|
/** @deprecated */
|
|
2092
|
-
type LegacyEvmNetwork = {
|
|
2092
|
+
export type LegacyEvmNetwork = {
|
|
2093
2093
|
id: LegacyEvmNetworkId;
|
|
2094
2094
|
isTestnet: boolean;
|
|
2095
2095
|
isDefault: boolean;
|
|
@@ -2131,7 +2131,7 @@ type LegacyEvmNetwork = {
|
|
|
2131
2131
|
erc20aggregator?: `0x${string}`;
|
|
2132
2132
|
};
|
|
2133
2133
|
/** @deprecated */
|
|
2134
|
-
type LegacyCustomEvmNetwork = LegacyEvmNetwork & {
|
|
2134
|
+
export type LegacyCustomEvmNetwork = LegacyEvmNetwork & {
|
|
2135
2135
|
isCustom: true;
|
|
2136
2136
|
explorerUrls: string[];
|
|
2137
2137
|
iconUrls: string[];
|
|
@@ -2150,9 +2150,9 @@ type BalancesMetadataLegacy$1 = {
|
|
|
2150
2150
|
//#endregion
|
|
2151
2151
|
//#region src/legacy/Chain.d.ts
|
|
2152
2152
|
/** @deprecated use NetworkId */
|
|
2153
|
-
type LegacyChainId = string;
|
|
2153
|
+
export type LegacyChainId = string;
|
|
2154
2154
|
/** @deprecated use DotNetwork */
|
|
2155
|
-
type LegacyChain = {
|
|
2155
|
+
export type LegacyChain = {
|
|
2156
2156
|
id: LegacyChainId;
|
|
2157
2157
|
isTestnet: boolean;
|
|
2158
2158
|
isDefault: boolean;
|
|
@@ -2223,7 +2223,7 @@ type LegacyChain = {
|
|
|
2223
2223
|
registryTypes?: any;
|
|
2224
2224
|
};
|
|
2225
2225
|
/** @deprecated use CustomDotNetwork */
|
|
2226
|
-
type LegacyCustomChain = LegacyChain & {
|
|
2226
|
+
export type LegacyCustomChain = LegacyChain & {
|
|
2227
2227
|
isCustom: true;
|
|
2228
2228
|
};
|
|
2229
2229
|
type SubstrateRpc = {
|
|
@@ -2246,10 +2246,10 @@ declare class TalismanChaindataDatabase extends Dexie {
|
|
|
2246
2246
|
constructor();
|
|
2247
2247
|
}
|
|
2248
2248
|
/** @deprecated */
|
|
2249
|
-
declare const getChaindataDbV3: () => TalismanChaindataDatabase;
|
|
2249
|
+
export declare const getChaindataDbV3: () => TalismanChaindataDatabase;
|
|
2250
2250
|
//#endregion
|
|
2251
2251
|
//#region src/state/schema.d.ts
|
|
2252
|
-
declare const ChaindataFileSchema: z.ZodObject<{
|
|
2252
|
+
export declare const ChaindataFileSchema: z.ZodObject<{
|
|
2253
2253
|
networks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2254
2254
|
id: z.ZodString;
|
|
2255
2255
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2595,9 +2595,18 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2595
2595
|
coingeckoId?: string | undefined;
|
|
2596
2596
|
noDiscovery?: boolean | undefined;
|
|
2597
2597
|
mirrorOf?: string | undefined;
|
|
2598
|
-
type: "evm-
|
|
2598
|
+
type: "evm-uniswapv2";
|
|
2599
2599
|
platform: "ethereum";
|
|
2600
2600
|
contractAddress: `0x${string}`;
|
|
2601
|
+
isCustom?: boolean | undefined;
|
|
2602
|
+
symbol0: string;
|
|
2603
|
+
symbol1: string;
|
|
2604
|
+
decimals0: number;
|
|
2605
|
+
decimals1: number;
|
|
2606
|
+
tokenAddress0: `0x${string}`;
|
|
2607
|
+
tokenAddress1: `0x${string}`;
|
|
2608
|
+
coingeckoId0?: string | undefined;
|
|
2609
|
+
coingeckoId1?: string | undefined;
|
|
2601
2610
|
} | {
|
|
2602
2611
|
id: string;
|
|
2603
2612
|
networkId: string;
|
|
@@ -2609,8 +2618,9 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2609
2618
|
coingeckoId?: string | undefined;
|
|
2610
2619
|
noDiscovery?: boolean | undefined;
|
|
2611
2620
|
mirrorOf?: string | undefined;
|
|
2612
|
-
type: "evm-
|
|
2621
|
+
type: "evm-erc20";
|
|
2613
2622
|
platform: "ethereum";
|
|
2623
|
+
contractAddress: `0x${string}`;
|
|
2614
2624
|
} | {
|
|
2615
2625
|
id: string;
|
|
2616
2626
|
networkId: string;
|
|
@@ -2622,18 +2632,8 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2622
2632
|
coingeckoId?: string | undefined;
|
|
2623
2633
|
noDiscovery?: boolean | undefined;
|
|
2624
2634
|
mirrorOf?: string | undefined;
|
|
2625
|
-
type: "evm-
|
|
2635
|
+
type: "evm-native";
|
|
2626
2636
|
platform: "ethereum";
|
|
2627
|
-
contractAddress: `0x${string}`;
|
|
2628
|
-
isCustom?: boolean | undefined;
|
|
2629
|
-
symbol0: string;
|
|
2630
|
-
symbol1: string;
|
|
2631
|
-
decimals0: number;
|
|
2632
|
-
decimals1: number;
|
|
2633
|
-
tokenAddress0: `0x${string}`;
|
|
2634
|
-
tokenAddress1: `0x${string}`;
|
|
2635
|
-
coingeckoId0?: string | undefined;
|
|
2636
|
-
coingeckoId1?: string | undefined;
|
|
2637
2637
|
} | {
|
|
2638
2638
|
id: string;
|
|
2639
2639
|
networkId: string;
|
|
@@ -2798,9 +2798,18 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2798
2798
|
coingeckoId?: string | undefined;
|
|
2799
2799
|
noDiscovery?: boolean | undefined;
|
|
2800
2800
|
mirrorOf?: string | undefined;
|
|
2801
|
-
type: "evm-
|
|
2801
|
+
type: "evm-uniswapv2";
|
|
2802
2802
|
platform: "ethereum";
|
|
2803
2803
|
contractAddress: `0x${string}`;
|
|
2804
|
+
isCustom?: boolean | undefined;
|
|
2805
|
+
symbol0: string;
|
|
2806
|
+
symbol1: string;
|
|
2807
|
+
decimals0: number;
|
|
2808
|
+
decimals1: number;
|
|
2809
|
+
tokenAddress0: `0x${string}`;
|
|
2810
|
+
tokenAddress1: `0x${string}`;
|
|
2811
|
+
coingeckoId0?: string | undefined;
|
|
2812
|
+
coingeckoId1?: string | undefined;
|
|
2804
2813
|
} | {
|
|
2805
2814
|
id: string;
|
|
2806
2815
|
networkId: string;
|
|
@@ -2812,8 +2821,9 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2812
2821
|
coingeckoId?: string | undefined;
|
|
2813
2822
|
noDiscovery?: boolean | undefined;
|
|
2814
2823
|
mirrorOf?: string | undefined;
|
|
2815
|
-
type: "evm-
|
|
2824
|
+
type: "evm-erc20";
|
|
2816
2825
|
platform: "ethereum";
|
|
2826
|
+
contractAddress: `0x${string}`;
|
|
2817
2827
|
} | {
|
|
2818
2828
|
id: string;
|
|
2819
2829
|
networkId: string;
|
|
@@ -2825,18 +2835,8 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2825
2835
|
coingeckoId?: string | undefined;
|
|
2826
2836
|
noDiscovery?: boolean | undefined;
|
|
2827
2837
|
mirrorOf?: string | undefined;
|
|
2828
|
-
type: "evm-
|
|
2838
|
+
type: "evm-native";
|
|
2829
2839
|
platform: "ethereum";
|
|
2830
|
-
contractAddress: `0x${string}`;
|
|
2831
|
-
isCustom?: boolean | undefined;
|
|
2832
|
-
symbol0: string;
|
|
2833
|
-
symbol1: string;
|
|
2834
|
-
decimals0: number;
|
|
2835
|
-
decimals1: number;
|
|
2836
|
-
tokenAddress0: `0x${string}`;
|
|
2837
|
-
tokenAddress1: `0x${string}`;
|
|
2838
|
-
coingeckoId0?: string | undefined;
|
|
2839
|
-
coingeckoId1?: string | undefined;
|
|
2840
2840
|
} | {
|
|
2841
2841
|
id: string;
|
|
2842
2842
|
networkId: string;
|
|
@@ -3002,7 +3002,7 @@ declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
3002
3002
|
}, z.core.$strict>>;
|
|
3003
3003
|
}, z.core.$strip>;
|
|
3004
3004
|
type Chaindata = z.infer<typeof ChaindataFileSchema>;
|
|
3005
|
-
declare const CustomChaindataSchema: z.ZodObject<{
|
|
3005
|
+
export declare const CustomChaindataSchema: z.ZodObject<{
|
|
3006
3006
|
networks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3007
3007
|
id: z.ZodString;
|
|
3008
3008
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3348,9 +3348,18 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3348
3348
|
coingeckoId?: string | undefined;
|
|
3349
3349
|
noDiscovery?: boolean | undefined;
|
|
3350
3350
|
mirrorOf?: string | undefined;
|
|
3351
|
-
type: "evm-
|
|
3351
|
+
type: "evm-uniswapv2";
|
|
3352
3352
|
platform: "ethereum";
|
|
3353
3353
|
contractAddress: `0x${string}`;
|
|
3354
|
+
isCustom?: boolean | undefined;
|
|
3355
|
+
symbol0: string;
|
|
3356
|
+
symbol1: string;
|
|
3357
|
+
decimals0: number;
|
|
3358
|
+
decimals1: number;
|
|
3359
|
+
tokenAddress0: `0x${string}`;
|
|
3360
|
+
tokenAddress1: `0x${string}`;
|
|
3361
|
+
coingeckoId0?: string | undefined;
|
|
3362
|
+
coingeckoId1?: string | undefined;
|
|
3354
3363
|
} | {
|
|
3355
3364
|
id: string;
|
|
3356
3365
|
networkId: string;
|
|
@@ -3362,8 +3371,9 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3362
3371
|
coingeckoId?: string | undefined;
|
|
3363
3372
|
noDiscovery?: boolean | undefined;
|
|
3364
3373
|
mirrorOf?: string | undefined;
|
|
3365
|
-
type: "evm-
|
|
3374
|
+
type: "evm-erc20";
|
|
3366
3375
|
platform: "ethereum";
|
|
3376
|
+
contractAddress: `0x${string}`;
|
|
3367
3377
|
} | {
|
|
3368
3378
|
id: string;
|
|
3369
3379
|
networkId: string;
|
|
@@ -3375,18 +3385,8 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3375
3385
|
coingeckoId?: string | undefined;
|
|
3376
3386
|
noDiscovery?: boolean | undefined;
|
|
3377
3387
|
mirrorOf?: string | undefined;
|
|
3378
|
-
type: "evm-
|
|
3388
|
+
type: "evm-native";
|
|
3379
3389
|
platform: "ethereum";
|
|
3380
|
-
contractAddress: `0x${string}`;
|
|
3381
|
-
isCustom?: boolean | undefined;
|
|
3382
|
-
symbol0: string;
|
|
3383
|
-
symbol1: string;
|
|
3384
|
-
decimals0: number;
|
|
3385
|
-
decimals1: number;
|
|
3386
|
-
tokenAddress0: `0x${string}`;
|
|
3387
|
-
tokenAddress1: `0x${string}`;
|
|
3388
|
-
coingeckoId0?: string | undefined;
|
|
3389
|
-
coingeckoId1?: string | undefined;
|
|
3390
3390
|
} | {
|
|
3391
3391
|
id: string;
|
|
3392
3392
|
networkId: string;
|
|
@@ -3551,9 +3551,18 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3551
3551
|
coingeckoId?: string | undefined;
|
|
3552
3552
|
noDiscovery?: boolean | undefined;
|
|
3553
3553
|
mirrorOf?: string | undefined;
|
|
3554
|
-
type: "evm-
|
|
3554
|
+
type: "evm-uniswapv2";
|
|
3555
3555
|
platform: "ethereum";
|
|
3556
3556
|
contractAddress: `0x${string}`;
|
|
3557
|
+
isCustom?: boolean | undefined;
|
|
3558
|
+
symbol0: string;
|
|
3559
|
+
symbol1: string;
|
|
3560
|
+
decimals0: number;
|
|
3561
|
+
decimals1: number;
|
|
3562
|
+
tokenAddress0: `0x${string}`;
|
|
3563
|
+
tokenAddress1: `0x${string}`;
|
|
3564
|
+
coingeckoId0?: string | undefined;
|
|
3565
|
+
coingeckoId1?: string | undefined;
|
|
3557
3566
|
} | {
|
|
3558
3567
|
id: string;
|
|
3559
3568
|
networkId: string;
|
|
@@ -3565,8 +3574,9 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3565
3574
|
coingeckoId?: string | undefined;
|
|
3566
3575
|
noDiscovery?: boolean | undefined;
|
|
3567
3576
|
mirrorOf?: string | undefined;
|
|
3568
|
-
type: "evm-
|
|
3577
|
+
type: "evm-erc20";
|
|
3569
3578
|
platform: "ethereum";
|
|
3579
|
+
contractAddress: `0x${string}`;
|
|
3570
3580
|
} | {
|
|
3571
3581
|
id: string;
|
|
3572
3582
|
networkId: string;
|
|
@@ -3578,18 +3588,8 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3578
3588
|
coingeckoId?: string | undefined;
|
|
3579
3589
|
noDiscovery?: boolean | undefined;
|
|
3580
3590
|
mirrorOf?: string | undefined;
|
|
3581
|
-
type: "evm-
|
|
3591
|
+
type: "evm-native";
|
|
3582
3592
|
platform: "ethereum";
|
|
3583
|
-
contractAddress: `0x${string}`;
|
|
3584
|
-
isCustom?: boolean | undefined;
|
|
3585
|
-
symbol0: string;
|
|
3586
|
-
symbol1: string;
|
|
3587
|
-
decimals0: number;
|
|
3588
|
-
decimals1: number;
|
|
3589
|
-
tokenAddress0: `0x${string}`;
|
|
3590
|
-
tokenAddress1: `0x${string}`;
|
|
3591
|
-
coingeckoId0?: string | undefined;
|
|
3592
|
-
coingeckoId1?: string | undefined;
|
|
3593
3593
|
} | {
|
|
3594
3594
|
id: string;
|
|
3595
3595
|
networkId: string;
|
|
@@ -3748,7 +3748,7 @@ declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3748
3748
|
type CustomChaindata = z.infer<typeof CustomChaindataSchema>;
|
|
3749
3749
|
//#endregion
|
|
3750
3750
|
//#region src/provider/ChaindataProviderInterface.d.ts
|
|
3751
|
-
interface IChaindataNetworkProvider {
|
|
3751
|
+
export interface IChaindataNetworkProvider {
|
|
3752
3752
|
networks$: Observable<Network[]>;
|
|
3753
3753
|
getNetworks$<P extends NetworkPlatform | undefined, R = P extends NetworkPlatform ? NetworkOfPlatform<P> : Network>(platform?: P): Observable<R[]>;
|
|
3754
3754
|
getNetworks<P extends NetworkPlatform | undefined, R = P extends NetworkPlatform ? NetworkOfPlatform<P> : Network>(platform?: P): Promise<R[]>;
|
|
@@ -3763,7 +3763,7 @@ interface IChaindataNetworkProvider {
|
|
|
3763
3763
|
getNetworkByGenesisHash$(genesisHash: `0x${string}`): Observable<DotNetwork | null>;
|
|
3764
3764
|
getNetworkByGenesisHash(genesisHash: `0x${string}`): Promise<DotNetwork | null>;
|
|
3765
3765
|
}
|
|
3766
|
-
interface IChaindataTokenProvider {
|
|
3766
|
+
export interface IChaindataTokenProvider {
|
|
3767
3767
|
tokens$: Observable<Token[]>;
|
|
3768
3768
|
getTokens$<T extends TokenType | undefined, R extends T extends TokenType ? TokenOfType<T> : Token>(type?: T): Observable<R[]>;
|
|
3769
3769
|
getTokens<T extends TokenType | undefined, R extends T extends TokenType ? TokenOfType<T> : Token>(type?: T): Promise<R[]>;
|
|
@@ -3774,7 +3774,7 @@ interface IChaindataTokenProvider {
|
|
|
3774
3774
|
getTokenById$<T extends TokenType | undefined, R extends T extends TokenType ? TokenOfType<T> : Token>(tokenId: TokenId, type?: T): Observable<R | null>;
|
|
3775
3775
|
getTokenById<T extends TokenType | undefined, R extends T extends TokenType ? TokenOfType<T> : Token>(tokenId: TokenId, type?: T): Promise<R | null>;
|
|
3776
3776
|
}
|
|
3777
|
-
interface IChaindataProvider extends IChaindataNetworkProvider, IChaindataTokenProvider {}
|
|
3777
|
+
export interface IChaindataProvider extends IChaindataNetworkProvider, IChaindataTokenProvider {}
|
|
3778
3778
|
//#endregion
|
|
3779
3779
|
//#region src/provider/ChaindataProvider.d.ts
|
|
3780
3780
|
/**
|
|
@@ -3783,17 +3783,17 @@ interface IChaindataProvider extends IChaindataNetworkProvider, IChaindataTokenP
|
|
|
3783
3783
|
* Provide a Subject<ChaindataStorage> and subscribe to changes to persist the data to disk.
|
|
3784
3784
|
* Instantiate ChaindataProvider with this subject to restore persisted data from disk.
|
|
3785
3785
|
*/
|
|
3786
|
-
type ChaindataStorage = {
|
|
3786
|
+
export type ChaindataStorage = {
|
|
3787
3787
|
networks: Network[];
|
|
3788
3788
|
tokens: Token[];
|
|
3789
3789
|
miniMetadatas: AnyMiniMetadata[];
|
|
3790
3790
|
};
|
|
3791
|
-
type ChaindataProviderOptions = {
|
|
3791
|
+
export type ChaindataProviderOptions = {
|
|
3792
3792
|
persistedStorage?: ChaindataStorage | Promise<ChaindataStorage | undefined>;
|
|
3793
3793
|
customChaindata$?: Observable<CustomChaindata> | CustomChaindata;
|
|
3794
3794
|
dynamicTokens$?: ReplaySubject<Token[]>;
|
|
3795
3795
|
};
|
|
3796
|
-
declare class ChaindataProvider implements IChaindataProvider {
|
|
3796
|
+
export declare class ChaindataProvider implements IChaindataProvider {
|
|
3797
3797
|
#private;
|
|
3798
3798
|
constructor({ persistedStorage, customChaindata$, dynamicTokens$ }?: ChaindataProviderOptions);
|
|
3799
3799
|
/**
|
|
@@ -4090,6 +4090,32 @@ declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4090
4090
|
* Networks
|
|
4091
4091
|
*/
|
|
4092
4092
|
get networks$(): Observable<({
|
|
4093
|
+
id: string;
|
|
4094
|
+
isTestnet?: boolean | undefined;
|
|
4095
|
+
isDefault?: boolean | undefined;
|
|
4096
|
+
forceScan?: boolean | undefined;
|
|
4097
|
+
name: string;
|
|
4098
|
+
logo?: string | undefined;
|
|
4099
|
+
nativeTokenId: string;
|
|
4100
|
+
nativeCurrency: {
|
|
4101
|
+
decimals: number;
|
|
4102
|
+
symbol: string;
|
|
4103
|
+
name: string;
|
|
4104
|
+
coingeckoId?: string | undefined;
|
|
4105
|
+
mirrorOf?: string | undefined;
|
|
4106
|
+
logo?: string | undefined;
|
|
4107
|
+
};
|
|
4108
|
+
themeColor?: string | undefined;
|
|
4109
|
+
blockExplorerUrls: string[];
|
|
4110
|
+
platform: "solana";
|
|
4111
|
+
genesisHash: string;
|
|
4112
|
+
rpcs: string[];
|
|
4113
|
+
balancesConfig?: {
|
|
4114
|
+
"sol-native"?: Record<string, never> | undefined;
|
|
4115
|
+
"sol-spl"?: Record<string, never> | undefined;
|
|
4116
|
+
"sol-token2022"?: Record<string, never> | undefined;
|
|
4117
|
+
} | undefined;
|
|
4118
|
+
} | {
|
|
4093
4119
|
id: string;
|
|
4094
4120
|
isTestnet?: boolean | undefined;
|
|
4095
4121
|
isDefault?: boolean | undefined;
|
|
@@ -4183,32 +4209,6 @@ declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4183
4209
|
"evm-erc20"?: Record<string, never> | undefined;
|
|
4184
4210
|
"evm-uniswapv2"?: Record<string, never> | undefined;
|
|
4185
4211
|
} | undefined;
|
|
4186
|
-
} | {
|
|
4187
|
-
id: string;
|
|
4188
|
-
isTestnet?: boolean | undefined;
|
|
4189
|
-
isDefault?: boolean | undefined;
|
|
4190
|
-
forceScan?: boolean | undefined;
|
|
4191
|
-
name: string;
|
|
4192
|
-
logo?: string | undefined;
|
|
4193
|
-
nativeTokenId: string;
|
|
4194
|
-
nativeCurrency: {
|
|
4195
|
-
decimals: number;
|
|
4196
|
-
symbol: string;
|
|
4197
|
-
name: string;
|
|
4198
|
-
coingeckoId?: string | undefined;
|
|
4199
|
-
mirrorOf?: string | undefined;
|
|
4200
|
-
logo?: string | undefined;
|
|
4201
|
-
};
|
|
4202
|
-
themeColor?: string | undefined;
|
|
4203
|
-
blockExplorerUrls: string[];
|
|
4204
|
-
platform: "solana";
|
|
4205
|
-
genesisHash: string;
|
|
4206
|
-
rpcs: string[];
|
|
4207
|
-
balancesConfig?: {
|
|
4208
|
-
"sol-native"?: Record<string, never> | undefined;
|
|
4209
|
-
"sol-spl"?: Record<string, never> | undefined;
|
|
4210
|
-
"sol-token2022"?: Record<string, never> | undefined;
|
|
4211
|
-
} | undefined;
|
|
4212
4212
|
})[]>;
|
|
4213
4213
|
getNetworks$<P extends NetworkPlatform | undefined, R = P extends NetworkPlatform ? NetworkOfPlatform<P> : Network>(platform?: P): Observable<R[]>;
|
|
4214
4214
|
getNetworks<P extends NetworkPlatform | undefined, R = P extends NetworkPlatform ? NetworkOfPlatform<P> : Network>(platform?: P): Promise<R[]>;
|
|
@@ -4393,23 +4393,24 @@ declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4393
4393
|
}
|
|
4394
4394
|
//#endregion
|
|
4395
4395
|
//#region src/state/combinedChaindata.d.ts
|
|
4396
|
-
declare const isNetworkCustom: (network: Network) => boolean;
|
|
4397
|
-
declare const isNetworkKnown: (network: Network) => boolean;
|
|
4398
|
-
declare const isTokenCustom: (token: Token) => boolean;
|
|
4399
|
-
declare const isTokenKnown: (token: Token) => boolean;
|
|
4400
|
-
declare const isTokenTestnet: (token: Token) => boolean;
|
|
4401
|
-
declare const getCleanNetwork: (network: Network) => Network;
|
|
4402
|
-
declare const getCleanToken: (token: Token) => Token;
|
|
4396
|
+
export declare const isNetworkCustom: (network: Network) => boolean;
|
|
4397
|
+
export declare const isNetworkKnown: (network: Network) => boolean;
|
|
4398
|
+
export declare const isTokenCustom: (token: Token) => boolean;
|
|
4399
|
+
export declare const isTokenKnown: (token: Token) => boolean;
|
|
4400
|
+
export declare const isTokenTestnet: (token: Token) => boolean;
|
|
4401
|
+
export declare const getCleanNetwork: (network: Network) => Network;
|
|
4402
|
+
export declare const getCleanToken: (token: Token) => Token;
|
|
4403
4403
|
//#endregion
|
|
4404
4404
|
//#region src/util.d.ts
|
|
4405
4405
|
type KNOWN_TOKEN_ID = "uniswap";
|
|
4406
|
-
declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
4406
|
+
export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
4407
4407
|
/**
|
|
4408
4408
|
* Use only if you are sure this token is supported by Talisman or the url might 404
|
|
4409
4409
|
* @param coingeckoId
|
|
4410
4410
|
* @returns
|
|
4411
4411
|
*/
|
|
4412
|
-
declare const getGithubTokenLogoUrlByCoingeckoId: (coingeckoId: string) => string;
|
|
4412
|
+
export declare const getGithubTokenLogoUrlByCoingeckoId: (coingeckoId: string) => string;
|
|
4413
|
+
export declare const getGithubBittensorHotkeyAssetUrl: (fileName: string) => string;
|
|
4413
4414
|
//#endregion
|
|
4414
|
-
export {
|
|
4415
|
+
export type { Chaindata, CustomChaindata };
|
|
4415
4416
|
//# sourceMappingURL=index.d.ts.map
|