Authereum
  • Introduction
  • Getting started
  • Live demos
  • Dapps using Authereum
  • Install
  • Integration
  • Web3 provider
  • Ethers Signer
  • StarkWare Provider
  • SDK
  • API Keys
  • Batched transactions
  • Verifying signatures
  • Testing
  • Browser compatibility
  • Contributing
  • Bug reports
  • FAQ
  • Dictionary
  • On the Web
  • Telegram Admins
  • Assets
Powered by GitBook
On this page

Was this helpful?

Getting started

Get started with Authereum using a few lines of code

PreviousIntroductionNextLive demos

Last updated 5 years ago

Was this helpful?

To get started, install the 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 .

authereum
web3 provider examples
Web3 provider