import BdkYaml from '../bdkYaml' ; interface NetworkConfig { name : string ; profile : string ; } interface ExplorerConfigInterface { 'network-configs' : { [ configName ] : NetworkConfig ; } ; license : string ; } class ExplorerConfigYaml extends BdkYaml < ExplorerConfigInterface > { constructor ( value ? ) { super ( value ) ; if ( ! value ) { this . value . license = 'Apache-2.0' ; this . value [ 'network-configs' ] = { } ; } } param name public addNetwork ( name ) { this . value [ 'network-configs' ] [ name ] = { name : name , profile : `./connection-profile/${ name }.json` , } ; } public getNetworkList ( ) { return Object . keys ( this . value [ 'network-configs' ] ) ; } } export default ExplorerConfigYaml ;