mirror of https://github.com/status-im/swarms.git
[#IDEA-146] : 1st milestone fully defined
This commit is contained in:
parent
dd3ef87af8
commit
cb02aa0f63
|
@ -0,0 +1,60 @@
|
||||||
|
## Milestone 1: Basic SDK
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
|
||||||
|
### Setup a new connection
|
||||||
|
|
||||||
|
SDK should offer an **easy** but **configurable** way to setup the status node.
|
||||||
|
|
||||||
|
|
||||||
|
#### Connect
|
||||||
|
|
||||||
|
Connect method will create a new connection, attach the default configuration, and login with the provided password.
|
||||||
|
|
||||||
|
```
|
||||||
|
conn, err := sdk.Connect(username, password)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Ability to close a specific connection
|
||||||
|
|
||||||
|
In order to close all channels, sdk.Conn object should offer a `Close` method.
|
||||||
|
```
|
||||||
|
conn, err := sdk.Connect(username, password)
|
||||||
|
defer conn.Close()
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ability to change connection configuration
|
||||||
|
|
||||||
|
Even `Connect` method is suitable for almost all situations, some developers may want to customize statusNode configuration. To accomplish that, one can simply divide Connect method on its internal calls like:
|
||||||
|
```
|
||||||
|
cfg := sdk.DefaultConfig()
|
||||||
|
cfg.NodeConfig.WhisperConfig.MinimumPoW = 0.001
|
||||||
|
|
||||||
|
conn := sdk.New()
|
||||||
|
if err := conn.Start(cfg); err != nil {
|
||||||
|
panic("Couldn't connect to status")
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := conn.SignupOrLogin("username", "password"); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ability to sign up on the platform
|
||||||
|
|
||||||
|
`SignupOrLogin` method is provided so you can sign up as a specific user
|
||||||
|
|
||||||
|
```
|
||||||
|
if err := conn.Login("username", "password"); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Ability to login as a specific account
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Ability to log out.
|
|
@ -85,8 +85,12 @@ Description: <!-- Description of Deliverables-->
|
||||||
|
|
||||||
### Useful links & Dependencies
|
### Useful links & Dependencies
|
||||||
|
|
||||||
- https://github.com/mandrigin/status-go-bots — http://offsite.chat and #humans-need-not-apply bots.
|
- http://offsite.chat
|
||||||
- Pre-existing issue - https://github.com/status-im/ideas/issues/131
|
- [https://github.com/mandrigin/status-go-bots](#humans-need-not-apply bots)
|
||||||
|
- [Pre-existing issue](https://github.com/status-im/ideas/issues/131)
|
||||||
|
- [New protocol spec](https://docs.google.com/document/d/1Qh2h07T_qepzEJ7IytmxwIdQAOsGHrvhXwZxuZtbwgc/edit#)
|
||||||
|
- [transit-format](https://github.com/cognitect/transit-format)
|
||||||
|
|
||||||
|
|
||||||
### Blockers
|
### Blockers
|
||||||
New Status App communication protocol - https://github.com/status-im/ideas/issues/87
|
New Status App communication protocol - https://github.com/status-im/ideas/issues/87
|
||||||
|
@ -100,20 +104,14 @@ Testing Days required: TBD
|
||||||
|
|
||||||
## Success Metrics
|
## Success Metrics
|
||||||
|
|
||||||
#### Milestone 1: Basic SDK
|
#### [Milestone 1: Status messaging basic interaction](Milestone1_BasicSDK.md)
|
||||||
- [ ] Swarm participants identified
|
|
||||||
- [ ] Detailed specifications for each metric identified and documented
|
|
||||||
- [ ] User stories and project board setup
|
|
||||||
- [ ] Effort estimate and high-level schedule established
|
|
||||||
|
|
||||||
#### Milestone 2: Status messaging basic interaction
|
|
||||||
- [ ] Setup a new connection
|
- [ ] Setup a new connection
|
||||||
- [ ] Ability to close a specific connection
|
- [ ] Ability to close a specific connection
|
||||||
- [ ] Ability to change connection configuration
|
- [ ] Ability to change connection configuration
|
||||||
|
- [ ] Ability to sign up on the platform
|
||||||
- [ ] Ability to login as a specific account
|
- [ ] Ability to login as a specific account
|
||||||
- [ ] Ability to log out.
|
|
||||||
|
|
||||||
#### Milestone 3: Public channels interaction
|
#### Milestone 2: Public channels interaction
|
||||||
- [ ] Ability to join public channels
|
- [ ] Ability to join public channels
|
||||||
- [ ] Ability to publish messages on public channels
|
- [ ] Ability to publish messages on public channels
|
||||||
- [ ] Ability to subscribe to public channels
|
- [ ] Ability to subscribe to public channels
|
||||||
|
@ -121,20 +119,24 @@ Testing Days required: TBD
|
||||||
- [ ] Documented API for public channels interaction.
|
- [ ] Documented API for public channels interaction.
|
||||||
- [ ] Working examples for public channel interaction.
|
- [ ] Working examples for public channel interaction.
|
||||||
|
|
||||||
#### Milestone 4: Private groups interaction
|
#### Milestone 3: Private groups interaction
|
||||||
- [ ] Ability to publish messages on private groups
|
- [ ] Ability to publish messages on private groups
|
||||||
- [ ] Ability to subscribe to private groups
|
- [ ] Ability to subscribe to private groups
|
||||||
- [ ] Ability to unsubscribe from a private groups
|
- [ ] Ability to unsubscribe from a private groups
|
||||||
- [ ] Documented API for private groups interaction.
|
- [ ] Documented API for private groups interaction.
|
||||||
- [ ] Working examples for private groups interaction.
|
- [ ] Working examples for private groups interaction.
|
||||||
|
|
||||||
#### Milestone 5: 1 to 1 messages interaction
|
#### Milestone 4: 1 to 1 messages interaction
|
||||||
- [ ] Ability to send 1 to 1 conversation
|
- [ ] Ability to send 1 to 1 conversation
|
||||||
- [ ] Ability to subscribe to 1 to 1 conversation
|
- [ ] Ability to subscribe to 1 to 1 conversation
|
||||||
- [ ] Ability to unsubscribe from a 1 to 1 conversation
|
- [ ] Ability to unsubscribe from a 1 to 1 conversation
|
||||||
- [ ] Documented API for 1 to 1 conversations
|
- [ ] Documented API for 1 to 1 conversations
|
||||||
- [ ] Working examples for 1 to 1 conversations
|
- [ ] Working examples for 1 to 1 conversations
|
||||||
|
|
||||||
|
#### Milestone 5: Extra methods
|
||||||
|
- [ ] Ability to recover your account
|
||||||
|
- [ ] Ability to log out.
|
||||||
|
|
||||||
|
|
||||||
## Exit criteria:
|
## Exit criteria:
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
## SDK Iterations
|
|
||||||
|
|
||||||
|
|
||||||
### Protocol messages
|
|
||||||
|
|
||||||
[New protocol spec](https://docs.google.com/document/d/1Qh2h07T_qepzEJ7IytmxwIdQAOsGHrvhXwZxuZtbwgc/edit#) clearly defines all message types with examples. It's based on [transit-format](https://github.com/cognitect/transit-format), so it makes sense to evaluate its [go implementation](https://github.com/russolsen/transit)
|
|
||||||
|
|
||||||
Use cases:
|
|
||||||
|
|
||||||
### General
|
|
||||||
#### [ ] Message
|
|
||||||
|
|
||||||
##### Parameters:
|
|
||||||
- content: the content of the message (a map or a string for now)
|
|
||||||
- content-type: the content-type of the message
|
|
||||||
- message-type: the type of the message
|
|
||||||
- to-clock-value : the clock of the sender for message ordering
|
|
||||||
- timestamp: the timestamp of message
|
|
||||||
|
|
||||||
*Where does the destination/s of the message is defined?*
|
|
||||||
|
|
||||||
|
|
||||||
#### Private groups
|
|
||||||
|
|
||||||
##### [ ] NewGroupKey
|
|
||||||
|
|
||||||
- [ ] GroupAdminUpdate
|
|
||||||
- [ ] GroupLeave
|
|
||||||
|
|
||||||
#### Contact management
|
|
||||||
- [ ] NewContactKey
|
|
||||||
- [ ] ContactRequest
|
|
||||||
- [ ] ContactRequestConfirmed
|
|
||||||
- [ ] ContactUpdate
|
|
||||||
|
|
||||||
#### Not needed for first iteration
|
|
||||||
- [ ] Seen
|
|
||||||
|
|
||||||
|
|
||||||
##### Message
|
|
||||||
|
|
||||||
|
|
||||||
### Define final SDK UI based on different messages
|
|
Loading…
Reference in New Issue