diff --git a/ideas/146-status-go-sdk/1to1Channels.md b/ideas/146-status-go-sdk/1to1Channels.md new file mode 100644 index 0000000..13c0563 --- /dev/null +++ b/ideas/146-status-go-sdk/1to1Channels.md @@ -0,0 +1,22 @@ +## 1 to 1 messages + + +The ssh_post message on 1 to 1 chats looks like: +``` +{"jsonrpc":"2.0","id":3146,"method":"shh_post","params":[{"sig":"0x046f29b16371c05880c3da0279c7b8f958f97be79e00ca2a8f9e951eb254ccf8ead793af564a66c952668ad9e6e8f6dac5773bd1087d87273ebcece8da03420085","symKeyID":"7aee3646de46c5b175e5ff7cc16ebe1c4488844700f241fb36a2bc0829cea25d","payload":"0x5b227e236334222c5b2270757475222c22746578742f706c61696e222c227e3a757365722d6d657373616765222c3135323336313837323338323330312c313532333631383732333832315d5d","topic":"0xd977be6d","ttl":10,"powTarget":0.001,"powTime":1}]} +``` + +And its decrypted message is: +``` +["~#c4",["hello world","text/plain","~:user-message",152361872382301,1523618723821]] +``` + +Basically the only difference between 1to1 and public is the field message type which in this case is set to `~:user-message`.s + + + +### Ability to send 1 to 1 conversation +### Ability to subscribe to 1 to 1 conversation +### Ability to unsubscribe from a 1 to 1 conversation +### Documented API for 1 to 1 conversations +### Working examples for 1 to 1 conversations diff --git a/ideas/146-status-go-sdk/Milestone1_BasicSDK.md b/ideas/146-status-go-sdk/BasicSDK.md similarity index 97% rename from ideas/146-status-go-sdk/Milestone1_BasicSDK.md rename to ideas/146-status-go-sdk/BasicSDK.md index 9f28cb2..449326b 100644 --- a/ideas/146-status-go-sdk/Milestone1_BasicSDK.md +++ b/ideas/146-status-go-sdk/BasicSDK.md @@ -1,4 +1,4 @@ -## Milestone 1: Status messaging basic interaction +## Status messaging basic interaction ** * TODO its still not clear how username works on the new protocol, it may change the methods using it, as it's not used atm. ** diff --git a/ideas/146-status-go-sdk/ContactManagement.md b/ideas/146-status-go-sdk/ContactManagement.md new file mode 100644 index 0000000..083ae95 --- /dev/null +++ b/ideas/146-status-go-sdk/ContactManagement.md @@ -0,0 +1,45 @@ +## Contact management + +### Invite new contact +The UI for Inviting a new contact should be something like: +``` +if account, err := conn.Invite("my_friend_public_key"); err != nil { + panic("An error occurred while inviting a friend") +} +``` + +Before starting to chat with someone privately you should have its contact details. In order to do that, the next process should happen + +##### Generate a new symkey (shh_newSymKey): +``` +{"jsonrpc":"2.0","id":872,"method":"shh_newSymKey","params":[]} +``` + + +##### GetSymKey (shh_getSymKey): +**[ TODO Describe what's this call doing...]** +``` +{"jsonrpc":"2.0","id":873,"method":"shh_getSymKey","params":["14829092e1b30cb9ab643ef9aa3c37e5a576e69821259cc690f8cccedd08dc94"]} +``` + + +##### Create filter for new topic (shh_newMessageFilter): +``` +{"jsonrpc":"2.0","id":879,"method":"shh_newMessageFilter","params":[{"topics":["0x6c0b63af"],"symKeyID":"14829092e1b30cb9ab643ef9aa3c37e5a576e69821259cc690f8cccedd08dc94","allowP2P":true}]} +``` +Main difference here with public channels is how the topic is calculated **[TODO DEFINE HOW'S CALUCULATED]** + + +##### Send first message with my contact information (shh_post) +``` +{"jsonrpc":"2.0","id":880,"method":"shh_post","params":[{"sig":"0x046f29b16371c05880c3da0279c7b8f958f97be79e00ca2a8f9e951eb254ccf8ead793af564a66c952668ad9e6e8f6dac5773bd1087d87273ebcece8da03420085","pubKey":"","payload":"... +``` +Where the decrypted payload looks like : +``` +["~#c1",["0xcfbb3e7c45ced993287039e9a3aa37d15d6c2f80ba2599e07ee53520f239d4d1","0x6c0b63af",["~#c2",["","data:image/png;base64,......","b5b16e93dbd4bbcb2448b98bfbb9e0062ea18603",null]]]] +``` + + +### Accept new contact + +**[ TBD ]** diff --git a/ideas/146-status-go-sdk/PrivateChannels.md b/ideas/146-status-go-sdk/PrivateChannels.md new file mode 100644 index 0000000..af0f5d4 --- /dev/null +++ b/ideas/146-status-go-sdk/PrivateChannels.md @@ -0,0 +1,19 @@ +## Private channels + +Interacting with private channels is complex than public channels as + + +### Ability to publish messages on private groups +**[ TBD ]** + +### Ability to subscribe to private groups +**[ TBD ]** + +### Ability to unsubscribe from a private groups +**[ TBD ]** + +### Documented API for private groups interaction. +**[ TBD ]** + +### Working examples for private groups interaction. +**[ TBD ]** diff --git a/ideas/146-status-go-sdk/Milestone2_PublicChannels.md b/ideas/146-status-go-sdk/PublicChannels.md similarity index 96% rename from ideas/146-status-go-sdk/Milestone2_PublicChannels.md rename to ideas/146-status-go-sdk/PublicChannels.md index 66cc08f..8875253 100644 --- a/ideas/146-status-go-sdk/Milestone2_PublicChannels.md +++ b/ideas/146-status-go-sdk/PublicChannels.md @@ -1,4 +1,4 @@ -## Milestone 2: Public channels interaction +## Public channels Public channels interaction is about how the developer will be interacting with public channels. diff --git a/ideas/146-status-go-sdk/README.md b/ideas/146-status-go-sdk/README.md index d4c6f7b..27d5160 100644 --- a/ideas/146-status-go-sdk/README.md +++ b/ideas/146-status-go-sdk/README.md @@ -105,7 +105,7 @@ Testing Days required: TBD ## Success Metrics -#### Milestone 1: [Status messaging basic interaction](Milestone1_BasicSDK.md) +#### Milestone 1: [Status messaging basic interaction](BasicSDK.md) - [ ] Setup a new connection - [ ] Ability to close a specific connection - [ ] Ability to change connection configuration @@ -113,7 +113,11 @@ Testing Days required: TBD - [ ] Ability to login as a specific account - [ ] Documented API for basic sdk interaction -#### Milestone 2: [Public channels interaction](Mileston2_PublicChannels.md) +### Milestone 2: [Contact management](ContactManagement.md) + - [ ] Invite new contact + - [ ] Accept new contact + +#### Milestone 3: [Public channels interaction](PublicChannels.md) - [ ] Ability to join public channels - [ ] Ability to publish messages on public channels - [ ] Ability to subscribe to public channels @@ -121,21 +125,21 @@ Testing Days required: TBD - [ ] Documented API for public channels interaction. - [ ] Working examples for public channel interaction. -#### Milestone 3: [Private groups interaction](Milestone3_PrivateChannels.md) - - [ ] Ability to publish messages on private groups - - [ ] Ability to subscribe to private groups - - [ ] Ability to unsubscribe from a private groups - - [ ] Documented API for private groups interaction. - - [ ] Working examples for private groups interaction. - -#### Milestone 4: 1 to 1 messages interaction +#### Milestone 4: [1 to 1 messages interaction](1to1Channels.md) - [ ] Ability to send 1 to 1 conversation - [ ] Ability to subscribe to 1 to 1 conversation - [ ] Ability to unsubscribe from a 1 to 1 conversation - [ ] Documented API for 1 to 1 conversations - [ ] Working examples for 1 to 1 conversations -#### Milestone 5: Extra methods +#### Milestone 5: [Private groups interaction](PrivateChannels.md) + - [ ] Ability to publish messages on private groups + - [ ] Ability to subscribe to private groups + - [ ] Ability to unsubscribe from a private groups + - [ ] Documented API for private groups interaction. + - [ ] Working examples for private groups interaction. + +#### Milestone 6: Extra methods - [ ] Ability to recover your account - [ ] Ability to log out.