omnilaboratory / obd

OmniBOLT daemon, a golang implementation of OmniBOLT spec, the smart assets lightning network.
MIT License
213 stars 21 forks source link

Using TLV to enable lightning network to be aware of OmniBOLT TXs #7

Open neocarmack opened 4 years ago

neocarmack commented 4 years ago

TLV -- Type Length Value

https://github.com/lightningnetwork/lightning-rfc/blob/master/01-messaging.md#type-length-value-format

A TLV (Type-Length-Value) format is used to allow for the backwards-compatible addition of new fields to existing LN message types.

Motivation

OmniBOLT transaction can be embeded into LN messages, so that current ln network can benifit from the liquidity of Omnilayer assets.

Rationale

A simple workflow is:

  1. lnd receives a message, which contain a TLV field, then lnd redirect it to its obd plugin.
  2. obd parses the value of TLV field,
  3. if it is an OmniBOLT message, obd will execute it.