org.bitcoinj.wallet.Wallet.isWatching()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.bitcoinj.wallet.Wallet.isWatching()方法的一些代码示例,展示了Wallet.isWatching()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wallet.isWatching()方法的具体详情如下:
包路径:org.bitcoinj.wallet.Wallet
类名称:Wallet
方法名:isWatching

Wallet.isWatching介绍

[英]Returns whether this wallet consists entirely of watching keys (unencrypted keys with no private part). Mixed wallets are forbidden.
[中]返回此钱包是否完全包含监视密钥(未加密密钥,没有私人部分)。禁止混合钱包。

代码示例

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

if (crypter != null)
  builder.append("Encryption: ").append(crypter).append('\n');
if (isWatching())
  builder.append("Wallet is watching.\n");

代码示例来源:origin: fr.acinq/bitcoinj-core

if (crypter != null)
  builder.append("Encryption: ").append(crypter).append('\n');
if (isWatching())
  builder.append("Wallet is watching.\n");

代码示例来源:origin: greenaddress/GreenBits

if (crypter != null)
  builder.append("Encryption: ").append(crypter).append('\n');
if (isWatching())
  builder.append("Wallet is watching.\n");

代码示例来源:origin: HashEngineering/dashj

if (crypter != null)
  builder.append("Encryption: ").append(crypter).append('\n');
if (isWatching())
  builder.append("Wallet is watching.\n");

代码示例来源:origin: greenaddress/GreenBits

@Test
public void isWatching() {
  assertFalse(wallet.isWatching());
  Wallet watchingWallet = Wallet.fromWatchingKey(PARAMS, wallet.getWatchingKey().dropPrivateBytes().dropParent());
  assertTrue(watchingWallet.isWatching());
  wallet.encrypt(PASSWORD1);
  assertFalse(wallet.isWatching());
}

相关文章

微信公众号

最新文章

更多

Wallet类方法