Documentation ¶
Index ¶
- Variables
- type DealProposal
- type DealState
- type FilClient
- func (fc *FilClient) ChainGetTipSetByHeight(ctx context.Context, height abi.ChainEpoch, tsk TipSetKey) (ts *TipSet, err error)
- func (fc *FilClient) ChainHead(ctx context.Context) (ts *TipSet, err error)
- func (fc *FilClient) StateAccountKey(ctx context.Context, addressId address.Address, tsk TipSetKey) (addr address.Address, err error)
- func (fc *FilClient) StateLookupID(ctx context.Context, addr address.Address, tsk TipSetKey) (addressId address.Address, err error)
- func (fc *FilClient) StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk TipSetKey) (deal *MarketDeal, err error)
- func (fc *FilClient) StateMinerInfo(ctx context.Context, miner address.Address, tsk TipSetKey) (data *MinerInfo, err error)
- func (fc *FilClient) StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk TipSetKey) (dataCap *abi.StoragePower, err error)
- func (fc *FilClient) WalletVerify(ctx context.Context, addr address.Address, msg []byte, sig *crypto.Signature) (valid bool, err error)
- type MarketDeal
- type MinerInfo
- type TipSet
- type TipSetKey
Constants ¶
This section is empty.
Variables ¶
var EmptyTSK = TipSetKey{}
Functions ¶
This section is empty.
Types ¶
type DealProposal ¶
type DealProposal struct { PieceCID cid.Cid PieceSize abi.PaddedPieceSize VerifiedDeal bool Client address.Address Provider address.Address Label string StartEpoch abi.ChainEpoch EndEpoch abi.ChainEpoch StoragePricePerEpoch abi.TokenAmount ProviderCollateral abi.TokenAmount ClientCollateral abi.TokenAmount }
type DealState ¶
type DealState struct { SectorStartEpoch abi.ChainEpoch // -1 if not yet included in proven sector LastUpdatedEpoch abi.ChainEpoch // -1 if deal state never updated SlashEpoch abi.ChainEpoch // -1 if deal never slashed }
type FilClient ¶
type FilClient struct {
// contains filtered or unexported fields
}
func NewFileClient ¶
func (*FilClient) ChainGetTipSetByHeight ¶
func (fc *FilClient) ChainGetTipSetByHeight(ctx context.Context, height abi.ChainEpoch, tsk TipSetKey) (ts *TipSet, err error)
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.
func (*FilClient) StateAccountKey ¶
func (fc *FilClient) StateAccountKey(ctx context.Context, addressId address.Address, tsk TipSetKey) (addr address.Address, err error)
StateAccountKey returns the public key address of the given ID address
func (*FilClient) StateLookupID ¶
func (fc *FilClient) StateLookupID(ctx context.Context, addr address.Address, tsk TipSetKey) (addressId address.Address, err error)
StateLookupID retrieves the ID address of the given address
func (*FilClient) StateMarketStorageDeal ¶
func (fc *FilClient) StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk TipSetKey) (deal *MarketDeal, err error)
StateMarketStorageDeal returns information about the indicated deal
func (*FilClient) StateMinerInfo ¶
func (fc *FilClient) StateMinerInfo(ctx context.Context, miner address.Address, tsk TipSetKey) (data *MinerInfo, err error)
StateMinerInfo returns info about the indicated miner
func (*FilClient) StateVerifiedClientStatus ¶
func (fc *FilClient) StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk TipSetKey) (dataCap *abi.StoragePower, err error)
StateVerifiedClientStatus returns the data cap for the given address. Returns nil if there is no entry in the data cap table for the address.
func (*FilClient) WalletVerify ¶
func (fc *FilClient) WalletVerify(ctx context.Context, addr address.Address, msg []byte, sig *crypto.Signature) (valid bool, err error)
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.
type MarketDeal ¶
type MarketDeal struct { Proposal DealProposal State DealState }
type TipSet ¶
type TipSet struct { Cids []cid.Cid Height abi.ChainEpoch }
type TipSetKey ¶
type TipSetKey struct {
// contains filtered or unexported fields
}
A TipSetKey is an immutable collection of CIDs forming a unique key for a tipset. The CIDs are assumed to be distinct and in canonical order. Two keys with the same CIDs in a different order are not considered equal. TipSetKey is a lightweight value type, and may be compared for equality with ==.
func NewTipSetKey ¶
func NewTipSetKey(cids ...cid.Cid) TipSetKey
NewTipSetKey builds a new key from a slice of CIDs. The CIDs are assumed to be ordered correctly.
func TipSetKeyFromBytes ¶
TipSetKeyFromBytes wraps an encoded key, validating correct decoding.
func (TipSetKey) Cids ¶
func (k TipSetKey) Cids() []cid.Cid
Cids returns a slice of the CIDs comprising this key.