0.20.1 • Published 4 days ago

@tonomy/tonomy-id-sdk v0.20.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 days ago

Tonomy ID SDK

The Software Development Kit is used in the Tonomy ID ecosystems to interact with Tonomy identities and services.

See https://docs.tonomy.foundation for documentation.

The SDK is written in typescript with jest to run tests.

Dependencies

  • Linux debian distribution (Ubuntu 20.0.4 LTS used)
  • Nodejs v18.12.1+ suggested installed with nvm

Integration tests:

Documentation:

Sub-Repositories

  • Contracts (inside SDK repo) - Smart contracts to run the governance, identity, DAO, token and other ecosystem tools. This is used to run the integration tests
  • Communication (inside SDK repo) - Service to provide peer-to-peer messaging for Tonomy ID users. This is used to run the integration tests

Build

yarn run build

Build notes:

  • Build just the sdk yarn run build:sdk
  • Build just the cli yarn run build:cli
    • Cli has dependency of argon2 package, which is not needed by SDK and should be moved to a devDependency if these softwares are ever separated.

Run

yarn start

This builds to /build and runs the project in watch mode so any edits you save inside src causes a rebuild to /build.

To do a one-off build, use yarn run build.

Tests

To show logs during tests export LOG=true

Unit tests

Tests individual class and function logic within the SDK.

yarn test:unit

Integration tests

Tests end-to-end functions across more than one service.

First run the blockchain or Tonomy Communication service locally.

yarn run test:setup

Then run the tests

yarn run test:integration

Governance tests

Tests the governance of the system. Can only be run once before a blockchain reset is required.

First run the blockchain or Tonomy Communication service locally.

yarn run test:setup

Then run the tests

yarn run test:governance

Run all tests in the VS Code debugger

Make sure you install the Jest extension (recommended automatically when you open VS Code)

If you also want to do this with the integration tests then run yarn run test:setup first

Then go to any test e.g. test/app.test.ts and you can click ▶️ or right click and press "Debug test". You can also look at the Jest Test Explorer in the left-side activity bar.

Command line interface

yarn run cli

Bootstrapping

yarn run cli bootstrap

Environment variables are required to bootstrap the network. These values are provided by default in test and develpment environments but must be provided externally for non-dev environments:

  • TONOMY_OPS_PRIVATE_KEY: the private key of the operations account that will be used for the tonomy@active account.
  • TONOMY_BOARD_PUBLIC_KEYS: the public keys (in JSON array format) of the network governance multi-signature account that controls governance operations
  • TONOMY_TEST_ACCOUNTS_PASSPHRASE: the passphrase that will be used for the App store test user and demo app users

Linting

Linting is done with eslint. Install the recommended VS Code plugin to see markers in your code.

yarn run lint

Error handling

See errors.ts. All errors have a registered unique enumeration code.

Documentation

Documentation is in the ./docs folder and runs with mkdocs with material theme.

Install with

sudo apt-get -y install mkdocs
pip install mkdocs-material

Then yarn run docs:serve

0.20.1

4 days ago

0.20.1-rc.1

4 days ago

0.20.0

9 days ago

0.19.0-rc.3

9 days ago

0.20.0-rc.1

9 days ago

0.19.0

1 month ago

0.19.0-rc.1

1 month ago

0.19.0-rc.2

1 month ago

0.18.0-rc.2

4 months ago

0.18.0-rc.1

4 months ago

0.18.0

6 months ago

0.13.0

10 months ago

0.17.0

6 months ago

0.14.0

9 months ago

0.14.1

9 months ago

0.15.0

8 months ago

0.16.0

7 months ago

1.1.0-development.5

11 months ago

1.1.0-development.4

11 months ago

1.1.0-development.3

11 months ago

1.1.0-development.2

11 months ago

0.9.1-development.1

11 months ago

0.12.0-feature.1

11 months ago

1.1.0-development.1

11 months ago

1.1.4-development.4

11 months ago

0.11.0

11 months ago

0.9.1

11 months ago

1.1.0-feature.1

11 months ago

1.1.2-development.4

11 months ago

0.12.0

11 months ago

0.10.0

11 months ago

1.1.3-development.4

11 months ago

0.5.0

11 months ago

0.7.0

11 months ago

0.8.0

11 months ago

0.6.0

11 months ago

0.3.53

12 months ago

0.3.52

1 year ago

0.3.51

1 year ago

0.3.50

1 year ago

0.3.54

12 months ago

0.3.49

1 year ago

0.3.48

1 year ago

0.3.47

1 year ago

0.3.46

1 year ago

0.3.45

1 year ago

0.4.4

11 months ago

0.4.3

12 months ago

0.3.42

1 year ago

0.3.41

1 year ago

0.3.40

1 year ago

0.3.44

1 year ago

0.3.43

1 year ago

0.3.31

1 year ago

0.3.30

1 year ago

0.3.9

1 year ago

0.3.39

1 year ago

0.3.17

1 year ago

0.3.38

1 year ago

0.3.16

1 year ago

0.3.37

1 year ago

0.3.15

1 year ago

0.3.36

1 year ago

0.3.14

1 year ago

0.3.35

1 year ago

0.3.13

1 year ago

0.3.34

1 year ago

0.3.12

1 year ago

0.3.33

1 year ago

0.3.11

1 year ago

0.3.32

1 year ago

0.3.10

1 year ago

0.3.29

1 year ago

0.3.20

1 year ago

0.3.28

1 year ago

0.3.27

1 year ago

0.3.26

1 year ago

0.3.25

1 year ago

0.3.24

1 year ago

0.3.23

1 year ago

0.3.22

1 year ago

0.3.21

1 year ago

0.2.1

1 year ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.6

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.2

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.0

1 year ago

1.0.0

1 year ago