protected Wallet createWallet() { KeyChainGroup kcg; if (restoreFromSeed != null) kcg = new KeyChainGroup(params, restoreFromSeed, useSegwit); else kcg = new KeyChainGroup(params, useSegwit); if (walletFactory != null) { return walletFactory.create(params, kcg); } else { return new Wallet(params, kcg); // default } }
public org.bitcoinj.wallet.Protos.PeerAddress build() { org.bitcoinj.wallet.Protos.PeerAddress result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public final boolean isInitialized() { for (int i = 0; i < getBroadcastByCount(); i++) { if (!getBroadcastBy(i).isInitialized()) { return false; } } return true; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.Script other) { if (other == org.bitcoinj.wallet.Protos.Script.getDefaultInstance()) return this; if (other.hasProgram()) { setProgram(other.getProgram()); } if (other.hasCreationTimestamp()) { setCreationTimestamp(other.getCreationTimestamp()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.EncryptedData other) { if (other == org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) return this; if (other.hasInitialisationVector()) { setInitialisationVector(other.getInitialisationVector()); } if (other.hasEncryptedPrivateKey()) { setEncryptedPrivateKey(other.getEncryptedPrivateKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key. A * watching key corresponds to account zero in the recommended BIP32 key hierarchy. */ public static Wallet fromWatchingKey(NetworkParameters params, DeterministicKey watchKey) { return new Wallet(params, new KeyChainGroup(params, watchKey)); }
public org.bitcoinj.wallet.Protos.Transaction build() { org.bitcoinj.wallet.Protos.Transaction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <code>required bytes data = 2;</code> */ public Builder clearData() { bitField0_ = (bitField0_ & ~0x00000002); data_ = getDefaultInstance().getData(); onChanged(); return this; }
public org.bitcoinj.wallet.Protos.Script build() { org.bitcoinj.wallet.Protos.Script result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <code>required bytes program = 1;</code> */ public Builder clearProgram() { bitField0_ = (bitField0_ & ~0x00000001); program_ = getDefaultInstance().getProgram(); onChanged(); return this; }
public org.bitcoinj.wallet.Protos.TransactionInput build() { org.bitcoinj.wallet.Protos.TransactionInput result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public org.bitcoinj.wallet.Protos.Tag build() { org.bitcoinj.wallet.Protos.Tag result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public org.bitcoinj.wallet.Protos.TransactionSigner build() { org.bitcoinj.wallet.Protos.TransactionSigner result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.<p> * * Equivalent to <tt>walletToProto(wallet).writeTo(output);</tt> */ public void writeWallet(Wallet wallet, OutputStream output) throws IOException { Protos.Wallet walletProto = walletToProto(wallet); walletProto.writeTo(output); }
@Override public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed, KeyCrypter crypter, boolean isMarried) { DeterministicKeyChain chain; if (isMarried) chain = new MarriedKeyChain(seed, crypter); else chain = new DeterministicKeyChain(seed, crypter); return chain; }
/** * Convenience wrapper for <tt>setCoinSelector(Wallet.AllowUnconfirmedCoinSelector.get())</tt>. If this method * is called on the wallet then transactions will be used for spending regardless of their confidence. This can * be dangerous - only use this if you absolutely know what you're doing! */ public void allowSpendingUnconfirmedTransactions() { setCoinSelector(AllowUnconfirmedCoinSelector.get()); }
protected Wallet createWallet() { KeyChainGroup kcg; if (restoreFromSeed != null) kcg = new KeyChainGroup(params, restoreFromSeed); else kcg = new KeyChainGroup(params); if (walletFactory != null) { return walletFactory.create(params, kcg); } else { return new Wallet(params, kcg); // default } }
protected Wallet createWallet() { KeyChainGroup kcg; if (restoreFromSeed != null) kcg = new KeyChainGroup(params, restoreFromSeed); else kcg = new KeyChainGroup(params); if (walletFactory != null) { return walletFactory.create(params, kcg); } else { return new Wallet(params, kcg); // default } }
protected Wallet createWallet() { KeyChainGroup kcg; if (restoreFromSeed != null) kcg = new KeyChainGroup(params, restoreFromSeed); else kcg = new KeyChainGroup(params); if (walletFactory != null) { return walletFactory.create(params, kcg); } else { return new Wallet(params, kcg); // default } }