@@ -466,32 +466,49 @@ export const LIT_CHAINS: LITChain<LITEVMChain> = {
466
466
type : null ,
467
467
vmType : 'EVM' ,
468
468
} ,
469
+
470
+ /**
471
+ * Chainlist entry for the Chronicle Testnet.
472
+ * https://chainlist.org/chain/175177
473
+ */
469
474
chronicleTestnet : {
470
475
contractAddress : null ,
471
476
chainId : 175177 ,
472
477
name : 'Chronicle - Lit Protocol Testnet' ,
473
- symbol : 'testLPX ' ,
478
+ symbol : 'tstLPX ' ,
474
479
decimals : 18 ,
475
- rpcUrls : [ 'https://lit-protocol.calderachain.xyz/replica-http' ] ,
480
+ rpcUrls : [
481
+ 'https://lit-protocol.calderachain.xyz/replica-http' ,
482
+ 'https://chain-rpc.litprotocol.com/http' ,
483
+ ] ,
476
484
blockExplorerUrls : [ 'https://chain.litprotocol.com/' ] ,
477
485
type : null ,
478
486
vmType : 'EVM' ,
479
487
} ,
488
+
489
+ /**
490
+ * @deprecated Will be removed in version 7.x. - Use `chronicleVesuviusTestnet` instead.
491
+ */
480
492
datilDevnet : {
481
493
contractAddress : null ,
482
494
chainId : 2311 ,
483
- name : 'Vesuvius - Lit Protocol Devnet ' ,
495
+ name : 'Chronicle Vesuvius - Lit Protocol Testnet ' ,
484
496
symbol : 'tstLit' ,
485
497
decimals : 18 ,
486
498
rpcUrls : [ 'https://vesuvius-rpc.litprotocol.com/' ] ,
487
499
blockExplorerUrls : [ 'https://vesuvius-explorer.litprotocol.com/' ] ,
488
500
type : null ,
489
501
vmType : 'EVM' ,
490
502
} ,
491
- datilTestnet : {
503
+
504
+ /**
505
+ * Chainlist entry for the Chronicle Vesuvius Testnet.
506
+ * https://chainlist.org/chain/2311
507
+ */
508
+ chronicleVesuviusTestnet : {
492
509
contractAddress : null ,
493
510
chainId : 2311 ,
494
- name : 'Vesuvius - Lit Protocol Testnet' ,
511
+ name : 'Chronicle Vesuvius - Lit Protocol Testnet' ,
495
512
symbol : 'tstLit' ,
496
513
decimals : 18 ,
497
514
rpcUrls : [ 'https://vesuvius-rpc.litprotocol.com/' ] ,
@@ -503,9 +520,12 @@ export const LIT_CHAINS: LITChain<LITEVMChain> = {
503
520
contractAddress : null ,
504
521
chainId : 175177 ,
505
522
name : 'Chronicle - Lit Protocol Testnet' ,
506
- symbol : 'testLPX ' ,
523
+ symbol : 'tstLit ' ,
507
524
decimals : 18 ,
508
- rpcUrls : [ 'https://lit-protocol.calderachain.xyz/replica-http' ] ,
525
+ rpcUrls : [
526
+ 'https://lit-protocol.calderachain.xyz/replica-http' ,
527
+ 'https://chain-rpc.litprotocol.com/http' ,
528
+ ] ,
509
529
blockExplorerUrls : [ 'https://chain.litprotocol.com/' ] ,
510
530
type : null ,
511
531
vmType : 'EVM' ,
@@ -625,27 +645,171 @@ export const LIT_CHAINS: LITChain<LITEVMChain> = {
625
645
export const LIT_CHAIN_RPC_URL = LIT_CHAINS [ 'chronicleTestnet' ] . rpcUrls [ 0 ] ;
626
646
627
647
/**
628
- * Enum representing the available LIT RPC endpoints.
648
+ * Object containing information to submit to Metamask
649
+ */
650
+ export const metamaskChainInfo = {
651
+ /**
652
+ * Information about the "chronicle" chain.
653
+ */
654
+ chronicle : {
655
+ chainId : LIT_CHAINS [ 'chronicleTestnet' ] . chainId ,
656
+ chainName : LIT_CHAINS [ 'chronicleTestnet' ] . name ,
657
+ nativeCurrency : {
658
+ name : LIT_CHAINS [ 'chronicleTestnet' ] . symbol ,
659
+ symbol : LIT_CHAINS [ 'chronicleTestnet' ] . symbol ,
660
+ decimals : LIT_CHAINS [ 'chronicleTestnet' ] . decimals ,
661
+ } ,
662
+ rpcUrls : LIT_CHAINS [ 'chronicleTestnet' ] . rpcUrls ,
663
+ blockExplorerUrls : LIT_CHAINS [ 'chronicleTestnet' ] . blockExplorerUrls ,
664
+ iconUrls : [ 'future' ] ,
665
+ } ,
666
+ /**
667
+ * Information about the "chronicleVesuvius" chain.
668
+ */
669
+ chronicleVesuvius : {
670
+ chainId : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . chainId ,
671
+ chainName : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . name ,
672
+ nativeCurrency : {
673
+ name : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . symbol ,
674
+ symbol : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . symbol ,
675
+ decimals : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . decimals ,
676
+ } ,
677
+ rpcUrls : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . rpcUrls ,
678
+ blockExplorerUrls : LIT_CHAINS [ 'chronicleVesuviusTestnet' ] . blockExplorerUrls ,
679
+ iconUrls : [ 'future' ] ,
680
+ } ,
681
+ } ;
682
+
683
+ /**
684
+ * Constants representing the available LIT RPC endpoints.
629
685
*/
630
- export enum LIT_RPC {
686
+ export const LIT_RPC = {
631
687
/**
632
688
* Local Anvil RPC endpoint.
633
689
*/
634
- LOCAL_ANVIL = 'http://127.0.0.1:8545' ,
690
+ LOCAL_ANVIL : 'http://127.0.0.1:8545' ,
635
691
636
692
/**
637
693
* Chronicle RPC endpoint - Used for Cayenne, Manzano, Habanero
638
694
*/
639
- CHRONICLE = 'https://chain-rpc.litprotocol.com/http' ,
695
+ CHRONICLE : 'https://chain-rpc.litprotocol.com/http' ,
640
696
641
697
/**
642
- * Vesuvius RPC endpoint - used for >= Datil-dev, Datil-test
698
+ * Chronicle Vesuvius RPC endpoint - used for >= Datil-dev, Datil-test
699
+ * @deprecated Will be removed in version 7.x. - Use CHRONICLE_VESUVIUS instead
643
700
*/
644
- VESUVIUS = 'https://vesuvius-rpc.litprotocol.com' ,
645
- }
701
+ VESUVIUS : 'https://vesuvius-rpc.litprotocol.com' ,
702
+
703
+ /**
704
+ * Chronicle Vesuvius RPC endpoint - used for >= Datil-dev, Datil-test
705
+ */
706
+ CHRONICLE_VESUVIUS : 'https://vesuvius-rpc.litprotocol.com' ,
707
+ } as const ;
646
708
647
709
export const LIT_EVM_CHAINS = LIT_CHAINS ;
648
710
711
+ /**
712
+ * Represents the Lit Network constants.
713
+ */
714
+ export const LIT_NETWORK = {
715
+ Cayenne : 'cayenne' ,
716
+ Manzano : 'manzano' ,
717
+ Habanero : 'habanero' ,
718
+ DatilDev : 'datil-dev' ,
719
+ DatilTest : 'datil-test' ,
720
+ Custom : 'custom' ,
721
+ Localhost : 'localhost' ,
722
+ } as const ;
723
+
724
+ /**
725
+ * The type representing the keys of the LIT_NETWORK object.
726
+ */
727
+ export type LIT_NETWORK_TYPES = keyof typeof LIT_NETWORK ;
728
+
729
+ /**
730
+ * The type representing the values of the LIT_NETWORK object.
731
+ */
732
+ export type LIT_NETWORK_VALUES = ( typeof LIT_NETWORK ) [ keyof typeof LIT_NETWORK ] ;
733
+
734
+ /**
735
+ * RPC URL by Network
736
+ *
737
+ * A mapping of network names to their corresponding RPC URLs.
738
+ */
739
+ export const RPC_URL_BY_NETWORK : { [ key in LIT_NETWORK_VALUES ] : string } = {
740
+ cayenne : LIT_RPC . CHRONICLE ,
741
+ manzano : LIT_RPC . CHRONICLE ,
742
+ habanero : LIT_RPC . CHRONICLE ,
743
+ 'datil-dev' : LIT_RPC . CHRONICLE_VESUVIUS ,
744
+ 'datil-test' : LIT_RPC . CHRONICLE_VESUVIUS ,
745
+ custom : LIT_RPC . LOCAL_ANVIL ,
746
+ localhost : LIT_RPC . LOCAL_ANVIL ,
747
+ } ;
748
+
749
+ /**
750
+ * Mapping of network names to their corresponding relayer URLs.
751
+ */
752
+ export const RELAYER_URL_BY_NETWORK : { [ key in LIT_NETWORK_VALUES ] : string } = {
753
+ cayenne : 'https://relayer-server-staging-cayenne.getlit.dev' ,
754
+ manzano : 'https://manzano-relayer.getlit.dev' ,
755
+ habanero : 'https://habanero-relayer.getlit.dev' ,
756
+ 'datil-dev' : 'https://datil-dev-relayer.getlit.dev' ,
757
+ 'datil-test' : 'https://datil-test-relayer.getlit.dev' ,
758
+ custom : 'http://localhost:3000' ,
759
+ localhost : 'http://localhost:3000' ,
760
+ } ;
761
+
762
+ /**
763
+ * URL mappings for general worker URLs by network.
764
+ */
765
+ export const GENERAL_WORKER_URL_BY_NETWORK : {
766
+ [ key in LIT_NETWORK_VALUES ] : string ;
767
+ } = {
768
+ cayenne : 'https://apis.getlit.dev/cayenne/contracts' ,
769
+ manzano : 'https://apis.getlit.dev/manzano/contracts' ,
770
+ habanero : 'https://apis.getlit.dev/habanero/contracts' ,
771
+ 'datil-dev' : 'https://apis.getlit.dev/datil-dev/contracts' ,
772
+ 'datil-test' : 'https://apis.getlit.dev/datil-test/contracts' ,
773
+
774
+ // just use cayenne abis for custom and localhost
775
+ custom : 'https://apis.getlit.dev/cayenne/contracts' ,
776
+ localhost : 'https://apis.getlit.dev/cayenne/contracts' ,
777
+ } ;
778
+
779
+ /**
780
+ * URL constants for the staging worker by network.
781
+ */
782
+ export const GENERAL_STAGING_WORKER_URL_BY_NETWORK : {
783
+ [ key in LIT_NETWORK_VALUES ] : string ;
784
+ } = {
785
+ cayenne : 'https://staging.apis.getlit.dev/cayenne/contracts' ,
786
+ manzano : 'https://staging.apis.getlit.dev/manzano/contracts' ,
787
+ habanero : 'https://staging.apis.getlit.dev/habanero/contracts' ,
788
+ 'datil-dev' : 'https://staging.apis.getlit.dev/datil-dev/contracts' ,
789
+ 'datil-test' : 'https://staging.apis.getlit.dev/datil-test/contracts' ,
790
+
791
+ // just use cayenne abis for custom and localhost
792
+ custom : 'https://apis.getlit.dev/cayenne/contracts' ,
793
+ localhost : 'https://apis.getlit.dev/cayenne/contracts' ,
794
+ } ;
795
+
796
+ /**
797
+ * Mapping of network values to corresponding Metamask chain info.
798
+ */
799
+ export const METAMASK_CHAIN_INFO_BY_NETWORK : Record <
800
+ LIT_NETWORK_VALUES ,
801
+ | typeof metamaskChainInfo . chronicle
802
+ | typeof metamaskChainInfo . chronicleVesuvius
803
+ > = {
804
+ cayenne : metamaskChainInfo . chronicle ,
805
+ manzano : metamaskChainInfo . chronicle ,
806
+ habanero : metamaskChainInfo . chronicle ,
807
+ 'datil-dev' : metamaskChainInfo . chronicleVesuvius ,
808
+ 'datil-test' : metamaskChainInfo . chronicleVesuvius ,
809
+ custom : metamaskChainInfo . chronicleVesuvius ,
810
+ localhost : metamaskChainInfo . chronicleVesuvius ,
811
+ } ;
812
+
649
813
/**
650
814
* Solana Chains supported by the LIT protocol. Use the chain name as a key in this object.
651
815
* @constant
@@ -839,11 +1003,30 @@ export const TELEM_API_URL = 'https://lit-general-worker.getlit.dev';
839
1003
// ========== RLI Delegation ==========
840
1004
export const SIWE_DELEGATION_URI = 'lit:capability:delegation' ;
841
1005
1006
+ /**
1007
+ * @deprecated Will be removed in version 7.x. - Use RELAYER_URL_BY_NETWORK.Cayenne instead
1008
+ */
842
1009
export const RELAY_URL_CAYENNE =
843
1010
'https://relayer-server-staging-cayenne.getlit.dev' ;
1011
+
1012
+ /**
1013
+ * @deprecated Will be removed in version 7.x. - Use RELAYER_URL_BY_NETWORK.Habanero instead
1014
+ */
844
1015
export const RELAY_URL_HABANERO = 'https://habanero-relayer.getlit.dev' ;
1016
+
1017
+ /**
1018
+ * @deprecated Will be removed in version 7.x. - Use RELAYER_URL_BY_NETWORK.Manzano instead
1019
+ */
845
1020
export const RELAY_URL_MANZANO = 'https://manzano-relayer.getlit.dev' ;
1021
+
1022
+ /**
1023
+ * @deprecated Will be removed in version 7.x. - Use RELAYER_URL_BY_NETWORK.DatilDev instead
1024
+ */
846
1025
export const RELAY_URL_DATIL_DEV = 'https://datil-dev-relayer.getlit.dev' ;
1026
+
1027
+ /**
1028
+ * @deprecated Will be removed in version 7.x. - Use RELAYER_URL_BY_NETWORK.DatilTest instead
1029
+ */
847
1030
export const RELAY_URL_DATIL_TEST = 'https://datil-test-relayer.getlit.dev' ;
848
1031
849
1032
// ========== Lit Actions ==========
0 commit comments