MCPcopy Create free account
hub / github.com/bitpay/bitcore / isPrivKeyEncrypted

Method isPrivKeyEncrypted

packages/bitcore-wallet-client/src/lib/key.ts:389–396  ·  view source on GitHub ↗
(algo?: KeyAlgorithm)

Source from the content-addressed store, hash-verified

387 };
388
389 isPrivKeyEncrypted(algo?: KeyAlgorithm) {
390 switch (String(algo).toUpperCase()) {
391 case (Constants.ALGOS.EDDSA):
392 return !!this.#xPrivKeyEDDSAEncrypted && !this.#xPrivKeyEDDSA;
393 default:
394 return !!this.#xPrivKeyEncrypted && !this.#xPrivKey;
395 }
396 };
397
398 checkPassword(password: string, algo?: KeyAlgorithm) {
399 if (this.isPrivKeyEncrypted(algo)) {

Callers 7

checkPasswordMethod · 0.95
getMethod · 0.95
signMethod · 0.95
exportMethod · 0.80
isWalletEncryptedMethod · 0.80
key.test.tsFile · 0.80
encryptMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected