Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2019-11-13 📝 Original message: Yaacov Akiba Slama <ya at ...
📅 Original date posted:2019-11-13
📝 Original message:
Yaacov Akiba Slama <ya at slamail.org> writes:
> 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.
This would be UBL treating Lightning as a dumb payment layer, which is a
little like faxing email, and not a use case I'd be promoting for
Lightning.
To be clear: the full UBL spec is machine *parsable* but definitely not
designed to be machine *handlable*. This makes sense, since a machine
cannot generally choose between quotations or interpret general contract
terms.
However, for the simpler (but very common!) case of an offer->purchase
flow, we can define a subset of UBL for which this *can* be done, and a
further-limited subset which must be examined by the user
(e.g. description of goods, price details, shipping info).
In addition, the atomic nature of LN needs to be baked into the
protocol; in LN taking the payment *requires* a cryptographic receipt,
and neutering this property would be horribly short-sighted.
We need to define UBL extensions for the LN fields to tie them all
together (e.g. payment_hash, node_id). We also need to define a
transport mechanism for these over the Lightning Network.
This is all quite possible! But it will take time and is a signficant
amount of work: I need to be sure that others feel the same way before I
embark on this project.
Cheers,
Rusty.
>> 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": "78183e8664da229503f185fa977cb92d5c315dd8bad5daafda98b5df83db7258",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686315439,
"kind": 1,
"tags": [
[
"e",
"a9016896e78ef5f5473204edd89280667686b471d7f529d125afce8e0e678ed9",
"",
"root"
],
[
"e",
"2d945b62359a257acbfb29d96e5b89f90d6102b904cf26704092cfdc51c22168",
"",
"reply"
],
[
"p",
"13fd0434c7ac300f7a468a5ad9464b7b94e8b03d7ae88259f3de3a84422822fd"
]
],
"content": "📅 Original date posted:2019-11-13\n📝 Original message:\nYaacov Akiba Slama \u003cya at slamail.org\u003e writes:\n\u003e Seller: Quotation (UBL)\n\u003e\n\u003e Buyer: Order (UBL)\n\u003e\n\u003e Seller: Prepayment Invoice (UBL)\n\u003e\n\u003e Seller: Invoice (LN)\n\u003e\n\u003e Buyer/Seller: Payment \u0026 Ack (LN)\n\u003e\n\u003e Buyer: Receipt (UBL)\n\u003e\n\u003e\n\u003e The advantage of such workflow are that we don't need to add any fields\n\u003e to the current invoice structure, nor to define in the LN protocol new\n\u003e messages like offer or invoice request, nor to intervene in the semantic\n\u003e of the business workflow and in the required/optional fields in these\n\u003e messages.\n \nThis would be UBL treating Lightning as a dumb payment layer, which is a\nlittle like faxing email, and not a use case I'd be promoting for\nLightning.\n\nTo be clear: the full UBL spec is machine *parsable* but definitely not\ndesigned to be machine *handlable*. This makes sense, since a machine\ncannot generally choose between quotations or interpret general contract\nterms.\n\nHowever, for the simpler (but very common!) case of an offer-\u003epurchase\nflow, we can define a subset of UBL for which this *can* be done, and a\nfurther-limited subset which must be examined by the user\n(e.g. description of goods, price details, shipping info).\n\nIn addition, the atomic nature of LN needs to be baked into the\nprotocol; in LN taking the payment *requires* a cryptographic receipt,\nand neutering this property would be horribly short-sighted.\n\nWe need to define UBL extensions for the LN fields to tie them all\ntogether (e.g. payment_hash, node_id). We also need to define a\ntransport mechanism for these over the Lightning Network.\n\nThis is all quite possible! But it will take time and is a signficant\namount of work: I need to be sure that others feel the same way before I\nembark on this project.\n\nCheers,\nRusty.\n\n\u003e\u003e It's also worth noting that, even compressed, none of the UBL examples\n\u003e\u003e fit into the 1023 byte limit of the existing invoice format:\n\u003e\u003e\n\u003e\u003e UBL-Quotation-2.1-Example.xml: 1864 bytes (gz)\n\u003e\u003e UBL-Order-2.1-Example.xml: 2515 bytes (gz)\n\u003e\u003e UBL-Invoice-2.1-Example.xml: 3163 bytes (gz)\n\u003e\u003e\n\u003e\u003e Indeed, that Quotation alone requires a 32x32 QR code.\n\u003e\u003e\n\u003e\u003e\u003e\u003e \tHowever, since invoices/offers and UBL are both structures, we\n\u003e\u003e\u003e\u003e should have an explicit mapping between the two. What fields should\n\u003e\u003e\u003e\u003e have their own existence in the invoice/offer and what should be in a\n\u003e\u003e\u003e\u003e general UBL field is a question we have to think on further.\n\u003e\u003e\u003e I agree that we don't want duplication. This is the reason, I propose to \n\u003e\u003e\u003e use only ubl structure and add in the ln standard invoice an ubl \n\u003e\u003e\u003e \"opaque\" field which will be self-contained and only add in the \n\u003e\u003e\u003e invoice/offer/.. the fields specific to ln.\n\u003e\u003e Except we need to go through the UBL spec and indicate exactly what\n\u003e\u003e fields are permitted, and which are required.\n\u003e\u003e\n\u003e\u003e Many UBI fields are not amenable to machine interpretation (eg. note\n\u003e\u003e fields). These must be either explicitly exposed to the buyer (in case\n\u003e\u003e the seller uses them) such as shipping conditions, or explicitly\n\u003e\u003e forbidden/ignored.\n\u003e\u003e\n\u003e\u003e This is not a small task, and required intimiate knowledge of the UBL\n\u003e\u003e spec. It's not enough just to make something *look* like UBL.\n\u003e\u003e\n\u003e\u003e Does anyone have expertise in this area? Shall we form a sub-group to\n\u003e\u003e investigate this properly?\n\u003e\u003e\n\u003e\u003e Thanks!\n\u003e\u003e Rusty.\n\u003e\u003e",
"sig": "8a08972cc99018ded1e337f0f2c3571576cccbd684746c9e9113c1b934f5991e7cb04e0c6da108f88ff1efc7ce65c1116892724ed1af449ce75dc16e8d54299f"
}