Protocol API
This page covers the Built-in actors Protocol API.
The protocol level built-in actors API is split into the following sections:
Account actor
The account actor is responsible for user account. If you want to call these methods in your smart contracts, you need to specify method number of that method you want to invoke. Please refer the each method for its method number.
AuthenticateMessage
func AuthenticateMessage(params AuthenticateMessage) EmptyValue ()Authenticates whether the provided signature is valid for the provided message.
uint AuthenticateMessageMethodNum = 2643134072.
Parameters:
structAuthenticateMessageParamsbytesAuthenticateMessageParamsSignature - it should be a raw byte of signature, NOT a serialized signature object with a signatureType.bytesMessage - The message which is signed by the corresponding account address.
Results:
structEmptyValue.
UniversalReceiverHook
func UniversalReceiverHook(params RawBytes) EmptyValue ()Whenever the account receives transfers, this method will be invoked.
uint UniversalReceiverHookMethodNum = 3726118371.
Parameters:
bytes[]RawBytes - passes the bytes through how it is received.
Results:
structEmptyValue - always success.
Datacap
DataCap Actor is responsible for DataCap token management. The ActorCode for DataCap actor is hex"0007" which will be used to call DataCap actor APIs. You also need to specify the method number of which method you want to invoke. Refer to each method for its method number.
Name
func Name() String {}Return the name of DataCap token which is ‘DataCap’.
Unit NameMethodNum : 48890204.
Parameters:
null
Results:
String: DataCap
Symbol
func Symbol() String {}Return the symbol of DataCap token which is ‘DCAP’.
unit SymbolMethodNum: 2061153854.
Parameters:
null
Results:
String: DCAP
TotalSupply
func TotalSupply() TokenAmount {}Return the total supply of the DataCap token.
uint TotalSupplyMethodNum: 114981429.
Parameters:
null
Results:
int256TokenAmount - Total DataCap token supply.
Balance
func Balance(params Address) TokenAmount {}Return the DataCap token balance for the wallet address.
unit BalanceOfMethodNum: 3261979605.
Parameters:
bytesAddress - the wallet address.
Results:
int256TokenAmount - the DataCap token balance for the specified wallet address.
Transfer
func Transfer(params TransferParams) TransferReturn {}Transfers DataCap tokens from caller address to the to address.
uint TransferMethodNum = 80475954;
Parameters:
structTransferParamsbytesTo - the address to receive DataCap token.int256Amount - A non-negative amount to transfer.bytes[]OperatorData - Arbitrary data to pass on via the receiver hook.
Results:
structTransferReturnint256FromBalance - the balance of from_address.int256ToBalance - the balance of to_address.bytesRecipientData: data returned from receive hook.
TransferFrom
func TransferFrom(params TransferFromParams) TransferFromReturn {}Transfers DataCap between the from_address to the to_address.
uint TransferFromMethodNum = 3621052141.
Params:
bytesTransferFromParamsbytesFrom - the address to send DataCap Token.bytesTo - the address to receive DataCap Token.int256Amount - A non-negative amount to transfer.bytesOperatorData: Arbitrary data to pass on via the receiver hook.
Results:
structTransferFromReturnint256FromBalance - the balance of from_address.int256ToBalance - the balance of to_address.int256Allowance - the remaining allowance of owner address.bytesRecipientData - data returned from receive hook.
IncreaseAllowance
func IncreaseAllowance(params IncreaseAllowanceParams) TokenAmount {}Increase the DataCap token allowance that an operator can control by the requested amount.
uint IncreaseAllowanceMethodNum = 1777121560.
Params:
structIncreaseAllowanceParamsbytesOperator - the wallet address of the operator.int256increaseAmount - increase DataCap token allowance for the operator address.
Results:
int256TokenAmount - the new DataCap allowance of the operator address.
DecreaseAllowance
func DecreaseAllowance(params DecreaseAllowanceParams) TokenAmount {}Decrease the DataCap token allowance that an operator controls of the owner’s balance by the requested amount.
uint DecreaseAllowanceMethodNum = 1529376545;
Params:
structDecreaseAllowanceParamsbytesOperator - the wallet address of the operator.int256IncreaseAmount - the decreased DataCap token allowance of the operator address.
Results:
int256TokenAmount - the new DataCap allowance of the operator address.
RevokeAllowance
func RevokeAllowance(params RevokeAllowanceParams) TokenAmount {}Revoke the DataCap token allowance from the operator and set the operator’s allowance in behave of owner/caller address to 0.
uint RevokeAllowanceMethodNum = 2765635761.
Params:
structRevokeAllowanceParamsbytesOperator - the wallet address of the operator.
Results:
int256TokenAmount - the old Allowance amount of the operator address.
Burn
func Burn(params BurnParams) TokenAmount {}Burn an amount of DataCap token from the owner/caller address, decreasing total token supply.
uint BurnMethodNum = 1434719642.
Params:
structBurnParamsint256Amount - the amount the DataCap token to be burned.
Results:
int256TokenAmount - the updated DataCap token balance of the owner/caller address.
BurnFrom
func BurnFrom(params BurnFromParams) BurnFromReturn {}Burn an amount of DataCap token from the specified address (owner address), decrease the allowance of operator/caller, and decrease total token supply.
uint BurnFromMethodNum = 2979674018.
Params:
structBurnFromParamsbytesOwner - the wallet address of the owner.int256Amount - the amount of DataCap token to be burned.
Results:
structBurnFromReturnbytesOwner - the wallet address of the owner.int256Amount - the new balance of owner wallet.
Allowance
func Allowance(params GetAllowanceParams) TokenAmount {}Return the allowance between owner and operator address.
uint AllowanceMethodNum = 4205072950;
Params:
structGetAllowanceParamsbytesOwner : the wallet address of the owner.bytesOperator : the wallet address of the owner.
Results:
int256TokenAmount - the allowance that an operator can control of an owner’s allowance.
Miner
The miner built-in actor responsible to deal with storage mining operations and collect proof. To interact with a specific storage provider, you must use their miner address to invoke the methods in the built-in miner actor. You also need to specify the method number for the method you want to invoke. Please refer to each method for its method number.
GetPeerID
func GetPeerID() GetPeerIDReturn {}Return the Peer ID for the caller/miner address.
uint GetPeerIDMethodNum = 2812875329.
Params:
null
Results:
structGetPeerIDReturnbytesPeerID - the peer ID for the specified storage provider/miner.
ChangePeerID
func ChangePeerID(params ChangePeerIDParams) EmptyValue {}Change the peer ID for the caller/miner address.
uint ChangePeerIDMethodNum = 1236548004.
Params:
structChangePeerIDParamsbytesNewID - the new peer ID.
Results:
structEmptyValue
GetMultiaddrs
func GetMultiaddrs() GetMultiAddrsReturn {}Returns the multi-signature address for this caller/miner address.
uint GetMultiaddrsMethodNum = 1332909407.
Params:
null
Results:
structGetMultiAddrsReturnbyte[]MultiAddrs - the multi-signature address.
ChangeMultiaddrs
func ChangeMultiaddrs(params ChangeMultiaddrsParams) EmptyValue {}Change the multi-signature address for this caller/miner address.
uint ChangeMultiaddrsMethodNum = 1063480576.
Params:
structChangeMultiaddrsParamsbyte[]NewMultiaddrs - the new multi-signature address.
Results:
structEmptyValue
ChangeWorkerAddress
func ChangeWorkerAddress(params ChangeWorkerAddressParams) EmptyValue {}Change the worker address for the caller/miner address, and overwrite the existing addresses with the new control addresses passed in the params.
uint ChangeOwnerAddressMethodNum = 1010589339.
Params:
structChangeWorkerAddressParamsbyteNewWorker - the new worker address.byte[]NewControlAddrs - the new controller addresses.
Results:
structEmptyValue
ConfirmChangeWorkerAddress
func ConfirmChangeWorkerAddress() EmptyValue {}Confirm the worker address has been changed for the caller/miner address.
uint ConfirmChangeWorkerAddressMethodNum = 2354970453.
Params:
null
Results:
structEmptyValue
RepayDebt
func RepayDebt() EmptyValue {}Repay as much fee debt as possible for the caller/miner address.
uint RepayDebtMethodNum = 3665352697.
Params:
null
Results:
structEmptyValue
GetOwner
func GetOwner() GetOwnerReturn {}Return the owner address of the caller/miner address.
uint GetOwnerMethodNum = 3275365574.
Params:
null
Results:
structGetOwnerReturnbyteOwner - owner address.
ChangeOwnerAddress
func ChangeOwnerAddress(bytes address) {}Proposes or confirms a change of owner address.
uint ChangeOwnerAddressMethodNum = 1010589339.
Params:
bytesAddress - the new owner address.
Results:
structEmptyValue
GetBeneficiary
func GetBeneficiary() GetBeneficiaryReturn {}Return the currently active and proposed beneficiary information.
uint GetBeneficiaryMethodNum = 4158972569.
Params:
null
Results:
structGetBeneficiaryReturnstructActiveBeneficiary - current active beneficiary.byteBeneficiary - the address of the beneficiary.structBeneficiaryTermint256Quota - the quota token amount.int256UsedQuota - the used quota token amount.uint64Expiration - the epoch that the quota will be expired.
structPendingBeneficiaryChange - the proposed and pending beneficiary.bytesnewBeneficiary - the new beneficiary address.int256NewQuota - the new quota token amount.uint64NewExpiration - the epoch that the new quota will be expired.boolApprovedByBeneficiary - if this proposal is approved by the beneficiary or not.boolApprovedByNominee - if this proposal is approved by the nominee or not.
ChangeBeneficiary
func ChangeBeneficiary(params ChangeBeneficiaryParams) EmptyValue {}Propose or confirm a change of beneficiary information.
uint ChangeBeneficiaryMethodNum = 1570634796.
Params:
structChangeBeneficiaryParamsbytesnewBeneficiary - the new beneficiary address.int256NewQuota - the new quota token amount.uint64NewExpiration - the epoch that the new quota will be expired.
Results:
structEmptyValue
IsControllingAddress
func IsControllingAddress(params IsControllingAddressParams) IsControllingAddressReturn {}Returns whether the provided address is the Owner, the Worker, or any of the control addresses.
uint IsControllingAddressMethodNum = 348244887.
Params:
byteIsControllingAddressParams - the address to be verified.
Results:
boolIsControllingAddressReturn - if the specified address is the control address.
GetSectorSize
func GetSectorSize() GetSectorSizeReturn {}Returns the miner’s sector size.
uint GetSectorSizeMethodNum = 3858292296;
Params:
null
Results:
structGetSectorSizeReturnunit64SectorSize - the sector size of this miner.
GetAvailableBalance
func GetAvailableBalance() GetAvailableBalanceReturn {}Returns the available balance of this miner.
uint GetAvailableBalanceMethodNum = 4026106874.
Params:
null
Results:
int256GetAvailableBalanceReturn - the available token balance amount.
WithdrawBalance
func WithdrawBalance(params WithdrawBalanceParams) WithdrawBalanceReturn {}Withdraw the token balance for this miner.
Params:
structWithdrawBalanceParamsint256AmountRequested - withdraw token amount.
Results:
int256WithdrawBalanceReturn - the token amount withdrawn.
GetVestingFunds
func GetVestingFunds() GetVestingFundsReturn {}Return the funds vesting in this miner as a list of (vesting_epoch, vesting_amount) tuples.
uint GetVestingFundsMethodNum = 1726876304.
Params:
null
Results:
structGetVestingFundsReturnstruct VestingFunds[]Fundsint64Epoch - the epoch of funds vested.int256Amount - the number of funds vested.
Multisig
Multisig built-in actor is responsible for dealing with operations involving the Filecoin wallet. To interact with a specific multi-signature wallet address, you need to use this wallet address to invoke the methods in the built-in multisig actor. You also need to specify the method number of which method you want to invoke. Please refer to each method for its method number.
Propose
func Propose(params ProposeParams) ProposeReturn {...}Propose a token transfer transaction for signers to approve. The proposer automatically approves this transaction.
uint ProposeMethodNum = 1696838335.
Params:
structProposeParamsbytesToAddress - the address to receive the token.int256Value - the token amount to be transferred.uint64Method: ?bytep[]Params: ?
Results:
structProposeReturnint64TxnID - the ID of the proposed transaction.boolApplied - if the transaction was applied as proposed or not?uint31Code - the exit code of the transaction. IfAppliedisfalsethis field can be ignored.bytesRet - the return value of the transaction. IfAppliedisfalsethis field can be ignored.
Approve
func Approve(params TxnIDParams) ApproveReturn {}Other signers of the multi-signature address can use this method to approve the proposed messages.
uint ApproveMethodNum = 1289044053.
Params:
structTxnIDParamsint64ID - the signed message ID.bytesProposalHash - Hash of proposal to ensure an operation can only apply to a specific proposal.
Results:
structApproveReturnboolApplied - if the transaction was applied as proposed or not?uint31Code - the exit code of the transaction. IfAppliedisfalsethis field can be ignored.bytesRet - the return value of the transaction. IfAppliedisfalsethis field can be ignored.
Cancel
func Cancel(param TxnIDParams) EmptyValue {}Multi-signature wallet signer to cancel a pending multi-signatures transaction.
uint CancelMethodNum = 3365893656.
Params:
structTxnIDParamsint64ID - the signed message ID.bytesProposalHash - Hash of proposal to ensure an operation can only apply to a specific proposal.
Results:
structEmptyValue.
AddSigner
func AddSigner(params AddSignerParams) EmptyValue {}Add a signer to the multi-signature wallet.
uint AddSignerMethodNum = 3028530033.
Params:
structAddSignerParamsbytesSigner - the new signer address.boolIncrease - increase threshold or not.
Results:
structEmptyValue.
RemoveSigner
func RemoveSigner(params RemoveSignerParams) EmptyValue {}Remove a signer from the multi-signature wallet.
uint RemoveSignerMethodNum = 21182899.
Params:
structRemoveSignerParamsbytesSigner - the signer address to be removed.boolDecrease - decrease threshold or not. Only able to decrease when the threshold is larger than 2.
Results:
structEmptyValue.
SwapSigner
func SwapSigner(params SwapSignerParams) EmptyValue {}Swap signers for the multi-signature wallet.
uint SwapSignerMethodNum = 3968117037;
Params:
structSwapSignerParamsbytesFrom - the signer address to be removed from the multi-signature wallet.bytesTo - the signer address to be added to the multi-signature wallet.
Results:
structEmptyValue.
ChangeNumApprovalsThreshold
func ChangeNumApprovalsThreshold(params ChangeNumApprovalsThresholdParams) EmptyValue {}Change the threshold number required for the approvals for the multi-signature wallet.
uint ChangeNumApprovalsThresholdMethodNum = 3375931653.
Params:
structChangeNumApprovalsThresholdParamsunit64NewThreshold - the new threshold number.
Results:
structEmptyValue.
LockBalance
func LockBalance(params LockBalanceParams) EmptyValue {}Lock a number of tokens in a multi-signature wallet from the start epoch to the unlock epoch.
uint LockBalanceMethodNum = 1999470977.
Params:
structLockBalanceParamsint64StartEpoch - the epoch to start locking the balance.int64UnlockDuration - the epoch to unlock the balance.int256Amount - the amount of token to be locked.
Results:
structEmptyValue.
Storage market actor
Storage market actor is responsible for managing storage and retrieval deals. The ActorCode for storage market actor is hex"0005" which will be used to call this actor. You also need to specify the method number of the method you want to invoke. Please refer to each method for its method number.
AddBalance
func AddBalance(address Address) EmptyValue {}Deposit the received FIL token, which is received along with this message, into the balance held in the escrow address of the provider or client address.
uint AddBalanceMethodNum = 822473126.
Params:
bytesAddress - the address of the provider or client.
Results:
structEmptyValue.
GetBalance
func GetBalance(address Address) GetBalanceReturn {}Return the escrow balance and locked amount for an address.
uint GetBalanceMethodNum = 726108461.
Params:
bytesaddress - the wallet address to request balance.
Results:
structGetBalanceReturnint256Balance - the escrow balance for this address.int256Locked - the escrow-locked amount for this address.
WithdrawBalance
func WithdrawBalance(params WithdrawBalanceParams) WithdrawBalanceReturn {}Withdraw the specified amount from the balance held in escrow.
uint WithdrawBalanceMethodNum = 2280458852.
Params:
structWithdrawBalanceParamsbytesProviderOrClientAddress - the address of the provider or client.int256TokenAmount - the token amount to withdraw.
Results:
structWithdrawBalanceReturnint256AmountWithdraw - the token amount withdrawn.
PublishStorageDeals
func PublishStorageDeals(params PublishStorageDealsParams) PublishStorageDealsReturn {}Publish a new set of storage deals that are not yet included in a sector.
uint PublishStorageDealsMethodNum = 2236929350.
Params:
structPublishStorageDealsParamsstruct ClientDealProposal[]Deals - list of deal proposals signed by a clientstruct DealProposalProposalbytesPieceCID.uint64PieceSize - the size of the piece.boolVerifiedDeal - if the deal is verified or not.bytesClient - the address of the storage client.bytesProvider - the address of the storage provider.stringLabel - any label that the client chooses for the deal.int64StartEpoch - the chain epoch to start the deal.int64EndEpoch - the chain epoch to end the deal.int256StoragePricePerEpoch - the token amount to pay to the provider per epoch.int256ProviderCollateral - the token amount as collateral paid by the provider.int256ClientCollateral - the token amount as collateral paid by the client.
bytesClientSignature - the signature signed by the client.
Results:
structPublishStorageDealsReturnuint64[]IDs - returned storage deal IDs.bytesValidDeals - represent all the valid deals.
GetDealDataCommitment
func GetDealDataCommitment(params GetDealDataCommitmentParams) GetDealDataCommitmentReturn {}Return the data commitment and size of a deal proposal.
uint GetDealDataCommitmentMethodNum = 1157985802.
Params:
uint64GetDealDataCommitmentParams - Deal ID.
Results:
structGetDealDataCommitmentReturnbytesData - the data commitment of this deal.uint64Size - the size of this deal.
GetDealClient
func GetDealClient(params GetDealClientParams) GetDealClientReturn {}Return the client of the deal proposal.
uint GetDealClientMethodNum = 128053329.
Params:
uint64GetDealClientParams - CID of the deal proposal.
Results:
bytesGetDealClientReturn - the wallet address of the client.
GetDealProvider
func GetDealProvider(params GetDealProviderParams) GetDealProviderReturn {}Return the provider of a deal proposal.
uint GetDealProviderMethodNum = 935081690.
Params:
uint64GetDealProviderParams - CID of the deal proposal.
Results:
bytesGetDealProviderReturn - the wallet address of the provider.
GetDealLabel
func GetDealLabel(params GetDealLabelParams) GetDealLabelReturn {}Return the label of a deal proposal.
uint GetDealLabelMethodNum = 46363526.
Params:
uint64GetDealLabelParams - CID of the deal proposal.
Results:
stringGetDealLabelReturn - the label of this deal.
GetDealTerm
func GetDealTerm(params GetDealTermParams) GetDealTermReturn {}Return the start epoch and duration(in epochs) of a deal proposal.
uint GetDealTermMethodNum = 163777312.
Params:
uint64GetDealTermParams - CID of the deal proposal.
Results:
structGetDealTermReturnint64Start - the chain epoch to start the deal.int64End - the chain epoch to end the deal.
GetDealTotalPrice
func GetDealTotalPrice(params GetDealTotalPriceParams) GetDealTotalPriceReturn {}Return the total price that will be paid from the client to the provider for this deal.
uint GetDealEpochPriceMethodNum = 4287162428.
Params:
uint64GetDealTotalPriceParams - CID of the deal proposal.
Results:
int256GetDealTotalPriceReturn - the token amount that will be paid by the client to the provider.
GetDealClientCollateral
func GetDealClientCollateral(params GetDealClientCollateralParams) GetDealClientCollateralReturn {}Return the client collateral requirement for a deal proposal.
uint GetDealClientCollateralMethodNum = 200567895.
Params:
uint64GetDealClientCollateralParams - CID of the deal proposal.
Results:
int256GetDealClientCollateralReturn - the token amount as collateral paid by the client.
GetDealProviderCollateral
func GetDealProviderCollateral(params GetDealProviderCollateralParams) GetDealProviderCollateralReturn {}Return the provided collateral requirement for a deal proposal.
uint GetDealProviderCollateralMethodNum = 2986712137.
Params:
uint64GetDealProviderCollateralParams - CID of the deal proposal.
Results:
int256GetDealProviderCollateralReturn - the token amount as collateral paid by the provider.
GetDealVerified
func GetDealVerified(params GetDealVerifiedParams) GetDealVerifiedReturn {}Return the verified flag for a deal proposal.
uint GetDealVerifiedMethodNum = 2627389465.
Params:
uint64GetDealVerifiedParams - CID of the deal proposal.
Results:
boolGetDealVerifiedReturn - if the deal is verified or not.
GetDealActivation
func GetDealActivation(params GetDealActivationParams) GetDealActivationReturn {}Return the activation state for a deal.
uint GetDealActivationParams = 2567238399.
Params:
uint64GetDealVerifiedParams - CID of the deal proposal.
Results:
structGetDealActivationReturnint64Activated - Epoch at which the deal was activated, or -1.int64Terminated -Epoch at which the deal was terminated abnormally, or -1.
Storage power actor
Storage power actor is responsible for keeping track of the storage power allocated at each storage miner. The ActorCode for the built-in storage power actor is hex"0004" which will be used to call methods in the storage power actor. You also need to specify the method number for the method you want to invoke. Please refer to each method for its method number.
CreateMiner
func CreateMiner(params CreateMinerParams) CreateMinerReturn {}Create a new miner for the owner address and worker address.
uint CreateMinerMethodNum = 1173380165.
Params:
structCreateMinerParamsbytesOwner - the address of the owner.bytesWorker - the address of the worker.RegisteredPoStProofWindowPoStProofType - the type of RegisteredPoStProof.bytesPeer - peerID.bytes[]Multiaddrs - the multi-address which is used to control the newly created miner.
Results:
CreateMinerReturn
bytesIDAddress - The canonical ID-based address for the actor.byte: RobustAddress -A more expensive but re-org-safe address for the newly created actor.
NetworkRawPower
func NetworkRawPower() NetworkRawPowerReturn {}Return the total raw power of the network.
uint NetworkRawPowerMethodNum = 931722534.
Params:
null
Results:
int256NetworkRawPowerReturn - the raw storage power of the whole network.
MinerRawPower
func MinerRawPower(params MinerRawPowerParams) MinerRawPowerParams {}Return the raw power claimed by the specified miner and whether the miner has more than the minimum amount of active storage.
uint MinerRawPowerMethodNum = 3753401894.
Params:
MinerRawPowerParams
uint64Miner - Miner ID
Results:
structMinerRawPowerParamsint256RawBytePower - the row power of the miner.boolMeetsConsensusMinimum - if the miner power meets the minimum for consensus.
MinerCount
func MinerCount() MinerCountReturn {}Returns the total number of miners created, regardless of whether or not they have any pledged storage.
uint MinerRawPowerMethodNum = 3753401894.
Params:
null
Results:
uint64MinerCountReturn - the count of the miners that the caller address has.
MinerConsensusCount
func MinerConsensusCount() MinerConsensusCountReturn {}Returns the total number of miners that have more than the minimum amount of active storage.
uint MinerConsensusCountMethodNum = 196739875.
Params:
null
Results:
uint64MinerConsensusCountReturn - the count of the miners that meet the consensus minimum that the caller address has.
Verified registry actor
Verified registry actor is responsible for managing verified clients. The ActorCode for the verified registry built-in actor is hex"0006" which will be used to call the exported methods in the verified registry built-in actor. You need to specify the method number for the method you want to invoke. Please refer to each method for its method number.
AddVerifiedClient
func AddVerifiedClient(params AddVerifiedClientParams) EmptyValue {}To add a verified Client address to Filecoin Plus program.
uint constant AddVerifierClientMethodNum = 3916220144.
Params:
structAddVerifierClientParamsbytesAddress - the verified client addressint256Allowance - approved DataCap for this verified client
Results:
structEmptyValue.
RemoveExpiredAllocations
func RemoveExpiredAllocations(params RemoveExpiredAllocationsParams) RemoveExpiredAllocationsReturn {}Remove the expired DataCap allocations and reclaim those DataCap tokens back to the client. If the allocation amount is not specified, all expired DataCap allocations will be removed.
uint RemoveExpiredAllocationsMethodNum = 2873373899.
Params:
structRemoveExpiredAllocationsParamsuint64Client - the client address to remove the expired tokens from.uint64[]AllocationIDs - List of allocation IDs to attempt to remove. If empty, this method will remove all eligible expired tokens.
Results:
structRemoveExpiredAllocationsReturnunit64[]Considered - Allocation IDs are either specified by the caller or discovered to be expired.BatachReturnResults - results for each processed allocation.int256DataCapRecoverd - The amount of DataCap token reclaimed for the client.
GetClaims
func GetClaims(params GetClaimsParams) GetClaimsReturn {}Return a list of claims corresponding to the requested claim ID for a specific provider.
uint GetClaimsMethodNum = 2199871187.
Params:
structGetClaimsParamsuint64Provider - the provider address.unit64[]ClaimIDs - A list of Claim IDs for a specific provider.
Results:
structGetClaimsReturnstructBatchReturnuint32SuccessCount - total successes in the batch.structFailCode[] {uint32idx,uint32code} - list of failure code and index for all failures in batch.
struct Claim[]Claims - list of Claims returned.uint64Provider - The provider that is storing the data.uint64Client - The client that originally allocated the DataCap.bytesData - Identifier for the data committed.uint64Size - The size of the data.int64TermMin - The minimum period after the term starts, during which the provider must commit to storing data.int64TermMax - The maximum period after the term starts for which the provider can earn Quality Adjusted power for the data.int64TermStart - the epoch at which the piece was committed.unit64Sector - ID of the provider’s sector in which the data is committed.
ExtendClaimTerms
func ExtendClaimTerms(params ExtendClaimTermsParams) ExtendClaimTermsReturn {}Extends the maximum term of some claims up to the largest value they could have been originally allocated. This method can only be called by the claims’ client.
uint ExtendClaimTermsMethodNum = 1752273514.
Params:
structExtendClaimTermsParamsstruct ClaimTerm[]Termsuint64Provider - The provider address which stores the data.uint64ClaimID - Claim ID.int64TermMax - The max chain epoch to extend.
Results:
structExtendClaimTermsReturnstructBatchReturnuint32SuccessCount - total successes in the batch.structFailCodes[] {uint32idx,uint32code} - list of failure code and index for all failures in batch.
RemoveExpiredClaims
func RemoveExpiredClaims(params: RemoveExpiredClaimsParams) RemoveExpiredClaimsReturn {}To remove a claim with its maximum term has elapsed.
uint RemoveExpiredClaimsMethodNum = 2873373899.
Params:
structRemoveExpiredClaimsParamsuint64Provider - the provider address.unit64[]ClaimIDs - A list of Claim IDs with an expired term. If no claims are specified, all eligible claims will be removed.
Results:
structRemoveExpiredClaimsReturnuint64[]Considered - a list of IDs of the claims that were either specified by the caller or discovered to be expired.structBatchReturnuint32SuccessCount - total successes in the batchstructFailCodes[] {uint32idx,uint32code} - list of failure code and index for all failures in batch.
Last updated
Was this helpful?