Categorygithub.com/filecoin-project/go-retrieval-types

# README

go-retrieval-types

This is an extraction of types from go-fil-markets used in the libp2p /fil/retrieval/qry/1.0.0 protocol and the Filecoin Markets V1 retrieval protocol

License

This library is dual-licensed under Apache 2.0 and MIT terms.

Copyright 2022. Protocol Labs, Inc.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
NewParamsV1 generates parameters for a retrieval deal, including a selector.
NewQueryV1 creates a V1 query (which has an optional pieceCID).
No description provided by the author

# Constants

DealPaymentType is the DealPayment voucher type.
DealProposalType is the DealProposal voucher type.
DealResponseType is the DealResponse usable as a voucher type.
DealStatusAccepted means a deal has been accepted by a provider and its is ready to proceed with retrieval.
DealStatusBlocksComplete indicates that all blocks have been processed for the piece.
DealStatusCancelled means a deal has been cancelled.
DealStatusCancelling means we are cancelling an inprogress deal.
DealStatusCheckComplete is used for when the provided completes without a last payment requested cycle, to verify we have received all blocks.
DealStatusCheckFunds means we are looking at the state of funding for the channel to determine if more money is incoming.
DealStatusClientWaitingForLastBlocks means that the provider has told the client that all blocks were sent for the deal, and the client is waiting for the last blocks to arrive.
DealStatusCompleted indicates a deal is complete.
DealStatusCompleting is just an inbetween state to perform final cleanup of complete deals.
DealStatusDealNotFound indicates an update was received for a deal that could not be identified.
DealStatusDealNotFoundCleanup means that the deal was not found and we need to do some cleanup before moving to the not found state.
DealStatusErrored indicates a deal has terminated in an error.
DealStatusErroring means that there was an error and we need to do some cleanup before moving to the error state.
DealStatusFailing indicates something went wrong during a retrieval, and we are cleaning up before terminating with an error.
DealStatusFinalizing means the last payment has been received and we are just confirming the deal is complete.
DealStatusFinalizingBlockstore means that all blocks have been received, and the blockstore is being finalized.
DealStatusFundsNeeded indicates the provider needs a payment voucher to continue processing the deal.
DealStatusFundsNeededLastPayment indicates the provider needs a payment voucher in order to complete a deal.
DealStatusFundsNeededUnseal means a deal has been accepted by a provider and payment is needed to unseal the data.
DealStatusInsufficientFunds indicates we have depleted funds for the retrieval payment channel - we can resume after funds are added.
DealStatusNew is a deal that nothing has happened with yet.
DealStatusOngoing indicates the provider is continuing to process a deal.
DealStatusPaymentChannelAddingFunds is the status when we are waiting for funds to finish being sent to the payment channel.
DealStatusPaymentChannelAddingInitialFunds means that a payment channel exists from an earlier deal between client and provider, but we need to add funds to the channel for this particular deal.
DealStatusPaymentChannelAllocatingLane is the status when we are making a lane for this channel.
DealStatusPaymentChannelCreating is the status set while waiting for the payment channel creation to complete.
DealStatusRejected indicates the provider rejected a client's deal proposal for some reason.
DealStatusRejecting means that the deal was rejected and we need to do some cleanup before moving to the rejected state.
DealStatusRetryLegacy means we're attempting the deal proposal for a second time using the legacy datatype.
DealStatusSendFunds indicates the client is now going to send funds because we reached the threshold of the last payment.
DealStatusSendFundsLastPayment indicates the client is now going to send final funds because we reached the threshold of the final payment.
DealStatusUnsealed means the provider has finished unsealing data.
DealStatusUnsealing means the provider is unsealing data.
DealStatusWaitForAcceptance means we're waiting to hear back if the provider accepted our deal.
DealStatusWaitForAcceptanceLegacy means we're waiting to hear the results on the legacy protocol.
QueryItemAvailable indicates requested part of the piece is available to be served.
QueryItemUnavailable indicates the piece either does not contain the requested item or it cannot be served.
QueryItemUnknown indicates the provider cannot determine if the given item is part of the requested piece (for example, if the piece is sealed and the miner does not maintain a payload CID index).
QueryResponseAvailable indicates a provider has a piece and is prepared to return it.
QueryResponseError indicates something went wrong generating a query response.
QueryResponseUnavailable indicates a provider either does not have or cannot serve the queried piece to the client.

# Variables

AddressBindnodeOption converts a filecoin Address type to and from a Bytes field in a schema.
BigIntBindnodeOption converts a big.Int type to and from a Bytes field in a schema.
No description provided by the author
CborGenCompatibleNodeBindnodeOption converts a CborGenCompatibleNode type to and from an Any field in a schema.
DealPaymentUndefined is an undefined deal payment.
DealProposalUndefined is an undefined deal proposal.
DealResponseUndefined is an undefined deal response.
DealStatuses maps deal status to a human readable representation.
QueryResponseUndefined is an empty QueryResponse.
QueryUndefined is a query with no values.
SignatureBindnodeOption converts a filecoin Signature type to and from a Bytes field in a schema.
TokenAmountBindnodeOption converts a filecoin abi.TokenAmount type to and from a Bytes field in a schema.

# Structs

CborGenCompatibleNode is for cbor-gen / go-ipld-prime compatibility, to replace Deferred types that are used to represent datamodel.Nodes.
DealPayment is a payment for an in progress retrieval deal.
DealProposal is a proposal for a new retrieval deal.
DealResponse is a response to a retrieval deal proposal.
Params are the parameters requested for a retrieval deal proposal.
Query is a query to a given provider to determine information about a piece they may have available for retrieval.
QueryParams - V1 - indicate what specific information about a piece that a retrieval client is interested in, as well as specific parameters the client is seeking for the retrieval deal.
QueryResponse is a miners response to a given retrieval query.

# Type aliases

DealID is an identifier for a retrieval deal (unique to a client).
No description provided by the author
QueryItemStatus (V1) indicates whether the requested part of a piece (payload or selector) is available for retrieval.
QueryResponseStatus indicates whether a queried piece is available.