EXPERIMENTAL VERSION - Don't use on production
dapp.js is a JavaScript library & framework that provides a single, common abstraction interface of smart-contracts. Framework makes easy to build applications on top of Ethereum decentralized applications (DApps).
- Works out-of-the-box
- Minimalistic, human-friendly API
- Provider-library agnostic - currently supported web3.js 1.x (default) and ethjs (planned: ethers.js)
- Basic services included in the standart library -
ens
,erc20
.. show all - Command-line interface (CLI)
Use NPM to install library:
npm install opencrypto-io/dapp.js
Include it:
const DApp = require('dapp.js')
Example:
const DApp = require('dapp.js')
const client = new DApp.client()
const service = await client.service('price-feed')
const value = await service.get('0x729D19f657BD0614b4985Cf1D82531c67569197B')
console.log('Current ETH/USD price:', value)
Or you can use promises:
client.service('price-feed').then(service => {
service.get('0x729D19f657BD0614b4985Cf1D82531c67569197B')
.then(value => console.log('Current ETH/USD price:', value))
})
Id | Name | Status |
---|---|---|
eth | Ethereum core functions | in progress |
ens | Ethereum Name System (ENS) | in progress |
erc20 | ERC-20 Tokens | in progress |
ds-value | DSValue (DAppHub) | in progress |
dai | Dai Stablecoin System | in progress |
price-feed | Price Feed (MakerDAO) | in progress |
medianizer | Medianizer (MakerDAO) | planned |
weth | WETH Token | planned |
oasis | OasisDEX (decentralized exchange) | planned |
0x | 0x Protocol | planned |
npm i -g opencrypto-io/dapp.js # Install CLI via NPM
dapp-cli -l # List available services
dapp-cli -h # Show help
dapp-cli ens lookup apt-get.eth # Use 'ens' module for ENS lookup
dapp-cli ./your_service [..] # Use your own service
Please follow dapp.js-cli for more informations.
- Jan Stránský <[email protected]>
MIT