Getting started

Get started with Authereum using a few lines of code

To get started, install the authereum package from NPM:

npm install authereum 

Now instantiate Authereum with the desired network:

import Authereum from 'authereum'

const authereum = new Authereum('kovan')

If you're used to using Web3.js for your dapp, Authereum can be a drop-in replacement web3 provider.

import Authereum from 'authereum'
import Web3 from 'web3'

const authereum = new Authereum('kovan')

const provider = authereum.getProvider()
const web3 = new Web3(provider)

await provider.enable()

const accounts = await web3.eth.getAccounts()
console.log(accounts[0])

That's it!

You can make web3 calls as you normally would. Take a look at more web3 provider examples.

Last updated