Closed sappenin closed 7 years ago
We definitely need to implement concrete classes for all the packet formats that are being proposed here: https://github.com/interledger/rfcs/pull/168
@adrianhopebailie I've started looking at interledger/rfcs#168, and it looks like the conditional payment stuff has been removed in that PR. Is the idea that a condition/expiry info for a non-optimisitic-mode payment will be some sort of "custom header" stuffed into the InterledgerProtocolPaymentMessage.data
field?
FYI - I have a provisional interface defined for the InterledgerPacket interface - I'll try to commit tonight or tomorrow for feedback. It's not clear to me if the PaymentPacket and the ILQPPacket and the CCP packets should be distinct "things", or if they should all inherit from a common interface.
Awesome!
It's not clear to me if the PaymentPacket and the ILQPPacket and the CCP packets should be distinct "things", or if they should all inherit from a common interface.
They are all distinct packets
I've created an initial PR for this via PR #24. The packets are distinct classes, but they have some overlapping qualities, so they inherit from the same super-type. Please review and provide recommendations if anyone prefers a different style or design.
Also, be sure to read the "Design Note" in the description of the PR. I think Java ILP Core should provide concrete implementations of these model objects like packets, but IMHO we should also provide interfaces so that other people (me, for example) can create alternative implementations of each of these classes. But for sure, this PR needs to have concrete implementations in it before it's merged.
This idea (interfaces+concrete classes) seems to be somewhat controversial, so we should perhaps discuss this more here, in another issue, or perhaps on the next Java call.
See RFC Issue 146 for discussion, and the proposed Interledger Protocol data format and discuss how any of this should be implemented in Java.