-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Payment Client #5
Comments
Do you like it 😄 ? Sub-Channels Y/N? Should the asset be fixed to ETH? (Allowing ERC20 would complicate the Bals struct) Do we need Payment requests? I think you can go ahead with implementing the proposal. One requirement from my side would be that this requires minimal or at best no changes to the other packages. We should also have in mind that maintaining this payment client should not impose a lot of overhead when making changes to the rest of the framework. |
I think we should consider making this payment client available in a package separate from the core. What do you think? |
If Alice wants to request balances from Bob, she would send Bob a transaction which increases her balance. |
Yes we could do that but it would make it harder to maintain. |
We can leave payment requests for later. Placing it in a separate repo would make that repo harder to maintain, but the core easier to maintain. I leave it up to you. |
Since you started implementing in another repo, I close the issue here. |
Location New package, maybe
[client/simple]
,[client/payment]
or[payment/client]
.Description
The Payment Client API could look like this:
Compared to go-perun, the proposed API is synchronous and lets the user write linear programs without confusing callback magic.
I think this is important for making it more understandable.
In detail:
Client.Proposals() <-chan ChannelProposal
from which the user can read the proposals that were sent to him.Channel.ReceivedPayments() <- chan amount
from which the user can read the payments that he received.Client.Restore
,Client.ProposeChannel
andChannelProposal.Accept
.Client
internally.The callback version would look like this:
Context We want to make go-perun easier to use for new developers.
This approach minimizes and simplifies the API at the cost of its versatility.
It would allow developers to create
two-party-single-asset-payment-ledger
channels.Open questions:
Bals
struct)Testing A End-to-End test à la
HappyAliceBobTest
would be great.The text was updated successfully, but these errors were encountered: