Static Methods

create (name, privateKey, ?accountCreator)

Creates a fresh new account for a given name and private key

Defaults/Optionals:

  • accountCreator - Default Account

const eoslime = require('eoslime').init();

const name = "Account name";
const privateKey = "Account private key";

const account2 = await eoslime.Account.create(name, privateKey);

createFromName (name, ?accountCreator)

Creates a fresh new account for a given name

Defaults/Optionals:

  • accountCreator - Default Account

createRandom (?accountCreator)

Creates new random account

Defaults/Optionals:

  • accountCreator - Default Account

createRandoms (accountsCount, ?accountCreator)

Creates new random accounts

Defaults/Optionals:

  • accountCreator - Default Account

createEncrypted (password, ?accountCreator)

Create a new random account and encrypt it. Created account's data is encrypted and a cipherText is derived by encrypting privateKey::dataHash

Defaults/Optionals:

  • accountCreator - Default Account

fromEncrypted (encryptedAccount, password)

Decrypt an encrypted account. Decrypts cipherText and gets it's parts (privateKey and dataHash). The PrivateKey is merged with the other encryptedAccount properties into an object which after the merging is hashed. This hash is validated against the dataHash for correctness.

Last updated

Was this helpful?