Skip to content

Instantly share code, notes, and snippets.

@benoror
Last active June 29, 2019 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benoror/0ef0b1e0249ae787ff8d4b917b8d641e to your computer and use it in GitHub Desktop.
Save benoror/0ef0b1e0249ae787ff8d4b917b8d641e to your computer and use it in GitHub Desktop.
Sundly Sharing (read-only)

User Story

  • Alice adds Bob as a contact
  • Alice shares his data with Alice
  • Bob now can see Alice Profile & Timeline (timestamped) in their contacts

Mockups

[  Bob.id  ](link-to-user-profile/timeline) [Share icon]

Non-goals

  • Show Profile
  • Notifications
  • Versioning
  • Write/addendum permissions
  • Detailed granular permisions (per section...)
  • Temporal access key scheme

Refactor User routes/components hierarchy

  • /

    • /timeline
  • /id

    • /id/timeline
  • User (Profile)

    • Timeline (timeline.json)
  • View fake user data

    • Not allowed to see not-shared profiles

Encryption sharing handshake PoC

Befriending (share pub keys)

  • Add Bob to Alice's file contacts.json (a la keys.json) Blockstack's .profile blob: {username: 'bob.id', pubkey: '...'}
  • " " same for Bob's

Sharing (encrypting + copying) data

  • Alice's
    • Encrypt Alice's Timeline files with Bob's pubkey
    • Write (putFile) Alice's encrypted Timeline files to public_data shared/{bob_pubkey}/{timestamp}/timeline.json
  • Bob's
    • Read (getFile) from Alice's public_data shared/{own_pubkey}/...

Allow public data sharing

   redirectToSignIn(origin, origin + '/manifest.json', ['store_write', 'publish_data'])

http://blockstack.github.io/blockstack.js/#redirecttosignin https://docs.blockstack.org/browser/blockstack_storage.html#add-a-rule-to-process-url-paths-with--dot

GetFile from Username

 const options = { username: username, decrypt: false }

http://blockstack.github.io/blockstack.js/#getfile https://docs.blockstack.org/browser/blockstack_storage.html#add-a-rule-to-process-url-paths-with--dot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment