Update "Getting Started"
Compare changes
+ 206
− 185
@@ -96,13 +96,10 @@ import (
@@ -132,40 +129,45 @@ Here is how we have set up `NewClient()` in our messaging app:
1. You need to get an NDF, which you may already have from the [*Download an NDF*](#download-an-ndf) step. In the code above, we attempt to read from a file first, then try to download the release NDF with`DownloadAndVerifySignedNdfWithUrl()`, which dynamically downloads the NDF data a client needs from a specified URL. It takes two arguments:
1. You need to get an NDF, which you may already have from the [*Download an NDF*](#download-an-ndf) step. In the code above, we attempt to read from a file first, then try to download the mainnet NDF with`DownloadAndVerifySignedNdfWithUrl()`, which dynamically downloads the NDF data a client needs from a specified URL. It takes two arguments:
@@ -173,7 +175,7 @@ There are multiple URL/certificate pairs associated with different environments.
@@ -201,11 +203,11 @@ The `Login()` function expects the same session directory and password used to c
@@ -236,7 +238,7 @@ receiverChannel := make(chan message.Receive, 10000)
@@ -273,14 +275,16 @@ func (c *Client) StartNetworkFollower(timeout time.Duration) error
@@ -288,11 +292,11 @@ waitUntilConnected := func(connected chan bool) {
@@ -300,7 +304,7 @@ waitUntilConnected := func(connected chan bool) {
@@ -319,13 +323,29 @@ import (
In summary, `StartNetworkFollower()` kicks off tracking of the network. It starts long-running threads and returns an object for checking state and stopping those threads. However, since these threads may become a significant drain on device batteries when offline, you will want to ensure they are stopped if there is no internet access.
@@ -340,10 +360,10 @@ me := client.GetUser().GetContact()
@@ -380,11 +400,11 @@ type Contact struct {
@@ -393,10 +413,10 @@ recipientID := recipientContact.ID
@@ -408,7 +428,7 @@ To generate a contact file (such as `user-contact.json` above) via the CLI, use
Note that when duplicating folders to create multiple client instances locally, you need to ensure you are not also copying over contact files and session folders. You can comfortably delete session folders since each new `NewClient()` call will generate new cryptographic identities, but only if there isn't an existing session.
@@ -434,10 +454,8 @@ Here is an example showing how to register a handler that simply prints the user
@@ -449,11 +467,12 @@ authManager.AddGeneralRequestCallback(printChanRequest)
@@ -461,22 +480,22 @@ confirmChanRequest := func(requestor contact.Contact, message string) {
@@ -494,7 +513,7 @@ Sending encrypted payloads requires an authenticated channel to be established b
@@ -507,11 +526,11 @@ paramsE2E := params.GetDefaultE2E()
@@ -609,10 +628,6 @@ import (
@@ -620,44 +635,49 @@ func main() {
@@ -666,128 +686,129 @@ if err != nil {