ethereum-oasis-op / baseline

The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and reference implementations.
https://docs.baseline-protocol.org
Other
577 stars 237 forks source link

[Interop] Nats Message Schemas #711

Open Therecanbeonlyone1969 opened 1 year ago

Therecanbeonlyone1969 commented 1 year ago

We need Nats Schemas for the following Messages based on the standard:

fleischr commented 1 year ago

hey!

fleischr commented 1 year ago

Need to get the NATS message schema endpoint underlying the protocol messages

fleischr commented 1 year ago

question - what is the assumption to how/where BRI-3 NATs to integrate to BRI-1 NATs?

Are we orchestrating peer-to-peer connectivity or standing up a standalone interop module? @Therecanbeonlyone1969

Therecanbeonlyone1969 commented 1 year ago

@fleischr the assumption is that we use NATS in P2P. The BPI Subjects representing BRI-1/BRI-3 in each other's stack have to have a communication endpoint associated with the BPI Subject either explicitly in the BPI Subject Account or implicitly through the services section in the DID document where the NATS endpoint is placed. Since each BPI Subject representing BRI-1/BRI-3 are identified by DIDs as we agreed.

Can you please confirm that BRI-1 can manage DIDs in NATS messaging since BRI-3 will only send DIDs?

Therecanbeonlyone1969 commented 1 year ago

for server-server messaging using the NATS request-response pattern:

Suggested Interop Message Schema

messageId: uuid
sender: string --> DID of BRI-1/BRI-3 respectively
recipient: string --> DID of BRI-1/BRI-3 respectively
signature: object --> curve, pubkey, signature
type: string --> default value: interop
payload: payloadObject -- see below
WorkgroupID string --> as provided in inviteMessage from BRI-1/BRI-3
WorkflowID  string --> as provided in inviteMessage from BRI-1/BRI-3
WorkstepID  string --> as provided in inviteMessage from BRI-1/BRI-3

payloadObject
object: object --> as defined in communicated schame
proof: string                      
type: string --> Groth16 or Plonk
witness: object --> pubInput (object), verKey (object), proof (string), crs (either for Groth16 -- new for each time a proof is generated -- or based on the public PTau ceremony for PLONK that was chosen e.g. Aztec vs Polygon Hermez)