Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Account

Hierarchy

  • Account

Index

Properties

address

address: Address

enc-alg

enc-alg: string = "aes-256-gcm"

encryptedKey

encryptedKey: PrivateKey

extra

extra: null

isDefault

isDefault: boolean

label

label: string

lock

lock: boolean

publicKey

publicKey: string

salt

salt: string

Methods

toJson

  • toJson(): string

toJsonObj

  • toJsonObj(): any
  • Serializes to JSON object.

    Returned object will not be stringified.

    Returns any

Static create

  • Creates Account object encrypting specified private key.

    The account does not need to be registered on blockchain.

    Parameters

    • privateKey: PrivateKey

      Private key associated with the account

    • password: string

      Password use to encrypt the private key

    • Optional label: undefined | string

      Custom label

    • Optional params: ScryptParams

      Optional scrypt params

    Returns Account

Static importAccount

  • Import account

    Parameters

    • label: string

      Account's label

    • encryptedPrivateKey: PrivateKey

      Encrypted private key

    • password: string

      User's password to decrypt private key

    • address: Address

      Account's address

    • saltBase64: string

      Salt to decrypt

    • Optional params: ScryptParams

      Params used to decrypt

    Returns Account

Static parseJson

Static parseJsonObj

  • Deserializes JSON object.

    Object should be real object, not stringified.

    Parameters

    • obj: any

      JSON object

    Returns Account

Generated using TypeDoc