SSB App-to-app Rendezvous

Status: DRAFT! Please do not rely on this revision.

Author: Andre Medeiros contact@staltz.com

License: This work is licensed under a Creative Commons Attribution 4.0 International License.

Abstract

TODO TODO TODO TODO

Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Table of contents

Conditions

Specification

TODO TODO TODO TODO

Examples

Example 1: subapp

New app wants to be a subfeed of the root meta feed, AND wants that subfeed to be added as a member in rooms AND wants to partially replicate the main feed (contact graph).

sequenceDiagram participant new as New SSB App participant os as Operating System participant old as Old SSB App participant room as Room 2.0 server Note over new: Present "Sign in" button new->>os: ssb:experimental?action=a2a&
token=ABADCAFE&
multiserverAddress=newappMSAddr&
roomMembership=1&
newSubfeed=1&
replicateContacts=1 os->>old: SSB URI old->>old: create subfeed `X`
under meta feed old->>+room: muxrpc: add member room-->>-old: done old->>new: open muxrpc a2a duplex
with token `ABADCAFE` activate old activate new old-->>new: info package containing
subfeed keys `X` and
`main` contact messages new-->>old: close muxrpc a2a duplex deactivate new deactivate old

Example 2: migration

New app wants to take over everything from the old app and the old one should be deleted afterwards.

sequenceDiagram participant new as New SSB App participant os as Operating System participant old as Old SSB App Note over new: Present "Migrate" button new->>os: ssb:experimental?action=a2a&
token=ABADCAFE&
multiserverAddress=newappMSAddr&
migrateEverything=1 os->>old: SSB URI old->>new: open muxrpc a2a duplex
with token `ABADCAFE` activate old activate new old-->>new: muxrpc: info package containing
main keys `X` new-->>old: createHistoryStream(main) old-->>new: main feed messages old->>old: delete own database old-->>new: close muxrpc a2a duplex deactivate new deactivate old

Example 3: fusion dance

New app and old app want to link each other as the same "person".

sequenceDiagram participant new as New SSB App participant os as Operating System participant old as Old SSB App Note over new: Present "Link" button new->>os: ssb:experimental?action=a2a&
token=ABADCAFE&
multiserverAddress=newappMSAddr&
fusion=ssb:feed/ed25519/new os->>old: SSB URI old->>old: publish fusion/init old->>old: publish fusion/invite for
ssb:feed/ed25519/new old->>new: open muxrpc a2a duplex
with token `ABADCAFE` activate old activate new old-->>new: info package containing
the two fusion messages new->>new: publish fusion/consent new-->>old: my fusion/consent message old->>old: publish fusion/entrust old-->>new: my fusion/entrust message new->>new: proof-of-key new-->>old: close muxrpc a2a duplex deactivate new deactivate old

Appendix

List of new muxrpc APIs

List of new SSB URIs