Envelope - Method for structuring, wrapping and combining on and off chain data #96
KarlTheProgrammer
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The Envelope protocol was developed through a BSV Association working group. It enables wrapping different pieces of data together and around each other. Defining data structures that contain all possible fields and making most of them optional is less elegant and more work to implement.
Example
This standard will be useful for encoding messages peer to peer and peer to service.
One main example that I am working on now is communicating payments. The minimum simple workflow is:
The core of the data is the transaction, but it will also normally need an identifier, depending on the communication method so the parties know which conversation/thread the tx belongs to. The data will often also need to be signed and preferably encrypted, which involves including public keys and re-encoding part of the data.
This can easily be done with the Envelope protocol by having several separate protocols that get combined via the Envelope protocol. For instance we have protocols for the following:
With the envelope protocol you can:
All of these protocols can be completely separate and independent. They simply have the ability to interact with envelope data. The encryption protocol replaces the current envelope data with encrypted data. The signature protocol creates a signature of the current envelope data and prepends the signature. Other protocols simple prepend data to the envelope. The protocol identifiers are included at the beginning of the envelope so the decoder simply processes each in order to decode the data properly.
Beta Was this translation helpful? Give feedback.
All reactions