Connex ![Gitter](https://badges.gitter.im/vechain/thor.svg)
![npm version](https://badge.fury.io/js/%40vechain%2Fconnex.svg)
Introduction
Connex is the standard interface to connect DApp with VeChain and user. Connex
is a set of well-designed APIs for developers, with injected Connex Object
in web applications they can easily build decentralized applications.
Get Started
Sync or other compatible clients will expose connex
API by an injected object on Window Object
.
TypeScript(Recommended)
npm install @vechain/connex --save-dev
Add @vechain/connex
to compilerOptions.types
in tsconfig.json
then you are good to go!
Vanilla JS
No need to set up, just code in your favourite way.
Usage
const el = document.createElement('h1')
if(window.connex){
const status = connex.thor.status
el.innerText = 'You are \'connexed\' to vechain, the status is ' + (status.progress === 1 ? 'synced': 'syncing')
}else{
el.innerText = ':( seems you don\'t have enough component to launch this app, please ......'
}
document.querySelector('body').append(el)
Developers
Architecture explained
![Connex Architecture](https://github.com/vechain/connex/raw/HEAD/./docs/architecture.png)
Compatible clients
License
Connex is licensed under the
GNU Lesser General Public License v3.0, also included
in LICENSE file in the repository.