loadAddress

loadAddress()
loadAddress(filename)
loadAddress({ options.name, options.paths, options.dir })

This function locates and reads a keystore file, and instantiates an Address from it.

Node

filename must be an absolute path, or begin with path.sep, ‘.’ + path.sep, or ‘..’ + path.sep.

Arguments
  • filename (string()) – The keystore filename

  • options.name (string()) – The keystore label or filename.

  • options.paths (string[]()) – Override the default keystore directory search path (Node.js Only). This must be a complete pathname.

  • options.dir (string()) – Override paths.

Return type

An instance of LoadAddressReturn().

class LoadAddressReturn()

The return object from loadAddress().

LoadAddressReturn.address

An instance of the address loaded.

LoadAddressReturn.safe

True when the file was loaded from a safe path (permissions checks).The safe flag is set to true to indicate that the Keystore file was stored safely; this happens if and only if the following conditions are true:

  1. The containing directory and all its ancestors, up to and including the root directory, is not world-writable.

  2. The Keystore File is neither world-writable nor world-readable.

LoadAddressReturn.filename

The name of the file that was loaded.