# README
Retrieval Manager
This module manages a trustless transfer of bytes between 2 parties. It is based on go-fil-markets implementation but does not require unsealing as the blocks are not sealed in storage sectors but ready to be delivered.
Basic flow
-
Client calls stateMachines.begin with a new deal id and initial deal state
-
Client sends an EventOpen to the state machine
-
The state machine moves to StatusNew deal sending a deal Proposal voucher and a data transfer pull request.
-
The Provider receives the voucher, runs some validation and sends back a response stating if they accept or not.
-
If the deal status is accepted, the client will get or create a new channel adding the funds in anticipation of the whole transfer costs.
-
The Client state machine will block until the payment channel is confirmed on chain
-
Once the channel address is returned the state machine will call the payment manager to allocate and return a new lane number
-
Meanwhile the provider resumes the data transfer and starts sending blocks until the given payment interval is reached and will request a payment to continue.
-
The Client will create a new voucher for the requested payment, sign it and send to the provider. The provider will validate the voucher and if accepted send the next amount of bytes.