Skip to content
Snippets Groups Projects
Commit 53f7b11c authored by Jemimah Omodior's avatar Jemimah Omodior
Browse files

Add NewClientFromBackup()

parent 4a6f73a6
No related branches found
No related tags found
1 merge request!8Add NewClientFromBackup() to API Quick Reference
......@@ -112,6 +112,15 @@ func NewClient(ndfJSON, storageDir string, password []byte,
`NewClient` creates client storage, generates keys, connects, and registers with the network. Note that this does not register a username/identity, but merely creates a new cryptographic identity for adding such information at a later date.
### func NewClientFromBackup
```go
func NewClientFromBackup(ndfJSON, storageDir string, sessionPassword,
backupPassphrase []byte, backupFileContents []byte) ([]*id.ID, string, error)
```
`NewClientFromBackup` constructs a new client from an encrypted backup. The backup is decrypted using the `backupPassphrase`. On successful client creation, the function will return a JSON encoded list of the E2E partners contained in the backup and a json-encoded string containing parameters stored in the backup.
### func NewPrecannedClient
```go
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment