- Accounts
- create
- privateKeyToAccount
- signTransaction
- recoverTransaction
- hashMessage
- sign
- recover
- encrypt
- decrypt
- provider,
object
- providerOpts,
object
, options
Accounts constructor
instance member
- entropy,
object
, hex buffer or string - returns
object
Create Account using randomized data
instance member
- privateKey,
object
, hex buffer or string - returns
object
Get an account by providing a private key
instance member
- tx,
object
- tx.nonce,
number
, optional - tx.to,
string
, optional - tx.value,
number
, optional - tx.data,
buffer
, optional - tx.timestamp,
number
, optional - tx.gas,
number
, nrg in aion terms - tx.gasPrice,
number
, nrg price, optional - tx.type,
number
, defaults to 0x01, for future use, optional - privateKey,
buffer
- done,
function
- returns
object
promise
Sign a transaction object with a private key.
The timestamp is specific to Aion. It's calculated automatically
from Math.floor(Date.now() / 1000)
.
instance member
- rawTx,
string
- returns
string
Given a signature it will recover the Aion address.
instance member
- message,
string
- returns
buffer
blake2b256 hash
Hashed Aion signed message with preamble
instance member
- message,
string
- privateKey,
buffer
- returns
object
contains message, messageHash, signature
Sign the message with account address and message signature
instance member
- message,
object|string
- signature,
string|buffer
- returns
string
the signing address
The Aion address is the first 64 bytes of the signature
instance member
- privateKey,
buffer
- password,
string|Buffer
- options,
object
- options.kdf,
string
, pbkdf2 or scrypt - options.salt,
buffer
, optional - options.iv,
buffer
, initialization vector, optional - options.dklen,
number
, key length bytes, optional - options.c,
number
, pbkdf2 c variable, optional - options.n,
number
, scrypt n variable, optional - options.r,
number
, scrypt r variable, optional - options.p,
number
, scrypt p variable, optional - options.scryptProgress,
function
, arguments (current, total, percent), optional - options.cipher,
number
, algorithm, optional - options.uuid,
number
, random bytes for id, optional - returns
object
Encrypt an account to keystore v3 format
instance member
- ksv3,
object
- password,
string
- nonStrict,
boolean
- returns
object
account
Decrypt the keystorev3 object