Yaacov Akiba Slama [ARCHIVE] on Nostr: 📅 Original date posted:2019-11-12 📝 Original message: On 11/11/2019 06:11, ...
📅 Original date posted:2019-11-12
📝 Original message:
On 11/11/2019 06:11, Rusty Russell wrote:
> 2) From a technical point of view, it seems that there are already UBL
> libraries in java and c#. I don't think such library is hard to write in
> go, rust.., so every wallet implementation can use them.
> That is not the problem. The problem is that our order flow is simple:
>
> Seller: Offer
> Buyer: Invoice Request
> Seller: Invoice (or updated Offer)
> Buyer/Seller: Payment & Acknowledgement (atomic)
>
> (This could, of course, fit into a larger business flow.)
>
> The closest UBL flow seems to be:
>
> Seller: Quotation
> Buyer: Order
> Seller: (Prepayment)Invoice (or updated Quotation)
In UBL, 2 flows are defined (Traditional and Self Billing) and from what
I know, the right flow depends on the country and even on the industry
(services or goods for instance). What I suggest is to superpose the
"strict" LN flow (invoice then payment) to the business flow. So for
instance when a prepayment invoice is needed, the simplified (from UBL
pov) flow will be:
Seller: Quotation (UBL)
Buyer: Order (UBL)
Seller: Prepayment Invoice (UBL)
Seller: Invoice (LN)
Buyer/Seller: Payment & Ack (LN)
Buyer: Receipt (UBL)
The advantage of such workflow are that we don't need to add any fields
to the current invoice structure, nor to define in the LN protocol new
messages like offer or invoice request, nor to intervene in the semantic
of the business workflow and in the required/optional fields in these
messages.
>
> It's also worth noting that, even compressed, none of the UBL examples
> fit into the 1023 byte limit of the existing invoice format:
>
> UBL-Quotation-2.1-Example.xml: 1864 bytes (gz)
> UBL-Order-2.1-Example.xml: 2515 bytes (gz)
> UBL-Invoice-2.1-Example.xml: 3163 bytes (gz)
>
> Indeed, that Quotation alone requires a 32x32 QR code.
>
>>> However, since invoices/offers and UBL are both structures, we
>>> should have an explicit mapping between the two. What fields should
>>> have their own existence in the invoice/offer and what should be in a
>>> general UBL field is a question we have to think on further.
>> I agree that we don't want duplication. This is the reason, I propose to
>> use only ubl structure and add in the ln standard invoice an ubl
>> "opaque" field which will be self-contained and only add in the
>> invoice/offer/.. the fields specific to ln.
> Except we need to go through the UBL spec and indicate exactly what
> fields are permitted, and which are required.
>
> Many UBI fields are not amenable to machine interpretation (eg. note
> fields). These must be either explicitly exposed to the buyer (in case
> the seller uses them) such as shipping conditions, or explicitly
> forbidden/ignored.
>
> This is not a small task, and required intimiate knowledge of the UBL
> spec. It's not enough just to make something *look* like UBL.
>
> Does anyone have expertise in this area? Shall we form a sub-group to
> investigate this properly?
>
> Thanks!
> Rusty.
>
Published at
2023-06-09 12:57:19Event JSON
{
"id": "2d945b62359a257acbfb29d96e5b89f90d6102b904cf26704092cfdc51c22168",
"pubkey": "13fd0434c7ac300f7a468a5ad9464b7b94e8b03d7ae88259f3de3a84422822fd",
"created_at": 1686315439,
"kind": 1,
"tags": [
[
"e",
"a9016896e78ef5f5473204edd89280667686b471d7f529d125afce8e0e678ed9",
"",
"root"
],
[
"e",
"e2df77295cede215794a60fc51460ba6fd2fb39b4caf529b71ef7a8b96b93024",
"",
"reply"
],
[
"p",
"13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425"
]
],
"content": "📅 Original date posted:2019-11-12\n📝 Original message:\nOn 11/11/2019 06:11, Rusty Russell wrote:\n\u003e 2) From a technical point of view, it seems that there are already UBL \n\u003e libraries in java and c#. I don't think such library is hard to write in \n\u003e go, rust.., so every wallet implementation can use them.\n\u003e That is not the problem. The problem is that our order flow is simple:\n\u003e\n\u003e Seller: Offer\n\u003e Buyer: Invoice Request\n\u003e Seller: Invoice (or updated Offer)\n\u003e Buyer/Seller: Payment \u0026 Acknowledgement (atomic)\n\u003e\n\u003e (This could, of course, fit into a larger business flow.)\n\u003e\n\u003e The closest UBL flow seems to be:\n\u003e\n\u003e Seller: Quotation\n\u003e Buyer: Order\n\u003e Seller: (Prepayment)Invoice (or updated Quotation)\n\nIn UBL, 2 flows are defined (Traditional and Self Billing) and from what\nI know, the right flow depends on the country and even on the industry\n(services or goods for instance). What I suggest is to superpose the\n\"strict\" LN flow (invoice then payment) to the business flow. So for\ninstance when a prepayment invoice is needed, the simplified (from UBL\npov) flow will be:\n\n Seller: Quotation (UBL)\n\n Buyer: Order (UBL)\n\n Seller: Prepayment Invoice (UBL)\n\n Seller: Invoice (LN)\n\n Buyer/Seller: Payment \u0026 Ack (LN)\n\n Buyer: Receipt (UBL)\n\n\nThe advantage of such workflow are that we don't need to add any fields\nto the current invoice structure, nor to define in the LN protocol new\nmessages like offer or invoice request, nor to intervene in the semantic\nof the business workflow and in the required/optional fields in these\nmessages.\n\n\n\u003e\n\u003e It's also worth noting that, even compressed, none of the UBL examples\n\u003e fit into the 1023 byte limit of the existing invoice format:\n\u003e\n\u003e UBL-Quotation-2.1-Example.xml: 1864 bytes (gz)\n\u003e UBL-Order-2.1-Example.xml: 2515 bytes (gz)\n\u003e UBL-Invoice-2.1-Example.xml: 3163 bytes (gz)\n\u003e\n\u003e Indeed, that Quotation alone requires a 32x32 QR code.\n\u003e\n\u003e\u003e\u003e \tHowever, since invoices/offers and UBL are both structures, we\n\u003e\u003e\u003e should have an explicit mapping between the two. What fields should\n\u003e\u003e\u003e have their own existence in the invoice/offer and what should be in a\n\u003e\u003e\u003e general UBL field is a question we have to think on further.\n\u003e\u003e I agree that we don't want duplication. This is the reason, I propose to \n\u003e\u003e use only ubl structure and add in the ln standard invoice an ubl \n\u003e\u003e \"opaque\" field which will be self-contained and only add in the \n\u003e\u003e invoice/offer/.. the fields specific to ln.\n\u003e Except we need to go through the UBL spec and indicate exactly what\n\u003e fields are permitted, and which are required.\n\u003e\n\u003e Many UBI fields are not amenable to machine interpretation (eg. note\n\u003e fields). These must be either explicitly exposed to the buyer (in case\n\u003e the seller uses them) such as shipping conditions, or explicitly\n\u003e forbidden/ignored.\n\u003e\n\u003e This is not a small task, and required intimiate knowledge of the UBL\n\u003e spec. It's not enough just to make something *look* like UBL.\n\u003e\n\u003e Does anyone have expertise in this area? Shall we form a sub-group to\n\u003e investigate this properly?\n\u003e\n\u003e Thanks!\n\u003e Rusty.\n\u003e",
"sig": "59cc61575ff1d0319d7d309fa2f151a505003d8678f122517f9ed279baac987a7917e0c5d60d673e9b7c86fc621de88d249cd6bb3e3772ff99041022dc069dce"
}