Versions in this module Expand all Collapse all v0 v0.1.1 Jan 11, 2022 Changes in this version + var Events = map[Event]string + var FSMEvents = fsm.Events + var FinalityStates = []fsm.StateKey + var StateEntryFuncs = fsm.StateEntryFuncs + func AllocateLane(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func CancelDeal(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func CheckComplete(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func CheckFunds(ctx fsm.Context, env DealEnvironment, ds deal.ClientState) error + func DataTransferSubscriber(deals EventReceiver, host peer.ID) datatransfer.Subscriber + func Dispatcher(evt pubsub.Event, subscriberFn pubsub.SubscriberFn) error + func Ongoing(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func ProcessPaymentRequested(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func ProposeDeal(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func SendFunds(ctx fsm.Context, env DealEnvironment, ds deal.ClientState) error + func SetupPaymentChannelStart(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + func WaitPaymentChannelReady(ctx fsm.Context, environment DealEnvironment, ds deal.ClientState) error + type DealEnvironment interface + CloseDataTransfer func(context.Context, datatransfer.ChannelID) error + OpenDataTransfer func(ctx context.Context, to peer.ID, proposal *deal.Proposal) (datatransfer.ChannelID, error) + Payments func() payments.Manager + SendDataTransferVoucher func(context.Context, datatransfer.ChannelID, *deal.Payment) error + type Event uint64 + const EventAllBlocksReceived + const EventAllocateLaneErrored + const EventBadPaymentRequested + const EventBlocksReceived + const EventCancel + const EventCancelComplete + const EventComplete + const EventCompleteVerified + const EventCreateVoucherFailed + const EventDataTransferError + const EventDealAccepted + const EventDealNotFound + const EventDealProposed + const EventDealRejected + const EventEarlyTermination + const EventFundsExpended + const EventLaneAllocated + const EventLastPaymentRequested + const EventOpen + const EventPaymentChannelAddFundsErrored + const EventPaymentChannelAddingFunds + const EventPaymentChannelCreateInitiated + const EventPaymentChannelErrored + const EventPaymentChannelReady + const EventPaymentChannelSkip + const EventPaymentNotSent + const EventPaymentRequested + const EventPaymentSent + const EventProviderCancelled + const EventProviderErrored + const EventRecheckFunds + const EventSendFunds + const EventUnknownResponseReceived + const EventUnsealPaymentRequested + const EventVoucherShortfall + const EventWaitForLastBlocks + const EventWriteDealPaymentErrored + const EventWriteDealProposalErrored + type EventReceiver interface + Has func(id interface{}) (bool, error) + Send func(id interface{}, name fsm.EventName, args ...interface{}) (err error) + type InternalEvent struct + Evt Event + State deal.ClientState + type Subscriber func(event Event, state deal.ClientState)