@@ -3,35 +3,36 @@ import assert from 'assert';
33
44export type NetworkInfo = {
55 name : string ,
6- substrateUrl : string | string [ ] ,
7- addressPrefix : number ,
8- cheqdApiUrl : string ,
6+ cheqdApiUrl : string | string [ ] ,
97} ;
108
119export type NetworkId = 'mainnet' | 'testnet' | 'local' | 'custom' ;
1210
13- export const SUBSTRATE_NETWORKS : Record < NetworkId , NetworkInfo > = {
11+ export const BLOCKCHAIN_NETWORKS : Record < NetworkId , NetworkInfo > = {
1412 mainnet : {
1513 name : 'Cheqd Mainnet' ,
16- substrateUrl : null ,
17- addressPrefix : 22 ,
18- cheqdApiUrl : 'https://mainnet.cheqd.docknode.io' ,
14+ cheqdApiUrl : [
15+ 'https://mainnet.cheqd.docknode.io' ,
16+ 'https://rpc.cheqd.net' ,
17+ ] ,
1918 } ,
2019 testnet : {
2120 name : 'Cheqd Testnet' ,
22- substrateUrl : null ,
23- addressPrefix : 21 ,
24- cheqdApiUrl : 'https://testnet.cheqd.docknode.io' ,
21+ cheqdApiUrl : [
22+ 'https://testnet.cheqd.docknode.io' ,
23+ 'https://api.cheqd.network' ,
24+ ] ,
2525 } ,
2626 local : {
2727 name : 'Local Node' ,
28- substrateUrl : 'ws://127.0.0.1:9944' ,
29- addressPrefix : 21 ,
28+ cheqdApiUrl : [
29+ 'http://localhost:8080' ,
30+ ] ,
3031 } ,
3132} ;
3233
3334function getNetworkInfo ( networkId ) : NetworkInfo {
34- const networkInfo = SUBSTRATE_NETWORKS [ networkId ] ;
35+ const networkInfo = BLOCKCHAIN_NETWORKS [ networkId ] ;
3536
3637 assert ( ! ! networkInfo , `Network ${ networkId } not found` ) ;
3738
@@ -57,7 +58,7 @@ export class NetworkManager {
5758 * @param {string } networkId
5859 */
5960 setNetworkId ( networkId : NetworkId ) {
60- assert ( ! ! SUBSTRATE_NETWORKS [ networkId ] , `invalid networkId ${ networkId } ` ) ;
61+ assert ( ! ! BLOCKCHAIN_NETWORKS [ networkId ] , `invalid networkId ${ networkId } ` ) ;
6162
6263 this . networkId = networkId ;
6364 }
0 commit comments