Introduction
A TypeScript/JavaScript library for interacting with the Trustlines Protocol.
#
Installation#
Install via Package ManagerWe publish the trustlines-clientlib to npm as a ES6 module.
- npm
- yarn
#
Build from SourceIf you want to build the library from source run
This will create three different builds:
- ES6 module in
./lib-esm
- CommonJS module in
./lib
- Bundled JS injectable into browser in
./_bundles
#
Get startedWe assume the usage of the trustlines-clientlib
ES6 module in the following.
#
ConfigurationTo start using the trustlines-clientlib you first have to configure the relay server you want to connect to. You can either connect to a local develop relay server or use publicly available ones.
#
Example UsageThis library is a promise-based library. So every asynchronous call will return a native JavaScript promise. If an error occurs the library will throw it. The caller has to handle it appropriately.
#
Read our Documentation for More#
Run Tests#
Note on end2end TestsYou have to have all components of the trustlines protocol running. A convenient way to achieve this is by using our end2end setup.
#
Running injected web3 exampleTo run the example make sure to have MetaMask installed and connected to a JSON RPC.
This serves the injected web3 example app on http://127.0.0.1:8080
. You can find the app under ./examples/injected-web3
.
#
Change logSee CHANGELOG