@talismn/chaindata-provider 2.1.0 → 2.3.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 +397 -28
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +487 -118
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +552 -458
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +552 -460
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare const DotNetworkSchema: z.ZodObject<{
|
|
|
74
74
|
hasCheckMetadataHash: z.ZodOptional<z.ZodBoolean>;
|
|
75
75
|
hasExtrinsicSignatureTypePrefix: z.ZodOptional<z.ZodBoolean>;
|
|
76
76
|
isUnknownFeeToken: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
hasFrontierMirrorWithdraw: z.ZodOptional<z.ZodBoolean>;
|
|
77
78
|
topology: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
79
|
type: z.ZodLiteral<"standalone">;
|
|
79
80
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -192,6 +193,7 @@ export declare const NetworkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
192
193
|
hasCheckMetadataHash: z.ZodOptional<z.ZodBoolean>;
|
|
193
194
|
hasExtrinsicSignatureTypePrefix: z.ZodOptional<z.ZodBoolean>;
|
|
194
195
|
isUnknownFeeToken: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
+
hasFrontierMirrorWithdraw: z.ZodOptional<z.ZodBoolean>;
|
|
195
197
|
topology: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
196
198
|
type: z.ZodLiteral<"standalone">;
|
|
197
199
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -1162,6 +1164,23 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1162
1164
|
mintAddress: z.ZodString;
|
|
1163
1165
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
1164
1166
|
}, 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
|
+
} | {
|
|
1165
1184
|
id: string;
|
|
1166
1185
|
networkId: string;
|
|
1167
1186
|
isDefault?: boolean | undefined;
|
|
@@ -1211,23 +1230,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1211
1230
|
tokenAddress1: `0x${string}`;
|
|
1212
1231
|
coingeckoId0?: string | undefined;
|
|
1213
1232
|
coingeckoId1?: string | undefined;
|
|
1214
|
-
} | {
|
|
1215
|
-
id: string;
|
|
1216
|
-
networkId: string;
|
|
1217
|
-
isDefault?: boolean | undefined;
|
|
1218
|
-
decimals: number;
|
|
1219
|
-
symbol: string;
|
|
1220
|
-
name?: string | undefined;
|
|
1221
|
-
logo?: string | undefined;
|
|
1222
|
-
coingeckoId?: string | undefined;
|
|
1223
|
-
noDiscovery?: boolean | undefined;
|
|
1224
|
-
mirrorOf?: string | undefined;
|
|
1225
|
-
type: "substrate-assets";
|
|
1226
|
-
platform: "polkadot";
|
|
1227
|
-
assetId: string;
|
|
1228
|
-
isFrozen?: boolean | undefined;
|
|
1229
|
-
isSufficient: boolean;
|
|
1230
|
-
existentialDeposit: string;
|
|
1231
1233
|
} | {
|
|
1232
1234
|
id: string;
|
|
1233
1235
|
networkId: string;
|
|
@@ -1365,6 +1367,23 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1365
1367
|
mintAddress: string;
|
|
1366
1368
|
isTransferable?: boolean | undefined;
|
|
1367
1369
|
}, {
|
|
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
|
+
} | {
|
|
1368
1387
|
id: string;
|
|
1369
1388
|
networkId: string;
|
|
1370
1389
|
isDefault?: boolean | undefined;
|
|
@@ -1414,23 +1433,6 @@ export declare const TokenSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1414
1433
|
tokenAddress1: `0x${string}`;
|
|
1415
1434
|
coingeckoId0?: string | undefined;
|
|
1416
1435
|
coingeckoId1?: string | undefined;
|
|
1417
|
-
} | {
|
|
1418
|
-
id: string;
|
|
1419
|
-
networkId: string;
|
|
1420
|
-
isDefault?: boolean | undefined;
|
|
1421
|
-
decimals: number;
|
|
1422
|
-
symbol: string;
|
|
1423
|
-
name?: string | undefined;
|
|
1424
|
-
logo?: string | undefined;
|
|
1425
|
-
coingeckoId?: string | undefined;
|
|
1426
|
-
noDiscovery?: boolean | undefined;
|
|
1427
|
-
mirrorOf?: string | undefined;
|
|
1428
|
-
type: "substrate-assets";
|
|
1429
|
-
platform: "polkadot";
|
|
1430
|
-
assetId: string;
|
|
1431
|
-
isFrozen?: boolean | undefined;
|
|
1432
|
-
isSufficient: boolean;
|
|
1433
|
-
existentialDeposit: string;
|
|
1434
1436
|
} | {
|
|
1435
1437
|
id: string;
|
|
1436
1438
|
networkId: string;
|
|
@@ -1654,6 +1656,7 @@ export declare const isNetworkDot: (network: Network | null | undefined) => netw
|
|
|
1654
1656
|
hasCheckMetadataHash?: boolean | undefined;
|
|
1655
1657
|
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
1656
1658
|
isUnknownFeeToken?: boolean | undefined;
|
|
1659
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
1657
1660
|
topology: {
|
|
1658
1661
|
type: "standalone";
|
|
1659
1662
|
} | {
|
|
@@ -2060,6 +2063,7 @@ export declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform
|
|
|
2060
2063
|
//#endregion
|
|
2061
2064
|
//#region src/constants.d.ts
|
|
2062
2065
|
export declare const MINIMETADATA_VERSION: string;
|
|
2066
|
+
export declare const DEFAULT_CHAINDATA_URL = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v15/chaindata.min.json";
|
|
2063
2067
|
//#endregion
|
|
2064
2068
|
//#region src/getBlockExplorerUrls.d.ts
|
|
2065
2069
|
export type BlockExplorerQuery = {
|
|
@@ -2293,6 +2297,7 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2293
2297
|
hasCheckMetadataHash: z.ZodOptional<z.ZodBoolean>;
|
|
2294
2298
|
hasExtrinsicSignatureTypePrefix: z.ZodOptional<z.ZodBoolean>;
|
|
2295
2299
|
isUnknownFeeToken: z.ZodOptional<z.ZodBoolean>;
|
|
2300
|
+
hasFrontierMirrorWithdraw: z.ZodOptional<z.ZodBoolean>;
|
|
2296
2301
|
topology: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2297
2302
|
type: z.ZodLiteral<"standalone">;
|
|
2298
2303
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -2591,6 +2596,23 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2591
2596
|
mintAddress: z.ZodString;
|
|
2592
2597
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
2593
2598
|
}, 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
|
+
} | {
|
|
2594
2616
|
id: string;
|
|
2595
2617
|
networkId: string;
|
|
2596
2618
|
isDefault?: boolean | undefined;
|
|
@@ -2640,23 +2662,6 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2640
2662
|
tokenAddress1: `0x${string}`;
|
|
2641
2663
|
coingeckoId0?: string | undefined;
|
|
2642
2664
|
coingeckoId1?: string | undefined;
|
|
2643
|
-
} | {
|
|
2644
|
-
id: string;
|
|
2645
|
-
networkId: string;
|
|
2646
|
-
isDefault?: boolean | undefined;
|
|
2647
|
-
decimals: number;
|
|
2648
|
-
symbol: string;
|
|
2649
|
-
name?: string | undefined;
|
|
2650
|
-
logo?: string | undefined;
|
|
2651
|
-
coingeckoId?: string | undefined;
|
|
2652
|
-
noDiscovery?: boolean | undefined;
|
|
2653
|
-
mirrorOf?: string | undefined;
|
|
2654
|
-
type: "substrate-assets";
|
|
2655
|
-
platform: "polkadot";
|
|
2656
|
-
assetId: string;
|
|
2657
|
-
isFrozen?: boolean | undefined;
|
|
2658
|
-
isSufficient: boolean;
|
|
2659
|
-
existentialDeposit: string;
|
|
2660
2665
|
} | {
|
|
2661
2666
|
id: string;
|
|
2662
2667
|
networkId: string;
|
|
@@ -2794,6 +2799,23 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2794
2799
|
mintAddress: string;
|
|
2795
2800
|
isTransferable?: boolean | undefined;
|
|
2796
2801
|
}, {
|
|
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
|
+
} | {
|
|
2797
2819
|
id: string;
|
|
2798
2820
|
networkId: string;
|
|
2799
2821
|
isDefault?: boolean | undefined;
|
|
@@ -2843,23 +2865,6 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
2843
2865
|
tokenAddress1: `0x${string}`;
|
|
2844
2866
|
coingeckoId0?: string | undefined;
|
|
2845
2867
|
coingeckoId1?: string | undefined;
|
|
2846
|
-
} | {
|
|
2847
|
-
id: string;
|
|
2848
|
-
networkId: string;
|
|
2849
|
-
isDefault?: boolean | undefined;
|
|
2850
|
-
decimals: number;
|
|
2851
|
-
symbol: string;
|
|
2852
|
-
name?: string | undefined;
|
|
2853
|
-
logo?: string | undefined;
|
|
2854
|
-
coingeckoId?: string | undefined;
|
|
2855
|
-
noDiscovery?: boolean | undefined;
|
|
2856
|
-
mirrorOf?: string | undefined;
|
|
2857
|
-
type: "substrate-assets";
|
|
2858
|
-
platform: "polkadot";
|
|
2859
|
-
assetId: string;
|
|
2860
|
-
isFrozen?: boolean | undefined;
|
|
2861
|
-
isSufficient: boolean;
|
|
2862
|
-
existentialDeposit: string;
|
|
2863
2868
|
} | {
|
|
2864
2869
|
id: string;
|
|
2865
2870
|
networkId: string;
|
|
@@ -3008,6 +3013,7 @@ export declare const ChaindataFileSchema: z.ZodObject<{
|
|
|
3008
3013
|
}, z.core.$strict>>;
|
|
3009
3014
|
}, z.core.$strip>;
|
|
3010
3015
|
type Chaindata = z.infer<typeof ChaindataFileSchema>;
|
|
3016
|
+
type ChaindataFile = z.input<typeof ChaindataFileSchema>;
|
|
3011
3017
|
export declare const CustomChaindataSchema: z.ZodObject<{
|
|
3012
3018
|
networks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3013
3019
|
id: z.ZodString;
|
|
@@ -3046,6 +3052,7 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3046
3052
|
hasCheckMetadataHash: z.ZodOptional<z.ZodBoolean>;
|
|
3047
3053
|
hasExtrinsicSignatureTypePrefix: z.ZodOptional<z.ZodBoolean>;
|
|
3048
3054
|
isUnknownFeeToken: z.ZodOptional<z.ZodBoolean>;
|
|
3055
|
+
hasFrontierMirrorWithdraw: z.ZodOptional<z.ZodBoolean>;
|
|
3049
3056
|
topology: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3050
3057
|
type: z.ZodLiteral<"standalone">;
|
|
3051
3058
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -3344,6 +3351,23 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3344
3351
|
mintAddress: z.ZodString;
|
|
3345
3352
|
isTransferable: z.ZodOptional<z.ZodBoolean>;
|
|
3346
3353
|
}, 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
|
+
} | {
|
|
3347
3371
|
id: string;
|
|
3348
3372
|
networkId: string;
|
|
3349
3373
|
isDefault?: boolean | undefined;
|
|
@@ -3393,23 +3417,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3393
3417
|
tokenAddress1: `0x${string}`;
|
|
3394
3418
|
coingeckoId0?: string | undefined;
|
|
3395
3419
|
coingeckoId1?: string | undefined;
|
|
3396
|
-
} | {
|
|
3397
|
-
id: string;
|
|
3398
|
-
networkId: string;
|
|
3399
|
-
isDefault?: boolean | undefined;
|
|
3400
|
-
decimals: number;
|
|
3401
|
-
symbol: string;
|
|
3402
|
-
name?: string | undefined;
|
|
3403
|
-
logo?: string | undefined;
|
|
3404
|
-
coingeckoId?: string | undefined;
|
|
3405
|
-
noDiscovery?: boolean | undefined;
|
|
3406
|
-
mirrorOf?: string | undefined;
|
|
3407
|
-
type: "substrate-assets";
|
|
3408
|
-
platform: "polkadot";
|
|
3409
|
-
assetId: string;
|
|
3410
|
-
isFrozen?: boolean | undefined;
|
|
3411
|
-
isSufficient: boolean;
|
|
3412
|
-
existentialDeposit: string;
|
|
3413
3420
|
} | {
|
|
3414
3421
|
id: string;
|
|
3415
3422
|
networkId: string;
|
|
@@ -3547,6 +3554,23 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3547
3554
|
mintAddress: string;
|
|
3548
3555
|
isTransferable?: boolean | undefined;
|
|
3549
3556
|
}, {
|
|
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
|
+
} | {
|
|
3550
3574
|
id: string;
|
|
3551
3575
|
networkId: string;
|
|
3552
3576
|
isDefault?: boolean | undefined;
|
|
@@ -3596,23 +3620,6 @@ export declare const CustomChaindataSchema: z.ZodObject<{
|
|
|
3596
3620
|
tokenAddress1: `0x${string}`;
|
|
3597
3621
|
coingeckoId0?: string | undefined;
|
|
3598
3622
|
coingeckoId1?: string | undefined;
|
|
3599
|
-
} | {
|
|
3600
|
-
id: string;
|
|
3601
|
-
networkId: string;
|
|
3602
|
-
isDefault?: boolean | undefined;
|
|
3603
|
-
decimals: number;
|
|
3604
|
-
symbol: string;
|
|
3605
|
-
name?: string | undefined;
|
|
3606
|
-
logo?: string | undefined;
|
|
3607
|
-
coingeckoId?: string | undefined;
|
|
3608
|
-
noDiscovery?: boolean | undefined;
|
|
3609
|
-
mirrorOf?: string | undefined;
|
|
3610
|
-
type: "substrate-assets";
|
|
3611
|
-
platform: "polkadot";
|
|
3612
|
-
assetId: string;
|
|
3613
|
-
isFrozen?: boolean | undefined;
|
|
3614
|
-
isSufficient: boolean;
|
|
3615
|
-
existentialDeposit: string;
|
|
3616
3623
|
} | {
|
|
3617
3624
|
id: string;
|
|
3618
3625
|
networkId: string;
|
|
@@ -3798,10 +3805,22 @@ export type ChaindataProviderOptions = {
|
|
|
3798
3805
|
persistedStorage?: ChaindataStorage | Promise<ChaindataStorage | undefined>;
|
|
3799
3806
|
customChaindata$?: Observable<CustomChaindata> | CustomChaindata;
|
|
3800
3807
|
dynamicTokens$?: ReplaySubject<Token[]>;
|
|
3808
|
+
/**
|
|
3809
|
+
* Replaces the default chaindata downloaded from the TalismanSociety/chaindata repository.
|
|
3810
|
+
*
|
|
3811
|
+
* The provider subscribes to `chaindata$` only while the provider itself has subscribers.
|
|
3812
|
+
* Pass a replaying observable (a `BehaviorSubject`, or `shareReplay(1)` without `refCount`),
|
|
3813
|
+
* otherwise values emitted while nothing is subscribed are lost. A failed observable is
|
|
3814
|
+
* resubscribed with backoff, so only a cold observable can recover.
|
|
3815
|
+
*
|
|
3816
|
+
* `persistedStorage` seeds the data whichever source is used: clear it when you switch
|
|
3817
|
+
* sources. Only the provider without `chaindata$` falls back to the bundled chaindata.
|
|
3818
|
+
*/
|
|
3819
|
+
chaindata$?: Observable<ChaindataFile> | ChaindataFile;
|
|
3801
3820
|
};
|
|
3802
3821
|
export declare class ChaindataProvider implements IChaindataProvider {
|
|
3803
3822
|
#private;
|
|
3804
|
-
constructor({ persistedStorage, customChaindata$, dynamicTokens$ }?: ChaindataProviderOptions);
|
|
3823
|
+
constructor({ persistedStorage, customChaindata$, dynamicTokens$, chaindata$ }?: ChaindataProviderOptions);
|
|
3805
3824
|
/**
|
|
3806
3825
|
* Subscribe to this observable and save its contents somewhere persistent.
|
|
3807
3826
|
*
|
|
@@ -3870,6 +3889,20 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
3870
3889
|
* Tokens
|
|
3871
3890
|
*/
|
|
3872
3891
|
get tokens$(): Observable<({
|
|
3892
|
+
id: string;
|
|
3893
|
+
networkId: string;
|
|
3894
|
+
isDefault?: boolean | undefined;
|
|
3895
|
+
decimals: number;
|
|
3896
|
+
symbol: string;
|
|
3897
|
+
name?: string | undefined;
|
|
3898
|
+
logo?: string | undefined;
|
|
3899
|
+
coingeckoId?: string | undefined;
|
|
3900
|
+
noDiscovery?: boolean | undefined;
|
|
3901
|
+
mirrorOf?: string | undefined;
|
|
3902
|
+
type: "sol-spl";
|
|
3903
|
+
platform: "solana";
|
|
3904
|
+
mintAddress: string;
|
|
3905
|
+
} | {
|
|
3873
3906
|
id: string;
|
|
3874
3907
|
networkId: string;
|
|
3875
3908
|
isDefault?: boolean | undefined;
|
|
@@ -4043,20 +4076,6 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4043
4076
|
mirrorOf?: string | undefined;
|
|
4044
4077
|
type: "sol-native";
|
|
4045
4078
|
platform: "solana";
|
|
4046
|
-
} | {
|
|
4047
|
-
id: string;
|
|
4048
|
-
networkId: string;
|
|
4049
|
-
isDefault?: boolean | undefined;
|
|
4050
|
-
decimals: number;
|
|
4051
|
-
symbol: string;
|
|
4052
|
-
name?: string | undefined;
|
|
4053
|
-
logo?: string | undefined;
|
|
4054
|
-
coingeckoId?: string | undefined;
|
|
4055
|
-
noDiscovery?: boolean | undefined;
|
|
4056
|
-
mirrorOf?: string | undefined;
|
|
4057
|
-
type: "sol-spl";
|
|
4058
|
-
platform: "solana";
|
|
4059
|
-
mintAddress: string;
|
|
4060
4079
|
} | {
|
|
4061
4080
|
id: string;
|
|
4062
4081
|
networkId: string;
|
|
@@ -4129,6 +4148,7 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4129
4148
|
hasCheckMetadataHash?: boolean | undefined;
|
|
4130
4149
|
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4131
4150
|
isUnknownFeeToken?: boolean | undefined;
|
|
4151
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
4132
4152
|
topology: {
|
|
4133
4153
|
type: "standalone";
|
|
4134
4154
|
} | {
|
|
@@ -4257,6 +4277,7 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4257
4277
|
hasCheckMetadataHash?: boolean | undefined;
|
|
4258
4278
|
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4259
4279
|
isUnknownFeeToken?: boolean | undefined;
|
|
4280
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
4260
4281
|
topology: {
|
|
4261
4282
|
type: "standalone";
|
|
4262
4283
|
} | {
|
|
@@ -4316,6 +4337,7 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4316
4337
|
hasCheckMetadataHash?: boolean | undefined;
|
|
4317
4338
|
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4318
4339
|
isUnknownFeeToken?: boolean | undefined;
|
|
4340
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
4319
4341
|
topology: {
|
|
4320
4342
|
type: "standalone";
|
|
4321
4343
|
} | {
|
|
@@ -4373,6 +4395,7 @@ export declare class ChaindataProvider implements IChaindataProvider {
|
|
|
4373
4395
|
hasCheckMetadataHash?: boolean | undefined;
|
|
4374
4396
|
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4375
4397
|
isUnknownFeeToken?: boolean | undefined;
|
|
4398
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
4376
4399
|
topology: {
|
|
4377
4400
|
type: "standalone";
|
|
4378
4401
|
} | {
|
|
@@ -4407,6 +4430,352 @@ export declare const isTokenTestnet: (token: Token) => boolean;
|
|
|
4407
4430
|
export declare const getCleanNetwork: (network: Network) => Network;
|
|
4408
4431
|
export declare const getCleanToken: (token: Token) => Token;
|
|
4409
4432
|
//#endregion
|
|
4433
|
+
//#region src/state/remoteChaindata.d.ts
|
|
4434
|
+
/**
|
|
4435
|
+
* Downloads the chaindata file at `url` and refreshes it every 5 minutes. Equivalent spellings
|
|
4436
|
+
* of a url share one observable. Throws if `url` is not a valid url.
|
|
4437
|
+
*
|
|
4438
|
+
* Emitted objects are shared and already validated: treat them as immutable, and filter them
|
|
4439
|
+
* by returning new objects.
|
|
4440
|
+
*/
|
|
4441
|
+
export declare const getRemoteChaindata$: (url: string) => Observable<{
|
|
4442
|
+
networks: ({
|
|
4443
|
+
id: string;
|
|
4444
|
+
isTestnet?: boolean | undefined;
|
|
4445
|
+
isDefault?: boolean | undefined;
|
|
4446
|
+
forceScan?: boolean | undefined;
|
|
4447
|
+
name: string;
|
|
4448
|
+
logo?: string | undefined;
|
|
4449
|
+
nativeTokenId: string;
|
|
4450
|
+
nativeCurrency: {
|
|
4451
|
+
decimals: number;
|
|
4452
|
+
symbol: string;
|
|
4453
|
+
name: string;
|
|
4454
|
+
coingeckoId?: string | undefined;
|
|
4455
|
+
mirrorOf?: string | undefined;
|
|
4456
|
+
logo?: string | undefined;
|
|
4457
|
+
};
|
|
4458
|
+
themeColor?: string | undefined;
|
|
4459
|
+
blockExplorerUrls: string[];
|
|
4460
|
+
genesisHash: `0x${string}`;
|
|
4461
|
+
platform: "polkadot";
|
|
4462
|
+
chainName: string;
|
|
4463
|
+
specName: string;
|
|
4464
|
+
specVersion: number;
|
|
4465
|
+
account: "*25519" | "secp256k1";
|
|
4466
|
+
chainspecQrUrl?: string | undefined;
|
|
4467
|
+
latestMetadataQrUrl?: string | undefined;
|
|
4468
|
+
prefix: number;
|
|
4469
|
+
oldPrefix?: number | undefined;
|
|
4470
|
+
rpcs: string[];
|
|
4471
|
+
registryTypes?: any;
|
|
4472
|
+
signedExtensions?: any;
|
|
4473
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
4474
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
4475
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
4476
|
+
hasFrontierMirrorWithdraw?: boolean | undefined;
|
|
4477
|
+
topology: {
|
|
4478
|
+
type: "standalone";
|
|
4479
|
+
} | {
|
|
4480
|
+
type: "relay";
|
|
4481
|
+
} | {
|
|
4482
|
+
type: "parachain";
|
|
4483
|
+
relayId: string;
|
|
4484
|
+
paraId: number;
|
|
4485
|
+
};
|
|
4486
|
+
balancesConfig?: {
|
|
4487
|
+
"substrate-native"?: {
|
|
4488
|
+
disable?: boolean | undefined;
|
|
4489
|
+
} | undefined;
|
|
4490
|
+
"substrate-assets"?: Record<string, never> | undefined;
|
|
4491
|
+
"substrate-psp22"?: Record<string, never> | undefined;
|
|
4492
|
+
"substrate-tokens"?: {
|
|
4493
|
+
palletId?: string | undefined;
|
|
4494
|
+
} | undefined;
|
|
4495
|
+
"substrate-foreignassets"?: Record<string, never> | undefined;
|
|
4496
|
+
"substrate-hydration"?: Record<string, never> | undefined;
|
|
4497
|
+
"substrate-dtao"?: Record<string, never> | undefined;
|
|
4498
|
+
} | undefined;
|
|
4499
|
+
} | {
|
|
4500
|
+
id: string;
|
|
4501
|
+
isTestnet?: boolean | undefined;
|
|
4502
|
+
isDefault?: boolean | undefined;
|
|
4503
|
+
forceScan?: boolean | undefined;
|
|
4504
|
+
name: string;
|
|
4505
|
+
logo?: string | undefined;
|
|
4506
|
+
nativeTokenId: string;
|
|
4507
|
+
nativeCurrency: {
|
|
4508
|
+
decimals: number;
|
|
4509
|
+
symbol: string;
|
|
4510
|
+
name: string;
|
|
4511
|
+
coingeckoId?: string | undefined;
|
|
4512
|
+
mirrorOf?: string | undefined;
|
|
4513
|
+
logo?: string | undefined;
|
|
4514
|
+
};
|
|
4515
|
+
themeColor?: string | undefined;
|
|
4516
|
+
blockExplorerUrls: string[];
|
|
4517
|
+
platform: "ethereum";
|
|
4518
|
+
substrateChainId?: string | undefined;
|
|
4519
|
+
preserveGasEstimate?: boolean | undefined;
|
|
4520
|
+
rpcs: string[];
|
|
4521
|
+
feeType?: "eip-1559" | "legacy" | undefined;
|
|
4522
|
+
l2FeeType?: {
|
|
4523
|
+
type: "op-stack";
|
|
4524
|
+
} | {
|
|
4525
|
+
type: "scroll";
|
|
4526
|
+
l1GasPriceOracle: `0x${string}`;
|
|
4527
|
+
} | undefined;
|
|
4528
|
+
contracts?: {
|
|
4529
|
+
Erc20Aggregator?: `0x${string}` | undefined;
|
|
4530
|
+
Multicall3?: `0x${string}` | undefined;
|
|
4531
|
+
} | undefined;
|
|
4532
|
+
balancesConfig?: {
|
|
4533
|
+
"evm-native"?: Record<string, never> | undefined;
|
|
4534
|
+
"evm-erc20"?: Record<string, never> | undefined;
|
|
4535
|
+
"evm-uniswapv2"?: Record<string, never> | undefined;
|
|
4536
|
+
} | undefined;
|
|
4537
|
+
} | {
|
|
4538
|
+
id: string;
|
|
4539
|
+
isTestnet?: boolean | undefined;
|
|
4540
|
+
isDefault?: boolean | undefined;
|
|
4541
|
+
forceScan?: boolean | undefined;
|
|
4542
|
+
name: string;
|
|
4543
|
+
logo?: string | undefined;
|
|
4544
|
+
nativeTokenId: string;
|
|
4545
|
+
nativeCurrency: {
|
|
4546
|
+
decimals: number;
|
|
4547
|
+
symbol: string;
|
|
4548
|
+
name: string;
|
|
4549
|
+
coingeckoId?: string | undefined;
|
|
4550
|
+
mirrorOf?: string | undefined;
|
|
4551
|
+
logo?: string | undefined;
|
|
4552
|
+
};
|
|
4553
|
+
themeColor?: string | undefined;
|
|
4554
|
+
blockExplorerUrls: string[];
|
|
4555
|
+
platform: "solana";
|
|
4556
|
+
genesisHash: string;
|
|
4557
|
+
rpcs: string[];
|
|
4558
|
+
balancesConfig?: {
|
|
4559
|
+
"sol-native"?: Record<string, never> | undefined;
|
|
4560
|
+
"sol-spl"?: Record<string, never> | undefined;
|
|
4561
|
+
"sol-token2022"?: Record<string, never> | undefined;
|
|
4562
|
+
} | undefined;
|
|
4563
|
+
})[];
|
|
4564
|
+
tokens: ({
|
|
4565
|
+
id: string;
|
|
4566
|
+
networkId: string;
|
|
4567
|
+
isDefault?: boolean | undefined;
|
|
4568
|
+
decimals: number;
|
|
4569
|
+
symbol: string;
|
|
4570
|
+
name?: string | undefined;
|
|
4571
|
+
logo?: string | undefined;
|
|
4572
|
+
coingeckoId?: string | undefined;
|
|
4573
|
+
noDiscovery?: boolean | undefined;
|
|
4574
|
+
mirrorOf?: string | undefined;
|
|
4575
|
+
type: "sol-spl";
|
|
4576
|
+
platform: "solana";
|
|
4577
|
+
mintAddress: string;
|
|
4578
|
+
} | {
|
|
4579
|
+
id: string;
|
|
4580
|
+
networkId: string;
|
|
4581
|
+
isDefault?: boolean | undefined;
|
|
4582
|
+
decimals: number;
|
|
4583
|
+
symbol: string;
|
|
4584
|
+
name?: string | undefined;
|
|
4585
|
+
logo?: string | undefined;
|
|
4586
|
+
coingeckoId?: string | undefined;
|
|
4587
|
+
noDiscovery?: boolean | undefined;
|
|
4588
|
+
mirrorOf?: string | undefined;
|
|
4589
|
+
type: "evm-erc20";
|
|
4590
|
+
platform: "ethereum";
|
|
4591
|
+
contractAddress: `0x${string}`;
|
|
4592
|
+
} | {
|
|
4593
|
+
id: string;
|
|
4594
|
+
networkId: string;
|
|
4595
|
+
isDefault?: boolean | undefined;
|
|
4596
|
+
decimals: number;
|
|
4597
|
+
symbol: string;
|
|
4598
|
+
name?: string | undefined;
|
|
4599
|
+
logo?: string | undefined;
|
|
4600
|
+
coingeckoId?: string | undefined;
|
|
4601
|
+
noDiscovery?: boolean | undefined;
|
|
4602
|
+
mirrorOf?: string | undefined;
|
|
4603
|
+
type: "evm-native";
|
|
4604
|
+
platform: "ethereum";
|
|
4605
|
+
} | {
|
|
4606
|
+
id: string;
|
|
4607
|
+
networkId: string;
|
|
4608
|
+
isDefault?: boolean | undefined;
|
|
4609
|
+
decimals: number;
|
|
4610
|
+
symbol: string;
|
|
4611
|
+
name?: string | undefined;
|
|
4612
|
+
logo?: string | undefined;
|
|
4613
|
+
coingeckoId?: string | undefined;
|
|
4614
|
+
noDiscovery?: boolean | undefined;
|
|
4615
|
+
mirrorOf?: string | undefined;
|
|
4616
|
+
type: "evm-uniswapv2";
|
|
4617
|
+
platform: "ethereum";
|
|
4618
|
+
contractAddress: `0x${string}`;
|
|
4619
|
+
isCustom?: boolean | undefined;
|
|
4620
|
+
symbol0: string;
|
|
4621
|
+
symbol1: string;
|
|
4622
|
+
decimals0: number;
|
|
4623
|
+
decimals1: number;
|
|
4624
|
+
tokenAddress0: `0x${string}`;
|
|
4625
|
+
tokenAddress1: `0x${string}`;
|
|
4626
|
+
coingeckoId0?: string | undefined;
|
|
4627
|
+
coingeckoId1?: string | undefined;
|
|
4628
|
+
} | {
|
|
4629
|
+
id: string;
|
|
4630
|
+
networkId: string;
|
|
4631
|
+
isDefault?: boolean | undefined;
|
|
4632
|
+
decimals: number;
|
|
4633
|
+
symbol: string;
|
|
4634
|
+
name?: string | undefined;
|
|
4635
|
+
logo?: string | undefined;
|
|
4636
|
+
coingeckoId?: string | undefined;
|
|
4637
|
+
noDiscovery?: boolean | undefined;
|
|
4638
|
+
mirrorOf?: string | undefined;
|
|
4639
|
+
type: "substrate-assets";
|
|
4640
|
+
platform: "polkadot";
|
|
4641
|
+
assetId: string;
|
|
4642
|
+
isFrozen?: boolean | undefined;
|
|
4643
|
+
isSufficient: boolean;
|
|
4644
|
+
existentialDeposit: string;
|
|
4645
|
+
} | {
|
|
4646
|
+
id: string;
|
|
4647
|
+
networkId: string;
|
|
4648
|
+
isDefault?: boolean | undefined;
|
|
4649
|
+
decimals: number;
|
|
4650
|
+
symbol: string;
|
|
4651
|
+
name?: string | undefined;
|
|
4652
|
+
logo?: string | undefined;
|
|
4653
|
+
coingeckoId?: string | undefined;
|
|
4654
|
+
noDiscovery?: boolean | undefined;
|
|
4655
|
+
mirrorOf?: string | undefined;
|
|
4656
|
+
type: "substrate-dtao";
|
|
4657
|
+
platform: "polkadot";
|
|
4658
|
+
netuid: number;
|
|
4659
|
+
subnetName?: string | undefined;
|
|
4660
|
+
hotkey?: string | undefined;
|
|
4661
|
+
isTransferable: boolean;
|
|
4662
|
+
} | {
|
|
4663
|
+
id: string;
|
|
4664
|
+
networkId: string;
|
|
4665
|
+
isDefault?: boolean | undefined;
|
|
4666
|
+
decimals: number;
|
|
4667
|
+
symbol: string;
|
|
4668
|
+
name?: string | undefined;
|
|
4669
|
+
logo?: string | undefined;
|
|
4670
|
+
coingeckoId?: string | undefined;
|
|
4671
|
+
noDiscovery?: boolean | undefined;
|
|
4672
|
+
mirrorOf?: string | undefined;
|
|
4673
|
+
type: "substrate-foreignassets";
|
|
4674
|
+
platform: "polkadot";
|
|
4675
|
+
onChainId: string;
|
|
4676
|
+
isFrozen?: boolean | undefined;
|
|
4677
|
+
isSufficient: boolean;
|
|
4678
|
+
existentialDeposit: string;
|
|
4679
|
+
} | {
|
|
4680
|
+
id: string;
|
|
4681
|
+
networkId: string;
|
|
4682
|
+
isDefault?: boolean | undefined;
|
|
4683
|
+
decimals: number;
|
|
4684
|
+
symbol: string;
|
|
4685
|
+
name?: string | undefined;
|
|
4686
|
+
logo?: string | undefined;
|
|
4687
|
+
coingeckoId?: string | undefined;
|
|
4688
|
+
noDiscovery?: boolean | undefined;
|
|
4689
|
+
mirrorOf?: string | undefined;
|
|
4690
|
+
type: "substrate-native";
|
|
4691
|
+
platform: "polkadot";
|
|
4692
|
+
existentialDeposit: string;
|
|
4693
|
+
} | {
|
|
4694
|
+
id: string;
|
|
4695
|
+
networkId: string;
|
|
4696
|
+
isDefault?: boolean | undefined;
|
|
4697
|
+
decimals: number;
|
|
4698
|
+
symbol: string;
|
|
4699
|
+
name?: string | undefined;
|
|
4700
|
+
logo?: string | undefined;
|
|
4701
|
+
coingeckoId?: string | undefined;
|
|
4702
|
+
noDiscovery?: boolean | undefined;
|
|
4703
|
+
mirrorOf?: string | undefined;
|
|
4704
|
+
type: "substrate-psp22";
|
|
4705
|
+
platform: "polkadot";
|
|
4706
|
+
contractAddress: string;
|
|
4707
|
+
} | {
|
|
4708
|
+
id: string;
|
|
4709
|
+
networkId: string;
|
|
4710
|
+
isDefault?: boolean | undefined;
|
|
4711
|
+
decimals: number;
|
|
4712
|
+
symbol: string;
|
|
4713
|
+
name?: string | undefined;
|
|
4714
|
+
logo?: string | undefined;
|
|
4715
|
+
coingeckoId?: string | undefined;
|
|
4716
|
+
noDiscovery?: boolean | undefined;
|
|
4717
|
+
mirrorOf?: string | undefined;
|
|
4718
|
+
type: "substrate-tokens";
|
|
4719
|
+
platform: "polkadot";
|
|
4720
|
+
onChainId: string | number;
|
|
4721
|
+
existentialDeposit: string;
|
|
4722
|
+
} | {
|
|
4723
|
+
id: string;
|
|
4724
|
+
networkId: string;
|
|
4725
|
+
isDefault?: boolean | undefined;
|
|
4726
|
+
decimals: number;
|
|
4727
|
+
symbol: string;
|
|
4728
|
+
name?: string | undefined;
|
|
4729
|
+
logo?: string | undefined;
|
|
4730
|
+
coingeckoId?: string | undefined;
|
|
4731
|
+
noDiscovery?: boolean | undefined;
|
|
4732
|
+
mirrorOf?: string | undefined;
|
|
4733
|
+
type: "substrate-hydration";
|
|
4734
|
+
platform: "polkadot";
|
|
4735
|
+
onChainId: number;
|
|
4736
|
+
assetType: "Erc20" | "External" | "Token";
|
|
4737
|
+
isSufficient: boolean;
|
|
4738
|
+
existentialDeposit: string;
|
|
4739
|
+
} | {
|
|
4740
|
+
id: string;
|
|
4741
|
+
networkId: string;
|
|
4742
|
+
isDefault?: boolean | undefined;
|
|
4743
|
+
decimals: number;
|
|
4744
|
+
symbol: string;
|
|
4745
|
+
name?: string | undefined;
|
|
4746
|
+
logo?: string | undefined;
|
|
4747
|
+
coingeckoId?: string | undefined;
|
|
4748
|
+
noDiscovery?: boolean | undefined;
|
|
4749
|
+
mirrorOf?: string | undefined;
|
|
4750
|
+
type: "sol-native";
|
|
4751
|
+
platform: "solana";
|
|
4752
|
+
} | {
|
|
4753
|
+
id: string;
|
|
4754
|
+
networkId: string;
|
|
4755
|
+
isDefault?: boolean | undefined;
|
|
4756
|
+
decimals: number;
|
|
4757
|
+
symbol: string;
|
|
4758
|
+
name?: string | undefined;
|
|
4759
|
+
logo?: string | undefined;
|
|
4760
|
+
coingeckoId?: string | undefined;
|
|
4761
|
+
noDiscovery?: boolean | undefined;
|
|
4762
|
+
mirrorOf?: string | undefined;
|
|
4763
|
+
type: "sol-token2022";
|
|
4764
|
+
platform: "solana";
|
|
4765
|
+
mintAddress: string;
|
|
4766
|
+
isTransferable?: boolean | undefined;
|
|
4767
|
+
})[];
|
|
4768
|
+
miniMetadatas: {
|
|
4769
|
+
id: string;
|
|
4770
|
+
source: string;
|
|
4771
|
+
chainId: string;
|
|
4772
|
+
specVersion: number;
|
|
4773
|
+
version: string;
|
|
4774
|
+
data: `0x${string}` | null;
|
|
4775
|
+
extra: any;
|
|
4776
|
+
}[];
|
|
4777
|
+
}>;
|
|
4778
|
+
//#endregion
|
|
4410
4779
|
//#region src/util.d.ts
|
|
4411
4780
|
type KNOWN_TOKEN_ID = "uniswap";
|
|
4412
4781
|
export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
@@ -4418,5 +4787,5 @@ export declare const getGithubTokenLogoUrl: (tokenId: KNOWN_TOKEN_ID) => string;
|
|
|
4418
4787
|
export declare const getGithubTokenLogoUrlByCoingeckoId: (coingeckoId: string) => string;
|
|
4419
4788
|
export declare const getGithubBittensorHotkeyAssetUrl: (fileName: string) => string;
|
|
4420
4789
|
//#endregion
|
|
4421
|
-
export type { Chaindata, CustomChaindata };
|
|
4790
|
+
export type { Chaindata, ChaindataFile, CustomChaindata };
|
|
4422
4791
|
//# sourceMappingURL=index.d.ts.map
|