For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Filecoin — State, Wallet

API reference for Filecoin. All methods ->

Filecoin.StateCompute

Applies the given messages on the given tipset.

The messages are run as though the VM were at the provided height.

When called, StateCompute will:

  • Load the provided tipset, or use the current chain head if not provided
  • Compute the tipset state of the provided tipset on top of the parent state
    • (note that this step runs before vmheight is applied to the execution)
    • Execute state upgrade if any were scheduled at the epoch, or in null blocks preceding the tipset
    • Call the cron actor on null blocks preceding the tipset
    • For each block in the tipset
      • Apply messages in blocks in the specified
      • Award block reward by calling the reward actor
    • Call the cron actor for the current epoch
  • If the specified vmheight is higher than the current epoch, apply any needed state upgrades to the state
  • Apply the specified messages to the state

The vmheight parameter sets VM execution epoch, and can be used to simulate message execution in different network versions. If the specified vmheight epoch is higher than the epoch of the specified tipset, any state upgrades until the vmheight will be executed on the state before applying messages specified by the user.

Note that the initial tipset state computation is not affected by the vmheight parameter — only the messages in the apply set are

If the caller wants to simply compute the state, vmheight should be set to the epoch of the specified tipset.

Messages in the apply parameter must have the correct nonces, and gas values set.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateCompute",
"params": [
10101,
[
{
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
}
],
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Trace": [
{
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"GasCost": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"GasUsed": "0",
"BaseFeeBurn": "0",
"OverEstimationBurn": "0",
"MinerPenalty": "0",
"MinerTip": "0",
"Refund": "0",
"TotalCost": "0"
},
"ExecutionTrace": {
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": [
{
"Name": "string value",
"loc": [
{
"File": "string value",
"Line": 123,
"Function": "string value"
}
],
"tg": 9,
"cg": 9,
"sg": 9,
"vtg": 9,
"vcg": 9,
"vsg": 9,
"tt": 60000000000,
"ex": {}
}
],
"Subcalls": [
{
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": [
{
"Name": "string value",
"loc": [
{
"File": "string value",
"Line": 123,
"Function": "string value"
}
],
"tg": 9,
"cg": 9,
"sg": 9,
"vtg": 9,
"vcg": 9,
"vsg": 9,
"tt": 60000000000,
"ex": {}
}
],
"Subcalls": null
}
]
},
"Error": "string value",
"Duration": 60000000000
}
]
},
"id": 1
}

Filecoin.StateDealProviderCollateralBounds

Returns the min and max collateral a storage provider can issue.

It takes the deal size and verified status as parameters.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateDealProviderCollateralBounds",
"params": [
1032,
true,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Min": "0",
"Max": "0"
},
"id": 1
}

Filecoin.StateDecodeParams

Attempts to decode the provided params, based on the recipient actor address and method number.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateDecodeParams",
"params": [
"f01234",
1,
"Ynl0ZSBhcnJheQ==",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {},
"id": 1
}

Filecoin.StateGetActor

Returns the indicated actor’s nonce and balance.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateGetActor",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Code": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Head": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Nonce": 42,
"Balance": "0"
},
"id": 1
}

Filecoin.StateGetReceipt

Returns the message receipt for the given message or for a matching gas-repriced replacing message.

tip

If the requested message was replaced, this method will return the receipt for the replacing message — if the caller needs the receipt for exactly the requested message, use StateSearchMsg().Receipt, and check that MsgLookup.Message is matching the requested CID.

warning

DEPRECATED: Use StateSearchMsg, this method won’t be supported in v1 API

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateGetReceipt",
"params": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"id": 1
}

Filecoin.StateListActors

Returns the addresses of every actor in the state.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateListActors",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": ["f01234"],
"id": 1
}

Filecoin.StateListMessages

Looks back and returns all messages with a matching to or from address, stopping at the given height.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateListMessages",
"params": [
{
"To": "f01234",
"From": "f01234"
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
10101
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
],
"id": 1
}

Filecoin.StateListMiners

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

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateListMiners",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
"f01234"
],
"id": 1
}

Filecoin.StateLookupID

Retrieves the ID address of the given address.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateLookupID",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "f01234",
"id": 1
}

Filecoin.StateMarketBalance

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

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMarketBalance",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Escrow": "0",
"Locked": "0"
},
"id": 1
}

Filecoin.StateMarketDeals

Returns information about every deal in the Storage Market.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMarketDeals",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"t026363": {
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": "string value",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
}
}
},
"id": 1
}

Filecoin.StateMarketParticipants

Returns the Escrow and Locked balances of every participant in the Storage Market.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMarketParticipants",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"t026363": {
"Escrow": "0",
"Locked": "0"
}
},
"id": 1
}

Filecoin.StateMarketStorageDeal

Returns information about the indicated deal.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMarketStorageDeal",
"params": [
5432,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": "string value",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
}
},
"id": 1
}

Filecoin.StateMinerActiveSectors

Returns info about sectors that a given miner is actively proving.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerActiveSectors",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
{
"SectorNumber": 9,
"SealProof": 8,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"DealIDs": [
5432
],
"Activation": 10101,
"Expiration": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0",
"InitialPledge": "0",
"ExpectedDayReward": "0",
"ExpectedStoragePledge": "0",
"SectorKeyCID": null
}
],
"id": 1
}

Filecoin.StateMinerAvailableBalance

Returns the portion of a miner’s balance that can be withdrawn or spent.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerAvailableBalance",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.StateMinerDeadlines

Returns all the proving deadlines for the given miner.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerDeadlines",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
{
"PostSubmissions": [
5,
1
],
"DisputableProofCount": 42
}
],
"id": 1
}

Filecoin.StateMinerFaults

Returns a bitfield indicating the faulty sectors of the given miner.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerFaults",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
5,
1
],
"id": 1
}

Filecoin.StateMinerInfo

Returns info about the indicated miner.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerInfo",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Owner": "f01234",
"Worker": "f01234",
"NewWorker": "f01234",
"ControlAddresses": [
"f01234"
],
"WorkerChangeEpoch": 10101,
"PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Multiaddrs": [
"Ynl0ZSBhcnJheQ=="
],
"WindowPoStProofType": 8,
"SectorSize": 34359738368,
"WindowPoStPartitionSectors": 42,
"ConsensusFaultElapsed": 10101
},
"id": 1
}

Filecoin.StateMinerInitialPledgeCollateral

Returns the initial pledge collateral for the specified miner’s sector.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerInitialPledgeCollateral",
"params": [
"f01234",
{
"SealProof": 8,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": [
5432
],
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.StateMinerPartitions

Returns all partitions in the specified deadline.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerPartitions",
"params": [
"f01234",
42,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
{
"AllSectors": [
5,
1
],
"FaultySectors": [
5,
1
],
"RecoveringSectors": [
5,
1
],
"LiveSectors": [
5,
1
],
"ActiveSectors": [
5,
1
]
}
],
"id": 1
}

Filecoin.StateMinerPower

Returns the power of the indicated miner.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerPower",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"MinerPower": {
"RawBytePower": "0",
"QualityAdjPower": "0"
},
"TotalPower": {
"RawBytePower": "0",
"QualityAdjPower": "0"
},
"HasMinPower": true
},
"id": 1
}

Filecoin.StateMinerPreCommitDepositForPower

Returns the pre-commit deposit for the specified miner’s sector.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerPreCommitDepositForPower",
"params": [
"f01234",
{
"SealProof": 8,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": [
5432
],
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.StateMinerProvingDeadline

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

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerProvingDeadline",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"CurrentEpoch": 10101,
"PeriodStart": 10101,
"Index": 42,
"Open": 10101,
"Close": 10101,
"Challenge": 10101,
"FaultCutoff": 10101,
"WPoStPeriodDeadlines": 42,
"WPoStProvingPeriod": 10101,
"WPoStChallengeWindow": 10101,
"WPoStChallengeLookback": 10101,
"FaultDeclarationCutoff": 10101
},
"id": 1
}

Filecoin.StateMinerRecoveries

Returns a bitfield indicating the recovering sectors of the given miner.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerRecoveries",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
5,
1
],
"id": 1
}

Filecoin.StateMinerSectorAllocated

Checks if a sector is allocated.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerSectorAllocated",
"params": [
"f01234",
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": true,
"id": 1
}

Filecoin.StateMinerSectorCount

Returns the number of sectors in a miner’s sector set and proving set.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerSectorCount",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Live": 42,
"Active": 42,
"Faulty": 42
},
"id": 1
}

Filecoin.StateMinerSectors

Returns info about the given miner’s sectors.

If the filter bitfield is nil, all sectors are included.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateMinerSectors",
"params": [
"f01234",
[
0
],
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": [
{
"SectorNumber": 9,
"SealProof": 8,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"DealIDs": [
5432
],
"Activation": 10101,
"Expiration": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0",
"InitialPledge": "0",
"ExpectedDayReward": "0",
"ExpectedStoragePledge": "0",
"SectorKeyCID": null
}
],
"id": 1
}

Filecoin.StateNetworkName

Returns the name of the network the node is synced to.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateNetworkName",
"params": [],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "lotus",
"id": 1
}

Filecoin.StateNetworkVersion

Returns the network version at the given tipset.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateNetworkVersion",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": 15,
"id": 1
}

Filecoin.StateReadState

Returns the indicated actor’s state.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateReadState",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Balance": "0",
"Code": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"State": {}
},
"id": 1
}

Filecoin.StateReplay

Replays a given message, assuming it was included in a block in the specified tipset.

If a tipset key is provided, and a replacing message is found on chain, the method will return an error saying that the message wasn’t found

If no tipset key is provided, the appropriate tipset is looked up, and if the message was gas-repriced, the on-chain message will be replayed — in that case the returned InvocResult.MsgCid will not match the Cid param

If the caller wants to ensure that exactly the requested message was executed, they MUST check that InvocResult.MsgCid is equal to the provided Cid. Without this check both the requested and original message may appear as successfully executed on-chain, which may look like a double-spend.

A replacing message is a message with a different CID, any of Gas values, and different signature, but with all other parameters matching (source/destination, nonce, params, etc.)

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateReplay",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"GasCost": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"GasUsed": "0",
"BaseFeeBurn": "0",
"OverEstimationBurn": "0",
"MinerPenalty": "0",
"MinerTip": "0",
"Refund": "0",
"TotalCost": "0"
},
"ExecutionTrace": {
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": [
{
"Name": "string value",
"loc": [
{
"File": "string value",
"Line": 123,
"Function": "string value"
}
],
"tg": 9,
"cg": 9,
"sg": 9,
"vtg": 9,
"vcg": 9,
"vsg": 9,
"tt": 60000000000,
"ex": {}
}
],
"Subcalls": [
{
"Msg": {
"Version": 42,
"To": "f01234",
"From": "f01234",
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": [
{
"Name": "string value",
"loc": [
{
"File": "string value",
"Line": 123,
"Function": "string value"
}
],
"tg": 9,
"cg": 9,
"sg": 9,
"vtg": 9,
"vcg": 9,
"vsg": 9,
"tt": 60000000000,
"ex": {}
}
],
"Subcalls": null
}
]
},
"Error": "string value",
"Duration": 60000000000
},
"id": 1
}

Filecoin.StateSearchMsg

Searches for a message in the chain, and returns its receipt and the tipset where it was executed.

NOTE: If a replacing message is found on chain, this method will return a MsgLookup for the replacing message — the MsgLookup.Message will be a different CID than the one provided in the ‘cid’ param, MsgLookup.Receipt will contain the result of the execution of the replacing message.

If the caller wants to ensure that exactly the requested message was executed, they MUST check that MsgLookup.Message is equal to the provided ‘cid’. Without this check both the requested and original message may appear as successfully executed on-chain, which may look like a double-spend.

A replacing message is a message with a different CID, any of Gas values, and different signature, but with all other parameters matching (source/destination, nonce, params, etc.)

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSearchMsg",
"params": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
},
"id": 1
}

Filecoin.StateSearchMsgLimited

Looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed.

NOTE: If a replacing message is found on chain, this method will return a MsgLookup for the replacing message — the MsgLookup.Message will be a different CID than the one provided in the ‘cid’ param, MsgLookup.Receipt will contain the result of the execution of the replacing message.

If the caller wants to ensure that exactly the requested message was executed, they MUST check that MsgLookup.Message is equal to the provided ‘cid’. Without this check both the requested and original message may appear as successfully executed on-chain, which may look like a double-spend.

A replacing message is a message with a different CID, any of Gas values, and different signature, but with all other parameters matching (source/destination, nonce, params, etc.)

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSearchMsgLimited",
"params": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
10101
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
},
"id": 1
}

Filecoin.StateSectorExpiration

Returns epoch at which given sector will expire

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSectorExpiration",
"params": [
"f01234",
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"OnTime": 10101,
"Early": 10101
},
"id": 1
}

Filecoin.StateSectorGetInfo

Returns the on-chain info for the specified miner’s sector.

Returns null in case the sector info isn’t found.

tip

NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate expiration epoch.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSectorGetInfo",
"params": [
"f01234",
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"SectorNumber": 9,
"SealProof": 8,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"DealIDs": [
5432
],
"Activation": 10101,
"Expiration": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0",
"InitialPledge": "0",
"ExpectedDayReward": "0",
"ExpectedStoragePledge": "0",
"SectorKeyCID": null
},
"id": 1
}

Filecoin.StateSectorPartition

Finds deadline/partition with the specified sector.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSectorPartition",
"params": [
"f01234",
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Deadline": 42,
"Partition": 42
},
"id": 1
}

Filecoin.StateSectorPreCommitInfo

Returns the PreCommit info for the specified miner’s sector.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateSectorPreCommitInfo",
"params": [
"f01234",
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Info": {
"SealProof": 8,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": [
5432
],
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
"PreCommitDeposit": "0",
"PreCommitEpoch": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0"
},
"id": 1
}

Filecoin.StateVMCirculatingSupplyInternal

Returns an approximation of the circulating supply of Filecoin at the given tipset.

This is the value reported by the runtime interface to actors code.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateVMCirculatingSupplyInternal",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"FilVested": "0",
"FilMined": "0",
"FilBurnt": "0",
"FilLocked": "0",
"FilCirculating": "0",
"FilReserveDisbursed": "0"
},
"id": 1
}

Filecoin.StateVerifiedClientStatus

Returns the data cap for the given address.

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

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateVerifiedClientStatus",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.StateVerifiedRegistryRootKey

Returns the address of the Verified Registry’s root key.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateVerifiedRegistryRootKey",
"params": [
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "f01234",
"id": 1
}

Filecoin.StateVerifierStatus

Returns the data cap for the given address.

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

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateVerifierStatus",
"params": [
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.StateWaitMsg

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.

NOTE: If a replacing message is found on chain, this method will return a MsgLookup for the replacing message — the MsgLookup.Message will be a different CID than the one provided in the ‘cid’ param, MsgLookup.Receipt will contain the result of the execution of the replacing message.

If the caller wants to ensure that exactly the requested message was executed, they MUST check that MsgLookup.Message is equal to the provided ‘cid’. Without this check both the requested and original message may appear as successfully executed on-chain, which may look like a double-spend.

A replacing message is a message with a different CID, any of Gas values, and different signature, but with all other parameters matching (source/destination, nonce, params, etc.)

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateWaitMsg",
"params": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
42
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
},
"id": 1
}

Filecoin.StateWaitMsgLimited

Looks back up to limit epochs in the chain for a message.

If not found, it blocks until the message arrives on chain, and gets to the indicated confidence depth.

NOTE: If a replacing message is found on chain, this method will return a MsgLookup for the replacing message — the MsgLookup.Message will be a different CID than the one provided in the ‘cid’ param, MsgLookup.Receipt will contain the result of the execution of the replacing message.

If the caller wants to ensure that exactly the requested message was executed, they MUST check that MsgLookup.Message is equal to the provided ‘cid’. Without this check both the requested and original message may appear as successfully executed on-chain, which may look like a double-spend.

A replacing message is a message with a different CID, any of Gas values, and different signature, but with all other parameters matching (source/destination, nonce, params, etc.)

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.StateWaitMsgLimited",
"params": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
42,
10101
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
},
"id": 1
}

Wallet

The Wallet methods are used for wallet operations.

Filecoin.WalletBalance

Returns the balance of the given address at the current head of the chain.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.WalletBalance",
"params": [
"f01234"
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "0",
"id": 1
}

Filecoin.WalletValidateAddress

Validates whether a given string can be decoded as a well-formed address.

Permission: read

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.WalletValidateAddress",
"params": [
"string value"
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": "f01234",
"id": 1
}

Filecoin.WalletVerify

Takes an address, a signature, and some bytes, and indicates whether the signature is valid.

The address does not have to be in the wallet.

Request example

curl -X POST https://rpc.ankr.com/filecoin/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "Filecoin.WalletVerify",
"params": [
"f01234",
"Ynl0ZSBhcnJheQ==",
{
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": true,
"id": 1
}