Documentation ¶
Overview ¶
Package clientutils provides utility functions for the storage client & client FSM
Index ¶
- func CommP(ctx context.Context, pieceIO pieceio.PieceIO, rt abi.RegisteredSealProof, ...) (cid.Cid, abi.UnpaddedPieceSize, error)
- func LabelField(payloadCID cid.Cid) (string, error)
- func VerifyResponse(ctx context.Context, resp network.SignedResponse, minerAddr address.Address, ...) error
- type VerifyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommP ¶
func CommP(ctx context.Context, pieceIO pieceio.PieceIO, rt abi.RegisteredSealProof, data *storagemarket.DataRef, storeID *multistore.StoreID) (cid.Cid, abi.UnpaddedPieceSize, error)
CommP calculates the commP for a given dataref
func LabelField ¶
LabelField makes a label field for a deal proposal as a multibase encoding of the payload CID (B58BTC for V0, B64 for V1)
func VerifyResponse ¶
func VerifyResponse(ctx context.Context, resp network.SignedResponse, minerAddr address.Address, tok shared.TipSetToken, verifier VerifyFunc) error
VerifyResponse verifies the signature on the given signed response matches the given miner address, using the given signature verification function
Types ¶
Click to show internal directories.
Click to hide internal directories.