@talismn/balances-react 1.3.1 → 1.3.2

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.
@@ -0,0 +1,2297 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import * as _talismn_chaindata_provider from '@talismn/chaindata-provider';
4
+ import { ChaindataProvider, NetworkId, TokenId } from '@talismn/chaindata-provider';
5
+ export { evmErc20TokenId, evmNativeTokenId, subAssetTokenId, subNativeTokenId, subPsp22TokenId, subTokensTokenId } from '@talismn/chaindata-provider';
6
+ import * as jotai from 'jotai';
7
+ import * as _talismn_balances from '@talismn/balances';
8
+ import { Balances, ChainConnectors } from '@talismn/balances';
9
+ import * as _talismn_token_rates from '@talismn/token-rates';
10
+ import { CoinsApiConfig } from '@talismn/token-rates';
11
+ import * as lodash from 'lodash';
12
+
13
+ /** Sets the list of addresses for which token balances will be fetched by the balances subscription */
14
+ declare const allAddressesAtom: jotai.PrimitiveAtom<string[]> & {
15
+ init: string[];
16
+ };
17
+
18
+ declare const balancesAtom: jotai.Atom<Promise<Balances>>;
19
+
20
+ declare const chainConnectorsAtom: jotai.Atom<ChainConnectors>;
21
+
22
+ declare const chaindataAtom: jotai.Atom<{
23
+ networks: ({
24
+ id: string;
25
+ name: string;
26
+ nativeTokenId: string;
27
+ nativeCurrency: {
28
+ decimals: number;
29
+ symbol: string;
30
+ name: string;
31
+ coingeckoId?: string | undefined;
32
+ mirrorOf?: string | undefined;
33
+ logo?: string | undefined;
34
+ };
35
+ blockExplorerUrls: string[];
36
+ genesisHash: `0x${string}`;
37
+ platform: "polkadot";
38
+ chainName: string;
39
+ specName: string;
40
+ specVersion: number;
41
+ account: "secp256k1" | "*25519";
42
+ prefix: number;
43
+ rpcs: string[];
44
+ topology: {
45
+ type: "standalone";
46
+ } | {
47
+ type: "relay";
48
+ } | {
49
+ type: "parachain";
50
+ relayId: string;
51
+ paraId: number;
52
+ };
53
+ isTestnet?: boolean | undefined;
54
+ isDefault?: boolean | undefined;
55
+ forceScan?: boolean | undefined;
56
+ logo?: string | undefined;
57
+ themeColor?: string | undefined;
58
+ chainspecQrUrl?: string | undefined;
59
+ latestMetadataQrUrl?: string | undefined;
60
+ oldPrefix?: number | undefined;
61
+ registryTypes?: any;
62
+ signedExtensions?: any;
63
+ hasCheckMetadataHash?: boolean | undefined;
64
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
65
+ isUnknownFeeToken?: boolean | undefined;
66
+ balancesConfig?: {
67
+ "substrate-native"?: {
68
+ disable?: boolean | undefined;
69
+ } | undefined;
70
+ "substrate-assets"?: Record<string, never> | undefined;
71
+ "substrate-psp22"?: Record<string, never> | undefined;
72
+ "substrate-tokens"?: {
73
+ palletId?: string | undefined;
74
+ } | undefined;
75
+ "substrate-foreignassets"?: Record<string, never> | undefined;
76
+ "substrate-hydration"?: Record<string, never> | undefined;
77
+ "substrate-dtao"?: Record<string, never> | undefined;
78
+ } | undefined;
79
+ } | {
80
+ id: string;
81
+ name: string;
82
+ nativeTokenId: string;
83
+ nativeCurrency: {
84
+ decimals: number;
85
+ symbol: string;
86
+ name: string;
87
+ coingeckoId?: string | undefined;
88
+ mirrorOf?: string | undefined;
89
+ logo?: string | undefined;
90
+ };
91
+ blockExplorerUrls: string[];
92
+ platform: "ethereum";
93
+ rpcs: string[];
94
+ isTestnet?: boolean | undefined;
95
+ isDefault?: boolean | undefined;
96
+ forceScan?: boolean | undefined;
97
+ logo?: string | undefined;
98
+ themeColor?: string | undefined;
99
+ substrateChainId?: string | undefined;
100
+ preserveGasEstimate?: boolean | undefined;
101
+ feeType?: "legacy" | "eip-1559" | undefined;
102
+ l2FeeType?: {
103
+ type: "op-stack";
104
+ } | {
105
+ type: "scroll";
106
+ l1GasPriceOracle: `0x${string}`;
107
+ } | undefined;
108
+ contracts?: {
109
+ Erc20Aggregator?: `0x${string}` | undefined;
110
+ Multicall3?: `0x${string}` | undefined;
111
+ } | undefined;
112
+ balancesConfig?: {
113
+ "evm-native"?: Record<string, never> | undefined;
114
+ "evm-erc20"?: Record<string, never> | undefined;
115
+ "evm-uniswapv2"?: Record<string, never> | undefined;
116
+ } | undefined;
117
+ } | {
118
+ id: string;
119
+ name: string;
120
+ nativeTokenId: string;
121
+ nativeCurrency: {
122
+ decimals: number;
123
+ symbol: string;
124
+ name: string;
125
+ coingeckoId?: string | undefined;
126
+ mirrorOf?: string | undefined;
127
+ logo?: string | undefined;
128
+ };
129
+ blockExplorerUrls: string[];
130
+ platform: "solana";
131
+ genesisHash: string;
132
+ rpcs: string[];
133
+ isTestnet?: boolean | undefined;
134
+ isDefault?: boolean | undefined;
135
+ forceScan?: boolean | undefined;
136
+ logo?: string | undefined;
137
+ themeColor?: string | undefined;
138
+ balancesConfig?: {
139
+ "sol-native"?: Record<string, never> | undefined;
140
+ "sol-spl"?: Record<string, never> | undefined;
141
+ } | undefined;
142
+ })[];
143
+ tokens: ({
144
+ id: string;
145
+ networkId: string;
146
+ decimals: number;
147
+ symbol: string;
148
+ type: "evm-erc20";
149
+ platform: "ethereum";
150
+ contractAddress: `0x${string}`;
151
+ isDefault?: boolean | undefined;
152
+ name?: string | undefined;
153
+ logo?: string | undefined;
154
+ coingeckoId?: string | undefined;
155
+ noDiscovery?: boolean | undefined;
156
+ mirrorOf?: string | undefined;
157
+ } | {
158
+ id: string;
159
+ networkId: string;
160
+ decimals: number;
161
+ symbol: string;
162
+ type: "evm-native";
163
+ platform: "ethereum";
164
+ isDefault?: boolean | undefined;
165
+ name?: string | undefined;
166
+ logo?: string | undefined;
167
+ coingeckoId?: string | undefined;
168
+ noDiscovery?: boolean | undefined;
169
+ mirrorOf?: string | undefined;
170
+ } | {
171
+ id: string;
172
+ networkId: string;
173
+ decimals: number;
174
+ symbol: string;
175
+ type: "evm-uniswapv2";
176
+ platform: "ethereum";
177
+ contractAddress: `0x${string}`;
178
+ symbol0: string;
179
+ symbol1: string;
180
+ decimals0: number;
181
+ decimals1: number;
182
+ tokenAddress0: `0x${string}`;
183
+ tokenAddress1: `0x${string}`;
184
+ isDefault?: boolean | undefined;
185
+ name?: string | undefined;
186
+ logo?: string | undefined;
187
+ coingeckoId?: string | undefined;
188
+ noDiscovery?: boolean | undefined;
189
+ mirrorOf?: string | undefined;
190
+ isCustom?: boolean | undefined;
191
+ coingeckoId0?: string | undefined;
192
+ coingeckoId1?: string | undefined;
193
+ } | {
194
+ id: string;
195
+ networkId: string;
196
+ decimals: number;
197
+ symbol: string;
198
+ type: "substrate-assets";
199
+ platform: "polkadot";
200
+ assetId: string;
201
+ isSufficient: boolean;
202
+ existentialDeposit: string;
203
+ isDefault?: boolean | undefined;
204
+ name?: string | undefined;
205
+ logo?: string | undefined;
206
+ coingeckoId?: string | undefined;
207
+ noDiscovery?: boolean | undefined;
208
+ mirrorOf?: string | undefined;
209
+ isFrozen?: boolean | undefined;
210
+ } | {
211
+ id: string;
212
+ networkId: string;
213
+ decimals: number;
214
+ symbol: string;
215
+ type: "substrate-dtao";
216
+ platform: "polkadot";
217
+ netuid: number;
218
+ isTransferable: boolean;
219
+ isDefault?: boolean | undefined;
220
+ name?: string | undefined;
221
+ logo?: string | undefined;
222
+ coingeckoId?: string | undefined;
223
+ noDiscovery?: boolean | undefined;
224
+ mirrorOf?: string | undefined;
225
+ subnetName?: string | undefined;
226
+ hotkey?: string | undefined;
227
+ } | {
228
+ id: string;
229
+ networkId: string;
230
+ decimals: number;
231
+ symbol: string;
232
+ type: "substrate-foreignassets";
233
+ platform: "polkadot";
234
+ onChainId: string;
235
+ isSufficient: boolean;
236
+ existentialDeposit: string;
237
+ isDefault?: boolean | undefined;
238
+ name?: string | undefined;
239
+ logo?: string | undefined;
240
+ coingeckoId?: string | undefined;
241
+ noDiscovery?: boolean | undefined;
242
+ mirrorOf?: string | undefined;
243
+ isFrozen?: boolean | undefined;
244
+ } | {
245
+ id: string;
246
+ networkId: string;
247
+ decimals: number;
248
+ symbol: string;
249
+ type: "substrate-native";
250
+ platform: "polkadot";
251
+ existentialDeposit: string;
252
+ isDefault?: boolean | undefined;
253
+ name?: string | undefined;
254
+ logo?: string | undefined;
255
+ coingeckoId?: string | undefined;
256
+ noDiscovery?: boolean | undefined;
257
+ mirrorOf?: string | undefined;
258
+ } | {
259
+ id: string;
260
+ networkId: string;
261
+ decimals: number;
262
+ symbol: string;
263
+ type: "substrate-psp22";
264
+ platform: "polkadot";
265
+ contractAddress: string;
266
+ isDefault?: boolean | undefined;
267
+ name?: string | undefined;
268
+ logo?: string | undefined;
269
+ coingeckoId?: string | undefined;
270
+ noDiscovery?: boolean | undefined;
271
+ mirrorOf?: string | undefined;
272
+ } | {
273
+ id: string;
274
+ networkId: string;
275
+ decimals: number;
276
+ symbol: string;
277
+ type: "substrate-tokens";
278
+ platform: "polkadot";
279
+ onChainId: string | number;
280
+ existentialDeposit: string;
281
+ isDefault?: boolean | undefined;
282
+ name?: string | undefined;
283
+ logo?: string | undefined;
284
+ coingeckoId?: string | undefined;
285
+ noDiscovery?: boolean | undefined;
286
+ mirrorOf?: string | undefined;
287
+ } | {
288
+ id: string;
289
+ networkId: string;
290
+ decimals: number;
291
+ symbol: string;
292
+ type: "substrate-hydration";
293
+ platform: "polkadot";
294
+ onChainId: number;
295
+ assetType: "Token" | "Erc20" | "External";
296
+ isSufficient: boolean;
297
+ existentialDeposit: string;
298
+ isDefault?: boolean | undefined;
299
+ name?: string | undefined;
300
+ logo?: string | undefined;
301
+ coingeckoId?: string | undefined;
302
+ noDiscovery?: boolean | undefined;
303
+ mirrorOf?: string | undefined;
304
+ } | {
305
+ id: string;
306
+ networkId: string;
307
+ decimals: number;
308
+ symbol: string;
309
+ type: "sol-native";
310
+ platform: "solana";
311
+ isDefault?: boolean | undefined;
312
+ name?: string | undefined;
313
+ logo?: string | undefined;
314
+ coingeckoId?: string | undefined;
315
+ noDiscovery?: boolean | undefined;
316
+ mirrorOf?: string | undefined;
317
+ } | {
318
+ id: string;
319
+ networkId: string;
320
+ decimals: number;
321
+ symbol: string;
322
+ type: "sol-spl";
323
+ platform: "solana";
324
+ mintAddress: string;
325
+ isDefault?: boolean | undefined;
326
+ name?: string | undefined;
327
+ logo?: string | undefined;
328
+ coingeckoId?: string | undefined;
329
+ noDiscovery?: boolean | undefined;
330
+ mirrorOf?: string | undefined;
331
+ })[];
332
+ } | Promise<{
333
+ networks: ({
334
+ id: string;
335
+ name: string;
336
+ nativeTokenId: string;
337
+ nativeCurrency: {
338
+ decimals: number;
339
+ symbol: string;
340
+ name: string;
341
+ coingeckoId?: string | undefined;
342
+ mirrorOf?: string | undefined;
343
+ logo?: string | undefined;
344
+ };
345
+ blockExplorerUrls: string[];
346
+ genesisHash: `0x${string}`;
347
+ platform: "polkadot";
348
+ chainName: string;
349
+ specName: string;
350
+ specVersion: number;
351
+ account: "secp256k1" | "*25519";
352
+ prefix: number;
353
+ rpcs: string[];
354
+ topology: {
355
+ type: "standalone";
356
+ } | {
357
+ type: "relay";
358
+ } | {
359
+ type: "parachain";
360
+ relayId: string;
361
+ paraId: number;
362
+ };
363
+ isTestnet?: boolean | undefined;
364
+ isDefault?: boolean | undefined;
365
+ forceScan?: boolean | undefined;
366
+ logo?: string | undefined;
367
+ themeColor?: string | undefined;
368
+ chainspecQrUrl?: string | undefined;
369
+ latestMetadataQrUrl?: string | undefined;
370
+ oldPrefix?: number | undefined;
371
+ registryTypes?: any;
372
+ signedExtensions?: any;
373
+ hasCheckMetadataHash?: boolean | undefined;
374
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
375
+ isUnknownFeeToken?: boolean | undefined;
376
+ balancesConfig?: {
377
+ "substrate-native"?: {
378
+ disable?: boolean | undefined;
379
+ } | undefined;
380
+ "substrate-assets"?: Record<string, never> | undefined;
381
+ "substrate-psp22"?: Record<string, never> | undefined;
382
+ "substrate-tokens"?: {
383
+ palletId?: string | undefined;
384
+ } | undefined;
385
+ "substrate-foreignassets"?: Record<string, never> | undefined;
386
+ "substrate-hydration"?: Record<string, never> | undefined;
387
+ "substrate-dtao"?: Record<string, never> | undefined;
388
+ } | undefined;
389
+ } | {
390
+ id: string;
391
+ name: string;
392
+ nativeTokenId: string;
393
+ nativeCurrency: {
394
+ decimals: number;
395
+ symbol: string;
396
+ name: string;
397
+ coingeckoId?: string | undefined;
398
+ mirrorOf?: string | undefined;
399
+ logo?: string | undefined;
400
+ };
401
+ blockExplorerUrls: string[];
402
+ platform: "ethereum";
403
+ rpcs: string[];
404
+ isTestnet?: boolean | undefined;
405
+ isDefault?: boolean | undefined;
406
+ forceScan?: boolean | undefined;
407
+ logo?: string | undefined;
408
+ themeColor?: string | undefined;
409
+ substrateChainId?: string | undefined;
410
+ preserveGasEstimate?: boolean | undefined;
411
+ feeType?: "legacy" | "eip-1559" | undefined;
412
+ l2FeeType?: {
413
+ type: "op-stack";
414
+ } | {
415
+ type: "scroll";
416
+ l1GasPriceOracle: `0x${string}`;
417
+ } | undefined;
418
+ contracts?: {
419
+ Erc20Aggregator?: `0x${string}` | undefined;
420
+ Multicall3?: `0x${string}` | undefined;
421
+ } | undefined;
422
+ balancesConfig?: {
423
+ "evm-native"?: Record<string, never> | undefined;
424
+ "evm-erc20"?: Record<string, never> | undefined;
425
+ "evm-uniswapv2"?: Record<string, never> | undefined;
426
+ } | undefined;
427
+ } | {
428
+ id: string;
429
+ name: string;
430
+ nativeTokenId: string;
431
+ nativeCurrency: {
432
+ decimals: number;
433
+ symbol: string;
434
+ name: string;
435
+ coingeckoId?: string | undefined;
436
+ mirrorOf?: string | undefined;
437
+ logo?: string | undefined;
438
+ };
439
+ blockExplorerUrls: string[];
440
+ platform: "solana";
441
+ genesisHash: string;
442
+ rpcs: string[];
443
+ isTestnet?: boolean | undefined;
444
+ isDefault?: boolean | undefined;
445
+ forceScan?: boolean | undefined;
446
+ logo?: string | undefined;
447
+ themeColor?: string | undefined;
448
+ balancesConfig?: {
449
+ "sol-native"?: Record<string, never> | undefined;
450
+ "sol-spl"?: Record<string, never> | undefined;
451
+ } | undefined;
452
+ })[];
453
+ tokens: ({
454
+ id: string;
455
+ networkId: string;
456
+ decimals: number;
457
+ symbol: string;
458
+ type: "evm-erc20";
459
+ platform: "ethereum";
460
+ contractAddress: `0x${string}`;
461
+ isDefault?: boolean | undefined;
462
+ name?: string | undefined;
463
+ logo?: string | undefined;
464
+ coingeckoId?: string | undefined;
465
+ noDiscovery?: boolean | undefined;
466
+ mirrorOf?: string | undefined;
467
+ } | {
468
+ id: string;
469
+ networkId: string;
470
+ decimals: number;
471
+ symbol: string;
472
+ type: "evm-native";
473
+ platform: "ethereum";
474
+ isDefault?: boolean | undefined;
475
+ name?: string | undefined;
476
+ logo?: string | undefined;
477
+ coingeckoId?: string | undefined;
478
+ noDiscovery?: boolean | undefined;
479
+ mirrorOf?: string | undefined;
480
+ } | {
481
+ id: string;
482
+ networkId: string;
483
+ decimals: number;
484
+ symbol: string;
485
+ type: "evm-uniswapv2";
486
+ platform: "ethereum";
487
+ contractAddress: `0x${string}`;
488
+ symbol0: string;
489
+ symbol1: string;
490
+ decimals0: number;
491
+ decimals1: number;
492
+ tokenAddress0: `0x${string}`;
493
+ tokenAddress1: `0x${string}`;
494
+ isDefault?: boolean | undefined;
495
+ name?: string | undefined;
496
+ logo?: string | undefined;
497
+ coingeckoId?: string | undefined;
498
+ noDiscovery?: boolean | undefined;
499
+ mirrorOf?: string | undefined;
500
+ isCustom?: boolean | undefined;
501
+ coingeckoId0?: string | undefined;
502
+ coingeckoId1?: string | undefined;
503
+ } | {
504
+ id: string;
505
+ networkId: string;
506
+ decimals: number;
507
+ symbol: string;
508
+ type: "substrate-assets";
509
+ platform: "polkadot";
510
+ assetId: string;
511
+ isSufficient: boolean;
512
+ existentialDeposit: string;
513
+ isDefault?: boolean | undefined;
514
+ name?: string | undefined;
515
+ logo?: string | undefined;
516
+ coingeckoId?: string | undefined;
517
+ noDiscovery?: boolean | undefined;
518
+ mirrorOf?: string | undefined;
519
+ isFrozen?: boolean | undefined;
520
+ } | {
521
+ id: string;
522
+ networkId: string;
523
+ decimals: number;
524
+ symbol: string;
525
+ type: "substrate-dtao";
526
+ platform: "polkadot";
527
+ netuid: number;
528
+ isTransferable: boolean;
529
+ isDefault?: boolean | undefined;
530
+ name?: string | undefined;
531
+ logo?: string | undefined;
532
+ coingeckoId?: string | undefined;
533
+ noDiscovery?: boolean | undefined;
534
+ mirrorOf?: string | undefined;
535
+ subnetName?: string | undefined;
536
+ hotkey?: string | undefined;
537
+ } | {
538
+ id: string;
539
+ networkId: string;
540
+ decimals: number;
541
+ symbol: string;
542
+ type: "substrate-foreignassets";
543
+ platform: "polkadot";
544
+ onChainId: string;
545
+ isSufficient: boolean;
546
+ existentialDeposit: string;
547
+ isDefault?: boolean | undefined;
548
+ name?: string | undefined;
549
+ logo?: string | undefined;
550
+ coingeckoId?: string | undefined;
551
+ noDiscovery?: boolean | undefined;
552
+ mirrorOf?: string | undefined;
553
+ isFrozen?: boolean | undefined;
554
+ } | {
555
+ id: string;
556
+ networkId: string;
557
+ decimals: number;
558
+ symbol: string;
559
+ type: "substrate-native";
560
+ platform: "polkadot";
561
+ existentialDeposit: string;
562
+ isDefault?: boolean | undefined;
563
+ name?: string | undefined;
564
+ logo?: string | undefined;
565
+ coingeckoId?: string | undefined;
566
+ noDiscovery?: boolean | undefined;
567
+ mirrorOf?: string | undefined;
568
+ } | {
569
+ id: string;
570
+ networkId: string;
571
+ decimals: number;
572
+ symbol: string;
573
+ type: "substrate-psp22";
574
+ platform: "polkadot";
575
+ contractAddress: string;
576
+ isDefault?: boolean | undefined;
577
+ name?: string | undefined;
578
+ logo?: string | undefined;
579
+ coingeckoId?: string | undefined;
580
+ noDiscovery?: boolean | undefined;
581
+ mirrorOf?: string | undefined;
582
+ } | {
583
+ id: string;
584
+ networkId: string;
585
+ decimals: number;
586
+ symbol: string;
587
+ type: "substrate-tokens";
588
+ platform: "polkadot";
589
+ onChainId: string | number;
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
+ } | {
598
+ id: string;
599
+ networkId: string;
600
+ decimals: number;
601
+ symbol: string;
602
+ type: "substrate-hydration";
603
+ platform: "polkadot";
604
+ onChainId: number;
605
+ assetType: "Token" | "Erc20" | "External";
606
+ isSufficient: boolean;
607
+ existentialDeposit: string;
608
+ isDefault?: boolean | undefined;
609
+ name?: string | undefined;
610
+ logo?: string | undefined;
611
+ coingeckoId?: string | undefined;
612
+ noDiscovery?: boolean | undefined;
613
+ mirrorOf?: string | undefined;
614
+ } | {
615
+ id: string;
616
+ networkId: string;
617
+ decimals: number;
618
+ symbol: string;
619
+ type: "sol-native";
620
+ platform: "solana";
621
+ isDefault?: boolean | undefined;
622
+ name?: string | undefined;
623
+ logo?: string | undefined;
624
+ coingeckoId?: string | undefined;
625
+ noDiscovery?: boolean | undefined;
626
+ mirrorOf?: string | undefined;
627
+ } | {
628
+ id: string;
629
+ networkId: string;
630
+ decimals: number;
631
+ symbol: string;
632
+ type: "sol-spl";
633
+ platform: "solana";
634
+ mintAddress: 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
+ }>>;
643
+ declare const tokensAtom: jotai.Atom<Promise<({
644
+ id: string;
645
+ networkId: string;
646
+ decimals: number;
647
+ symbol: string;
648
+ type: "evm-erc20";
649
+ platform: "ethereum";
650
+ contractAddress: `0x${string}`;
651
+ isDefault?: boolean | undefined;
652
+ name?: string | undefined;
653
+ logo?: string | undefined;
654
+ coingeckoId?: string | undefined;
655
+ noDiscovery?: boolean | undefined;
656
+ mirrorOf?: string | undefined;
657
+ } | {
658
+ id: string;
659
+ networkId: string;
660
+ decimals: number;
661
+ symbol: string;
662
+ type: "evm-native";
663
+ platform: "ethereum";
664
+ isDefault?: boolean | undefined;
665
+ name?: string | undefined;
666
+ logo?: string | undefined;
667
+ coingeckoId?: string | undefined;
668
+ noDiscovery?: boolean | undefined;
669
+ mirrorOf?: string | undefined;
670
+ } | {
671
+ id: string;
672
+ networkId: string;
673
+ decimals: number;
674
+ symbol: string;
675
+ type: "evm-uniswapv2";
676
+ platform: "ethereum";
677
+ contractAddress: `0x${string}`;
678
+ symbol0: string;
679
+ symbol1: string;
680
+ decimals0: number;
681
+ decimals1: number;
682
+ tokenAddress0: `0x${string}`;
683
+ tokenAddress1: `0x${string}`;
684
+ isDefault?: boolean | undefined;
685
+ name?: string | undefined;
686
+ logo?: string | undefined;
687
+ coingeckoId?: string | undefined;
688
+ noDiscovery?: boolean | undefined;
689
+ mirrorOf?: string | undefined;
690
+ isCustom?: boolean | undefined;
691
+ coingeckoId0?: string | undefined;
692
+ coingeckoId1?: string | undefined;
693
+ } | {
694
+ id: string;
695
+ networkId: string;
696
+ decimals: number;
697
+ symbol: string;
698
+ type: "substrate-assets";
699
+ platform: "polkadot";
700
+ assetId: string;
701
+ isSufficient: boolean;
702
+ existentialDeposit: string;
703
+ isDefault?: boolean | undefined;
704
+ name?: string | undefined;
705
+ logo?: string | undefined;
706
+ coingeckoId?: string | undefined;
707
+ noDiscovery?: boolean | undefined;
708
+ mirrorOf?: string | undefined;
709
+ isFrozen?: boolean | undefined;
710
+ } | {
711
+ id: string;
712
+ networkId: string;
713
+ decimals: number;
714
+ symbol: string;
715
+ type: "substrate-dtao";
716
+ platform: "polkadot";
717
+ netuid: number;
718
+ isTransferable: boolean;
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
+ subnetName?: string | undefined;
726
+ hotkey?: string | undefined;
727
+ } | {
728
+ id: string;
729
+ networkId: string;
730
+ decimals: number;
731
+ symbol: string;
732
+ type: "substrate-foreignassets";
733
+ platform: "polkadot";
734
+ onChainId: string;
735
+ isSufficient: boolean;
736
+ existentialDeposit: string;
737
+ isDefault?: boolean | undefined;
738
+ name?: string | undefined;
739
+ logo?: string | undefined;
740
+ coingeckoId?: string | undefined;
741
+ noDiscovery?: boolean | undefined;
742
+ mirrorOf?: string | undefined;
743
+ isFrozen?: boolean | undefined;
744
+ } | {
745
+ id: string;
746
+ networkId: string;
747
+ decimals: number;
748
+ symbol: string;
749
+ type: "substrate-native";
750
+ platform: "polkadot";
751
+ existentialDeposit: string;
752
+ isDefault?: boolean | undefined;
753
+ name?: string | undefined;
754
+ logo?: string | undefined;
755
+ coingeckoId?: string | undefined;
756
+ noDiscovery?: boolean | undefined;
757
+ mirrorOf?: string | undefined;
758
+ } | {
759
+ id: string;
760
+ networkId: string;
761
+ decimals: number;
762
+ symbol: string;
763
+ type: "substrate-psp22";
764
+ platform: "polkadot";
765
+ contractAddress: string;
766
+ isDefault?: boolean | undefined;
767
+ name?: string | undefined;
768
+ logo?: string | undefined;
769
+ coingeckoId?: string | undefined;
770
+ noDiscovery?: boolean | undefined;
771
+ mirrorOf?: string | undefined;
772
+ } | {
773
+ id: string;
774
+ networkId: string;
775
+ decimals: number;
776
+ symbol: string;
777
+ type: "substrate-tokens";
778
+ platform: "polkadot";
779
+ onChainId: string | number;
780
+ existentialDeposit: string;
781
+ isDefault?: boolean | undefined;
782
+ name?: string | undefined;
783
+ logo?: string | undefined;
784
+ coingeckoId?: string | undefined;
785
+ noDiscovery?: boolean | undefined;
786
+ mirrorOf?: string | undefined;
787
+ } | {
788
+ id: string;
789
+ networkId: string;
790
+ decimals: number;
791
+ symbol: string;
792
+ type: "substrate-hydration";
793
+ platform: "polkadot";
794
+ onChainId: number;
795
+ assetType: "Token" | "Erc20" | "External";
796
+ isSufficient: boolean;
797
+ existentialDeposit: string;
798
+ isDefault?: boolean | undefined;
799
+ name?: string | undefined;
800
+ logo?: string | undefined;
801
+ coingeckoId?: string | undefined;
802
+ noDiscovery?: boolean | undefined;
803
+ mirrorOf?: string | undefined;
804
+ } | {
805
+ id: string;
806
+ networkId: string;
807
+ decimals: number;
808
+ symbol: string;
809
+ type: "sol-native";
810
+ platform: "solana";
811
+ isDefault?: boolean | undefined;
812
+ name?: string | undefined;
813
+ logo?: string | undefined;
814
+ coingeckoId?: string | undefined;
815
+ noDiscovery?: boolean | undefined;
816
+ mirrorOf?: string | undefined;
817
+ } | {
818
+ id: string;
819
+ networkId: string;
820
+ decimals: number;
821
+ symbol: string;
822
+ type: "sol-spl";
823
+ platform: "solana";
824
+ mintAddress: string;
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
+ declare const networksAtom: jotai.Atom<Promise<({
833
+ id: string;
834
+ name: string;
835
+ nativeTokenId: string;
836
+ nativeCurrency: {
837
+ decimals: number;
838
+ symbol: string;
839
+ name: string;
840
+ coingeckoId?: string | undefined;
841
+ mirrorOf?: string | undefined;
842
+ logo?: string | undefined;
843
+ };
844
+ blockExplorerUrls: string[];
845
+ genesisHash: `0x${string}`;
846
+ platform: "polkadot";
847
+ chainName: string;
848
+ specName: string;
849
+ specVersion: number;
850
+ account: "secp256k1" | "*25519";
851
+ prefix: number;
852
+ rpcs: string[];
853
+ topology: {
854
+ type: "standalone";
855
+ } | {
856
+ type: "relay";
857
+ } | {
858
+ type: "parachain";
859
+ relayId: string;
860
+ paraId: number;
861
+ };
862
+ isTestnet?: boolean | undefined;
863
+ isDefault?: boolean | undefined;
864
+ forceScan?: boolean | undefined;
865
+ logo?: string | undefined;
866
+ themeColor?: string | undefined;
867
+ chainspecQrUrl?: string | undefined;
868
+ latestMetadataQrUrl?: string | undefined;
869
+ oldPrefix?: number | undefined;
870
+ registryTypes?: any;
871
+ signedExtensions?: any;
872
+ hasCheckMetadataHash?: boolean | undefined;
873
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
874
+ isUnknownFeeToken?: boolean | undefined;
875
+ balancesConfig?: {
876
+ "substrate-native"?: {
877
+ disable?: boolean | undefined;
878
+ } | undefined;
879
+ "substrate-assets"?: Record<string, never> | undefined;
880
+ "substrate-psp22"?: Record<string, never> | undefined;
881
+ "substrate-tokens"?: {
882
+ palletId?: string | undefined;
883
+ } | undefined;
884
+ "substrate-foreignassets"?: Record<string, never> | undefined;
885
+ "substrate-hydration"?: Record<string, never> | undefined;
886
+ "substrate-dtao"?: Record<string, never> | undefined;
887
+ } | undefined;
888
+ } | {
889
+ id: string;
890
+ name: string;
891
+ nativeTokenId: string;
892
+ nativeCurrency: {
893
+ decimals: number;
894
+ symbol: string;
895
+ name: string;
896
+ coingeckoId?: string | undefined;
897
+ mirrorOf?: string | undefined;
898
+ logo?: string | undefined;
899
+ };
900
+ blockExplorerUrls: string[];
901
+ platform: "ethereum";
902
+ rpcs: string[];
903
+ isTestnet?: boolean | undefined;
904
+ isDefault?: boolean | undefined;
905
+ forceScan?: boolean | undefined;
906
+ logo?: string | undefined;
907
+ themeColor?: string | undefined;
908
+ substrateChainId?: string | undefined;
909
+ preserveGasEstimate?: boolean | undefined;
910
+ feeType?: "legacy" | "eip-1559" | undefined;
911
+ l2FeeType?: {
912
+ type: "op-stack";
913
+ } | {
914
+ type: "scroll";
915
+ l1GasPriceOracle: `0x${string}`;
916
+ } | undefined;
917
+ contracts?: {
918
+ Erc20Aggregator?: `0x${string}` | undefined;
919
+ Multicall3?: `0x${string}` | undefined;
920
+ } | undefined;
921
+ balancesConfig?: {
922
+ "evm-native"?: Record<string, never> | undefined;
923
+ "evm-erc20"?: Record<string, never> | undefined;
924
+ "evm-uniswapv2"?: Record<string, never> | undefined;
925
+ } | undefined;
926
+ } | {
927
+ id: string;
928
+ name: string;
929
+ nativeTokenId: string;
930
+ nativeCurrency: {
931
+ decimals: number;
932
+ symbol: string;
933
+ name: string;
934
+ coingeckoId?: string | undefined;
935
+ mirrorOf?: string | undefined;
936
+ logo?: string | undefined;
937
+ };
938
+ blockExplorerUrls: string[];
939
+ platform: "solana";
940
+ genesisHash: string;
941
+ rpcs: string[];
942
+ isTestnet?: boolean | undefined;
943
+ isDefault?: boolean | undefined;
944
+ forceScan?: boolean | undefined;
945
+ logo?: string | undefined;
946
+ themeColor?: string | undefined;
947
+ balancesConfig?: {
948
+ "sol-native"?: Record<string, never> | undefined;
949
+ "sol-spl"?: Record<string, never> | undefined;
950
+ } | undefined;
951
+ })[]>>;
952
+
953
+ declare const chaindataProviderAtom: jotai.Atom<ChaindataProvider>;
954
+ declare const useSyncSwapsChaindata: () => [void, never];
955
+
956
+ declare const coinsApiConfigAtom: jotai.WritableAtom<CoinsApiConfig, [Partial<CoinsApiConfig>], void>;
957
+ declare const enableTestnetsAtom: jotai.PrimitiveAtom<boolean> & {
958
+ init: boolean;
959
+ };
960
+ declare const enabledChainsAtom: jotai.PrimitiveAtom<string[] | undefined> & {
961
+ init: string[] | undefined;
962
+ };
963
+ declare const enabledTokensAtom: jotai.PrimitiveAtom<string[] | undefined> & {
964
+ init: string[] | undefined;
965
+ };
966
+
967
+ declare const cryptoWaitReadyAtom: jotai.Atom<Promise<boolean>>;
968
+
969
+ declare const tokenRatesAtom: jotai.Atom<Promise<_talismn_token_rates.TokenRatesList>>;
970
+
971
+ declare const useSetBalancesAddresses: (addresses: string[]) => void;
972
+ /**
973
+ * @name useBalances
974
+ * @description Hook to get the current balances state.
975
+ * @param persistBackend an optional BalancesPersistBackend backend to use for persisting the balances state. By default, indexedDB is used.
976
+ * @returns a Balances object containing the current balances state.
977
+ */
978
+ declare const useBalances: () => Balances;
979
+ type BalancesStatus = {
980
+ status: "live";
981
+ } | {
982
+ status: "fetching";
983
+ } | {
984
+ status: "stale";
985
+ staleChains: string[];
986
+ };
987
+ /**
988
+ * Given a collection of `Balances`, this hook returns a `BalancesStatus` summary for the collection.
989
+ *
990
+ * @param balances The collection of balances to get the status from.
991
+ * @returns An instance of `BalancesStatus` which represents the status of the balances collection.
992
+
993
+ */
994
+ declare const useBalancesStatus: (balances: Balances) => BalancesStatus;
995
+ declare const getStaleChains: (balances: Balances) => string[];
996
+
997
+ declare const useChainConnectors: () => _talismn_balances.ChainConnectors;
998
+
999
+ declare const useChaindataProvider: () => _talismn_chaindata_provider.ChaindataProvider;
1000
+ declare const useChaindata: () => {
1001
+ networks: ({
1002
+ id: string;
1003
+ name: string;
1004
+ nativeTokenId: string;
1005
+ nativeCurrency: {
1006
+ decimals: number;
1007
+ symbol: string;
1008
+ name: string;
1009
+ coingeckoId?: string | undefined;
1010
+ mirrorOf?: string | undefined;
1011
+ logo?: string | undefined;
1012
+ };
1013
+ blockExplorerUrls: string[];
1014
+ genesisHash: `0x${string}`;
1015
+ platform: "polkadot";
1016
+ chainName: string;
1017
+ specName: string;
1018
+ specVersion: number;
1019
+ account: "secp256k1" | "*25519";
1020
+ prefix: number;
1021
+ rpcs: string[];
1022
+ topology: {
1023
+ type: "standalone";
1024
+ } | {
1025
+ type: "relay";
1026
+ } | {
1027
+ type: "parachain";
1028
+ relayId: string;
1029
+ paraId: number;
1030
+ };
1031
+ isTestnet?: boolean | undefined;
1032
+ isDefault?: boolean | undefined;
1033
+ forceScan?: boolean | undefined;
1034
+ logo?: string | undefined;
1035
+ themeColor?: string | undefined;
1036
+ chainspecQrUrl?: string | undefined;
1037
+ latestMetadataQrUrl?: string | undefined;
1038
+ oldPrefix?: number | undefined;
1039
+ registryTypes?: any;
1040
+ signedExtensions?: any;
1041
+ hasCheckMetadataHash?: boolean | undefined;
1042
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
1043
+ isUnknownFeeToken?: boolean | undefined;
1044
+ balancesConfig?: {
1045
+ "substrate-native"?: {
1046
+ disable?: boolean | undefined;
1047
+ } | undefined;
1048
+ "substrate-assets"?: Record<string, never> | undefined;
1049
+ "substrate-psp22"?: Record<string, never> | undefined;
1050
+ "substrate-tokens"?: {
1051
+ palletId?: string | undefined;
1052
+ } | undefined;
1053
+ "substrate-foreignassets"?: Record<string, never> | undefined;
1054
+ "substrate-hydration"?: Record<string, never> | undefined;
1055
+ "substrate-dtao"?: Record<string, never> | undefined;
1056
+ } | undefined;
1057
+ } | {
1058
+ id: string;
1059
+ name: string;
1060
+ nativeTokenId: string;
1061
+ nativeCurrency: {
1062
+ decimals: number;
1063
+ symbol: string;
1064
+ name: string;
1065
+ coingeckoId?: string | undefined;
1066
+ mirrorOf?: string | undefined;
1067
+ logo?: string | undefined;
1068
+ };
1069
+ blockExplorerUrls: string[];
1070
+ platform: "ethereum";
1071
+ rpcs: string[];
1072
+ isTestnet?: boolean | undefined;
1073
+ isDefault?: boolean | undefined;
1074
+ forceScan?: boolean | undefined;
1075
+ logo?: string | undefined;
1076
+ themeColor?: string | undefined;
1077
+ substrateChainId?: string | undefined;
1078
+ preserveGasEstimate?: boolean | undefined;
1079
+ feeType?: "legacy" | "eip-1559" | undefined;
1080
+ l2FeeType?: {
1081
+ type: "op-stack";
1082
+ } | {
1083
+ type: "scroll";
1084
+ l1GasPriceOracle: `0x${string}`;
1085
+ } | undefined;
1086
+ contracts?: {
1087
+ Erc20Aggregator?: `0x${string}` | undefined;
1088
+ Multicall3?: `0x${string}` | undefined;
1089
+ } | undefined;
1090
+ balancesConfig?: {
1091
+ "evm-native"?: Record<string, never> | undefined;
1092
+ "evm-erc20"?: Record<string, never> | undefined;
1093
+ "evm-uniswapv2"?: Record<string, never> | undefined;
1094
+ } | undefined;
1095
+ } | {
1096
+ id: string;
1097
+ name: string;
1098
+ nativeTokenId: string;
1099
+ nativeCurrency: {
1100
+ decimals: number;
1101
+ symbol: string;
1102
+ name: string;
1103
+ coingeckoId?: string | undefined;
1104
+ mirrorOf?: string | undefined;
1105
+ logo?: string | undefined;
1106
+ };
1107
+ blockExplorerUrls: string[];
1108
+ platform: "solana";
1109
+ genesisHash: string;
1110
+ rpcs: string[];
1111
+ isTestnet?: boolean | undefined;
1112
+ isDefault?: boolean | undefined;
1113
+ forceScan?: boolean | undefined;
1114
+ logo?: string | undefined;
1115
+ themeColor?: string | undefined;
1116
+ balancesConfig?: {
1117
+ "sol-native"?: Record<string, never> | undefined;
1118
+ "sol-spl"?: Record<string, never> | undefined;
1119
+ } | undefined;
1120
+ })[];
1121
+ tokens: ({
1122
+ id: string;
1123
+ networkId: string;
1124
+ decimals: number;
1125
+ symbol: string;
1126
+ type: "evm-erc20";
1127
+ platform: "ethereum";
1128
+ contractAddress: `0x${string}`;
1129
+ isDefault?: boolean | undefined;
1130
+ name?: string | undefined;
1131
+ logo?: string | undefined;
1132
+ coingeckoId?: string | undefined;
1133
+ noDiscovery?: boolean | undefined;
1134
+ mirrorOf?: string | undefined;
1135
+ } | {
1136
+ id: string;
1137
+ networkId: string;
1138
+ decimals: number;
1139
+ symbol: string;
1140
+ type: "evm-native";
1141
+ platform: "ethereum";
1142
+ isDefault?: boolean | undefined;
1143
+ name?: string | undefined;
1144
+ logo?: string | undefined;
1145
+ coingeckoId?: string | undefined;
1146
+ noDiscovery?: boolean | undefined;
1147
+ mirrorOf?: string | undefined;
1148
+ } | {
1149
+ id: string;
1150
+ networkId: string;
1151
+ decimals: number;
1152
+ symbol: string;
1153
+ type: "evm-uniswapv2";
1154
+ platform: "ethereum";
1155
+ contractAddress: `0x${string}`;
1156
+ symbol0: string;
1157
+ symbol1: string;
1158
+ decimals0: number;
1159
+ decimals1: number;
1160
+ tokenAddress0: `0x${string}`;
1161
+ tokenAddress1: `0x${string}`;
1162
+ isDefault?: boolean | undefined;
1163
+ name?: string | undefined;
1164
+ logo?: string | undefined;
1165
+ coingeckoId?: string | undefined;
1166
+ noDiscovery?: boolean | undefined;
1167
+ mirrorOf?: string | undefined;
1168
+ isCustom?: boolean | undefined;
1169
+ coingeckoId0?: string | undefined;
1170
+ coingeckoId1?: string | undefined;
1171
+ } | {
1172
+ id: string;
1173
+ networkId: string;
1174
+ decimals: number;
1175
+ symbol: string;
1176
+ type: "substrate-assets";
1177
+ platform: "polkadot";
1178
+ assetId: string;
1179
+ isSufficient: boolean;
1180
+ existentialDeposit: string;
1181
+ isDefault?: boolean | undefined;
1182
+ name?: string | undefined;
1183
+ logo?: string | undefined;
1184
+ coingeckoId?: string | undefined;
1185
+ noDiscovery?: boolean | undefined;
1186
+ mirrorOf?: string | undefined;
1187
+ isFrozen?: boolean | undefined;
1188
+ } | {
1189
+ id: string;
1190
+ networkId: string;
1191
+ decimals: number;
1192
+ symbol: string;
1193
+ type: "substrate-dtao";
1194
+ platform: "polkadot";
1195
+ netuid: number;
1196
+ isTransferable: boolean;
1197
+ isDefault?: boolean | undefined;
1198
+ name?: string | undefined;
1199
+ logo?: string | undefined;
1200
+ coingeckoId?: string | undefined;
1201
+ noDiscovery?: boolean | undefined;
1202
+ mirrorOf?: string | undefined;
1203
+ subnetName?: string | undefined;
1204
+ hotkey?: string | undefined;
1205
+ } | {
1206
+ id: string;
1207
+ networkId: string;
1208
+ decimals: number;
1209
+ symbol: string;
1210
+ type: "substrate-foreignassets";
1211
+ platform: "polkadot";
1212
+ onChainId: string;
1213
+ isSufficient: boolean;
1214
+ existentialDeposit: string;
1215
+ isDefault?: boolean | undefined;
1216
+ name?: string | undefined;
1217
+ logo?: string | undefined;
1218
+ coingeckoId?: string | undefined;
1219
+ noDiscovery?: boolean | undefined;
1220
+ mirrorOf?: string | undefined;
1221
+ isFrozen?: boolean | undefined;
1222
+ } | {
1223
+ id: string;
1224
+ networkId: string;
1225
+ decimals: number;
1226
+ symbol: string;
1227
+ type: "substrate-native";
1228
+ platform: "polkadot";
1229
+ existentialDeposit: string;
1230
+ isDefault?: boolean | undefined;
1231
+ name?: string | undefined;
1232
+ logo?: string | undefined;
1233
+ coingeckoId?: string | undefined;
1234
+ noDiscovery?: boolean | undefined;
1235
+ mirrorOf?: string | undefined;
1236
+ } | {
1237
+ id: string;
1238
+ networkId: string;
1239
+ decimals: number;
1240
+ symbol: string;
1241
+ type: "substrate-psp22";
1242
+ platform: "polkadot";
1243
+ contractAddress: string;
1244
+ isDefault?: boolean | undefined;
1245
+ name?: string | undefined;
1246
+ logo?: string | undefined;
1247
+ coingeckoId?: string | undefined;
1248
+ noDiscovery?: boolean | undefined;
1249
+ mirrorOf?: string | undefined;
1250
+ } | {
1251
+ id: string;
1252
+ networkId: string;
1253
+ decimals: number;
1254
+ symbol: string;
1255
+ type: "substrate-tokens";
1256
+ platform: "polkadot";
1257
+ onChainId: string | number;
1258
+ existentialDeposit: string;
1259
+ isDefault?: boolean | undefined;
1260
+ name?: string | undefined;
1261
+ logo?: string | undefined;
1262
+ coingeckoId?: string | undefined;
1263
+ noDiscovery?: boolean | undefined;
1264
+ mirrorOf?: string | undefined;
1265
+ } | {
1266
+ id: string;
1267
+ networkId: string;
1268
+ decimals: number;
1269
+ symbol: string;
1270
+ type: "substrate-hydration";
1271
+ platform: "polkadot";
1272
+ onChainId: number;
1273
+ assetType: "Token" | "Erc20" | "External";
1274
+ isSufficient: boolean;
1275
+ existentialDeposit: string;
1276
+ isDefault?: boolean | undefined;
1277
+ name?: string | undefined;
1278
+ logo?: string | undefined;
1279
+ coingeckoId?: string | undefined;
1280
+ noDiscovery?: boolean | undefined;
1281
+ mirrorOf?: string | undefined;
1282
+ } | {
1283
+ id: string;
1284
+ networkId: string;
1285
+ decimals: number;
1286
+ symbol: string;
1287
+ type: "sol-native";
1288
+ platform: "solana";
1289
+ isDefault?: boolean | undefined;
1290
+ name?: string | undefined;
1291
+ logo?: string | undefined;
1292
+ coingeckoId?: string | undefined;
1293
+ noDiscovery?: boolean | undefined;
1294
+ mirrorOf?: string | undefined;
1295
+ } | {
1296
+ id: string;
1297
+ networkId: string;
1298
+ decimals: number;
1299
+ symbol: string;
1300
+ type: "sol-spl";
1301
+ platform: "solana";
1302
+ mintAddress: string;
1303
+ isDefault?: boolean | undefined;
1304
+ name?: string | undefined;
1305
+ logo?: string | undefined;
1306
+ coingeckoId?: string | undefined;
1307
+ noDiscovery?: boolean | undefined;
1308
+ mirrorOf?: string | undefined;
1309
+ })[];
1310
+ };
1311
+ declare const useNetworks: () => ({
1312
+ id: string;
1313
+ name: string;
1314
+ nativeTokenId: string;
1315
+ nativeCurrency: {
1316
+ decimals: number;
1317
+ symbol: string;
1318
+ name: string;
1319
+ coingeckoId?: string | undefined;
1320
+ mirrorOf?: string | undefined;
1321
+ logo?: string | undefined;
1322
+ };
1323
+ blockExplorerUrls: string[];
1324
+ genesisHash: `0x${string}`;
1325
+ platform: "polkadot";
1326
+ chainName: string;
1327
+ specName: string;
1328
+ specVersion: number;
1329
+ account: "secp256k1" | "*25519";
1330
+ prefix: number;
1331
+ rpcs: string[];
1332
+ topology: {
1333
+ type: "standalone";
1334
+ } | {
1335
+ type: "relay";
1336
+ } | {
1337
+ type: "parachain";
1338
+ relayId: string;
1339
+ paraId: number;
1340
+ };
1341
+ isTestnet?: boolean | undefined;
1342
+ isDefault?: boolean | undefined;
1343
+ forceScan?: boolean | undefined;
1344
+ logo?: string | undefined;
1345
+ themeColor?: string | undefined;
1346
+ chainspecQrUrl?: string | undefined;
1347
+ latestMetadataQrUrl?: string | undefined;
1348
+ oldPrefix?: number | undefined;
1349
+ registryTypes?: any;
1350
+ signedExtensions?: any;
1351
+ hasCheckMetadataHash?: boolean | undefined;
1352
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
1353
+ isUnknownFeeToken?: boolean | undefined;
1354
+ balancesConfig?: {
1355
+ "substrate-native"?: {
1356
+ disable?: boolean | undefined;
1357
+ } | undefined;
1358
+ "substrate-assets"?: Record<string, never> | undefined;
1359
+ "substrate-psp22"?: Record<string, never> | undefined;
1360
+ "substrate-tokens"?: {
1361
+ palletId?: string | undefined;
1362
+ } | undefined;
1363
+ "substrate-foreignassets"?: Record<string, never> | undefined;
1364
+ "substrate-hydration"?: Record<string, never> | undefined;
1365
+ "substrate-dtao"?: Record<string, never> | undefined;
1366
+ } | undefined;
1367
+ } | {
1368
+ id: string;
1369
+ name: string;
1370
+ nativeTokenId: string;
1371
+ nativeCurrency: {
1372
+ decimals: number;
1373
+ symbol: string;
1374
+ name: string;
1375
+ coingeckoId?: string | undefined;
1376
+ mirrorOf?: string | undefined;
1377
+ logo?: string | undefined;
1378
+ };
1379
+ blockExplorerUrls: string[];
1380
+ platform: "ethereum";
1381
+ rpcs: string[];
1382
+ isTestnet?: boolean | undefined;
1383
+ isDefault?: boolean | undefined;
1384
+ forceScan?: boolean | undefined;
1385
+ logo?: string | undefined;
1386
+ themeColor?: string | undefined;
1387
+ substrateChainId?: string | undefined;
1388
+ preserveGasEstimate?: boolean | undefined;
1389
+ feeType?: "legacy" | "eip-1559" | undefined;
1390
+ l2FeeType?: {
1391
+ type: "op-stack";
1392
+ } | {
1393
+ type: "scroll";
1394
+ l1GasPriceOracle: `0x${string}`;
1395
+ } | undefined;
1396
+ contracts?: {
1397
+ Erc20Aggregator?: `0x${string}` | undefined;
1398
+ Multicall3?: `0x${string}` | undefined;
1399
+ } | undefined;
1400
+ balancesConfig?: {
1401
+ "evm-native"?: Record<string, never> | undefined;
1402
+ "evm-erc20"?: Record<string, never> | undefined;
1403
+ "evm-uniswapv2"?: Record<string, never> | undefined;
1404
+ } | undefined;
1405
+ } | {
1406
+ id: string;
1407
+ name: string;
1408
+ nativeTokenId: string;
1409
+ nativeCurrency: {
1410
+ decimals: number;
1411
+ symbol: string;
1412
+ name: string;
1413
+ coingeckoId?: string | undefined;
1414
+ mirrorOf?: string | undefined;
1415
+ logo?: string | undefined;
1416
+ };
1417
+ blockExplorerUrls: string[];
1418
+ platform: "solana";
1419
+ genesisHash: string;
1420
+ rpcs: string[];
1421
+ isTestnet?: boolean | undefined;
1422
+ isDefault?: boolean | undefined;
1423
+ forceScan?: boolean | undefined;
1424
+ logo?: string | undefined;
1425
+ themeColor?: string | undefined;
1426
+ balancesConfig?: {
1427
+ "sol-native"?: Record<string, never> | undefined;
1428
+ "sol-spl"?: Record<string, never> | undefined;
1429
+ } | undefined;
1430
+ })[];
1431
+ declare const useNetworksById: () => lodash.Dictionary<{
1432
+ id: string;
1433
+ name: string;
1434
+ nativeTokenId: string;
1435
+ nativeCurrency: {
1436
+ decimals: number;
1437
+ symbol: string;
1438
+ name: string;
1439
+ coingeckoId?: string | undefined;
1440
+ mirrorOf?: string | undefined;
1441
+ logo?: string | undefined;
1442
+ };
1443
+ blockExplorerUrls: string[];
1444
+ genesisHash: `0x${string}`;
1445
+ platform: "polkadot";
1446
+ chainName: string;
1447
+ specName: string;
1448
+ specVersion: number;
1449
+ account: "secp256k1" | "*25519";
1450
+ prefix: number;
1451
+ rpcs: string[];
1452
+ topology: {
1453
+ type: "standalone";
1454
+ } | {
1455
+ type: "relay";
1456
+ } | {
1457
+ type: "parachain";
1458
+ relayId: string;
1459
+ paraId: number;
1460
+ };
1461
+ isTestnet?: boolean | undefined;
1462
+ isDefault?: boolean | undefined;
1463
+ forceScan?: boolean | undefined;
1464
+ logo?: string | undefined;
1465
+ themeColor?: string | undefined;
1466
+ chainspecQrUrl?: string | undefined;
1467
+ latestMetadataQrUrl?: string | undefined;
1468
+ oldPrefix?: number | undefined;
1469
+ registryTypes?: any;
1470
+ signedExtensions?: any;
1471
+ hasCheckMetadataHash?: boolean | undefined;
1472
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
1473
+ isUnknownFeeToken?: boolean | undefined;
1474
+ balancesConfig?: {
1475
+ "substrate-native"?: {
1476
+ disable?: boolean | undefined;
1477
+ } | undefined;
1478
+ "substrate-assets"?: Record<string, never> | undefined;
1479
+ "substrate-psp22"?: Record<string, never> | undefined;
1480
+ "substrate-tokens"?: {
1481
+ palletId?: string | undefined;
1482
+ } | undefined;
1483
+ "substrate-foreignassets"?: Record<string, never> | undefined;
1484
+ "substrate-hydration"?: Record<string, never> | undefined;
1485
+ "substrate-dtao"?: Record<string, never> | undefined;
1486
+ } | undefined;
1487
+ } | {
1488
+ id: string;
1489
+ name: string;
1490
+ nativeTokenId: string;
1491
+ nativeCurrency: {
1492
+ decimals: number;
1493
+ symbol: string;
1494
+ name: string;
1495
+ coingeckoId?: string | undefined;
1496
+ mirrorOf?: string | undefined;
1497
+ logo?: string | undefined;
1498
+ };
1499
+ blockExplorerUrls: string[];
1500
+ platform: "ethereum";
1501
+ rpcs: string[];
1502
+ isTestnet?: boolean | undefined;
1503
+ isDefault?: boolean | undefined;
1504
+ forceScan?: boolean | undefined;
1505
+ logo?: string | undefined;
1506
+ themeColor?: string | undefined;
1507
+ substrateChainId?: string | undefined;
1508
+ preserveGasEstimate?: boolean | undefined;
1509
+ feeType?: "legacy" | "eip-1559" | undefined;
1510
+ l2FeeType?: {
1511
+ type: "op-stack";
1512
+ } | {
1513
+ type: "scroll";
1514
+ l1GasPriceOracle: `0x${string}`;
1515
+ } | undefined;
1516
+ contracts?: {
1517
+ Erc20Aggregator?: `0x${string}` | undefined;
1518
+ Multicall3?: `0x${string}` | undefined;
1519
+ } | undefined;
1520
+ balancesConfig?: {
1521
+ "evm-native"?: Record<string, never> | undefined;
1522
+ "evm-erc20"?: Record<string, never> | undefined;
1523
+ "evm-uniswapv2"?: Record<string, never> | undefined;
1524
+ } | undefined;
1525
+ } | {
1526
+ id: string;
1527
+ name: string;
1528
+ nativeTokenId: string;
1529
+ nativeCurrency: {
1530
+ decimals: number;
1531
+ symbol: string;
1532
+ name: string;
1533
+ coingeckoId?: string | undefined;
1534
+ mirrorOf?: string | undefined;
1535
+ logo?: string | undefined;
1536
+ };
1537
+ blockExplorerUrls: string[];
1538
+ platform: "solana";
1539
+ genesisHash: string;
1540
+ rpcs: string[];
1541
+ isTestnet?: boolean | undefined;
1542
+ isDefault?: boolean | undefined;
1543
+ forceScan?: boolean | undefined;
1544
+ logo?: string | undefined;
1545
+ themeColor?: string | undefined;
1546
+ balancesConfig?: {
1547
+ "sol-native"?: Record<string, never> | undefined;
1548
+ "sol-spl"?: Record<string, never> | undefined;
1549
+ } | undefined;
1550
+ }>;
1551
+ declare const useNetwork: (networkId?: NetworkId) => {
1552
+ id: string;
1553
+ name: string;
1554
+ nativeTokenId: string;
1555
+ nativeCurrency: {
1556
+ decimals: number;
1557
+ symbol: string;
1558
+ name: string;
1559
+ coingeckoId?: string | undefined;
1560
+ mirrorOf?: string | undefined;
1561
+ logo?: string | undefined;
1562
+ };
1563
+ blockExplorerUrls: string[];
1564
+ genesisHash: `0x${string}`;
1565
+ platform: "polkadot";
1566
+ chainName: string;
1567
+ specName: string;
1568
+ specVersion: number;
1569
+ account: "secp256k1" | "*25519";
1570
+ prefix: number;
1571
+ rpcs: string[];
1572
+ topology: {
1573
+ type: "standalone";
1574
+ } | {
1575
+ type: "relay";
1576
+ } | {
1577
+ type: "parachain";
1578
+ relayId: string;
1579
+ paraId: number;
1580
+ };
1581
+ isTestnet?: boolean | undefined;
1582
+ isDefault?: boolean | undefined;
1583
+ forceScan?: boolean | undefined;
1584
+ logo?: string | undefined;
1585
+ themeColor?: string | undefined;
1586
+ chainspecQrUrl?: string | undefined;
1587
+ latestMetadataQrUrl?: string | undefined;
1588
+ oldPrefix?: number | undefined;
1589
+ registryTypes?: any;
1590
+ signedExtensions?: any;
1591
+ hasCheckMetadataHash?: boolean | undefined;
1592
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
1593
+ isUnknownFeeToken?: boolean | undefined;
1594
+ balancesConfig?: {
1595
+ "substrate-native"?: {
1596
+ disable?: boolean | undefined;
1597
+ } | undefined;
1598
+ "substrate-assets"?: Record<string, never> | undefined;
1599
+ "substrate-psp22"?: Record<string, never> | undefined;
1600
+ "substrate-tokens"?: {
1601
+ palletId?: string | undefined;
1602
+ } | undefined;
1603
+ "substrate-foreignassets"?: Record<string, never> | undefined;
1604
+ "substrate-hydration"?: Record<string, never> | undefined;
1605
+ "substrate-dtao"?: Record<string, never> | undefined;
1606
+ } | undefined;
1607
+ } | {
1608
+ id: string;
1609
+ name: string;
1610
+ nativeTokenId: string;
1611
+ nativeCurrency: {
1612
+ decimals: number;
1613
+ symbol: string;
1614
+ name: string;
1615
+ coingeckoId?: string | undefined;
1616
+ mirrorOf?: string | undefined;
1617
+ logo?: string | undefined;
1618
+ };
1619
+ blockExplorerUrls: string[];
1620
+ platform: "ethereum";
1621
+ rpcs: string[];
1622
+ isTestnet?: boolean | undefined;
1623
+ isDefault?: boolean | undefined;
1624
+ forceScan?: boolean | undefined;
1625
+ logo?: string | undefined;
1626
+ themeColor?: string | undefined;
1627
+ substrateChainId?: string | undefined;
1628
+ preserveGasEstimate?: boolean | undefined;
1629
+ feeType?: "legacy" | "eip-1559" | undefined;
1630
+ l2FeeType?: {
1631
+ type: "op-stack";
1632
+ } | {
1633
+ type: "scroll";
1634
+ l1GasPriceOracle: `0x${string}`;
1635
+ } | undefined;
1636
+ contracts?: {
1637
+ Erc20Aggregator?: `0x${string}` | undefined;
1638
+ Multicall3?: `0x${string}` | undefined;
1639
+ } | undefined;
1640
+ balancesConfig?: {
1641
+ "evm-native"?: Record<string, never> | undefined;
1642
+ "evm-erc20"?: Record<string, never> | undefined;
1643
+ "evm-uniswapv2"?: Record<string, never> | undefined;
1644
+ } | undefined;
1645
+ } | {
1646
+ id: string;
1647
+ name: string;
1648
+ nativeTokenId: string;
1649
+ nativeCurrency: {
1650
+ decimals: number;
1651
+ symbol: string;
1652
+ name: string;
1653
+ coingeckoId?: string | undefined;
1654
+ mirrorOf?: string | undefined;
1655
+ logo?: string | undefined;
1656
+ };
1657
+ blockExplorerUrls: string[];
1658
+ platform: "solana";
1659
+ genesisHash: string;
1660
+ rpcs: string[];
1661
+ isTestnet?: boolean | undefined;
1662
+ isDefault?: boolean | undefined;
1663
+ forceScan?: boolean | undefined;
1664
+ logo?: string | undefined;
1665
+ themeColor?: string | undefined;
1666
+ balancesConfig?: {
1667
+ "sol-native"?: Record<string, never> | undefined;
1668
+ "sol-spl"?: Record<string, never> | undefined;
1669
+ } | undefined;
1670
+ };
1671
+ declare const useTokens: () => ({
1672
+ id: string;
1673
+ networkId: string;
1674
+ decimals: number;
1675
+ symbol: string;
1676
+ type: "evm-erc20";
1677
+ platform: "ethereum";
1678
+ contractAddress: `0x${string}`;
1679
+ isDefault?: boolean | undefined;
1680
+ name?: string | undefined;
1681
+ logo?: string | undefined;
1682
+ coingeckoId?: string | undefined;
1683
+ noDiscovery?: boolean | undefined;
1684
+ mirrorOf?: string | undefined;
1685
+ } | {
1686
+ id: string;
1687
+ networkId: string;
1688
+ decimals: number;
1689
+ symbol: string;
1690
+ type: "evm-native";
1691
+ platform: "ethereum";
1692
+ isDefault?: boolean | undefined;
1693
+ name?: string | undefined;
1694
+ logo?: string | undefined;
1695
+ coingeckoId?: string | undefined;
1696
+ noDiscovery?: boolean | undefined;
1697
+ mirrorOf?: string | undefined;
1698
+ } | {
1699
+ id: string;
1700
+ networkId: string;
1701
+ decimals: number;
1702
+ symbol: string;
1703
+ type: "evm-uniswapv2";
1704
+ platform: "ethereum";
1705
+ contractAddress: `0x${string}`;
1706
+ symbol0: string;
1707
+ symbol1: string;
1708
+ decimals0: number;
1709
+ decimals1: number;
1710
+ tokenAddress0: `0x${string}`;
1711
+ tokenAddress1: `0x${string}`;
1712
+ isDefault?: boolean | undefined;
1713
+ name?: string | undefined;
1714
+ logo?: string | undefined;
1715
+ coingeckoId?: string | undefined;
1716
+ noDiscovery?: boolean | undefined;
1717
+ mirrorOf?: string | undefined;
1718
+ isCustom?: boolean | undefined;
1719
+ coingeckoId0?: string | undefined;
1720
+ coingeckoId1?: string | undefined;
1721
+ } | {
1722
+ id: string;
1723
+ networkId: string;
1724
+ decimals: number;
1725
+ symbol: string;
1726
+ type: "substrate-assets";
1727
+ platform: "polkadot";
1728
+ assetId: string;
1729
+ isSufficient: boolean;
1730
+ existentialDeposit: string;
1731
+ isDefault?: boolean | undefined;
1732
+ name?: string | undefined;
1733
+ logo?: string | undefined;
1734
+ coingeckoId?: string | undefined;
1735
+ noDiscovery?: boolean | undefined;
1736
+ mirrorOf?: string | undefined;
1737
+ isFrozen?: boolean | undefined;
1738
+ } | {
1739
+ id: string;
1740
+ networkId: string;
1741
+ decimals: number;
1742
+ symbol: string;
1743
+ type: "substrate-dtao";
1744
+ platform: "polkadot";
1745
+ netuid: number;
1746
+ isTransferable: boolean;
1747
+ isDefault?: boolean | undefined;
1748
+ name?: string | undefined;
1749
+ logo?: string | undefined;
1750
+ coingeckoId?: string | undefined;
1751
+ noDiscovery?: boolean | undefined;
1752
+ mirrorOf?: string | undefined;
1753
+ subnetName?: string | undefined;
1754
+ hotkey?: string | undefined;
1755
+ } | {
1756
+ id: string;
1757
+ networkId: string;
1758
+ decimals: number;
1759
+ symbol: string;
1760
+ type: "substrate-foreignassets";
1761
+ platform: "polkadot";
1762
+ onChainId: string;
1763
+ isSufficient: boolean;
1764
+ existentialDeposit: string;
1765
+ isDefault?: boolean | undefined;
1766
+ name?: string | undefined;
1767
+ logo?: string | undefined;
1768
+ coingeckoId?: string | undefined;
1769
+ noDiscovery?: boolean | undefined;
1770
+ mirrorOf?: string | undefined;
1771
+ isFrozen?: boolean | undefined;
1772
+ } | {
1773
+ id: string;
1774
+ networkId: string;
1775
+ decimals: number;
1776
+ symbol: string;
1777
+ type: "substrate-native";
1778
+ platform: "polkadot";
1779
+ existentialDeposit: string;
1780
+ isDefault?: boolean | undefined;
1781
+ name?: string | undefined;
1782
+ logo?: string | undefined;
1783
+ coingeckoId?: string | undefined;
1784
+ noDiscovery?: boolean | undefined;
1785
+ mirrorOf?: string | undefined;
1786
+ } | {
1787
+ id: string;
1788
+ networkId: string;
1789
+ decimals: number;
1790
+ symbol: string;
1791
+ type: "substrate-psp22";
1792
+ platform: "polkadot";
1793
+ contractAddress: string;
1794
+ isDefault?: boolean | undefined;
1795
+ name?: string | undefined;
1796
+ logo?: string | undefined;
1797
+ coingeckoId?: string | undefined;
1798
+ noDiscovery?: boolean | undefined;
1799
+ mirrorOf?: string | undefined;
1800
+ } | {
1801
+ id: string;
1802
+ networkId: string;
1803
+ decimals: number;
1804
+ symbol: string;
1805
+ type: "substrate-tokens";
1806
+ platform: "polkadot";
1807
+ onChainId: string | number;
1808
+ existentialDeposit: string;
1809
+ isDefault?: boolean | undefined;
1810
+ name?: string | undefined;
1811
+ logo?: string | undefined;
1812
+ coingeckoId?: string | undefined;
1813
+ noDiscovery?: boolean | undefined;
1814
+ mirrorOf?: string | undefined;
1815
+ } | {
1816
+ id: string;
1817
+ networkId: string;
1818
+ decimals: number;
1819
+ symbol: string;
1820
+ type: "substrate-hydration";
1821
+ platform: "polkadot";
1822
+ onChainId: number;
1823
+ assetType: "Token" | "Erc20" | "External";
1824
+ isSufficient: boolean;
1825
+ existentialDeposit: string;
1826
+ isDefault?: boolean | undefined;
1827
+ name?: string | undefined;
1828
+ logo?: string | undefined;
1829
+ coingeckoId?: string | undefined;
1830
+ noDiscovery?: boolean | undefined;
1831
+ mirrorOf?: string | undefined;
1832
+ } | {
1833
+ id: string;
1834
+ networkId: string;
1835
+ decimals: number;
1836
+ symbol: string;
1837
+ type: "sol-native";
1838
+ platform: "solana";
1839
+ isDefault?: boolean | undefined;
1840
+ name?: string | undefined;
1841
+ logo?: string | undefined;
1842
+ coingeckoId?: string | undefined;
1843
+ noDiscovery?: boolean | undefined;
1844
+ mirrorOf?: string | undefined;
1845
+ } | {
1846
+ id: string;
1847
+ networkId: string;
1848
+ decimals: number;
1849
+ symbol: string;
1850
+ type: "sol-spl";
1851
+ platform: "solana";
1852
+ mintAddress: string;
1853
+ isDefault?: boolean | undefined;
1854
+ name?: string | undefined;
1855
+ logo?: string | undefined;
1856
+ coingeckoId?: string | undefined;
1857
+ noDiscovery?: boolean | undefined;
1858
+ mirrorOf?: string | undefined;
1859
+ })[];
1860
+ declare const useTokensById: () => lodash.Dictionary<{
1861
+ id: string;
1862
+ networkId: string;
1863
+ decimals: number;
1864
+ symbol: string;
1865
+ type: "evm-erc20";
1866
+ platform: "ethereum";
1867
+ contractAddress: `0x${string}`;
1868
+ isDefault?: boolean | undefined;
1869
+ name?: string | undefined;
1870
+ logo?: string | undefined;
1871
+ coingeckoId?: string | undefined;
1872
+ noDiscovery?: boolean | undefined;
1873
+ mirrorOf?: string | undefined;
1874
+ } | {
1875
+ id: string;
1876
+ networkId: string;
1877
+ decimals: number;
1878
+ symbol: string;
1879
+ type: "evm-native";
1880
+ platform: "ethereum";
1881
+ isDefault?: boolean | undefined;
1882
+ name?: string | undefined;
1883
+ logo?: string | undefined;
1884
+ coingeckoId?: string | undefined;
1885
+ noDiscovery?: boolean | undefined;
1886
+ mirrorOf?: string | undefined;
1887
+ } | {
1888
+ id: string;
1889
+ networkId: string;
1890
+ decimals: number;
1891
+ symbol: string;
1892
+ type: "evm-uniswapv2";
1893
+ platform: "ethereum";
1894
+ contractAddress: `0x${string}`;
1895
+ symbol0: string;
1896
+ symbol1: string;
1897
+ decimals0: number;
1898
+ decimals1: number;
1899
+ tokenAddress0: `0x${string}`;
1900
+ tokenAddress1: `0x${string}`;
1901
+ isDefault?: boolean | undefined;
1902
+ name?: string | undefined;
1903
+ logo?: string | undefined;
1904
+ coingeckoId?: string | undefined;
1905
+ noDiscovery?: boolean | undefined;
1906
+ mirrorOf?: string | undefined;
1907
+ isCustom?: boolean | undefined;
1908
+ coingeckoId0?: string | undefined;
1909
+ coingeckoId1?: string | undefined;
1910
+ } | {
1911
+ id: string;
1912
+ networkId: string;
1913
+ decimals: number;
1914
+ symbol: string;
1915
+ type: "substrate-assets";
1916
+ platform: "polkadot";
1917
+ assetId: string;
1918
+ isSufficient: boolean;
1919
+ existentialDeposit: string;
1920
+ isDefault?: boolean | undefined;
1921
+ name?: string | undefined;
1922
+ logo?: string | undefined;
1923
+ coingeckoId?: string | undefined;
1924
+ noDiscovery?: boolean | undefined;
1925
+ mirrorOf?: string | undefined;
1926
+ isFrozen?: boolean | undefined;
1927
+ } | {
1928
+ id: string;
1929
+ networkId: string;
1930
+ decimals: number;
1931
+ symbol: string;
1932
+ type: "substrate-dtao";
1933
+ platform: "polkadot";
1934
+ netuid: number;
1935
+ isTransferable: boolean;
1936
+ isDefault?: boolean | undefined;
1937
+ name?: string | undefined;
1938
+ logo?: string | undefined;
1939
+ coingeckoId?: string | undefined;
1940
+ noDiscovery?: boolean | undefined;
1941
+ mirrorOf?: string | undefined;
1942
+ subnetName?: string | undefined;
1943
+ hotkey?: string | undefined;
1944
+ } | {
1945
+ id: string;
1946
+ networkId: string;
1947
+ decimals: number;
1948
+ symbol: string;
1949
+ type: "substrate-foreignassets";
1950
+ platform: "polkadot";
1951
+ onChainId: string;
1952
+ isSufficient: boolean;
1953
+ existentialDeposit: string;
1954
+ isDefault?: boolean | undefined;
1955
+ name?: string | undefined;
1956
+ logo?: string | undefined;
1957
+ coingeckoId?: string | undefined;
1958
+ noDiscovery?: boolean | undefined;
1959
+ mirrorOf?: string | undefined;
1960
+ isFrozen?: boolean | undefined;
1961
+ } | {
1962
+ id: string;
1963
+ networkId: string;
1964
+ decimals: number;
1965
+ symbol: string;
1966
+ type: "substrate-native";
1967
+ platform: "polkadot";
1968
+ existentialDeposit: string;
1969
+ isDefault?: boolean | undefined;
1970
+ name?: string | undefined;
1971
+ logo?: string | undefined;
1972
+ coingeckoId?: string | undefined;
1973
+ noDiscovery?: boolean | undefined;
1974
+ mirrorOf?: string | undefined;
1975
+ } | {
1976
+ id: string;
1977
+ networkId: string;
1978
+ decimals: number;
1979
+ symbol: string;
1980
+ type: "substrate-psp22";
1981
+ platform: "polkadot";
1982
+ contractAddress: string;
1983
+ isDefault?: boolean | undefined;
1984
+ name?: string | undefined;
1985
+ logo?: string | undefined;
1986
+ coingeckoId?: string | undefined;
1987
+ noDiscovery?: boolean | undefined;
1988
+ mirrorOf?: string | undefined;
1989
+ } | {
1990
+ id: string;
1991
+ networkId: string;
1992
+ decimals: number;
1993
+ symbol: string;
1994
+ type: "substrate-tokens";
1995
+ platform: "polkadot";
1996
+ onChainId: string | number;
1997
+ existentialDeposit: string;
1998
+ isDefault?: boolean | undefined;
1999
+ name?: string | undefined;
2000
+ logo?: string | undefined;
2001
+ coingeckoId?: string | undefined;
2002
+ noDiscovery?: boolean | undefined;
2003
+ mirrorOf?: string | undefined;
2004
+ } | {
2005
+ id: string;
2006
+ networkId: string;
2007
+ decimals: number;
2008
+ symbol: string;
2009
+ type: "substrate-hydration";
2010
+ platform: "polkadot";
2011
+ onChainId: number;
2012
+ assetType: "Token" | "Erc20" | "External";
2013
+ isSufficient: boolean;
2014
+ existentialDeposit: string;
2015
+ isDefault?: boolean | undefined;
2016
+ name?: string | undefined;
2017
+ logo?: string | undefined;
2018
+ coingeckoId?: string | undefined;
2019
+ noDiscovery?: boolean | undefined;
2020
+ mirrorOf?: string | undefined;
2021
+ } | {
2022
+ id: string;
2023
+ networkId: string;
2024
+ decimals: number;
2025
+ symbol: string;
2026
+ type: "sol-native";
2027
+ platform: "solana";
2028
+ isDefault?: boolean | undefined;
2029
+ name?: string | undefined;
2030
+ logo?: string | undefined;
2031
+ coingeckoId?: string | undefined;
2032
+ noDiscovery?: boolean | undefined;
2033
+ mirrorOf?: string | undefined;
2034
+ } | {
2035
+ id: string;
2036
+ networkId: string;
2037
+ decimals: number;
2038
+ symbol: string;
2039
+ type: "sol-spl";
2040
+ platform: "solana";
2041
+ mintAddress: string;
2042
+ isDefault?: boolean | undefined;
2043
+ name?: string | undefined;
2044
+ logo?: string | undefined;
2045
+ coingeckoId?: string | undefined;
2046
+ noDiscovery?: boolean | undefined;
2047
+ mirrorOf?: string | undefined;
2048
+ }>;
2049
+ declare const useToken: (tokenId?: TokenId) => {
2050
+ id: string;
2051
+ networkId: string;
2052
+ decimals: number;
2053
+ symbol: string;
2054
+ type: "evm-erc20";
2055
+ platform: "ethereum";
2056
+ contractAddress: `0x${string}`;
2057
+ isDefault?: boolean | undefined;
2058
+ name?: string | undefined;
2059
+ logo?: string | undefined;
2060
+ coingeckoId?: string | undefined;
2061
+ noDiscovery?: boolean | undefined;
2062
+ mirrorOf?: string | undefined;
2063
+ } | {
2064
+ id: string;
2065
+ networkId: string;
2066
+ decimals: number;
2067
+ symbol: string;
2068
+ type: "evm-native";
2069
+ platform: "ethereum";
2070
+ isDefault?: boolean | undefined;
2071
+ name?: string | undefined;
2072
+ logo?: string | undefined;
2073
+ coingeckoId?: string | undefined;
2074
+ noDiscovery?: boolean | undefined;
2075
+ mirrorOf?: string | undefined;
2076
+ } | {
2077
+ id: string;
2078
+ networkId: string;
2079
+ decimals: number;
2080
+ symbol: string;
2081
+ type: "evm-uniswapv2";
2082
+ platform: "ethereum";
2083
+ contractAddress: `0x${string}`;
2084
+ symbol0: string;
2085
+ symbol1: string;
2086
+ decimals0: number;
2087
+ decimals1: number;
2088
+ tokenAddress0: `0x${string}`;
2089
+ tokenAddress1: `0x${string}`;
2090
+ isDefault?: boolean | undefined;
2091
+ name?: string | undefined;
2092
+ logo?: string | undefined;
2093
+ coingeckoId?: string | undefined;
2094
+ noDiscovery?: boolean | undefined;
2095
+ mirrorOf?: string | undefined;
2096
+ isCustom?: boolean | undefined;
2097
+ coingeckoId0?: string | undefined;
2098
+ coingeckoId1?: string | undefined;
2099
+ } | {
2100
+ id: string;
2101
+ networkId: string;
2102
+ decimals: number;
2103
+ symbol: string;
2104
+ type: "substrate-assets";
2105
+ platform: "polkadot";
2106
+ assetId: string;
2107
+ isSufficient: boolean;
2108
+ existentialDeposit: string;
2109
+ isDefault?: boolean | undefined;
2110
+ name?: string | undefined;
2111
+ logo?: string | undefined;
2112
+ coingeckoId?: string | undefined;
2113
+ noDiscovery?: boolean | undefined;
2114
+ mirrorOf?: string | undefined;
2115
+ isFrozen?: boolean | undefined;
2116
+ } | {
2117
+ id: string;
2118
+ networkId: string;
2119
+ decimals: number;
2120
+ symbol: string;
2121
+ type: "substrate-dtao";
2122
+ platform: "polkadot";
2123
+ netuid: number;
2124
+ isTransferable: boolean;
2125
+ isDefault?: boolean | undefined;
2126
+ name?: string | undefined;
2127
+ logo?: string | undefined;
2128
+ coingeckoId?: string | undefined;
2129
+ noDiscovery?: boolean | undefined;
2130
+ mirrorOf?: string | undefined;
2131
+ subnetName?: string | undefined;
2132
+ hotkey?: string | undefined;
2133
+ } | {
2134
+ id: string;
2135
+ networkId: string;
2136
+ decimals: number;
2137
+ symbol: string;
2138
+ type: "substrate-foreignassets";
2139
+ platform: "polkadot";
2140
+ onChainId: string;
2141
+ isSufficient: boolean;
2142
+ existentialDeposit: string;
2143
+ isDefault?: boolean | undefined;
2144
+ name?: string | undefined;
2145
+ logo?: string | undefined;
2146
+ coingeckoId?: string | undefined;
2147
+ noDiscovery?: boolean | undefined;
2148
+ mirrorOf?: string | undefined;
2149
+ isFrozen?: boolean | undefined;
2150
+ } | {
2151
+ id: string;
2152
+ networkId: string;
2153
+ decimals: number;
2154
+ symbol: string;
2155
+ type: "substrate-native";
2156
+ platform: "polkadot";
2157
+ existentialDeposit: string;
2158
+ isDefault?: boolean | undefined;
2159
+ name?: string | undefined;
2160
+ logo?: string | undefined;
2161
+ coingeckoId?: string | undefined;
2162
+ noDiscovery?: boolean | undefined;
2163
+ mirrorOf?: string | undefined;
2164
+ } | {
2165
+ id: string;
2166
+ networkId: string;
2167
+ decimals: number;
2168
+ symbol: string;
2169
+ type: "substrate-psp22";
2170
+ platform: "polkadot";
2171
+ contractAddress: string;
2172
+ isDefault?: boolean | undefined;
2173
+ name?: string | undefined;
2174
+ logo?: string | undefined;
2175
+ coingeckoId?: string | undefined;
2176
+ noDiscovery?: boolean | undefined;
2177
+ mirrorOf?: string | undefined;
2178
+ } | {
2179
+ id: string;
2180
+ networkId: string;
2181
+ decimals: number;
2182
+ symbol: string;
2183
+ type: "substrate-tokens";
2184
+ platform: "polkadot";
2185
+ onChainId: string | number;
2186
+ existentialDeposit: string;
2187
+ isDefault?: boolean | undefined;
2188
+ name?: string | undefined;
2189
+ logo?: string | undefined;
2190
+ coingeckoId?: string | undefined;
2191
+ noDiscovery?: boolean | undefined;
2192
+ mirrorOf?: string | undefined;
2193
+ } | {
2194
+ id: string;
2195
+ networkId: string;
2196
+ decimals: number;
2197
+ symbol: string;
2198
+ type: "substrate-hydration";
2199
+ platform: "polkadot";
2200
+ onChainId: number;
2201
+ assetType: "Token" | "Erc20" | "External";
2202
+ isSufficient: boolean;
2203
+ existentialDeposit: string;
2204
+ isDefault?: boolean | undefined;
2205
+ name?: string | undefined;
2206
+ logo?: string | undefined;
2207
+ coingeckoId?: string | undefined;
2208
+ noDiscovery?: boolean | undefined;
2209
+ mirrorOf?: string | undefined;
2210
+ } | {
2211
+ id: string;
2212
+ networkId: string;
2213
+ decimals: number;
2214
+ symbol: string;
2215
+ type: "sol-native";
2216
+ platform: "solana";
2217
+ isDefault?: boolean | undefined;
2218
+ name?: string | undefined;
2219
+ logo?: string | undefined;
2220
+ coingeckoId?: string | undefined;
2221
+ noDiscovery?: boolean | undefined;
2222
+ mirrorOf?: string | undefined;
2223
+ } | {
2224
+ id: string;
2225
+ networkId: string;
2226
+ decimals: number;
2227
+ symbol: string;
2228
+ type: "sol-spl";
2229
+ platform: "solana";
2230
+ mintAddress: string;
2231
+ isDefault?: boolean | undefined;
2232
+ name?: string | undefined;
2233
+ logo?: string | undefined;
2234
+ coingeckoId?: string | undefined;
2235
+ noDiscovery?: boolean | undefined;
2236
+ mirrorOf?: string | undefined;
2237
+ };
2238
+
2239
+ declare const useTokenRates: () => _talismn_token_rates.TokenRatesList;
2240
+ declare const useTokenRate: (tokenId?: TokenId) => _talismn_token_rates.TokenRates;
2241
+
2242
+ type BalancesConfig = {
2243
+ coinsApiUrl?: string;
2244
+ /** Enables balances fetching for tokens on testnet chains. */
2245
+ withTestnets?: boolean;
2246
+ /**
2247
+ * A list of chain genesisHashes to fetch balances for.
2248
+ *
2249
+ * If undefined, balances will be fetched for all chains.
2250
+ *
2251
+ * Only applies to built-in chains, custom chains will always fetch balances.
2252
+ *
2253
+ * NOTE: This is an allowlist to enable the dapp to disable balances for chains it does not care about.
2254
+ * Adding a chain here which is not already supported by the library will not automagically begin to fetch balances.
2255
+ * It will just be ignored.
2256
+ *
2257
+ * In a similar vein, if you add testnets here then make sure you've also set the `useTestnets` prop to `true`.
2258
+ *
2259
+ * @example
2260
+ * enabledChains={[
2261
+ * // polkadot
2262
+ * "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
2263
+ * // kusama
2264
+ * "0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe",
2265
+ * // rococo
2266
+ * "0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e",
2267
+ * // westend
2268
+ * "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e",
2269
+ * ]}
2270
+ */
2271
+ enabledChains?: string[];
2272
+ /**
2273
+ * A list of token ids to fetch balances for.
2274
+ *
2275
+ * If undefined, balances will be fetched for all tokens.
2276
+ *
2277
+ * If `enabledChains` is also defined, both filters will be applied,
2278
+ * such that only the intersection of enabledChains and enabledTokens will be fetched.
2279
+ *
2280
+ * @example
2281
+ * enabledTokens={[
2282
+ * // DOT (polkadot relay chain)
2283
+ * "polkadot-substrate-native",
2284
+ * // USDC (polkadot asset hub)
2285
+ * "polkadot-asset-hub-substrate-assets-1337-usdc",
2286
+ * // ETH (ethereum mainnet)
2287
+ * "1-evm-native",
2288
+ * // GM (gm chain)
2289
+ * "gm-substrate-tokens-gm",
2290
+ * ]}
2291
+ */
2292
+ enabledTokens?: string[];
2293
+ children?: ReactNode;
2294
+ };
2295
+ declare const BalancesProvider: ({ coinsApiUrl, withTestnets, enabledChains, enabledTokens, children, }: BalancesConfig) => react_jsx_runtime.JSX.Element;
2296
+
2297
+ export { type BalancesConfig, BalancesProvider, type BalancesStatus, allAddressesAtom, balancesAtom, chainConnectorsAtom, chaindataAtom, chaindataProviderAtom, coinsApiConfigAtom, cryptoWaitReadyAtom, enableTestnetsAtom, enabledChainsAtom, enabledTokensAtom, getStaleChains, networksAtom, tokenRatesAtom, tokensAtom, useBalances, useBalancesStatus, useChainConnectors, useChaindata, useChaindataProvider, useNetwork, useNetworks, useNetworksById, useSetBalancesAddresses, useSyncSwapsChaindata, useToken, useTokenRate, useTokenRates, useTokens, useTokensById };