diff --git a/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java index dc675862..20fe991d 100644 --- a/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java @@ -40,7 +40,7 @@ import static com.google.common.base.Preconditions.checkNotNull; * some local API or something else. *
*/ -public abstract class CustomTransactionSigner extends StatelessTransactionSigner { +public abstract class CustomTransactionSigner implements TransactionSigner { private static final Logger log = LoggerFactory.getLogger(CustomTransactionSigner.class); @Override diff --git a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java index 1f59b423..62e96e08 100644 --- a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java @@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory; * the same derivation path. *This signer always uses {@link Transaction.SigHash#ALL} signing mode.
*/ -public class LocalTransactionSigner extends StatelessTransactionSigner { +public class LocalTransactionSigner implements TransactionSigner { private static final Logger log = LoggerFactory.getLogger(LocalTransactionSigner.class); /** diff --git a/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java index dddba7c2..befde006 100644 --- a/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java @@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory; * In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException * for P2SH or MissingPrivateKeyException for other transaction types. */ -public class MissingSigResolutionSigner extends StatelessTransactionSigner { +public class MissingSigResolutionSigner implements TransactionSigner { private static final Logger log = LoggerFactory.getLogger(MissingSigResolutionSigner.class); public Wallet.MissingSigsMode missingSigsMode = Wallet.MissingSigsMode.USE_DUMMY_SIG; diff --git a/core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java deleted file mode 100644 index 393804bf..00000000 --- a/core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2014 Kosta Korenkov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.bitcoinj.signers; - -/** - * A signer that doesn't have any state to be serialized. - */ -public abstract class StatelessTransactionSigner implements TransactionSigner { - @Override - public void deserialize(byte[] data) { - } - - @Override - public byte[] serialize() { - return new byte[0]; - } -} diff --git a/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java index 33e8dd40..663f1bfa 100644 --- a/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java @@ -67,16 +67,6 @@ public interface TransactionSigner { */ boolean isReady(); - /** - * Returns byte array of data representing state of this signer. It's used to serialize/deserialize this signer - */ - byte[] serialize(); - - /** - * Uses given byte array of data to reconstruct internal state of this signer - */ - void deserialize(byte[] data); - /** * Signs given transaction's inputs. * Returns true if signer is compatible with given transaction (can do something meaningful with it). diff --git a/core/src/main/java/org/bitcoinj/wallet/Protos.java b/core/src/main/java/org/bitcoinj/wallet/Protos.java index 12fa8497..34eb5007 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Protos.java +++ b/core/src/main/java/org/bitcoinj/wallet/Protos.java @@ -13661,661 +13661,6 @@ public final class Protos { // @@protoc_insertion_point(class_scope:wallet.Tag) } - public interface TransactionSignerOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.TransactionSigner) - com.google.protobuf.MessageOrBuilder { - - /** - *required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - boolean hasClassName(); - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - java.lang.String getClassName(); - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - com.google.protobuf.ByteString - getClassNameBytes(); - - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - boolean hasData(); - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - com.google.protobuf.ByteString getData(); - } - /** - * Protobuf type {@code wallet.TransactionSigner} - * - *
- ** - * Data required to reconstruct TransactionSigner. - *- */ - public static final class TransactionSigner extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:wallet.TransactionSigner) - TransactionSignerOrBuilder { - // Use TransactionSigner.newBuilder() to construct. - private TransactionSigner(com.google.protobuf.GeneratedMessage.Builder> builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TransactionSigner(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TransactionSigner defaultInstance; - public static TransactionSigner getDefaultInstance() { - return defaultInstance; - } - - public TransactionSigner getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransactionSigner( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - className_ = bs; - break; - } - case 18: { - bitField0_ |= 0x00000002; - data_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_TransactionSigner_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_TransactionSigner_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoinj.wallet.Protos.TransactionSigner.class, org.bitcoinj.wallet.Protos.TransactionSigner.Builder.class); - } - - public static com.google.protobuf.Parser
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public boolean hasClassName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public java.lang.String getClassName() { - java.lang.Object ref = className_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } - return s; - } - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public com.google.protobuf.ByteString - getClassNameBytes() { - java.lang.Object ref = className_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - className_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString data_; - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public boolean hasData() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public com.google.protobuf.ByteString getData() { - return data_; - } - - private void initFields() { - className_ = ""; - data_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasClassName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getClassNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, data_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getClassNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, data_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.bitcoinj.wallet.Protos.TransactionSigner parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.TransactionSigner prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code wallet.TransactionSigner} - * - *
- ** - * Data required to reconstruct TransactionSigner. - *- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public boolean hasClassName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public java.lang.String getClassName() { - java.lang.Object ref = className_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public com.google.protobuf.ByteString - getClassNameBytes() { - java.lang.Object ref = className_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - className_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public Builder setClassName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - className_ = value; - onChanged(); - return this; - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public Builder clearClassName() { - bitField0_ = (bitField0_ & ~0x00000001); - className_ = getDefaultInstance().getClassName(); - onChanged(); - return this; - } - /** - *
required string class_name = 1;
- *
- * - * fully qualified class name of TransactionSigner implementation - *- */ - public Builder setClassNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - className_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public boolean hasData() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public com.google.protobuf.ByteString getData() { - return data_; - } - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - data_ = value; - onChanged(); - return this; - } - /** - *
optional bytes data = 2;
- *
- * - * arbitrary data required for signer to function - *- */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000002); - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:wallet.TransactionSigner) - } - - static { - defaultInstance = new TransactionSigner(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:wallet.TransactionSigner) - } - public interface WalletOrBuilder extends // @@protoc_insertion_point(interface_extends:wallet.Wallet) com.google.protobuf.MessageOrBuilder { @@ -14598,50 +13943,6 @@ public final class Protos { */ org.bitcoinj.wallet.Protos.TagOrBuilder getTagsOrBuilder( int index); - - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - java.util.List
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - org.bitcoinj.wallet.Protos.TransactionSigner getTransactionSigners(int index); - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - int getTransactionSignersCount(); - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - java.util.List extends org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder> - getTransactionSignersOrBuilderList(); - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder getTransactionSignersOrBuilder( - int index); } /** * Protobuf type {@code wallet.Wallet} @@ -14800,14 +14101,6 @@ public final class Protos { tags_.add(input.readMessage(org.bitcoinj.wallet.Protos.Tag.PARSER, extensionRegistry)); break; } - case 138: { - if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) { - transactionSigners_ = new java.util.ArrayList
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public java.util.List
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public java.util.List extends org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder> - getTransactionSignersOrBuilderList() { - return transactionSigners_; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public int getTransactionSignersCount() { - return transactionSigners_.size(); - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSigner getTransactionSigners(int index) { - return transactionSigners_.get(index); - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder getTransactionSignersOrBuilder( - int index) { - return transactionSigners_.get(index); - } - private void initFields() { networkIdentifier_ = ""; lastSeenBlockHash_ = com.google.protobuf.ByteString.EMPTY; @@ -15476,7 +14711,6 @@ public final class Protos { description_ = ""; keyRotationTime_ = 0L; tags_ = java.util.Collections.emptyList(); - transactionSigners_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -15524,12 +14758,6 @@ public final class Protos { return false; } } - for (int i = 0; i < getTransactionSignersCount(); i++) { - if (!getTransactionSigners(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -15579,9 +14807,6 @@ public final class Protos { for (int i = 0; i < tags_.size(); i++) { output.writeMessage(16, tags_.get(i)); } - for (int i = 0; i < transactionSigners_.size(); i++) { - output.writeMessage(17, transactionSigners_.get(i)); - } getUnknownFields().writeTo(output); } @@ -15647,10 +14872,6 @@ public final class Protos { size += com.google.protobuf.CodedOutputStream .computeMessageSize(16, tags_.get(i)); } - for (int i = 0; i < transactionSigners_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, transactionSigners_.get(i)); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -15770,7 +14991,6 @@ public final class Protos { getEncryptionParametersFieldBuilder(); getExtensionFieldBuilder(); getTagsFieldBuilder(); - getTransactionSignersFieldBuilder(); } } private static Builder create() { @@ -15831,12 +15051,6 @@ public final class Protos { } else { tagsBuilder_.clear(); } - if (transactionSignersBuilder_ == null) { - transactionSigners_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); - } else { - transactionSignersBuilder_.clear(); - } return this; } @@ -15950,15 +15164,6 @@ public final class Protos { } else { result.tags_ = tagsBuilder_.build(); } - if (transactionSignersBuilder_ == null) { - if (((bitField0_ & 0x00004000) == 0x00004000)) { - transactionSigners_ = java.util.Collections.unmodifiableList(transactionSigners_); - bitField0_ = (bitField0_ & ~0x00004000); - } - result.transactionSigners_ = transactionSigners_; - } else { - result.transactionSigners_ = transactionSignersBuilder_.build(); - } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -16136,32 +15341,6 @@ public final class Protos { } } } - if (transactionSignersBuilder_ == null) { - if (!other.transactionSigners_.isEmpty()) { - if (transactionSigners_.isEmpty()) { - transactionSigners_ = other.transactionSigners_; - bitField0_ = (bitField0_ & ~0x00004000); - } else { - ensureTransactionSignersIsMutable(); - transactionSigners_.addAll(other.transactionSigners_); - } - onChanged(); - } - } else { - if (!other.transactionSigners_.isEmpty()) { - if (transactionSignersBuilder_.isEmpty()) { - transactionSignersBuilder_.dispose(); - transactionSignersBuilder_ = null; - transactionSigners_ = other.transactionSigners_; - bitField0_ = (bitField0_ & ~0x00004000); - transactionSignersBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTransactionSignersFieldBuilder() : null; - } else { - transactionSignersBuilder_.addAllMessages(other.transactionSigners_); - } - } - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -16207,12 +15386,6 @@ public final class Protos { return false; } } - for (int i = 0; i < getTransactionSignersCount(); i++) { - if (!getTransactionSigners(i).isInitialized()) { - - return false; - } - } return true; } @@ -18029,318 +17202,6 @@ public final class Protos { return tagsBuilder_; } - private java.util.List
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public java.util.List
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public int getTransactionSignersCount() { - if (transactionSignersBuilder_ == null) { - return transactionSigners_.size(); - } else { - return transactionSignersBuilder_.getCount(); - } - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSigner getTransactionSigners(int index) { - if (transactionSignersBuilder_ == null) { - return transactionSigners_.get(index); - } else { - return transactionSignersBuilder_.getMessage(index); - } - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder setTransactionSigners( - int index, org.bitcoinj.wallet.Protos.TransactionSigner value) { - if (transactionSignersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransactionSignersIsMutable(); - transactionSigners_.set(index, value); - onChanged(); - } else { - transactionSignersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder setTransactionSigners( - int index, org.bitcoinj.wallet.Protos.TransactionSigner.Builder builderForValue) { - if (transactionSignersBuilder_ == null) { - ensureTransactionSignersIsMutable(); - transactionSigners_.set(index, builderForValue.build()); - onChanged(); - } else { - transactionSignersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder addTransactionSigners(org.bitcoinj.wallet.Protos.TransactionSigner value) { - if (transactionSignersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransactionSignersIsMutable(); - transactionSigners_.add(value); - onChanged(); - } else { - transactionSignersBuilder_.addMessage(value); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder addTransactionSigners( - int index, org.bitcoinj.wallet.Protos.TransactionSigner value) { - if (transactionSignersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransactionSignersIsMutable(); - transactionSigners_.add(index, value); - onChanged(); - } else { - transactionSignersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder addTransactionSigners( - org.bitcoinj.wallet.Protos.TransactionSigner.Builder builderForValue) { - if (transactionSignersBuilder_ == null) { - ensureTransactionSignersIsMutable(); - transactionSigners_.add(builderForValue.build()); - onChanged(); - } else { - transactionSignersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder addTransactionSigners( - int index, org.bitcoinj.wallet.Protos.TransactionSigner.Builder builderForValue) { - if (transactionSignersBuilder_ == null) { - ensureTransactionSignersIsMutable(); - transactionSigners_.add(index, builderForValue.build()); - onChanged(); - } else { - transactionSignersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder addAllTransactionSigners( - java.lang.Iterable extends org.bitcoinj.wallet.Protos.TransactionSigner> values) { - if (transactionSignersBuilder_ == null) { - ensureTransactionSignersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transactionSigners_); - onChanged(); - } else { - transactionSignersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder clearTransactionSigners() { - if (transactionSignersBuilder_ == null) { - transactionSigners_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); - onChanged(); - } else { - transactionSignersBuilder_.clear(); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public Builder removeTransactionSigners(int index) { - if (transactionSignersBuilder_ == null) { - ensureTransactionSignersIsMutable(); - transactionSigners_.remove(index); - onChanged(); - } else { - transactionSignersBuilder_.remove(index); - } - return this; - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSigner.Builder getTransactionSignersBuilder( - int index) { - return getTransactionSignersFieldBuilder().getBuilder(index); - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder getTransactionSignersOrBuilder( - int index) { - if (transactionSignersBuilder_ == null) { - return transactionSigners_.get(index); } else { - return transactionSignersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public java.util.List extends org.bitcoinj.wallet.Protos.TransactionSignerOrBuilder> - getTransactionSignersOrBuilderList() { - if (transactionSignersBuilder_ != null) { - return transactionSignersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(transactionSigners_); - } - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSigner.Builder addTransactionSignersBuilder() { - return getTransactionSignersFieldBuilder().addBuilder( - org.bitcoinj.wallet.Protos.TransactionSigner.getDefaultInstance()); - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public org.bitcoinj.wallet.Protos.TransactionSigner.Builder addTransactionSignersBuilder( - int index) { - return getTransactionSignersFieldBuilder().addBuilder( - index, org.bitcoinj.wallet.Protos.TransactionSigner.getDefaultInstance()); - } - /** - *
repeated .wallet.TransactionSigner transaction_signers = 17;
- *
- * - * transaction signers added to the wallet - *- */ - public java.util.List