UNPKG

bitcoin-cli-ts

Version:

Auto-generated Bitcoin client library for bitcoind JSON-RPC API

26 lines (25 loc) 1.23 kB
"use strict"; // Auto synced from github actions. Don't change this file Object.defineProperty(exports, "__esModule", { value: true }); exports.encryptWallet = void 0; var tslib_1 = require("tslib"); var rpc_request_1 = tslib_1.__importDefault(require("../../rpc-request")); /** * encryptwallet "passphrase" * * Encrypts the wallet with 'passphrase'. This is for first time encryption. * After this, any calls that interact with private keys such as sending or signing * will require the passphrase to be set prior the making these calls. * Use the walletpassphrase call for this, and then walletlock call. * If the wallet is already encrypted, use the walletpassphrasechange call. * ** IMPORTANT ** * For security reasons, the encryption process will generate a new HD seed, resulting * in the creation of a fresh set of active descriptors. Therefore, it is crucial to * securely back up the newly generated wallet file using the backupwallet RPC. * */ function encryptWallet(params) { var bitcoind = params.bitcoind, methodParams = tslib_1.__rest(params, ["bitcoind"]); return (0, rpc_request_1.default)({ method: 'encryptwallet', params: methodParams }, bitcoind); } exports.encryptWallet = encryptWallet;