import { Connector } from '../../connectors/Connector' ; import { Message } from '../Types' ; export class JsonRpcGasMethodGroup { private conn : Connector ; constructor ( conn ) { this . conn = conn ; } param message param nblocksincl public async feeCap ( message , nblocksincl ) { const ret = await this . conn . request ( { method : 'Filecoin.GasEstimateFeeCap' , params : [ message , nblocksincl , [ ] ] } ) ; return ret as string ; } param message public async gasLimit ( message ) { const ret = await this . conn . request ( { method : 'Filecoin.GasEstimateGasLimit' , params : [ message , [ ] ] } ) ; return ret as number ; } param nblocksincl param sender param gasLimit public async gasPremium ( nblocksincl , sender , gasLimit ) { const ret = await this . conn . request ( { method : 'Filecoin.GasEstimateGasPremium' , params : [ nblocksincl , sender , gasLimit , [ ] ] } ) ; return ret as string ; } param message public async messageGas ( message ) { const ret = await this . conn . request ( { method : 'Filecoin.GasEstimateMessageGas' , params : [ message , { MaxFee : "30000000000000" } , [ ] ] } ) ; return ret as Message ; } }