@talismn/chaindata-provider 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.d.mts +58 -132
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +112 -186
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +504 -425
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +503 -423
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import z, { z as z$1 } from "zod/v4";
|
|
2
2
|
import { Dexie } from "dexie";
|
|
3
3
|
import { Observable, ReplaySubject } from "rxjs";
|
|
4
|
-
//#region src/chaindata/miniMetadata.d.ts
|
|
5
4
|
export declare const AnyMiniMetadataSchema: z.ZodObject<{
|
|
6
5
|
id: z.ZodString;
|
|
7
6
|
source: z.ZodString;
|
|
@@ -12,8 +11,6 @@ export declare const AnyMiniMetadataSchema: z.ZodObject<{
|
|
|
12
11
|
extra: z.ZodNullable<z.ZodAny>;
|
|
13
12
|
}, z.core.$strict>;
|
|
14
13
|
export type AnyMiniMetadata = z.infer<typeof AnyMiniMetadataSchema>;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/chaindata/networks/DotNetwork.d.ts
|
|
17
14
|
export declare const DotNetworkBalancesConfigSchema: z.ZodObject<{
|
|
18
15
|
"substrate-native": z.ZodOptional<z.ZodObject<{
|
|
19
16
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -101,8 +98,6 @@ export declare const DotNetworkSchema: z.ZodObject<{
|
|
|
101
98
|
export type DotNetwork = z.infer<typeof DotNetworkSchema>;
|
|
102
99
|
export type DotNetworkId = DotNetwork["id"];
|
|
103
100
|
export type DotNetworkList = Record<DotNetworkId, DotNetwork>;
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/chaindata/networks/EthNetwork.d.ts
|
|
106
101
|
export declare const EthNetworkBalancesConfigSchema: z.ZodObject<{
|
|
107
102
|
"evm-native": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
108
103
|
"evm-erc20": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -154,8 +149,6 @@ export declare const EthNetworkSchema: z.ZodObject<{
|
|
|
154
149
|
export type EthNetwork = z.infer<typeof EthNetworkSchema>;
|
|
155
150
|
export type EthNetworkId = EthNetwork["id"];
|
|
156
151
|
export type EthNetworkList = Record<EthNetworkId, EthNetwork>;
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region src/chaindata/networks/Network.d.ts
|
|
159
152
|
export declare const NetworkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
160
153
|
id: z.ZodString;
|
|
161
154
|
isTestnet: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -288,8 +281,6 @@ export type Network = z.infer<typeof NetworkSchema>;
|
|
|
288
281
|
export type NetworkId = Network["id"];
|
|
289
282
|
export type NetworkPlatform = Network["platform"];
|
|
290
283
|
export type NetworkList = Record<NetworkId, Network>;
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region src/chaindata/networks/NetworkBase.d.ts
|
|
293
284
|
export declare const NetworkBaseSchema: z$1.ZodObject<{
|
|
294
285
|
id: z$1.ZodString;
|
|
295
286
|
isTestnet: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
@@ -310,8 +301,6 @@ export declare const NetworkBaseSchema: z$1.ZodObject<{
|
|
|
310
301
|
blockExplorerUrls: z$1.ZodDefault<z$1.ZodArray<z$1.ZodURL>>;
|
|
311
302
|
}, z$1.core.$strict>;
|
|
312
303
|
export type NetworkBase = z$1.infer<typeof NetworkBaseSchema>;
|
|
313
|
-
//#endregion
|
|
314
|
-
//#region src/chaindata/networks/SolNetwork.d.ts
|
|
315
304
|
export declare const SolNetworkBalancesConfigSchema: z.ZodObject<{
|
|
316
305
|
"sol-native": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
317
306
|
"sol-spl": z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -348,20 +337,12 @@ export declare const SolNetworkSchema: z.ZodObject<{
|
|
|
348
337
|
export type SolNetwork = z.infer<typeof SolNetworkSchema>;
|
|
349
338
|
export type SolNetworkId = SolNetwork["id"];
|
|
350
339
|
export type SolNetworkList = Record<SolNetworkId, SolNetwork>;
|
|
351
|
-
//#endregion
|
|
352
|
-
//#region src/chaindata/shared/EthereumAddress.d.ts
|
|
353
340
|
export declare const EthereumAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
354
341
|
export type EthereumAddress = z.infer<typeof EthereumAddressSchema>;
|
|
355
|
-
//#endregion
|
|
356
|
-
//#region src/chaindata/shared/HexString.d.ts
|
|
357
342
|
export declare const HexStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
358
343
|
export type HexString = z.infer<typeof HexStringSchema>;
|
|
359
|
-
//#endregion
|
|
360
|
-
//#region src/chaindata/shared/SolanaAddress.d.ts
|
|
361
344
|
export declare const SolanaAddressSchema: z.ZodString;
|
|
362
345
|
export type SolanaAddress = z.infer<typeof SolanaAddressSchema>;
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region src/chaindata/tokens/EvmNativeToken.d.ts
|
|
365
346
|
declare const TOKEN_TYPE$12 = "evm-native";
|
|
366
347
|
export declare const EvmNativeTokenSchema: z.ZodObject<{
|
|
367
348
|
id: z.ZodString;
|
|
@@ -386,8 +367,6 @@ export type EvmNativeTokenIdSpecs = {
|
|
|
386
367
|
};
|
|
387
368
|
export declare const evmNativeTokenId: (networkId: NetworkId) => string;
|
|
388
369
|
export declare const parseEvmNativeTokenId: (tokenId: TokenId) => EvmNativeTokenIdSpecs;
|
|
389
|
-
//#endregion
|
|
390
|
-
//#region src/chaindata/tokens/EvmUniswapV2Token.d.ts
|
|
391
370
|
declare const TOKEN_TYPE$11 = "evm-uniswapv2";
|
|
392
371
|
export declare const EvmUniswapV2TokenSchema: z.ZodObject<{
|
|
393
372
|
id: z.ZodString;
|
|
@@ -423,8 +402,6 @@ export type EvmUniswapV2TokenIdSpecs = {
|
|
|
423
402
|
};
|
|
424
403
|
export declare const evmUniswapV2TokenId: (networkId: NetworkId, contractAddress: EvmUniswapV2Token["contractAddress"]) => string;
|
|
425
404
|
export declare const parseEvmUniswapV2TokenId: (tokenId: TokenId) => EvmUniswapV2TokenIdSpecs;
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/chaindata/tokens/SolNativeToken.d.ts
|
|
428
405
|
declare const TOKEN_TYPE$10 = "sol-native";
|
|
429
406
|
export declare const SolNativeTokenSchema: z.ZodObject<{
|
|
430
407
|
id: z.ZodString;
|
|
@@ -449,8 +426,6 @@ export type SolNativeTokenIdSpecs = {
|
|
|
449
426
|
};
|
|
450
427
|
export declare const solNativeTokenId: (networkId: SolNetworkId) => string;
|
|
451
428
|
export declare const parseSolNativeTokenId: (tokenId: TokenId) => SolNativeTokenIdSpecs;
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/chaindata/tokens/SolSplToken.d.ts
|
|
454
429
|
declare const TOKEN_TYPE$9 = "sol-spl";
|
|
455
430
|
export declare const SolSplTokenSchema: z.ZodObject<{
|
|
456
431
|
id: z.ZodString;
|
|
@@ -477,8 +452,6 @@ export type SolSplTokenIdSpecs = {
|
|
|
477
452
|
};
|
|
478
453
|
export declare const solSplTokenId: (networkId: string, mintAddress: string) => string;
|
|
479
454
|
export declare const parseSolSplTokenId: (tokenId: TokenId) => SolSplTokenIdSpecs;
|
|
480
|
-
//#endregion
|
|
481
|
-
//#region src/chaindata/tokens/SolToken2022Token.d.ts
|
|
482
455
|
declare const TOKEN_TYPE$8 = "sol-token2022";
|
|
483
456
|
export declare const SolToken2022TokenSchema: z.ZodObject<{
|
|
484
457
|
id: z.ZodString;
|
|
@@ -506,8 +479,6 @@ export type SolToken2022TokenIdSpecs = {
|
|
|
506
479
|
};
|
|
507
480
|
export declare const solToken2022TokenId: (networkId: string, mintAddress: string) => string;
|
|
508
481
|
export declare const parseSolToken2022TokenId: (tokenId: TokenId) => SolToken2022TokenIdSpecs;
|
|
509
|
-
//#endregion
|
|
510
|
-
//#region src/chaindata/tokens/SubstrateAssetsToken.d.ts
|
|
511
482
|
declare const TOKEN_TYPE$7 = "substrate-assets";
|
|
512
483
|
export declare const SubAssetsTokenSchema: z.ZodObject<{
|
|
513
484
|
id: z.ZodString;
|
|
@@ -537,8 +508,6 @@ export type SubAssetTokenIdSpecs = {
|
|
|
537
508
|
};
|
|
538
509
|
export declare const subAssetTokenId: (networkId: NetworkId, assetId: string) => string;
|
|
539
510
|
export declare const parseSubAssetTokenId: (tokenId: TokenId) => SubAssetTokenIdSpecs;
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/chaindata/tokens/SubstrateDTaoToken.d.ts
|
|
542
511
|
declare const TOKEN_TYPE$6 = "substrate-dtao";
|
|
543
512
|
export declare const SubDTaoTokenSchema: z.ZodObject<{
|
|
544
513
|
id: z.ZodString;
|
|
@@ -569,8 +538,6 @@ export type SubDTaoTokenIdSpecs = {
|
|
|
569
538
|
};
|
|
570
539
|
export declare const subDTaoTokenId: (networkId: NetworkId, subnetId: number, hotkey?: string) => string;
|
|
571
540
|
export declare const parseSubDTaoTokenId: (tokenId: TokenId) => SubDTaoTokenIdSpecs;
|
|
572
|
-
//#endregion
|
|
573
|
-
//#region src/chaindata/tokens/SubstrateForeignAssetsToken.d.ts
|
|
574
541
|
export declare const TOKEN_TYPE = "substrate-foreignassets";
|
|
575
542
|
export declare const SubForeignAssetsTokenSchema: z.ZodObject<{
|
|
576
543
|
id: z.ZodString;
|
|
@@ -600,8 +567,6 @@ export type ForeignAssetsTokenIdSpecs = {
|
|
|
600
567
|
};
|
|
601
568
|
export declare const subForeignAssetTokenId: (networkId: NetworkId, onChainId: string) => string;
|
|
602
569
|
export declare const parseSubForeignAssetTokenId: (tokenId: TokenId) => ForeignAssetsTokenIdSpecs;
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region src/chaindata/tokens/SubstrateHydrationToken.d.ts
|
|
605
570
|
declare const TOKEN_TYPE$5 = "substrate-hydration";
|
|
606
571
|
export declare const SubHydrationTokenSchema: z.ZodObject<{
|
|
607
572
|
id: z.ZodString;
|
|
@@ -635,8 +600,6 @@ export type SubHydrationTokenIdSpecs = {
|
|
|
635
600
|
};
|
|
636
601
|
export declare const subHydrationTokenId: (networkId: NetworkId, onChainId: number) => string;
|
|
637
602
|
export declare const parseSubHydrationTokenId: (tokenId: string) => SubHydrationTokenIdSpecs;
|
|
638
|
-
//#endregion
|
|
639
|
-
//#region src/chaindata/tokens/SubstrateNativeToken.d.ts
|
|
640
603
|
declare const TOKEN_TYPE$4 = "substrate-native";
|
|
641
604
|
export declare const SubNativeTokenSchema: z.ZodObject<{
|
|
642
605
|
id: z.ZodString;
|
|
@@ -664,8 +627,6 @@ export type SubNativeTokenIdSpecs = {
|
|
|
664
627
|
};
|
|
665
628
|
export declare const subNativeTokenId: (networkId: NetworkId) => string;
|
|
666
629
|
export declare const parseSubNativeTokenId: (tokenId: TokenId) => SubNativeTokenIdSpecs;
|
|
667
|
-
//#endregion
|
|
668
|
-
//#region src/chaindata/tokens/SubstratePsp22Token.d.ts
|
|
669
630
|
declare const TOKEN_TYPE$3 = "substrate-psp22";
|
|
670
631
|
export declare const SubPsp22TokenSchema: z.ZodObject<{
|
|
671
632
|
id: z.ZodString;
|
|
@@ -692,8 +653,6 @@ export type SubPsp22TokenIdSpecs = {
|
|
|
692
653
|
};
|
|
693
654
|
export declare const subPsp22TokenId: (networkId: NetworkId, contractAddress: string) => string;
|
|
694
655
|
export declare const parseSubPsp22TokenId: (tokenId: TokenId) => SubPsp22TokenIdSpecs;
|
|
695
|
-
//#endregion
|
|
696
|
-
//#region src/chaindata/tokens/SubstrateTokensToken.d.ts
|
|
697
656
|
declare const TOKEN_TYPE$2 = "substrate-tokens";
|
|
698
657
|
export declare const SubTokensTokenSchema: z.ZodObject<{
|
|
699
658
|
id: z.ZodString;
|
|
@@ -723,8 +682,6 @@ export type SubTokensTokenIdSpecs = {
|
|
|
723
682
|
};
|
|
724
683
|
export declare const subTokensTokenId: (networkId: NetworkId, onChainId: string | number) => string;
|
|
725
684
|
export declare const parseSubTokensTokenId: (tokenId: string) => SubTokensTokenIdSpecs;
|
|
726
|
-
//#endregion
|
|
727
|
-
//#region src/chaindata/tokens/Token.d.ts
|
|
728
685
|
/**
|
|
729
686
|
* The `Token` sum type, which is a union of all of the possible `TokenTypes`.
|
|
730
687
|
*/
|
|
@@ -1164,23 +1121,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1164
1121
|
mintAddress: z.ZodString;
|
|
1165
1122
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
1166
1123
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
1167
|
-
id: string;
|
|
1168
|
-
networkId: string;
|
|
1169
|
-
isDefault?: boolean | undefined;
|
|
1170
|
-
decimals: number;
|
|
1171
|
-
symbol: string;
|
|
1172
|
-
name?: string | undefined;
|
|
1173
|
-
logo?: string | undefined;
|
|
1174
|
-
coingeckoId?: string | undefined;
|
|
1175
|
-
noDiscovery?: boolean | undefined;
|
|
1176
|
-
mirrorOf?: string | undefined;
|
|
1177
|
-
type: "substrate-assets";
|
|
1178
|
-
platform: "polkadot";
|
|
1179
|
-
assetId: string;
|
|
1180
|
-
isFrozen?: boolean | undefined;
|
|
1181
|
-
isSufficient: boolean;
|
|
1182
|
-
existentialDeposit: string;
|
|
1183
|
-
} | {
|
|
1184
1124
|
id: string;
|
|
1185
1125
|
networkId: string;
|
|
1186
1126
|
isDefault?: boolean | undefined;
|
|
@@ -1230,6 +1170,23 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1230
1170
|
tokenAddress1: `0x${string}`;
|
|
1231
1171
|
coingeckoId0?: string | undefined;
|
|
1232
1172
|
coingeckoId1?: string | undefined;
|
|
1173
|
+
} | {
|
|
1174
|
+
id: string;
|
|
1175
|
+
networkId: string;
|
|
1176
|
+
isDefault?: boolean | undefined;
|
|
1177
|
+
decimals: number;
|
|
1178
|
+
symbol: string;
|
|
1179
|
+
name?: string | undefined;
|
|
1180
|
+
logo?: string | undefined;
|
|
1181
|
+
coingeckoId?: string | undefined;
|
|
1182
|
+
noDiscovery?: boolean | undefined;
|
|
1183
|
+
mirrorOf?: string | undefined;
|
|
1184
|
+
type: "substrate-assets";
|
|
1185
|
+
platform: "polkadot";
|
|
1186
|
+
assetId: string;
|
|
1187
|
+
isFrozen?: boolean | undefined;
|
|
1188
|
+
isSufficient: boolean;
|
|
1189
|
+
existentialDeposit: string;
|
|
1233
1190
|
} | {
|
|
1234
1191
|
id: string;
|
|
1235
1192
|
networkId: string;
|
|
@@ -1367,23 +1324,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1367
1324
|
mintAddress: string;
|
|
1368
1325
|
isTransferable?: boolean | undefined;
|
|
1369
1326
|
}, {
|
|
1370
|
-
id: string;
|
|
1371
|
-
networkId: string;
|
|
1372
|
-
isDefault?: boolean | undefined;
|
|
1373
|
-
decimals: number;
|
|
1374
|
-
symbol: string;
|
|
1375
|
-
name?: string | undefined;
|
|
1376
|
-
logo?: string | undefined;
|
|
1377
|
-
coingeckoId?: string | undefined;
|
|
1378
|
-
noDiscovery?: boolean | undefined;
|
|
1379
|
-
mirrorOf?: string | undefined;
|
|
1380
|
-
type: "substrate-assets";
|
|
1381
|
-
platform: "polkadot";
|
|
1382
|
-
assetId: string;
|
|
1383
|
-
isFrozen?: boolean | undefined;
|
|
1384
|
-
isSufficient: boolean;
|
|
1385
|
-
existentialDeposit: string;
|
|
1386
|
-
} | {
|
|
1387
1327
|
id: string;
|
|
1388
1328
|
networkId: string;
|
|
1389
1329
|
isDefault?: boolean | undefined;
|
|
@@ -1433,6 +1373,23 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1433
1373
|
tokenAddress1: `0x${string}`;
|
|
1434
1374
|
coingeckoId0?: string | undefined;
|
|
1435
1375
|
coingeckoId1?: string | undefined;
|
|
1376
|
+
} | {
|
|
1377
|
+
id: string;
|
|
1378
|
+
networkId: string;
|
|
1379
|
+
isDefault?: boolean | undefined;
|
|
1380
|
+
decimals: number;
|
|
1381
|
+
symbol: string;
|
|
1382
|
+
name?: string | undefined;
|
|
1383
|
+
logo?: string | undefined;
|
|
1384
|
+
coingeckoId?: string | undefined;
|
|
1385
|
+
noDiscovery?: boolean | undefined;
|
|
1386
|
+
mirrorOf?: string | undefined;
|
|
1387
|
+
type: "substrate-assets";
|
|
1388
|
+
platform: "polkadot";
|
|
1389
|
+
assetId: string;
|
|
1390
|
+
isFrozen?: boolean | undefined;
|
|
1391
|
+
isSufficient: boolean;
|
|
1392
|
+
existentialDeposit: string;
|
|
1436
1393
|
} | {
|
|
1437
1394
|
id: string;
|
|
1438
1395
|
networkId: string;
|
|
@@ -1570,8 +1527,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1570
1527
|
mintAddress: string;
|
|
1571
1528
|
isTransferable?: boolean | undefined;
|
|
1572
1529
|
}>>;
|
|
1573
|
-
//#endregion
|
|
1574
|
-
//#region src/chaindata/tokens/EvmErc20Token.d.ts
|
|
1575
1530
|
declare const TOKEN_TYPE$1 = "evm-erc20";
|
|
1576
1531
|
export declare const EvmErc20TokenSchema: z.ZodObject<{
|
|
1577
1532
|
id: z.ZodString;
|
|
@@ -1598,8 +1553,6 @@ export type EvmErc20TokenIdSpecs = {
|
|
|
1598
1553
|
};
|
|
1599
1554
|
export declare const evmErc20TokenId: (networkId: string, contractAddress: `0x${string}`) => string;
|
|
1600
1555
|
export declare const parseEvmErc20TokenId: (tokenId: TokenId) => EvmErc20TokenIdSpecs;
|
|
1601
|
-
//#endregion
|
|
1602
|
-
//#region src/chaindata/tokens/TokenBase.d.ts
|
|
1603
1556
|
export declare const TokenBaseSchema: z.ZodObject<{
|
|
1604
1557
|
id: z.ZodString;
|
|
1605
1558
|
networkId: z.ZodString;
|
|
@@ -1613,8 +1566,6 @@ export declare const TokenBaseSchema: z.ZodObject<{
|
|
|
1613
1566
|
mirrorOf: z.ZodOptional<z.ZodString>;
|
|
1614
1567
|
}, z.core.$strict>;
|
|
1615
1568
|
export type TokenBase = z.infer<typeof TokenBaseSchema>;
|
|
1616
|
-
//#endregion
|
|
1617
|
-
//#region src/chaindata/utils.d.ts
|
|
1618
1569
|
export type NetworkOfPlatform<P extends NetworkPlatform> = Extract<Network, {
|
|
1619
1570
|
platform: P;
|
|
1620
1571
|
}>;
|
|
@@ -2060,12 +2011,8 @@ export type NativeToken<P extends NetworkPlatform = NetworkPlatform> = Extract<T
|
|
|
2060
2011
|
}>;
|
|
2061
2012
|
export declare const isNativeTokenType: <P extends NetworkPlatform = NetworkPlatform>(type: TokenType, platform?: P) => type is NativeTokenType<P>;
|
|
2062
2013
|
export declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform>(token: Token, platform?: P) => token is NativeToken<P>;
|
|
2063
|
-
//#endregion
|
|
2064
|
-
//#region src/constants.d.ts
|
|
2065
2014
|
export declare const MINIMETADATA_VERSION: string;
|
|
2066
2015
|
export declare const DEFAULT_CHAINDATA_URL = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v15/chaindata.min.json";
|
|
2067
|
-
//#endregion
|
|
2068
|
-
//#region src/getBlockExplorerUrls.d.ts
|
|
2069
2016
|
export type BlockExplorerQuery = {
|
|
2070
2017
|
type: "address";
|
|
2071
2018
|
address: string;
|
|
@@ -2089,13 +2036,9 @@ export type BlockExplorerQuery = {
|
|
|
2089
2036
|
export declare const getBlockExplorerUrls: (network: Network, query: BlockExplorerQuery) => string[];
|
|
2090
2037
|
export declare const getBlockExplorerUrl: (network: Network | null | undefined, query: BlockExplorerQuery) => string | null;
|
|
2091
2038
|
export declare const getBlockExplorerLabel: (blockExplorerUrl: string) => string;
|
|
2092
|
-
//#endregion
|
|
2093
|
-
//#region src/isAccountPlatformCompatibleWithNetwork.d.ts
|
|
2094
2039
|
/** mirrors AccountPlatform from @talismn/crypto, which this package does not depend on */
|
|
2095
2040
|
type AccountPlatform = "ethereum" | "polkadot" | "bitcoin" | "solana";
|
|
2096
2041
|
export declare const isAccountPlatformCompatibleWithNetwork: (network: Network, platform: AccountPlatform) => boolean;
|
|
2097
|
-
//#endregion
|
|
2098
|
-
//#region src/legacy/EvmNetwork.d.ts
|
|
2099
2042
|
/** @deprecated */
|
|
2100
2043
|
export type LegacyEvmNetworkId = string;
|
|
2101
2044
|
/** @deprecated */
|
|
@@ -2157,8 +2100,6 @@ type BalancesMetadataLegacy$1 = {
|
|
|
2157
2100
|
moduleType: string;
|
|
2158
2101
|
metadata: unknown;
|
|
2159
2102
|
};
|
|
2160
|
-
//#endregion
|
|
2161
|
-
//#region src/legacy/Chain.d.ts
|
|
2162
2103
|
/** @deprecated use NetworkId */
|
|
2163
2104
|
export type LegacyChainId = string;
|
|
2164
2105
|
/** @deprecated use DotNetwork */
|
|
@@ -2247,8 +2188,6 @@ type BalancesMetadataLegacy = {
|
|
|
2247
2188
|
moduleType: string;
|
|
2248
2189
|
metadata: unknown;
|
|
2249
2190
|
};
|
|
2250
|
-
//#endregion
|
|
2251
|
-
//#region src/legacy/TalismanChaindataDatabase.d.ts
|
|
2252
2191
|
declare class TalismanChaindataDatabase extends Dexie {
|
|
2253
2192
|
chains: Dexie.Table<LegacyChain | LegacyCustomChain, LegacyChainId>;
|
|
2254
2193
|
evmNetworks: Dexie.Table<LegacyEvmNetwork | LegacyCustomEvmNetwork, LegacyEvmNetworkId>;
|
|
@@ -2257,8 +2196,6 @@ declare class TalismanChaindataDatabase extends Dexie {
|
|
|
2257
2196
|
}
|
|
2258
2197
|
/** @deprecated */
|
|
2259
2198
|
export declare const getChaindataDbV3: () => TalismanChaindataDatabase;
|
|
2260
|
-
//#endregion
|
|
2261
|
-
//#region src/state/schema.d.ts
|
|
2262
2199
|
export declare const ChaindataFileSchema: z.ZodObject<{
|
|
2263
2200
|
networks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2264
2201
|
id: z.ZodString;
|
|
@@ -2596,23 +2533,6 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2596
2533
|
mintAddress: z.ZodString;
|
|
2597
2534
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
2598
2535
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
2599
|
-
id: string;
|
|
2600
|
-
networkId: string;
|
|
2601
|
-
isDefault?: boolean | undefined;
|
|
2602
|
-
decimals: number;
|
|
2603
|
-
symbol: string;
|
|
2604
|
-
name?: string | undefined;
|
|
2605
|
-
logo?: string | undefined;
|
|
2606
|
-
coingeckoId?: string | undefined;
|
|
2607
|
-
noDiscovery?: boolean | undefined;
|
|
2608
|
-
mirrorOf?: string | undefined;
|
|
2609
|
-
type: "substrate-assets";
|
|
2610
|
-
platform: "polkadot";
|
|
2611
|
-
assetId: string;
|
|
2612
|
-
isFrozen?: boolean | undefined;
|
|
2613
|
-
isSufficient: boolean;
|
|
2614
|
-
existentialDeposit: string;
|
|
2615
|
-
} | {
|
|
2616
2536
|
id: string;
|
|
2617
2537
|
networkId: string;
|
|
2618
2538
|
isDefault?: boolean | undefined;
|
|
@@ -2662,6 +2582,23 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2662
2582
|
tokenAddress1: `0x${string}`;
|
|
2663
2583
|
coingeckoId0?: string | undefined;
|
|
2664
2584
|
coingeckoId1?: string | undefined;
|
|
2585
|
+
} | {
|
|
2586
|
+
id: string;
|
|
2587
|
+
networkId: string;
|
|
2588
|
+
isDefault?: boolean | undefined;
|
|
2589
|
+
decimals: number;
|
|
2590
|
+
symbol: string;
|
|
2591
|
+
name?: string | undefined;
|
|
2592
|
+
logo?: string | undefined;
|
|
2593
|
+
coingeckoId?: string | undefined;
|
|
2594
|
+
noDiscovery?: boolean | undefined;
|
|
2595
|
+
mirrorOf?: string | undefined;
|
|
2596
|
+
type: "substrate-assets";
|
|
2597
|
+
platform: "polkadot";
|
|
2598
|
+
assetId: string;
|
|
2599
|
+
isFrozen?: boolean | undefined;
|
|
2600
|
+
isSufficient: boolean;
|
|
2601
|
+
existentialDeposit: string;
|
|
2665
2602
|
} | {
|
|
2666
2603
|
id: string;
|
|
2667
2604
|
networkId: string;
|
|
@@ -2799,23 +2736,6 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2799
2736
|
mintAddress: string;
|
|
2800
2737
|
isTransferable?: boolean | undefined;
|
|
2801
2738
|
}, {
|
|
2802
|
-
id: string;
|
|
2803
|
-
networkId: string;
|
|
2804
|
-
isDefault?: boolean | undefined;
|
|
2805
|
-
decimals: number;
|
|
2806
|
-
symbol: string;
|
|
2807
|
-
name?: string | undefined;
|
|
2808
|
-
logo?: string | undefined;
|
|
2809
|
-
coingeckoId?: string | undefined;
|
|
2810
|
-
noDiscovery?: boolean | undefined;
|
|
2811
|
-
mirrorOf?: string | undefined;
|
|
2812
|
-
type: "substrate-assets";
|
|
2813
|
-
platform: "polkadot";
|
|
2814
|
-
assetId: string;
|
|
2815
|
-
isFrozen?: boolean | undefined;
|
|
2816
|
-
isSufficient: boolean;
|
|
2817
|
-
existentialDeposit: string;
|
|
2818
|
-
} | {
|
|
2819
2739
|
id: string;
|
|
2820
2740
|
networkId: string;
|
|
2821
2741
|
isDefault?: boolean | undefined;
|
|
@@ -2865,6 +2785,23 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2865
2785
|
tokenAddress1: `0x${string}`;
|
|
2866
2786
|
coingeckoId0?: string | undefined;
|
|
2867
2787
|
coingeckoId1?: string | undefined;
|
|
2788
|
+
} | {
|
|
2789
|
+
id: string;
|
|
2790
|
+
networkId: string;
|
|
2791
|
+
isDefault?: boolean | undefined;
|
|
2792
|
+
decimals: number;
|
|
2793
|
+
symbol: string;
|
|
2794
|
+
name?: string | undefined;
|
|
2795
|
+
logo?: string | undefined;
|
|
2796
|
+
coingeckoId?: string | undefined;
|
|
2797
|
+
noDiscovery?: boolean | undefined;
|
|
2798
|
+
mirrorOf?: string | undefined;
|
|
2799
|
+
type: "substrate-assets";
|
|
2800
|
+
platform: "polkadot";
|
|
2801
|
+
assetId: string;
|
|
2802
|
+
isFrozen?: boolean | undefined;
|
|
2803
|
+
isSufficient: boolean;
|
|
2804
|
+
existentialDeposit: string;
|
|
2868
2805
|
} | {
|
|
2869
2806
|
id: string;
|
|
2870
2807
|
networkId: string;
|
|
@@ -3351,23 +3288,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3351
3288
|
mintAddress: z.ZodString;
|
|
3352
3289
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
3353
3290
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
3354
|
-
id: string;
|
|
3355
|
-
networkId: string;
|
|
3356
|
-
isDefault?: boolean | undefined;
|
|
3357
|
-
decimals: number;
|
|
3358
|
-
symbol: string;
|
|
3359
|
-
name?: string | undefined;
|
|
3360
|
-
logo?: string | undefined;
|
|
3361
|
-
coingeckoId?: string | undefined;
|
|
3362
|
-
noDiscovery?: boolean | undefined;
|
|
3363
|
-
mirrorOf?: string | undefined;
|
|
3364
|
-
type: "substrate-assets";
|
|
3365
|
-
platform: "polkadot";
|
|
3366
|
-
assetId: string;
|
|
3367
|
-
isFrozen?: boolean | undefined;
|
|
3368
|
-
isSufficient: boolean;
|
|
3369
|
-
existentialDeposit: string;
|
|
3370
|
-
} | {
|
|
3371
3291
|
id: string;
|
|
3372
3292
|
networkId: string;
|
|
3373
3293
|
isDefault?: boolean | undefined;
|
|
@@ -3417,6 +3337,23 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3417
3337
|
tokenAddress1: `0x${string}`;
|
|
3418
3338
|
coingeckoId0?: string | undefined;
|
|
3419
3339
|
coingeckoId1?: string | undefined;
|
|
3340
|
+
} | {
|
|
3341
|
+
id: string;
|
|
3342
|
+
networkId: string;
|
|
3343
|
+
isDefault?: boolean | undefined;
|
|
3344
|
+
decimals: number;
|
|
3345
|
+
symbol: string;
|
|
3346
|
+
name?: string | undefined;
|
|
3347
|
+
logo?: string | undefined;
|
|
3348
|
+
coingeckoId?: string | undefined;
|
|
3349
|
+
noDiscovery?: boolean | undefined;
|
|
3350
|
+
mirrorOf?: string | undefined;
|
|
3351
|
+
type: "substrate-assets";
|
|
3352
|
+
platform: "polkadot";
|
|
3353
|
+
assetId: string;
|
|
3354
|
+
isFrozen?: boolean | undefined;
|
|
3355
|
+
isSufficient: boolean;
|
|
3356
|
+
existentialDeposit: string;
|
|
3420
3357
|
} | {
|
|
3421
3358
|
id: string;
|
|
3422
3359
|
networkId: string;
|
|
@@ -3554,23 +3491,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3554
3491
|
mintAddress: string;
|
|
3555
3492
|
isTransferable?: boolean | undefined;
|
|
3556
3493
|
}, {
|
|
3557
|
-
id: string;
|
|
3558
|
-
networkId: string;
|
|
3559
|
-
isDefault?: boolean | undefined;
|
|
3560
|
-
decimals: number;
|
|
3561
|
-
symbol: string;
|
|
3562
|
-
name?: string | undefined;
|
|
3563
|
-
logo?: string | undefined;
|
|
3564
|
-
coingeckoId?: string | undefined;
|
|
3565
|
-
noDiscovery?: boolean | undefined;
|
|
3566
|
-
mirrorOf?: string | undefined;
|
|
3567
|
-
type: "substrate-assets";
|
|
3568
|
-
platform: "polkadot";
|
|
3569
|
-
assetId: string;
|
|
3570
|
-
isFrozen?: boolean | undefined;
|
|
3571
|
-
isSufficient: boolean;
|
|
3572
|
-
existentialDeposit: string;
|
|
3573
|
-
} | {
|
|
3574
3494
|
id: string;
|
|
3575
3495
|
networkId: string;
|
|
3576
3496
|
isDefault?: boolean | undefined;
|
|
@@ -3620,6 +3540,23 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3620
3540
|
tokenAddress1: `0x${string}`;
|
|
3621
3541
|
coingeckoId0?: string | undefined;
|
|
3622
3542
|
coingeckoId1?: string | undefined;
|
|
3543
|
+
} | {
|
|
3544
|
+
id: string;
|
|
3545
|
+
networkId: string;
|
|
3546
|
+
isDefault?: boolean | undefined;
|
|
3547
|
+
decimals: number;
|
|
3548
|
+
symbol: string;
|
|
3549
|
+
name?: string | undefined;
|
|
3550
|
+
logo?: string | undefined;
|
|
3551
|
+
coingeckoId?: string | undefined;
|
|
3552
|
+
noDiscovery?: boolean | undefined;
|
|
3553
|
+
mirrorOf?: string | undefined;
|
|
3554
|
+
type: "substrate-assets";
|
|
3555
|
+
platform: "polkadot";
|
|
3556
|
+
assetId: string;
|
|
3557
|
+
isFrozen?: boolean | undefined;
|
|
3558
|
+
isSufficient: boolean;
|
|
3559
|
+
existentialDeposit: string;
|
|
3623
3560
|
} | {
|
|
3624
3561
|
id: string;
|
|
3625
3562
|
networkId: string;
|
|
@@ -3759,8 +3696,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3759
3696
|
}>>>;
|
|
3760
3697
|
}, z.core.$strict>;
|
|
3761
3698
|
type CustomChaindata = z.infer<typeof CustomChaindataSchema>;
|
|
3762
|
-
//#endregion
|
|
3763
|
-
//#region src/provider/ChaindataProviderInterface.d.ts
|
|
3764
3699
|
export interface IChaindataNetworkProvider {
|
|
3765
3700
|
networks$: Observable<Network[]>;
|
|
3766
3701
|
getNetworks$<P extends NetworkPlatform | undefined, R = P extends NetworkPlatform ? NetworkOfPlatform<P> : Network>(platform?: P): Observable<R[]>;
|
|
@@ -3788,8 +3723,6 @@ export interface IChaindataTokenProvider {
|
|
|
3788
3723
|
getTokenById<T extends TokenType | undefined, R extends T extends TokenType ? TokenOfType<T> : Token>(tokenId: TokenId, type?: T): Promise<R | null>;
|
|
3789
3724
|
}
|
|
3790
3725
|
export interface IChaindataProvider extends IChaindataNetworkProvider, IChaindataTokenProvider {}
|
|
3791
|
-
//#endregion
|
|
3792
|
-
//#region src/provider/ChaindataProvider.d.ts
|
|
3793
3726
|
/**
|
|
3794
3727
|
* This type will be used for in-memory storage of chaindata.
|
|
3795
3728
|
*
|
|
@@ -3899,9 +3832,10 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
3899
3832
|
coingeckoId?: string | undefined;
|
|
3900
3833
|
noDiscovery?: boolean | undefined;
|
|
3901
3834
|
mirrorOf?: string | undefined;
|
|
3902
|
-
type: "substrate-
|
|
3835
|
+
type: "substrate-tokens";
|
|
3903
3836
|
platform: "polkadot";
|
|
3904
|
-
|
|
3837
|
+
onChainId: string | number;
|
|
3838
|
+
existentialDeposit: string;
|
|
3905
3839
|
} | {
|
|
3906
3840
|
id: string;
|
|
3907
3841
|
networkId: string;
|
|
@@ -4028,10 +3962,9 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4028
3962
|
coingeckoId?: string | undefined;
|
|
4029
3963
|
noDiscovery?: boolean | undefined;
|
|
4030
3964
|
mirrorOf?: string | undefined;
|
|
4031
|
-
type: "substrate-
|
|
3965
|
+
type: "substrate-psp22";
|
|
4032
3966
|
platform: "polkadot";
|
|
4033
|
-
|
|
4034
|
-
existentialDeposit: string;
|
|
3967
|
+
contractAddress: string;
|
|
4035
3968
|
} | {
|
|
4036
3969
|
id: string;
|
|
4037
3970
|
networkId: string;
|
|
@@ -4420,8 +4353,6 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4420
4353
|
} | undefined;
|
|
4421
4354
|
}>;
|
|
4422
4355
|
}
|
|
4423
|
-
//#endregion
|
|
4424
|
-
//#region src/state/combinedChaindata.d.ts
|
|
4425
4356
|
export declare const isNetworkCustom: (network: Network) => boolean;
|
|
4426
4357
|
export declare const isNetworkKnown: (network: Network) => boolean;
|
|
4427
4358
|
export declare const isTokenCustom: (token: Token) => boolean;
|
|
@@ -4429,8 +4360,6 @@ export declare const isTokenKnown: (token: Token) => boolean;
|
|
|
4429
4360
|
export declare const isTokenTestnet: (token: Token) => boolean;
|
|
4430
4361
|
export declare const getCleanNetwork: (network: Network) => Network;
|
|
4431
4362
|
export declare const getCleanToken: (token: Token) => Token;
|
|
4432
|
-
//#endregion
|
|
4433
|
-
//#region src/state/remoteChaindata.d.ts
|
|
4434
4363
|
/**
|
|
4435
4364
|
* Downloads the chaindata file at `url` and refreshes it every 5 minutes. Equivalent spellings
|
|
4436
4365
|
* of a url share one observable. Throws if `url` is not a valid url.
|
|
@@ -4572,9 +4501,10 @@ export declare const getRemoteChaindata$: (url: string) => Observable<{
|
|
|
4572
4501
|
coingeckoId?: string | undefined;
|
|
4573
4502
|
noDiscovery?: boolean | undefined;
|
|
4574
4503
|
mirrorOf?: string | undefined;
|
|
4575
|
-
type: "substrate-
|
|
4504
|
+
type: "substrate-tokens";
|
|
4576
4505
|
platform: "polkadot";
|
|
4577
|
-
|
|
4506
|
+
onChainId: string | number;
|
|
4507
|
+
existentialDeposit: string;
|
|
4578
4508
|
} | {
|
|
4579
4509
|
id: string;
|
|
4580
4510
|
networkId: string;
|
|
@@ -4701,10 +4631,9 @@ export declare const getRemoteChaindata$: (url: string) => Observable<{
|
|
|
4701
4631
|
coingeckoId?: string | undefined;
|
|
4702
4632
|
noDiscovery?: boolean | undefined;
|
|
4703
4633
|
mirrorOf?: string | undefined;
|
|
4704
|
-
type: "substrate-
|
|
4634
|
+
type: "substrate-psp22";
|
|
4705
4635
|
platform: "polkadot";
|
|
4706
|
-
|
|
4707
|
-
existentialDeposit: string;
|
|
4636
|
+
contractAddress: string;
|
|
4708
4637
|
} | {
|
|
4709
4638
|
id: string;
|
|
4710
4639
|
networkId: string;
|
|
@@ -4775,8 +4704,6 @@ export declare const getRemoteChaindata$: (url: string) => Observable<{
|
|
|
4775
4704
|
extra: any;
|
|
4776
4705
|
}[];
|
|
4777
4706
|
}>;
|
|
4778
|
-
//#endregion
|
|
4779
|
-
//#region src/util.d.ts
|
|
4780
4707
|
type KNOWN_TOKEN_ID = "uniswap";
|
|
4781
4708
|
export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
4782
4709
|
/**
|
|
@@ -4786,6 +4713,5 @@ export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
|
4786
4713
|
*/
|
|
4787
4714
|
export declare const getGithubTokenLogoUrlByCoingeckoId: (coingeckoId: string) => string;
|
|
4788
4715
|
export declare const getGithubBittensorHotkeyAssetUrl: (fileName: string) => string;
|
|
4789
|
-
//#endregion
|
|
4790
4716
|
export type { Chaindata, ChaindataFile, CustomChaindata };
|
|
4791
4717
|
//# sourceMappingURL=index.d.ts.map
|