From fe00a6018340735e7c42b884ae06e2035e731ca7 Mon Sep 17 00:00:00 2001
From: Pierre Balzack <96387156+balzack@users.noreply.github.com>
Date: Thu, 29 Aug 2024 13:26:54 -0700
Subject: [PATCH] Update README.md
---
app/sdk/README.md | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/app/sdk/README.md b/app/sdk/README.md
index c5438f00..895bb329 100644
--- a/app/sdk/README.md
+++ b/app/sdk/README.md
@@ -1,4 +1,4 @@
-!!! still a work in progress !!!
+d!!! still a work in progress !!!
DatabagClientSDK provides a typescript interface for communication over the decentralized databag network. The SDK has minimal dependencies and contains reference applications for react-js, react-native, and node.
@@ -9,10 +9,12 @@ The API is provided through a set of interfaces; each interface groups methods b
The SDK must first be allocated
+
+
The crypto and log params are provided by implementing the [Crypto](https://github.com/balzack/databag/blob/sdk/app/sdk/src/crypto.ts) and [Logging](https://github.com/balzack/databag/blob/sdk/app/sdk/src/logging.ts) interface respectively.
```DatabacgClientSDK(crypto?: Crypto, log?: Logging)```
-
+
@@ -20,6 +22,8 @@ The crypto and log params are provided by implementing the [Crypto](https://gith
Account communcation is provided through the Session interface
+
+
Login provides a Session through an account login
```DatabacgClientSDK::login(handle: string, password: string, node: string, secure: boolean, mfaCode: string | null, params: SessionParams): Promise```
@@ -51,11 +55,11 @@ Mobile apps typically use the offline store where most of the relational data is
```DatabacgClientSDK::initOfflineStore(sql: SqlStore): Promise```
-Browser apps typically the online store where minimal session data is saved. The web param is provided by implementing the [WebStore](https://github.com/balzack/databag/blob/sdk/app/sdk/src/store.ts) interface.
+Browser apps typically use the online store where minimal session data is saved. The web param is provided by implementing the [WebStore](https://github.com/balzack/databag/blob/sdk/app/sdk/src/store.ts) interface.
```DatabacgClientSDK::initOnlineStore(web: WebStore): Promise```
-
+
@@ -63,21 +67,25 @@ Browser apps typically the online store where minimal session data is saved. The
Admin communcation is provided through the Node interface
+
+
Configure allocates the Node interface for the server
```DatabacgClientSDK::configure(node: string, secure: boolean, token: string, mfaCode: string | null): Promise```
+
-
Bot communication is provided through the Bot interface
-
+
+
Automate allocates the Bot interface for ia specific communication channel
```DatabacgClientSDK::automate(node: string, secure: boolean, token: string): Promise```
+
@@ -87,7 +95,9 @@ Automate allocates the Bot interface for ia specific communication channel
Session provides the core functionality and provides access to all user interface modules
-
+
+
+
Account Settings are managed through the Settings interface
```Session::getSettings(): Settings```
@@ -130,6 +140,8 @@ Automate allocates the Bot interface for ia specific communication channel
```Session::addStatusListener(ev: (status: string) => void): void```
```Session::removeStatusListener(ev: (status: string) => void): void```
+
+
@@ -137,7 +149,9 @@ Automate allocates the Bot interface for ia specific communication channel
Settings interface module manages the account access settings
-
+
+
+
The login and password for the account can be changed through the setLogin method
```Settings::setLogin(username: string, password: string): Promise```
@@ -194,6 +208,8 @@ Automate allocates the Bot interface for ia specific communication channel
```Settings::addConfigListener(ev: (config: Cofnig) => void): void```
```Settings::removeConfigListener(ev: (config: Config) => void): void```
+
+
@@ -202,6 +218,8 @@ Automate allocates the Bot interface for ia specific communication channel
Identity interface module manages the account profile
+
+
The text details of the profile are set with setProfileData
```Identity::setProfileData(name: string, location: string, description: string): Promise```
@@ -218,6 +236,8 @@ Automate allocates the Bot interface for ia specific communication channel
```Identity::addProfileListener(ev: (profile: Profile) => void): void```
```Identity::removeProfileListener(ev: (profile: Profile) => void): void```
+
+