import { Connector } from '../../connectors/Connector' ; import { ID , Version } from '../Types' ; export class JsonRpcCommonMethodGroup { private conn : Connector ; constructor ( conn ) { this . conn = conn ; } /**
     * returns peerID of libp2p node backing this API
     */ public async id ( ) { const id = await this . conn . request ( { method : 'Filecoin.ID' , params : [ ] } ) ; return id ; } /**
     * provides information about API provider
     */ public async version ( ) { const ret = await this . conn . request ( { method : 'Filecoin.Version' } ) ; return ret as Version ; } public async logList ( ) { const list = await this . conn . request ( { method : 'Filecoin.LogList' } ) ; return list ; } public async logSetLevel ( string1 , string2 ) { const result = await this . conn . request ( { method : 'Filecoin.LogSetLevel' , params : [ string1 , string2 ] } ) ; return result ; } /**
     * trigger graceful shutdown
     */ public async shutdown ( ) { await this . conn . request ( { method : 'Filecoin.Shutdown' } ) ; } }