Tonomy ID SDK
This Software Development Kit is used in Tonomy ID to interact and call with the EOSIO blockchain and services. It is also used as the public API for integration by applications to do single sign-on, share credentials and sign transactions.
The SDK is written in typescript with jest to run tests.
Dependencies
- Linux debian distribution (Ubuntu 20.0.4 LTS used)
- Nodejs v16.4.1+ suggested installed with nvm
Integration tests:
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
Run
npm start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
.
Tests
To run tests, use npm test
.
To run integration tests ./test-integration/build-and-run-tests.sh
Linting
Linting is done with eslint
. Install the recommended VS Code plugin to see markers in your code.
npm 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 readthedocs.io here
https://tonomy-id-sdk.readthedocs.io
To create a new App for SSO
Call
npx ts-node --project cli.tsconfig.json --transpileOnly id.ts appName username description logoUrl domain publicKey blockchainUrl
Example
npx ts-node --project cli.tsconfig.json --transpileOnly id.ts Netflix netflix "streaming video platform" "https://netflix.com/logo.png" "https://netflix.com" PUB_K1_55csjge6LNnLxECFTtTpCU6Z7chi3h47G8vyzPBjAKdvZmnZ8Z "http://localhost:8888"