loadKeystore
- wallet.loadKeystore(filename)
- wallet.loadKeystore({ options.name, options.paths, options.dir })
This function locates and reads a keystore file.
Node
filename must be an absolute path, or begin with path.sep, ‘.’ + path.sep, or ‘..’ + path.sep.
- Arguments
filename (
string()
) – The keystore filenameoptions.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
- class LoadKeystoreResult()
The return object from
wallet.loadKeystore()
.- LoadKeystoreResult.contents
The contents of the file
- LoadKeystoreResult.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:
The containing directory and all its ancestors, up to and including the root directory, is not world-writable.
The Keystore File is neither world-writable nor world-readable.
- LoadKeystoreResult.filename
The name of the file that was loaded.