interledgerjs / ilp-packet

Moved to monorepo in interledgerjs/interledgerjs
https://github.com/interledgerjs/interledgerjs
Other
6 stars 5 forks source link

The name 'fulfillment' is ambiguous #18

Open michielbdejong opened 6 years ago

michielbdejong commented 6 years ago

In #17, a fulfillment packet was introduced, which can be used as a standard representation of the arbitrary transport-layer or application-layer data, that may be passed back from the receiver, along the payment path, to the sender.

However, in other contexts, the term 'fulfillment' is already used to refer to the preimage which unlocks the hashlock of a conditional transfer.

@justmoon Wouldn't 'serializeIlpFulfillmentData' be a better name than 'serializeIlpFulfillment'?

justmoon commented 6 years ago

I would be down with:

... to keep it consistent. (Read as: IlpPaymentData travels with a payment, IlpFulfillmentData travels with a fulfillment and IlpRejectionData travels with a rejection.)

We'd keep the old method names around for backwards compatibility, of course, but perhaps mark with util.deprecate. And I'd make a PR for the spec to use the same new terminology.