From 0ccce5c87888f61dafed5a3853ea8b2ec6d1172f Mon Sep 17 00:00:00 2001 From: Charles Lanahan Date: Sat, 16 Nov 2024 18:56:14 -0500 Subject: [PATCH 1/4] Update README.md with simple example and ready() Added simple code example to get started and a note about calling the ready() function for the library to be usable. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 0ca1bf72..04a4fab2 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,20 @@ Typescript source files needs to be transpiled before running scripts or integra npm run build ``` +- ready() must be called before library is useable. Example minimum viable client code. + ```javascript + import { ready, SignifyClient, Tier } from 'signify-ts'; + + await ready(); + + const bran = '0'.repeat(21); + const url = 'http://127.0.0.1:3901'; + const boot_url = 'http://127.0.0.1:3903'; + const actualSignifyClient = new SignifyClient(url, bran, Tier.low, boot_url); + + console.log(actualSignifyClient) + ``` + ### Unit testing To run unit tests From d58ae430bb67dfb23384df072066c81d8aea44f5 Mon Sep 17 00:00:00 2001 From: Charles Lanahan Date: Sat, 16 Nov 2024 19:03:10 -0500 Subject: [PATCH 2/4] Prettier formatting fixes to README --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 04a4fab2..a67c3eb5 100644 --- a/README.md +++ b/README.md @@ -40,22 +40,29 @@ The code is built using Typescript and running code locally requires a Mac or Li Typescript source files needs to be transpiled before running scripts or integration tests - Build: + ```bash npm run build ``` -- ready() must be called before library is useable. Example minimum viable client code. +- ready() must be called before library is useable. Example minimum viable client code. + ```javascript import { ready, SignifyClient, Tier } from 'signify-ts'; await ready(); - + const bran = '0'.repeat(21); const url = 'http://127.0.0.1:3901'; const boot_url = 'http://127.0.0.1:3903'; - const actualSignifyClient = new SignifyClient(url, bran, Tier.low, boot_url); - - console.log(actualSignifyClient) + const actualSignifyClient = new SignifyClient( + url, + bran, + Tier.low, + boot_url + ); + + console.log(actualSignifyClient); ``` ### Unit testing From cb7663dc4165645523005eb27f7607867dd66f6b Mon Sep 17 00:00:00 2001 From: Charles Lanahan Date: Mon, 18 Nov 2024 09:29:48 -0500 Subject: [PATCH 3/4] Update README.md with randomPasscode randomPasscode added to example to make new users aware. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a67c3eb5..f9e2ecd5 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ Typescript source files needs to be transpiled before running scripts or integra - ready() must be called before library is useable. Example minimum viable client code. ```javascript - import { ready, SignifyClient, Tier } from 'signify-ts'; + import { randomPasscode, ready, SignifyClient, Tier } from 'signify-ts'; await ready(); - const bran = '0'.repeat(21); + const bran = randomPasscode(); // Shared secret with keria const url = 'http://127.0.0.1:3901'; const boot_url = 'http://127.0.0.1:3903'; const actualSignifyClient = new SignifyClient( From 458b2900ec55137e231ed0aede5491bd9c366680 Mon Sep 17 00:00:00 2001 From: Charles Lanahan Date: Mon, 18 Nov 2024 10:01:12 -0500 Subject: [PATCH 4/4] Update README.md removed erroneous comment. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9e2ecd5..baf740f3 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Typescript source files needs to be transpiled before running scripts or integra await ready(); - const bran = randomPasscode(); // Shared secret with keria + const bran = randomPasscode(); const url = 'http://127.0.0.1:3901'; const boot_url = 'http://127.0.0.1:3903'; const actualSignifyClient = new SignifyClient(