interledger-deprecated/ilp-core

Proposal: Remove Payment class from API

Closed this issue · 1 comments

Right now you need to interact with the client by calling:

const payment = client.createPayment(params)
payment.quote().then((quote) => {
  payment.sendQuoted(quote)
})

It would be cleaner to get rid of the Payment class and add quote and send methods to the client:

client.quote(params).then((quote) => {
  client.send(Object.assign({}, params, quote))
})

This would also make it easier to wrap the quote/send functionality in js-ilp, for example to have the client check whether the source hold duration is too long.

@justmoon I'll take this ticket