State

The State methods are used to query, inspect, and interact with chain state. Most methods take a TipSetKey as a parameter. The state looked up is the state at that tipset. A nil TipSetKey can be provided as a param, this will cause the heaviest tipset in the chain to be used.

stateAccountKey

stateAccountKey (address: string, tipSetKey: Cid[]): Promise<string>

Returns the public key address of the given ID address

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<string>

Source: index.d.ts, line 540, character 17

stateDealProviderCollateralBounds

stateDealProviderCollateralBounds (paddedPieceSize: number, bool: boolean, tipSetKey: Cid[]): Promise<DealCollateralBounds>

Returns the min and max collateral a storage provider can issue. It takes the deal size and verified status as parameters.

Parameters:

  • paddedPieceSize: number
  • bool: boolean
  • tipSetKey: Cid[]

Returns:

Promise<DealCollateralBounds>

Source: index.d.ts, line 568, character 35

stateGetActor

stateGetActor (address: string, tipSetKey: Cid[]): Promise<Actor>

Returns the indicated actor's nonce and balance.

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<Actor>

Source: index.d.ts, line 572, character 15

stateGetReceipt

stateGetReceipt (cid: Cid, tipSetKey: Cid[]): Promise<MessageReceipt>

Returns the message receipt for the given message

Parameters:

Returns:

Promise<MessageReceipt>

Source: index.d.ts, line 576, character 17

stateListMiners

stateListMiners (tipSetKey: Cid[]): Promise<Array<string>>

Returns the addresses of every miner that has claimed power in the Power Actor

Parameters:

  • tipSetKey: Cid[]

Returns:

Promise<Array<string>>

Source: index.d.ts, line 588, character 17

stateLookupID

stateLookupID (address: string, tipSetKey: Cid[]): Promise<string>

Retrieves the ID address of the given address

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<string>

Source: index.d.ts, line 592, character 15

stateMarketBalance

stateMarketBalance (address: string, tipSetKey: Cid[]): Promise<MarketBalance>

Looks up the Escrow and Locked balances of the given address in the Storage Market

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<MarketBalance>

Source: index.d.ts, line 596, character 20

stateMarketStorageDeal

stateMarketStorageDeal (dealID: number, tipSetKey: Cid[]): Promise<MarketDeal>

Returns information about the indicated deal

Parameters:

  • dealID: number
  • tipSetKey: Cid[]

Returns:

Promise<MarketDeal>

Source: index.d.ts, line 608, character 24

stateMinerInfo

stateMinerInfo (address: string, tipSetKey: Cid[]): Promise<MinerInfo>

Returns info about the indicated miner

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<MinerInfo>

Source: index.d.ts, line 628, character 16

stateMinerPower

stateMinerPower (address: string, tipSetKey: Cid[]): Promise<MinerPower>

Returns the power of the indicated miner

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<MinerPower>

Source: index.d.ts, line 640, character 17

stateMinerProvingDeadline

stateMinerProvingDeadline (address: string, tipSetKey: Cid[]): Promise<Info>

Calculates the deadline at some epoch for a proving period and returns the deadline-related calculations.

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<Info>

Source: index.d.ts, line 649, character 27

stateNetworkVersion

stateNetworkVersion (tipSetKey: Cid[]): Promise<number>

Returns the network version at the given tipset

Parameters:

  • tipSetKey: Cid[]

Returns:

Promise<number>

Source: index.d.ts, line 669, character 21

stateVerifiedClientStatus

stateVerifiedClientStatus (address: string, tipSetKey: Cid[]): Promise<string>

Returns the data cap for the given address. Returns nil if there is no entry in the data cap table for the address.

Parameters:

  • address: string
  • tipSetKey: Cid[]

Returns:

Promise<string>

Source: index.d.ts, line 711, character 27

stateWaitMsg

stateWaitMsg (cid: Cid, uint: number): Promise<MsgLookup>

Looks back in the chain for a message. If not found, it blocks until the message arrives on chain, and gets to the indicated confidence depth.

Parameters:

  • cid: Cid
  • uint: number

Returns:

Promise<MsgLookup>

Source: index.d.ts, line 726, character 14