@talismn/balances-react 0.0.0-pr2111-20250724010635 → 0.0.0-pr2116-20250725042328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/src/atoms/chaindata.d.ts +91 -150
- package/dist/declarations/src/hooks/useChaindata.d.ts +709 -8
- package/dist/talismn-balances-react.cjs.dev.js +33 -24
- package/dist/talismn-balances-react.cjs.prod.js +33 -24
- package/dist/talismn-balances-react.esm.js +34 -21
- package/package.json +7 -7
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NetworkList, TokenList } from "@talismn/chaindata-provider";
|
|
2
1
|
export declare const chaindataAtom: import("jotai").Atom<{
|
|
3
2
|
networks: ({
|
|
4
3
|
id: string;
|
|
@@ -474,154 +473,6 @@ export declare const chaindataAtom: import("jotai").Atom<{
|
|
|
474
473
|
mirrorOf?: string | undefined;
|
|
475
474
|
})[];
|
|
476
475
|
}>>;
|
|
477
|
-
export declare const networksAtom: import("jotai").Atom<Promise<({
|
|
478
|
-
id: string;
|
|
479
|
-
name: string;
|
|
480
|
-
nativeTokenId: string;
|
|
481
|
-
nativeCurrency: {
|
|
482
|
-
decimals: number;
|
|
483
|
-
symbol: string;
|
|
484
|
-
name: string;
|
|
485
|
-
coingeckoId?: string | undefined;
|
|
486
|
-
mirrorOf?: string | undefined;
|
|
487
|
-
logo?: string | undefined;
|
|
488
|
-
};
|
|
489
|
-
blockExplorerUrls: string[];
|
|
490
|
-
genesisHash: `0x${string}`;
|
|
491
|
-
platform: "polkadot";
|
|
492
|
-
chainName: string;
|
|
493
|
-
specName: string;
|
|
494
|
-
specVersion: number;
|
|
495
|
-
account: "secp256k1" | "*25519";
|
|
496
|
-
prefix: number;
|
|
497
|
-
rpcs: string[];
|
|
498
|
-
topology: {
|
|
499
|
-
type: "standalone";
|
|
500
|
-
} | {
|
|
501
|
-
type: "relay";
|
|
502
|
-
} | {
|
|
503
|
-
type: "parachain";
|
|
504
|
-
relayId: string;
|
|
505
|
-
paraId: number;
|
|
506
|
-
};
|
|
507
|
-
isTestnet?: boolean | undefined;
|
|
508
|
-
isDefault?: boolean | undefined;
|
|
509
|
-
forceScan?: boolean | undefined;
|
|
510
|
-
logo?: string | undefined;
|
|
511
|
-
themeColor?: string | undefined;
|
|
512
|
-
chainspecQrUrl?: string | undefined;
|
|
513
|
-
latestMetadataQrUrl?: string | undefined;
|
|
514
|
-
oldPrefix?: number | undefined;
|
|
515
|
-
registryTypes?: any;
|
|
516
|
-
signedExtensions?: any;
|
|
517
|
-
hasCheckMetadataHash?: boolean | undefined;
|
|
518
|
-
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
519
|
-
isUnknownFeeToken?: boolean | undefined;
|
|
520
|
-
balancesConfig?: {
|
|
521
|
-
"substrate-native"?: {
|
|
522
|
-
disable?: boolean | undefined;
|
|
523
|
-
} | undefined;
|
|
524
|
-
"substrate-assets"?: undefined;
|
|
525
|
-
"substrate-psp22"?: undefined;
|
|
526
|
-
"substrate-tokens"?: {
|
|
527
|
-
palletId?: string | undefined;
|
|
528
|
-
} | undefined;
|
|
529
|
-
"substrate-foreignassets"?: undefined;
|
|
530
|
-
"substrate-hydration"?: undefined;
|
|
531
|
-
} | undefined;
|
|
532
|
-
} | {
|
|
533
|
-
id: string;
|
|
534
|
-
name: string;
|
|
535
|
-
nativeTokenId: string;
|
|
536
|
-
nativeCurrency: {
|
|
537
|
-
decimals: number;
|
|
538
|
-
symbol: string;
|
|
539
|
-
name: string;
|
|
540
|
-
coingeckoId?: string | undefined;
|
|
541
|
-
mirrorOf?: string | undefined;
|
|
542
|
-
logo?: string | undefined;
|
|
543
|
-
};
|
|
544
|
-
blockExplorerUrls: string[];
|
|
545
|
-
platform: "ethereum";
|
|
546
|
-
rpcs: string[];
|
|
547
|
-
isTestnet?: boolean | undefined;
|
|
548
|
-
isDefault?: boolean | undefined;
|
|
549
|
-
forceScan?: boolean | undefined;
|
|
550
|
-
logo?: string | undefined;
|
|
551
|
-
themeColor?: string | undefined;
|
|
552
|
-
substrateChainId?: string | undefined;
|
|
553
|
-
preserveGasEstimate?: boolean | undefined;
|
|
554
|
-
feeType?: "legacy" | "eip-1559" | undefined;
|
|
555
|
-
l2FeeType?: {
|
|
556
|
-
type: "op-stack";
|
|
557
|
-
} | {
|
|
558
|
-
type: "scroll";
|
|
559
|
-
l1GasPriceOracle: `0x${string}`;
|
|
560
|
-
} | undefined;
|
|
561
|
-
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
|
562
|
-
balancesConfig?: {
|
|
563
|
-
"evm-native"?: undefined;
|
|
564
|
-
"evm-erc20"?: undefined;
|
|
565
|
-
"evm-uniswapv2"?: undefined;
|
|
566
|
-
} | undefined;
|
|
567
|
-
})[]>>;
|
|
568
|
-
export declare const networksByIdAtom: import("jotai").Atom<Promise<NetworkList>>;
|
|
569
|
-
export declare const dotNetworksByGenesisHashAtom: import("jotai").Atom<Promise<Record<string, {
|
|
570
|
-
id: string;
|
|
571
|
-
name: string;
|
|
572
|
-
nativeTokenId: string;
|
|
573
|
-
nativeCurrency: {
|
|
574
|
-
decimals: number;
|
|
575
|
-
symbol: string;
|
|
576
|
-
name: string;
|
|
577
|
-
coingeckoId?: string | undefined;
|
|
578
|
-
mirrorOf?: string | undefined;
|
|
579
|
-
logo?: string | undefined;
|
|
580
|
-
};
|
|
581
|
-
blockExplorerUrls: string[];
|
|
582
|
-
genesisHash: `0x${string}`;
|
|
583
|
-
platform: "polkadot";
|
|
584
|
-
chainName: string;
|
|
585
|
-
specName: string;
|
|
586
|
-
specVersion: number;
|
|
587
|
-
account: "secp256k1" | "*25519";
|
|
588
|
-
prefix: number;
|
|
589
|
-
rpcs: string[];
|
|
590
|
-
topology: {
|
|
591
|
-
type: "standalone";
|
|
592
|
-
} | {
|
|
593
|
-
type: "relay";
|
|
594
|
-
} | {
|
|
595
|
-
type: "parachain";
|
|
596
|
-
relayId: string;
|
|
597
|
-
paraId: number;
|
|
598
|
-
};
|
|
599
|
-
isTestnet?: boolean | undefined;
|
|
600
|
-
isDefault?: boolean | undefined;
|
|
601
|
-
forceScan?: boolean | undefined;
|
|
602
|
-
logo?: string | undefined;
|
|
603
|
-
themeColor?: string | undefined;
|
|
604
|
-
chainspecQrUrl?: string | undefined;
|
|
605
|
-
latestMetadataQrUrl?: string | undefined;
|
|
606
|
-
oldPrefix?: number | undefined;
|
|
607
|
-
registryTypes?: any;
|
|
608
|
-
signedExtensions?: any;
|
|
609
|
-
hasCheckMetadataHash?: boolean | undefined;
|
|
610
|
-
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
611
|
-
isUnknownFeeToken?: boolean | undefined;
|
|
612
|
-
balancesConfig?: {
|
|
613
|
-
"substrate-native"?: {
|
|
614
|
-
disable?: boolean | undefined;
|
|
615
|
-
} | undefined;
|
|
616
|
-
"substrate-assets"?: undefined;
|
|
617
|
-
"substrate-psp22"?: undefined;
|
|
618
|
-
"substrate-tokens"?: {
|
|
619
|
-
palletId?: string | undefined;
|
|
620
|
-
} | undefined;
|
|
621
|
-
"substrate-foreignassets"?: undefined;
|
|
622
|
-
"substrate-hydration"?: undefined;
|
|
623
|
-
} | undefined;
|
|
624
|
-
}>>>;
|
|
625
476
|
export declare const tokensAtom: import("jotai").Atom<Promise<({
|
|
626
477
|
id: string;
|
|
627
478
|
networkId: string;
|
|
@@ -767,4 +618,94 @@ export declare const tokensAtom: import("jotai").Atom<Promise<({
|
|
|
767
618
|
noDiscovery?: boolean | undefined;
|
|
768
619
|
mirrorOf?: string | undefined;
|
|
769
620
|
})[]>>;
|
|
770
|
-
export declare const
|
|
621
|
+
export declare const networksAtom: import("jotai").Atom<Promise<({
|
|
622
|
+
id: string;
|
|
623
|
+
name: string;
|
|
624
|
+
nativeTokenId: string;
|
|
625
|
+
nativeCurrency: {
|
|
626
|
+
decimals: number;
|
|
627
|
+
symbol: string;
|
|
628
|
+
name: string;
|
|
629
|
+
coingeckoId?: string | undefined;
|
|
630
|
+
mirrorOf?: string | undefined;
|
|
631
|
+
logo?: string | undefined;
|
|
632
|
+
};
|
|
633
|
+
blockExplorerUrls: string[];
|
|
634
|
+
genesisHash: `0x${string}`;
|
|
635
|
+
platform: "polkadot";
|
|
636
|
+
chainName: string;
|
|
637
|
+
specName: string;
|
|
638
|
+
specVersion: number;
|
|
639
|
+
account: "secp256k1" | "*25519";
|
|
640
|
+
prefix: number;
|
|
641
|
+
rpcs: string[];
|
|
642
|
+
topology: {
|
|
643
|
+
type: "standalone";
|
|
644
|
+
} | {
|
|
645
|
+
type: "relay";
|
|
646
|
+
} | {
|
|
647
|
+
type: "parachain";
|
|
648
|
+
relayId: string;
|
|
649
|
+
paraId: number;
|
|
650
|
+
};
|
|
651
|
+
isTestnet?: boolean | undefined;
|
|
652
|
+
isDefault?: boolean | undefined;
|
|
653
|
+
forceScan?: boolean | undefined;
|
|
654
|
+
logo?: string | undefined;
|
|
655
|
+
themeColor?: string | undefined;
|
|
656
|
+
chainspecQrUrl?: string | undefined;
|
|
657
|
+
latestMetadataQrUrl?: string | undefined;
|
|
658
|
+
oldPrefix?: number | undefined;
|
|
659
|
+
registryTypes?: any;
|
|
660
|
+
signedExtensions?: any;
|
|
661
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
662
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
663
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
664
|
+
balancesConfig?: {
|
|
665
|
+
"substrate-native"?: {
|
|
666
|
+
disable?: boolean | undefined;
|
|
667
|
+
} | undefined;
|
|
668
|
+
"substrate-assets"?: undefined;
|
|
669
|
+
"substrate-psp22"?: undefined;
|
|
670
|
+
"substrate-tokens"?: {
|
|
671
|
+
palletId?: string | undefined;
|
|
672
|
+
} | undefined;
|
|
673
|
+
"substrate-foreignassets"?: undefined;
|
|
674
|
+
"substrate-hydration"?: undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
} | {
|
|
677
|
+
id: string;
|
|
678
|
+
name: string;
|
|
679
|
+
nativeTokenId: string;
|
|
680
|
+
nativeCurrency: {
|
|
681
|
+
decimals: number;
|
|
682
|
+
symbol: string;
|
|
683
|
+
name: string;
|
|
684
|
+
coingeckoId?: string | undefined;
|
|
685
|
+
mirrorOf?: string | undefined;
|
|
686
|
+
logo?: string | undefined;
|
|
687
|
+
};
|
|
688
|
+
blockExplorerUrls: string[];
|
|
689
|
+
platform: "ethereum";
|
|
690
|
+
rpcs: string[];
|
|
691
|
+
isTestnet?: boolean | undefined;
|
|
692
|
+
isDefault?: boolean | undefined;
|
|
693
|
+
forceScan?: boolean | undefined;
|
|
694
|
+
logo?: string | undefined;
|
|
695
|
+
themeColor?: string | undefined;
|
|
696
|
+
substrateChainId?: string | undefined;
|
|
697
|
+
preserveGasEstimate?: boolean | undefined;
|
|
698
|
+
feeType?: "legacy" | "eip-1559" | undefined;
|
|
699
|
+
l2FeeType?: {
|
|
700
|
+
type: "op-stack";
|
|
701
|
+
} | {
|
|
702
|
+
type: "scroll";
|
|
703
|
+
l1GasPriceOracle: `0x${string}`;
|
|
704
|
+
} | undefined;
|
|
705
|
+
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
|
706
|
+
balancesConfig?: {
|
|
707
|
+
"evm-native"?: undefined;
|
|
708
|
+
"evm-erc20"?: undefined;
|
|
709
|
+
"evm-uniswapv2"?: undefined;
|
|
710
|
+
} | undefined;
|
|
711
|
+
})[]>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NetworkId, TokenId } from "@talismn/chaindata-provider";
|
|
2
2
|
export declare const useChaindataProvider: () => import("@talismn/chaindata-provider").ChaindataProvider;
|
|
3
3
|
export declare const useChaindata: () => {
|
|
4
4
|
networks: ({
|
|
@@ -238,10 +238,711 @@ export declare const useChaindata: () => {
|
|
|
238
238
|
mirrorOf?: string | undefined;
|
|
239
239
|
})[];
|
|
240
240
|
};
|
|
241
|
-
export declare const useNetworks: () =>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
241
|
+
export declare const useNetworks: () => ({
|
|
242
|
+
id: string;
|
|
243
|
+
name: string;
|
|
244
|
+
nativeTokenId: string;
|
|
245
|
+
nativeCurrency: {
|
|
246
|
+
decimals: number;
|
|
247
|
+
symbol: string;
|
|
248
|
+
name: string;
|
|
249
|
+
coingeckoId?: string | undefined;
|
|
250
|
+
mirrorOf?: string | undefined;
|
|
251
|
+
logo?: string | undefined;
|
|
252
|
+
};
|
|
253
|
+
blockExplorerUrls: string[];
|
|
254
|
+
genesisHash: `0x${string}`;
|
|
255
|
+
platform: "polkadot";
|
|
256
|
+
chainName: string;
|
|
257
|
+
specName: string;
|
|
258
|
+
specVersion: number;
|
|
259
|
+
account: "secp256k1" | "*25519";
|
|
260
|
+
prefix: number;
|
|
261
|
+
rpcs: string[];
|
|
262
|
+
topology: {
|
|
263
|
+
type: "standalone";
|
|
264
|
+
} | {
|
|
265
|
+
type: "relay";
|
|
266
|
+
} | {
|
|
267
|
+
type: "parachain";
|
|
268
|
+
relayId: string;
|
|
269
|
+
paraId: number;
|
|
270
|
+
};
|
|
271
|
+
isTestnet?: boolean | undefined;
|
|
272
|
+
isDefault?: boolean | undefined;
|
|
273
|
+
forceScan?: boolean | undefined;
|
|
274
|
+
logo?: string | undefined;
|
|
275
|
+
themeColor?: string | undefined;
|
|
276
|
+
chainspecQrUrl?: string | undefined;
|
|
277
|
+
latestMetadataQrUrl?: string | undefined;
|
|
278
|
+
oldPrefix?: number | undefined;
|
|
279
|
+
registryTypes?: any;
|
|
280
|
+
signedExtensions?: any;
|
|
281
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
282
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
283
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
284
|
+
balancesConfig?: {
|
|
285
|
+
"substrate-native"?: {
|
|
286
|
+
disable?: boolean | undefined;
|
|
287
|
+
} | undefined;
|
|
288
|
+
"substrate-assets"?: undefined;
|
|
289
|
+
"substrate-psp22"?: undefined;
|
|
290
|
+
"substrate-tokens"?: {
|
|
291
|
+
palletId?: string | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
"substrate-foreignassets"?: undefined;
|
|
294
|
+
"substrate-hydration"?: undefined;
|
|
295
|
+
} | undefined;
|
|
296
|
+
} | {
|
|
297
|
+
id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
nativeTokenId: string;
|
|
300
|
+
nativeCurrency: {
|
|
301
|
+
decimals: number;
|
|
302
|
+
symbol: string;
|
|
303
|
+
name: string;
|
|
304
|
+
coingeckoId?: string | undefined;
|
|
305
|
+
mirrorOf?: string | undefined;
|
|
306
|
+
logo?: string | undefined;
|
|
307
|
+
};
|
|
308
|
+
blockExplorerUrls: string[];
|
|
309
|
+
platform: "ethereum";
|
|
310
|
+
rpcs: string[];
|
|
311
|
+
isTestnet?: boolean | undefined;
|
|
312
|
+
isDefault?: boolean | undefined;
|
|
313
|
+
forceScan?: boolean | undefined;
|
|
314
|
+
logo?: string | undefined;
|
|
315
|
+
themeColor?: string | undefined;
|
|
316
|
+
substrateChainId?: string | undefined;
|
|
317
|
+
preserveGasEstimate?: boolean | undefined;
|
|
318
|
+
feeType?: "legacy" | "eip-1559" | undefined;
|
|
319
|
+
l2FeeType?: {
|
|
320
|
+
type: "op-stack";
|
|
321
|
+
} | {
|
|
322
|
+
type: "scroll";
|
|
323
|
+
l1GasPriceOracle: `0x${string}`;
|
|
324
|
+
} | undefined;
|
|
325
|
+
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
|
326
|
+
balancesConfig?: {
|
|
327
|
+
"evm-native"?: undefined;
|
|
328
|
+
"evm-erc20"?: undefined;
|
|
329
|
+
"evm-uniswapv2"?: undefined;
|
|
330
|
+
} | undefined;
|
|
331
|
+
})[];
|
|
332
|
+
export declare const useNetworksById: () => import("lodash").Dictionary<{
|
|
333
|
+
id: string;
|
|
334
|
+
name: string;
|
|
335
|
+
nativeTokenId: string;
|
|
336
|
+
nativeCurrency: {
|
|
337
|
+
decimals: number;
|
|
338
|
+
symbol: string;
|
|
339
|
+
name: string;
|
|
340
|
+
coingeckoId?: string | undefined;
|
|
341
|
+
mirrorOf?: string | undefined;
|
|
342
|
+
logo?: string | undefined;
|
|
343
|
+
};
|
|
344
|
+
blockExplorerUrls: string[];
|
|
345
|
+
genesisHash: `0x${string}`;
|
|
346
|
+
platform: "polkadot";
|
|
347
|
+
chainName: string;
|
|
348
|
+
specName: string;
|
|
349
|
+
specVersion: number;
|
|
350
|
+
account: "secp256k1" | "*25519";
|
|
351
|
+
prefix: number;
|
|
352
|
+
rpcs: string[];
|
|
353
|
+
topology: {
|
|
354
|
+
type: "standalone";
|
|
355
|
+
} | {
|
|
356
|
+
type: "relay";
|
|
357
|
+
} | {
|
|
358
|
+
type: "parachain";
|
|
359
|
+
relayId: string;
|
|
360
|
+
paraId: number;
|
|
361
|
+
};
|
|
362
|
+
isTestnet?: boolean | undefined;
|
|
363
|
+
isDefault?: boolean | undefined;
|
|
364
|
+
forceScan?: boolean | undefined;
|
|
365
|
+
logo?: string | undefined;
|
|
366
|
+
themeColor?: string | undefined;
|
|
367
|
+
chainspecQrUrl?: string | undefined;
|
|
368
|
+
latestMetadataQrUrl?: string | undefined;
|
|
369
|
+
oldPrefix?: number | undefined;
|
|
370
|
+
registryTypes?: any;
|
|
371
|
+
signedExtensions?: any;
|
|
372
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
373
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
374
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
375
|
+
balancesConfig?: {
|
|
376
|
+
"substrate-native"?: {
|
|
377
|
+
disable?: boolean | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
"substrate-assets"?: undefined;
|
|
380
|
+
"substrate-psp22"?: undefined;
|
|
381
|
+
"substrate-tokens"?: {
|
|
382
|
+
palletId?: string | undefined;
|
|
383
|
+
} | undefined;
|
|
384
|
+
"substrate-foreignassets"?: undefined;
|
|
385
|
+
"substrate-hydration"?: undefined;
|
|
386
|
+
} | undefined;
|
|
387
|
+
} | {
|
|
388
|
+
id: string;
|
|
389
|
+
name: string;
|
|
390
|
+
nativeTokenId: string;
|
|
391
|
+
nativeCurrency: {
|
|
392
|
+
decimals: number;
|
|
393
|
+
symbol: string;
|
|
394
|
+
name: string;
|
|
395
|
+
coingeckoId?: string | undefined;
|
|
396
|
+
mirrorOf?: string | undefined;
|
|
397
|
+
logo?: string | undefined;
|
|
398
|
+
};
|
|
399
|
+
blockExplorerUrls: string[];
|
|
400
|
+
platform: "ethereum";
|
|
401
|
+
rpcs: string[];
|
|
402
|
+
isTestnet?: boolean | undefined;
|
|
403
|
+
isDefault?: boolean | undefined;
|
|
404
|
+
forceScan?: boolean | undefined;
|
|
405
|
+
logo?: string | undefined;
|
|
406
|
+
themeColor?: string | undefined;
|
|
407
|
+
substrateChainId?: string | undefined;
|
|
408
|
+
preserveGasEstimate?: boolean | undefined;
|
|
409
|
+
feeType?: "legacy" | "eip-1559" | undefined;
|
|
410
|
+
l2FeeType?: {
|
|
411
|
+
type: "op-stack";
|
|
412
|
+
} | {
|
|
413
|
+
type: "scroll";
|
|
414
|
+
l1GasPriceOracle: `0x${string}`;
|
|
415
|
+
} | undefined;
|
|
416
|
+
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
|
417
|
+
balancesConfig?: {
|
|
418
|
+
"evm-native"?: undefined;
|
|
419
|
+
"evm-erc20"?: undefined;
|
|
420
|
+
"evm-uniswapv2"?: undefined;
|
|
421
|
+
} | undefined;
|
|
422
|
+
}>;
|
|
423
|
+
export declare const useNetwork: (networkId?: NetworkId) => {
|
|
424
|
+
id: string;
|
|
425
|
+
name: string;
|
|
426
|
+
nativeTokenId: string;
|
|
427
|
+
nativeCurrency: {
|
|
428
|
+
decimals: number;
|
|
429
|
+
symbol: string;
|
|
430
|
+
name: string;
|
|
431
|
+
coingeckoId?: string | undefined;
|
|
432
|
+
mirrorOf?: string | undefined;
|
|
433
|
+
logo?: string | undefined;
|
|
434
|
+
};
|
|
435
|
+
blockExplorerUrls: string[];
|
|
436
|
+
genesisHash: `0x${string}`;
|
|
437
|
+
platform: "polkadot";
|
|
438
|
+
chainName: string;
|
|
439
|
+
specName: string;
|
|
440
|
+
specVersion: number;
|
|
441
|
+
account: "secp256k1" | "*25519";
|
|
442
|
+
prefix: number;
|
|
443
|
+
rpcs: string[];
|
|
444
|
+
topology: {
|
|
445
|
+
type: "standalone";
|
|
446
|
+
} | {
|
|
447
|
+
type: "relay";
|
|
448
|
+
} | {
|
|
449
|
+
type: "parachain";
|
|
450
|
+
relayId: string;
|
|
451
|
+
paraId: number;
|
|
452
|
+
};
|
|
453
|
+
isTestnet?: boolean | undefined;
|
|
454
|
+
isDefault?: boolean | undefined;
|
|
455
|
+
forceScan?: boolean | undefined;
|
|
456
|
+
logo?: string | undefined;
|
|
457
|
+
themeColor?: string | undefined;
|
|
458
|
+
chainspecQrUrl?: string | undefined;
|
|
459
|
+
latestMetadataQrUrl?: string | undefined;
|
|
460
|
+
oldPrefix?: number | undefined;
|
|
461
|
+
registryTypes?: any;
|
|
462
|
+
signedExtensions?: any;
|
|
463
|
+
hasCheckMetadataHash?: boolean | undefined;
|
|
464
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
|
465
|
+
isUnknownFeeToken?: boolean | undefined;
|
|
466
|
+
balancesConfig?: {
|
|
467
|
+
"substrate-native"?: {
|
|
468
|
+
disable?: boolean | undefined;
|
|
469
|
+
} | undefined;
|
|
470
|
+
"substrate-assets"?: undefined;
|
|
471
|
+
"substrate-psp22"?: undefined;
|
|
472
|
+
"substrate-tokens"?: {
|
|
473
|
+
palletId?: string | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
"substrate-foreignassets"?: undefined;
|
|
476
|
+
"substrate-hydration"?: undefined;
|
|
477
|
+
} | undefined;
|
|
478
|
+
} | {
|
|
479
|
+
id: string;
|
|
480
|
+
name: string;
|
|
481
|
+
nativeTokenId: string;
|
|
482
|
+
nativeCurrency: {
|
|
483
|
+
decimals: number;
|
|
484
|
+
symbol: string;
|
|
485
|
+
name: string;
|
|
486
|
+
coingeckoId?: string | undefined;
|
|
487
|
+
mirrorOf?: string | undefined;
|
|
488
|
+
logo?: string | undefined;
|
|
489
|
+
};
|
|
490
|
+
blockExplorerUrls: string[];
|
|
491
|
+
platform: "ethereum";
|
|
492
|
+
rpcs: string[];
|
|
493
|
+
isTestnet?: boolean | undefined;
|
|
494
|
+
isDefault?: boolean | undefined;
|
|
495
|
+
forceScan?: boolean | undefined;
|
|
496
|
+
logo?: string | undefined;
|
|
497
|
+
themeColor?: string | undefined;
|
|
498
|
+
substrateChainId?: string | undefined;
|
|
499
|
+
preserveGasEstimate?: boolean | undefined;
|
|
500
|
+
feeType?: "legacy" | "eip-1559" | undefined;
|
|
501
|
+
l2FeeType?: {
|
|
502
|
+
type: "op-stack";
|
|
503
|
+
} | {
|
|
504
|
+
type: "scroll";
|
|
505
|
+
l1GasPriceOracle: `0x${string}`;
|
|
506
|
+
} | undefined;
|
|
507
|
+
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
|
508
|
+
balancesConfig?: {
|
|
509
|
+
"evm-native"?: undefined;
|
|
510
|
+
"evm-erc20"?: undefined;
|
|
511
|
+
"evm-uniswapv2"?: undefined;
|
|
512
|
+
} | undefined;
|
|
513
|
+
};
|
|
514
|
+
export declare const useTokens: () => ({
|
|
515
|
+
id: string;
|
|
516
|
+
networkId: string;
|
|
517
|
+
decimals: number;
|
|
518
|
+
symbol: string;
|
|
519
|
+
type: "evm-erc20";
|
|
520
|
+
platform: "ethereum";
|
|
521
|
+
contractAddress: `0x${string}`;
|
|
522
|
+
isDefault?: boolean | undefined;
|
|
523
|
+
name?: string | undefined;
|
|
524
|
+
logo?: string | undefined;
|
|
525
|
+
coingeckoId?: string | undefined;
|
|
526
|
+
noDiscovery?: boolean | undefined;
|
|
527
|
+
mirrorOf?: string | undefined;
|
|
528
|
+
} | {
|
|
529
|
+
id: string;
|
|
530
|
+
networkId: string;
|
|
531
|
+
decimals: number;
|
|
532
|
+
symbol: string;
|
|
533
|
+
type: "evm-native";
|
|
534
|
+
platform: "ethereum";
|
|
535
|
+
isDefault?: boolean | undefined;
|
|
536
|
+
name?: string | undefined;
|
|
537
|
+
logo?: string | undefined;
|
|
538
|
+
coingeckoId?: string | undefined;
|
|
539
|
+
noDiscovery?: boolean | undefined;
|
|
540
|
+
mirrorOf?: string | undefined;
|
|
541
|
+
} | {
|
|
542
|
+
id: string;
|
|
543
|
+
networkId: string;
|
|
544
|
+
decimals: number;
|
|
545
|
+
symbol: string;
|
|
546
|
+
type: "evm-uniswapv2";
|
|
547
|
+
platform: "ethereum";
|
|
548
|
+
contractAddress: `0x${string}`;
|
|
549
|
+
symbol0: string;
|
|
550
|
+
symbol1: string;
|
|
551
|
+
decimals0: number;
|
|
552
|
+
decimals1: number;
|
|
553
|
+
tokenAddress0: `0x${string}`;
|
|
554
|
+
tokenAddress1: `0x${string}`;
|
|
555
|
+
isDefault?: boolean | undefined;
|
|
556
|
+
name?: string | undefined;
|
|
557
|
+
logo?: string | undefined;
|
|
558
|
+
coingeckoId?: string | undefined;
|
|
559
|
+
noDiscovery?: boolean | undefined;
|
|
560
|
+
mirrorOf?: string | undefined;
|
|
561
|
+
isCustom?: boolean | undefined;
|
|
562
|
+
coingeckoId0?: string | undefined;
|
|
563
|
+
coingeckoId1?: string | undefined;
|
|
564
|
+
} | {
|
|
565
|
+
id: string;
|
|
566
|
+
networkId: string;
|
|
567
|
+
decimals: number;
|
|
568
|
+
symbol: string;
|
|
569
|
+
type: "substrate-assets";
|
|
570
|
+
platform: "polkadot";
|
|
571
|
+
assetId: string;
|
|
572
|
+
isSufficient: boolean;
|
|
573
|
+
existentialDeposit: string;
|
|
574
|
+
isDefault?: boolean | undefined;
|
|
575
|
+
name?: string | undefined;
|
|
576
|
+
logo?: string | undefined;
|
|
577
|
+
coingeckoId?: string | undefined;
|
|
578
|
+
noDiscovery?: boolean | undefined;
|
|
579
|
+
mirrorOf?: string | undefined;
|
|
580
|
+
isFrozen?: boolean | undefined;
|
|
581
|
+
} | {
|
|
582
|
+
id: string;
|
|
583
|
+
networkId: string;
|
|
584
|
+
decimals: number;
|
|
585
|
+
symbol: string;
|
|
586
|
+
type: "substrate-foreignassets";
|
|
587
|
+
platform: "polkadot";
|
|
588
|
+
onChainId: string;
|
|
589
|
+
isSufficient: boolean;
|
|
590
|
+
existentialDeposit: string;
|
|
591
|
+
isDefault?: boolean | undefined;
|
|
592
|
+
name?: string | undefined;
|
|
593
|
+
logo?: string | undefined;
|
|
594
|
+
coingeckoId?: string | undefined;
|
|
595
|
+
noDiscovery?: boolean | undefined;
|
|
596
|
+
mirrorOf?: string | undefined;
|
|
597
|
+
isFrozen?: boolean | undefined;
|
|
598
|
+
} | {
|
|
599
|
+
id: string;
|
|
600
|
+
networkId: string;
|
|
601
|
+
decimals: number;
|
|
602
|
+
symbol: string;
|
|
603
|
+
type: "substrate-native";
|
|
604
|
+
platform: "polkadot";
|
|
605
|
+
existentialDeposit: string;
|
|
606
|
+
isDefault?: boolean | undefined;
|
|
607
|
+
name?: string | undefined;
|
|
608
|
+
logo?: string | undefined;
|
|
609
|
+
coingeckoId?: string | undefined;
|
|
610
|
+
noDiscovery?: boolean | undefined;
|
|
611
|
+
mirrorOf?: string | undefined;
|
|
612
|
+
} | {
|
|
613
|
+
id: string;
|
|
614
|
+
networkId: string;
|
|
615
|
+
decimals: number;
|
|
616
|
+
symbol: string;
|
|
617
|
+
type: "substrate-psp22";
|
|
618
|
+
platform: "polkadot";
|
|
619
|
+
contractAddress: string;
|
|
620
|
+
isDefault?: boolean | undefined;
|
|
621
|
+
name?: string | undefined;
|
|
622
|
+
logo?: string | undefined;
|
|
623
|
+
coingeckoId?: string | undefined;
|
|
624
|
+
noDiscovery?: boolean | undefined;
|
|
625
|
+
mirrorOf?: string | undefined;
|
|
626
|
+
} | {
|
|
627
|
+
id: string;
|
|
628
|
+
networkId: string;
|
|
629
|
+
decimals: number;
|
|
630
|
+
symbol: string;
|
|
631
|
+
type: "substrate-tokens";
|
|
632
|
+
platform: "polkadot";
|
|
633
|
+
onChainId: string | number;
|
|
634
|
+
existentialDeposit: string;
|
|
635
|
+
isDefault?: boolean | undefined;
|
|
636
|
+
name?: string | undefined;
|
|
637
|
+
logo?: string | undefined;
|
|
638
|
+
coingeckoId?: string | undefined;
|
|
639
|
+
noDiscovery?: boolean | undefined;
|
|
640
|
+
mirrorOf?: string | undefined;
|
|
641
|
+
} | {
|
|
642
|
+
id: string;
|
|
643
|
+
networkId: string;
|
|
644
|
+
decimals: number;
|
|
645
|
+
symbol: string;
|
|
646
|
+
type: "substrate-hydration";
|
|
647
|
+
platform: "polkadot";
|
|
648
|
+
onChainId: number;
|
|
649
|
+
assetType: "Token" | "Erc20" | "External";
|
|
650
|
+
isSufficient: boolean;
|
|
651
|
+
existentialDeposit: string;
|
|
652
|
+
isDefault?: boolean | undefined;
|
|
653
|
+
name?: string | undefined;
|
|
654
|
+
logo?: string | undefined;
|
|
655
|
+
coingeckoId?: string | undefined;
|
|
656
|
+
noDiscovery?: boolean | undefined;
|
|
657
|
+
mirrorOf?: string | undefined;
|
|
658
|
+
})[];
|
|
659
|
+
export declare const useTokensById: () => import("lodash").Dictionary<{
|
|
660
|
+
id: string;
|
|
661
|
+
networkId: string;
|
|
662
|
+
decimals: number;
|
|
663
|
+
symbol: string;
|
|
664
|
+
type: "evm-erc20";
|
|
665
|
+
platform: "ethereum";
|
|
666
|
+
contractAddress: `0x${string}`;
|
|
667
|
+
isDefault?: boolean | undefined;
|
|
668
|
+
name?: string | undefined;
|
|
669
|
+
logo?: string | undefined;
|
|
670
|
+
coingeckoId?: string | undefined;
|
|
671
|
+
noDiscovery?: boolean | undefined;
|
|
672
|
+
mirrorOf?: string | undefined;
|
|
673
|
+
} | {
|
|
674
|
+
id: string;
|
|
675
|
+
networkId: string;
|
|
676
|
+
decimals: number;
|
|
677
|
+
symbol: string;
|
|
678
|
+
type: "evm-native";
|
|
679
|
+
platform: "ethereum";
|
|
680
|
+
isDefault?: boolean | undefined;
|
|
681
|
+
name?: string | undefined;
|
|
682
|
+
logo?: string | undefined;
|
|
683
|
+
coingeckoId?: string | undefined;
|
|
684
|
+
noDiscovery?: boolean | undefined;
|
|
685
|
+
mirrorOf?: string | undefined;
|
|
686
|
+
} | {
|
|
687
|
+
id: string;
|
|
688
|
+
networkId: string;
|
|
689
|
+
decimals: number;
|
|
690
|
+
symbol: string;
|
|
691
|
+
type: "evm-uniswapv2";
|
|
692
|
+
platform: "ethereum";
|
|
693
|
+
contractAddress: `0x${string}`;
|
|
694
|
+
symbol0: string;
|
|
695
|
+
symbol1: string;
|
|
696
|
+
decimals0: number;
|
|
697
|
+
decimals1: number;
|
|
698
|
+
tokenAddress0: `0x${string}`;
|
|
699
|
+
tokenAddress1: `0x${string}`;
|
|
700
|
+
isDefault?: boolean | undefined;
|
|
701
|
+
name?: string | undefined;
|
|
702
|
+
logo?: string | undefined;
|
|
703
|
+
coingeckoId?: string | undefined;
|
|
704
|
+
noDiscovery?: boolean | undefined;
|
|
705
|
+
mirrorOf?: string | undefined;
|
|
706
|
+
isCustom?: boolean | undefined;
|
|
707
|
+
coingeckoId0?: string | undefined;
|
|
708
|
+
coingeckoId1?: string | undefined;
|
|
709
|
+
} | {
|
|
710
|
+
id: string;
|
|
711
|
+
networkId: string;
|
|
712
|
+
decimals: number;
|
|
713
|
+
symbol: string;
|
|
714
|
+
type: "substrate-assets";
|
|
715
|
+
platform: "polkadot";
|
|
716
|
+
assetId: string;
|
|
717
|
+
isSufficient: boolean;
|
|
718
|
+
existentialDeposit: string;
|
|
719
|
+
isDefault?: boolean | undefined;
|
|
720
|
+
name?: string | undefined;
|
|
721
|
+
logo?: string | undefined;
|
|
722
|
+
coingeckoId?: string | undefined;
|
|
723
|
+
noDiscovery?: boolean | undefined;
|
|
724
|
+
mirrorOf?: string | undefined;
|
|
725
|
+
isFrozen?: boolean | undefined;
|
|
726
|
+
} | {
|
|
727
|
+
id: string;
|
|
728
|
+
networkId: string;
|
|
729
|
+
decimals: number;
|
|
730
|
+
symbol: string;
|
|
731
|
+
type: "substrate-foreignassets";
|
|
732
|
+
platform: "polkadot";
|
|
733
|
+
onChainId: string;
|
|
734
|
+
isSufficient: boolean;
|
|
735
|
+
existentialDeposit: string;
|
|
736
|
+
isDefault?: boolean | undefined;
|
|
737
|
+
name?: string | undefined;
|
|
738
|
+
logo?: string | undefined;
|
|
739
|
+
coingeckoId?: string | undefined;
|
|
740
|
+
noDiscovery?: boolean | undefined;
|
|
741
|
+
mirrorOf?: string | undefined;
|
|
742
|
+
isFrozen?: boolean | undefined;
|
|
743
|
+
} | {
|
|
744
|
+
id: string;
|
|
745
|
+
networkId: string;
|
|
746
|
+
decimals: number;
|
|
747
|
+
symbol: string;
|
|
748
|
+
type: "substrate-native";
|
|
749
|
+
platform: "polkadot";
|
|
750
|
+
existentialDeposit: string;
|
|
751
|
+
isDefault?: boolean | undefined;
|
|
752
|
+
name?: string | undefined;
|
|
753
|
+
logo?: string | undefined;
|
|
754
|
+
coingeckoId?: string | undefined;
|
|
755
|
+
noDiscovery?: boolean | undefined;
|
|
756
|
+
mirrorOf?: string | undefined;
|
|
757
|
+
} | {
|
|
758
|
+
id: string;
|
|
759
|
+
networkId: string;
|
|
760
|
+
decimals: number;
|
|
761
|
+
symbol: string;
|
|
762
|
+
type: "substrate-psp22";
|
|
763
|
+
platform: "polkadot";
|
|
764
|
+
contractAddress: string;
|
|
765
|
+
isDefault?: boolean | undefined;
|
|
766
|
+
name?: string | undefined;
|
|
767
|
+
logo?: string | undefined;
|
|
768
|
+
coingeckoId?: string | undefined;
|
|
769
|
+
noDiscovery?: boolean | undefined;
|
|
770
|
+
mirrorOf?: string | undefined;
|
|
771
|
+
} | {
|
|
772
|
+
id: string;
|
|
773
|
+
networkId: string;
|
|
774
|
+
decimals: number;
|
|
775
|
+
symbol: string;
|
|
776
|
+
type: "substrate-tokens";
|
|
777
|
+
platform: "polkadot";
|
|
778
|
+
onChainId: string | number;
|
|
779
|
+
existentialDeposit: string;
|
|
780
|
+
isDefault?: boolean | undefined;
|
|
781
|
+
name?: string | undefined;
|
|
782
|
+
logo?: string | undefined;
|
|
783
|
+
coingeckoId?: string | undefined;
|
|
784
|
+
noDiscovery?: boolean | undefined;
|
|
785
|
+
mirrorOf?: string | undefined;
|
|
786
|
+
} | {
|
|
787
|
+
id: string;
|
|
788
|
+
networkId: string;
|
|
789
|
+
decimals: number;
|
|
790
|
+
symbol: string;
|
|
791
|
+
type: "substrate-hydration";
|
|
792
|
+
platform: "polkadot";
|
|
793
|
+
onChainId: number;
|
|
794
|
+
assetType: "Token" | "Erc20" | "External";
|
|
795
|
+
isSufficient: boolean;
|
|
796
|
+
existentialDeposit: string;
|
|
797
|
+
isDefault?: boolean | undefined;
|
|
798
|
+
name?: string | undefined;
|
|
799
|
+
logo?: string | undefined;
|
|
800
|
+
coingeckoId?: string | undefined;
|
|
801
|
+
noDiscovery?: boolean | undefined;
|
|
802
|
+
mirrorOf?: string | undefined;
|
|
803
|
+
}>;
|
|
804
|
+
export declare const useToken: (tokenId?: TokenId) => {
|
|
805
|
+
id: string;
|
|
806
|
+
networkId: string;
|
|
807
|
+
decimals: number;
|
|
808
|
+
symbol: string;
|
|
809
|
+
type: "evm-erc20";
|
|
810
|
+
platform: "ethereum";
|
|
811
|
+
contractAddress: `0x${string}`;
|
|
812
|
+
isDefault?: boolean | undefined;
|
|
813
|
+
name?: string | undefined;
|
|
814
|
+
logo?: string | undefined;
|
|
815
|
+
coingeckoId?: string | undefined;
|
|
816
|
+
noDiscovery?: boolean | undefined;
|
|
817
|
+
mirrorOf?: string | undefined;
|
|
818
|
+
} | {
|
|
819
|
+
id: string;
|
|
820
|
+
networkId: string;
|
|
821
|
+
decimals: number;
|
|
822
|
+
symbol: string;
|
|
823
|
+
type: "evm-native";
|
|
824
|
+
platform: "ethereum";
|
|
825
|
+
isDefault?: boolean | undefined;
|
|
826
|
+
name?: string | undefined;
|
|
827
|
+
logo?: string | undefined;
|
|
828
|
+
coingeckoId?: string | undefined;
|
|
829
|
+
noDiscovery?: boolean | undefined;
|
|
830
|
+
mirrorOf?: string | undefined;
|
|
831
|
+
} | {
|
|
832
|
+
id: string;
|
|
833
|
+
networkId: string;
|
|
834
|
+
decimals: number;
|
|
835
|
+
symbol: string;
|
|
836
|
+
type: "evm-uniswapv2";
|
|
837
|
+
platform: "ethereum";
|
|
838
|
+
contractAddress: `0x${string}`;
|
|
839
|
+
symbol0: string;
|
|
840
|
+
symbol1: string;
|
|
841
|
+
decimals0: number;
|
|
842
|
+
decimals1: number;
|
|
843
|
+
tokenAddress0: `0x${string}`;
|
|
844
|
+
tokenAddress1: `0x${string}`;
|
|
845
|
+
isDefault?: boolean | undefined;
|
|
846
|
+
name?: string | undefined;
|
|
847
|
+
logo?: string | undefined;
|
|
848
|
+
coingeckoId?: string | undefined;
|
|
849
|
+
noDiscovery?: boolean | undefined;
|
|
850
|
+
mirrorOf?: string | undefined;
|
|
851
|
+
isCustom?: boolean | undefined;
|
|
852
|
+
coingeckoId0?: string | undefined;
|
|
853
|
+
coingeckoId1?: string | undefined;
|
|
854
|
+
} | {
|
|
855
|
+
id: string;
|
|
856
|
+
networkId: string;
|
|
857
|
+
decimals: number;
|
|
858
|
+
symbol: string;
|
|
859
|
+
type: "substrate-assets";
|
|
860
|
+
platform: "polkadot";
|
|
861
|
+
assetId: string;
|
|
862
|
+
isSufficient: boolean;
|
|
863
|
+
existentialDeposit: string;
|
|
864
|
+
isDefault?: boolean | undefined;
|
|
865
|
+
name?: string | undefined;
|
|
866
|
+
logo?: string | undefined;
|
|
867
|
+
coingeckoId?: string | undefined;
|
|
868
|
+
noDiscovery?: boolean | undefined;
|
|
869
|
+
mirrorOf?: string | undefined;
|
|
870
|
+
isFrozen?: boolean | undefined;
|
|
871
|
+
} | {
|
|
872
|
+
id: string;
|
|
873
|
+
networkId: string;
|
|
874
|
+
decimals: number;
|
|
875
|
+
symbol: string;
|
|
876
|
+
type: "substrate-foreignassets";
|
|
877
|
+
platform: "polkadot";
|
|
878
|
+
onChainId: string;
|
|
879
|
+
isSufficient: boolean;
|
|
880
|
+
existentialDeposit: string;
|
|
881
|
+
isDefault?: boolean | undefined;
|
|
882
|
+
name?: string | undefined;
|
|
883
|
+
logo?: string | undefined;
|
|
884
|
+
coingeckoId?: string | undefined;
|
|
885
|
+
noDiscovery?: boolean | undefined;
|
|
886
|
+
mirrorOf?: string | undefined;
|
|
887
|
+
isFrozen?: boolean | undefined;
|
|
888
|
+
} | {
|
|
889
|
+
id: string;
|
|
890
|
+
networkId: string;
|
|
891
|
+
decimals: number;
|
|
892
|
+
symbol: string;
|
|
893
|
+
type: "substrate-native";
|
|
894
|
+
platform: "polkadot";
|
|
895
|
+
existentialDeposit: string;
|
|
896
|
+
isDefault?: boolean | undefined;
|
|
897
|
+
name?: string | undefined;
|
|
898
|
+
logo?: string | undefined;
|
|
899
|
+
coingeckoId?: string | undefined;
|
|
900
|
+
noDiscovery?: boolean | undefined;
|
|
901
|
+
mirrorOf?: string | undefined;
|
|
902
|
+
} | {
|
|
903
|
+
id: string;
|
|
904
|
+
networkId: string;
|
|
905
|
+
decimals: number;
|
|
906
|
+
symbol: string;
|
|
907
|
+
type: "substrate-psp22";
|
|
908
|
+
platform: "polkadot";
|
|
909
|
+
contractAddress: string;
|
|
910
|
+
isDefault?: boolean | undefined;
|
|
911
|
+
name?: string | undefined;
|
|
912
|
+
logo?: string | undefined;
|
|
913
|
+
coingeckoId?: string | undefined;
|
|
914
|
+
noDiscovery?: boolean | undefined;
|
|
915
|
+
mirrorOf?: string | undefined;
|
|
916
|
+
} | {
|
|
917
|
+
id: string;
|
|
918
|
+
networkId: string;
|
|
919
|
+
decimals: number;
|
|
920
|
+
symbol: string;
|
|
921
|
+
type: "substrate-tokens";
|
|
922
|
+
platform: "polkadot";
|
|
923
|
+
onChainId: string | number;
|
|
924
|
+
existentialDeposit: string;
|
|
925
|
+
isDefault?: boolean | undefined;
|
|
926
|
+
name?: string | undefined;
|
|
927
|
+
logo?: string | undefined;
|
|
928
|
+
coingeckoId?: string | undefined;
|
|
929
|
+
noDiscovery?: boolean | undefined;
|
|
930
|
+
mirrorOf?: string | undefined;
|
|
931
|
+
} | {
|
|
932
|
+
id: string;
|
|
933
|
+
networkId: string;
|
|
934
|
+
decimals: number;
|
|
935
|
+
symbol: string;
|
|
936
|
+
type: "substrate-hydration";
|
|
937
|
+
platform: "polkadot";
|
|
938
|
+
onChainId: number;
|
|
939
|
+
assetType: "Token" | "Erc20" | "External";
|
|
940
|
+
isSufficient: boolean;
|
|
941
|
+
existentialDeposit: string;
|
|
942
|
+
isDefault?: boolean | undefined;
|
|
943
|
+
name?: string | undefined;
|
|
944
|
+
logo?: string | undefined;
|
|
945
|
+
coingeckoId?: string | undefined;
|
|
946
|
+
noDiscovery?: boolean | undefined;
|
|
947
|
+
mirrorOf?: string | undefined;
|
|
948
|
+
};
|
|
@@ -64,23 +64,21 @@ const filteredChaindataAtom = jotai.atom(async get => {
|
|
|
64
64
|
const enableTestnets = get(enableTestnetsAtom);
|
|
65
65
|
const chaindata = await get(chaindataAtom);
|
|
66
66
|
const networks = chaindata.networks.filter(n => (enabledNetworkIds?.includes(n.id) || n.isDefault) && (enableTestnets || !n.isTestnet));
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networksById[token.networkId]);
|
|
70
|
-
const tokensById = lodashEs.keyBy(tokens, t => t.id);
|
|
67
|
+
const networkById = lodashEs.keyBy(networks, n => n.id);
|
|
68
|
+
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networkById[token.networkId]);
|
|
71
69
|
return {
|
|
72
70
|
networks,
|
|
73
|
-
|
|
74
|
-
dotNetworksByGenesisHash,
|
|
75
|
-
tokens,
|
|
76
|
-
tokensById
|
|
71
|
+
tokens
|
|
77
72
|
};
|
|
78
73
|
});
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
74
|
+
const tokensAtom = jotai.atom(async get => {
|
|
75
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
76
|
+
return chaindata.tokens;
|
|
77
|
+
});
|
|
78
|
+
const networksAtom = jotai.atom(async get => {
|
|
79
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
80
|
+
return chaindata.networks;
|
|
81
|
+
});
|
|
84
82
|
|
|
85
83
|
var packageJson = {
|
|
86
84
|
name: "@talismn/balances-react"};
|
|
@@ -253,13 +251,28 @@ const useChainConnectors = () => jotai.useAtomValue(chainConnectorsAtom);
|
|
|
253
251
|
|
|
254
252
|
const useChaindataProvider = () => jotai.useAtomValue(chaindataProviderAtom);
|
|
255
253
|
const useChaindata = () => jotai.useAtomValue(chaindataAtom);
|
|
256
|
-
const useNetworks = () =>
|
|
257
|
-
const useNetworksById = () =>
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
254
|
+
const useNetworks = () => useChaindata().networks;
|
|
255
|
+
const useNetworksById = () => {
|
|
256
|
+
const {
|
|
257
|
+
networks
|
|
258
|
+
} = useChaindata();
|
|
259
|
+
return react.useMemo(() => lodashEs.keyBy(networks, n => n.id), [networks]);
|
|
260
|
+
};
|
|
261
|
+
const useNetwork = networkId => {
|
|
262
|
+
const networksById = useNetworksById();
|
|
263
|
+
return networksById[networkId ?? ""] ?? null;
|
|
264
|
+
};
|
|
265
|
+
const useTokens = () => useChaindata().tokens;
|
|
266
|
+
const useTokensById = () => {
|
|
267
|
+
const {
|
|
268
|
+
tokens
|
|
269
|
+
} = useChaindata();
|
|
270
|
+
return react.useMemo(() => lodashEs.keyBy(tokens, t => t.id), [tokens]);
|
|
271
|
+
};
|
|
272
|
+
const useToken = tokenId => {
|
|
273
|
+
const tokensById = useTokensById();
|
|
274
|
+
return tokensById[tokenId ?? ""] ?? null;
|
|
275
|
+
};
|
|
263
276
|
|
|
264
277
|
const useTokenRates = () => jotai.useAtomValue(tokenRatesAtom);
|
|
265
278
|
const useTokenRate = tokenId => useTokenRates()[tokenId ?? ""] ?? undefined;
|
|
@@ -328,22 +341,18 @@ exports.chaindataAtom = chaindataAtom;
|
|
|
328
341
|
exports.chaindataProviderAtom = chaindataProviderAtom;
|
|
329
342
|
exports.coinsApiConfigAtom = coinsApiConfigAtom;
|
|
330
343
|
exports.cryptoWaitReadyAtom = cryptoWaitReadyAtom;
|
|
331
|
-
exports.dotNetworksByGenesisHashAtom = dotNetworksByGenesisHashAtom;
|
|
332
344
|
exports.enableTestnetsAtom = enableTestnetsAtom;
|
|
333
345
|
exports.enabledChainsAtom = enabledChainsAtom;
|
|
334
346
|
exports.enabledTokensAtom = enabledTokensAtom;
|
|
335
347
|
exports.getStaleChains = getStaleChains;
|
|
336
348
|
exports.networksAtom = networksAtom;
|
|
337
|
-
exports.networksByIdAtom = networksByIdAtom;
|
|
338
349
|
exports.tokenRatesAtom = tokenRatesAtom;
|
|
339
350
|
exports.tokensAtom = tokensAtom;
|
|
340
|
-
exports.tokensByIdAtom = tokensByIdAtom;
|
|
341
351
|
exports.useBalances = useBalances;
|
|
342
352
|
exports.useBalancesStatus = useBalancesStatus;
|
|
343
353
|
exports.useChainConnectors = useChainConnectors;
|
|
344
354
|
exports.useChaindata = useChaindata;
|
|
345
355
|
exports.useChaindataProvider = useChaindataProvider;
|
|
346
|
-
exports.useDotNetworksByGenesisHash = useDotNetworksByGenesisHash;
|
|
347
356
|
exports.useNetwork = useNetwork;
|
|
348
357
|
exports.useNetworks = useNetworks;
|
|
349
358
|
exports.useNetworksById = useNetworksById;
|
|
@@ -64,23 +64,21 @@ const filteredChaindataAtom = jotai.atom(async get => {
|
|
|
64
64
|
const enableTestnets = get(enableTestnetsAtom);
|
|
65
65
|
const chaindata = await get(chaindataAtom);
|
|
66
66
|
const networks = chaindata.networks.filter(n => (enabledNetworkIds?.includes(n.id) || n.isDefault) && (enableTestnets || !n.isTestnet));
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networksById[token.networkId]);
|
|
70
|
-
const tokensById = lodashEs.keyBy(tokens, t => t.id);
|
|
67
|
+
const networkById = lodashEs.keyBy(networks, n => n.id);
|
|
68
|
+
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networkById[token.networkId]);
|
|
71
69
|
return {
|
|
72
70
|
networks,
|
|
73
|
-
|
|
74
|
-
dotNetworksByGenesisHash,
|
|
75
|
-
tokens,
|
|
76
|
-
tokensById
|
|
71
|
+
tokens
|
|
77
72
|
};
|
|
78
73
|
});
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
74
|
+
const tokensAtom = jotai.atom(async get => {
|
|
75
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
76
|
+
return chaindata.tokens;
|
|
77
|
+
});
|
|
78
|
+
const networksAtom = jotai.atom(async get => {
|
|
79
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
80
|
+
return chaindata.networks;
|
|
81
|
+
});
|
|
84
82
|
|
|
85
83
|
var packageJson = {
|
|
86
84
|
name: "@talismn/balances-react"};
|
|
@@ -253,13 +251,28 @@ const useChainConnectors = () => jotai.useAtomValue(chainConnectorsAtom);
|
|
|
253
251
|
|
|
254
252
|
const useChaindataProvider = () => jotai.useAtomValue(chaindataProviderAtom);
|
|
255
253
|
const useChaindata = () => jotai.useAtomValue(chaindataAtom);
|
|
256
|
-
const useNetworks = () =>
|
|
257
|
-
const useNetworksById = () =>
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
254
|
+
const useNetworks = () => useChaindata().networks;
|
|
255
|
+
const useNetworksById = () => {
|
|
256
|
+
const {
|
|
257
|
+
networks
|
|
258
|
+
} = useChaindata();
|
|
259
|
+
return react.useMemo(() => lodashEs.keyBy(networks, n => n.id), [networks]);
|
|
260
|
+
};
|
|
261
|
+
const useNetwork = networkId => {
|
|
262
|
+
const networksById = useNetworksById();
|
|
263
|
+
return networksById[networkId ?? ""] ?? null;
|
|
264
|
+
};
|
|
265
|
+
const useTokens = () => useChaindata().tokens;
|
|
266
|
+
const useTokensById = () => {
|
|
267
|
+
const {
|
|
268
|
+
tokens
|
|
269
|
+
} = useChaindata();
|
|
270
|
+
return react.useMemo(() => lodashEs.keyBy(tokens, t => t.id), [tokens]);
|
|
271
|
+
};
|
|
272
|
+
const useToken = tokenId => {
|
|
273
|
+
const tokensById = useTokensById();
|
|
274
|
+
return tokensById[tokenId ?? ""] ?? null;
|
|
275
|
+
};
|
|
263
276
|
|
|
264
277
|
const useTokenRates = () => jotai.useAtomValue(tokenRatesAtom);
|
|
265
278
|
const useTokenRate = tokenId => useTokenRates()[tokenId ?? ""] ?? undefined;
|
|
@@ -328,22 +341,18 @@ exports.chaindataAtom = chaindataAtom;
|
|
|
328
341
|
exports.chaindataProviderAtom = chaindataProviderAtom;
|
|
329
342
|
exports.coinsApiConfigAtom = coinsApiConfigAtom;
|
|
330
343
|
exports.cryptoWaitReadyAtom = cryptoWaitReadyAtom;
|
|
331
|
-
exports.dotNetworksByGenesisHashAtom = dotNetworksByGenesisHashAtom;
|
|
332
344
|
exports.enableTestnetsAtom = enableTestnetsAtom;
|
|
333
345
|
exports.enabledChainsAtom = enabledChainsAtom;
|
|
334
346
|
exports.enabledTokensAtom = enabledTokensAtom;
|
|
335
347
|
exports.getStaleChains = getStaleChains;
|
|
336
348
|
exports.networksAtom = networksAtom;
|
|
337
|
-
exports.networksByIdAtom = networksByIdAtom;
|
|
338
349
|
exports.tokenRatesAtom = tokenRatesAtom;
|
|
339
350
|
exports.tokensAtom = tokensAtom;
|
|
340
|
-
exports.tokensByIdAtom = tokensByIdAtom;
|
|
341
351
|
exports.useBalances = useBalances;
|
|
342
352
|
exports.useBalancesStatus = useBalancesStatus;
|
|
343
353
|
exports.useChainConnectors = useChainConnectors;
|
|
344
354
|
exports.useChaindata = useChaindata;
|
|
345
355
|
exports.useChaindataProvider = useChaindataProvider;
|
|
346
|
-
exports.useDotNetworksByGenesisHash = useDotNetworksByGenesisHash;
|
|
347
356
|
exports.useNetwork = useNetwork;
|
|
348
357
|
exports.useNetworks = useNetworks;
|
|
349
358
|
exports.useNetworksById = useNetworksById;
|
|
@@ -59,23 +59,21 @@ const filteredChaindataAtom = atom(async get => {
|
|
|
59
59
|
const enableTestnets = get(enableTestnetsAtom);
|
|
60
60
|
const chaindata = await get(chaindataAtom);
|
|
61
61
|
const networks = chaindata.networks.filter(n => (enabledNetworkIds?.includes(n.id) || n.isDefault) && (enableTestnets || !n.isTestnet));
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networksById[token.networkId]);
|
|
65
|
-
const tokensById = keyBy(tokens, t => t.id);
|
|
62
|
+
const networkById = keyBy(networks, n => n.id);
|
|
63
|
+
const tokens = chaindata.tokens.filter(token => (enabledTokenIds?.includes(token.id) || token.isDefault) && networkById[token.networkId]);
|
|
66
64
|
return {
|
|
67
65
|
networks,
|
|
68
|
-
|
|
69
|
-
dotNetworksByGenesisHash,
|
|
70
|
-
tokens,
|
|
71
|
-
tokensById
|
|
66
|
+
tokens
|
|
72
67
|
};
|
|
73
68
|
});
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
69
|
+
const tokensAtom = atom(async get => {
|
|
70
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
71
|
+
return chaindata.tokens;
|
|
72
|
+
});
|
|
73
|
+
const networksAtom = atom(async get => {
|
|
74
|
+
const chaindata = await get(filteredChaindataAtom);
|
|
75
|
+
return chaindata.networks;
|
|
76
|
+
});
|
|
79
77
|
|
|
80
78
|
var packageJson = {
|
|
81
79
|
name: "@talismn/balances-react"};
|
|
@@ -248,13 +246,28 @@ const useChainConnectors = () => useAtomValue(chainConnectorsAtom);
|
|
|
248
246
|
|
|
249
247
|
const useChaindataProvider = () => useAtomValue(chaindataProviderAtom);
|
|
250
248
|
const useChaindata = () => useAtomValue(chaindataAtom);
|
|
251
|
-
const useNetworks = () =>
|
|
252
|
-
const useNetworksById = () =>
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
249
|
+
const useNetworks = () => useChaindata().networks;
|
|
250
|
+
const useNetworksById = () => {
|
|
251
|
+
const {
|
|
252
|
+
networks
|
|
253
|
+
} = useChaindata();
|
|
254
|
+
return useMemo(() => keyBy(networks, n => n.id), [networks]);
|
|
255
|
+
};
|
|
256
|
+
const useNetwork = networkId => {
|
|
257
|
+
const networksById = useNetworksById();
|
|
258
|
+
return networksById[networkId ?? ""] ?? null;
|
|
259
|
+
};
|
|
260
|
+
const useTokens = () => useChaindata().tokens;
|
|
261
|
+
const useTokensById = () => {
|
|
262
|
+
const {
|
|
263
|
+
tokens
|
|
264
|
+
} = useChaindata();
|
|
265
|
+
return useMemo(() => keyBy(tokens, t => t.id), [tokens]);
|
|
266
|
+
};
|
|
267
|
+
const useToken = tokenId => {
|
|
268
|
+
const tokensById = useTokensById();
|
|
269
|
+
return tokensById[tokenId ?? ""] ?? null;
|
|
270
|
+
};
|
|
258
271
|
|
|
259
272
|
const useTokenRates = () => useAtomValue(tokenRatesAtom);
|
|
260
273
|
const useTokenRate = tokenId => useTokenRates()[tokenId ?? ""] ?? undefined;
|
|
@@ -291,4 +304,4 @@ const BalancesProvider = ({
|
|
|
291
304
|
});
|
|
292
305
|
};
|
|
293
306
|
|
|
294
|
-
export { BalancesProvider, allAddressesAtom, balancesAtom, chainConnectorsAtom, chaindataAtom, chaindataProviderAtom, coinsApiConfigAtom, cryptoWaitReadyAtom,
|
|
307
|
+
export { BalancesProvider, allAddressesAtom, balancesAtom, chainConnectorsAtom, chaindataAtom, chaindataProviderAtom, coinsApiConfigAtom, cryptoWaitReadyAtom, enableTestnetsAtom, enabledChainsAtom, enabledTokensAtom, getStaleChains, networksAtom, tokenRatesAtom, tokensAtom, useBalances, useBalancesStatus, useChainConnectors, useChaindata, useChaindataProvider, useNetwork, useNetworks, useNetworksById, useSetBalancesAddresses, useToken, useTokenRate, useTokenRates, useTokens, useTokensById };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talismn/balances-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-pr2116-20250725042328",
|
|
4
4
|
"author": "Talisman",
|
|
5
5
|
"homepage": "https://talisman.xyz",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"lodash-es": "4.17.21",
|
|
31
31
|
"react-use": "^17.5.1",
|
|
32
32
|
"rxjs": "^7.8.1",
|
|
33
|
-
"@talismn/balances": "0.0.0-pr2111-20250724010635",
|
|
34
|
-
"@talismn/chain-connector": "1.0.0",
|
|
35
33
|
"@talismn/chain-connector-evm": "1.0.0",
|
|
34
|
+
"@talismn/chain-connector": "1.0.0",
|
|
35
|
+
"@talismn/balances": "0.0.0-pr2116-20250725042328",
|
|
36
36
|
"@talismn/chaindata-provider": "1.0.0",
|
|
37
37
|
"@talismn/scale": "0.2.0",
|
|
38
|
-
"@talismn/
|
|
38
|
+
"@talismn/connection-meta": "0.2.18",
|
|
39
39
|
"@talismn/util": "0.5.0",
|
|
40
|
-
"@talismn/
|
|
40
|
+
"@talismn/token-rates": "3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/jest": "^29.5.14",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react": "^18.3.1",
|
|
49
49
|
"ts-jest": "^29.2.5",
|
|
50
50
|
"typescript": "^5.6.3",
|
|
51
|
-
"@talismn/
|
|
52
|
-
"@talismn/
|
|
51
|
+
"@talismn/eslint-config": "0.0.3",
|
|
52
|
+
"@talismn/tsconfig": "0.0.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@polkadot/util-crypto": "*",
|