import { Actor , ActorState , Address , BitField , ChainEpoch , Cid , CirculatingSupply , ComputeStateOutput , DataCap , Deadline , DeadlineInfo , DealCollateralBounds , DealID , Fault , InvocResult , MarketBalance , MarketDeal , Message , MessageMatch , MessageReceipt , MinerInfo , MinerPower , MinerSectors , MsgLookup , NetworkName , NetworkVersion , PaddedPieceSize , Partition , SectorExpiration , SectorLocation , SectorNumber , SectorOnChainInfo , SectorPreCommitInfo , SectorPreCommitOnChainInfo , StoragePower , TipSet , TipSetKey , Version , } from '../Types' ; import { Connector } from '../../connectors/Connector' ; remarks export class JsonRpcStateMethodGroup { private conn : Connector ; constructor ( conn ) { this . conn = conn ; } /**
     * runs the given message and returns its result without any persisted changes.
     */ public async stateCall ( message , tipSetKey ? ) { const data = await this . conn . request ( { method : 'Filecoin.StateCall' , params : [ message , tipSetKey ] } ) ; return data as InvocResult ; } param tipSetKey param cid public async stateReplay ( tipSetKey , cid ) { const result = await this . conn . request ( { method : 'Filecoin.StateReplay' , params : [ cid ] } ) ; return result ; } param address param tipSetKey public async getActor ( address , tipSetKey ? ) { const data = await this . conn . request ( { method : 'Filecoin.StateGetActor' , params : [ address , tipSetKey ] } ) ; return data as Actor ; } param address param tipSetKey public async readState ( address , tipSetKey ? ) { const data = await this . conn . request ( { method : 'Filecoin.StateReadState' , params : [ address , tipSetKey ] } ) ; return data as ActorState ; } param filter param tipSetKey param toHeight public async listMessages ( match , tipSetKey ? , toHeight ? ) { const messages = await this . conn . request ( { method : 'Filecoin.StateListMessages' , params : [ match , tipSetKey , toHeight ] } ) ; return messages ? messages : [ ] ; } /**
     * returns the name of the network the node is synced to
     */ public async networkName ( ) { const network = await this . conn . request ( { method : 'Filecoin.StateNetworkName' , params : [ ] } ) ; return network ; } param address param tipSetKey public async minerSectors ( address , tipSetKey ? ) { const sectorsInfo = await this . conn . request ( { method : 'Filecoin.StateMinerSectors' , params : [ address , undefined , tipSetKey ] } ) ; return sectorsInfo ; } param address param tipSetKey public async minerActiveSectors ( address , tipSetKey ? ) { const activeSectors = await this . conn . request ( { method : 'Filecoin.StateMinerActiveSectors' , params : [ address , tipSetKey ] } ) ; return activeSectors ; } param address param tipSetKey public async minerProvingDeadline ( address , tipSetKey ? ) { const provingDeadline = await this . conn . request ( { method : 'Filecoin.StateMinerProvingDeadline' , params : [ address , tipSetKey ] } ) ; return provingDeadline ; } param address param tipSetKey public async minerPower ( address , tipSetKey ? ) { const power = await this . conn . request ( { method : 'Filecoin.StateMinerPower' , params : [ address , tipSetKey ] } ) ; return power ; } param address param tipSetKey public async minerInfo ( address , tipSetKey ? ) { const minerInfo = await this . conn . request ( { method : 'Filecoin.StateMinerInfo' , params : [ address , tipSetKey ] } ) ; return minerInfo ; } param address param tipSetKey public async minerDeadlines ( address , tipSetKey ? ) { const minerDeadlines = await this . conn . request ( { method : 'Filecoin.StateMinerDeadlines' , params : [ address , tipSetKey ] } ) ; return minerDeadlines ; } param address param idx param tipSetKey public async minerPartitions ( address , idx ? , tipSetKey ? ) { const minerPartitions = await this . conn . request ( { method : 'Filecoin.StateMinerPartitions' , params : [ address , idx , tipSetKey ] } ) ; return minerPartitions ; } param address param tipSetKey public async minerFaults ( address , tipSetKey ? ) { const minerFaults = await this . conn . request ( { method : 'Filecoin.StateMinerFaults' , params : [ address , tipSetKey ] } ) ; return minerFaults ; } param epoch param tipSetKey public async allMinerFaults ( epoch , tipSetKey ? ) { const allFaults = await this . conn . request ( { method : 'Filecoin.StateAllMinerFaults' , params : [ epoch , tipSetKey ] } ) ; return allFaults ; } param address param tipSetKey public async minerRecoveries ( address , tipSetKey ? ) { const recoveries = await this . conn . request ( { method : 'Filecoin.StateMinerRecoveries' , params : [ address , tipSetKey ] } ) ; return recoveries ; } param address param sectorPreCommitInfo param tipSetKey public async minerPreCommitDepositForPower ( address , sectorPreCommitInfo , tipSetKey ? ) { const deposit = await this . conn . request ( { method : 'Filecoin.StateMinerPreCommitDepositForPower' , params : [ address , sectorPreCommitInfo , tipSetKey ] } ) ; return deposit ; } param address param sectorPreCommitInfo param tipSetKey public async minerInitialPledgeCollateral ( address , sectorPreCommitInfo , tipSetKey ? ) { const deposit = await this . conn . request ( { method : 'Filecoin.StateMinerInitialPledgeCollateral' , params : [ address , sectorPreCommitInfo , tipSetKey ] } ) ; return deposit ; } param address param tipSetKey public async minerAvailableBalance ( address , tipSetKey ? ) { const balance = await this . conn . request ( { method : 'Filecoin.StateMinerAvailableBalance' , params : [ address , tipSetKey ] } ) ; return balance ; } param address param sector param tipSetKey public async sectorPreCommitInfo ( address , sector , tipSetKey ? ) { const preCommitInfo = await this . conn . request ( { method : 'Filecoin.StateSectorPreCommitInfo' , params : [ address , sector , tipSetKey ] } ) ; return preCommitInfo ; } param address param sector param tipSetKey remarks public async sectorGetInfo ( address , sector , tipSetKey ? ) { const sectorInfo = await this . conn . request ( { method : 'Filecoin.StateSectorGetInfo' , params : [ address , sector , tipSetKey ] } ) ; return sectorInfo ; } param address param sector param tipSetKey public async sectorExpiration ( address , sector , tipSetKey ? ) { const sectorExpiration = await this . conn . request ( { method : 'Filecoin.StateSectorExpiration' , params : [ address , sector , tipSetKey ] } ) ; return sectorExpiration ; } param address param sector param tipSetKey public async sectorPartition ( address , sector , tipSetKey ? ) { const sectorLocation = await this . conn . request ( { method : 'Filecoin.StateSectorPartition' , params : [ address , sector , tipSetKey ] } ) ; return sectorLocation ; } param cid public async searchMsg ( cid ) { const lookup = await this . conn . request ( { method : 'Filecoin.StateSearchMsg' , params : [ cid ] } ) ; return lookup ; } param cid param confidence public async waitMsg ( cid , confidence ) { const lookup = await this . conn . request ( { method : 'Filecoin.StateWaitMsg' , params : [ cid , confidence ] } ) ; return lookup ; } param cid param confidence param limit public async waitMsgLimited ( cid , confidence , limit ) { const lookup = await this . conn . request ( { method : 'Filecoin.StateWaitMsgLimited' , params : [ cid , confidence , limit ] } ) ; return lookup ; } param tipSetKey public async listMiners ( tipSetKey ? ) { const miners = await this . conn . request ( { method : 'Filecoin.StateListMiners' , params : [ tipSetKey ] } ) ; return miners ; } param tipSetKey public async listActors ( tipSetKey ? ) { const miners = await this . conn . request ( { method : 'Filecoin.StateListActors' , params : [ tipSetKey ] } ) ; return miners ; } param address param tipSetKey public async marketBalance ( address , tipSetKey ? ) { const marketBalance = await this . conn . request ( { method : 'Filecoin.StateMarketBalance' , params : [ address , tipSetKey ] } ) ; return marketBalance ; } param tipSetKey public async marketParticipants ( tipSetKey ? ) { const marketBalanceMap = await this . conn . request ( { method : 'Filecoin.StateMarketParticipants' , params : [ tipSetKey ] } ) ; return marketBalanceMap ; } param tipSetKey public async marketDeals ( tipSetKey ? ) { const marketDealsMap = await this . conn . request ( { method : 'Filecoin.StateMarketDeals' , params : [ tipSetKey ] } ) ; return marketDealsMap ; } param dealId param tipSetKey public async marketStorageDeal ( dealId , tipSetKey ? ) { const marketDeal = await this . conn . request ( { method : 'Filecoin.StateMarketStorageDeal' , params : [ dealId , tipSetKey ] } ) ; return marketDeal ; } param address param tipSetKey public async lookupId ( address , tipSetKey ? ) { const id = await this . conn . request ( { method : 'Filecoin.StateLookupID' , params : [ address , tipSetKey ] } ) ; return id ; } param address param tipSetKey public async accountKey ( address , tipSetKey ? ) { const key = await this . conn . request ( { method : 'Filecoin.StateAccountKey' , params : [ address , tipSetKey ] } ) ; return key ; } param cid1 param cid2 public async changedActors ( cid1 ? , cid2 ? ) { const actors = await this . conn . request ( { method : 'Filecoin.StateChangedActors' , params : [ cid1 , cid2 ] } ) ; return actors ; } param cid param tipSetKey public async getReceipt ( cid , tipSetKey ? ) { const receipt = await this . conn . request ( { method : 'Filecoin.StateGetReceipt' , params : [ cid , tipSetKey ] } ) ; return receipt ; } param address param tipSetKey public async minerSectorCount ( address , tipSetKey ? ) { const sectors = await this . conn . request ( { method : 'Filecoin.StateMinerSectorCount' , params : [ address , tipSetKey ] } ) ; return sectors ; } param epoch param messages param tipSetKey remarks public async compute ( epoch , messages , tipSetKey ? ) { const state = await this . conn . request ( { method : 'Filecoin.StateCompute' , params : [ epoch , messages , tipSetKey ] , } ) ; return state ; } param address param tipSetKey remarks public async verifiedClientStatus ( address , tipSetKey ? ) { const cap = await this . conn . request ( { method : 'Filecoin.StateVerifiedClientStatus' , params : [ address , tipSetKey ] , } ) ; return cap ; } param size param verified param tipSetKey public async dealProviderCollateralBounds ( size , verified , tipSetKey ? ) { const collateral = await this . conn . request ( { method : 'Filecoin.StateDealProviderCollateralBounds' , params : [ size , verified , tipSetKey ] , } ) ; return collateral ; } param tipSetKey public async circulatingSupply ( tipSetKey ? ) { const supply = await this . conn . request ( { method : 'Filecoin.StateCirculatingSupply' , params : [ tipSetKey ] , } ) ; return supply ; } param tipSetKey remarks public async vmCirculatingSupply ( tipSetKey ? ) { const supply = await this . conn . request ( { method : 'Filecoin.StateVMCirculatingSupplyInternal' , params : [ tipSetKey ] , } ) ; return supply ; } param address param tipSetKey public async verifierStatus ( address , tipSetKey ? ) { const status = await this . conn . request ( { method : 'Filecoin.StateVerifierStatus' , params : [ address , tipSetKey ] , } ) ; return status ; } param tipSetKey public async networkVersion ( tipSetKey ? ) { const version = await this . conn . request ( { method : 'Filecoin.StateNetworkVersion' , params : [ tipSetKey ] , } ) ; return version ; } param tipSetKey public async verifiedRegistryRootKey ( tipSetKey ? ) { const address = await this . conn . request ( { method : 'Filecoin.StateVerifiedRegistryRootKey' , params : [ tipSetKey ] , } ) ; return address ; } param address param sectorNumber param tipSetKey public async minerSectorAllocated ( address , sectorNumber , tipSetKey ? ) { const allocated = await this . conn . request ( { method : 'Filecoin.StateMinerSectorAllocated' , params : [ address , sectorNumber , tipSetKey ] , } ) ; return allocated ; } }