@talismn/chaindata-provider 2.1.0 → 2.2.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 +4 -0
- package/dist/index.d.mts +480 -121
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +479 -120
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +290 -212
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +290 -214
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1162,6 +1162,23 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1162
1162
|
mintAddress: z.ZodString;
|
|
1163
1163
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
1164
1164
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
1165
|
+
id: string;
|
|
1166
|
+
networkId: string;
|
|
1167
|
+
isDefault?: boolean | undefined;
|
|
1168
|
+
decimals: number;
|
|
1169
|
+
symbol: string;
|
|
1170
|
+
name?: string | undefined;
|
|
1171
|
+
logo?: string | undefined;
|
|
1172
|
+
coingeckoId?: string | undefined;
|
|
1173
|
+
noDiscovery?: boolean | undefined;
|
|
1174
|
+
mirrorOf?: string | undefined;
|
|
1175
|
+
type: "substrate-hydration";
|
|
1176
|
+
platform: "polkadot";
|
|
1177
|
+
onChainId: number;
|
|
1178
|
+
assetType: "Erc20" | "External" | "Token";
|
|
1179
|
+
isSufficient: boolean;
|
|
1180
|
+
existentialDeposit: string;
|
|
1181
|
+
} | {
|
|
1165
1182
|
id: string;
|
|
1166
1183
|
networkId: string;
|
|
1167
1184
|
isDefault?: boolean | undefined;
|
|
@@ -1316,12 +1333,8 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1316
1333
|
coingeckoId?: string | undefined;
|
|
1317
1334
|
noDiscovery?: boolean | undefined;
|
|
1318
1335
|
mirrorOf?: string | undefined;
|
|
1319
|
-
type: "
|
|
1320
|
-
platform: "
|
|
1321
|
-
onChainId: number;
|
|
1322
|
-
assetType: "Erc20" | "External" | "Token";
|
|
1323
|
-
isSufficient: boolean;
|
|
1324
|
-
existentialDeposit: string;
|
|
1336
|
+
type: "sol-native";
|
|
1337
|
+
platform: "solana";
|
|
1325
1338
|
} | {
|
|
1326
1339
|
id: string;
|
|
1327
1340
|
networkId: string;
|
|
@@ -1333,8 +1346,9 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1333
1346
|
coingeckoId?: string | undefined;
|
|
1334
1347
|
noDiscovery?: boolean | undefined;
|
|
1335
1348
|
mirrorOf?: string | undefined;
|
|
1336
|
-
type: "sol-
|
|
1349
|
+
type: "sol-spl";
|
|
1337
1350
|
platform: "solana";
|
|
1351
|
+
mintAddress: string;
|
|
1338
1352
|
} | {
|
|
1339
1353
|
id: string;
|
|
1340
1354
|
networkId: string;
|
|
@@ -1346,10 +1360,11 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1346
1360
|
coingeckoId?: string | undefined;
|
|
1347
1361
|
noDiscovery?: boolean | undefined;
|
|
1348
1362
|
mirrorOf?: string | undefined;
|
|
1349
|
-
type: "sol-
|
|
1363
|
+
type: "sol-token2022";
|
|
1350
1364
|
platform: "solana";
|
|
1351
1365
|
mintAddress: string;
|
|
1352
|
-
|
|
1366
|
+
isTransferable?: boolean | undefined;
|
|
1367
|
+
}, {
|
|
1353
1368
|
id: string;
|
|
1354
1369
|
networkId: string;
|
|
1355
1370
|
isDefault?: boolean | undefined;
|
|
@@ -1360,11 +1375,13 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1360
1375
|
coingeckoId?: string | undefined;
|
|
1361
1376
|
noDiscovery?: boolean | undefined;
|
|
1362
1377
|
mirrorOf?: string | undefined;
|
|
1363
|
-
type: "
|
|
1364
|
-
platform: "
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1378
|
+
type: "substrate-hydration";
|
|
1379
|
+
platform: "polkadot";
|
|
1380
|
+
onChainId: number;
|
|
1381
|
+
assetType: "Erc20" | "External" | "Token";
|
|
1382
|
+
isSufficient: boolean;
|
|
1383
|
+
existentialDeposit: string;
|
|
1384
|
+
} | {
|
|
1368
1385
|
id: string;
|
|
1369
1386
|
networkId: string;
|
|
1370
1387
|
isDefault?: boolean | undefined;
|
|
@@ -1508,23 +1525,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1508
1525
|
platform: "polkadot";
|
|
1509
1526
|
onChainId: string | number;
|
|
1510
1527
|
existentialDeposit: string;
|
|
1511
|
-
} | {
|
|
1512
|
-
id: string;
|
|
1513
|
-
networkId: string;
|
|
1514
|
-
isDefault?: boolean | undefined;
|
|
1515
|
-
decimals: number;
|
|
1516
|
-
symbol: string;
|
|
1517
|
-
name?: string | undefined;
|
|
1518
|
-
logo?: string | undefined;
|
|
1519
|
-
coingeckoId?: string | undefined;
|
|
1520
|
-
noDiscovery?: boolean | undefined;
|
|
1521
|
-
mirrorOf?: string | undefined;
|
|
1522
|
-
type: "substrate-hydration";
|
|
1523
|
-
platform: "polkadot";
|
|
1524
|
-
onChainId: number;
|
|
1525
|
-
assetType: "Erc20" | "External" | "Token";
|
|
1526
|
-
isSufficient: boolean;
|
|
1527
|
-
existentialDeposit: string;
|
|
1528
1528
|
} | {
|
|
1529
1529
|
id: string;
|
|
1530
1530
|
networkId: string;
|
|
@@ -1768,10 +1768,10 @@ export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1768
1768
|
coingeckoId?: string | undefined;
|
|
1769
1769
|
noDiscovery?: boolean | undefined;
|
|
1770
1770
|
mirrorOf?: string | undefined;
|
|
1771
|
-
type: "substrate-
|
|
1771
|
+
type: "substrate-hydration";
|
|
1772
1772
|
platform: "polkadot";
|
|
1773
|
-
|
|
1774
|
-
|
|
1773
|
+
onChainId: number;
|
|
1774
|
+
assetType: "Erc20" | "External" | "Token";
|
|
1775
1775
|
isSufficient: boolean;
|
|
1776
1776
|
existentialDeposit: string;
|
|
1777
1777
|
} | {
|
|
@@ -1785,9 +1785,9 @@ export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1785
1785
|
coingeckoId?: string | undefined;
|
|
1786
1786
|
noDiscovery?: boolean | undefined;
|
|
1787
1787
|
mirrorOf?: string | undefined;
|
|
1788
|
-
type: "substrate-
|
|
1788
|
+
type: "substrate-assets";
|
|
1789
1789
|
platform: "polkadot";
|
|
1790
|
-
|
|
1790
|
+
assetId: string;
|
|
1791
1791
|
isFrozen?: boolean | undefined;
|
|
1792
1792
|
isSufficient: boolean;
|
|
1793
1793
|
existentialDeposit: string;
|
|
@@ -1802,8 +1802,11 @@ export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1802
1802
|
coingeckoId?: string | undefined;
|
|
1803
1803
|
noDiscovery?: boolean | undefined;
|
|
1804
1804
|
mirrorOf?: string | undefined;
|
|
1805
|
-
type: "substrate-
|
|
1805
|
+
type: "substrate-foreignassets";
|
|
1806
1806
|
platform: "polkadot";
|
|
1807
|
+
onChainId: string;
|
|
1808
|
+
isFrozen?: boolean | undefined;
|
|
1809
|
+
isSufficient: boolean;
|
|
1807
1810
|
existentialDeposit: string;
|
|
1808
1811
|
} | {
|
|
1809
1812
|
id: string;
|
|
@@ -1816,9 +1819,8 @@ export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1816
1819
|
coingeckoId?: string | undefined;
|
|
1817
1820
|
noDiscovery?: boolean | undefined;
|
|
1818
1821
|
mirrorOf?: string | undefined;
|
|
1819
|
-
type: "substrate-
|
|
1822
|
+
type: "substrate-native";
|
|
1820
1823
|
platform: "polkadot";
|
|
1821
|
-
onChainId: string | number;
|
|
1822
1824
|
existentialDeposit: string;
|
|
1823
1825
|
} | {
|
|
1824
1826
|
id: string;
|
|
@@ -1831,11 +1833,9 @@ export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
|
|
|
1831
1833
|
coingeckoId?: string | undefined;
|
|
1832
1834
|
noDiscovery?: boolean | undefined;
|
|
1833
1835
|
mirrorOf?: string | undefined;
|
|
1834
|
-
type: "substrate-
|
|
1836
|
+
type: "substrate-tokens";
|
|
1835
1837
|
platform: "polkadot";
|
|
1836
|
-
onChainId: number;
|
|
1837
|
-
assetType: "Erc20" | "External" | "Token";
|
|
1838
|
-
isSufficient: boolean;
|
|
1838
|
+
onChainId: string | number;
|
|
1839
1839
|
existentialDeposit: string;
|
|
1840
1840
|
};
|
|
1841
1841
|
export declare const isTokenOfType: <T extends TokenType>(token: Token | null | undefined, type: T) => token is TokenOfType<T>;
|
|
@@ -2060,6 +2060,7 @@ export declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform
|
|
|
2060
2060
|
//#endregion
|
|
2061
2061
|
//#region src/constants.d.ts
|
|
2062
2062
|
export declare const MINIMETADATA_VERSION: string;
|
|
2063
|
+
export declare const DEFAULT_CHAINDATA_URL = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v14/chaindata.min.json";
|
|
2063
2064
|
//#endregion
|
|
2064
2065
|
//#region src/getBlockExplorerUrls.d.ts
|
|
2065
2066
|
export type BlockExplorerQuery = {
|
|
@@ -2591,6 +2592,23 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2591
2592
|
mintAddress: z.ZodString;
|
|
2592
2593
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
2593
2594
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
2595
|
+
id: string;
|
|
2596
|
+
networkId: string;
|
|
2597
|
+
isDefault?: boolean | undefined;
|
|
2598
|
+
decimals: number;
|
|
2599
|
+
symbol: string;
|
|
2600
|
+
name?: string | undefined;
|
|
2601
|
+
logo?: string | undefined;
|
|
2602
|
+
coingeckoId?: string | undefined;
|
|
2603
|
+
noDiscovery?: boolean | undefined;
|
|
2604
|
+
mirrorOf?: string | undefined;
|
|
2605
|
+
type: "substrate-hydration";
|
|
2606
|
+
platform: "polkadot";
|
|
2607
|
+
onChainId: number;
|
|
2608
|
+
assetType: "Erc20" | "External" | "Token";
|
|
2609
|
+
isSufficient: boolean;
|
|
2610
|
+
existentialDeposit: string;
|
|
2611
|
+
} | {
|
|
2594
2612
|
id: string;
|
|
2595
2613
|
networkId: string;
|
|
2596
2614
|
isDefault?: boolean | undefined;
|
|
@@ -2745,12 +2763,8 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2745
2763
|
coingeckoId?: string | undefined;
|
|
2746
2764
|
noDiscovery?: boolean | undefined;
|
|
2747
2765
|
mirrorOf?: string | undefined;
|
|
2748
|
-
type: "
|
|
2749
|
-
platform: "
|
|
2750
|
-
onChainId: number;
|
|
2751
|
-
assetType: "Erc20" | "External" | "Token";
|
|
2752
|
-
isSufficient: boolean;
|
|
2753
|
-
existentialDeposit: string;
|
|
2766
|
+
type: "sol-native";
|
|
2767
|
+
platform: "solana";
|
|
2754
2768
|
} | {
|
|
2755
2769
|
id: string;
|
|
2756
2770
|
networkId: string;
|
|
@@ -2762,8 +2776,9 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2762
2776
|
coingeckoId?: string | undefined;
|
|
2763
2777
|
noDiscovery?: boolean | undefined;
|
|
2764
2778
|
mirrorOf?: string | undefined;
|
|
2765
|
-
type: "sol-
|
|
2779
|
+
type: "sol-spl";
|
|
2766
2780
|
platform: "solana";
|
|
2781
|
+
mintAddress: string;
|
|
2767
2782
|
} | {
|
|
2768
2783
|
id: string;
|
|
2769
2784
|
networkId: string;
|
|
@@ -2775,10 +2790,11 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2775
2790
|
coingeckoId?: string | undefined;
|
|
2776
2791
|
noDiscovery?: boolean | undefined;
|
|
2777
2792
|
mirrorOf?: string | undefined;
|
|
2778
|
-
type: "sol-
|
|
2793
|
+
type: "sol-token2022";
|
|
2779
2794
|
platform: "solana";
|
|
2780
2795
|
mintAddress: string;
|
|
2781
|
-
|
|
2796
|
+
isTransferable?: boolean | undefined;
|
|
2797
|
+
}, {
|
|
2782
2798
|
id: string;
|
|
2783
2799
|
networkId: string;
|
|
2784
2800
|
isDefault?: boolean | undefined;
|
|
@@ -2789,11 +2805,13 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2789
2805
|
coingeckoId?: string | undefined;
|
|
2790
2806
|
noDiscovery?: boolean | undefined;
|
|
2791
2807
|
mirrorOf?: string | undefined;
|
|
2792
|
-
type: "
|
|
2793
|
-
platform: "
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2808
|
+
type: "substrate-hydration";
|
|
2809
|
+
platform: "polkadot";
|
|
2810
|
+
onChainId: number;
|
|
2811
|
+
assetType: "Erc20" | "External" | "Token";
|
|
2812
|
+
isSufficient: boolean;
|
|
2813
|
+
existentialDeposit: string;
|
|
2814
|
+
} | {
|
|
2797
2815
|
id: string;
|
|
2798
2816
|
networkId: string;
|
|
2799
2817
|
isDefault?: boolean | undefined;
|
|
@@ -2937,23 +2955,6 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2937
2955
|
platform: "polkadot";
|
|
2938
2956
|
onChainId: string | number;
|
|
2939
2957
|
existentialDeposit: string;
|
|
2940
|
-
} | {
|
|
2941
|
-
id: string;
|
|
2942
|
-
networkId: string;
|
|
2943
|
-
isDefault?: boolean | undefined;
|
|
2944
|
-
decimals: number;
|
|
2945
|
-
symbol: string;
|
|
2946
|
-
name?: string | undefined;
|
|
2947
|
-
logo?: string | undefined;
|
|
2948
|
-
coingeckoId?: string | undefined;
|
|
2949
|
-
noDiscovery?: boolean | undefined;
|
|
2950
|
-
mirrorOf?: string | undefined;
|
|
2951
|
-
type: "substrate-hydration";
|
|
2952
|
-
platform: "polkadot";
|
|
2953
|
-
onChainId: number;
|
|
2954
|
-
assetType: "Erc20" | "External" | "Token";
|
|
2955
|
-
isSufficient: boolean;
|
|
2956
|
-
existentialDeposit: string;
|
|
2957
2958
|
} | {
|
|
2958
2959
|
id: string;
|
|
2959
2960
|
networkId: string;
|
|
@@ -3008,6 +3009,7 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
3008
3009
|
}, z.core.$strict>>;
|
|
3009
3010
|
}, z.core.$strip>;
|
|
3010
3011
|
type Chaindata = z.infer<typeof ChaindataFileSchema>;
|
|
3012
|
+
type ChaindataFile = z.input<typeof ChaindataFileSchema>;
|
|
3011
3013
|
export declare const CustomChaindataSchema: z.ZodObject<{
|
|
3012
3014
|
networks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3013
3015
|
id: z.ZodString;
|
|
@@ -3344,6 +3346,23 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3344
3346
|
mintAddress: z.ZodString;
|
|
3345
3347
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
3346
3348
|
}, z.core.$strict>], "type">, z.ZodTransform<{
|
|
3349
|
+
id: string;
|
|
3350
|
+
networkId: string;
|
|
3351
|
+
isDefault?: boolean | undefined;
|
|
3352
|
+
decimals: number;
|
|
3353
|
+
symbol: string;
|
|
3354
|
+
name?: string | undefined;
|
|
3355
|
+
logo?: string | undefined;
|
|
3356
|
+
coingeckoId?: string | undefined;
|
|
3357
|
+
noDiscovery?: boolean | undefined;
|
|
3358
|
+
mirrorOf?: string | undefined;
|
|
3359
|
+
type: "substrate-hydration";
|
|
3360
|
+
platform: "polkadot";
|
|
3361
|
+
onChainId: number;
|
|
3362
|
+
assetType: "Erc20" | "External" | "Token";
|
|
3363
|
+
isSufficient: boolean;
|
|
3364
|
+
existentialDeposit: string;
|
|
3365
|
+
} | {
|
|
3347
3366
|
id: string;
|
|
3348
3367
|
networkId: string;
|
|
3349
3368
|
isDefault?: boolean | undefined;
|
|
@@ -3498,12 +3517,8 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3498
3517
|
coingeckoId?: string | undefined;
|
|
3499
3518
|
noDiscovery?: boolean | undefined;
|
|
3500
3519
|
mirrorOf?: string | undefined;
|
|
3501
|
-
type: "
|
|
3502
|
-
platform: "
|
|
3503
|
-
onChainId: number;
|
|
3504
|
-
assetType: "Erc20" | "External" | "Token";
|
|
3505
|
-
isSufficient: boolean;
|
|
3506
|
-
existentialDeposit: string;
|
|
3520
|
+
type: "sol-native";
|
|
3521
|
+
platform: "solana";
|
|
3507
3522
|
} | {
|
|
3508
3523
|
id: string;
|
|
3509
3524
|
networkId: string;
|
|
@@ -3515,8 +3530,9 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3515
3530
|
coingeckoId?: string | undefined;
|
|
3516
3531
|
noDiscovery?: boolean | undefined;
|
|
3517
3532
|
mirrorOf?: string | undefined;
|
|
3518
|
-
type: "sol-
|
|
3533
|
+
type: "sol-spl";
|
|
3519
3534
|
platform: "solana";
|
|
3535
|
+
mintAddress: string;
|
|
3520
3536
|
} | {
|
|
3521
3537
|
id: string;
|
|
3522
3538
|
networkId: string;
|
|
@@ -3528,10 +3544,11 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3528
3544
|
coingeckoId?: string | undefined;
|
|
3529
3545
|
noDiscovery?: boolean | undefined;
|
|
3530
3546
|
mirrorOf?: string | undefined;
|
|
3531
|
-
type: "sol-
|
|
3547
|
+
type: "sol-token2022";
|
|
3532
3548
|
platform: "solana";
|
|
3533
3549
|
mintAddress: string;
|
|
3534
|
-
|
|
3550
|
+
isTransferable?: boolean | undefined;
|
|
3551
|
+
}, {
|
|
3535
3552
|
id: string;
|
|
3536
3553
|
networkId: string;
|
|
3537
3554
|
isDefault?: boolean | undefined;
|
|
@@ -3542,11 +3559,13 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3542
3559
|
coingeckoId?: string | undefined;
|
|
3543
3560
|
noDiscovery?: boolean | undefined;
|
|
3544
3561
|
mirrorOf?: string | undefined;
|
|
3545
|
-
type: "
|
|
3546
|
-
platform: "
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3562
|
+
type: "substrate-hydration";
|
|
3563
|
+
platform: "polkadot";
|
|
3564
|
+
onChainId: number;
|
|
3565
|
+
assetType: "Erc20" | "External" | "Token";
|
|
3566
|
+
isSufficient: boolean;
|
|
3567
|
+
existentialDeposit: string;
|
|
3568
|
+
} | {
|
|
3550
3569
|
id: string;
|
|
3551
3570
|
networkId: string;
|
|
3552
3571
|
isDefault?: boolean | undefined;
|
|
@@ -3690,23 +3709,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3690
3709
|
platform: "polkadot";
|
|
3691
3710
|
onChainId: string | number;
|
|
3692
3711
|
existentialDeposit: string;
|
|
3693
|
-
} | {
|
|
3694
|
-
id: string;
|
|
3695
|
-
networkId: string;
|
|
3696
|
-
isDefault?: boolean | undefined;
|
|
3697
|
-
decimals: number;
|
|
3698
|
-
symbol: string;
|
|
3699
|
-
name?: string | undefined;
|
|
3700
|
-
logo?: string | undefined;
|
|
3701
|
-
coingeckoId?: string | undefined;
|
|
3702
|
-
noDiscovery?: boolean | undefined;
|
|
3703
|
-
mirrorOf?: string | undefined;
|
|
3704
|
-
type: "substrate-hydration";
|
|
3705
|
-
platform: "polkadot";
|
|
3706
|
-
onChainId: number;
|
|
3707
|
-
assetType: "Erc20" | "External" | "Token";
|
|
3708
|
-
isSufficient: boolean;
|
|
3709
|
-
existentialDeposit: string;
|
|
3710
3712
|
} | {
|
|
3711
3713
|
id: string;
|
|
3712
3714
|
networkId: string;
|
|
@@ -3798,10 +3800,22 @@ export type ChaindataProviderOptions = {
|
|
|
3798
3800
|
persistedStorage?: ChaindataStorage | Promise<ChaindataStorage | undefined>;
|
|
3799
3801
|
customChaindata$?: Observable<CustomChaindata> | CustomChaindata;
|
|
3800
3802
|
dynamicTokens$?: ReplaySubject<Token[]>;
|
|
3803
|
+
/**
|
|
3804
|
+
* Replaces the default chaindata downloaded from the TalismanSociety/chaindata repository.
|
|
3805
|
+
*
|
|
3806
|
+
* The provider subscribes to `chaindata$` only while the provider itself has subscribers.
|
|
3807
|
+
* Pass a replaying observable (a `BehaviorSubject`, or `shareReplay(1)` without `refCount`),
|
|
3808
|
+
* otherwise values emitted while nothing is subscribed are lost. A failed observable is
|
|
3809
|
+
* resubscribed with backoff, so only a cold observable can recover.
|
|
3810
|
+
*
|
|
3811
|
+
* `persistedStorage` seeds the data whichever source is used: clear it when you switch
|
|
3812
|
+
* sources. Only the provider without `chaindata$` falls back to the bundled chaindata.
|
|
3813
|
+
*/
|
|
3814
|
+
chaindata$?: Observable<ChaindataFile> | ChaindataFile;
|
|
3801
3815
|
};
|
|
3802
3816
|
export declare class ChaindataProvider implements IChaindataProvider {
|
|
3803
3817
|
#private;
|
|
3804
|
-
constructor({ persistedStorage, customChaindata$, dynamicTokens$ }?: ChaindataProviderOptions);
|
|
3818
|
+
constructor({ persistedStorage, customChaindata$, dynamicTokens$, chaindata$ }?: ChaindataProviderOptions);
|
|
3805
3819
|
/**
|
|
3806
3820
|
* Subscribe to this observable and save its contents somewhere persistent.
|
|
3807
3821
|
*
|
|
@@ -3880,9 +3894,18 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
3880
3894
|
coingeckoId?: string | undefined;
|
|
3881
3895
|
noDiscovery?: boolean | undefined;
|
|
3882
3896
|
mirrorOf?: string | undefined;
|
|
3883
|
-
type: "evm-
|
|
3897
|
+
type: "evm-uniswapv2";
|
|
3884
3898
|
platform: "ethereum";
|
|
3885
3899
|
contractAddress: `0x${string}`;
|
|
3900
|
+
isCustom?: boolean | undefined;
|
|
3901
|
+
symbol0: string;
|
|
3902
|
+
symbol1: string;
|
|
3903
|
+
decimals0: number;
|
|
3904
|
+
decimals1: number;
|
|
3905
|
+
tokenAddress0: `0x${string}`;
|
|
3906
|
+
tokenAddress1: `0x${string}`;
|
|
3907
|
+
coingeckoId0?: string | undefined;
|
|
3908
|
+
coingeckoId1?: string | undefined;
|
|
3886
3909
|
} | {
|
|
3887
3910
|
id: string;
|
|
3888
3911
|
networkId: string;
|
|
@@ -3894,8 +3917,9 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
3894
3917
|
coingeckoId?: string | undefined;
|
|
3895
3918
|
noDiscovery?: boolean | undefined;
|
|
3896
3919
|
mirrorOf?: string | undefined;
|
|
3897
|
-
type: "evm-
|
|
3920
|
+
type: "evm-erc20";
|
|
3898
3921
|
platform: "ethereum";
|
|
3922
|
+
contractAddress: `0x${string}`;
|
|
3899
3923
|
} | {
|
|
3900
3924
|
id: string;
|
|
3901
3925
|
networkId: string;
|
|
@@ -3907,18 +3931,8 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
3907
3931
|
coingeckoId?: string | undefined;
|
|
3908
3932
|
noDiscovery?: boolean | undefined;
|
|
3909
3933
|
mirrorOf?: string | undefined;
|
|
3910
|
-
type: "evm-
|
|
3934
|
+
type: "evm-native";
|
|
3911
3935
|
platform: "ethereum";
|
|
3912
|
-
contractAddress: `0x${string}`;
|
|
3913
|
-
isCustom?: boolean | undefined;
|
|
3914
|
-
symbol0: string;
|
|
3915
|
-
symbol1: string;
|
|
3916
|
-
decimals0: number;
|
|
3917
|
-
decimals1: number;
|
|
3918
|
-
tokenAddress0: `0x${string}`;
|
|
3919
|
-
tokenAddress1: `0x${string}`;
|
|
3920
|
-
coingeckoId0?: string | undefined;
|
|
3921
|
-
coingeckoId1?: string | undefined;
|
|
3922
3936
|
} | {
|
|
3923
3937
|
id: string;
|
|
3924
3938
|
networkId: string;
|
|
@@ -4407,6 +4421,351 @@ export declare const isTokenTestnet: (token: Token) => boolean;
|
|
|
4407
4421
|
export declare const getCleanNetwork: (network: Network) => Network;
|
|
4408
4422
|
export declare const getCleanToken: (token: Token) => Token;
|
|
4409
4423
|
//#endregion
|
|
4424
|
+
//#region src/state/remoteChaindata.d.ts
|
|
4425
|
+
/**
|
|
4426
|
+
* Downloads the chaindata file at `url` and refreshes it every 5 minutes. Equivalent spellings
|
|
4427
|
+
* of a url share one observable. Throws if `url` is not a valid url.
|
|
4428
|
+
*
|
|
4429
|
+
* Emitted objects are shared and already validated: treat them as immutable, and filter them
|
|
4430
|
+
* by returning new objects.
|
|
4431
|
+
*/
|
|
4432
|
+
export declare const getRemoteChaindata$: (url: string) => Observable<{
|
|
4433
|
+
networks: ({
|
|
4434
|
+
id: string;
|
|
4435
|
+
isTestnet?: boolean | undefined;
|
|
4436
|
+
isDefault?: boolean | undefined;
|
|
4437
|
+
forceScan?: boolean | undefined;
|
|
4438
|
+
name: string;
|
|
4439
|
+
logo?: string | undefined;
|
|
4440
|
+
nativeTokenId: string;
|
|
4441
|
+
nativeCurrency: {
|
|
4442
|
+
decimals: number;
|
|
4443
|
+
symbol: string;
|
|
4444
|
+
name: string;
|
|
4445
|
+
coingeckoId?: string | undefined;
|
|
4446
|
+
mirrorOf?: string | undefined;
|
|
4447
|
+
logo?: string | undefined;
|
|
4448
|
+
};
|
|
4449
|
+
themeColor?: string | undefined;
|
|
4450
|
+
blockExplorerUrls: string[];
|
|
4451
|
+
genesisHash: `0x${string}`;
|
|
4452
|
+
platform: "polkadot";
|
|
4453
|
+
chainName: string;
|
|
4454
|
+
specName: string;
|
|
4455
|
+
specVersion: number;
|
|
4456
|
+
account: "*25519" | "secp256k1";
|
|
4457
|
+
chainspecQrUrl?: string | undefined;
|
|
4458
|
+
latestMetadataQrUrl?: string | undefined;
|
|
4459
|
+
prefix: number;
|
|
4460
|
+
oldPrefix?: number | undefined;
|
|
4461
|
+
rpcs: string[];
|
|
4462
|
+
registryTypes?: any;
|
|
4463
|
+
signedExtensions?: any;
|
|
4464
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
4465
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4466
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
4467
|
+
topology: {
|
|
4468
|
+
type: "standalone";
|
|
4469
|
+
} | {
|
|
4470
|
+
type: "relay";
|
|
4471
|
+
} | {
|
|
4472
|
+
type: "parachain";
|
|
4473
|
+
relayId: string;
|
|
4474
|
+
paraId: number;
|
|
4475
|
+
};
|
|
4476
|
+
balancesConfig?: {
|
|
4477
|
+
"substrate-native"?: {
|
|
4478
|
+
disable?: boolean | undefined;
|
|
4479
|
+
} | undefined;
|
|
4480
|
+
"substrate-assets"?: Record<string, never> | undefined;
|
|
4481
|
+
"substrate-psp22"?: Record<string, never> | undefined;
|
|
4482
|
+
"substrate-tokens"?: {
|
|
4483
|
+
palletId?: string | undefined;
|
|
4484
|
+
} | undefined;
|
|
4485
|
+
"substrate-foreignassets"?: Record<string, never> | undefined;
|
|
4486
|
+
"substrate-hydration"?: Record<string, never> | undefined;
|
|
4487
|
+
"substrate-dtao"?: Record<string, never> | undefined;
|
|
4488
|
+
} | undefined;
|
|
4489
|
+
} | {
|
|
4490
|
+
id: string;
|
|
4491
|
+
isTestnet?: boolean | undefined;
|
|
4492
|
+
isDefault?: boolean | undefined;
|
|
4493
|
+
forceScan?: boolean | undefined;
|
|
4494
|
+
name: string;
|
|
4495
|
+
logo?: string | undefined;
|
|
4496
|
+
nativeTokenId: string;
|
|
4497
|
+
nativeCurrency: {
|
|
4498
|
+
decimals: number;
|
|
4499
|
+
symbol: string;
|
|
4500
|
+
name: string;
|
|
4501
|
+
coingeckoId?: string | undefined;
|
|
4502
|
+
mirrorOf?: string | undefined;
|
|
4503
|
+
logo?: string | undefined;
|
|
4504
|
+
};
|
|
4505
|
+
themeColor?: string | undefined;
|
|
4506
|
+
blockExplorerUrls: string[];
|
|
4507
|
+
platform: "ethereum";
|
|
4508
|
+
substrateChainId?: string | undefined;
|
|
4509
|
+
preserveGasEstimate?: boolean | undefined;
|
|
4510
|
+
rpcs: string[];
|
|
4511
|
+
feeType?: "eip-1559" | "legacy" | undefined;
|
|
4512
|
+
l2FeeType?: {
|
|
4513
|
+
type: "op-stack";
|
|
4514
|
+
} | {
|
|
4515
|
+
type: "scroll";
|
|
4516
|
+
l1GasPriceOracle: `0x${string}`;
|
|
4517
|
+
} | undefined;
|
|
4518
|
+
contracts?: {
|
|
4519
|
+
Erc20Aggregator?: `0x${string}` | undefined;
|
|
4520
|
+
Multicall3?: `0x${string}` | undefined;
|
|
4521
|
+
} | undefined;
|
|
4522
|
+
balancesConfig?: {
|
|
4523
|
+
"evm-native"?: Record<string, never> | undefined;
|
|
4524
|
+
"evm-erc20"?: Record<string, never> | undefined;
|
|
4525
|
+
"evm-uniswapv2"?: Record<string, never> | undefined;
|
|
4526
|
+
} | undefined;
|
|
4527
|
+
} | {
|
|
4528
|
+
id: string;
|
|
4529
|
+
isTestnet?: boolean | undefined;
|
|
4530
|
+
isDefault?: boolean | undefined;
|
|
4531
|
+
forceScan?: boolean | undefined;
|
|
4532
|
+
name: string;
|
|
4533
|
+
logo?: string | undefined;
|
|
4534
|
+
nativeTokenId: string;
|
|
4535
|
+
nativeCurrency: {
|
|
4536
|
+
decimals: number;
|
|
4537
|
+
symbol: string;
|
|
4538
|
+
name: string;
|
|
4539
|
+
coingeckoId?: string | undefined;
|
|
4540
|
+
mirrorOf?: string | undefined;
|
|
4541
|
+
logo?: string | undefined;
|
|
4542
|
+
};
|
|
4543
|
+
themeColor?: string | undefined;
|
|
4544
|
+
blockExplorerUrls: string[];
|
|
4545
|
+
platform: "solana";
|
|
4546
|
+
genesisHash: string;
|
|
4547
|
+
rpcs: string[];
|
|
4548
|
+
balancesConfig?: {
|
|
4549
|
+
"sol-native"?: Record<string, never> | undefined;
|
|
4550
|
+
"sol-spl"?: Record<string, never> | undefined;
|
|
4551
|
+
"sol-token2022"?: Record<string, never> | undefined;
|
|
4552
|
+
} | undefined;
|
|
4553
|
+
})[];
|
|
4554
|
+
tokens: ({
|
|
4555
|
+
id: string;
|
|
4556
|
+
networkId: string;
|
|
4557
|
+
isDefault?: boolean | undefined;
|
|
4558
|
+
decimals: number;
|
|
4559
|
+
symbol: string;
|
|
4560
|
+
name?: string | undefined;
|
|
4561
|
+
logo?: string | undefined;
|
|
4562
|
+
coingeckoId?: string | undefined;
|
|
4563
|
+
noDiscovery?: boolean | undefined;
|
|
4564
|
+
mirrorOf?: string | undefined;
|
|
4565
|
+
type: "evm-uniswapv2";
|
|
4566
|
+
platform: "ethereum";
|
|
4567
|
+
contractAddress: `0x${string}`;
|
|
4568
|
+
isCustom?: boolean | undefined;
|
|
4569
|
+
symbol0: string;
|
|
4570
|
+
symbol1: string;
|
|
4571
|
+
decimals0: number;
|
|
4572
|
+
decimals1: number;
|
|
4573
|
+
tokenAddress0: `0x${string}`;
|
|
4574
|
+
tokenAddress1: `0x${string}`;
|
|
4575
|
+
coingeckoId0?: string | undefined;
|
|
4576
|
+
coingeckoId1?: string | undefined;
|
|
4577
|
+
} | {
|
|
4578
|
+
id: string;
|
|
4579
|
+
networkId: string;
|
|
4580
|
+
isDefault?: boolean | undefined;
|
|
4581
|
+
decimals: number;
|
|
4582
|
+
symbol: string;
|
|
4583
|
+
name?: string | undefined;
|
|
4584
|
+
logo?: string | undefined;
|
|
4585
|
+
coingeckoId?: string | undefined;
|
|
4586
|
+
noDiscovery?: boolean | undefined;
|
|
4587
|
+
mirrorOf?: string | undefined;
|
|
4588
|
+
type: "evm-erc20";
|
|
4589
|
+
platform: "ethereum";
|
|
4590
|
+
contractAddress: `0x${string}`;
|
|
4591
|
+
} | {
|
|
4592
|
+
id: string;
|
|
4593
|
+
networkId: string;
|
|
4594
|
+
isDefault?: boolean | undefined;
|
|
4595
|
+
decimals: number;
|
|
4596
|
+
symbol: string;
|
|
4597
|
+
name?: string | undefined;
|
|
4598
|
+
logo?: string | undefined;
|
|
4599
|
+
coingeckoId?: string | undefined;
|
|
4600
|
+
noDiscovery?: boolean | undefined;
|
|
4601
|
+
mirrorOf?: string | undefined;
|
|
4602
|
+
type: "evm-native";
|
|
4603
|
+
platform: "ethereum";
|
|
4604
|
+
} | {
|
|
4605
|
+
id: string;
|
|
4606
|
+
networkId: string;
|
|
4607
|
+
isDefault?: boolean | undefined;
|
|
4608
|
+
decimals: number;
|
|
4609
|
+
symbol: string;
|
|
4610
|
+
name?: string | undefined;
|
|
4611
|
+
logo?: string | undefined;
|
|
4612
|
+
coingeckoId?: string | undefined;
|
|
4613
|
+
noDiscovery?: boolean | undefined;
|
|
4614
|
+
mirrorOf?: string | undefined;
|
|
4615
|
+
type: "substrate-assets";
|
|
4616
|
+
platform: "polkadot";
|
|
4617
|
+
assetId: string;
|
|
4618
|
+
isFrozen?: boolean | undefined;
|
|
4619
|
+
isSufficient: boolean;
|
|
4620
|
+
existentialDeposit: string;
|
|
4621
|
+
} | {
|
|
4622
|
+
id: string;
|
|
4623
|
+
networkId: string;
|
|
4624
|
+
isDefault?: boolean | undefined;
|
|
4625
|
+
decimals: number;
|
|
4626
|
+
symbol: string;
|
|
4627
|
+
name?: string | undefined;
|
|
4628
|
+
logo?: string | undefined;
|
|
4629
|
+
coingeckoId?: string | undefined;
|
|
4630
|
+
noDiscovery?: boolean | undefined;
|
|
4631
|
+
mirrorOf?: string | undefined;
|
|
4632
|
+
type: "substrate-dtao";
|
|
4633
|
+
platform: "polkadot";
|
|
4634
|
+
netuid: number;
|
|
4635
|
+
subnetName?: string | undefined;
|
|
4636
|
+
hotkey?: string | undefined;
|
|
4637
|
+
isTransferable: boolean;
|
|
4638
|
+
} | {
|
|
4639
|
+
id: string;
|
|
4640
|
+
networkId: string;
|
|
4641
|
+
isDefault?: boolean | undefined;
|
|
4642
|
+
decimals: number;
|
|
4643
|
+
symbol: string;
|
|
4644
|
+
name?: string | undefined;
|
|
4645
|
+
logo?: string | undefined;
|
|
4646
|
+
coingeckoId?: string | undefined;
|
|
4647
|
+
noDiscovery?: boolean | undefined;
|
|
4648
|
+
mirrorOf?: string | undefined;
|
|
4649
|
+
type: "substrate-foreignassets";
|
|
4650
|
+
platform: "polkadot";
|
|
4651
|
+
onChainId: string;
|
|
4652
|
+
isFrozen?: boolean | undefined;
|
|
4653
|
+
isSufficient: boolean;
|
|
4654
|
+
existentialDeposit: string;
|
|
4655
|
+
} | {
|
|
4656
|
+
id: string;
|
|
4657
|
+
networkId: string;
|
|
4658
|
+
isDefault?: boolean | undefined;
|
|
4659
|
+
decimals: number;
|
|
4660
|
+
symbol: string;
|
|
4661
|
+
name?: string | undefined;
|
|
4662
|
+
logo?: string | undefined;
|
|
4663
|
+
coingeckoId?: string | undefined;
|
|
4664
|
+
noDiscovery?: boolean | undefined;
|
|
4665
|
+
mirrorOf?: string | undefined;
|
|
4666
|
+
type: "substrate-native";
|
|
4667
|
+
platform: "polkadot";
|
|
4668
|
+
existentialDeposit: string;
|
|
4669
|
+
} | {
|
|
4670
|
+
id: string;
|
|
4671
|
+
networkId: string;
|
|
4672
|
+
isDefault?: boolean | undefined;
|
|
4673
|
+
decimals: number;
|
|
4674
|
+
symbol: string;
|
|
4675
|
+
name?: string | undefined;
|
|
4676
|
+
logo?: string | undefined;
|
|
4677
|
+
coingeckoId?: string | undefined;
|
|
4678
|
+
noDiscovery?: boolean | undefined;
|
|
4679
|
+
mirrorOf?: string | undefined;
|
|
4680
|
+
type: "substrate-psp22";
|
|
4681
|
+
platform: "polkadot";
|
|
4682
|
+
contractAddress: string;
|
|
4683
|
+
} | {
|
|
4684
|
+
id: string;
|
|
4685
|
+
networkId: string;
|
|
4686
|
+
isDefault?: boolean | undefined;
|
|
4687
|
+
decimals: number;
|
|
4688
|
+
symbol: string;
|
|
4689
|
+
name?: string | undefined;
|
|
4690
|
+
logo?: string | undefined;
|
|
4691
|
+
coingeckoId?: string | undefined;
|
|
4692
|
+
noDiscovery?: boolean | undefined;
|
|
4693
|
+
mirrorOf?: string | undefined;
|
|
4694
|
+
type: "substrate-tokens";
|
|
4695
|
+
platform: "polkadot";
|
|
4696
|
+
onChainId: string | number;
|
|
4697
|
+
existentialDeposit: string;
|
|
4698
|
+
} | {
|
|
4699
|
+
id: string;
|
|
4700
|
+
networkId: string;
|
|
4701
|
+
isDefault?: boolean | undefined;
|
|
4702
|
+
decimals: number;
|
|
4703
|
+
symbol: string;
|
|
4704
|
+
name?: string | undefined;
|
|
4705
|
+
logo?: string | undefined;
|
|
4706
|
+
coingeckoId?: string | undefined;
|
|
4707
|
+
noDiscovery?: boolean | undefined;
|
|
4708
|
+
mirrorOf?: string | undefined;
|
|
4709
|
+
type: "substrate-hydration";
|
|
4710
|
+
platform: "polkadot";
|
|
4711
|
+
onChainId: number;
|
|
4712
|
+
assetType: "Erc20" | "External" | "Token";
|
|
4713
|
+
isSufficient: boolean;
|
|
4714
|
+
existentialDeposit: string;
|
|
4715
|
+
} | {
|
|
4716
|
+
id: string;
|
|
4717
|
+
networkId: string;
|
|
4718
|
+
isDefault?: boolean | undefined;
|
|
4719
|
+
decimals: number;
|
|
4720
|
+
symbol: string;
|
|
4721
|
+
name?: string | undefined;
|
|
4722
|
+
logo?: string | undefined;
|
|
4723
|
+
coingeckoId?: string | undefined;
|
|
4724
|
+
noDiscovery?: boolean | undefined;
|
|
4725
|
+
mirrorOf?: string | undefined;
|
|
4726
|
+
type: "sol-native";
|
|
4727
|
+
platform: "solana";
|
|
4728
|
+
} | {
|
|
4729
|
+
id: string;
|
|
4730
|
+
networkId: string;
|
|
4731
|
+
isDefault?: boolean | undefined;
|
|
4732
|
+
decimals: number;
|
|
4733
|
+
symbol: string;
|
|
4734
|
+
name?: string | undefined;
|
|
4735
|
+
logo?: string | undefined;
|
|
4736
|
+
coingeckoId?: string | undefined;
|
|
4737
|
+
noDiscovery?: boolean | undefined;
|
|
4738
|
+
mirrorOf?: string | undefined;
|
|
4739
|
+
type: "sol-spl";
|
|
4740
|
+
platform: "solana";
|
|
4741
|
+
mintAddress: string;
|
|
4742
|
+
} | {
|
|
4743
|
+
id: string;
|
|
4744
|
+
networkId: string;
|
|
4745
|
+
isDefault?: boolean | undefined;
|
|
4746
|
+
decimals: number;
|
|
4747
|
+
symbol: string;
|
|
4748
|
+
name?: string | undefined;
|
|
4749
|
+
logo?: string | undefined;
|
|
4750
|
+
coingeckoId?: string | undefined;
|
|
4751
|
+
noDiscovery?: boolean | undefined;
|
|
4752
|
+
mirrorOf?: string | undefined;
|
|
4753
|
+
type: "sol-token2022";
|
|
4754
|
+
platform: "solana";
|
|
4755
|
+
mintAddress: string;
|
|
4756
|
+
isTransferable?: boolean | undefined;
|
|
4757
|
+
})[];
|
|
4758
|
+
miniMetadatas: {
|
|
4759
|
+
id: string;
|
|
4760
|
+
source: string;
|
|
4761
|
+
chainId: string;
|
|
4762
|
+
specVersion: number;
|
|
4763
|
+
version: string;
|
|
4764
|
+
data: `0x${string}` | null;
|
|
4765
|
+
extra: any;
|
|
4766
|
+
}[];
|
|
4767
|
+
}>;
|
|
4768
|
+
//#endregion
|
|
4410
4769
|
//#region src/util.d.ts
|
|
4411
4770
|
type KNOWN_TOKEN_ID = "uniswap";
|
|
4412
4771
|
export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
@@ -4418,5 +4777,5 @@ export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
|
4418
4777
|
export declare const getGithubTokenLogoUrlByCoingeckoId: (coingeckoId: string) => string;
|
|
4419
4778
|
export declare const getGithubBittensorHotkeyAssetUrl: (fileName: string) => string;
|
|
4420
4779
|
//#endregion
|
|
4421
|
-
export type { Chaindata, CustomChaindata };
|
|
4780
|
+
export type { Chaindata, ChaindataFile, CustomChaindata };
|
|
4422
4781
|
//# sourceMappingURL=index.d.ts.map
|