perun-network / perun-eth-payment

Simplified payment channel API of go-perun.
Apache License 2.0
5 stars 1 forks source link

Injectable Dialer and Listener #5

Closed ggwpez closed 3 years ago

ggwpez commented 3 years ago

Motivation: After using the payment library in a bot, we noticed that having an injectable Dialer and Listener would be good.

Goal: Add a way to inject a Dialer and Listener into the payment client.

Design:
Either:

  1. Two new optional arguments to NewClient like payment.WithDialer and payment.WithListener
  2. Two new functions SetDialer and SetListener on the Client object which can be called before Init