Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with simple example and ready() #291

Merged
merged 6 commits into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,31 @@ 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.

```javascript
import { randomPasscode, ready, SignifyClient, Tier } from 'signify-ts';

await ready();

const bran = randomPasscode();
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
Expand Down
Loading