Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TTGraphsync means data for a deal will be transferred by graphsync TTGraphsync = "graphsync" // TTManual means data for a deal will be transferred manually and imported // on the provider TTManual = "manual" )
View Source
const DealMaxLabelSize = 256
Variables ¶
View Source
var EmptyDealLabel = DealLabel{}
Functions ¶
This section is empty.
Types ¶
type ClientDealProposal ¶
type ClientDealProposal struct {
Proposal DealProposal
ClientSignature crypto.Signature
}
func (*ClientDealProposal) MarshalCBOR ¶
func (t *ClientDealProposal) MarshalCBOR(w io.Writer) error
func (*ClientDealProposal) UnmarshalCBOR ¶
func (t *ClientDealProposal) UnmarshalCBOR(r io.Reader) error
type DataRef ¶
type DataRef struct {
TransferType string
Root cid.Cid
PieceCid *cid.Cid // Optional for non-manual transfer, will be recomputed from the data if not given
PieceSize abi.UnpaddedPieceSize // Optional for non-manual transfer, will be recomputed from the data if not given
RawBlockSize uint64 // Optional: used as the denominator when calculating transfer %
}
DataRef is a reference for how data will be transferred for a given storage deal
type DealLabel ¶
type DealLabel struct {
// contains filtered or unexported fields
}
func NewLabelFromString ¶
type DealProposal ¶
type DealProposal struct {
PieceCID cid.Cid `checked:"true"` // Checked in validateDeal, CommP
PieceSize abi.PaddedPieceSize
VerifiedDeal bool
Client addr.Address
Provider addr.Address
// Label is an arbitrary client chosen label to apply to the deal
Label DealLabel
// Nominal start epoch. Deal payment is linear between StartEpoch and EndEpoch,
// with total amount StoragePricePerEpoch * (EndEpoch - StartEpoch).
// Storage deal must appear in a sealed (proven) sector no later than StartEpoch,
// otherwise it is invalid.
StartEpoch abi.ChainEpoch
EndEpoch abi.ChainEpoch
StoragePricePerEpoch abi.TokenAmount
ProviderCollateral abi.TokenAmount
ClientCollateral abi.TokenAmount
}
func (*DealProposal) MarshalCBOR ¶
func (t *DealProposal) MarshalCBOR(w io.Writer) error
func (*DealProposal) UnmarshalCBOR ¶
func (t *DealProposal) UnmarshalCBOR(r io.Reader) error
type Proposal ¶
type Proposal struct {
DealProposal *ClientDealProposal
Piece *DataRef
FastRetrieval bool
}
Proposal is the data sent over the network from client to provider when proposing a deal
type Response ¶
type Response struct {
State StorageDealStatus
// DealProposalRejected
Message string
Proposal cid.Cid
// StorageDealProposalAccepted
PublishMessage *cid.Cid
}
type SignedResponse ¶
func (*SignedResponse) MarshalCBOR ¶
func (t *SignedResponse) MarshalCBOR(w io.Writer) error
func (*SignedResponse) UnmarshalCBOR ¶
func (t *SignedResponse) UnmarshalCBOR(r io.Reader) (err error)
type StorageDealStatus ¶
type StorageDealStatus = uint64
Click to show internal directories.
Click to hide internal directories.