Skip to content

Instantly share code, notes, and snippets.

@tcrowe
Last active October 9, 2018 20:48
Show Gist options
  • Select an option

  • Save tcrowe/943e4f082abfe2133cd9a15f220e5fc3 to your computer and use it in GitHub Desktop.

Select an option

Save tcrowe/943e4f082abfe2133cd9a15f220e5fc3 to your computer and use it in GitHub Desktop.
Create Aion account with JavaScript

Try this branch until it's released https://github.com/aionnetwork/aion_web3/tree/v1.0

Install the 1.0 branch

npm install aionnetwork/aion_web3#v1.0

In your JS file:

let Web3 = require('aion-web3')
let client = new Web3(new Web3.providers.HttpProvider('http://127.0.0.1'))
let account = client.eth.accounts.create()
console.log('account.address', account.address)
console.log('account.privateKey', account.privateKey)

Related eth docs https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment