src/util.js
function openWallet(filename) {
  try {
    // Delete the cached copy of the wallet. This allows testing of list-wallets.
    delete require.cache[require.resolve(filename)]

    const walletInfo = require(filename)
    return walletInfo
  } catch (err) {
    throw new Error(`Could not open ${filename}`)
  }
}
function openWallet(filename) {
  try {
    // Delete the cached copy of the wallet. This allows testing of list-wallets.
    delete require.cache[require.resolve(filename)]

    const walletInfo = require(filename)
    return walletInfo
  } catch (err) {
    throw new Error(`Could not open ${filename}`)
  }
}
Open a wallet by file name.