lotus/documentation/en/api-methods.md

5017 lines
82 KiB
Markdown
Raw Normal View History

2020-08-24 10:25:49 +00:00
# Groups
* [](#)
* [Closing](#Closing)
* [Shutdown](#Shutdown)
* [Version](#Version)
* [Auth](#Auth)
* [AuthNew](#AuthNew)
* [AuthVerify](#AuthVerify)
* [Beacon](#Beacon)
* [BeaconGetEntry](#BeaconGetEntry)
* [Chain](#Chain)
2020-09-10 17:47:19 +00:00
* [ChainDeleteObj](#ChainDeleteObj)
2020-08-24 10:25:49 +00:00
* [ChainExport](#ChainExport)
* [ChainGetBlock](#ChainGetBlock)
* [ChainGetBlockMessages](#ChainGetBlockMessages)
* [ChainGetGenesis](#ChainGetGenesis)
* [ChainGetMessage](#ChainGetMessage)
* [ChainGetNode](#ChainGetNode)
* [ChainGetParentMessages](#ChainGetParentMessages)
* [ChainGetParentReceipts](#ChainGetParentReceipts)
* [ChainGetPath](#ChainGetPath)
* [ChainGetRandomnessFromBeacon](#ChainGetRandomnessFromBeacon)
* [ChainGetRandomnessFromTickets](#ChainGetRandomnessFromTickets)
* [ChainGetTipSet](#ChainGetTipSet)
* [ChainGetTipSetByHeight](#ChainGetTipSetByHeight)
* [ChainHasObj](#ChainHasObj)
* [ChainHead](#ChainHead)
* [ChainNotify](#ChainNotify)
* [ChainReadObj](#ChainReadObj)
* [ChainSetHead](#ChainSetHead)
* [ChainStatObj](#ChainStatObj)
* [ChainTipSetWeight](#ChainTipSetWeight)
* [Client](#Client)
* [ClientCalcCommP](#ClientCalcCommP)
* [ClientDataTransferUpdates](#ClientDataTransferUpdates)
* [ClientDealPieceCID](#ClientDealPieceCID)
2020-08-24 10:25:49 +00:00
* [ClientDealSize](#ClientDealSize)
* [ClientFindData](#ClientFindData)
* [ClientGenCar](#ClientGenCar)
* [ClientGetDealInfo](#ClientGetDealInfo)
2020-08-28 20:17:35 +00:00
* [ClientGetDealUpdates](#ClientGetDealUpdates)
2020-08-24 10:25:49 +00:00
* [ClientHasLocal](#ClientHasLocal)
* [ClientImport](#ClientImport)
* [ClientListDataTransfers](#ClientListDataTransfers)
* [ClientListDeals](#ClientListDeals)
* [ClientListImports](#ClientListImports)
* [ClientMinerQueryOffer](#ClientMinerQueryOffer)
* [ClientQueryAsk](#ClientQueryAsk)
* [ClientRemoveImport](#ClientRemoveImport)
* [ClientRestartDataTransfer](#ClientRestartDataTransfer)
2020-08-24 10:25:49 +00:00
* [ClientRetrieve](#ClientRetrieve)
2020-09-07 12:35:29 +00:00
* [ClientRetrieveTryRestartInsufficientFunds](#ClientRetrieveTryRestartInsufficientFunds)
2020-08-24 10:25:49 +00:00
* [ClientRetrieveWithEvents](#ClientRetrieveWithEvents)
* [ClientStartDeal](#ClientStartDeal)
2020-10-01 16:00:24 +00:00
* [Create](#Create)
* [CreateBackup](#CreateBackup)
2020-08-24 10:25:49 +00:00
* [Gas](#Gas)
* [GasEstimateFeeCap](#GasEstimateFeeCap)
* [GasEstimateGasLimit](#GasEstimateGasLimit)
* [GasEstimateGasPremium](#GasEstimateGasPremium)
* [GasEstimateMessageGas](#GasEstimateMessageGas)
* [I](#I)
* [ID](#ID)
* [Log](#Log)
* [LogList](#LogList)
* [LogSetLevel](#LogSetLevel)
* [Market](#Market)
* [MarketEnsureAvailable](#MarketEnsureAvailable)
* [Miner](#Miner)
* [MinerCreateBlock](#MinerCreateBlock)
* [MinerGetBaseInfo](#MinerGetBaseInfo)
* [Mpool](#Mpool)
* [MpoolClear](#MpoolClear)
* [MpoolGetConfig](#MpoolGetConfig)
* [MpoolGetNonce](#MpoolGetNonce)
* [MpoolPending](#MpoolPending)
* [MpoolPush](#MpoolPush)
* [MpoolPushMessage](#MpoolPushMessage)
2020-10-02 21:14:47 +00:00
* [MpoolPushUntrusted](#MpoolPushUntrusted)
2020-08-24 10:25:49 +00:00
* [MpoolSelect](#MpoolSelect)
* [MpoolSetConfig](#MpoolSetConfig)
* [MpoolSub](#MpoolSub)
* [Msig](#Msig)
2020-09-06 07:51:06 +00:00
* [MsigAddApprove](#MsigAddApprove)
* [MsigAddCancel](#MsigAddCancel)
* [MsigAddPropose](#MsigAddPropose)
2020-08-24 10:25:49 +00:00
* [MsigApprove](#MsigApprove)
2020-10-10 10:28:59 +00:00
* [MsigApproveTxnHash](#MsigApproveTxnHash)
2020-08-24 10:25:49 +00:00
* [MsigCancel](#MsigCancel)
* [MsigCreate](#MsigCreate)
* [MsigGetAvailableBalance](#MsigGetAvailableBalance)
2020-09-06 07:51:06 +00:00
* [MsigGetVested](#MsigGetVested)
* [MsigGetVestingSchedule](#MsigGetVestingSchedule)
2020-08-24 10:25:49 +00:00
* [MsigPropose](#MsigPropose)
2020-10-10 10:28:59 +00:00
* [MsigRemoveSigner](#MsigRemoveSigner)
2020-08-24 10:25:49 +00:00
* [MsigSwapApprove](#MsigSwapApprove)
* [MsigSwapCancel](#MsigSwapCancel)
* [MsigSwapPropose](#MsigSwapPropose)
* [Net](#Net)
* [NetAddrsListen](#NetAddrsListen)
2020-09-03 23:35:53 +00:00
* [NetAgentVersion](#NetAgentVersion)
2020-08-24 10:25:49 +00:00
* [NetAutoNatStatus](#NetAutoNatStatus)
2020-09-02 23:31:41 +00:00
* [NetBandwidthStats](#NetBandwidthStats)
* [NetBandwidthStatsByPeer](#NetBandwidthStatsByPeer)
* [NetBandwidthStatsByProtocol](#NetBandwidthStatsByProtocol)
2020-08-24 10:25:49 +00:00
* [NetConnect](#NetConnect)
* [NetConnectedness](#NetConnectedness)
* [NetDisconnect](#NetDisconnect)
* [NetFindPeer](#NetFindPeer)
* [NetPeers](#NetPeers)
* [NetPubsubScores](#NetPubsubScores)
* [Paych](#Paych)
* [PaychAllocateLane](#PaychAllocateLane)
2020-09-03 23:35:53 +00:00
* [PaychAvailableFunds](#PaychAvailableFunds)
2020-09-05 19:51:30 +00:00
* [PaychAvailableFundsByFromTo](#PaychAvailableFundsByFromTo)
2020-08-24 10:25:49 +00:00
* [PaychCollect](#PaychCollect)
* [PaychGet](#PaychGet)
* [PaychGetWaitReady](#PaychGetWaitReady)
* [PaychList](#PaychList)
* [PaychNewPayment](#PaychNewPayment)
* [PaychSettle](#PaychSettle)
* [PaychStatus](#PaychStatus)
* [PaychVoucherAdd](#PaychVoucherAdd)
* [PaychVoucherCheckSpendable](#PaychVoucherCheckSpendable)
* [PaychVoucherCheckValid](#PaychVoucherCheckValid)
* [PaychVoucherCreate](#PaychVoucherCreate)
* [PaychVoucherList](#PaychVoucherList)
* [PaychVoucherSubmit](#PaychVoucherSubmit)
* [State](#State)
* [StateAccountKey](#StateAccountKey)
* [StateAllMinerFaults](#StateAllMinerFaults)
* [StateCall](#StateCall)
* [StateChangedActors](#StateChangedActors)
* [StateCirculatingSupply](#StateCirculatingSupply)
* [StateCompute](#StateCompute)
* [StateDealProviderCollateralBounds](#StateDealProviderCollateralBounds)
* [StateGetActor](#StateGetActor)
* [StateGetReceipt](#StateGetReceipt)
* [StateListActors](#StateListActors)
* [StateListMessages](#StateListMessages)
* [StateListMiners](#StateListMiners)
* [StateLookupID](#StateLookupID)
* [StateMarketBalance](#StateMarketBalance)
* [StateMarketDeals](#StateMarketDeals)
* [StateMarketParticipants](#StateMarketParticipants)
* [StateMarketStorageDeal](#StateMarketStorageDeal)
* [StateMinerActiveSectors](#StateMinerActiveSectors)
* [StateMinerAvailableBalance](#StateMinerAvailableBalance)
* [StateMinerDeadlines](#StateMinerDeadlines)
* [StateMinerFaults](#StateMinerFaults)
* [StateMinerInfo](#StateMinerInfo)
* [StateMinerInitialPledgeCollateral](#StateMinerInitialPledgeCollateral)
* [StateMinerPartitions](#StateMinerPartitions)
* [StateMinerPower](#StateMinerPower)
* [StateMinerPreCommitDepositForPower](#StateMinerPreCommitDepositForPower)
* [StateMinerProvingDeadline](#StateMinerProvingDeadline)
* [StateMinerRecoveries](#StateMinerRecoveries)
* [StateMinerSectorCount](#StateMinerSectorCount)
* [StateMinerSectors](#StateMinerSectors)
* [StateNetworkName](#StateNetworkName)
2020-09-17 15:31:09 +00:00
* [StateNetworkVersion](#StateNetworkVersion)
2020-08-24 10:25:49 +00:00
* [StateReadState](#StateReadState)
* [StateReplay](#StateReplay)
* [StateSearchMsg](#StateSearchMsg)
* [StateSectorExpiration](#StateSectorExpiration)
* [StateSectorGetInfo](#StateSectorGetInfo)
* [StateSectorPartition](#StateSectorPartition)
* [StateSectorPreCommitInfo](#StateSectorPreCommitInfo)
* [StateVMCirculatingSupplyInternal](#StateVMCirculatingSupplyInternal)
2020-08-24 10:25:49 +00:00
* [StateVerifiedClientStatus](#StateVerifiedClientStatus)
2020-10-01 07:14:59 +00:00
* [StateVerifiedRegistryRootKey](#StateVerifiedRegistryRootKey)
* [StateVerifierStatus](#StateVerifierStatus)
2020-08-24 10:25:49 +00:00
* [StateWaitMsg](#StateWaitMsg)
2020-10-09 16:43:22 +00:00
* [StateWaitMsgLimited](#StateWaitMsgLimited)
2020-08-24 10:25:49 +00:00
* [Sync](#Sync)
* [SyncCheckBad](#SyncCheckBad)
2020-09-09 07:45:47 +00:00
* [SyncCheckpoint](#SyncCheckpoint)
2020-08-24 10:25:49 +00:00
* [SyncIncomingBlocks](#SyncIncomingBlocks)
* [SyncMarkBad](#SyncMarkBad)
* [SyncState](#SyncState)
* [SyncSubmitBlock](#SyncSubmitBlock)
2020-10-10 18:46:06 +00:00
* [SyncUnmarkAllBad](#SyncUnmarkAllBad)
2020-09-09 07:45:47 +00:00
* [SyncUnmarkBad](#SyncUnmarkBad)
2020-09-27 22:08:58 +00:00
* [SyncValidateTipset](#SyncValidateTipset)
2020-08-24 10:25:49 +00:00
* [Wallet](#Wallet)
* [WalletBalance](#WalletBalance)
* [WalletDefaultAddress](#WalletDefaultAddress)
* [WalletDelete](#WalletDelete)
* [WalletExport](#WalletExport)
* [WalletHas](#WalletHas)
* [WalletImport](#WalletImport)
* [WalletList](#WalletList)
* [WalletNew](#WalletNew)
* [WalletSetDefault](#WalletSetDefault)
* [WalletSign](#WalletSign)
* [WalletSignMessage](#WalletSignMessage)
2020-09-30 05:45:03 +00:00
* [WalletValidateAddress](#WalletValidateAddress)
2020-08-24 10:25:49 +00:00
* [WalletVerify](#WalletVerify)
##
### Closing
Perms: read
Inputs: `null`
Response: `{}`
### Shutdown
Perms: admin
Inputs: `null`
Response: `{}`
### Version
Perms: read
Inputs: `null`
Response:
```json
{
"Version": "string value",
2020-10-14 06:10:26 +00:00
"APIVersion": 4352,
2020-08-24 10:25:49 +00:00
"BlockDelay": 42
}
```
## Auth
### AuthNew
Perms: admin
Inputs:
```json
[
null
]
```
Response: `"Ynl0ZSBhcnJheQ=="`
### AuthVerify
Perms: read
Inputs:
```json
[
"string value"
]
```
Response: `null`
## Beacon
The Beacon method group contains methods for interacting with the random beacon (DRAND)
### BeaconGetEntry
BeaconGetEntry returns the beacon entry for the given filecoin epoch. If
the entry has not yet been produced, the call will block until the entry
becomes available
Perms: read
Inputs:
```json
[
10101
]
```
Response:
```json
{
"Round": 42,
"Data": "Ynl0ZSBhcnJheQ=="
}
```
## Chain
The Chain method group contains methods for interacting with the
blockchain, but that do not require any form of state computation.
2020-09-10 17:47:19 +00:00
### ChainDeleteObj
ChainDeleteObj deletes node referenced by the given CID
Perms: admin
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `{}`
2020-08-24 10:25:49 +00:00
### ChainExport
ChainExport returns a stream of bytes with CAR dump of chain data.
2020-09-02 12:57:44 +00:00
The exported chain data includes the header chain from the given tipset
back to genesis, the entire genesis state, and the most recent 'nroots'
state trees.
2020-09-11 08:55:10 +00:00
If oldmsgskip is set, messages from before the requested roots are also not included.
2020-08-24 10:25:49 +00:00
Perms: read
Inputs:
```json
[
2020-09-02 12:57:44 +00:00
10101,
2020-09-11 08:55:10 +00:00
true,
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"Ynl0ZSBhcnJheQ=="`
### ChainGetBlock
ChainGetBlock returns the block specified by the given CID.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"ElectionProof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
"WinPoStProof": null,
"Parents": null,
"ParentWeight": "0",
"Height": 10101,
"ParentStateRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ParentMessageReceipts": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Messages": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"BLSAggregate": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Timestamp": 42,
"BlockSig": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ForkSignaling": 42,
"ParentBaseFee": "0"
}
```
### ChainGetBlockMessages
ChainGetBlockMessages returns messages stored in the specified block.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"BlsMessages": null,
"SecpkMessages": null,
"Cids": null
}
```
### ChainGetGenesis
ChainGetGenesis returns the genesis tipset.
Perms: read
Inputs: `null`
Response:
```json
{
"Cids": null,
"Blocks": null,
"Height": 0
}
```
### ChainGetMessage
ChainGetMessage reads a message referenced by the specified CID from the
chain blockstore.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
}
```
### ChainGetNode
There are not yet any comments for this method.
Perms: read
Inputs:
```json
[
"string value"
]
```
Response:
```json
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Obj": {}
}
```
### ChainGetParentMessages
ChainGetParentMessages returns messages stored in parent tipset of the
specified block.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `null`
### ChainGetParentReceipts
ChainGetParentReceipts returns receipts for messages in parent tipset of
the specified block.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `null`
### ChainGetPath
ChainGetPath returns a set of revert/apply operations needed to get from
one tipset to another, for example:
```
to
^
from tAA
^ ^
tBA tAB
^---*--^
^
tRR
```
Would return `[revert(tBA), apply(tAB), apply(tAA)]`
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### ChainGetRandomnessFromBeacon
ChainGetRandomnessFromBeacon is used to sample the beacon for randomness.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
2,
10101,
"Ynl0ZSBhcnJheQ=="
]
```
Response: `null`
### ChainGetRandomnessFromTickets
ChainGetRandomnessFromTickets is used to sample the chain for randomness.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
2,
10101,
"Ynl0ZSBhcnJheQ=="
]
```
Response: `null`
### ChainGetTipSet
ChainGetTipSet returns the tipset specified by the given TipSetKey.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Cids": null,
"Blocks": null,
"Height": 0
}
```
### ChainGetTipSetByHeight
ChainGetTipSetByHeight looks back for a tipset at the specified epoch.
If there are no blocks at the specified epoch, a tipset at an earlier epoch
will be returned.
Perms: read
Inputs:
```json
[
10101,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Cids": null,
"Blocks": null,
"Height": 0
}
```
### ChainHasObj
ChainHasObj checks if a given CID exists in the chain blockstore.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `true`
### ChainHead
ChainHead returns the current head of the chain.
Perms: read
Inputs: `null`
Response:
```json
{
"Cids": null,
"Blocks": null,
"Height": 0
}
```
### ChainNotify
ChainNotify returns channel with chain head updates.
First message is guaranteed to be of len == 1, and type == 'current'.
Perms: read
Inputs: `null`
Response: `null`
### ChainReadObj
ChainReadObj reads ipld nodes referenced by the specified CID from chain
blockstore and returns raw bytes.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `"Ynl0ZSBhcnJheQ=="`
### ChainSetHead
ChainSetHead forcefully sets current chain head. Use with caution.
Perms: admin
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
### ChainStatObj
ChainStatObj returns statistics about the graph referenced by 'obj'.
If 'base' is also specified, then the returned stat will be a diff
between the two objects.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"Size": 42,
"Links": 42
}
```
### ChainTipSetWeight
ChainTipSetWeight computes weight for the specified tipset.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
## Client
The Client methods all have to do with interacting with the storage and
retrieval markets as a client
### ClientCalcCommP
ClientCalcCommP calculates the CommP for a specified file
Perms: read
Inputs:
```json
[
"string value"
]
```
Response:
```json
{
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1024
}
```
### ClientDataTransferUpdates
There are not yet any comments for this method.
Perms: write
Inputs: `null`
Response:
```json
{
"TransferID": 3,
"Status": 1,
"BaseCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"IsInitiator": true,
"IsSender": true,
"Voucher": "string value",
"Message": "string value",
"OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Transferred": 42
}
```
### ClientDealPieceCID
ClientCalcCommP calculates the CommP and data size of the specified CID
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"PayloadSize": 9,
"PieceSize": 1032,
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
```
2020-08-24 10:25:49 +00:00
### ClientDealSize
ClientDealSize calculates real deal data size
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"PayloadSize": 9,
"PieceSize": 1032
}
```
### ClientFindData
ClientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer).
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
null
]
```
Response: `null`
### ClientGenCar
ClientGenCar generates a CAR file for the specified file.
Perms: write
Inputs:
```json
[
{
"Path": "string value",
"IsCAR": true
},
"string value"
]
```
Response: `{}`
### ClientGetDealInfo
ClientGetDealInfo returns the latest information about a given deal.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"ProposalCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"State": 42,
"Message": "string value",
2020-10-06 07:30:40 +00:00
"Provider": "f01234",
2020-08-24 10:25:49 +00:00
"DataRef": {
"TransferType": "string value",
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceCid": null,
"PieceSize": 1024
},
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 42,
"PricePerEpoch": "0",
"Duration": 42,
"DealID": 5432,
2020-10-03 07:41:01 +00:00
"CreationTime": "0001-01-01T00:00:00Z",
"Verified": true
2020-08-24 10:25:49 +00:00
}
```
2020-08-28 20:17:35 +00:00
### ClientGetDealUpdates
ClientGetDealUpdates returns the status of updated deals
Perms: read
Inputs: `null`
Response:
```json
{
"ProposalCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"State": 42,
"Message": "string value",
2020-10-06 07:30:40 +00:00
"Provider": "f01234",
2020-08-28 20:17:35 +00:00
"DataRef": {
"TransferType": "string value",
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceCid": null,
"PieceSize": 1024
},
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 42,
"PricePerEpoch": "0",
"Duration": 42,
"DealID": 5432,
2020-10-03 07:41:01 +00:00
"CreationTime": "0001-01-01T00:00:00Z",
"Verified": true
2020-08-28 20:17:35 +00:00
}
```
2020-08-24 10:25:49 +00:00
### ClientHasLocal
ClientHasLocal indicates whether a certain CID is locally stored.
Perms: write
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `true`
### ClientImport
ClientImport imports file under the specified path into filestore.
Perms: admin
Inputs:
```json
[
{
"Path": "string value",
"IsCAR": true
}
]
```
Response:
```json
{
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ImportID": 50
}
```
### ClientListDataTransfers
ClientListTransfers returns the status of all ongoing transfers of data
Perms: write
Inputs: `null`
Response: `null`
### ClientListDeals
ClientListDeals returns information about the deals made by the local client.
Perms: write
Inputs: `null`
Response: `null`
### ClientListImports
ClientListImports lists imported files and their root CIDs
Perms: write
Inputs: `null`
Response: `null`
### ClientMinerQueryOffer
ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
null
]
```
Response:
```json
{
"Err": "string value",
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Piece": null,
"Size": 42,
"MinPrice": "0",
"UnsealPrice": "0",
"PaymentInterval": 42,
"PaymentIntervalIncrease": 42,
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"MinerPeer": {
2020-10-06 07:30:40 +00:00
"Address": "f01234",
2020-08-24 10:25:49 +00:00
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"PieceCID": null
}
}
```
### ClientQueryAsk
ClientQueryAsk returns a signed StorageAsk from the specified miner.
Perms: read
Inputs:
```json
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
2020-09-29 11:53:30 +00:00
"Price": "0",
"VerifiedPrice": "0",
"MinPieceSize": 1032,
"MaxPieceSize": 1032,
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-09-29 11:53:30 +00:00
"Timestamp": 10101,
"Expiry": 10101,
"SeqNo": 42
2020-08-24 10:25:49 +00:00
}
```
### ClientRemoveImport
ClientRemoveImport removes file import
Perms: admin
Inputs:
```json
[
50
]
```
Response: `{}`
### ClientRestartDataTransfer
ClientRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
Perms: write
Inputs:
```json
[
3,
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
true
]
```
Response: `{}`
2020-08-24 10:25:49 +00:00
### ClientRetrieve
ClientRetrieve initiates the retrieval of a file, as specified in the order.
Perms: admin
Inputs:
```json
[
{
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Piece": null,
"Size": 42,
"Total": "0",
"UnsealPrice": "0",
"PaymentInterval": 42,
"PaymentIntervalIncrease": 42,
2020-10-06 07:30:40 +00:00
"Client": "f01234",
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"MinerPeer": {
2020-10-06 07:30:40 +00:00
"Address": "f01234",
2020-08-24 10:25:49 +00:00
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"PieceCID": null
}
},
{
"Path": "string value",
"IsCAR": true
}
]
```
Response: `{}`
2020-09-07 12:35:29 +00:00
### ClientRetrieveTryRestartInsufficientFunds
ClientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel
which are stuck due to insufficient funds
Perms: write
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-09-07 12:35:29 +00:00
]
```
Response: `{}`
2020-08-24 10:25:49 +00:00
### ClientRetrieveWithEvents
ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
of status updates.
Perms: admin
Inputs:
```json
[
{
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Piece": null,
"Size": 42,
"Total": "0",
"UnsealPrice": "0",
"PaymentInterval": 42,
"PaymentIntervalIncrease": 42,
2020-10-06 07:30:40 +00:00
"Client": "f01234",
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"MinerPeer": {
2020-10-06 07:30:40 +00:00
"Address": "f01234",
2020-08-24 10:25:49 +00:00
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"PieceCID": null
}
},
{
"Path": "string value",
"IsCAR": true
}
]
```
Response:
```json
{
"Event": 5,
"Status": 0,
"BytesReceived": 42,
"FundsSpent": "0",
"Err": "string value"
}
```
### ClientStartDeal
ClientStartDeal proposes a deal with a miner.
Perms: admin
Inputs:
```json
[
{
"Data": {
"TransferType": "string value",
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceCid": null,
"PieceSize": 1024
},
2020-10-06 07:30:40 +00:00
"Wallet": "f01234",
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"EpochPrice": "0",
"MinBlocksDuration": 42,
"ProviderCollateral": "0",
"DealStartEpoch": 10101,
"FastRetrieval": true,
"VerifiedDeal": true
}
]
```
Response: `null`
2020-10-01 16:00:24 +00:00
## Create
### CreateBackup
CreateBackup creates node backup onder the specified file name. The
method requires that the lotus daemon is running with the
LOTUS_BACKUP_BASE_PATH environment variable set to some path, and that
the path specified when calling CreateBackup is within the base path
Perms: admin
Inputs:
```json
[
"string value"
]
```
Response: `{}`
2020-08-24 10:25:49 +00:00
## Gas
### GasEstimateFeeCap
GasEstimateFeeCap estimates gas fee cap
Perms: read
Inputs:
```json
[
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### GasEstimateGasLimit
GasEstimateGasLimit estimates gas used by the message and returns it.
It fails if message fails to execute.
Perms: read
Inputs:
```json
[
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `9`
### GasEstimateGasPremium
GasEstimateGasPremium estimates what gas price should be used for a
message to have high likelihood of inclusion in `nblocksincl` epochs.
Perms: read
Inputs:
```json
[
42,
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### GasEstimateMessageGas
GasEstimateMessageGas estimates gas values for unset message gas fields
Perms: read
Inputs:
```json
[
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
{
"MaxFee": "0"
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
}
```
## I
### ID
Perms: read
Inputs: `null`
Response: `"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"`
## Log
### LogList
Perms: write
Inputs: `null`
Response: `null`
### LogSetLevel
Perms: write
Inputs:
```json
[
"string value",
"string value"
]
```
Response: `{}`
## Market
### MarketEnsureAvailable
MarketFreeBalance
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
"0"
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
## Miner
### MinerCreateBlock
There are not yet any comments for this method.
Perms: write
Inputs:
```json
[
{
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"Parents": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"Eproof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconValues": null,
"Messages": null,
"Epoch": 10101,
"Timestamp": 42,
"WinningPoStProof": null
}
]
```
Response:
```json
{
"Header": {
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"ElectionProof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
"WinPoStProof": null,
"Parents": null,
"ParentWeight": "0",
"Height": 10101,
"ParentStateRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ParentMessageReceipts": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Messages": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"BLSAggregate": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Timestamp": 42,
"BlockSig": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ForkSignaling": 42,
"ParentBaseFee": "0"
},
"BlsMessages": null,
"SecpkMessages": null
}
```
### MinerGetBaseInfo
There are not yet any comments for this method.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
10101,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"MinerPower": "0",
"NetworkPower": "0",
"Sectors": null,
2020-10-06 07:30:40 +00:00
"WorkerKey": "f01234",
2020-08-24 10:25:49 +00:00
"SectorSize": 34359738368,
"PrevBeaconEntry": {
"Round": 42,
"Data": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
2020-10-06 08:47:00 +00:00
"EligibleForMining": true
2020-08-24 10:25:49 +00:00
}
```
## Mpool
The Mpool methods are for interacting with the message pool. The message pool
manages all incoming and outgoing 'messages' going over the network.
### MpoolClear
MpoolClear clears pending messages from the mpool
Perms: write
Inputs:
```json
[
true
]
```
Response: `{}`
### MpoolGetConfig
MpoolGetConfig returns (a copy of) the current mpool config
Perms: read
Inputs: `null`
Response:
```json
{
"PriorityAddrs": null,
"SizeLimitHigh": 123,
"SizeLimitLow": 123,
"ReplaceByFeeRatio": 12.3,
"PruneCooldown": 60000000000,
"GasLimitOverestimation": 12.3
}
```
### MpoolGetNonce
MpoolGetNonce gets next nonce for the specified sender.
Note that this method may not be atomic. Use MpoolPushMessage instead.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `42`
### MpoolPending
MpoolPending returns pending mempool messages.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### MpoolPush
MpoolPush pushes a signed message to mempool.
Perms: write
Inputs:
```json
[
{
"Message": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
2020-10-12 18:47:09 +00:00
},
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
2020-08-24 10:25:49 +00:00
}
}
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MpoolPushMessage
MpoolPushMessage atomically assigns a nonce, signs, and pushes a message
to mempool.
maxFee is only used when GasFeeCap/GasPremium fields aren't specified
When maxFee is set to 0, MpoolPushMessage will guess appropriate fee
based on current chain conditions
Perms: sign
Inputs:
```json
[
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
{
"MaxFee": "0"
}
]
```
Response:
```json
{
"Message": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
2020-10-12 18:47:09 +00:00
},
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
2020-08-24 10:25:49 +00:00
}
}
```
2020-10-02 21:14:47 +00:00
### MpoolPushUntrusted
MpoolPushUntrusted pushes a signed message to mempool from untrusted sources.
Perms: write
Inputs:
```json
[
{
"Message": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-10-02 21:14:47 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-10-02 21:14:47 +00:00
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
2020-10-12 18:47:09 +00:00
},
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
2020-10-02 21:14:47 +00:00
}
}
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
2020-08-24 10:25:49 +00:00
### MpoolSelect
MpoolSelect returns a list of pending messages for inclusion in the next block
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
12.3
]
```
Response: `null`
### MpoolSetConfig
MpoolSetConfig sets the mpool config to (a copy of) the supplied config
Perms: write
Inputs:
```json
[
{
"PriorityAddrs": null,
"SizeLimitHigh": 123,
"SizeLimitLow": 123,
"ReplaceByFeeRatio": 12.3,
"PruneCooldown": 60000000000,
"GasLimitOverestimation": 12.3
}
]
```
Response: `{}`
### MpoolSub
There are not yet any comments for this method.
Perms: read
Inputs: `null`
Response:
```json
{
"Type": 0,
"Message": {
"Message": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
2020-10-12 18:47:09 +00:00
},
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
2020-08-24 10:25:49 +00:00
}
}
}
```
## Msig
The Msig methods are used to interact with multisig wallets on the
filecoin network
2020-09-06 07:51:06 +00:00
### MsigAddApprove
MsigAddApprove approves a previously proposed AddSigner message
It takes the following params: <multisig address>, <sender address of the approve msg>, <proposed message ID>,
<proposer address>, <new signer>, <whether the number of required signers should be increased>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-09-06 07:51:06 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-09-06 07:51:06 +00:00
true
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigAddCancel
MsigAddCancel cancels a previously proposed AddSigner message
It takes the following params: <multisig address>, <sender address of the cancel msg>, <proposed message ID>,
<new signer>, <whether the number of required signers should be increased>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-09-06 07:51:06 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
2020-09-06 07:51:06 +00:00
true
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigAddPropose
MsigAddPropose proposes adding a signer in the multisig
It takes the following params: <multisig address>, <sender address of the propose msg>,
<new signer>, <whether the number of required signers should be increased>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
"f01234",
2020-09-06 07:51:06 +00:00
true
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
2020-08-24 10:25:49 +00:00
### MsigApprove
2020-10-10 10:28:59 +00:00
MsigApprove approves a previously-proposed multisig message by transaction ID
It takes the following params: <multisig address>, <proposed transaction ID> <signer address>
Perms: sign
Inputs:
```json
[
"f01234",
42,
"f01234"
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigApproveTxnHash
MsigApproveTxnHash approves a previously-proposed multisig message, specified
using both transaction ID and a hash of the parameters used in the
proposal. This method of approval can be used to ensure you only approve
exactly the transaction you think you are.
2020-08-24 10:25:49 +00:00
It takes the following params: <multisig address>, <proposed message ID>, <proposer address>, <recipient address>, <value to transfer>,
<sender address of the approve msg>, <method to call in the proposed message>, <params to include in the proposed message>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
"0",
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
"Ynl0ZSBhcnJheQ=="
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigCancel
MsigCancel cancels a previously-proposed multisig message
2020-10-10 10:28:59 +00:00
It takes the following params: <multisig address>, <proposed transaction ID>, <recipient address>, <value to transfer>,
2020-08-24 10:25:49 +00:00
<sender address of the cancel msg>, <method to call in the proposed message>, <params to include in the proposed message>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
"0",
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
"Ynl0ZSBhcnJheQ=="
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigCreate
MsigCreate creates a multisig wallet
It takes the following params: <required number of senders>, <approving addresses>, <unlock duration>
<initial balance>, <sender address of the create msg>, <gas price>
Perms: sign
Inputs:
```json
[
42,
null,
10101,
"0",
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
"0"
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigGetAvailableBalance
MsigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
2020-09-06 07:51:06 +00:00
### MsigGetVested
MsigGetVested returns the amount of FIL that vested in a multisig in a certain period.
It takes the following params: <multisig address>, <start epoch>, <end epoch>
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-09-06 07:51:06 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### MsigGetVestingSchedule
2020-10-09 21:14:21 +00:00
MsigGetVestingSchedule returns the vesting details of a given multisig.
Perms: read
Inputs:
```json
[
"f01234",
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"InitialBalance": "0",
"StartEpoch": 10101,
"UnlockDuration": 10101
}
```
2020-08-24 10:25:49 +00:00
### MsigPropose
MsigPropose proposes a multisig message
It takes the following params: <multisig address>, <recipient address>, <value to transfer>,
<sender address of the propose msg>, <method to call in the proposed message>, <params to include in the proposed message>
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
"0",
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
"Ynl0ZSBhcnJheQ=="
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
2020-10-10 10:28:59 +00:00
### MsigRemoveSigner
MsigRemoveSigner proposes the removal of a signer from the multisig.
It accepts the multisig to make the change on, the proposer address to
send the message from, the address to be removed, and a boolean
indicating whether or not the signing threshold should be lowered by one
along with the address removal.
Perms: sign
Inputs:
```json
[
"f01234",
"f01234",
"f01234",
true
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
2020-08-24 10:25:49 +00:00
### MsigSwapApprove
MsigSwapApprove approves a previously proposed SwapSigner
It takes the following params: <multisig address>, <sender address of the approve msg>, <proposed message ID>,
2020-09-06 07:51:06 +00:00
<proposer address>, <old signer>, <new signer>
2020-08-24 10:25:49 +00:00
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigSwapCancel
MsigSwapCancel cancels a previously proposed SwapSigner message
It takes the following params: <multisig address>, <sender address of the cancel msg>, <proposed message ID>,
2020-09-06 07:51:06 +00:00
<old signer>, <new signer>
2020-08-24 10:25:49 +00:00
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
42,
2020-10-06 07:30:40 +00:00
"f01234",
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### MsigSwapPropose
MsigSwapPropose proposes swapping 2 signers in the multisig
It takes the following params: <multisig address>, <sender address of the propose msg>,
2020-09-06 07:51:06 +00:00
<old signer>, <new signer>
2020-08-24 10:25:49 +00:00
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
"f01234",
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
## Net
### NetAddrsListen
Perms: read
Inputs: `null`
Response:
```json
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
```
2020-09-03 23:35:53 +00:00
### NetAgentVersion
Perms: read
Inputs:
```json
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
```
Response: `"string value"`
2020-08-24 10:25:49 +00:00
### NetAutoNatStatus
Perms: read
Inputs: `null`
Response:
```json
{
"Reachability": 1,
"PublicAddr": "string value"
}
```
2020-09-02 23:31:41 +00:00
### NetBandwidthStats
Perms: read
Inputs: `null`
Response:
```json
{
"TotalIn": 9,
"TotalOut": 9,
"RateIn": 12.3,
"RateOut": 12.3
}
```
### NetBandwidthStatsByPeer
Perms: read
Inputs: `null`
Response:
```json
{
"12D3KooWSXmXLJmBR1M7i9RW9GQPNUhZSzXKzxDHWtAgNuJAbyEJ": {
"TotalIn": 174000,
"TotalOut": 12500,
"RateIn": 100,
"RateOut": 50
}
}
```
### NetBandwidthStatsByProtocol
Perms: read
Inputs: `null`
Response:
```json
{
"/fil/hello/1.0.0": {
"TotalIn": 174000,
"TotalOut": 12500,
"RateIn": 100,
"RateOut": 50
}
}
```
2020-08-24 10:25:49 +00:00
### NetConnect
Perms: write
Inputs:
```json
[
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
]
```
Response: `{}`
### NetConnectedness
Perms: read
Inputs:
```json
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
```
Response: `1`
### NetDisconnect
Perms: write
Inputs:
```json
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
```
Response: `{}`
### NetFindPeer
Perms: read
Inputs:
```json
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
```
Response:
```json
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
```
### NetPeers
Perms: read
Inputs: `null`
Response: `null`
### NetPubsubScores
Perms: read
Inputs: `null`
Response: `null`
## Paych
The Paych methods are for interacting with and managing payment channels
### PaychAllocateLane
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `42`
2020-09-03 23:35:53 +00:00
### PaychAvailableFunds
There are not yet any comments for this method.
Perms: sign
2020-09-15 01:44:45 +00:00
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-09-15 01:44:45 +00:00
]
```
2020-09-05 19:51:30 +00:00
Response:
```json
{
"Channel": "\u003cempty\u003e",
2020-10-06 07:30:40 +00:00
"From": "f01234",
"To": "f01234",
2020-09-05 19:51:30 +00:00
"ConfirmedAmt": "0",
"PendingAmt": "0",
"PendingWaitSentinel": null,
"QueuedAmt": "0",
"VoucherReedeemedAmt": "0"
}
```
### PaychAvailableFundsByFromTo
There are not yet any comments for this method.
Perms: sign
2020-09-03 23:35:53 +00:00
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234"
2020-09-03 23:35:53 +00:00
]
```
Response:
```json
{
"Channel": "\u003cempty\u003e",
2020-10-06 07:30:40 +00:00
"From": "f01234",
"To": "f01234",
2020-09-03 23:35:53 +00:00
"ConfirmedAmt": "0",
"PendingAmt": "0",
"PendingWaitSentinel": null,
"QueuedAmt": "0",
"VoucherReedeemedAmt": "0"
}
```
2020-08-24 10:25:49 +00:00
### PaychCollect
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### PaychGet
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
"0"
]
```
Response:
```json
{
2020-10-06 07:30:40 +00:00
"Channel": "f01234",
2020-08-24 10:25:49 +00:00
"WaitSentinel": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
}
```
### PaychGetWaitReady
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### PaychList
There are not yet any comments for this method.
Perms: read
Inputs: `null`
Response: `null`
### PaychNewPayment
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
"f01234",
2020-08-24 10:25:49 +00:00
null
]
```
Response:
```json
{
2020-10-06 07:30:40 +00:00
"Channel": "f01234",
2020-08-24 10:25:49 +00:00
"WaitSentinel": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Vouchers": null
}
```
### PaychSettle
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
### PaychStatus
There are not yet any comments for this method.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
2020-10-06 07:30:40 +00:00
"ControlAddr": "f01234",
2020-08-24 10:25:49 +00:00
"Direction": 1
}
```
### PaychVoucherAdd
There are not yet any comments for this method.
Perms: write
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
2020-10-06 07:30:40 +00:00
"ChannelAddr": "f01234",
2020-08-24 10:25:49 +00:00
"TimeLockMin": 10101,
"TimeLockMax": 10101,
"SecretPreimage": "Ynl0ZSBhcnJheQ==",
"Extra": {
2020-10-06 07:30:40 +00:00
"Actor": "f01234",
2020-08-24 10:25:49 +00:00
"Method": 1,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Lane": 42,
"Nonce": 42,
"Amount": "0",
"MinSettleHeight": 10101,
"Merges": null,
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
},
"Ynl0ZSBhcnJheQ==",
"0"
]
```
Response: `"0"`
### PaychVoucherCheckSpendable
There are not yet any comments for this method.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
2020-10-06 07:30:40 +00:00
"ChannelAddr": "f01234",
2020-08-24 10:25:49 +00:00
"TimeLockMin": 10101,
"TimeLockMax": 10101,
"SecretPreimage": "Ynl0ZSBhcnJheQ==",
"Extra": {
2020-10-06 07:30:40 +00:00
"Actor": "f01234",
2020-08-24 10:25:49 +00:00
"Method": 1,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Lane": 42,
"Nonce": 42,
"Amount": "0",
"MinSettleHeight": 10101,
"Merges": null,
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
},
"Ynl0ZSBhcnJheQ==",
"Ynl0ZSBhcnJheQ=="
]
```
Response: `true`
### PaychVoucherCheckValid
There are not yet any comments for this method.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
2020-10-06 07:30:40 +00:00
"ChannelAddr": "f01234",
2020-08-24 10:25:49 +00:00
"TimeLockMin": 10101,
"TimeLockMax": 10101,
"SecretPreimage": "Ynl0ZSBhcnJheQ==",
"Extra": {
2020-10-06 07:30:40 +00:00
"Actor": "f01234",
2020-08-24 10:25:49 +00:00
"Method": 1,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Lane": 42,
"Nonce": 42,
"Amount": "0",
"MinSettleHeight": 10101,
"Merges": null,
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
}
]
```
Response: `{}`
### PaychVoucherCreate
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
"0",
42
]
```
Response:
```json
{
2020-09-03 23:35:53 +00:00
"Voucher": {
2020-10-06 07:30:40 +00:00
"ChannelAddr": "f01234",
2020-09-03 23:35:53 +00:00
"TimeLockMin": 10101,
"TimeLockMax": 10101,
"SecretPreimage": "Ynl0ZSBhcnJheQ==",
"Extra": {
2020-10-06 07:30:40 +00:00
"Actor": "f01234",
2020-09-03 23:35:53 +00:00
"Method": 1,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Lane": 42,
"Nonce": 42,
"Amount": "0",
"MinSettleHeight": 10101,
"Merges": null,
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
2020-08-24 10:25:49 +00:00
},
2020-09-03 23:35:53 +00:00
"Shortfall": "0"
2020-08-24 10:25:49 +00:00
}
```
### PaychVoucherList
There are not yet any comments for this method.
Perms: write
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `null`
### PaychVoucherSubmit
There are not yet any comments for this method.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
2020-10-06 07:30:40 +00:00
"ChannelAddr": "f01234",
2020-08-24 10:25:49 +00:00
"TimeLockMin": 10101,
"TimeLockMax": 10101,
"SecretPreimage": "Ynl0ZSBhcnJheQ==",
"Extra": {
2020-10-06 07:30:40 +00:00
"Actor": "f01234",
2020-08-24 10:25:49 +00:00
"Method": 1,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Lane": 42,
"Nonce": 42,
"Amount": "0",
"MinSettleHeight": 10101,
"Merges": null,
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
2020-08-28 20:03:09 +00:00
},
"Ynl0ZSBhcnJheQ==",
"Ynl0ZSBhcnJheQ=="
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
```
## State
The State methods are used to query, inspect, and interact with chain state.
2020-10-16 01:00:47 +00:00
Most methods take a TipSetKey as a parameter. The state looked up is the state at that tipset.
2020-08-24 10:25:49 +00:00
A nil TipSetKey can be provided as a param, this will cause the heaviest tipset in the chain to be used.
### StateAccountKey
StateAccountKey returns the public key address of the given ID address
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### StateAllMinerFaults
StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
Perms: read
Inputs:
```json
[
10101,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateCall
StateCall runs the given message and returns its result without any persisted changes.
Perms: read
Inputs:
```json
[
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
2020-10-14 03:45:47 +00:00
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
2020-08-24 10:25:49 +00:00
"Msg": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
2020-10-16 01:00:47 +00:00
"GasCost": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"GasUsed": "0",
"BaseFeeBurn": "0",
"OverEstimationBurn": "0",
"MinerPenalty": "0",
"MinerTip": "0",
"Refund": "0",
"TotalCost": "0"
},
2020-08-24 10:25:49 +00:00
"ExecutionTrace": {
"Msg": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": null,
"Subcalls": null
},
"Error": "string value",
"Duration": 60000000000
}
```
### StateChangedActors
StateChangedActors returns all the actors whose states change between the two given state CIDs
TODO: Should this take tipset keys instead?
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"t01236": {
"Code": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Head": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Nonce": 42,
"Balance": "0"
}
}
```
### StateCirculatingSupply
StateCirculatingSupply returns the exact circulating supply of Filecoin at the given tipset.
This is not used anywhere in the protocol itself, and is only for external consumption.
2020-08-24 10:25:49 +00:00
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
2020-08-24 10:25:49 +00:00
### StateCompute
StateCompute is a flexible command that applies the given messages on the given tipset.
The messages are run as though the VM were at the provided height.
Perms: read
Inputs:
```json
[
10101,
null,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Trace": null
}
```
### StateDealProviderCollateralBounds
StateDealProviderCollateralBounds returns the min and max collateral a storage provider
can issue. It takes the deal size and verified status as parameters.
Perms: read
Inputs:
```json
[
1032,
true,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Min": "0",
"Max": "0"
}
```
### StateGetActor
StateGetActor returns the indicated actor's nonce and balance.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Code": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Head": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Nonce": 42,
"Balance": "0"
}
```
### StateGetReceipt
StateGetReceipt returns the message receipt for the given message
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
}
```
### StateListActors
StateListActors returns the addresses of every actor in the state
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateListMessages
StateListMessages looks back and returns all messages with a matching to or from address, stopping at the given height.
Perms: read
Inputs:
```json
[
{
2020-10-06 07:30:40 +00:00
"To": "f01234",
2020-10-15 19:07:41 +00:00
"From": "f01234"
2020-08-24 10:25:49 +00:00
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
10101
]
```
Response: `null`
### StateListMiners
StateListMiners returns the addresses of every miner that has claimed power in the Power Actor
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateLookupID
StateLookupID retrieves the ID address of the given address
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### StateMarketBalance
StateMarketBalance looks up the Escrow and Locked balances of the given address in the Storage Market
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Escrow": "0",
"Locked": "0"
}
```
### StateMarketDeals
StateMarketDeals returns information about every deal in the Storage Market
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"t026363": {
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
2020-10-06 07:30:40 +00:00
"Client": "f01234",
"Provider": "f01234",
2020-08-24 10:25:49 +00:00
"Label": "string value",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
}
}
}
```
### StateMarketParticipants
StateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"t026363": {
"Escrow": "0",
"Locked": "0"
}
}
```
### StateMarketStorageDeal
StateMarketStorageDeal returns information about the indicated deal
Perms: read
Inputs:
```json
[
5432,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
2020-10-06 07:30:40 +00:00
"Client": "f01234",
"Provider": "f01234",
2020-08-24 10:25:49 +00:00
"Label": "string value",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
}
}
```
### StateMinerActiveSectors
StateMinerActiveSectors returns info about sectors that a given miner is actively proving.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateMinerAvailableBalance
StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### StateMinerDeadlines
StateMinerDeadlines returns all the proving deadlines for the given miner
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateMinerFaults
StateMinerFaults returns a bitfield indicating the faulty sectors of the given miner
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
[
5,
1
]
```
### StateMinerInfo
StateMinerInfo returns info about the indicated miner
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
2020-10-06 07:30:40 +00:00
"Owner": "f01234",
"Worker": "f01234",
"NewWorker": "f01234",
2020-08-24 10:25:49 +00:00
"ControlAddresses": null,
"WorkerChangeEpoch": 10101,
"PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Multiaddrs": null,
"SealProofType": 3,
"SectorSize": 34359738368,
2020-10-06 08:47:00 +00:00
"WindowPoStPartitionSectors": 42,
"ConsensusFaultElapsed": 10101
2020-08-24 10:25:49 +00:00
}
```
### StateMinerInitialPledgeCollateral
StateMinerInitialPledgeCollateral returns the initial pledge collateral for the specified miner's sector
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
"SealProof": 3,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": null,
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### StateMinerPartitions
2020-09-17 15:31:09 +00:00
StateMinerPartitions returns all partitions in the specified deadline
2020-08-24 10:25:49 +00:00
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
42,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateMinerPower
StateMinerPower returns the power of the indicated miner
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"MinerPower": {
"RawBytePower": "0",
"QualityAdjPower": "0"
},
"TotalPower": {
"RawBytePower": "0",
"QualityAdjPower": "0"
2020-09-17 15:31:09 +00:00
},
"HasMinPower": true
2020-08-24 10:25:49 +00:00
}
```
### StateMinerPreCommitDepositForPower
StateMinerInitialPledgeCollateral returns the precommit deposit for the specified miner's sector
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
"SealProof": 3,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": null,
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### StateMinerProvingDeadline
StateMinerProvingDeadline calculates the deadline at some epoch for a proving period
and returns the deadline-related calculations.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"CurrentEpoch": 10101,
"PeriodStart": 10101,
"Index": 42,
"Open": 10101,
"Close": 10101,
"Challenge": 10101,
2020-09-10 07:18:47 +00:00
"FaultCutoff": 10101,
"WPoStPeriodDeadlines": 42,
"WPoStProvingPeriod": 10101,
"WPoStChallengeWindow": 10101,
"WPoStChallengeLookback": 10101,
"FaultDeclarationCutoff": 10101
2020-08-24 10:25:49 +00:00
}
```
### StateMinerRecoveries
StateMinerRecoveries returns a bitfield indicating the recovering sectors of the given miner
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
[
5,
1
]
```
### StateMinerSectorCount
StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
2020-09-17 15:31:09 +00:00
"Live": 42,
"Active": 42,
"Faulty": 42
2020-08-24 10:25:49 +00:00
}
```
### StateMinerSectors
StateMinerSectors returns info about the given miner's sectors. If the filter bitfield is nil, all sectors are included.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
0
],
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `null`
### StateNetworkName
StateNetworkName returns the name of the network the node is synced to
Perms: read
Inputs: `null`
Response: `"lotus"`
2020-09-17 15:31:09 +00:00
### StateNetworkVersion
StateNetworkVersion returns the network version at the given tipset
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `6`
2020-09-17 15:31:09 +00:00
2020-08-24 10:25:49 +00:00
### StateReadState
StateReadState returns the indicated actor's state.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Balance": "0",
"State": {}
}
```
### StateReplay
StateReplay replays a given message, assuming it was included in a block in the specified tipset.
If no tipset key is provided, the appropriate tipset is looked up.
2020-08-24 10:25:49 +00:00
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
2020-08-24 10:25:49 +00:00
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
2020-10-14 03:45:47 +00:00
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
2020-08-24 10:25:49 +00:00
"Msg": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
2020-10-16 01:00:47 +00:00
"GasCost": {
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"GasUsed": "0",
"BaseFeeBurn": "0",
"OverEstimationBurn": "0",
"MinerPenalty": "0",
"MinerTip": "0",
"Refund": "0",
"TotalCost": "0"
},
2020-08-24 10:25:49 +00:00
"ExecutionTrace": {
"Msg": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"MsgRct": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"Error": "string value",
"Duration": 60000000000,
"GasCharges": null,
"Subcalls": null
},
"Error": "string value",
"Duration": 60000000000
}
```
### StateSearchMsg
StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response:
```json
{
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
}
```
### StateSectorExpiration
StateSectorExpiration returns epoch at which given sector will expire
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"OnTime": 10101,
"Early": 10101
}
```
### StateSectorGetInfo
2020-08-27 11:53:04 +00:00
StateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found
2020-08-24 10:25:49 +00:00
NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate
expiration epoch
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"SectorNumber": 9,
"SealProof": 3,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"DealIDs": null,
"Activation": 10101,
"Expiration": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0",
"InitialPledge": "0",
"ExpectedDayReward": "0",
"ExpectedStoragePledge": "0"
}
```
### StateSectorPartition
StateSectorPartition finds deadline/partition with the specified sector
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Deadline": 42,
"Partition": 42
}
```
### StateSectorPreCommitInfo
StateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
9,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Info": {
"SealProof": 3,
"SectorNumber": 9,
"SealedCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"SealRandEpoch": 10101,
"DealIDs": null,
"Expiration": 10101,
"ReplaceCapacity": true,
"ReplaceSectorDeadline": 42,
"ReplaceSectorPartition": 42,
"ReplaceSectorNumber": 9
},
"PreCommitDeposit": "0",
"PreCommitEpoch": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0"
}
```
### StateVMCirculatingSupplyInternal
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.
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"FilVested": "0",
"FilMined": "0",
"FilBurnt": "0",
"FilLocked": "0",
"FilCirculating": "0"
}
```
2020-08-24 10:25:49 +00:00
### StateVerifiedClientStatus
StateVerifiedClientStatus returns the data cap for the given address.
Returns nil if there is no entry in the data cap table for the
address.
2020-10-01 07:14:59 +00:00
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-10-01 07:14:59 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### StateVerifiedRegistryRootKey
StateVerifiedClientStatus returns the address of the Verified Registry's root key
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-10-01 07:14:59 +00:00
### StateVerifierStatus
StateVerifierStatus returns the data cap for the given address.
Returns nil if there is no entry in the data cap table for the
address.
2020-08-24 10:25:49 +00:00
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `"0"`
### StateWaitMsg
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.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
42
]
```
2020-10-09 16:43:22 +00:00
Response:
```json
{
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
}
```
### StateWaitMsgLimited
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.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
42,
10101
]
```
2020-08-24 10:25:49 +00:00
Response:
```json
{
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
}
```
## Sync
The Sync method group contains methods for interacting with and
observing the lotus sync service.
### SyncCheckBad
SyncCheckBad checks if a block was marked as bad, and if it was, returns
the reason.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `"string value"`
2020-09-09 07:45:47 +00:00
### SyncCheckpoint
SyncCheckpoint marks a blocks as checkpointed, meaning that it won't ever fork away from it.
Perms: admin
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `{}`
2020-08-24 10:25:49 +00:00
### SyncIncomingBlocks
SyncIncomingBlocks returns a channel streaming incoming, potentially not
yet synced block headers.
Perms: read
Inputs: `null`
Response:
```json
{
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"ElectionProof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
"WinPoStProof": null,
"Parents": null,
"ParentWeight": "0",
"Height": 10101,
"ParentStateRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ParentMessageReceipts": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Messages": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"BLSAggregate": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Timestamp": 42,
"BlockSig": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ForkSignaling": 42,
"ParentBaseFee": "0"
}
```
### SyncMarkBad
SyncMarkBad marks a blocks as bad, meaning that it won't ever by synced.
Use with extreme caution.
Perms: admin
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `{}`
### SyncState
SyncState returns the current status of the lotus sync system.
Perms: read
Inputs: `null`
Response:
```json
{
2020-09-24 11:35:45 +00:00
"ActiveSyncs": null,
"VMApplied": 42
2020-08-24 10:25:49 +00:00
}
```
### SyncSubmitBlock
SyncSubmitBlock can be used to submit a newly created block to the.
network through this node
Perms: write
Inputs:
```json
[
{
"Header": {
2020-10-06 07:30:40 +00:00
"Miner": "f01234",
2020-08-24 10:25:49 +00:00
"Ticket": {
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"ElectionProof": {
"WinCount": 9,
"VRFProof": "Ynl0ZSBhcnJheQ=="
},
"BeaconEntries": null,
"WinPoStProof": null,
"Parents": null,
"ParentWeight": "0",
"Height": 10101,
"ParentStateRoot": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"ParentMessageReceipts": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Messages": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"BLSAggregate": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"Timestamp": 42,
"BlockSig": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ForkSignaling": 42,
"ParentBaseFee": "0"
},
"BlsMessages": null,
"SecpkMessages": null
}
]
```
Response: `{}`
2020-10-10 18:46:06 +00:00
### SyncUnmarkAllBad
SyncUnmarkAllBad purges bad block cache, making it possible to sync to chains previously marked as bad
Perms: admin
Inputs: `null`
Response: `{}`
2020-09-09 07:45:47 +00:00
### SyncUnmarkBad
SyncUnmarkBad unmarks a blocks as bad, making it possible to be validated and synced again.
Perms: admin
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
```
Response: `{}`
2020-09-27 22:08:58 +00:00
### SyncValidateTipset
SyncValidateTipset indicates whether the provided tipset is valid or not
Perms: read
Inputs:
```json
[
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response: `true`
2020-08-24 10:25:49 +00:00
## Wallet
### WalletBalance
WalletBalance returns the balance of the given address at the current head of the chain.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `"0"`
### WalletDefaultAddress
WalletDefaultAddress returns the address marked as default in the wallet.
Perms: write
Inputs: `null`
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### WalletDelete
WalletDelete deletes an address from the wallet.
Perms: write
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `{}`
### WalletExport
WalletExport returns the private key of an address in the wallet.
Perms: admin
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response:
```json
{
"Type": "bls",
2020-08-24 10:25:49 +00:00
"PrivateKey": "Ynl0ZSBhcnJheQ=="
}
```
### WalletHas
WalletHas indicates whether the given address is in the wallet.
Perms: write
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `true`
### WalletImport
WalletImport receives a KeyInfo, which includes a private key, and imports it into the wallet.
Perms: admin
Inputs:
```json
[
{
"Type": "bls",
2020-08-24 10:25:49 +00:00
"PrivateKey": "Ynl0ZSBhcnJheQ=="
}
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### WalletList
WalletList lists all the addresses in the wallet.
Perms: write
Inputs: `null`
Response: `null`
### WalletNew
WalletNew creates a new address in the wallet with the given sigType.
Available key types: bls, secp256k1, secp256k1-ledger
Support for numerical types: 1 - secp256k1, 2 - BLS is deprecated
2020-08-24 10:25:49 +00:00
Perms: write
Inputs:
```json
[
"bls"
2020-08-24 10:25:49 +00:00
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-08-24 10:25:49 +00:00
### WalletSetDefault
WalletSetDefault marks the given address as as the default one.
Perms: admin
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234"
2020-08-24 10:25:49 +00:00
]
```
Response: `{}`
### WalletSign
WalletSign signs the given bytes using the given address.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
"Ynl0ZSBhcnJheQ=="
]
```
Response:
```json
{
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
```
### WalletSignMessage
WalletSignMessage signs the given message using the given address.
Perms: sign
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
{
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
}
]
```
Response:
```json
{
"Message": {
"Version": 42,
2020-10-06 07:30:40 +00:00
"To": "f01234",
"From": "f01234",
2020-08-24 10:25:49 +00:00
"Nonce": 42,
"Value": "0",
"GasLimit": 9,
"GasFeeCap": "0",
"GasPremium": "0",
"Method": 1,
2020-10-12 18:47:09 +00:00
"Params": "Ynl0ZSBhcnJheQ==",
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
}
2020-08-24 10:25:49 +00:00
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
2020-10-12 18:47:09 +00:00
},
"CID": {
"/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s"
2020-08-24 10:25:49 +00:00
}
}
```
2020-09-30 05:45:03 +00:00
### WalletValidateAddress
WalletValidateAddress validates whether a given string can be decoded as a well-formed address
Perms: read
Inputs:
```json
[
"string value"
]
```
2020-10-06 07:30:40 +00:00
Response: `"f01234"`
2020-09-30 05:45:03 +00:00
2020-08-24 10:25:49 +00:00
### WalletVerify
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.
Perms: read
Inputs:
```json
[
2020-10-06 07:30:40 +00:00
"f01234",
2020-08-24 10:25:49 +00:00
"Ynl0ZSBhcnJheQ==",
{
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
]
```
Response: `true`