interledgerjs / ilp-connector

Reference implementation of an Interledger connector.
Other
138 stars 53 forks source link

copy extensions from incoming packet to outgoing packet #405

Open michielbdejong opened 6 years ago

emschwartz commented 6 years ago

For context: one of the arguments for having a specific packet encoding was to make it easier to extend ILP later, because intermediaries would pass on extensions they don't understand. However, the ilp-connector isn't actually doing that right now so we should set the example if we want extensions to have a hope of working in the future.

michielbdejong commented 6 years ago

Note that, actually, the newer packet types have no extensions, but rely on the envelope length indicator instead.

So ilp-packet should accept something like a 'trailingBytes' field (defaulting to 0 bytes) when serializing, and also return that field when deserializing, and then ilp-connector should take that buffer from the incoming transfer and if non-empty, slap it onto the end of the outgoing transfer.

sharafian commented 6 years ago

:+1: Editing in place may also be a good idea