package
0.1.1
Repository: https://github.com/myelnet/pop.git
Documentation: pkg.go.dev

# Functions

AllocateLane allocates a lane for this retrieval operation.
CancelDeal clears a deal that went wrong for an unknown reason.
CheckComplete verifies that a provider that completed without a last payment requested did in fact send us all the data.
CheckFunds examines current available funds in a payment channel after a voucher shortfall to determine a course of action -- whether it's a good time to try again, wait for pending operations, or we've truly expended all funds and we need to wait for a manual readd.
DataTransferSubscriber is the function called when an event occurs in a data transfer initiated on the client -- it reads the voucher to verify this even occurred in a storage market deal, then, based on the data transfer event that occurred, it dispatches an event to the appropriate state machine.
Dispatcher casts a pubsub event into a provider event and publishes it to a subscriber.
Ongoing just double checks that we may need to move out of the ongoing state cause a payment was previously requested.
ProcessPaymentRequested processes a request for payment from the provider.
ProposeDeal sends the proposal to the other party.
SendFunds sends the next amount requested by the provider.
SetupPaymentChannelStart initiates setting up a payment channel for a deal.
WaitPaymentChannelReady waits for a pending operation on a payment channel -- either creating or depositing funds.

# Constants

EventAllBlocksReceived indicates the provider has sent all blocks.
EventAllocateLaneErrored means there was a failure creating a lane in a payment channel.
EventBadPaymentRequested indicates the provider asked for funds in a way that does not match the terms of the deal.
EventBlocksReceived indicates the provider has sent blocks.
EventCancel runs when a user cancels a deal.
EventCancelComplete happens when a deal cancellation is transmitted to the provider.
EventComplete indicates a deal has completed.
EventCompleteVerified means that a provider completed without requesting a final payment but we verified we received all data.
EventCreateVoucherFailed indicates an error happened creating a payment voucher.
EventDataTransferError emits when something go wrong at the data transfer level.
EventDealAccepted means a provider accepted a deal.
EventDealNotFound means a provider could not find a piece for a deal.
EventDealProposed means a deal was successfully sent to a miner.
EventDealRejected means a deal was rejected by the provider.
EventEarlyTermination indications a provider send a deal complete without sending all data.
when totalFunds is expended.
EventLaneAllocated is called when a lane is allocated.
EventLastPaymentRequested indicates the provider requested a final payment.
EventOpen indicates a deal was initiated.
EventPaymentChannelAddFundsErrored means that adding funds to the payment channel failed.
EventPaymentChannelAddingFunds mean we are waiting for funds to be added to a payment channel.
EventPaymentChannelCreateInitiated means we are waiting for a message to create a payment channel to appear on chain.
EventPaymentChannelErrored means there was a failure creating a payment channel.
EventPaymentChannelReady means the newly created payment channel is ready for the deal to resume.
EventPaymentChannelSkip means we can skip payment channel because the deal price is 0.
EventPaymentNotSent indicates that payment was requested, but no payment was actually due, so a voucher was not sent to the provider.
EventPaymentRequested indicates the provider requested a payment.
EventPaymentSent indicates a payment was sent to the provider.
EventProviderCancelled means a provider has sent a message to cancel a deal.
EventProviderErrored happens when we receive a status in response voucher telling us something went wrong on the provider side but they don't know what (500).
EventRecheckFunds runs when an external caller indicates there may be new funds in a payment channel.
EventSendFunds emits when we reach the threshold to send the next payment.
EventUnknownResponseReceived means a client received a response it doesn't understand from the provider.
EventUnsealPaymentRequested indicates the provider requested a payment for unsealing the sector.
EventVoucherShortfall means we tried to create a voucher but did not have enough funds in channel to create it.
EventWaitForLastBlocks is fired when 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.
EventWriteDealPaymentErrored indicates a network error trying to write a payment.
EventWriteDealProposalErrored means a network error writing a deal proposal.

# Variables

Events is a human readable map of client event name -> event description.
FinalityStates are terminal states after which no further events are received.
FSMEvents is the state chart defining the events that can happen in a retrieval client it is almost identical to go-fil-markets implementation except we don't support legacy events.
StateEntryFuncs are the handlers for different states in a retrieval client.

# Structs

InternalEvent is an atomic state change in the client.

# Interfaces

DealEnvironment is a bridge to the environment a client deal is executing in.
EventReceiver is any thing that can receive FSM events.

# Type aliases

Event is an event that occurs in a deal lifecycle on the client.
Subscriber is a callback that is registered to listen for retrieval events.