diff --git a/core/build.gradle b/core/build.gradle index 79a208e5e..0368b52bf 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -10,7 +10,7 @@ version = '0.16-SNAPSHOT' dependencies { api 'org.bouncycastle:bcprov-jdk15to18:1.68' api 'com.google.guava:guava:30.0-android' - api 'com.google.protobuf:protobuf-java:3.13.0' + api 'com.google.protobuf:protobuf-javalite:3.13.0' api 'com.squareup.okhttp3:okhttp:3.12.12' implementation 'org.slf4j:slf4j-api:1.7.32' implementation 'net.jcip:jcip-annotations:1.0' @@ -34,6 +34,15 @@ protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.13.0' } + generateProtoTasks { + all().each { task -> + task.builtins { + java { + option "lite" + } + } + } + } generatedFilesBaseDir = new File(projectDir, '/src') // workaround for '$projectDir/src' } diff --git a/core/src/main/java/org/bitcoin/crawler/PeerSeedProtos.java b/core/src/main/java/org/bitcoin/crawler/PeerSeedProtos.java index 8e37f763c..fb82be9b5 100644 --- a/core/src/main/java/org/bitcoin/crawler/PeerSeedProtos.java +++ b/core/src/main/java/org/bitcoin/crawler/PeerSeedProtos.java @@ -8,15 +8,9 @@ public final class PeerSeedProtos { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } public interface PeerSeedDataOrBuilder extends // @@protoc_insertion_point(interface_extends:org.bitcoin.crawler.PeerSeedData) - com.google.protobuf.MessageOrBuilder { + com.google.protobuf.MessageLiteOrBuilder { /** * required string ip_address = 1; @@ -60,101 +54,17 @@ public final class PeerSeedProtos { /** * Protobuf type {@code org.bitcoin.crawler.PeerSeedData} */ - public static final class PeerSeedData extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class PeerSeedData extends + com.google.protobuf.GeneratedMessageLite< + PeerSeedData, PeerSeedData.Builder> implements // @@protoc_insertion_point(message_implements:org.bitcoin.crawler.PeerSeedData) PeerSeedDataOrBuilder { - private static final long serialVersionUID = 0L; - // Use PeerSeedData.newBuilder() to construct. - private PeerSeedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } private PeerSeedData() { ipAddress_ = ""; } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PeerSeedData(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PeerSeedData( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - 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; - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - ipAddress_ = bs; - break; - } - case 16: { - bitField0_ |= 0x00000002; - port_ = input.readUInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - services_ = input.readUInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeedData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeedData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.class, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder.class); - } - private int bitField0_; public static final int IP_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object ipAddress_; + private java.lang.String ipAddress_; /** * required string ip_address = 1; * @return Whether the ipAddress field is set. @@ -169,18 +79,7 @@ public final class PeerSeedProtos { */ @java.lang.Override public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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()) { - ipAddress_ = s; - } - return s; - } + return ipAddress_; } /** * required string ip_address = 1; @@ -189,16 +88,33 @@ public final class PeerSeedProtos { @java.lang.Override public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.google.protobuf.ByteString.copyFromUtf8(ipAddress_); + } + /** + * required string ip_address = 1; + * @param value The ipAddress to set. + */ + private void setIpAddress( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000001; + ipAddress_ = value; + } + /** + * required string ip_address = 1; + */ + private void clearIpAddress() { + bitField0_ = (bitField0_ & ~0x00000001); + ipAddress_ = getDefaultInstance().getIpAddress(); + } + /** + * required string ip_address = 1; + * @param value The bytes for ipAddress to set. + */ + private void setIpAddressBytes( + com.google.protobuf.ByteString value) { + ipAddress_ = value.toStringUtf8(); + bitField0_ |= 0x00000001; } public static final int PORT_FIELD_NUMBER = 2; @@ -219,6 +135,21 @@ public final class PeerSeedProtos { public int getPort() { return port_; } + /** + * required uint32 port = 2; + * @param value The port to set. + */ + private void setPort(int value) { + bitField0_ |= 0x00000002; + port_ = value; + } + /** + * required uint32 port = 2; + */ + private void clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + } public static final int SERVICES_FIELD_NUMBER = 3; private int services_; @@ -238,435 +169,141 @@ public final class PeerSeedProtos { public int getServices() { return services_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasIpAddress()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasPort()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasServices()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + * required uint32 services = 3; + * @param value The services to set. + */ + private void setServices(int value) { + bitField0_ |= 0x00000004; + services_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipAddress_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt32(2, port_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt32(3, services_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipAddress_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, port_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, services_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.crawler.PeerSeedProtos.PeerSeedData)) { - return super.equals(obj); - } - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData other = (org.bitcoin.crawler.PeerSeedProtos.PeerSeedData) obj; - - if (hasIpAddress() != other.hasIpAddress()) return false; - if (hasIpAddress()) { - if (!getIpAddress() - .equals(other.getIpAddress())) return false; - } - if (hasPort() != other.hasPort()) return false; - if (hasPort()) { - if (getPort() - != other.getPort()) return false; - } - if (hasServices() != other.hasServices()) return false; - if (hasServices()) { - if (getServices() - != other.getServices()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIpAddress()) { - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - } - if (hasPort()) { - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - } - if (hasServices()) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServices(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + * required uint32 services = 3; + */ + private void clearServices() { + bitField0_ = (bitField0_ & ~0x00000004); + services_ = 0; } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.crawler.PeerSeedProtos.PeerSeedData prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code org.bitcoin.crawler.PeerSeedData} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.crawler.PeerSeedProtos.PeerSeedData, Builder> implements // @@protoc_insertion_point(builder_implements:org.bitcoin.crawler.PeerSeedData) org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeedData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeedData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.class, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder.class); - } - // Construct using org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - ipAddress_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - port_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - services_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeedData_descriptor; - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData getDefaultInstanceForType() { - return org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData build() { - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData buildPartial() { - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData result = new org.bitcoin.crawler.PeerSeedProtos.PeerSeedData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.ipAddress_ = ipAddress_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.port_ = port_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.services_ = services_; - to_bitField0_ |= 0x00000004; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.crawler.PeerSeedProtos.PeerSeedData) { - return mergeFrom((org.bitcoin.crawler.PeerSeedProtos.PeerSeedData)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.crawler.PeerSeedProtos.PeerSeedData other) { - if (other == org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.getDefaultInstance()) return this; - if (other.hasIpAddress()) { - bitField0_ |= 0x00000001; - ipAddress_ = other.ipAddress_; - onChanged(); - } - if (other.hasPort()) { - setPort(other.getPort()); - } - if (other.hasServices()) { - setServices(other.getServices()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasIpAddress()) { - return false; - } - if (!hasPort()) { - return false; - } - if (!hasServices()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.crawler.PeerSeedProtos.PeerSeedData) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object ipAddress_ = ""; /** * required string ip_address = 1; * @return Whether the ipAddress field is set. */ + @java.lang.Override public boolean hasIpAddress() { - return ((bitField0_ & 0x00000001) != 0); + return instance.hasIpAddress(); } /** * required string ip_address = 1; * @return The ipAddress. */ + @java.lang.Override public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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()) { - ipAddress_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + return instance.getIpAddress(); } /** * required string ip_address = 1; * @return The bytes for ipAddress. */ + @java.lang.Override public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return instance.getIpAddressBytes(); } /** * required string ip_address = 1; @@ -675,12 +312,8 @@ public final class PeerSeedProtos { */ public Builder setIpAddress( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ipAddress_ = value; - onChanged(); + copyOnWrite(); + instance.setIpAddress(value); return this; } /** @@ -688,9 +321,8 @@ public final class PeerSeedProtos { * @return This builder for chaining. */ public Builder clearIpAddress() { - bitField0_ = (bitField0_ & ~0x00000001); - ipAddress_ = getDefaultInstance().getIpAddress(); - onChanged(); + copyOnWrite(); + instance.clearIpAddress(); return this; } /** @@ -700,23 +332,18 @@ public final class PeerSeedProtos { */ public Builder setIpAddressBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ipAddress_ = value; - onChanged(); + copyOnWrite(); + instance.setIpAddressBytes(value); return this; } - private int port_ ; /** * required uint32 port = 2; * @return Whether the port field is set. */ @java.lang.Override public boolean hasPort() { - return ((bitField0_ & 0x00000002) != 0); + return instance.hasPort(); } /** * required uint32 port = 2; @@ -724,7 +351,7 @@ public final class PeerSeedProtos { */ @java.lang.Override public int getPort() { - return port_; + return instance.getPort(); } /** * required uint32 port = 2; @@ -732,9 +359,8 @@ public final class PeerSeedProtos { * @return This builder for chaining. */ public Builder setPort(int value) { - bitField0_ |= 0x00000002; - port_ = value; - onChanged(); + copyOnWrite(); + instance.setPort(value); return this; } /** @@ -742,20 +368,18 @@ public final class PeerSeedProtos { * @return This builder for chaining. */ public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000002); - port_ = 0; - onChanged(); + copyOnWrite(); + instance.clearPort(); return this; } - private int services_ ; /** * required uint32 services = 3; * @return Whether the services field is set. */ @java.lang.Override public boolean hasServices() { - return ((bitField0_ & 0x00000004) != 0); + return instance.hasServices(); } /** * required uint32 services = 3; @@ -763,7 +387,7 @@ public final class PeerSeedProtos { */ @java.lang.Override public int getServices() { - return services_; + return instance.getServices(); } /** * required uint32 services = 3; @@ -771,9 +395,8 @@ public final class PeerSeedProtos { * @return This builder for chaining. */ public Builder setServices(int value) { - bitField0_ |= 0x00000004; - services_ = value; - onChanged(); + copyOnWrite(); + instance.setServices(value); return this; } /** @@ -781,67 +404,94 @@ public final class PeerSeedProtos { * @return This builder for chaining. */ public Builder clearServices() { - bitField0_ = (bitField0_ & ~0x00000004); - services_ = 0; - onChanged(); + copyOnWrite(); + instance.clearServices(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:org.bitcoin.crawler.PeerSeedData) } + private byte memoizedIsInitialized = 2; + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new org.bitcoin.crawler.PeerSeedProtos.PeerSeedData(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "bitField0_", + "ipAddress_", + "port_", + "services_", + }; + java.lang.String info = + "\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0003\u0001\u1508\u0000\u0002" + + "\u150b\u0001\u0003\u150b\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return memoizedIsInitialized; + } + case SET_MEMOIZED_IS_INITIALIZED: { + memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1); + return null; + } + } + throw new UnsupportedOperationException(); + } + // @@protoc_insertion_point(class_scope:org.bitcoin.crawler.PeerSeedData) private static final org.bitcoin.crawler.PeerSeedProtos.PeerSeedData DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.bitcoin.crawler.PeerSeedProtos.PeerSeedData(); + PeerSeedData defaultInstance = new PeerSeedData(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + PeerSeedData.class, defaultInstance); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeedData getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PeerSeedData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PeerSeedData(input, extensionRegistry); - } - }; + private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { - return PARSER; + return DEFAULT_INSTANCE.getParserForType(); } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } public interface PeerSeedsOrBuilder extends // @@protoc_insertion_point(interface_extends:org.bitcoin.crawler.PeerSeeds) - com.google.protobuf.MessageOrBuilder { + com.google.protobuf.MessageLiteOrBuilder { /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; @@ -856,16 +506,6 @@ public final class PeerSeedProtos { * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ int getSeedCount(); - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - java.util.List - getSeedOrBuilderList(); - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder getSeedOrBuilder( - int index); /** *
@@ -906,109 +546,18 @@ public final class PeerSeedProtos {
   /**
    * Protobuf type {@code org.bitcoin.crawler.PeerSeeds}
    */
-  public static final class PeerSeeds extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class PeerSeeds extends
+      com.google.protobuf.GeneratedMessageLite<
+          PeerSeeds, PeerSeeds.Builder> implements
       // @@protoc_insertion_point(message_implements:org.bitcoin.crawler.PeerSeeds)
       PeerSeedsOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use PeerSeeds.newBuilder() to construct.
-    private PeerSeeds(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private PeerSeeds() {
-      seed_ = java.util.Collections.emptyList();
+      seed_ = emptyProtobufList();
       net_ = "";
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new PeerSeeds();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PeerSeeds(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                seed_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              seed_.add(
-                  input.readMessage(org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.PARSER, extensionRegistry));
-              break;
-            }
-            case 16: {
-              bitField0_ |= 0x00000001;
-              timestamp_ = input.readUInt64();
-              break;
-            }
-            case 26: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000002;
-              net_ = bs;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          seed_ = java.util.Collections.unmodifiableList(seed_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeeds_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeeds_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.class, org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.Builder.class);
-    }
-
     private int bitField0_;
     public static final int SEED_FIELD_NUMBER = 1;
-    private java.util.List seed_;
+    private com.google.protobuf.Internal.ProtobufList seed_;
     /**
      * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
      */
@@ -1019,7 +568,6 @@ public final class PeerSeedProtos {
     /**
      * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
      */
-    @java.lang.Override
     public java.util.List 
         getSeedOrBuilderList() {
       return seed_;
@@ -1041,11 +589,66 @@ public final class PeerSeedProtos {
     /**
      * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
      */
-    @java.lang.Override
     public org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder getSeedOrBuilder(
         int index) {
       return seed_.get(index);
     }
+    private void ensureSeedIsMutable() {
+      com.google.protobuf.Internal.ProtobufList tmp = seed_;
+      if (!tmp.isModifiable()) {
+        seed_ =
+            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
+       }
+    }
+
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void setSeed(
+        int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) {
+      value.getClass();
+  ensureSeedIsMutable();
+      seed_.set(index, value);
+    }
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void addSeed(org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) {
+      value.getClass();
+  ensureSeedIsMutable();
+      seed_.add(value);
+    }
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void addSeed(
+        int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) {
+      value.getClass();
+  ensureSeedIsMutable();
+      seed_.add(index, value);
+    }
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void addAllSeed(
+        java.lang.Iterable values) {
+      ensureSeedIsMutable();
+      com.google.protobuf.AbstractMessageLite.addAll(
+          values, seed_);
+    }
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void clearSeed() {
+      seed_ = emptyProtobufList();
+    }
+    /**
+     * repeated .org.bitcoin.crawler.PeerSeedData seed = 1;
+     */
+    private void removeSeed(int index) {
+      ensureSeedIsMutable();
+      seed_.remove(index);
+    }
 
     public static final int TIMESTAMP_FIELD_NUMBER = 2;
     private long timestamp_;
@@ -1073,9 +676,32 @@ public final class PeerSeedProtos {
     public long getTimestamp() {
       return timestamp_;
     }
+    /**
+     * 
+     * seconds since UNIX epoch
+     * 
+ * + * required uint64 timestamp = 2; + * @param value The timestamp to set. + */ + private void setTimestamp(long value) { + bitField0_ |= 0x00000001; + timestamp_ = value; + } + /** + *
+     * seconds since UNIX epoch
+     * 
+ * + * required uint64 timestamp = 2; + */ + private void clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + } public static final int NET_FIELD_NUMBER = 3; - private volatile java.lang.Object net_; + private java.lang.String net_; /** * required string net = 3; * @return Whether the net field is set. @@ -1090,18 +716,7 @@ public final class PeerSeedProtos { */ @java.lang.Override public java.lang.String getNet() { - java.lang.Object ref = net_; - 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()) { - net_ = s; - } - return s; - } + return net_; } /** * required string net = 3; @@ -1110,496 +725,158 @@ public final class PeerSeedProtos { @java.lang.Override public com.google.protobuf.ByteString getNetBytes() { - java.lang.Object ref = net_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - net_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.google.protobuf.ByteString.copyFromUtf8(net_); } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasTimestamp()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasNet()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getSeedCount(); i++) { - if (!getSeed(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; + /** + * required string net = 3; + * @param value The net to set. + */ + private void setNet( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000002; + net_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < seed_.size(); i++) { - output.writeMessage(1, seed_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt64(2, timestamp_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, net_); - } - unknownFields.writeTo(output); + /** + * required string net = 3; + */ + private void clearNet() { + bitField0_ = (bitField0_ & ~0x00000002); + net_ = getDefaultInstance().getNet(); } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < seed_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, seed_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, timestamp_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, net_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.crawler.PeerSeedProtos.PeerSeeds)) { - return super.equals(obj); - } - org.bitcoin.crawler.PeerSeedProtos.PeerSeeds other = (org.bitcoin.crawler.PeerSeedProtos.PeerSeeds) obj; - - if (!getSeedList() - .equals(other.getSeedList())) return false; - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (getTimestamp() - != other.getTimestamp()) return false; - } - if (hasNet() != other.hasNet()) return false; - if (hasNet()) { - if (!getNet() - .equals(other.getNet())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSeedCount() > 0) { - hash = (37 * hash) + SEED_FIELD_NUMBER; - hash = (53 * hash) + getSeedList().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTimestamp()); - } - if (hasNet()) { - hash = (37 * hash) + NET_FIELD_NUMBER; - hash = (53 * hash) + getNet().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + * required string net = 3; + * @param value The bytes for net to set. + */ + private void setNetBytes( + com.google.protobuf.ByteString value) { + net_ = value.toStringUtf8(); + bitField0_ |= 0x00000002; } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.crawler.PeerSeedProtos.PeerSeeds prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code org.bitcoin.crawler.PeerSeeds} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.crawler.PeerSeedProtos.PeerSeeds, Builder> implements // @@protoc_insertion_point(builder_implements:org.bitcoin.crawler.PeerSeeds) org.bitcoin.crawler.PeerSeedProtos.PeerSeedsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeeds_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeeds_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.class, org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.Builder.class); - } - // Construct using org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSeedFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (seedBuilder_ == null) { - seed_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - seedBuilder_.clear(); - } - timestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - net_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_PeerSeeds_descriptor; - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeeds getDefaultInstanceForType() { - return org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeeds build() { - org.bitcoin.crawler.PeerSeedProtos.PeerSeeds result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.crawler.PeerSeedProtos.PeerSeeds buildPartial() { - org.bitcoin.crawler.PeerSeedProtos.PeerSeeds result = new org.bitcoin.crawler.PeerSeedProtos.PeerSeeds(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (seedBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - seed_ = java.util.Collections.unmodifiableList(seed_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.seed_ = seed_; - } else { - result.seed_ = seedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.timestamp_ = timestamp_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.net_ = net_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.crawler.PeerSeedProtos.PeerSeeds) { - return mergeFrom((org.bitcoin.crawler.PeerSeedProtos.PeerSeeds)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.crawler.PeerSeedProtos.PeerSeeds other) { - if (other == org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.getDefaultInstance()) return this; - if (seedBuilder_ == null) { - if (!other.seed_.isEmpty()) { - if (seed_.isEmpty()) { - seed_ = other.seed_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSeedIsMutable(); - seed_.addAll(other.seed_); - } - onChanged(); - } - } else { - if (!other.seed_.isEmpty()) { - if (seedBuilder_.isEmpty()) { - seedBuilder_.dispose(); - seedBuilder_ = null; - seed_ = other.seed_; - bitField0_ = (bitField0_ & ~0x00000001); - seedBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSeedFieldBuilder() : null; - } else { - seedBuilder_.addAllMessages(other.seed_); - } - } - } - if (other.hasTimestamp()) { - setTimestamp(other.getTimestamp()); - } - if (other.hasNet()) { - bitField0_ |= 0x00000004; - net_ = other.net_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasTimestamp()) { - return false; - } - if (!hasNet()) { - return false; - } - for (int i = 0; i < getSeedCount(); i++) { - if (!getSeed(i).isInitialized()) { - return false; - } - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.crawler.PeerSeedProtos.PeerSeeds parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.crawler.PeerSeedProtos.PeerSeeds) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List seed_ = - java.util.Collections.emptyList(); - private void ensureSeedIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - seed_ = new java.util.ArrayList(seed_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder, org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder> seedBuilder_; /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ + @java.lang.Override public java.util.List getSeedList() { - if (seedBuilder_ == null) { - return java.util.Collections.unmodifiableList(seed_); - } else { - return seedBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList( + instance.getSeedList()); } /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ + @java.lang.Override public int getSeedCount() { - if (seedBuilder_ == null) { - return seed_.size(); - } else { - return seedBuilder_.getCount(); - } - } - /** + return instance.getSeedCount(); + }/** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ + @java.lang.Override public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData getSeed(int index) { - if (seedBuilder_ == null) { - return seed_.get(index); - } else { - return seedBuilder_.getMessage(index); - } + return instance.getSeed(index); } /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ public Builder setSeed( int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) { - if (seedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSeedIsMutable(); - seed_.set(index, value); - onChanged(); - } else { - seedBuilder_.setMessage(index, value); - } + copyOnWrite(); + instance.setSeed(index, value); return this; } /** @@ -1607,29 +884,17 @@ public final class PeerSeedProtos { */ public Builder setSeed( int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder builderForValue) { - if (seedBuilder_ == null) { - ensureSeedIsMutable(); - seed_.set(index, builderForValue.build()); - onChanged(); - } else { - seedBuilder_.setMessage(index, builderForValue.build()); - } + copyOnWrite(); + instance.setSeed(index, + builderForValue.build()); return this; } /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ public Builder addSeed(org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) { - if (seedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSeedIsMutable(); - seed_.add(value); - onChanged(); - } else { - seedBuilder_.addMessage(value); - } + copyOnWrite(); + instance.addSeed(value); return this; } /** @@ -1637,16 +902,8 @@ public final class PeerSeedProtos { */ public Builder addSeed( int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData value) { - if (seedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSeedIsMutable(); - seed_.add(index, value); - onChanged(); - } else { - seedBuilder_.addMessage(index, value); - } + copyOnWrite(); + instance.addSeed(index, value); return this; } /** @@ -1654,13 +911,8 @@ public final class PeerSeedProtos { */ public Builder addSeed( org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder builderForValue) { - if (seedBuilder_ == null) { - ensureSeedIsMutable(); - seed_.add(builderForValue.build()); - onChanged(); - } else { - seedBuilder_.addMessage(builderForValue.build()); - } + copyOnWrite(); + instance.addSeed(builderForValue.build()); return this; } /** @@ -1668,13 +920,9 @@ public final class PeerSeedProtos { */ public Builder addSeed( int index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder builderForValue) { - if (seedBuilder_ == null) { - ensureSeedIsMutable(); - seed_.add(index, builderForValue.build()); - onChanged(); - } else { - seedBuilder_.addMessage(index, builderForValue.build()); - } + copyOnWrite(); + instance.addSeed(index, + builderForValue.build()); return this; } /** @@ -1682,108 +930,27 @@ public final class PeerSeedProtos { */ public Builder addAllSeed( java.lang.Iterable values) { - if (seedBuilder_ == null) { - ensureSeedIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, seed_); - onChanged(); - } else { - seedBuilder_.addAllMessages(values); - } + copyOnWrite(); + instance.addAllSeed(values); return this; } /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ public Builder clearSeed() { - if (seedBuilder_ == null) { - seed_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - seedBuilder_.clear(); - } + copyOnWrite(); + instance.clearSeed(); return this; } /** * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; */ public Builder removeSeed(int index) { - if (seedBuilder_ == null) { - ensureSeedIsMutable(); - seed_.remove(index); - onChanged(); - } else { - seedBuilder_.remove(index); - } + copyOnWrite(); + instance.removeSeed(index); return this; } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder getSeedBuilder( - int index) { - return getSeedFieldBuilder().getBuilder(index); - } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder getSeedOrBuilder( - int index) { - if (seedBuilder_ == null) { - return seed_.get(index); } else { - return seedBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public java.util.List - getSeedOrBuilderList() { - if (seedBuilder_ != null) { - return seedBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(seed_); - } - } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder addSeedBuilder() { - return getSeedFieldBuilder().addBuilder( - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.getDefaultInstance()); - } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder addSeedBuilder( - int index) { - return getSeedFieldBuilder().addBuilder( - index, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.getDefaultInstance()); - } - /** - * repeated .org.bitcoin.crawler.PeerSeedData seed = 1; - */ - public java.util.List - getSeedBuilderList() { - return getSeedFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder, org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder> - getSeedFieldBuilder() { - if (seedBuilder_ == null) { - seedBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.crawler.PeerSeedProtos.PeerSeedData, org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.Builder, org.bitcoin.crawler.PeerSeedProtos.PeerSeedDataOrBuilder>( - seed_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - seed_ = null; - } - return seedBuilder_; - } - private long timestamp_ ; /** *
        * seconds since UNIX epoch
@@ -1794,7 +961,7 @@ public final class PeerSeedProtos {
        */
       @java.lang.Override
       public boolean hasTimestamp() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasTimestamp();
       }
       /**
        * 
@@ -1806,7 +973,7 @@ public final class PeerSeedProtos {
        */
       @java.lang.Override
       public long getTimestamp() {
-        return timestamp_;
+        return instance.getTimestamp();
       }
       /**
        * 
@@ -1818,9 +985,8 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder setTimestamp(long value) {
-        bitField0_ |= 0x00000002;
-        timestamp_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setTimestamp(value);
         return this;
       }
       /**
@@ -1832,54 +998,35 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder clearTimestamp() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        timestamp_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearTimestamp();
         return this;
       }
 
-      private java.lang.Object net_ = "";
       /**
        * required string net = 3;
        * @return Whether the net field is set.
        */
+      @java.lang.Override
       public boolean hasNet() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasNet();
       }
       /**
        * required string net = 3;
        * @return The net.
        */
+      @java.lang.Override
       public java.lang.String getNet() {
-        java.lang.Object ref = net_;
-        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()) {
-            net_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getNet();
       }
       /**
        * required string net = 3;
        * @return The bytes for net.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getNetBytes() {
-        java.lang.Object ref = net_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          net_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getNetBytes();
       }
       /**
        * required string net = 3;
@@ -1888,12 +1035,8 @@ public final class PeerSeedProtos {
        */
       public Builder setNet(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000004;
-        net_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setNet(value);
         return this;
       }
       /**
@@ -1901,9 +1044,8 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder clearNet() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        net_ = getDefaultInstance().getNet();
-        onChanged();
+        copyOnWrite();
+        instance.clearNet();
         return this;
       }
       /**
@@ -1913,70 +1055,95 @@ public final class PeerSeedProtos {
        */
       public Builder setNetBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000004;
-        net_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setNetBytes(value);
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:org.bitcoin.crawler.PeerSeeds)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.crawler.PeerSeedProtos.PeerSeeds();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "seed_",
+              org.bitcoin.crawler.PeerSeedProtos.PeerSeedData.class,
+              "timestamp_",
+              "net_",
+            };
+            java.lang.String info =
+                "\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0001\u0003\u0001\u041b\u0002\u1503" +
+                "\u0000\u0003\u1508\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.crawler.PeerSeedProtos.PeerSeeds.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:org.bitcoin.crawler.PeerSeeds)
     private static final org.bitcoin.crawler.PeerSeedProtos.PeerSeeds DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.crawler.PeerSeedProtos.PeerSeeds();
+      PeerSeeds defaultInstance = new PeerSeeds();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        PeerSeeds.class, defaultInstance);
     }
 
     public static org.bitcoin.crawler.PeerSeedProtos.PeerSeeds getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public PeerSeeds parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PeerSeeds(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.crawler.PeerSeedProtos.PeerSeeds getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface SignedPeerSeedsOrBuilder extends
       // @@protoc_insertion_point(interface_extends:org.bitcoin.crawler.SignedPeerSeeds)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * required bytes peer_seeds = 1;
@@ -2014,99 +1181,16 @@ public final class PeerSeedProtos {
   /**
    * Protobuf type {@code org.bitcoin.crawler.SignedPeerSeeds}
    */
-  public static final class SignedPeerSeeds extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class SignedPeerSeeds extends
+      com.google.protobuf.GeneratedMessageLite<
+          SignedPeerSeeds, SignedPeerSeeds.Builder> implements
       // @@protoc_insertion_point(message_implements:org.bitcoin.crawler.SignedPeerSeeds)
       SignedPeerSeedsOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use SignedPeerSeeds.newBuilder() to construct.
-    private SignedPeerSeeds(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private SignedPeerSeeds() {
       peerSeeds_ = com.google.protobuf.ByteString.EMPTY;
       signature_ = com.google.protobuf.ByteString.EMPTY;
       pubkey_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new SignedPeerSeeds();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private SignedPeerSeeds(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              bitField0_ |= 0x00000001;
-              peerSeeds_ = input.readBytes();
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              signature_ = input.readBytes();
-              break;
-            }
-            case 26: {
-              bitField0_ |= 0x00000004;
-              pubkey_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_SignedPeerSeeds_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.class, org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.Builder.class);
-    }
-
     private int bitField0_;
     public static final int PEER_SEEDS_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString peerSeeds_;
@@ -2126,6 +1210,22 @@ public final class PeerSeedProtos {
     public com.google.protobuf.ByteString getPeerSeeds() {
       return peerSeeds_;
     }
+    /**
+     * required bytes peer_seeds = 1;
+     * @param value The peerSeeds to set.
+     */
+    private void setPeerSeeds(com.google.protobuf.ByteString value) {
+      value.getClass();
+  bitField0_ |= 0x00000001;
+      peerSeeds_ = value;
+    }
+    /**
+     * required bytes peer_seeds = 1;
+     */
+    private void clearPeerSeeds() {
+      bitField0_ = (bitField0_ & ~0x00000001);
+      peerSeeds_ = getDefaultInstance().getPeerSeeds();
+    }
 
     public static final int SIGNATURE_FIELD_NUMBER = 2;
     private com.google.protobuf.ByteString signature_;
@@ -2145,6 +1245,22 @@ public final class PeerSeedProtos {
     public com.google.protobuf.ByteString getSignature() {
       return signature_;
     }
+    /**
+     * required bytes signature = 2;
+     * @param value The signature to set.
+     */
+    private void setSignature(com.google.protobuf.ByteString value) {
+      value.getClass();
+  bitField0_ |= 0x00000002;
+      signature_ = value;
+    }
+    /**
+     * required bytes signature = 2;
+     */
+    private void clearSignature() {
+      bitField0_ = (bitField0_ & ~0x00000002);
+      signature_ = getDefaultInstance().getSignature();
+    }
 
     public static final int PUBKEY_FIELD_NUMBER = 3;
     private com.google.protobuf.ByteString pubkey_;
@@ -2164,400 +1280,125 @@ public final class PeerSeedProtos {
     public com.google.protobuf.ByteString getPubkey() {
       return pubkey_;
     }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasPeerSeeds()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!hasSignature()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!hasPubkey()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
+    /**
+     * required bytes pubkey = 3;
+     * @param value The pubkey to set.
+     */
+    private void setPubkey(com.google.protobuf.ByteString value) {
+      value.getClass();
+  bitField0_ |= 0x00000004;
+      pubkey_ = value;
     }
-
-    @java.lang.Override
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (((bitField0_ & 0x00000001) != 0)) {
-        output.writeBytes(1, peerSeeds_);
-      }
-      if (((bitField0_ & 0x00000002) != 0)) {
-        output.writeBytes(2, signature_);
-      }
-      if (((bitField0_ & 0x00000004) != 0)) {
-        output.writeBytes(3, pubkey_);
-      }
-      unknownFields.writeTo(output);
-    }
-
-    @java.lang.Override
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(1, peerSeeds_);
-      }
-      if (((bitField0_ & 0x00000002) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(2, signature_);
-      }
-      if (((bitField0_ & 0x00000004) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(3, pubkey_);
-      }
-      size += unknownFields.getSerializedSize();
-      memoizedSize = size;
-      return size;
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds)) {
-        return super.equals(obj);
-      }
-      org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds other = (org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds) obj;
-
-      if (hasPeerSeeds() != other.hasPeerSeeds()) return false;
-      if (hasPeerSeeds()) {
-        if (!getPeerSeeds()
-            .equals(other.getPeerSeeds())) return false;
-      }
-      if (hasSignature() != other.hasSignature()) return false;
-      if (hasSignature()) {
-        if (!getSignature()
-            .equals(other.getSignature())) return false;
-      }
-      if (hasPubkey() != other.hasPubkey()) return false;
-      if (hasPubkey()) {
-        if (!getPubkey()
-            .equals(other.getPubkey())) return false;
-      }
-      if (!unknownFields.equals(other.unknownFields)) return false;
-      return true;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      if (hasPeerSeeds()) {
-        hash = (37 * hash) + PEER_SEEDS_FIELD_NUMBER;
-        hash = (53 * hash) + getPeerSeeds().hashCode();
-      }
-      if (hasSignature()) {
-        hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
-        hash = (53 * hash) + getSignature().hashCode();
-      }
-      if (hasPubkey()) {
-        hash = (37 * hash) + PUBKEY_FIELD_NUMBER;
-        hash = (53 * hash) + getPubkey().hashCode();
-      }
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
+    /**
+     * required bytes pubkey = 3;
+     */
+    private void clearPubkey() {
+      bitField0_ = (bitField0_ & ~0x00000004);
+      pubkey_ = getDefaultInstance().getPubkey();
     }
 
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input, extensionRegistry);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
+      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input);
     }
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input, extensionRegistry);
     }
 
-    @java.lang.Override
-    public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
+      return (Builder) DEFAULT_INSTANCE.createBuilder();
     }
     public static Builder newBuilder(org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    @java.lang.Override
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
+      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
     }
 
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
     /**
      * Protobuf type {@code org.bitcoin.crawler.SignedPeerSeeds}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessageLite.Builder<
+          org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds, Builder> implements
         // @@protoc_insertion_point(builder_implements:org.bitcoin.crawler.SignedPeerSeeds)
         org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeedsOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_SignedPeerSeeds_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.class, org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.Builder.class);
-      }
-
       // Construct using org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+        super(DEFAULT_INSTANCE);
       }
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        peerSeeds_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        signature_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000002);
-        pubkey_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000004);
-        return this;
-      }
 
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return org.bitcoin.crawler.PeerSeedProtos.internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor;
-      }
-
-      @java.lang.Override
-      public org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds getDefaultInstanceForType() {
-        return org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds build() {
-        org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds buildPartial() {
-        org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds result = new org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.peerSeeds_ = peerSeeds_;
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          to_bitField0_ |= 0x00000002;
-        }
-        result.signature_ = signature_;
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          to_bitField0_ |= 0x00000004;
-        }
-        result.pubkey_ = pubkey_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds) {
-          return mergeFrom((org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds other) {
-        if (other == org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.getDefaultInstance()) return this;
-        if (other.hasPeerSeeds()) {
-          setPeerSeeds(other.getPeerSeeds());
-        }
-        if (other.hasSignature()) {
-          setSignature(other.getSignature());
-        }
-        if (other.hasPubkey()) {
-          setPubkey(other.getPubkey());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        if (!hasPeerSeeds()) {
-          return false;
-        }
-        if (!hasSignature()) {
-          return false;
-        }
-        if (!hasPubkey()) {
-          return false;
-        }
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private com.google.protobuf.ByteString peerSeeds_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * required bytes peer_seeds = 1;
        * @return Whether the peerSeeds field is set.
        */
       @java.lang.Override
       public boolean hasPeerSeeds() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasPeerSeeds();
       }
       /**
        * required bytes peer_seeds = 1;
@@ -2565,7 +1406,7 @@ public final class PeerSeedProtos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getPeerSeeds() {
-        return peerSeeds_;
+        return instance.getPeerSeeds();
       }
       /**
        * required bytes peer_seeds = 1;
@@ -2573,12 +1414,8 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder setPeerSeeds(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        peerSeeds_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPeerSeeds(value);
         return this;
       }
       /**
@@ -2586,20 +1423,18 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder clearPeerSeeds() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        peerSeeds_ = getDefaultInstance().getPeerSeeds();
-        onChanged();
+        copyOnWrite();
+        instance.clearPeerSeeds();
         return this;
       }
 
-      private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * required bytes signature = 2;
        * @return Whether the signature field is set.
        */
       @java.lang.Override
       public boolean hasSignature() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasSignature();
       }
       /**
        * required bytes signature = 2;
@@ -2607,7 +1442,7 @@ public final class PeerSeedProtos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getSignature() {
-        return signature_;
+        return instance.getSignature();
       }
       /**
        * required bytes signature = 2;
@@ -2615,12 +1450,8 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder setSignature(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        signature_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setSignature(value);
         return this;
       }
       /**
@@ -2628,20 +1459,18 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder clearSignature() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        signature_ = getDefaultInstance().getSignature();
-        onChanged();
+        copyOnWrite();
+        instance.clearSignature();
         return this;
       }
 
-      private com.google.protobuf.ByteString pubkey_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * required bytes pubkey = 3;
        * @return Whether the pubkey field is set.
        */
       @java.lang.Override
       public boolean hasPubkey() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasPubkey();
       }
       /**
        * required bytes pubkey = 3;
@@ -2649,7 +1478,7 @@ public final class PeerSeedProtos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getPubkey() {
-        return pubkey_;
+        return instance.getPubkey();
       }
       /**
        * required bytes pubkey = 3;
@@ -2657,12 +1486,8 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder setPubkey(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000004;
-        pubkey_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPubkey(value);
         return this;
       }
       /**
@@ -2670,119 +1495,93 @@ public final class PeerSeedProtos {
        * @return This builder for chaining.
        */
       public Builder clearPubkey() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        pubkey_ = getDefaultInstance().getPubkey();
-        onChanged();
+        copyOnWrite();
+        instance.clearPubkey();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:org.bitcoin.crawler.SignedPeerSeeds)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "peerSeeds_",
+              "signature_",
+              "pubkey_",
+            };
+            java.lang.String info =
+                "\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0003\u0001\u150a\u0000\u0002" +
+                "\u150a\u0001\u0003\u150a\u0002";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:org.bitcoin.crawler.SignedPeerSeeds)
     private static final org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds();
+      SignedPeerSeeds defaultInstance = new SignedPeerSeeds();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        SignedPeerSeeds.class, defaultInstance);
     }
 
     public static org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public SignedPeerSeeds parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new SignedPeerSeeds(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.crawler.PeerSeedProtos.SignedPeerSeeds getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_org_bitcoin_crawler_PeerSeedData_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_org_bitcoin_crawler_PeerSeedData_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_org_bitcoin_crawler_PeerSeeds_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_org_bitcoin_crawler_PeerSeeds_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_org_bitcoin_crawler_SignedPeerSeeds_fieldAccessorTable;
 
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
   static {
-    java.lang.String[] descriptorData = {
-      "\n\017peerseeds.proto\022\023org.bitcoin.crawler\"B" +
-      "\n\014PeerSeedData\022\022\n\nip_address\030\001 \002(\t\022\014\n\004po" +
-      "rt\030\002 \002(\r\022\020\n\010services\030\003 \002(\r\"\\\n\tPeerSeeds\022" +
-      "/\n\004seed\030\001 \003(\0132!.org.bitcoin.crawler.Peer" +
-      "SeedData\022\021\n\ttimestamp\030\002 \002(\004\022\013\n\003net\030\003 \002(\t" +
-      "\"H\n\017SignedPeerSeeds\022\022\n\npeer_seeds\030\001 \002(\014\022" +
-      "\021\n\tsignature\030\002 \002(\014\022\016\n\006pubkey\030\003 \002(\014B%\n\023or" +
-      "g.bitcoin.crawlerB\016PeerSeedProtos"
-    };
-    descriptor = com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        });
-    internal_static_org_bitcoin_crawler_PeerSeedData_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_org_bitcoin_crawler_PeerSeedData_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_org_bitcoin_crawler_PeerSeedData_descriptor,
-        new java.lang.String[] { "IpAddress", "Port", "Services", });
-    internal_static_org_bitcoin_crawler_PeerSeeds_descriptor =
-      getDescriptor().getMessageTypes().get(1);
-    internal_static_org_bitcoin_crawler_PeerSeeds_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_org_bitcoin_crawler_PeerSeeds_descriptor,
-        new java.lang.String[] { "Seed", "Timestamp", "Net", });
-    internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor =
-      getDescriptor().getMessageTypes().get(2);
-    internal_static_org_bitcoin_crawler_SignedPeerSeeds_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_org_bitcoin_crawler_SignedPeerSeeds_descriptor,
-        new java.lang.String[] { "PeerSeeds", "Signature", "Pubkey", });
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/core/src/main/java/org/bitcoin/protocols/payments/Protos.java b/core/src/main/java/org/bitcoin/protocols/payments/Protos.java
index 59e9558cd..5e8f12364 100644
--- a/core/src/main/java/org/bitcoin/protocols/payments/Protos.java
+++ b/core/src/main/java/org/bitcoin/protocols/payments/Protos.java
@@ -8,15 +8,9 @@ public final class Protos {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
   public interface OutputOrBuilder extends
       // @@protoc_insertion_point(interface_extends:payments.Output)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -63,92 +57,14 @@ public final class Protos {
    *
    * Protobuf type {@code payments.Output}
    */
-  public static final class Output extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class Output extends
+      com.google.protobuf.GeneratedMessageLite<
+          Output, Output.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.Output)
       OutputOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use Output.newBuilder() to construct.
-    private Output(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private Output() {
       script_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new Output();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Output(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 8: {
-              bitField0_ |= 0x00000001;
-              amount_ = input.readUInt64();
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              script_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.Output.class, org.bitcoin.protocols.payments.Protos.Output.Builder.class);
-    }
-
     private int bitField0_;
     public static final int AMOUNT_FIELD_NUMBER = 1;
     private long amount_;
@@ -176,6 +92,29 @@ public final class Protos {
     public long getAmount() {
       return amount_;
     }
+    /**
+     * 
+     * amount is integer-number-of-satoshis
+     * 
+ * + * optional uint64 amount = 1 [default = 0]; + * @param value The amount to set. + */ + private void setAmount(long value) { + bitField0_ |= 0x00000001; + amount_ = value; + } + /** + *
+     * amount is integer-number-of-satoshis
+     * 
+ * + * optional uint64 amount = 1 [default = 0]; + */ + private void clearAmount() { + bitField0_ = (bitField0_ & ~0x00000001); + amount_ = 0L; + } public static final int SCRIPT_FIELD_NUMBER = 2; private com.google.protobuf.ByteString script_; @@ -203,188 +142,112 @@ public final class Protos { public com.google.protobuf.ByteString getScript() { return script_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasScript()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * usually one of the standard Script forms
+     * 
+ * + * required bytes script = 2; + * @param value The script to set. + */ + private void setScript(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000002; + script_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt64(1, amount_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBytes(2, script_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, amount_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, script_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.Output)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.Output other = (org.bitcoin.protocols.payments.Protos.Output) obj; - - if (hasAmount() != other.hasAmount()) return false; - if (hasAmount()) { - if (getAmount() - != other.getAmount()) return false; - } - if (hasScript() != other.hasScript()) return false; - if (hasScript()) { - if (!getScript() - .equals(other.getScript())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAmount()) { - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - } - if (hasScript()) { - hash = (37 * hash) + SCRIPT_FIELD_NUMBER; - hash = (53 * hash) + getScript().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * usually one of the standard Script forms
+     * 
+ * + * required bytes script = 2; + */ + private void clearScript() { + bitField0_ = (bitField0_ & ~0x00000002); + script_ = getDefaultInstance().getScript(); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Output parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Output parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.Output prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** *
      * Generalized form of "send payment to this/these bitcoin addresses"
@@ -393,169 +256,16 @@ public final class Protos {
      * Protobuf type {@code payments.Output}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessageLite.Builder<
+          org.bitcoin.protocols.payments.Protos.Output, Builder> implements
         // @@protoc_insertion_point(builder_implements:payments.Output)
         org.bitcoin.protocols.payments.Protos.OutputOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.bitcoin.protocols.payments.Protos.Output.class, org.bitcoin.protocols.payments.Protos.Output.Builder.class);
-      }
-
       // Construct using org.bitcoin.protocols.payments.Protos.Output.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+        super(DEFAULT_INSTANCE);
       }
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        amount_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        script_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000002);
-        return this;
-      }
 
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return org.bitcoin.protocols.payments.Protos.internal_static_payments_Output_descriptor;
-      }
-
-      @java.lang.Override
-      public org.bitcoin.protocols.payments.Protos.Output getDefaultInstanceForType() {
-        return org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public org.bitcoin.protocols.payments.Protos.Output build() {
-        org.bitcoin.protocols.payments.Protos.Output result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public org.bitcoin.protocols.payments.Protos.Output buildPartial() {
-        org.bitcoin.protocols.payments.Protos.Output result = new org.bitcoin.protocols.payments.Protos.Output(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.amount_ = amount_;
-          to_bitField0_ |= 0x00000001;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          to_bitField0_ |= 0x00000002;
-        }
-        result.script_ = script_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.bitcoin.protocols.payments.Protos.Output) {
-          return mergeFrom((org.bitcoin.protocols.payments.Protos.Output)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.Output other) {
-        if (other == org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()) return this;
-        if (other.hasAmount()) {
-          setAmount(other.getAmount());
-        }
-        if (other.hasScript()) {
-          setScript(other.getScript());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        if (!hasScript()) {
-          return false;
-        }
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.bitcoin.protocols.payments.Protos.Output parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.bitcoin.protocols.payments.Protos.Output) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private long amount_ ;
       /**
        * 
        * amount is integer-number-of-satoshis
@@ -566,7 +276,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasAmount() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasAmount();
       }
       /**
        * 
@@ -578,7 +288,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getAmount() {
-        return amount_;
+        return instance.getAmount();
       }
       /**
        * 
@@ -590,9 +300,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setAmount(long value) {
-        bitField0_ |= 0x00000001;
-        amount_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setAmount(value);
         return this;
       }
       /**
@@ -604,13 +313,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearAmount() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        amount_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearAmount();
         return this;
       }
 
-      private com.google.protobuf.ByteString script_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * usually one of the standard Script forms
@@ -621,7 +328,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasScript() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasScript();
       }
       /**
        * 
@@ -633,7 +340,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getScript() {
-        return script_;
+        return instance.getScript();
       }
       /**
        * 
@@ -645,12 +352,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setScript(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        script_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setScript(value);
         return this;
       }
       /**
@@ -662,67 +365,93 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearScript() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        script_ = getDefaultInstance().getScript();
-        onChanged();
+        copyOnWrite();
+        instance.clearScript();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:payments.Output)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.protocols.payments.Protos.Output();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "amount_",
+              "script_",
+            };
+            java.lang.String info =
+                "\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0001\u0001\u1003\u0000\u0002" +
+                "\u150a\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.protocols.payments.Protos.Output.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:payments.Output)
     private static final org.bitcoin.protocols.payments.Protos.Output DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.Output();
+      Output defaultInstance = new Output();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        Output.class, defaultInstance);
     }
 
     public static org.bitcoin.protocols.payments.Protos.Output getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public Output parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Output(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.protocols.payments.Protos.Output getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface PaymentDetailsOrBuilder extends
       // @@protoc_insertion_point(interface_extends:payments.PaymentDetails)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -778,24 +507,6 @@ public final class Protos {
      * repeated .payments.Output outputs = 2;
      */
     int getOutputsCount();
-    /**
-     * 
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - java.util.List - getOutputsOrBuilderList(); - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( - int index); /** *
@@ -915,134 +626,21 @@ public final class Protos {
   /**
    * Protobuf type {@code payments.PaymentDetails}
    */
-  public static final class PaymentDetails extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class PaymentDetails extends
+      com.google.protobuf.GeneratedMessageLite<
+          PaymentDetails, PaymentDetails.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.PaymentDetails)
       PaymentDetailsOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use PaymentDetails.newBuilder() to construct.
-    private PaymentDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private PaymentDetails() {
       network_ = "main";
-      outputs_ = java.util.Collections.emptyList();
+      outputs_ = emptyProtobufList();
       memo_ = "";
       paymentUrl_ = "";
       merchantData_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new PaymentDetails();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PaymentDetails(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000001;
-              network_ = bs;
-              break;
-            }
-            case 18: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                outputs_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              outputs_.add(
-                  input.readMessage(org.bitcoin.protocols.payments.Protos.Output.PARSER, extensionRegistry));
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000002;
-              time_ = input.readUInt64();
-              break;
-            }
-            case 32: {
-              bitField0_ |= 0x00000004;
-              expires_ = input.readUInt64();
-              break;
-            }
-            case 42: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000008;
-              memo_ = bs;
-              break;
-            }
-            case 50: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000010;
-              paymentUrl_ = bs;
-              break;
-            }
-            case 58: {
-              bitField0_ |= 0x00000020;
-              merchantData_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          outputs_ = java.util.Collections.unmodifiableList(outputs_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.PaymentDetails.class, org.bitcoin.protocols.payments.Protos.PaymentDetails.Builder.class);
-    }
-
     private int bitField0_;
     public static final int NETWORK_FIELD_NUMBER = 1;
-    private volatile java.lang.Object network_;
+    private java.lang.String network_;
     /**
      * 
      * "main" or "test"
@@ -1065,18 +663,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getNetwork() {
-      java.lang.Object ref = network_;
-      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()) {
-          network_ = s;
-        }
-        return s;
-      }
+      return network_;
     }
     /**
      * 
@@ -1089,20 +676,49 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getNetworkBytes() {
-      java.lang.Object ref = network_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        network_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(network_);
+    }
+    /**
+     * 
+     * "main" or "test"
+     * 
+ * + * optional string network = 1 [default = "main"]; + * @param value The network to set. + */ + private void setNetwork( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000001; + network_ = value; + } + /** + *
+     * "main" or "test"
+     * 
+ * + * optional string network = 1 [default = "main"]; + */ + private void clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000001); + network_ = getDefaultInstance().getNetwork(); + } + /** + *
+     * "main" or "test"
+     * 
+ * + * optional string network = 1 [default = "main"]; + * @param value The bytes for network to set. + */ + private void setNetworkBytes( + com.google.protobuf.ByteString value) { + network_ = value.toStringUtf8(); + bitField0_ |= 0x00000001; } public static final int OUTPUTS_FIELD_NUMBER = 2; - private java.util.List outputs_; + private com.google.protobuf.Internal.ProtobufList outputs_; /** *
      * Where payment should be sent
@@ -1121,7 +737,6 @@ public final class Protos {
      *
      * repeated .payments.Output outputs = 2;
      */
-    @java.lang.Override
     public java.util.List 
         getOutputsOrBuilderList() {
       return outputs_;
@@ -1155,11 +770,90 @@ public final class Protos {
      *
      * repeated .payments.Output outputs = 2;
      */
-    @java.lang.Override
     public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder(
         int index) {
       return outputs_.get(index);
     }
+    private void ensureOutputsIsMutable() {
+      com.google.protobuf.Internal.ProtobufList tmp = outputs_;
+      if (!tmp.isModifiable()) {
+        outputs_ =
+            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
+       }
+    }
+
+    /**
+     * 
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void setOutputs( + int index, org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureOutputsIsMutable(); + outputs_.set(index, value); + } + /** + *
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void addOutputs(org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureOutputsIsMutable(); + outputs_.add(value); + } + /** + *
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void addOutputs( + int index, org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureOutputsIsMutable(); + outputs_.add(index, value); + } + /** + *
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void addAllOutputs( + java.lang.Iterable values) { + ensureOutputsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, outputs_); + } + /** + *
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void clearOutputs() { + outputs_ = emptyProtobufList(); + } + /** + *
+     * Where payment should be sent
+     * 
+ * + * repeated .payments.Output outputs = 2; + */ + private void removeOutputs(int index) { + ensureOutputsIsMutable(); + outputs_.remove(index); + } public static final int TIME_FIELD_NUMBER = 3; private long time_; @@ -1187,6 +881,29 @@ public final class Protos { public long getTime() { return time_; } + /** + *
+     * Timestamp; when payment request created
+     * 
+ * + * required uint64 time = 3; + * @param value The time to set. + */ + private void setTime(long value) { + bitField0_ |= 0x00000002; + time_ = value; + } + /** + *
+     * Timestamp; when payment request created
+     * 
+ * + * required uint64 time = 3; + */ + private void clearTime() { + bitField0_ = (bitField0_ & ~0x00000002); + time_ = 0L; + } public static final int EXPIRES_FIELD_NUMBER = 4; private long expires_; @@ -1214,9 +931,32 @@ public final class Protos { public long getExpires() { return expires_; } + /** + *
+     * Timestamp; when this request should be considered invalid
+     * 
+ * + * optional uint64 expires = 4; + * @param value The expires to set. + */ + private void setExpires(long value) { + bitField0_ |= 0x00000004; + expires_ = value; + } + /** + *
+     * Timestamp; when this request should be considered invalid
+     * 
+ * + * optional uint64 expires = 4; + */ + private void clearExpires() { + bitField0_ = (bitField0_ & ~0x00000004); + expires_ = 0L; + } public static final int MEMO_FIELD_NUMBER = 5; - private volatile java.lang.Object memo_; + private java.lang.String memo_; /** *
      * Human-readable description of request for the customer
@@ -1239,18 +979,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getMemo() {
-      java.lang.Object ref = memo_;
-      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()) {
-          memo_ = s;
-        }
-        return s;
-      }
+      return memo_;
     }
     /**
      * 
@@ -1263,20 +992,49 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getMemoBytes() {
-      java.lang.Object ref = memo_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        memo_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(memo_);
+    }
+    /**
+     * 
+     * Human-readable description of request for the customer
+     * 
+ * + * optional string memo = 5; + * @param value The memo to set. + */ + private void setMemo( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000008; + memo_ = value; + } + /** + *
+     * Human-readable description of request for the customer
+     * 
+ * + * optional string memo = 5; + */ + private void clearMemo() { + bitField0_ = (bitField0_ & ~0x00000008); + memo_ = getDefaultInstance().getMemo(); + } + /** + *
+     * Human-readable description of request for the customer
+     * 
+ * + * optional string memo = 5; + * @param value The bytes for memo to set. + */ + private void setMemoBytes( + com.google.protobuf.ByteString value) { + memo_ = value.toStringUtf8(); + bitField0_ |= 0x00000008; } public static final int PAYMENT_URL_FIELD_NUMBER = 6; - private volatile java.lang.Object paymentUrl_; + private java.lang.String paymentUrl_; /** *
      * URL to send Payment and get PaymentACK
@@ -1299,18 +1057,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getPaymentUrl() {
-      java.lang.Object ref = paymentUrl_;
-      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()) {
-          paymentUrl_ = s;
-        }
-        return s;
-      }
+      return paymentUrl_;
     }
     /**
      * 
@@ -1323,16 +1070,45 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getPaymentUrlBytes() {
-      java.lang.Object ref = paymentUrl_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        paymentUrl_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(paymentUrl_);
+    }
+    /**
+     * 
+     * URL to send Payment and get PaymentACK
+     * 
+ * + * optional string payment_url = 6; + * @param value The paymentUrl to set. + */ + private void setPaymentUrl( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000010; + paymentUrl_ = value; + } + /** + *
+     * URL to send Payment and get PaymentACK
+     * 
+ * + * optional string payment_url = 6; + */ + private void clearPaymentUrl() { + bitField0_ = (bitField0_ & ~0x00000010); + paymentUrl_ = getDefaultInstance().getPaymentUrl(); + } + /** + *
+     * URL to send Payment and get PaymentACK
+     * 
+ * + * optional string payment_url = 6; + * @param value The bytes for paymentUrl to set. + */ + private void setPaymentUrlBytes( + com.google.protobuf.ByteString value) { + paymentUrl_ = value.toStringUtf8(); + bitField0_ |= 0x00000010; } public static final int MERCHANT_DATA_FIELD_NUMBER = 7; @@ -1361,525 +1137,126 @@ public final class Protos { public com.google.protobuf.ByteString getMerchantData() { return merchantData_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasTime()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getOutputsCount(); i++) { - if (!getOutputs(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * Arbitrary data to include in the Payment message
+     * 
+ * + * optional bytes merchant_data = 7; + * @param value The merchantData to set. + */ + private void setMerchantData(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000020; + merchantData_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); - } - for (int i = 0; i < outputs_.size(); i++) { - output.writeMessage(2, outputs_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(3, time_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt64(4, expires_); - } - if (((bitField0_ & 0x00000008) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, memo_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, paymentUrl_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeBytes(7, merchantData_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); - } - for (int i = 0; i < outputs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, outputs_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, time_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, expires_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, memo_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, paymentUrl_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, merchantData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.PaymentDetails)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.PaymentDetails other = (org.bitcoin.protocols.payments.Protos.PaymentDetails) obj; - - if (hasNetwork() != other.hasNetwork()) return false; - if (hasNetwork()) { - if (!getNetwork() - .equals(other.getNetwork())) return false; - } - if (!getOutputsList() - .equals(other.getOutputsList())) return false; - if (hasTime() != other.hasTime()) return false; - if (hasTime()) { - if (getTime() - != other.getTime()) return false; - } - if (hasExpires() != other.hasExpires()) return false; - if (hasExpires()) { - if (getExpires() - != other.getExpires()) return false; - } - if (hasMemo() != other.hasMemo()) return false; - if (hasMemo()) { - if (!getMemo() - .equals(other.getMemo())) return false; - } - if (hasPaymentUrl() != other.hasPaymentUrl()) return false; - if (hasPaymentUrl()) { - if (!getPaymentUrl() - .equals(other.getPaymentUrl())) return false; - } - if (hasMerchantData() != other.hasMerchantData()) return false; - if (hasMerchantData()) { - if (!getMerchantData() - .equals(other.getMerchantData())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNetwork()) { - hash = (37 * hash) + NETWORK_FIELD_NUMBER; - hash = (53 * hash) + getNetwork().hashCode(); - } - if (getOutputsCount() > 0) { - hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; - hash = (53 * hash) + getOutputsList().hashCode(); - } - if (hasTime()) { - hash = (37 * hash) + TIME_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTime()); - } - if (hasExpires()) { - hash = (37 * hash) + EXPIRES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getExpires()); - } - if (hasMemo()) { - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - } - if (hasPaymentUrl()) { - hash = (37 * hash) + PAYMENT_URL_FIELD_NUMBER; - hash = (53 * hash) + getPaymentUrl().hashCode(); - } - if (hasMerchantData()) { - hash = (37 * hash) + MERCHANT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getMerchantData().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * Arbitrary data to include in the Payment message
+     * 
+ * + * optional bytes merchant_data = 7; + */ + private void clearMerchantData() { + bitField0_ = (bitField0_ & ~0x00000020); + merchantData_ = getDefaultInstance().getMerchantData(); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code payments.PaymentDetails} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.protocols.payments.Protos.PaymentDetails, Builder> implements // @@protoc_insertion_point(builder_implements:payments.PaymentDetails) org.bitcoin.protocols.payments.Protos.PaymentDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.protocols.payments.Protos.PaymentDetails.class, org.bitcoin.protocols.payments.Protos.PaymentDetails.Builder.class); - } - // Construct using org.bitcoin.protocols.payments.Protos.PaymentDetails.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getOutputsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - network_ = "main"; - bitField0_ = (bitField0_ & ~0x00000001); - if (outputsBuilder_ == null) { - outputs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - outputsBuilder_.clear(); - } - time_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - expires_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - memo_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - paymentUrl_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - merchantData_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentDetails_descriptor; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentDetails getDefaultInstanceForType() { - return org.bitcoin.protocols.payments.Protos.PaymentDetails.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentDetails build() { - org.bitcoin.protocols.payments.Protos.PaymentDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentDetails buildPartial() { - org.bitcoin.protocols.payments.Protos.PaymentDetails result = new org.bitcoin.protocols.payments.Protos.PaymentDetails(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.network_ = network_; - if (outputsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - outputs_ = java.util.Collections.unmodifiableList(outputs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.outputs_ = outputs_; - } else { - result.outputs_ = outputsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.time_ = time_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.expires_ = expires_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.memo_ = memo_; - if (((from_bitField0_ & 0x00000020) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.paymentUrl_ = paymentUrl_; - if (((from_bitField0_ & 0x00000040) != 0)) { - to_bitField0_ |= 0x00000020; - } - result.merchantData_ = merchantData_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentDetails) { - return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentDetails other) { - if (other == org.bitcoin.protocols.payments.Protos.PaymentDetails.getDefaultInstance()) return this; - if (other.hasNetwork()) { - bitField0_ |= 0x00000001; - network_ = other.network_; - onChanged(); - } - if (outputsBuilder_ == null) { - if (!other.outputs_.isEmpty()) { - if (outputs_.isEmpty()) { - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureOutputsIsMutable(); - outputs_.addAll(other.outputs_); - } - onChanged(); - } - } else { - if (!other.outputs_.isEmpty()) { - if (outputsBuilder_.isEmpty()) { - outputsBuilder_.dispose(); - outputsBuilder_ = null; - outputs_ = other.outputs_; - bitField0_ = (bitField0_ & ~0x00000002); - outputsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOutputsFieldBuilder() : null; - } else { - outputsBuilder_.addAllMessages(other.outputs_); - } - } - } - if (other.hasTime()) { - setTime(other.getTime()); - } - if (other.hasExpires()) { - setExpires(other.getExpires()); - } - if (other.hasMemo()) { - bitField0_ |= 0x00000010; - memo_ = other.memo_; - onChanged(); - } - if (other.hasPaymentUrl()) { - bitField0_ |= 0x00000020; - paymentUrl_ = other.paymentUrl_; - onChanged(); - } - if (other.hasMerchantData()) { - setMerchantData(other.getMerchantData()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasTime()) { - return false; - } - for (int i = 0; i < getOutputsCount(); i++) { - if (!getOutputs(i).isInitialized()) { - return false; - } - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.protocols.payments.Protos.PaymentDetails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object network_ = "main"; /** *
        * "main" or "test"
@@ -1888,8 +1265,9 @@ public final class Protos {
        * optional string network = 1 [default = "main"];
        * @return Whether the network field is set.
        */
+      @java.lang.Override
       public boolean hasNetwork() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasNetwork();
       }
       /**
        * 
@@ -1899,19 +1277,9 @@ public final class Protos {
        * optional string network = 1 [default = "main"];
        * @return The network.
        */
+      @java.lang.Override
       public java.lang.String getNetwork() {
-        java.lang.Object ref = network_;
-        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()) {
-            network_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getNetwork();
       }
       /**
        * 
@@ -1921,18 +1289,10 @@ public final class Protos {
        * optional string network = 1 [default = "main"];
        * @return The bytes for network.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getNetworkBytes() {
-        java.lang.Object ref = network_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          network_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getNetworkBytes();
       }
       /**
        * 
@@ -1945,12 +1305,8 @@ public final class Protos {
        */
       public Builder setNetwork(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        network_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setNetwork(value);
         return this;
       }
       /**
@@ -1962,9 +1318,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearNetwork() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        network_ = getDefaultInstance().getNetwork();
-        onChanged();
+        copyOnWrite();
+        instance.clearNetwork();
         return this;
       }
       /**
@@ -1978,27 +1333,11 @@ public final class Protos {
        */
       public Builder setNetworkBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        network_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setNetworkBytes(value);
         return this;
       }
 
-      private java.util.List outputs_ =
-        java.util.Collections.emptyList();
-      private void ensureOutputsIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
-          outputs_ = new java.util.ArrayList(outputs_);
-          bitField0_ |= 0x00000002;
-         }
-      }
-
-      private com.google.protobuf.RepeatedFieldBuilderV3<
-          org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> outputsBuilder_;
-
       /**
        * 
        * Where payment should be sent
@@ -2006,12 +1345,10 @@ public final class Protos {
        *
        * repeated .payments.Output outputs = 2;
        */
+      @java.lang.Override
       public java.util.List getOutputsList() {
-        if (outputsBuilder_ == null) {
-          return java.util.Collections.unmodifiableList(outputs_);
-        } else {
-          return outputsBuilder_.getMessageList();
-        }
+        return java.util.Collections.unmodifiableList(
+            instance.getOutputsList());
       }
       /**
        * 
@@ -2020,26 +1357,19 @@ public final class Protos {
        *
        * repeated .payments.Output outputs = 2;
        */
+      @java.lang.Override
       public int getOutputsCount() {
-        if (outputsBuilder_ == null) {
-          return outputs_.size();
-        } else {
-          return outputsBuilder_.getCount();
-        }
-      }
-      /**
+        return instance.getOutputsCount();
+      }/**
        * 
        * Where payment should be sent
        * 
* * repeated .payments.Output outputs = 2; */ + @java.lang.Override public org.bitcoin.protocols.payments.Protos.Output getOutputs(int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); - } else { - return outputsBuilder_.getMessage(index); - } + return instance.getOutputs(index); } /** *
@@ -2050,16 +1380,8 @@ public final class Protos {
        */
       public Builder setOutputs(
           int index, org.bitcoin.protocols.payments.Protos.Output value) {
-        if (outputsBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureOutputsIsMutable();
-          outputs_.set(index, value);
-          onChanged();
-        } else {
-          outputsBuilder_.setMessage(index, value);
-        }
+        copyOnWrite();
+        instance.setOutputs(index, value);
         return this;
       }
       /**
@@ -2071,13 +1393,9 @@ public final class Protos {
        */
       public Builder setOutputs(
           int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (outputsBuilder_ == null) {
-          ensureOutputsIsMutable();
-          outputs_.set(index, builderForValue.build());
-          onChanged();
-        } else {
-          outputsBuilder_.setMessage(index, builderForValue.build());
-        }
+        copyOnWrite();
+        instance.setOutputs(index,
+            builderForValue.build());
         return this;
       }
       /**
@@ -2088,16 +1406,8 @@ public final class Protos {
        * repeated .payments.Output outputs = 2;
        */
       public Builder addOutputs(org.bitcoin.protocols.payments.Protos.Output value) {
-        if (outputsBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureOutputsIsMutable();
-          outputs_.add(value);
-          onChanged();
-        } else {
-          outputsBuilder_.addMessage(value);
-        }
+        copyOnWrite();
+        instance.addOutputs(value);
         return this;
       }
       /**
@@ -2109,16 +1419,8 @@ public final class Protos {
        */
       public Builder addOutputs(
           int index, org.bitcoin.protocols.payments.Protos.Output value) {
-        if (outputsBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureOutputsIsMutable();
-          outputs_.add(index, value);
-          onChanged();
-        } else {
-          outputsBuilder_.addMessage(index, value);
-        }
+        copyOnWrite();
+        instance.addOutputs(index, value);
         return this;
       }
       /**
@@ -2130,13 +1432,8 @@ public final class Protos {
        */
       public Builder addOutputs(
           org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (outputsBuilder_ == null) {
-          ensureOutputsIsMutable();
-          outputs_.add(builderForValue.build());
-          onChanged();
-        } else {
-          outputsBuilder_.addMessage(builderForValue.build());
-        }
+        copyOnWrite();
+        instance.addOutputs(builderForValue.build());
         return this;
       }
       /**
@@ -2148,13 +1445,9 @@ public final class Protos {
        */
       public Builder addOutputs(
           int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (outputsBuilder_ == null) {
-          ensureOutputsIsMutable();
-          outputs_.add(index, builderForValue.build());
-          onChanged();
-        } else {
-          outputsBuilder_.addMessage(index, builderForValue.build());
-        }
+        copyOnWrite();
+        instance.addOutputs(index,
+            builderForValue.build());
         return this;
       }
       /**
@@ -2166,14 +1459,8 @@ public final class Protos {
        */
       public Builder addAllOutputs(
           java.lang.Iterable values) {
-        if (outputsBuilder_ == null) {
-          ensureOutputsIsMutable();
-          com.google.protobuf.AbstractMessageLite.Builder.addAll(
-              values, outputs_);
-          onChanged();
-        } else {
-          outputsBuilder_.addAllMessages(values);
-        }
+        copyOnWrite();
+        instance.addAllOutputs(values);
         return this;
       }
       /**
@@ -2184,13 +1471,8 @@ public final class Protos {
        * repeated .payments.Output outputs = 2;
        */
       public Builder clearOutputs() {
-        if (outputsBuilder_ == null) {
-          outputs_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000002);
-          onChanged();
-        } else {
-          outputsBuilder_.clear();
-        }
+        copyOnWrite();
+        instance.clearOutputs();
         return this;
       }
       /**
@@ -2201,105 +1483,11 @@ public final class Protos {
        * repeated .payments.Output outputs = 2;
        */
       public Builder removeOutputs(int index) {
-        if (outputsBuilder_ == null) {
-          ensureOutputsIsMutable();
-          outputs_.remove(index);
-          onChanged();
-        } else {
-          outputsBuilder_.remove(index);
-        }
+        copyOnWrite();
+        instance.removeOutputs(index);
         return this;
       }
-      /**
-       * 
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder getOutputsBuilder( - int index) { - return getOutputsFieldBuilder().getBuilder(index); - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getOutputsOrBuilder( - int index) { - if (outputsBuilder_ == null) { - return outputs_.get(index); } else { - return outputsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public java.util.List - getOutputsOrBuilderList() { - if (outputsBuilder_ != null) { - return outputsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(outputs_); - } - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder addOutputsBuilder() { - return getOutputsFieldBuilder().addBuilder( - org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder addOutputsBuilder( - int index) { - return getOutputsFieldBuilder().addBuilder( - index, org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public java.util.List - getOutputsBuilderList() { - return getOutputsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> - getOutputsFieldBuilder() { - if (outputsBuilder_ == null) { - outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder>( - outputs_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - outputs_ = null; - } - return outputsBuilder_; - } - private long time_ ; /** *
        * Timestamp; when payment request created
@@ -2310,7 +1498,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasTime() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasTime();
       }
       /**
        * 
@@ -2322,7 +1510,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getTime() {
-        return time_;
+        return instance.getTime();
       }
       /**
        * 
@@ -2334,9 +1522,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setTime(long value) {
-        bitField0_ |= 0x00000004;
-        time_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setTime(value);
         return this;
       }
       /**
@@ -2348,13 +1535,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearTime() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        time_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearTime();
         return this;
       }
 
-      private long expires_ ;
       /**
        * 
        * Timestamp; when this request should be considered invalid
@@ -2365,7 +1550,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasExpires() {
-        return ((bitField0_ & 0x00000008) != 0);
+        return instance.hasExpires();
       }
       /**
        * 
@@ -2377,7 +1562,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getExpires() {
-        return expires_;
+        return instance.getExpires();
       }
       /**
        * 
@@ -2389,9 +1574,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setExpires(long value) {
-        bitField0_ |= 0x00000008;
-        expires_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setExpires(value);
         return this;
       }
       /**
@@ -2403,13 +1587,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearExpires() {
-        bitField0_ = (bitField0_ & ~0x00000008);
-        expires_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearExpires();
         return this;
       }
 
-      private java.lang.Object memo_ = "";
       /**
        * 
        * Human-readable description of request for the customer
@@ -2418,8 +1600,9 @@ public final class Protos {
        * optional string memo = 5;
        * @return Whether the memo field is set.
        */
+      @java.lang.Override
       public boolean hasMemo() {
-        return ((bitField0_ & 0x00000010) != 0);
+        return instance.hasMemo();
       }
       /**
        * 
@@ -2429,19 +1612,9 @@ public final class Protos {
        * optional string memo = 5;
        * @return The memo.
        */
+      @java.lang.Override
       public java.lang.String getMemo() {
-        java.lang.Object ref = memo_;
-        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()) {
-            memo_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getMemo();
       }
       /**
        * 
@@ -2451,18 +1624,10 @@ public final class Protos {
        * optional string memo = 5;
        * @return The bytes for memo.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getMemoBytes() {
-        java.lang.Object ref = memo_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          memo_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getMemoBytes();
       }
       /**
        * 
@@ -2475,12 +1640,8 @@ public final class Protos {
        */
       public Builder setMemo(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000010;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemo(value);
         return this;
       }
       /**
@@ -2492,9 +1653,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearMemo() {
-        bitField0_ = (bitField0_ & ~0x00000010);
-        memo_ = getDefaultInstance().getMemo();
-        onChanged();
+        copyOnWrite();
+        instance.clearMemo();
         return this;
       }
       /**
@@ -2508,16 +1668,11 @@ public final class Protos {
        */
       public Builder setMemoBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000010;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemoBytes(value);
         return this;
       }
 
-      private java.lang.Object paymentUrl_ = "";
       /**
        * 
        * URL to send Payment and get PaymentACK
@@ -2526,8 +1681,9 @@ public final class Protos {
        * optional string payment_url = 6;
        * @return Whether the paymentUrl field is set.
        */
+      @java.lang.Override
       public boolean hasPaymentUrl() {
-        return ((bitField0_ & 0x00000020) != 0);
+        return instance.hasPaymentUrl();
       }
       /**
        * 
@@ -2537,19 +1693,9 @@ public final class Protos {
        * optional string payment_url = 6;
        * @return The paymentUrl.
        */
+      @java.lang.Override
       public java.lang.String getPaymentUrl() {
-        java.lang.Object ref = paymentUrl_;
-        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()) {
-            paymentUrl_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getPaymentUrl();
       }
       /**
        * 
@@ -2559,18 +1705,10 @@ public final class Protos {
        * optional string payment_url = 6;
        * @return The bytes for paymentUrl.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getPaymentUrlBytes() {
-        java.lang.Object ref = paymentUrl_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          paymentUrl_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getPaymentUrlBytes();
       }
       /**
        * 
@@ -2583,12 +1721,8 @@ public final class Protos {
        */
       public Builder setPaymentUrl(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000020;
-        paymentUrl_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPaymentUrl(value);
         return this;
       }
       /**
@@ -2600,9 +1734,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearPaymentUrl() {
-        bitField0_ = (bitField0_ & ~0x00000020);
-        paymentUrl_ = getDefaultInstance().getPaymentUrl();
-        onChanged();
+        copyOnWrite();
+        instance.clearPaymentUrl();
         return this;
       }
       /**
@@ -2616,16 +1749,11 @@ public final class Protos {
        */
       public Builder setPaymentUrlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000020;
-        paymentUrl_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPaymentUrlBytes(value);
         return this;
       }
 
-      private com.google.protobuf.ByteString merchantData_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Arbitrary data to include in the Payment message
@@ -2636,7 +1764,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasMerchantData() {
-        return ((bitField0_ & 0x00000040) != 0);
+        return instance.hasMerchantData();
       }
       /**
        * 
@@ -2648,7 +1776,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getMerchantData() {
-        return merchantData_;
+        return instance.getMerchantData();
       }
       /**
        * 
@@ -2660,12 +1788,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setMerchantData(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000040;
-        merchantData_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMerchantData(value);
         return this;
       }
       /**
@@ -2677,67 +1801,100 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearMerchantData() {
-        bitField0_ = (bitField0_ & ~0x00000040);
-        merchantData_ = getDefaultInstance().getMerchantData();
-        onChanged();
+        copyOnWrite();
+        instance.clearMerchantData();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:payments.PaymentDetails)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.protocols.payments.Protos.PaymentDetails();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "network_",
+              "outputs_",
+              org.bitcoin.protocols.payments.Protos.Output.class,
+              "time_",
+              "expires_",
+              "memo_",
+              "paymentUrl_",
+              "merchantData_",
+            };
+            java.lang.String info =
+                "\u0001\u0007\u0000\u0001\u0001\u0007\u0007\u0000\u0001\u0002\u0001\u1008\u0000\u0002" +
+                "\u041b\u0003\u1503\u0001\u0004\u1003\u0002\u0005\u1008\u0003\u0006\u1008\u0004\u0007" +
+                "\u100a\u0005";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.protocols.payments.Protos.PaymentDetails.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:payments.PaymentDetails)
     private static final org.bitcoin.protocols.payments.Protos.PaymentDetails DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.PaymentDetails();
+      PaymentDetails defaultInstance = new PaymentDetails();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        PaymentDetails.class, defaultInstance);
     }
 
     public static org.bitcoin.protocols.payments.Protos.PaymentDetails getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public PaymentDetails parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PaymentDetails(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.protocols.payments.Protos.PaymentDetails getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface PaymentRequestOrBuilder extends
       // @@protoc_insertion_point(interface_extends:payments.PaymentRequest)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * optional uint32 payment_details_version = 1 [default = 1];
@@ -2839,15 +1996,11 @@ public final class Protos {
   /**
    * Protobuf type {@code payments.PaymentRequest}
    */
-  public static final class PaymentRequest extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class PaymentRequest extends
+      com.google.protobuf.GeneratedMessageLite<
+          PaymentRequest, PaymentRequest.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.PaymentRequest)
       PaymentRequestOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use PaymentRequest.newBuilder() to construct.
-    private PaymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private PaymentRequest() {
       paymentDetailsVersion_ = 1;
       pkiType_ = "none";
@@ -2855,96 +2008,6 @@ public final class Protos {
       serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY;
       signature_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new PaymentRequest();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PaymentRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 8: {
-              bitField0_ |= 0x00000001;
-              paymentDetailsVersion_ = input.readUInt32();
-              break;
-            }
-            case 18: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000002;
-              pkiType_ = bs;
-              break;
-            }
-            case 26: {
-              bitField0_ |= 0x00000004;
-              pkiData_ = input.readBytes();
-              break;
-            }
-            case 34: {
-              bitField0_ |= 0x00000008;
-              serializedPaymentDetails_ = input.readBytes();
-              break;
-            }
-            case 42: {
-              bitField0_ |= 0x00000010;
-              signature_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.PaymentRequest.class, org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder.class);
-    }
-
     private int bitField0_;
     public static final int PAYMENT_DETAILS_VERSION_FIELD_NUMBER = 1;
     private int paymentDetailsVersion_;
@@ -2964,9 +2027,24 @@ public final class Protos {
     public int getPaymentDetailsVersion() {
       return paymentDetailsVersion_;
     }
+    /**
+     * optional uint32 payment_details_version = 1 [default = 1];
+     * @param value The paymentDetailsVersion to set.
+     */
+    private void setPaymentDetailsVersion(int value) {
+      bitField0_ |= 0x00000001;
+      paymentDetailsVersion_ = value;
+    }
+    /**
+     * optional uint32 payment_details_version = 1 [default = 1];
+     */
+    private void clearPaymentDetailsVersion() {
+      bitField0_ = (bitField0_ & ~0x00000001);
+      paymentDetailsVersion_ = 1;
+    }
 
     public static final int PKI_TYPE_FIELD_NUMBER = 2;
-    private volatile java.lang.Object pkiType_;
+    private java.lang.String pkiType_;
     /**
      * 
      * none / x509+sha256 / x509+sha1
@@ -2989,18 +2067,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getPkiType() {
-      java.lang.Object ref = pkiType_;
-      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()) {
-          pkiType_ = s;
-        }
-        return s;
-      }
+      return pkiType_;
     }
     /**
      * 
@@ -3013,16 +2080,45 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getPkiTypeBytes() {
-      java.lang.Object ref = pkiType_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        pkiType_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(pkiType_);
+    }
+    /**
+     * 
+     * none / x509+sha256 / x509+sha1
+     * 
+ * + * optional string pki_type = 2 [default = "none"]; + * @param value The pkiType to set. + */ + private void setPkiType( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000002; + pkiType_ = value; + } + /** + *
+     * none / x509+sha256 / x509+sha1
+     * 
+ * + * optional string pki_type = 2 [default = "none"]; + */ + private void clearPkiType() { + bitField0_ = (bitField0_ & ~0x00000002); + pkiType_ = getDefaultInstance().getPkiType(); + } + /** + *
+     * none / x509+sha256 / x509+sha1
+     * 
+ * + * optional string pki_type = 2 [default = "none"]; + * @param value The bytes for pkiType to set. + */ + private void setPkiTypeBytes( + com.google.protobuf.ByteString value) { + pkiType_ = value.toStringUtf8(); + bitField0_ |= 0x00000002; } public static final int PKI_DATA_FIELD_NUMBER = 3; @@ -3051,6 +2147,30 @@ public final class Protos { public com.google.protobuf.ByteString getPkiData() { return pkiData_; } + /** + *
+     * depends on pki_type
+     * 
+ * + * optional bytes pki_data = 3; + * @param value The pkiData to set. + */ + private void setPkiData(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000004; + pkiData_ = value; + } + /** + *
+     * depends on pki_type
+     * 
+ * + * optional bytes pki_data = 3; + */ + private void clearPkiData() { + bitField0_ = (bitField0_ & ~0x00000004); + pkiData_ = getDefaultInstance().getPkiData(); + } public static final int SERIALIZED_PAYMENT_DETAILS_FIELD_NUMBER = 4; private com.google.protobuf.ByteString serializedPaymentDetails_; @@ -3078,6 +2198,30 @@ public final class Protos { public com.google.protobuf.ByteString getSerializedPaymentDetails() { return serializedPaymentDetails_; } + /** + *
+     * PaymentDetails
+     * 
+ * + * required bytes serialized_payment_details = 4; + * @param value The serializedPaymentDetails to set. + */ + private void setSerializedPaymentDetails(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000008; + serializedPaymentDetails_ = value; + } + /** + *
+     * PaymentDetails
+     * 
+ * + * required bytes serialized_payment_details = 4; + */ + private void clearSerializedPaymentDetails() { + bitField0_ = (bitField0_ & ~0x00000008); + serializedPaymentDetails_ = getDefaultInstance().getSerializedPaymentDetails(); + } public static final int SIGNATURE_FIELD_NUMBER = 5; private com.google.protobuf.ByteString signature_; @@ -3105,437 +2249,133 @@ public final class Protos { public com.google.protobuf.ByteString getSignature() { return signature_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasSerializedPaymentDetails()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * pki-dependent signature
+     * 
+ * + * optional bytes signature = 5; + * @param value The signature to set. + */ + private void setSignature(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000010; + signature_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeUInt32(1, paymentDetailsVersion_); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pkiType_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBytes(3, pkiData_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBytes(4, serializedPaymentDetails_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeBytes(5, signature_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, paymentDetailsVersion_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pkiType_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, pkiData_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, serializedPaymentDetails_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, signature_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.PaymentRequest)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.PaymentRequest other = (org.bitcoin.protocols.payments.Protos.PaymentRequest) obj; - - if (hasPaymentDetailsVersion() != other.hasPaymentDetailsVersion()) return false; - if (hasPaymentDetailsVersion()) { - if (getPaymentDetailsVersion() - != other.getPaymentDetailsVersion()) return false; - } - if (hasPkiType() != other.hasPkiType()) return false; - if (hasPkiType()) { - if (!getPkiType() - .equals(other.getPkiType())) return false; - } - if (hasPkiData() != other.hasPkiData()) return false; - if (hasPkiData()) { - if (!getPkiData() - .equals(other.getPkiData())) return false; - } - if (hasSerializedPaymentDetails() != other.hasSerializedPaymentDetails()) return false; - if (hasSerializedPaymentDetails()) { - if (!getSerializedPaymentDetails() - .equals(other.getSerializedPaymentDetails())) return false; - } - if (hasSignature() != other.hasSignature()) return false; - if (hasSignature()) { - if (!getSignature() - .equals(other.getSignature())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPaymentDetailsVersion()) { - hash = (37 * hash) + PAYMENT_DETAILS_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getPaymentDetailsVersion(); - } - if (hasPkiType()) { - hash = (37 * hash) + PKI_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPkiType().hashCode(); - } - if (hasPkiData()) { - hash = (37 * hash) + PKI_DATA_FIELD_NUMBER; - hash = (53 * hash) + getPkiData().hashCode(); - } - if (hasSerializedPaymentDetails()) { - hash = (37 * hash) + SERIALIZED_PAYMENT_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getSerializedPaymentDetails().hashCode(); - } - if (hasSignature()) { - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * pki-dependent signature
+     * 
+ * + * optional bytes signature = 5; + */ + private void clearSignature() { + bitField0_ = (bitField0_ & ~0x00000010); + signature_ = getDefaultInstance().getSignature(); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code payments.PaymentRequest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.protocols.payments.Protos.PaymentRequest, Builder> implements // @@protoc_insertion_point(builder_implements:payments.PaymentRequest) org.bitcoin.protocols.payments.Protos.PaymentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.protocols.payments.Protos.PaymentRequest.class, org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder.class); - } - // Construct using org.bitcoin.protocols.payments.Protos.PaymentRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - paymentDetailsVersion_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - pkiType_ = "none"; - bitField0_ = (bitField0_ & ~0x00000002); - pkiData_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - signature_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentRequest_descriptor; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentRequest getDefaultInstanceForType() { - return org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentRequest build() { - org.bitcoin.protocols.payments.Protos.PaymentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentRequest buildPartial() { - org.bitcoin.protocols.payments.Protos.PaymentRequest result = new org.bitcoin.protocols.payments.Protos.PaymentRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.paymentDetailsVersion_ = paymentDetailsVersion_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.pkiType_ = pkiType_; - if (((from_bitField0_ & 0x00000004) != 0)) { - to_bitField0_ |= 0x00000004; - } - result.pkiData_ = pkiData_; - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000008; - } - result.serializedPaymentDetails_ = serializedPaymentDetails_; - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000010; - } - result.signature_ = signature_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentRequest) { - return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentRequest other) { - if (other == org.bitcoin.protocols.payments.Protos.PaymentRequest.getDefaultInstance()) return this; - if (other.hasPaymentDetailsVersion()) { - setPaymentDetailsVersion(other.getPaymentDetailsVersion()); - } - if (other.hasPkiType()) { - bitField0_ |= 0x00000002; - pkiType_ = other.pkiType_; - onChanged(); - } - if (other.hasPkiData()) { - setPkiData(other.getPkiData()); - } - if (other.hasSerializedPaymentDetails()) { - setSerializedPaymentDetails(other.getSerializedPaymentDetails()); - } - if (other.hasSignature()) { - setSignature(other.getSignature()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasSerializedPaymentDetails()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.protocols.payments.Protos.PaymentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int paymentDetailsVersion_ = 1; /** * optional uint32 payment_details_version = 1 [default = 1]; * @return Whether the paymentDetailsVersion field is set. */ @java.lang.Override public boolean hasPaymentDetailsVersion() { - return ((bitField0_ & 0x00000001) != 0); + return instance.hasPaymentDetailsVersion(); } /** * optional uint32 payment_details_version = 1 [default = 1]; @@ -3543,7 +2383,7 @@ public final class Protos { */ @java.lang.Override public int getPaymentDetailsVersion() { - return paymentDetailsVersion_; + return instance.getPaymentDetailsVersion(); } /** * optional uint32 payment_details_version = 1 [default = 1]; @@ -3551,9 +2391,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder setPaymentDetailsVersion(int value) { - bitField0_ |= 0x00000001; - paymentDetailsVersion_ = value; - onChanged(); + copyOnWrite(); + instance.setPaymentDetailsVersion(value); return this; } /** @@ -3561,13 +2400,11 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearPaymentDetailsVersion() { - bitField0_ = (bitField0_ & ~0x00000001); - paymentDetailsVersion_ = 1; - onChanged(); + copyOnWrite(); + instance.clearPaymentDetailsVersion(); return this; } - private java.lang.Object pkiType_ = "none"; /** *
        * none / x509+sha256 / x509+sha1
@@ -3576,8 +2413,9 @@ public final class Protos {
        * optional string pki_type = 2 [default = "none"];
        * @return Whether the pkiType field is set.
        */
+      @java.lang.Override
       public boolean hasPkiType() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasPkiType();
       }
       /**
        * 
@@ -3587,19 +2425,9 @@ public final class Protos {
        * optional string pki_type = 2 [default = "none"];
        * @return The pkiType.
        */
+      @java.lang.Override
       public java.lang.String getPkiType() {
-        java.lang.Object ref = pkiType_;
-        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()) {
-            pkiType_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getPkiType();
       }
       /**
        * 
@@ -3609,18 +2437,10 @@ public final class Protos {
        * optional string pki_type = 2 [default = "none"];
        * @return The bytes for pkiType.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getPkiTypeBytes() {
-        java.lang.Object ref = pkiType_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          pkiType_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getPkiTypeBytes();
       }
       /**
        * 
@@ -3633,12 +2453,8 @@ public final class Protos {
        */
       public Builder setPkiType(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        pkiType_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPkiType(value);
         return this;
       }
       /**
@@ -3650,9 +2466,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearPkiType() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        pkiType_ = getDefaultInstance().getPkiType();
-        onChanged();
+        copyOnWrite();
+        instance.clearPkiType();
         return this;
       }
       /**
@@ -3666,16 +2481,11 @@ public final class Protos {
        */
       public Builder setPkiTypeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        pkiType_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPkiTypeBytes(value);
         return this;
       }
 
-      private com.google.protobuf.ByteString pkiData_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * depends on pki_type
@@ -3686,7 +2496,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasPkiData() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasPkiData();
       }
       /**
        * 
@@ -3698,7 +2508,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getPkiData() {
-        return pkiData_;
+        return instance.getPkiData();
       }
       /**
        * 
@@ -3710,12 +2520,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setPkiData(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000004;
-        pkiData_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPkiData(value);
         return this;
       }
       /**
@@ -3727,13 +2533,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearPkiData() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        pkiData_ = getDefaultInstance().getPkiData();
-        onChanged();
+        copyOnWrite();
+        instance.clearPkiData();
         return this;
       }
 
-      private com.google.protobuf.ByteString serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * PaymentDetails
@@ -3744,7 +2548,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasSerializedPaymentDetails() {
-        return ((bitField0_ & 0x00000008) != 0);
+        return instance.hasSerializedPaymentDetails();
       }
       /**
        * 
@@ -3756,7 +2560,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getSerializedPaymentDetails() {
-        return serializedPaymentDetails_;
+        return instance.getSerializedPaymentDetails();
       }
       /**
        * 
@@ -3768,12 +2572,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setSerializedPaymentDetails(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000008;
-        serializedPaymentDetails_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setSerializedPaymentDetails(value);
         return this;
       }
       /**
@@ -3785,13 +2585,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearSerializedPaymentDetails() {
-        bitField0_ = (bitField0_ & ~0x00000008);
-        serializedPaymentDetails_ = getDefaultInstance().getSerializedPaymentDetails();
-        onChanged();
+        copyOnWrite();
+        instance.clearSerializedPaymentDetails();
         return this;
       }
 
-      private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * pki-dependent signature
@@ -3802,7 +2600,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasSignature() {
-        return ((bitField0_ & 0x00000010) != 0);
+        return instance.hasSignature();
       }
       /**
        * 
@@ -3814,7 +2612,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getSignature() {
-        return signature_;
+        return instance.getSignature();
       }
       /**
        * 
@@ -3826,12 +2624,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setSignature(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000010;
-        signature_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setSignature(value);
         return this;
       }
       /**
@@ -3843,67 +2637,96 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearSignature() {
-        bitField0_ = (bitField0_ & ~0x00000010);
-        signature_ = getDefaultInstance().getSignature();
-        onChanged();
+        copyOnWrite();
+        instance.clearSignature();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:payments.PaymentRequest)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.protocols.payments.Protos.PaymentRequest();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "paymentDetailsVersion_",
+              "pkiType_",
+              "pkiData_",
+              "serializedPaymentDetails_",
+              "signature_",
+            };
+            java.lang.String info =
+                "\u0001\u0005\u0000\u0001\u0001\u0005\u0005\u0000\u0000\u0001\u0001\u100b\u0000\u0002" +
+                "\u1008\u0001\u0003\u100a\u0002\u0004\u150a\u0003\u0005\u100a\u0004";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.protocols.payments.Protos.PaymentRequest.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:payments.PaymentRequest)
     private static final org.bitcoin.protocols.payments.Protos.PaymentRequest DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.PaymentRequest();
+      PaymentRequest defaultInstance = new PaymentRequest();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        PaymentRequest.class, defaultInstance);
     }
 
     public static org.bitcoin.protocols.payments.Protos.PaymentRequest getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public PaymentRequest parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PaymentRequest(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.protocols.payments.Protos.PaymentRequest getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface X509CertificatesOrBuilder extends
       // @@protoc_insertion_point(interface_extends:payments.X509Certificates)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -3937,95 +2760,16 @@ public final class Protos {
   /**
    * Protobuf type {@code payments.X509Certificates}
    */
-  public static final class X509Certificates extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class X509Certificates extends
+      com.google.protobuf.GeneratedMessageLite<
+          X509Certificates, X509Certificates.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.X509Certificates)
       X509CertificatesOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use X509Certificates.newBuilder() to construct.
-    private X509Certificates(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private X509Certificates() {
-      certificate_ = java.util.Collections.emptyList();
+      certificate_ = emptyProtobufList();
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new X509Certificates();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private X509Certificates(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                certificate_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              certificate_.add(input.readBytes());
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          certificate_ = java.util.Collections.unmodifiableList(certificate_); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.X509Certificates.class, org.bitcoin.protocols.payments.Protos.X509Certificates.Builder.class);
-    }
-
     public static final int CERTIFICATE_FIELD_NUMBER = 1;
-    private java.util.List certificate_;
+    private com.google.protobuf.Internal.ProtobufList certificate_;
     /**
      * 
      * DER-encoded X.509 certificate chain
@@ -4047,6 +2791,7 @@ public final class Protos {
      * repeated bytes certificate = 1;
      * @return The count of certificate.
      */
+    @java.lang.Override
     public int getCertificateCount() {
       return certificate_.size();
     }
@@ -4059,339 +2804,165 @@ public final class Protos {
      * @param index The index of the element to return.
      * @return The certificate at the given index.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString getCertificate(int index) {
       return certificate_.get(index);
     }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
+    private void ensureCertificateIsMutable() {
+      com.google.protobuf.Internal.ProtobufList tmp = certificate_;
+      if (!tmp.isModifiable()) {
+        certificate_ =
+            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
+       }
     }
-
-    @java.lang.Override
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      for (int i = 0; i < certificate_.size(); i++) {
-        output.writeBytes(1, certificate_.get(i));
-      }
-      unknownFields.writeTo(output);
+    /**
+     * 
+     * DER-encoded X.509 certificate chain
+     * 
+ * + * repeated bytes certificate = 1; + * @param index The index to set the value at. + * @param value The certificate to set. + */ + private void setCertificate( + int index, com.google.protobuf.ByteString value) { + value.getClass(); + ensureCertificateIsMutable(); + certificate_.set(index, value); } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < certificate_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(certificate_.get(i)); - } - size += dataSize; - size += 1 * getCertificateList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; + /** + *
+     * DER-encoded X.509 certificate chain
+     * 
+ * + * repeated bytes certificate = 1; + * @param value The certificate to add. + */ + private void addCertificate(com.google.protobuf.ByteString value) { + value.getClass(); + ensureCertificateIsMutable(); + certificate_.add(value); } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.X509Certificates)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.X509Certificates other = (org.bitcoin.protocols.payments.Protos.X509Certificates) obj; - - if (!getCertificateList() - .equals(other.getCertificateList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; + /** + *
+     * DER-encoded X.509 certificate chain
+     * 
+ * + * repeated bytes certificate = 1; + * @param values The certificate to add. + */ + private void addAllCertificate( + java.lang.Iterable values) { + ensureCertificateIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, certificate_); } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCertificateCount() > 0) { - hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; - hash = (53 * hash) + getCertificateList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * DER-encoded X.509 certificate chain
+     * 
+ * + * repeated bytes certificate = 1; + */ + private void clearCertificate() { + certificate_ = emptyProtobufList(); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.X509Certificates parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.X509Certificates prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code payments.X509Certificates} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.protocols.payments.Protos.X509Certificates, Builder> implements // @@protoc_insertion_point(builder_implements:payments.X509Certificates) org.bitcoin.protocols.payments.Protos.X509CertificatesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.protocols.payments.Protos.X509Certificates.class, org.bitcoin.protocols.payments.Protos.X509Certificates.Builder.class); - } - // Construct using org.bitcoin.protocols.payments.Protos.X509Certificates.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - certificate_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_X509Certificates_descriptor; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.X509Certificates getDefaultInstanceForType() { - return org.bitcoin.protocols.payments.Protos.X509Certificates.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.X509Certificates build() { - org.bitcoin.protocols.payments.Protos.X509Certificates result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.X509Certificates buildPartial() { - org.bitcoin.protocols.payments.Protos.X509Certificates result = new org.bitcoin.protocols.payments.Protos.X509Certificates(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - certificate_ = java.util.Collections.unmodifiableList(certificate_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.certificate_ = certificate_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.protocols.payments.Protos.X509Certificates) { - return mergeFrom((org.bitcoin.protocols.payments.Protos.X509Certificates)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.X509Certificates other) { - if (other == org.bitcoin.protocols.payments.Protos.X509Certificates.getDefaultInstance()) return this; - if (!other.certificate_.isEmpty()) { - if (certificate_.isEmpty()) { - certificate_ = other.certificate_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCertificateIsMutable(); - certificate_.addAll(other.certificate_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.protocols.payments.Protos.X509Certificates parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.protocols.payments.Protos.X509Certificates) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List certificate_ = java.util.Collections.emptyList(); - private void ensureCertificateIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - certificate_ = new java.util.ArrayList(certificate_); - bitField0_ |= 0x00000001; - } - } /** *
        * DER-encoded X.509 certificate chain
@@ -4400,10 +2971,11 @@ public final class Protos {
        * repeated bytes certificate = 1;
        * @return A list containing the certificate.
        */
+      @java.lang.Override
       public java.util.List
           getCertificateList() {
-        return ((bitField0_ & 0x00000001) != 0) ?
-                 java.util.Collections.unmodifiableList(certificate_) : certificate_;
+        return java.util.Collections.unmodifiableList(
+            instance.getCertificateList());
       }
       /**
        * 
@@ -4413,8 +2985,9 @@ public final class Protos {
        * repeated bytes certificate = 1;
        * @return The count of certificate.
        */
+      @java.lang.Override
       public int getCertificateCount() {
-        return certificate_.size();
+        return instance.getCertificateCount();
       }
       /**
        * 
@@ -4425,8 +2998,9 @@ public final class Protos {
        * @param index The index of the element to return.
        * @return The certificate at the given index.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString getCertificate(int index) {
-        return certificate_.get(index);
+        return instance.getCertificate(index);
       }
       /**
        * 
@@ -4434,18 +3008,13 @@ public final class Protos {
        * 
* * repeated bytes certificate = 1; - * @param index The index to set the value at. * @param value The certificate to set. * @return This builder for chaining. */ public Builder setCertificate( int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCertificateIsMutable(); - certificate_.set(index, value); - onChanged(); + copyOnWrite(); + instance.setCertificate(index, value); return this; } /** @@ -4458,12 +3027,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder addCertificate(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCertificateIsMutable(); - certificate_.add(value); - onChanged(); + copyOnWrite(); + instance.addCertificate(value); return this; } /** @@ -4477,10 +3042,8 @@ public final class Protos { */ public Builder addAllCertificate( java.lang.Iterable values) { - ensureCertificateIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, certificate_); - onChanged(); + copyOnWrite(); + instance.addAllCertificate(values); return this; } /** @@ -4492,67 +3055,88 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearCertificate() { - certificate_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + copyOnWrite(); + instance.clearCertificate(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:payments.X509Certificates) } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new org.bitcoin.protocols.payments.Protos.X509Certificates(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "certificate_", + }; + java.lang.String info = + "\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001c"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (org.bitcoin.protocols.payments.Protos.X509Certificates.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + // @@protoc_insertion_point(class_scope:payments.X509Certificates) private static final org.bitcoin.protocols.payments.Protos.X509Certificates DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.X509Certificates(); + X509Certificates defaultInstance = new X509Certificates(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + X509Certificates.class, defaultInstance); } public static org.bitcoin.protocols.payments.Protos.X509Certificates getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public X509Certificates parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new X509Certificates(input, extensionRegistry); - } - }; + private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { - return PARSER; + return DEFAULT_INSTANCE.getParserForType(); } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.X509Certificates getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } public interface PaymentOrBuilder extends // @@protoc_insertion_point(interface_extends:payments.Payment) - com.google.protobuf.MessageOrBuilder { + com.google.protobuf.MessageLiteOrBuilder { /** *
@@ -4627,24 +3211,6 @@ public final class Protos {
      * repeated .payments.Output refund_to = 3;
      */
     int getRefundToCount();
-    /**
-     * 
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - java.util.List - getRefundToOrBuilderList(); - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder( - int index); /** *
@@ -4678,119 +3244,17 @@ public final class Protos {
   /**
    * Protobuf type {@code payments.Payment}
    */
-  public static final class Payment extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class Payment extends
+      com.google.protobuf.GeneratedMessageLite<
+          Payment, Payment.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.Payment)
       PaymentOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use Payment.newBuilder() to construct.
-    private Payment(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private Payment() {
       merchantData_ = com.google.protobuf.ByteString.EMPTY;
-      transactions_ = java.util.Collections.emptyList();
-      refundTo_ = java.util.Collections.emptyList();
+      transactions_ = emptyProtobufList();
+      refundTo_ = emptyProtobufList();
       memo_ = "";
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new Payment();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Payment(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              bitField0_ |= 0x00000001;
-              merchantData_ = input.readBytes();
-              break;
-            }
-            case 18: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                transactions_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              transactions_.add(input.readBytes());
-              break;
-            }
-            case 26: {
-              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
-                refundTo_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000004;
-              }
-              refundTo_.add(
-                  input.readMessage(org.bitcoin.protocols.payments.Protos.Output.PARSER, extensionRegistry));
-              break;
-            }
-            case 34: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000002;
-              memo_ = bs;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          transactions_ = java.util.Collections.unmodifiableList(transactions_); // C
-        }
-        if (((mutable_bitField0_ & 0x00000004) != 0)) {
-          refundTo_ = java.util.Collections.unmodifiableList(refundTo_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.Payment.class, org.bitcoin.protocols.payments.Protos.Payment.Builder.class);
-    }
-
     private int bitField0_;
     public static final int MERCHANT_DATA_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString merchantData_;
@@ -4818,9 +3282,33 @@ public final class Protos {
     public com.google.protobuf.ByteString getMerchantData() {
       return merchantData_;
     }
+    /**
+     * 
+     * From PaymentDetails.merchant_data
+     * 
+ * + * optional bytes merchant_data = 1; + * @param value The merchantData to set. + */ + private void setMerchantData(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000001; + merchantData_ = value; + } + /** + *
+     * From PaymentDetails.merchant_data
+     * 
+ * + * optional bytes merchant_data = 1; + */ + private void clearMerchantData() { + bitField0_ = (bitField0_ & ~0x00000001); + merchantData_ = getDefaultInstance().getMerchantData(); + } public static final int TRANSACTIONS_FIELD_NUMBER = 2; - private java.util.List transactions_; + private com.google.protobuf.Internal.ProtobufList transactions_; /** *
      * Signed transactions that satisfy PaymentDetails.outputs
@@ -4842,6 +3330,7 @@ public final class Protos {
      * repeated bytes transactions = 2;
      * @return The count of transactions.
      */
+    @java.lang.Override
     public int getTransactionsCount() {
       return transactions_.size();
     }
@@ -4854,12 +3343,72 @@ public final class Protos {
      * @param index The index of the element to return.
      * @return The transactions at the given index.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString getTransactions(int index) {
       return transactions_.get(index);
     }
+    private void ensureTransactionsIsMutable() {
+      com.google.protobuf.Internal.ProtobufList tmp = transactions_;
+      if (!tmp.isModifiable()) {
+        transactions_ =
+            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
+       }
+    }
+    /**
+     * 
+     * Signed transactions that satisfy PaymentDetails.outputs
+     * 
+ * + * repeated bytes transactions = 2; + * @param index The index to set the value at. + * @param value The transactions to set. + */ + private void setTransactions( + int index, com.google.protobuf.ByteString value) { + value.getClass(); + ensureTransactionsIsMutable(); + transactions_.set(index, value); + } + /** + *
+     * Signed transactions that satisfy PaymentDetails.outputs
+     * 
+ * + * repeated bytes transactions = 2; + * @param value The transactions to add. + */ + private void addTransactions(com.google.protobuf.ByteString value) { + value.getClass(); + ensureTransactionsIsMutable(); + transactions_.add(value); + } + /** + *
+     * Signed transactions that satisfy PaymentDetails.outputs
+     * 
+ * + * repeated bytes transactions = 2; + * @param values The transactions to add. + */ + private void addAllTransactions( + java.lang.Iterable values) { + ensureTransactionsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, transactions_); + } + /** + *
+     * Signed transactions that satisfy PaymentDetails.outputs
+     * 
+ * + * repeated bytes transactions = 2; + */ + private void clearTransactions() { + transactions_ = emptyProtobufList(); + } public static final int REFUND_TO_FIELD_NUMBER = 3; - private java.util.List refundTo_; + private com.google.protobuf.Internal.ProtobufList refundTo_; /** *
      * Where to send refunds, if a refund is necessary
@@ -4878,7 +3427,6 @@ public final class Protos {
      *
      * repeated .payments.Output refund_to = 3;
      */
-    @java.lang.Override
     public java.util.List 
         getRefundToOrBuilderList() {
       return refundTo_;
@@ -4912,14 +3460,93 @@ public final class Protos {
      *
      * repeated .payments.Output refund_to = 3;
      */
-    @java.lang.Override
     public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder(
         int index) {
       return refundTo_.get(index);
     }
+    private void ensureRefundToIsMutable() {
+      com.google.protobuf.Internal.ProtobufList tmp = refundTo_;
+      if (!tmp.isModifiable()) {
+        refundTo_ =
+            com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp);
+       }
+    }
+
+    /**
+     * 
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void setRefundTo( + int index, org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureRefundToIsMutable(); + refundTo_.set(index, value); + } + /** + *
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void addRefundTo(org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureRefundToIsMutable(); + refundTo_.add(value); + } + /** + *
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void addRefundTo( + int index, org.bitcoin.protocols.payments.Protos.Output value) { + value.getClass(); + ensureRefundToIsMutable(); + refundTo_.add(index, value); + } + /** + *
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void addAllRefundTo( + java.lang.Iterable values) { + ensureRefundToIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, refundTo_); + } + /** + *
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void clearRefundTo() { + refundTo_ = emptyProtobufList(); + } + /** + *
+     * Where to send refunds, if a refund is necessary
+     * 
+ * + * repeated .payments.Output refund_to = 3; + */ + private void removeRefundTo(int index) { + ensureRefundToIsMutable(); + refundTo_.remove(index); + } public static final int MEMO_FIELD_NUMBER = 4; - private volatile java.lang.Object memo_; + private java.lang.String memo_; /** *
      * Human-readable message for the merchant
@@ -4942,18 +3569,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getMemo() {
-      java.lang.Object ref = memo_;
-      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()) {
-          memo_ = s;
-        }
-        return s;
-      }
+      return memo_;
     }
     /**
      * 
@@ -4966,460 +3582,142 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getMemoBytes() {
-      java.lang.Object ref = memo_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        memo_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(memo_);
     }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      for (int i = 0; i < getRefundToCount(); i++) {
-        if (!getRefundTo(i).isInitialized()) {
-          memoizedIsInitialized = 0;
-          return false;
-        }
-      }
-      memoizedIsInitialized = 1;
-      return true;
+    /**
+     * 
+     * Human-readable message for the merchant
+     * 
+ * + * optional string memo = 4; + * @param value The memo to set. + */ + private void setMemo( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000002; + memo_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, merchantData_); - } - for (int i = 0; i < transactions_.size(); i++) { - output.writeBytes(2, transactions_.get(i)); - } - for (int i = 0; i < refundTo_.size(); i++) { - output.writeMessage(3, refundTo_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, memo_); - } - unknownFields.writeTo(output); + /** + *
+     * Human-readable message for the merchant
+     * 
+ * + * optional string memo = 4; + */ + private void clearMemo() { + bitField0_ = (bitField0_ & ~0x00000002); + memo_ = getDefaultInstance().getMemo(); } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, merchantData_); - } - { - int dataSize = 0; - for (int i = 0; i < transactions_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(transactions_.get(i)); - } - size += dataSize; - size += 1 * getTransactionsList().size(); - } - for (int i = 0; i < refundTo_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, refundTo_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, memo_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.Payment)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.Payment other = (org.bitcoin.protocols.payments.Protos.Payment) obj; - - if (hasMerchantData() != other.hasMerchantData()) return false; - if (hasMerchantData()) { - if (!getMerchantData() - .equals(other.getMerchantData())) return false; - } - if (!getTransactionsList() - .equals(other.getTransactionsList())) return false; - if (!getRefundToList() - .equals(other.getRefundToList())) return false; - if (hasMemo() != other.hasMemo()) return false; - if (hasMemo()) { - if (!getMemo() - .equals(other.getMemo())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMerchantData()) { - hash = (37 * hash) + MERCHANT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getMerchantData().hashCode(); - } - if (getTransactionsCount() > 0) { - hash = (37 * hash) + TRANSACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getTransactionsList().hashCode(); - } - if (getRefundToCount() > 0) { - hash = (37 * hash) + REFUND_TO_FIELD_NUMBER; - hash = (53 * hash) + getRefundToList().hashCode(); - } - if (hasMemo()) { - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * Human-readable message for the merchant
+     * 
+ * + * optional string memo = 4; + * @param value The bytes for memo to set. + */ + private void setMemoBytes( + com.google.protobuf.ByteString value) { + memo_ = value.toStringUtf8(); + bitField0_ |= 0x00000002; } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Payment parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.Payment parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.Payment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code payments.Payment} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.protocols.payments.Protos.Payment, Builder> implements // @@protoc_insertion_point(builder_implements:payments.Payment) org.bitcoin.protocols.payments.Protos.PaymentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.protocols.payments.Protos.Payment.class, org.bitcoin.protocols.payments.Protos.Payment.Builder.class); - } - // Construct using org.bitcoin.protocols.payments.Protos.Payment.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRefundToFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - merchantData_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - transactions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - if (refundToBuilder_ == null) { - refundTo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - refundToBuilder_.clear(); - } - memo_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_Payment_descriptor; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Payment getDefaultInstanceForType() { - return org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Payment build() { - org.bitcoin.protocols.payments.Protos.Payment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Payment buildPartial() { - org.bitcoin.protocols.payments.Protos.Payment result = new org.bitcoin.protocols.payments.Protos.Payment(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.merchantData_ = merchantData_; - if (((bitField0_ & 0x00000002) != 0)) { - transactions_ = java.util.Collections.unmodifiableList(transactions_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.transactions_ = transactions_; - if (refundToBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - refundTo_ = java.util.Collections.unmodifiableList(refundTo_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.refundTo_ = refundTo_; - } else { - result.refundTo_ = refundToBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.memo_ = memo_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.protocols.payments.Protos.Payment) { - return mergeFrom((org.bitcoin.protocols.payments.Protos.Payment)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.Payment other) { - if (other == org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance()) return this; - if (other.hasMerchantData()) { - setMerchantData(other.getMerchantData()); - } - if (!other.transactions_.isEmpty()) { - if (transactions_.isEmpty()) { - transactions_ = other.transactions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTransactionsIsMutable(); - transactions_.addAll(other.transactions_); - } - onChanged(); - } - if (refundToBuilder_ == null) { - if (!other.refundTo_.isEmpty()) { - if (refundTo_.isEmpty()) { - refundTo_ = other.refundTo_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRefundToIsMutable(); - refundTo_.addAll(other.refundTo_); - } - onChanged(); - } - } else { - if (!other.refundTo_.isEmpty()) { - if (refundToBuilder_.isEmpty()) { - refundToBuilder_.dispose(); - refundToBuilder_ = null; - refundTo_ = other.refundTo_; - bitField0_ = (bitField0_ & ~0x00000004); - refundToBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRefundToFieldBuilder() : null; - } else { - refundToBuilder_.addAllMessages(other.refundTo_); - } - } - } - if (other.hasMemo()) { - bitField0_ |= 0x00000008; - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - for (int i = 0; i < getRefundToCount(); i++) { - if (!getRefundTo(i).isInitialized()) { - return false; - } - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.protocols.payments.Protos.Payment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.protocols.payments.Protos.Payment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString merchantData_ = com.google.protobuf.ByteString.EMPTY; /** *
        * From PaymentDetails.merchant_data
@@ -5430,7 +3728,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasMerchantData() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasMerchantData();
       }
       /**
        * 
@@ -5442,7 +3740,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getMerchantData() {
-        return merchantData_;
+        return instance.getMerchantData();
       }
       /**
        * 
@@ -5454,12 +3752,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setMerchantData(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        merchantData_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMerchantData(value);
         return this;
       }
       /**
@@ -5471,19 +3765,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearMerchantData() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        merchantData_ = getDefaultInstance().getMerchantData();
-        onChanged();
+        copyOnWrite();
+        instance.clearMerchantData();
         return this;
       }
 
-      private java.util.List transactions_ = java.util.Collections.emptyList();
-      private void ensureTransactionsIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
-          transactions_ = new java.util.ArrayList(transactions_);
-          bitField0_ |= 0x00000002;
-         }
-      }
       /**
        * 
        * Signed transactions that satisfy PaymentDetails.outputs
@@ -5492,10 +3778,11 @@ public final class Protos {
        * repeated bytes transactions = 2;
        * @return A list containing the transactions.
        */
+      @java.lang.Override
       public java.util.List
           getTransactionsList() {
-        return ((bitField0_ & 0x00000002) != 0) ?
-                 java.util.Collections.unmodifiableList(transactions_) : transactions_;
+        return java.util.Collections.unmodifiableList(
+            instance.getTransactionsList());
       }
       /**
        * 
@@ -5505,8 +3792,9 @@ public final class Protos {
        * repeated bytes transactions = 2;
        * @return The count of transactions.
        */
+      @java.lang.Override
       public int getTransactionsCount() {
-        return transactions_.size();
+        return instance.getTransactionsCount();
       }
       /**
        * 
@@ -5517,8 +3805,9 @@ public final class Protos {
        * @param index The index of the element to return.
        * @return The transactions at the given index.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString getTransactions(int index) {
-        return transactions_.get(index);
+        return instance.getTransactions(index);
       }
       /**
        * 
@@ -5526,18 +3815,13 @@ public final class Protos {
        * 
* * repeated bytes transactions = 2; - * @param index The index to set the value at. * @param value The transactions to set. * @return This builder for chaining. */ public Builder setTransactions( int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransactionsIsMutable(); - transactions_.set(index, value); - onChanged(); + copyOnWrite(); + instance.setTransactions(index, value); return this; } /** @@ -5550,12 +3834,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder addTransactions(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransactionsIsMutable(); - transactions_.add(value); - onChanged(); + copyOnWrite(); + instance.addTransactions(value); return this; } /** @@ -5569,10 +3849,8 @@ public final class Protos { */ public Builder addAllTransactions( java.lang.Iterable values) { - ensureTransactionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transactions_); - onChanged(); + copyOnWrite(); + instance.addAllTransactions(values); return this; } /** @@ -5584,24 +3862,11 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearTransactions() { - transactions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + copyOnWrite(); + instance.clearTransactions(); return this; } - private java.util.List refundTo_ = - java.util.Collections.emptyList(); - private void ensureRefundToIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - refundTo_ = new java.util.ArrayList(refundTo_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> refundToBuilder_; - /** *
        * Where to send refunds, if a refund is necessary
@@ -5609,12 +3874,10 @@ public final class Protos {
        *
        * repeated .payments.Output refund_to = 3;
        */
+      @java.lang.Override
       public java.util.List getRefundToList() {
-        if (refundToBuilder_ == null) {
-          return java.util.Collections.unmodifiableList(refundTo_);
-        } else {
-          return refundToBuilder_.getMessageList();
-        }
+        return java.util.Collections.unmodifiableList(
+            instance.getRefundToList());
       }
       /**
        * 
@@ -5623,26 +3886,19 @@ public final class Protos {
        *
        * repeated .payments.Output refund_to = 3;
        */
+      @java.lang.Override
       public int getRefundToCount() {
-        if (refundToBuilder_ == null) {
-          return refundTo_.size();
-        } else {
-          return refundToBuilder_.getCount();
-        }
-      }
-      /**
+        return instance.getRefundToCount();
+      }/**
        * 
        * Where to send refunds, if a refund is necessary
        * 
* * repeated .payments.Output refund_to = 3; */ + @java.lang.Override public org.bitcoin.protocols.payments.Protos.Output getRefundTo(int index) { - if (refundToBuilder_ == null) { - return refundTo_.get(index); - } else { - return refundToBuilder_.getMessage(index); - } + return instance.getRefundTo(index); } /** *
@@ -5653,16 +3909,8 @@ public final class Protos {
        */
       public Builder setRefundTo(
           int index, org.bitcoin.protocols.payments.Protos.Output value) {
-        if (refundToBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureRefundToIsMutable();
-          refundTo_.set(index, value);
-          onChanged();
-        } else {
-          refundToBuilder_.setMessage(index, value);
-        }
+        copyOnWrite();
+        instance.setRefundTo(index, value);
         return this;
       }
       /**
@@ -5674,13 +3922,9 @@ public final class Protos {
        */
       public Builder setRefundTo(
           int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (refundToBuilder_ == null) {
-          ensureRefundToIsMutable();
-          refundTo_.set(index, builderForValue.build());
-          onChanged();
-        } else {
-          refundToBuilder_.setMessage(index, builderForValue.build());
-        }
+        copyOnWrite();
+        instance.setRefundTo(index,
+            builderForValue.build());
         return this;
       }
       /**
@@ -5691,16 +3935,8 @@ public final class Protos {
        * repeated .payments.Output refund_to = 3;
        */
       public Builder addRefundTo(org.bitcoin.protocols.payments.Protos.Output value) {
-        if (refundToBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureRefundToIsMutable();
-          refundTo_.add(value);
-          onChanged();
-        } else {
-          refundToBuilder_.addMessage(value);
-        }
+        copyOnWrite();
+        instance.addRefundTo(value);
         return this;
       }
       /**
@@ -5712,16 +3948,8 @@ public final class Protos {
        */
       public Builder addRefundTo(
           int index, org.bitcoin.protocols.payments.Protos.Output value) {
-        if (refundToBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureRefundToIsMutable();
-          refundTo_.add(index, value);
-          onChanged();
-        } else {
-          refundToBuilder_.addMessage(index, value);
-        }
+        copyOnWrite();
+        instance.addRefundTo(index, value);
         return this;
       }
       /**
@@ -5733,13 +3961,8 @@ public final class Protos {
        */
       public Builder addRefundTo(
           org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (refundToBuilder_ == null) {
-          ensureRefundToIsMutable();
-          refundTo_.add(builderForValue.build());
-          onChanged();
-        } else {
-          refundToBuilder_.addMessage(builderForValue.build());
-        }
+        copyOnWrite();
+        instance.addRefundTo(builderForValue.build());
         return this;
       }
       /**
@@ -5751,13 +3974,9 @@ public final class Protos {
        */
       public Builder addRefundTo(
           int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) {
-        if (refundToBuilder_ == null) {
-          ensureRefundToIsMutable();
-          refundTo_.add(index, builderForValue.build());
-          onChanged();
-        } else {
-          refundToBuilder_.addMessage(index, builderForValue.build());
-        }
+        copyOnWrite();
+        instance.addRefundTo(index,
+            builderForValue.build());
         return this;
       }
       /**
@@ -5769,14 +3988,8 @@ public final class Protos {
        */
       public Builder addAllRefundTo(
           java.lang.Iterable values) {
-        if (refundToBuilder_ == null) {
-          ensureRefundToIsMutable();
-          com.google.protobuf.AbstractMessageLite.Builder.addAll(
-              values, refundTo_);
-          onChanged();
-        } else {
-          refundToBuilder_.addAllMessages(values);
-        }
+        copyOnWrite();
+        instance.addAllRefundTo(values);
         return this;
       }
       /**
@@ -5787,13 +4000,8 @@ public final class Protos {
        * repeated .payments.Output refund_to = 3;
        */
       public Builder clearRefundTo() {
-        if (refundToBuilder_ == null) {
-          refundTo_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000004);
-          onChanged();
-        } else {
-          refundToBuilder_.clear();
-        }
+        copyOnWrite();
+        instance.clearRefundTo();
         return this;
       }
       /**
@@ -5804,105 +4012,11 @@ public final class Protos {
        * repeated .payments.Output refund_to = 3;
        */
       public Builder removeRefundTo(int index) {
-        if (refundToBuilder_ == null) {
-          ensureRefundToIsMutable();
-          refundTo_.remove(index);
-          onChanged();
-        } else {
-          refundToBuilder_.remove(index);
-        }
+        copyOnWrite();
+        instance.removeRefundTo(index);
         return this;
       }
-      /**
-       * 
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder getRefundToBuilder( - int index) { - return getRefundToFieldBuilder().getBuilder(index); - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public org.bitcoin.protocols.payments.Protos.OutputOrBuilder getRefundToOrBuilder( - int index) { - if (refundToBuilder_ == null) { - return refundTo_.get(index); } else { - return refundToBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public java.util.List - getRefundToOrBuilderList() { - if (refundToBuilder_ != null) { - return refundToBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(refundTo_); - } - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder addRefundToBuilder() { - return getRefundToFieldBuilder().addBuilder( - org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public org.bitcoin.protocols.payments.Protos.Output.Builder addRefundToBuilder( - int index) { - return getRefundToFieldBuilder().addBuilder( - index, org.bitcoin.protocols.payments.Protos.Output.getDefaultInstance()); - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public java.util.List - getRefundToBuilderList() { - return getRefundToFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder> - getRefundToFieldBuilder() { - if (refundToBuilder_ == null) { - refundToBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Output, org.bitcoin.protocols.payments.Protos.Output.Builder, org.bitcoin.protocols.payments.Protos.OutputOrBuilder>( - refundTo_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - refundTo_ = null; - } - return refundToBuilder_; - } - private java.lang.Object memo_ = ""; /** *
        * Human-readable message for the merchant
@@ -5911,8 +4025,9 @@ public final class Protos {
        * optional string memo = 4;
        * @return Whether the memo field is set.
        */
+      @java.lang.Override
       public boolean hasMemo() {
-        return ((bitField0_ & 0x00000008) != 0);
+        return instance.hasMemo();
       }
       /**
        * 
@@ -5922,19 +4037,9 @@ public final class Protos {
        * optional string memo = 4;
        * @return The memo.
        */
+      @java.lang.Override
       public java.lang.String getMemo() {
-        java.lang.Object ref = memo_;
-        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()) {
-            memo_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getMemo();
       }
       /**
        * 
@@ -5944,18 +4049,10 @@ public final class Protos {
        * optional string memo = 4;
        * @return The bytes for memo.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getMemoBytes() {
-        java.lang.Object ref = memo_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          memo_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getMemoBytes();
       }
       /**
        * 
@@ -5968,12 +4065,8 @@ public final class Protos {
        */
       public Builder setMemo(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000008;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemo(value);
         return this;
       }
       /**
@@ -5985,9 +4078,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearMemo() {
-        bitField0_ = (bitField0_ & ~0x00000008);
-        memo_ = getDefaultInstance().getMemo();
-        onChanged();
+        copyOnWrite();
+        instance.clearMemo();
         return this;
       }
       /**
@@ -6001,70 +4093,96 @@ public final class Protos {
        */
       public Builder setMemoBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000008;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemoBytes(value);
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:payments.Payment)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.protocols.payments.Protos.Payment();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "merchantData_",
+              "transactions_",
+              "refundTo_",
+              org.bitcoin.protocols.payments.Protos.Output.class,
+              "memo_",
+            };
+            java.lang.String info =
+                "\u0001\u0004\u0000\u0001\u0001\u0004\u0004\u0000\u0002\u0001\u0001\u100a\u0000\u0002" +
+                "\u001c\u0003\u041b\u0004\u1008\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.protocols.payments.Protos.Payment.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:payments.Payment)
     private static final org.bitcoin.protocols.payments.Protos.Payment DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.Payment();
+      Payment defaultInstance = new Payment();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        Payment.class, defaultInstance);
     }
 
     public static org.bitcoin.protocols.payments.Protos.Payment getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public Payment parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Payment(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.protocols.payments.Protos.Payment getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface PaymentACKOrBuilder extends
       // @@protoc_insertion_point(interface_extends:payments.PaymentACK)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -6084,14 +4202,6 @@ public final class Protos {
      * @return The payment.
      */
     org.bitcoin.protocols.payments.Protos.Payment getPayment();
-    /**
-     * 
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - */ - org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder(); /** *
@@ -6125,101 +4235,14 @@ public final class Protos {
   /**
    * Protobuf type {@code payments.PaymentACK}
    */
-  public static final class PaymentACK extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class PaymentACK extends
+      com.google.protobuf.GeneratedMessageLite<
+          PaymentACK, PaymentACK.Builder> implements
       // @@protoc_insertion_point(message_implements:payments.PaymentACK)
       PaymentACKOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use PaymentACK.newBuilder() to construct.
-    private PaymentACK(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private PaymentACK() {
       memo_ = "";
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new PaymentACK();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PaymentACK(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              org.bitcoin.protocols.payments.Protos.Payment.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000001) != 0)) {
-                subBuilder = payment_.toBuilder();
-              }
-              payment_ = input.readMessage(org.bitcoin.protocols.payments.Protos.Payment.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(payment_);
-                payment_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000001;
-              break;
-            }
-            case 18: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000002;
-              memo_ = bs;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoin.protocols.payments.Protos.PaymentACK.class, org.bitcoin.protocols.payments.Protos.PaymentACK.Builder.class);
-    }
-
     private int bitField0_;
     public static final int PAYMENT_FIELD_NUMBER = 1;
     private org.bitcoin.protocols.payments.Protos.Payment payment_;
@@ -6229,7 +4252,6 @@ public final class Protos {
      * 
* * required .payments.Payment payment = 1; - * @return Whether the payment field is set. */ @java.lang.Override public boolean hasPayment() { @@ -6241,7 +4263,6 @@ public final class Protos { *
* * required .payments.Payment payment = 1; - * @return The payment. */ @java.lang.Override public org.bitcoin.protocols.payments.Protos.Payment getPayment() { @@ -6254,13 +4275,43 @@ public final class Protos { * * required .payments.Payment payment = 1; */ - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder() { - return payment_ == null ? org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_; + private void setPayment(org.bitcoin.protocols.payments.Protos.Payment value) { + value.getClass(); + payment_ = value; + bitField0_ |= 0x00000001; + } + /** + *
+     * Payment message that triggered this ACK
+     * 
+ * + * required .payments.Payment payment = 1; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePayment(org.bitcoin.protocols.payments.Protos.Payment value) { + value.getClass(); + if (payment_ != null && + payment_ != org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance()) { + payment_ = + org.bitcoin.protocols.payments.Protos.Payment.newBuilder(payment_).mergeFrom(value).buildPartial(); + } else { + payment_ = value; + } + bitField0_ |= 0x00000001; + } + /** + *
+     * Payment message that triggered this ACK
+     * 
+ * + * required .payments.Payment payment = 1; + */ + private void clearPayment() { payment_ = null; + bitField0_ = (bitField0_ & ~0x00000001); } public static final int MEMO_FIELD_NUMBER = 2; - private volatile java.lang.Object memo_; + private java.lang.String memo_; /** *
      * human-readable message for customer
@@ -6283,18 +4334,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getMemo() {
-      java.lang.Object ref = memo_;
-      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()) {
-          memo_ = s;
-        }
-        return s;
-      }
+      return memo_;
     }
     /**
      * 
@@ -6307,394 +4347,152 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getMemoBytes() {
-      java.lang.Object ref = memo_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        memo_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(memo_);
     }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasPayment()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!getPayment().isInitialized()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
+    /**
+     * 
+     * human-readable message for customer
+     * 
+ * + * optional string memo = 2; + * @param value The memo to set. + */ + private void setMemo( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000002; + memo_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getPayment()); - } - if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_); - } - unknownFields.writeTo(output); + /** + *
+     * human-readable message for customer
+     * 
+ * + * optional string memo = 2; + */ + private void clearMemo() { + bitField0_ = (bitField0_ & ~0x00000002); + memo_ = getDefaultInstance().getMemo(); } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPayment()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, memo_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoin.protocols.payments.Protos.PaymentACK)) { - return super.equals(obj); - } - org.bitcoin.protocols.payments.Protos.PaymentACK other = (org.bitcoin.protocols.payments.Protos.PaymentACK) obj; - - if (hasPayment() != other.hasPayment()) return false; - if (hasPayment()) { - if (!getPayment() - .equals(other.getPayment())) return false; - } - if (hasMemo() != other.hasMemo()) return false; - if (hasMemo()) { - if (!getMemo() - .equals(other.getMemo())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPayment()) { - hash = (37 * hash) + PAYMENT_FIELD_NUMBER; - hash = (53 * hash) + getPayment().hashCode(); - } - if (hasMemo()) { - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * human-readable message for customer
+     * 
+ * + * optional string memo = 2; + * @param value The bytes for memo to set. + */ + private void setMemoBytes( + com.google.protobuf.ByteString value) { + memo_ = value.toStringUtf8(); + bitField0_ |= 0x00000002; } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoin.protocols.payments.Protos.PaymentACK parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentACK prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code payments.PaymentACK} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoin.protocols.payments.Protos.PaymentACK, Builder> implements // @@protoc_insertion_point(builder_implements:payments.PaymentACK) org.bitcoin.protocols.payments.Protos.PaymentACKOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoin.protocols.payments.Protos.PaymentACK.class, org.bitcoin.protocols.payments.Protos.PaymentACK.Builder.class); - } - // Construct using org.bitcoin.protocols.payments.Protos.PaymentACK.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPaymentFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (paymentBuilder_ == null) { - payment_ = null; - } else { - paymentBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - memo_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoin.protocols.payments.Protos.internal_static_payments_PaymentACK_descriptor; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentACK getDefaultInstanceForType() { - return org.bitcoin.protocols.payments.Protos.PaymentACK.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentACK build() { - org.bitcoin.protocols.payments.Protos.PaymentACK result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.PaymentACK buildPartial() { - org.bitcoin.protocols.payments.Protos.PaymentACK result = new org.bitcoin.protocols.payments.Protos.PaymentACK(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - if (paymentBuilder_ == null) { - result.payment_ = payment_; - } else { - result.payment_ = paymentBuilder_.build(); - } - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.memo_ = memo_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoin.protocols.payments.Protos.PaymentACK) { - return mergeFrom((org.bitcoin.protocols.payments.Protos.PaymentACK)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.bitcoin.protocols.payments.Protos.PaymentACK other) { - if (other == org.bitcoin.protocols.payments.Protos.PaymentACK.getDefaultInstance()) return this; - if (other.hasPayment()) { - mergePayment(other.getPayment()); - } - if (other.hasMemo()) { - bitField0_ |= 0x00000002; - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasPayment()) { - return false; - } - if (!getPayment().isInitialized()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoin.protocols.payments.Protos.PaymentACK parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoin.protocols.payments.Protos.PaymentACK) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private org.bitcoin.protocols.payments.Protos.Payment payment_; - private com.google.protobuf.SingleFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder> paymentBuilder_; /** *
        * Payment message that triggered this ACK
        * 
* * required .payments.Payment payment = 1; - * @return Whether the payment field is set. */ + @java.lang.Override public boolean hasPayment() { - return ((bitField0_ & 0x00000001) != 0); + return instance.hasPayment(); } /** *
@@ -6702,14 +4500,10 @@ public final class Protos {
        * 
* * required .payments.Payment payment = 1; - * @return The payment. */ + @java.lang.Override public org.bitcoin.protocols.payments.Protos.Payment getPayment() { - if (paymentBuilder_ == null) { - return payment_ == null ? org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_; - } else { - return paymentBuilder_.getMessage(); - } + return instance.getPayment(); } /** *
@@ -6719,18 +4513,10 @@ public final class Protos {
        * required .payments.Payment payment = 1;
        */
       public Builder setPayment(org.bitcoin.protocols.payments.Protos.Payment value) {
-        if (paymentBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          payment_ = value;
-          onChanged();
-        } else {
-          paymentBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000001;
+        copyOnWrite();
+        instance.setPayment(value);
         return this;
-      }
+        }
       /**
        * 
        * Payment message that triggered this ACK
@@ -6740,13 +4526,8 @@ public final class Protos {
        */
       public Builder setPayment(
           org.bitcoin.protocols.payments.Protos.Payment.Builder builderForValue) {
-        if (paymentBuilder_ == null) {
-          payment_ = builderForValue.build();
-          onChanged();
-        } else {
-          paymentBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000001;
+        copyOnWrite();
+        instance.setPayment(builderForValue.build());
         return this;
       }
       /**
@@ -6757,20 +4538,8 @@ public final class Protos {
        * required .payments.Payment payment = 1;
        */
       public Builder mergePayment(org.bitcoin.protocols.payments.Protos.Payment value) {
-        if (paymentBuilder_ == null) {
-          if (((bitField0_ & 0x00000001) != 0) &&
-              payment_ != null &&
-              payment_ != org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance()) {
-            payment_ =
-              org.bitcoin.protocols.payments.Protos.Payment.newBuilder(payment_).mergeFrom(value).buildPartial();
-          } else {
-            payment_ = value;
-          }
-          onChanged();
-        } else {
-          paymentBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000001;
+        copyOnWrite();
+        instance.mergePayment(value);
         return this;
       }
       /**
@@ -6780,65 +4549,11 @@ public final class Protos {
        *
        * required .payments.Payment payment = 1;
        */
-      public Builder clearPayment() {
-        if (paymentBuilder_ == null) {
-          payment_ = null;
-          onChanged();
-        } else {
-          paymentBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000001);
+      public Builder clearPayment() {  copyOnWrite();
+        instance.clearPayment();
         return this;
       }
-      /**
-       * 
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public org.bitcoin.protocols.payments.Protos.Payment.Builder getPaymentBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getPaymentFieldBuilder().getBuilder(); - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public org.bitcoin.protocols.payments.Protos.PaymentOrBuilder getPaymentOrBuilder() { - if (paymentBuilder_ != null) { - return paymentBuilder_.getMessageOrBuilder(); - } else { - return payment_ == null ? - org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_; - } - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder> - getPaymentFieldBuilder() { - if (paymentBuilder_ == null) { - paymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - org.bitcoin.protocols.payments.Protos.Payment, org.bitcoin.protocols.payments.Protos.Payment.Builder, org.bitcoin.protocols.payments.Protos.PaymentOrBuilder>( - getPayment(), - getParentForChildren(), - isClean()); - payment_ = null; - } - return paymentBuilder_; - } - private java.lang.Object memo_ = ""; /** *
        * human-readable message for customer
@@ -6847,8 +4562,9 @@ public final class Protos {
        * optional string memo = 2;
        * @return Whether the memo field is set.
        */
+      @java.lang.Override
       public boolean hasMemo() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasMemo();
       }
       /**
        * 
@@ -6858,19 +4574,9 @@ public final class Protos {
        * optional string memo = 2;
        * @return The memo.
        */
+      @java.lang.Override
       public java.lang.String getMemo() {
-        java.lang.Object ref = memo_;
-        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()) {
-            memo_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getMemo();
       }
       /**
        * 
@@ -6880,18 +4586,10 @@ public final class Protos {
        * optional string memo = 2;
        * @return The bytes for memo.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getMemoBytes() {
-        java.lang.Object ref = memo_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          memo_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getMemoBytes();
       }
       /**
        * 
@@ -6904,12 +4602,8 @@ public final class Protos {
        */
       public Builder setMemo(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemo(value);
         return this;
       }
       /**
@@ -6921,9 +4615,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearMemo() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        memo_ = getDefaultInstance().getMemo();
-        onChanged();
+        copyOnWrite();
+        instance.clearMemo();
         return this;
       }
       /**
@@ -6937,164 +4630,92 @@ public final class Protos {
        */
       public Builder setMemoBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        memo_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setMemoBytes(value);
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:payments.PaymentACK)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoin.protocols.payments.Protos.PaymentACK();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "payment_",
+              "memo_",
+            };
+            java.lang.String info =
+                "\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0001\u0001\u1509\u0000\u0002" +
+                "\u1008\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoin.protocols.payments.Protos.PaymentACK.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:payments.PaymentACK)
     private static final org.bitcoin.protocols.payments.Protos.PaymentACK DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoin.protocols.payments.Protos.PaymentACK();
+      PaymentACK defaultInstance = new PaymentACK();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        PaymentACK.class, defaultInstance);
     }
 
     public static org.bitcoin.protocols.payments.Protos.PaymentACK getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public PaymentACK parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PaymentACK(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoin.protocols.payments.Protos.PaymentACK getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_Output_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_Output_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_PaymentDetails_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_PaymentDetails_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_PaymentRequest_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_PaymentRequest_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_X509Certificates_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_X509Certificates_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_Payment_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_Payment_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_payments_PaymentACK_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_payments_PaymentACK_fieldAccessorTable;
 
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
-  }
-  private static  com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
   static {
-    java.lang.String[] descriptorData = {
-      "\n\024paymentrequest.proto\022\010payments\"+\n\006Outp" +
-      "ut\022\021\n\006amount\030\001 \001(\004:\0010\022\016\n\006script\030\002 \002(\014\"\243\001" +
-      "\n\016PaymentDetails\022\025\n\007network\030\001 \001(\t:\004main\022" +
-      "!\n\007outputs\030\002 \003(\0132\020.payments.Output\022\014\n\004ti" +
-      "me\030\003 \002(\004\022\017\n\007expires\030\004 \001(\004\022\014\n\004memo\030\005 \001(\t\022" +
-      "\023\n\013payment_url\030\006 \001(\t\022\025\n\rmerchant_data\030\007 " +
-      "\001(\014\"\225\001\n\016PaymentRequest\022\"\n\027payment_detail" +
-      "s_version\030\001 \001(\r:\0011\022\026\n\010pki_type\030\002 \001(\t:\004no" +
-      "ne\022\020\n\010pki_data\030\003 \001(\014\022\"\n\032serialized_payme" +
-      "nt_details\030\004 \002(\014\022\021\n\tsignature\030\005 \001(\014\"\'\n\020X" +
-      "509Certificates\022\023\n\013certificate\030\001 \003(\014\"i\n\007" +
-      "Payment\022\025\n\rmerchant_data\030\001 \001(\014\022\024\n\014transa" +
-      "ctions\030\002 \003(\014\022#\n\trefund_to\030\003 \003(\0132\020.paymen" +
-      "ts.Output\022\014\n\004memo\030\004 \001(\t\">\n\nPaymentACK\022\"\n" +
-      "\007payment\030\001 \002(\0132\021.payments.Payment\022\014\n\004mem" +
-      "o\030\002 \001(\tB(\n\036org.bitcoin.protocols.payment" +
-      "sB\006Protos"
-    };
-    descriptor = com.google.protobuf.Descriptors.FileDescriptor
-      .internalBuildGeneratedFileFrom(descriptorData,
-        new com.google.protobuf.Descriptors.FileDescriptor[] {
-        });
-    internal_static_payments_Output_descriptor =
-      getDescriptor().getMessageTypes().get(0);
-    internal_static_payments_Output_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_Output_descriptor,
-        new java.lang.String[] { "Amount", "Script", });
-    internal_static_payments_PaymentDetails_descriptor =
-      getDescriptor().getMessageTypes().get(1);
-    internal_static_payments_PaymentDetails_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_PaymentDetails_descriptor,
-        new java.lang.String[] { "Network", "Outputs", "Time", "Expires", "Memo", "PaymentUrl", "MerchantData", });
-    internal_static_payments_PaymentRequest_descriptor =
-      getDescriptor().getMessageTypes().get(2);
-    internal_static_payments_PaymentRequest_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_PaymentRequest_descriptor,
-        new java.lang.String[] { "PaymentDetailsVersion", "PkiType", "PkiData", "SerializedPaymentDetails", "Signature", });
-    internal_static_payments_X509Certificates_descriptor =
-      getDescriptor().getMessageTypes().get(3);
-    internal_static_payments_X509Certificates_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_X509Certificates_descriptor,
-        new java.lang.String[] { "Certificate", });
-    internal_static_payments_Payment_descriptor =
-      getDescriptor().getMessageTypes().get(4);
-    internal_static_payments_Payment_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_Payment_descriptor,
-        new java.lang.String[] { "MerchantData", "Transactions", "RefundTo", "Memo", });
-    internal_static_payments_PaymentACK_descriptor =
-      getDescriptor().getMessageTypes().get(5);
-    internal_static_payments_PaymentACK_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_payments_PaymentACK_descriptor,
-        new java.lang.String[] { "Payment", "Memo", });
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/core/src/main/java/org/bitcoinj/wallet/Protos.java b/core/src/main/java/org/bitcoinj/wallet/Protos.java
index 743fd7b99..91c812b12 100644
--- a/core/src/main/java/org/bitcoinj/wallet/Protos.java
+++ b/core/src/main/java/org/bitcoinj/wallet/Protos.java
@@ -8,15 +8,9 @@ public final class Protos {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-    registerAllExtensions(
-        (com.google.protobuf.ExtensionRegistryLite) registry);
-  }
   public interface PeerAddressOrBuilder extends
       // @@protoc_insertion_point(interface_extends:wallet.PeerAddress)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * required bytes ip_address = 1;
@@ -54,97 +48,14 @@ public final class Protos {
   /**
    * Protobuf type {@code wallet.PeerAddress}
    */
-  public static final class PeerAddress extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class PeerAddress extends
+      com.google.protobuf.GeneratedMessageLite<
+          PeerAddress, PeerAddress.Builder> implements
       // @@protoc_insertion_point(message_implements:wallet.PeerAddress)
       PeerAddressOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use PeerAddress.newBuilder() to construct.
-    private PeerAddress(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private PeerAddress() {
       ipAddress_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new PeerAddress();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PeerAddress(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              bitField0_ |= 0x00000001;
-              ipAddress_ = input.readBytes();
-              break;
-            }
-            case 16: {
-              bitField0_ |= 0x00000002;
-              port_ = input.readUInt32();
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000004;
-              services_ = input.readUInt64();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).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_PeerAddress_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoinj.wallet.Protos.PeerAddress.class, org.bitcoinj.wallet.Protos.PeerAddress.Builder.class);
-    }
-
     private int bitField0_;
     public static final int IP_ADDRESS_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString ipAddress_;
@@ -164,6 +75,22 @@ public final class Protos {
     public com.google.protobuf.ByteString getIpAddress() {
       return ipAddress_;
     }
+    /**
+     * required bytes ip_address = 1;
+     * @param value The ipAddress to set.
+     */
+    private void setIpAddress(com.google.protobuf.ByteString value) {
+      value.getClass();
+  bitField0_ |= 0x00000001;
+      ipAddress_ = value;
+    }
+    /**
+     * required bytes ip_address = 1;
+     */
+    private void clearIpAddress() {
+      bitField0_ = (bitField0_ & ~0x00000001);
+      ipAddress_ = getDefaultInstance().getIpAddress();
+    }
 
     public static final int PORT_FIELD_NUMBER = 2;
     private int port_;
@@ -183,6 +110,21 @@ public final class Protos {
     public int getPort() {
       return port_;
     }
+    /**
+     * required uint32 port = 2;
+     * @param value The port to set.
+     */
+    private void setPort(int value) {
+      bitField0_ |= 0x00000002;
+      port_ = value;
+    }
+    /**
+     * required uint32 port = 2;
+     */
+    private void clearPort() {
+      bitField0_ = (bitField0_ & ~0x00000002);
+      port_ = 0;
+    }
 
     public static final int SERVICES_FIELD_NUMBER = 3;
     private long services_;
@@ -202,401 +144,124 @@ public final class Protos {
     public long getServices() {
       return services_;
     }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasIpAddress()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!hasPort()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!hasServices()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
+    /**
+     * required uint64 services = 3;
+     * @param value The services to set.
+     */
+    private void setServices(long value) {
+      bitField0_ |= 0x00000004;
+      services_ = value;
     }
-
-    @java.lang.Override
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (((bitField0_ & 0x00000001) != 0)) {
-        output.writeBytes(1, ipAddress_);
-      }
-      if (((bitField0_ & 0x00000002) != 0)) {
-        output.writeUInt32(2, port_);
-      }
-      if (((bitField0_ & 0x00000004) != 0)) {
-        output.writeUInt64(3, services_);
-      }
-      unknownFields.writeTo(output);
-    }
-
-    @java.lang.Override
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(1, ipAddress_);
-      }
-      if (((bitField0_ & 0x00000002) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeUInt32Size(2, port_);
-      }
-      if (((bitField0_ & 0x00000004) != 0)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeUInt64Size(3, services_);
-      }
-      size += unknownFields.getSerializedSize();
-      memoizedSize = size;
-      return size;
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof org.bitcoinj.wallet.Protos.PeerAddress)) {
-        return super.equals(obj);
-      }
-      org.bitcoinj.wallet.Protos.PeerAddress other = (org.bitcoinj.wallet.Protos.PeerAddress) obj;
-
-      if (hasIpAddress() != other.hasIpAddress()) return false;
-      if (hasIpAddress()) {
-        if (!getIpAddress()
-            .equals(other.getIpAddress())) return false;
-      }
-      if (hasPort() != other.hasPort()) return false;
-      if (hasPort()) {
-        if (getPort()
-            != other.getPort()) return false;
-      }
-      if (hasServices() != other.hasServices()) return false;
-      if (hasServices()) {
-        if (getServices()
-            != other.getServices()) return false;
-      }
-      if (!unknownFields.equals(other.unknownFields)) return false;
-      return true;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      if (hasIpAddress()) {
-        hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
-        hash = (53 * hash) + getIpAddress().hashCode();
-      }
-      if (hasPort()) {
-        hash = (37 * hash) + PORT_FIELD_NUMBER;
-        hash = (53 * hash) + getPort();
-      }
-      if (hasServices()) {
-        hash = (37 * hash) + SERVICES_FIELD_NUMBER;
-        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
-            getServices());
-      }
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
+    /**
+     * required uint64 services = 3;
+     */
+    private void clearServices() {
+      bitField0_ = (bitField0_ & ~0x00000004);
+      services_ = 0L;
     }
 
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, data, extensionRegistry);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input, extensionRegistry);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
+      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input);
     }
     public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageLite.parseFrom(
+          DEFAULT_INSTANCE, input, extensionRegistry);
     }
 
-    @java.lang.Override
-    public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
+      return (Builder) DEFAULT_INSTANCE.createBuilder();
     }
     public static Builder newBuilder(org.bitcoinj.wallet.Protos.PeerAddress prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    @java.lang.Override
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
+      return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
     }
 
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
     /**
      * Protobuf type {@code wallet.PeerAddress}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessageLite.Builder<
+          org.bitcoinj.wallet.Protos.PeerAddress, Builder> implements
         // @@protoc_insertion_point(builder_implements:wallet.PeerAddress)
         org.bitcoinj.wallet.Protos.PeerAddressOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.bitcoinj.wallet.Protos.PeerAddress.class, org.bitcoinj.wallet.Protos.PeerAddress.Builder.class);
-      }
-
       // Construct using org.bitcoinj.wallet.Protos.PeerAddress.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+        super(DEFAULT_INSTANCE);
       }
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        ipAddress_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        port_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000002);
-        services_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000004);
-        return this;
-      }
 
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_descriptor;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.PeerAddress getDefaultInstanceForType() {
-        return org.bitcoinj.wallet.Protos.PeerAddress.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.PeerAddress build() {
-        org.bitcoinj.wallet.Protos.PeerAddress result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.PeerAddress buildPartial() {
-        org.bitcoinj.wallet.Protos.PeerAddress result = new org.bitcoinj.wallet.Protos.PeerAddress(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.ipAddress_ = ipAddress_;
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.port_ = port_;
-          to_bitField0_ |= 0x00000002;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.services_ = services_;
-          to_bitField0_ |= 0x00000004;
-        }
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.bitcoinj.wallet.Protos.PeerAddress) {
-          return mergeFrom((org.bitcoinj.wallet.Protos.PeerAddress)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(org.bitcoinj.wallet.Protos.PeerAddress other) {
-        if (other == org.bitcoinj.wallet.Protos.PeerAddress.getDefaultInstance()) return this;
-        if (other.hasIpAddress()) {
-          setIpAddress(other.getIpAddress());
-        }
-        if (other.hasPort()) {
-          setPort(other.getPort());
-        }
-        if (other.hasServices()) {
-          setServices(other.getServices());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        if (!hasIpAddress()) {
-          return false;
-        }
-        if (!hasPort()) {
-          return false;
-        }
-        if (!hasServices()) {
-          return false;
-        }
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.bitcoinj.wallet.Protos.PeerAddress parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.bitcoinj.wallet.Protos.PeerAddress) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * required bytes ip_address = 1;
        * @return Whether the ipAddress field is set.
        */
       @java.lang.Override
       public boolean hasIpAddress() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasIpAddress();
       }
       /**
        * required bytes ip_address = 1;
@@ -604,7 +269,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getIpAddress() {
-        return ipAddress_;
+        return instance.getIpAddress();
       }
       /**
        * required bytes ip_address = 1;
@@ -612,12 +277,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setIpAddress(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        ipAddress_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setIpAddress(value);
         return this;
       }
       /**
@@ -625,20 +286,18 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearIpAddress() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        ipAddress_ = getDefaultInstance().getIpAddress();
-        onChanged();
+        copyOnWrite();
+        instance.clearIpAddress();
         return this;
       }
 
-      private int port_ ;
       /**
        * required uint32 port = 2;
        * @return Whether the port field is set.
        */
       @java.lang.Override
       public boolean hasPort() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasPort();
       }
       /**
        * required uint32 port = 2;
@@ -646,7 +305,7 @@ public final class Protos {
        */
       @java.lang.Override
       public int getPort() {
-        return port_;
+        return instance.getPort();
       }
       /**
        * required uint32 port = 2;
@@ -654,9 +313,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setPort(int value) {
-        bitField0_ |= 0x00000002;
-        port_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPort(value);
         return this;
       }
       /**
@@ -664,20 +322,18 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearPort() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        port_ = 0;
-        onChanged();
+        copyOnWrite();
+        instance.clearPort();
         return this;
       }
 
-      private long services_ ;
       /**
        * required uint64 services = 3;
        * @return Whether the services field is set.
        */
       @java.lang.Override
       public boolean hasServices() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasServices();
       }
       /**
        * required uint64 services = 3;
@@ -685,7 +341,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getServices() {
-        return services_;
+        return instance.getServices();
       }
       /**
        * required uint64 services = 3;
@@ -693,9 +349,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setServices(long value) {
-        bitField0_ |= 0x00000004;
-        services_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setServices(value);
         return this;
       }
       /**
@@ -703,67 +358,94 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearServices() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        services_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearServices();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:wallet.PeerAddress)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoinj.wallet.Protos.PeerAddress();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "ipAddress_",
+              "port_",
+              "services_",
+            };
+            java.lang.String info =
+                "\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0003\u0001\u150a\u0000\u0002" +
+                "\u150b\u0001\u0003\u1503\u0002";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoinj.wallet.Protos.PeerAddress.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:wallet.PeerAddress)
     private static final org.bitcoinj.wallet.Protos.PeerAddress DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoinj.wallet.Protos.PeerAddress();
+      PeerAddress defaultInstance = new PeerAddress();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        PeerAddress.class, defaultInstance);
     }
 
     public static org.bitcoinj.wallet.Protos.PeerAddress getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public PeerAddress parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PeerAddress(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoinj.wallet.Protos.PeerAddress getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface EncryptedDataOrBuilder extends
       // @@protoc_insertion_point(interface_extends:wallet.EncryptedData)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -806,93 +488,15 @@ public final class Protos {
   /**
    * Protobuf type {@code wallet.EncryptedData}
    */
-  public static final class EncryptedData extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class EncryptedData extends
+      com.google.protobuf.GeneratedMessageLite<
+          EncryptedData, EncryptedData.Builder> implements
       // @@protoc_insertion_point(message_implements:wallet.EncryptedData)
       EncryptedDataOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use EncryptedData.newBuilder() to construct.
-    private EncryptedData(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private EncryptedData() {
       initialisationVector_ = com.google.protobuf.ByteString.EMPTY;
       encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new EncryptedData();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private EncryptedData(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              bitField0_ |= 0x00000001;
-              initialisationVector_ = input.readBytes();
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              encryptedPrivateKey_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).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_EncryptedData_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoinj.wallet.Protos.EncryptedData.class, org.bitcoinj.wallet.Protos.EncryptedData.Builder.class);
-    }
-
     private int bitField0_;
     public static final int INITIALISATION_VECTOR_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString initialisationVector_;
@@ -920,6 +524,30 @@ public final class Protos {
     public com.google.protobuf.ByteString getInitialisationVector() {
       return initialisationVector_;
     }
+    /**
+     * 
+     * The initialisation vector for the AES encryption (16 bytes)
+     * 
+ * + * required bytes initialisation_vector = 1; + * @param value The initialisationVector to set. + */ + private void setInitialisationVector(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000001; + initialisationVector_ = value; + } + /** + *
+     * The initialisation vector for the AES encryption (16 bytes)
+     * 
+ * + * required bytes initialisation_vector = 1; + */ + private void clearInitialisationVector() { + bitField0_ = (bitField0_ & ~0x00000001); + initialisationVector_ = getDefaultInstance().getInitialisationVector(); + } public static final int ENCRYPTED_PRIVATE_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString encryptedPrivateKey_; @@ -947,361 +575,126 @@ public final class Protos { public com.google.protobuf.ByteString getEncryptedPrivateKey() { return encryptedPrivateKey_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasInitialisationVector()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasEncryptedPrivateKey()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * The encrypted private key
+     * 
+ * + * required bytes encrypted_private_key = 2; + * @param value The encryptedPrivateKey to set. + */ + private void setEncryptedPrivateKey(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000002; + encryptedPrivateKey_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, initialisationVector_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBytes(2, encryptedPrivateKey_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, initialisationVector_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, encryptedPrivateKey_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoinj.wallet.Protos.EncryptedData)) { - return super.equals(obj); - } - org.bitcoinj.wallet.Protos.EncryptedData other = (org.bitcoinj.wallet.Protos.EncryptedData) obj; - - if (hasInitialisationVector() != other.hasInitialisationVector()) return false; - if (hasInitialisationVector()) { - if (!getInitialisationVector() - .equals(other.getInitialisationVector())) return false; - } - if (hasEncryptedPrivateKey() != other.hasEncryptedPrivateKey()) return false; - if (hasEncryptedPrivateKey()) { - if (!getEncryptedPrivateKey() - .equals(other.getEncryptedPrivateKey())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInitialisationVector()) { - hash = (37 * hash) + INITIALISATION_VECTOR_FIELD_NUMBER; - hash = (53 * hash) + getInitialisationVector().hashCode(); - } - if (hasEncryptedPrivateKey()) { - hash = (37 * hash) + ENCRYPTED_PRIVATE_KEY_FIELD_NUMBER; - hash = (53 * hash) + getEncryptedPrivateKey().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * The encrypted private key
+     * 
+ * + * required bytes encrypted_private_key = 2; + */ + private void clearEncryptedPrivateKey() { + bitField0_ = (bitField0_ & ~0x00000002); + encryptedPrivateKey_ = getDefaultInstance().getEncryptedPrivateKey(); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.EncryptedData prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code wallet.EncryptedData} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoinj.wallet.Protos.EncryptedData, Builder> implements // @@protoc_insertion_point(builder_implements:wallet.EncryptedData) org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoinj.wallet.Protos.EncryptedData.class, org.bitcoinj.wallet.Protos.EncryptedData.Builder.class); - } - // Construct using org.bitcoinj.wallet.Protos.EncryptedData.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - initialisationVector_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_descriptor; - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData getDefaultInstanceForType() { - return org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData build() { - org.bitcoinj.wallet.Protos.EncryptedData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData buildPartial() { - org.bitcoinj.wallet.Protos.EncryptedData result = new org.bitcoinj.wallet.Protos.EncryptedData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.initialisationVector_ = initialisationVector_; - if (((from_bitField0_ & 0x00000002) != 0)) { - to_bitField0_ |= 0x00000002; - } - result.encryptedPrivateKey_ = encryptedPrivateKey_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoinj.wallet.Protos.EncryptedData) { - return mergeFrom((org.bitcoinj.wallet.Protos.EncryptedData)other); - } else { - super.mergeFrom(other); - 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.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasInitialisationVector()) { - return false; - } - if (!hasEncryptedPrivateKey()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoinj.wallet.Protos.EncryptedData parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoinj.wallet.Protos.EncryptedData) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString initialisationVector_ = com.google.protobuf.ByteString.EMPTY; /** *
        * The initialisation vector for the AES encryption (16 bytes)
@@ -1312,7 +705,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasInitialisationVector() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasInitialisationVector();
       }
       /**
        * 
@@ -1324,7 +717,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getInitialisationVector() {
-        return initialisationVector_;
+        return instance.getInitialisationVector();
       }
       /**
        * 
@@ -1336,12 +729,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setInitialisationVector(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        initialisationVector_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setInitialisationVector(value);
         return this;
       }
       /**
@@ -1353,13 +742,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearInitialisationVector() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        initialisationVector_ = getDefaultInstance().getInitialisationVector();
-        onChanged();
+        copyOnWrite();
+        instance.clearInitialisationVector();
         return this;
       }
 
-      private com.google.protobuf.ByteString encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * The encrypted private key
@@ -1370,7 +757,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasEncryptedPrivateKey() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasEncryptedPrivateKey();
       }
       /**
        * 
@@ -1382,7 +769,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getEncryptedPrivateKey() {
-        return encryptedPrivateKey_;
+        return instance.getEncryptedPrivateKey();
       }
       /**
        * 
@@ -1394,12 +781,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setEncryptedPrivateKey(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        encryptedPrivateKey_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setEncryptedPrivateKey(value);
         return this;
       }
       /**
@@ -1411,67 +794,93 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearEncryptedPrivateKey() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        encryptedPrivateKey_ = getDefaultInstance().getEncryptedPrivateKey();
-        onChanged();
+        copyOnWrite();
+        instance.clearEncryptedPrivateKey();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:wallet.EncryptedData)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoinj.wallet.Protos.EncryptedData();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "initialisationVector_",
+              "encryptedPrivateKey_",
+            };
+            java.lang.String info =
+                "\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0002\u0001\u150a\u0000\u0002" +
+                "\u150a\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoinj.wallet.Protos.EncryptedData.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:wallet.EncryptedData)
     private static final org.bitcoinj.wallet.Protos.EncryptedData DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoinj.wallet.Protos.EncryptedData();
+      EncryptedData defaultInstance = new EncryptedData();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        EncryptedData.class, defaultInstance);
     }
 
     public static org.bitcoinj.wallet.Protos.EncryptedData getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public EncryptedData parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new EncryptedData(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoinj.wallet.Protos.EncryptedData getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface DeterministicKeyOrBuilder extends
       // @@protoc_insertion_point(interface_extends:wallet.DeterministicKey)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * 
@@ -1618,133 +1027,16 @@ public final class Protos {
    *
    * Protobuf type {@code wallet.DeterministicKey}
    */
-  public static final class DeterministicKey extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class DeterministicKey extends
+      com.google.protobuf.GeneratedMessageLite<
+          DeterministicKey, DeterministicKey.Builder> implements
       // @@protoc_insertion_point(message_implements:wallet.DeterministicKey)
       DeterministicKeyOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use DeterministicKey.newBuilder() to construct.
-    private DeterministicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private DeterministicKey() {
       chainCode_ = com.google.protobuf.ByteString.EMPTY;
       path_ = emptyIntList();
       sigsRequiredToSpend_ = 1;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new DeterministicKey();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private DeterministicKey(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 10: {
-              bitField0_ |= 0x00000001;
-              chainCode_ = input.readBytes();
-              break;
-            }
-            case 16: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                path_ = newIntList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              path_.addInt(input.readUInt32());
-              break;
-            }
-            case 18: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
-                path_ = newIntList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              while (input.getBytesUntilLimit() > 0) {
-                path_.addInt(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000002;
-              issuedSubkeys_ = input.readUInt32();
-              break;
-            }
-            case 32: {
-              bitField0_ |= 0x00000004;
-              lookaheadSize_ = input.readUInt32();
-              break;
-            }
-            case 40: {
-              bitField0_ |= 0x00000008;
-              isFollowing_ = input.readBool();
-              break;
-            }
-            case 48: {
-              bitField0_ |= 0x00000010;
-              sigsRequiredToSpend_ = input.readUInt32();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          path_.makeImmutable(); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoinj.wallet.Protos.DeterministicKey.class, org.bitcoinj.wallet.Protos.DeterministicKey.Builder.class);
-    }
-
     private int bitField0_;
     public static final int CHAIN_CODE_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString chainCode_;
@@ -1774,6 +1066,32 @@ public final class Protos {
     public com.google.protobuf.ByteString getChainCode() {
       return chainCode_;
     }
+    /**
+     * 
+     * Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and
+     * should just treat it as a regular ORIGINAL type key.
+     * 
+ * + * required bytes chain_code = 1; + * @param value The chainCode to set. + */ + private void setChainCode(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000001; + chainCode_ = value; + } + /** + *
+     * Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and
+     * should just treat it as a regular ORIGINAL type key.
+     * 
+ * + * required bytes chain_code = 1; + */ + private void clearChainCode() { + bitField0_ = (bitField0_ & ~0x00000001); + chainCode_ = getDefaultInstance().getChainCode(); + } public static final int PATH_FIELD_NUMBER = 2; private com.google.protobuf.Internal.IntList path_; @@ -1800,6 +1118,7 @@ public final class Protos { * repeated uint32 path = 2; * @return The count of path. */ + @java.lang.Override public int getPathCount() { return path_.size(); } @@ -1813,9 +1132,71 @@ public final class Protos { * @param index The index of the element to return. * @return The path at the given index. */ + @java.lang.Override public int getPath(int index) { return path_.getInt(index); } + private void ensurePathIsMutable() { + com.google.protobuf.Internal.IntList tmp = path_; + if (!tmp.isModifiable()) { + path_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+     * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation
+     * and high bit unset for public derivation.
+     * 
+ * + * repeated uint32 path = 2; + * @param index The index to set the value at. + * @param value The path to set. + */ + private void setPath( + int index, int value) { + ensurePathIsMutable(); + path_.setInt(index, value); + } + /** + *
+     * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation
+     * and high bit unset for public derivation.
+     * 
+ * + * repeated uint32 path = 2; + * @param value The path to add. + */ + private void addPath(int value) { + ensurePathIsMutable(); + path_.addInt(value); + } + /** + *
+     * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation
+     * and high bit unset for public derivation.
+     * 
+ * + * repeated uint32 path = 2; + * @param values The path to add. + */ + private void addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, path_); + } + /** + *
+     * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation
+     * and high bit unset for public derivation.
+     * 
+ * + * repeated uint32 path = 2; + */ + private void clearPath() { + path_ = emptyIntList(); + } public static final int ISSUED_SUBKEYS_FIELD_NUMBER = 3; private int issuedSubkeys_; @@ -1851,6 +1232,37 @@ public final class Protos { public int getIssuedSubkeys() { return issuedSubkeys_; } + /** + *
+     * How many children of this key have been issued, that is, given to the user when they requested a fresh key?
+     * For the parents of keys being handed out, this is always less than the true number of children: the difference is
+     * called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of
+     * this wallet - for instance when restoring from backup or if the seed was shared between devices.
+     * If this field is missing it means we're not issuing subkeys of this key to users.
+     * 
+ * + * optional uint32 issued_subkeys = 3; + * @param value The issuedSubkeys to set. + */ + private void setIssuedSubkeys(int value) { + bitField0_ |= 0x00000002; + issuedSubkeys_ = value; + } + /** + *
+     * How many children of this key have been issued, that is, given to the user when they requested a fresh key?
+     * For the parents of keys being handed out, this is always less than the true number of children: the difference is
+     * called the lookahead zone. These keys are put into Bloom filters so we can spot transactions made by clones of
+     * this wallet - for instance when restoring from backup or if the seed was shared between devices.
+     * If this field is missing it means we're not issuing subkeys of this key to users.
+     * 
+ * + * optional uint32 issued_subkeys = 3; + */ + private void clearIssuedSubkeys() { + bitField0_ = (bitField0_ & ~0x00000002); + issuedSubkeys_ = 0; + } public static final int LOOKAHEAD_SIZE_FIELD_NUMBER = 4; private int lookaheadSize_; @@ -1870,6 +1282,21 @@ public final class Protos { public int getLookaheadSize() { return lookaheadSize_; } + /** + * optional uint32 lookahead_size = 4; + * @param value The lookaheadSize to set. + */ + private void setLookaheadSize(int value) { + bitField0_ |= 0x00000004; + lookaheadSize_ = value; + } + /** + * optional uint32 lookahead_size = 4; + */ + private void clearLookaheadSize() { + bitField0_ = (bitField0_ & ~0x00000004); + lookaheadSize_ = 0; + } public static final int ISFOLLOWING_FIELD_NUMBER = 5; private boolean isFollowing_; @@ -1903,6 +1330,35 @@ public final class Protos { public boolean getIsFollowing() { return isFollowing_; } + /** + *
+     **
+     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
+     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
+     * a single P2SH multisignature address
+     * 
+ * + * optional bool isFollowing = 5; + * @param value The isFollowing to set. + */ + private void setIsFollowing(boolean value) { + bitField0_ |= 0x00000008; + isFollowing_ = value; + } + /** + *
+     **
+     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
+     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
+     * a single P2SH multisignature address
+     * 
+ * + * optional bool isFollowing = 5; + */ + private void clearIsFollowing() { + bitField0_ = (bitField0_ & ~0x00000008); + isFollowing_ = false; + } public static final int SIGSREQUIREDTOSPEND_FIELD_NUMBER = 6; private int sigsRequiredToSpend_; @@ -1932,254 +1388,113 @@ public final class Protos { public int getSigsRequiredToSpend() { return sigsRequiredToSpend_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasChainCode()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
+     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
+     * 
+ * + * optional uint32 sigsRequiredToSpend = 6 [default = 1]; + * @param value The sigsRequiredToSpend to set. + */ + private void setSigsRequiredToSpend(int value) { + bitField0_ |= 0x00000010; + sigsRequiredToSpend_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, chainCode_); - } - for (int i = 0; i < path_.size(); i++) { - output.writeUInt32(2, path_.getInt(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt32(3, issuedSubkeys_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt32(4, lookaheadSize_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBool(5, isFollowing_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeUInt32(6, sigsRequiredToSpend_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, chainCode_); - } - { - int dataSize = 0; - for (int i = 0; i < path_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(path_.getInt(i)); - } - size += dataSize; - size += 1 * getPathList().size(); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, issuedSubkeys_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, lookaheadSize_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, isFollowing_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, sigsRequiredToSpend_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoinj.wallet.Protos.DeterministicKey)) { - return super.equals(obj); - } - org.bitcoinj.wallet.Protos.DeterministicKey other = (org.bitcoinj.wallet.Protos.DeterministicKey) obj; - - if (hasChainCode() != other.hasChainCode()) return false; - if (hasChainCode()) { - if (!getChainCode() - .equals(other.getChainCode())) return false; - } - if (!getPathList() - .equals(other.getPathList())) return false; - if (hasIssuedSubkeys() != other.hasIssuedSubkeys()) return false; - if (hasIssuedSubkeys()) { - if (getIssuedSubkeys() - != other.getIssuedSubkeys()) return false; - } - if (hasLookaheadSize() != other.hasLookaheadSize()) return false; - if (hasLookaheadSize()) { - if (getLookaheadSize() - != other.getLookaheadSize()) return false; - } - if (hasIsFollowing() != other.hasIsFollowing()) return false; - if (hasIsFollowing()) { - if (getIsFollowing() - != other.getIsFollowing()) return false; - } - if (hasSigsRequiredToSpend() != other.hasSigsRequiredToSpend()) return false; - if (hasSigsRequiredToSpend()) { - if (getSigsRequiredToSpend() - != other.getSigsRequiredToSpend()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasChainCode()) { - hash = (37 * hash) + CHAIN_CODE_FIELD_NUMBER; - hash = (53 * hash) + getChainCode().hashCode(); - } - if (getPathCount() > 0) { - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPathList().hashCode(); - } - if (hasIssuedSubkeys()) { - hash = (37 * hash) + ISSUED_SUBKEYS_FIELD_NUMBER; - hash = (53 * hash) + getIssuedSubkeys(); - } - if (hasLookaheadSize()) { - hash = (37 * hash) + LOOKAHEAD_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getLookaheadSize(); - } - if (hasIsFollowing()) { - hash = (37 * hash) + ISFOLLOWING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsFollowing()); - } - if (hasSigsRequiredToSpend()) { - hash = (37 * hash) + SIGSREQUIREDTOSPEND_FIELD_NUMBER; - hash = (53 * hash) + getSigsRequiredToSpend(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
+     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
+     * 
+ * + * optional uint32 sigsRequiredToSpend = 6 [default = 1]; + */ + private void clearSigsRequiredToSpend() { + bitField0_ = (bitField0_ & ~0x00000010); + sigsRequiredToSpend_ = 1; } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.DeterministicKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** *
      **
@@ -2189,213 +1504,16 @@ public final class Protos {
      * Protobuf type {@code wallet.DeterministicKey}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessageLite.Builder<
+          org.bitcoinj.wallet.Protos.DeterministicKey, Builder> implements
         // @@protoc_insertion_point(builder_implements:wallet.DeterministicKey)
         org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.bitcoinj.wallet.Protos.DeterministicKey.class, org.bitcoinj.wallet.Protos.DeterministicKey.Builder.class);
-      }
-
       // Construct using org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+        super(DEFAULT_INSTANCE);
       }
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        chainCode_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        path_ = emptyIntList();
-        bitField0_ = (bitField0_ & ~0x00000002);
-        issuedSubkeys_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000004);
-        lookaheadSize_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000008);
-        isFollowing_ = false;
-        bitField0_ = (bitField0_ & ~0x00000010);
-        sigsRequiredToSpend_ = 1;
-        bitField0_ = (bitField0_ & ~0x00000020);
-        return this;
-      }
 
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.DeterministicKey getDefaultInstanceForType() {
-        return org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.DeterministicKey build() {
-        org.bitcoinj.wallet.Protos.DeterministicKey result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.DeterministicKey buildPartial() {
-        org.bitcoinj.wallet.Protos.DeterministicKey result = new org.bitcoinj.wallet.Protos.DeterministicKey(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.chainCode_ = chainCode_;
-        if (((bitField0_ & 0x00000002) != 0)) {
-          path_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000002);
-        }
-        result.path_ = path_;
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.issuedSubkeys_ = issuedSubkeys_;
-          to_bitField0_ |= 0x00000002;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.lookaheadSize_ = lookaheadSize_;
-          to_bitField0_ |= 0x00000004;
-        }
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          result.isFollowing_ = isFollowing_;
-          to_bitField0_ |= 0x00000008;
-        }
-        if (((from_bitField0_ & 0x00000020) != 0)) {
-          to_bitField0_ |= 0x00000010;
-        }
-        result.sigsRequiredToSpend_ = sigsRequiredToSpend_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.bitcoinj.wallet.Protos.DeterministicKey) {
-          return mergeFrom((org.bitcoinj.wallet.Protos.DeterministicKey)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(org.bitcoinj.wallet.Protos.DeterministicKey other) {
-        if (other == org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance()) return this;
-        if (other.hasChainCode()) {
-          setChainCode(other.getChainCode());
-        }
-        if (!other.path_.isEmpty()) {
-          if (path_.isEmpty()) {
-            path_ = other.path_;
-            bitField0_ = (bitField0_ & ~0x00000002);
-          } else {
-            ensurePathIsMutable();
-            path_.addAll(other.path_);
-          }
-          onChanged();
-        }
-        if (other.hasIssuedSubkeys()) {
-          setIssuedSubkeys(other.getIssuedSubkeys());
-        }
-        if (other.hasLookaheadSize()) {
-          setLookaheadSize(other.getLookaheadSize());
-        }
-        if (other.hasIsFollowing()) {
-          setIsFollowing(other.getIsFollowing());
-        }
-        if (other.hasSigsRequiredToSpend()) {
-          setSigsRequiredToSpend(other.getSigsRequiredToSpend());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        if (!hasChainCode()) {
-          return false;
-        }
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.bitcoinj.wallet.Protos.DeterministicKey parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.bitcoinj.wallet.Protos.DeterministicKey) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private com.google.protobuf.ByteString chainCode_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Random data that allows us to extend a key. Without this, we can't figure out the next key in the chain and
@@ -2407,7 +1525,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasChainCode() {
-        return ((bitField0_ & 0x00000001) != 0);
+        return instance.hasChainCode();
       }
       /**
        * 
@@ -2420,7 +1538,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getChainCode() {
-        return chainCode_;
+        return instance.getChainCode();
       }
       /**
        * 
@@ -2433,12 +1551,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setChainCode(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        chainCode_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setChainCode(value);
         return this;
       }
       /**
@@ -2451,19 +1565,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearChainCode() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        chainCode_ = getDefaultInstance().getChainCode();
-        onChanged();
+        copyOnWrite();
+        instance.clearChainCode();
         return this;
       }
 
-      private com.google.protobuf.Internal.IntList path_ = emptyIntList();
-      private void ensurePathIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
-          path_ = mutableCopy(path_);
-          bitField0_ |= 0x00000002;
-         }
-      }
       /**
        * 
        * The path through the key tree. Each number is encoded in the standard form: high bit set for private derivation
@@ -2473,10 +1579,11 @@ public final class Protos {
        * repeated uint32 path = 2;
        * @return A list containing the path.
        */
+      @java.lang.Override
       public java.util.List
           getPathList() {
-        return ((bitField0_ & 0x00000002) != 0) ?
-                 java.util.Collections.unmodifiableList(path_) : path_;
+        return java.util.Collections.unmodifiableList(
+            instance.getPathList());
       }
       /**
        * 
@@ -2487,8 +1594,9 @@ public final class Protos {
        * repeated uint32 path = 2;
        * @return The count of path.
        */
+      @java.lang.Override
       public int getPathCount() {
-        return path_.size();
+        return instance.getPathCount();
       }
       /**
        * 
@@ -2500,8 +1608,9 @@ public final class Protos {
        * @param index The index of the element to return.
        * @return The path at the given index.
        */
+      @java.lang.Override
       public int getPath(int index) {
-        return path_.getInt(index);
+        return instance.getPath(index);
       }
       /**
        * 
@@ -2510,15 +1619,13 @@ public final class Protos {
        * 
* * repeated uint32 path = 2; - * @param index The index to set the value at. * @param value The path to set. * @return This builder for chaining. */ public Builder setPath( int index, int value) { - ensurePathIsMutable(); - path_.setInt(index, value); - onChanged(); + copyOnWrite(); + instance.setPath(index, value); return this; } /** @@ -2532,9 +1639,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder addPath(int value) { - ensurePathIsMutable(); - path_.addInt(value); - onChanged(); + copyOnWrite(); + instance.addPath(value); return this; } /** @@ -2549,10 +1655,8 @@ public final class Protos { */ public Builder addAllPath( java.lang.Iterable values) { - ensurePathIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, path_); - onChanged(); + copyOnWrite(); + instance.addAllPath(values); return this; } /** @@ -2565,13 +1669,11 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearPath() { - path_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + copyOnWrite(); + instance.clearPath(); return this; } - private int issuedSubkeys_ ; /** *
        * How many children of this key have been issued, that is, given to the user when they requested a fresh key?
@@ -2586,7 +1688,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasIssuedSubkeys() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return instance.hasIssuedSubkeys();
       }
       /**
        * 
@@ -2602,7 +1704,7 @@ public final class Protos {
        */
       @java.lang.Override
       public int getIssuedSubkeys() {
-        return issuedSubkeys_;
+        return instance.getIssuedSubkeys();
       }
       /**
        * 
@@ -2618,9 +1720,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setIssuedSubkeys(int value) {
-        bitField0_ |= 0x00000004;
-        issuedSubkeys_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setIssuedSubkeys(value);
         return this;
       }
       /**
@@ -2636,20 +1737,18 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearIssuedSubkeys() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        issuedSubkeys_ = 0;
-        onChanged();
+        copyOnWrite();
+        instance.clearIssuedSubkeys();
         return this;
       }
 
-      private int lookaheadSize_ ;
       /**
        * optional uint32 lookahead_size = 4;
        * @return Whether the lookaheadSize field is set.
        */
       @java.lang.Override
       public boolean hasLookaheadSize() {
-        return ((bitField0_ & 0x00000008) != 0);
+        return instance.hasLookaheadSize();
       }
       /**
        * optional uint32 lookahead_size = 4;
@@ -2657,7 +1756,7 @@ public final class Protos {
        */
       @java.lang.Override
       public int getLookaheadSize() {
-        return lookaheadSize_;
+        return instance.getLookaheadSize();
       }
       /**
        * optional uint32 lookahead_size = 4;
@@ -2665,9 +1764,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setLookaheadSize(int value) {
-        bitField0_ |= 0x00000008;
-        lookaheadSize_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setLookaheadSize(value);
         return this;
       }
       /**
@@ -2675,13 +1773,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearLookaheadSize() {
-        bitField0_ = (bitField0_ & ~0x00000008);
-        lookaheadSize_ = 0;
-        onChanged();
+        copyOnWrite();
+        instance.clearLookaheadSize();
         return this;
       }
 
-      private boolean isFollowing_ ;
       /**
        * 
        **
@@ -2695,7 +1791,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasIsFollowing() {
-        return ((bitField0_ & 0x00000010) != 0);
+        return instance.hasIsFollowing();
       }
       /**
        * 
@@ -2710,7 +1806,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean getIsFollowing() {
-        return isFollowing_;
+        return instance.getIsFollowing();
       }
       /**
        * 
@@ -2725,9 +1821,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setIsFollowing(boolean value) {
-        bitField0_ |= 0x00000010;
-        isFollowing_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setIsFollowing(value);
         return this;
       }
       /**
@@ -2742,13 +1837,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearIsFollowing() {
-        bitField0_ = (bitField0_ & ~0x00000010);
-        isFollowing_ = false;
-        onChanged();
+        copyOnWrite();
+        instance.clearIsFollowing();
         return this;
       }
 
-      private int sigsRequiredToSpend_ = 1;
       /**
        * 
        * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
@@ -2760,7 +1853,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasSigsRequiredToSpend() {
-        return ((bitField0_ & 0x00000020) != 0);
+        return instance.hasSigsRequiredToSpend();
       }
       /**
        * 
@@ -2773,7 +1866,7 @@ public final class Protos {
        */
       @java.lang.Override
       public int getSigsRequiredToSpend() {
-        return sigsRequiredToSpend_;
+        return instance.getSigsRequiredToSpend();
       }
       /**
        * 
@@ -2786,9 +1879,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setSigsRequiredToSpend(int value) {
-        bitField0_ |= 0x00000020;
-        sigsRequiredToSpend_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setSigsRequiredToSpend(value);
         return this;
       }
       /**
@@ -2801,67 +1893,97 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearSigsRequiredToSpend() {
-        bitField0_ = (bitField0_ & ~0x00000020);
-        sigsRequiredToSpend_ = 1;
-        onChanged();
+        copyOnWrite();
+        instance.clearSigsRequiredToSpend();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:wallet.DeterministicKey)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoinj.wallet.Protos.DeterministicKey();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "chainCode_",
+              "path_",
+              "issuedSubkeys_",
+              "lookaheadSize_",
+              "isFollowing_",
+              "sigsRequiredToSpend_",
+            };
+            java.lang.String info =
+                "\u0001\u0006\u0000\u0001\u0001\u0006\u0006\u0000\u0001\u0001\u0001\u150a\u0000\u0002" +
+                "\u001d\u0003\u100b\u0001\u0004\u100b\u0002\u0005\u1007\u0003\u0006\u100b\u0004";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoinj.wallet.Protos.DeterministicKey.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:wallet.DeterministicKey)
     private static final org.bitcoinj.wallet.Protos.DeterministicKey DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoinj.wallet.Protos.DeterministicKey();
+      DeterministicKey defaultInstance = new DeterministicKey();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        DeterministicKey.class, defaultInstance);
     }
 
     public static org.bitcoinj.wallet.Protos.DeterministicKey getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public DeterministicKey parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new DeterministicKey(input, extensionRegistry);
-      }
-    };
+    private static volatile com.google.protobuf.Parser PARSER;
 
     public static com.google.protobuf.Parser parser() {
-      return PARSER;
+      return DEFAULT_INSTANCE.getParserForType();
     }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public org.bitcoinj.wallet.Protos.DeterministicKey getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
   }
 
   public interface KeyOrBuilder extends
       // @@protoc_insertion_point(interface_extends:wallet.Key)
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.MessageLiteOrBuilder {
 
     /**
      * required .wallet.Key.Type type = 1;
@@ -2913,14 +2035,6 @@ public final class Protos {
      * @return The encryptedData.
      */
     org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData();
-    /**
-     * 
-     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-     * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder(); /** *
@@ -3003,10 +2117,6 @@ public final class Protos {
      * @return The deterministicKey.
      */
     org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey();
-    /**
-     * optional .wallet.DeterministicKey deterministic_key = 7;
-     */
-    org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder();
 
     /**
      * 
@@ -3047,14 +2157,6 @@ public final class Protos {
      * @return The encryptedDeterministicSeed.
      */
     org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed();
-    /**
-     * 
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder(); /** *
@@ -3116,15 +2218,11 @@ public final class Protos {
    *
    * Protobuf type {@code wallet.Key}
    */
-  public static final class Key extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public  static final class Key extends
+      com.google.protobuf.GeneratedMessageLite<
+          Key, Key.Builder> implements
       // @@protoc_insertion_point(message_implements:wallet.Key)
       KeyOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use Key.newBuilder() to construct.
-    private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
     private Key() {
       type_ = 1;
       secretBytes_ = com.google.protobuf.ByteString.EMPTY;
@@ -3134,188 +2232,11 @@ public final class Protos {
       accountPath_ = emptyIntList();
       outputScriptType_ = 1;
     }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new Key();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Key(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      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;
-            case 8: {
-              int rawValue = input.readEnum();
-                @SuppressWarnings("deprecation")
-              org.bitcoinj.wallet.Protos.Key.Type value = org.bitcoinj.wallet.Protos.Key.Type.valueOf(rawValue);
-              if (value == null) {
-                unknownFields.mergeVarintField(1, rawValue);
-              } else {
-                bitField0_ |= 0x00000001;
-                type_ = rawValue;
-              }
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              secretBytes_ = input.readBytes();
-              break;
-            }
-            case 26: {
-              bitField0_ |= 0x00000008;
-              publicKey_ = input.readBytes();
-              break;
-            }
-            case 34: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              bitField0_ |= 0x00000010;
-              label_ = bs;
-              break;
-            }
-            case 40: {
-              bitField0_ |= 0x00000020;
-              creationTimestamp_ = input.readInt64();
-              break;
-            }
-            case 50: {
-              org.bitcoinj.wallet.Protos.EncryptedData.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000004) != 0)) {
-                subBuilder = encryptedData_.toBuilder();
-              }
-              encryptedData_ = input.readMessage(org.bitcoinj.wallet.Protos.EncryptedData.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(encryptedData_);
-                encryptedData_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000004;
-              break;
-            }
-            case 58: {
-              org.bitcoinj.wallet.Protos.DeterministicKey.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000040) != 0)) {
-                subBuilder = deterministicKey_.toBuilder();
-              }
-              deterministicKey_ = input.readMessage(org.bitcoinj.wallet.Protos.DeterministicKey.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(deterministicKey_);
-                deterministicKey_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000040;
-              break;
-            }
-            case 66: {
-              bitField0_ |= 0x00000080;
-              deterministicSeed_ = input.readBytes();
-              break;
-            }
-            case 74: {
-              org.bitcoinj.wallet.Protos.EncryptedData.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000100) != 0)) {
-                subBuilder = encryptedDeterministicSeed_.toBuilder();
-              }
-              encryptedDeterministicSeed_ = input.readMessage(org.bitcoinj.wallet.Protos.EncryptedData.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(encryptedDeterministicSeed_);
-                encryptedDeterministicSeed_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000100;
-              break;
-            }
-            case 80: {
-              if (!((mutable_bitField0_ & 0x00000200) != 0)) {
-                accountPath_ = newIntList();
-                mutable_bitField0_ |= 0x00000200;
-              }
-              accountPath_.addInt(input.readUInt32());
-              break;
-            }
-            case 82: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              if (!((mutable_bitField0_ & 0x00000200) != 0) && input.getBytesUntilLimit() > 0) {
-                accountPath_ = newIntList();
-                mutable_bitField0_ |= 0x00000200;
-              }
-              while (input.getBytesUntilLimit() > 0) {
-                accountPath_.addInt(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 88: {
-              int rawValue = input.readEnum();
-                @SuppressWarnings("deprecation")
-              org.bitcoinj.wallet.Protos.Key.OutputScriptType value = org.bitcoinj.wallet.Protos.Key.OutputScriptType.valueOf(rawValue);
-              if (value == null) {
-                unknownFields.mergeVarintField(11, rawValue);
-              } else {
-                bitField0_ |= 0x00000200;
-                outputScriptType_ = rawValue;
-              }
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000200) != 0)) {
-          accountPath_.makeImmutable(); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.bitcoinj.wallet.Protos.Key.class, org.bitcoinj.wallet.Protos.Key.Builder.class);
-    }
-
     /**
      * Protobuf enum {@code wallet.Key.Type}
      */
     public enum Type
-        implements com.google.protobuf.ProtocolMessageEnum {
+        implements com.google.protobuf.Internal.EnumLite {
       /**
        * 
        ** Unencrypted - Original bitcoin secp256k1 curve 
@@ -3398,13 +2319,14 @@ public final class Protos {
       public static final int DETERMINISTIC_KEY_VALUE = 4;
 
 
+      @java.lang.Override
       public final int getNumber() {
         return value;
       }
 
       /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -3412,10 +2334,6 @@ public final class Protos {
         return forNumber(value);
       }
 
-      /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
-       */
       public static Type forNumber(int value) {
         switch (value) {
           case 1: return ORIGINAL;
@@ -3433,34 +2351,25 @@ public final class Protos {
       private static final com.google.protobuf.Internal.EnumLiteMap<
           Type> internalValueMap =
             new com.google.protobuf.Internal.EnumLiteMap() {
+              @java.lang.Override
               public Type findValueByNumber(int number) {
                 return Type.forNumber(number);
               }
             };
 
-      public final com.google.protobuf.Descriptors.EnumValueDescriptor
-          getValueDescriptor() {
-        return getDescriptor().getValues().get(ordinal());
-      }
-      public final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptorForType() {
-        return getDescriptor();
-      }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptor() {
-        return org.bitcoinj.wallet.Protos.Key.getDescriptor().getEnumTypes().get(0);
+      public static com.google.protobuf.Internal.EnumVerifier 
+          internalGetVerifier() {
+        return TypeVerifier.INSTANCE;
       }
 
-      private static final Type[] VALUES = values();
-
-      public static Type valueOf(
-          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
-        if (desc.getType() != getDescriptor()) {
-          throw new java.lang.IllegalArgumentException(
-            "EnumValueDescriptor is not for this type.");
-        }
-        return VALUES[desc.getIndex()];
-      }
+      private static final class TypeVerifier implements 
+           com.google.protobuf.Internal.EnumVerifier { 
+              static final com.google.protobuf.Internal.EnumVerifier           INSTANCE = new TypeVerifier();
+              @java.lang.Override
+              public boolean isInRange(int number) {
+                return Type.forNumber(number) != null;
+              }
+            };
 
       private final int value;
 
@@ -3475,7 +2384,7 @@ public final class Protos {
      * Protobuf enum {@code wallet.Key.OutputScriptType}
      */
     public enum OutputScriptType
-        implements com.google.protobuf.ProtocolMessageEnum {
+        implements com.google.protobuf.Internal.EnumLite {
       /**
        * P2PKH = 1;
        */
@@ -3496,13 +2405,14 @@ public final class Protos {
       public static final int P2WPKH_VALUE = 2;
 
 
+      @java.lang.Override
       public final int getNumber() {
         return value;
       }
 
       /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -3510,10 +2420,6 @@ public final class Protos {
         return forNumber(value);
       }
 
-      /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
-       */
       public static OutputScriptType forNumber(int value) {
         switch (value) {
           case 1: return P2PKH;
@@ -3529,34 +2435,25 @@ public final class Protos {
       private static final com.google.protobuf.Internal.EnumLiteMap<
           OutputScriptType> internalValueMap =
             new com.google.protobuf.Internal.EnumLiteMap() {
+              @java.lang.Override
               public OutputScriptType findValueByNumber(int number) {
                 return OutputScriptType.forNumber(number);
               }
             };
 
-      public final com.google.protobuf.Descriptors.EnumValueDescriptor
-          getValueDescriptor() {
-        return getDescriptor().getValues().get(ordinal());
-      }
-      public final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptorForType() {
-        return getDescriptor();
-      }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptor() {
-        return org.bitcoinj.wallet.Protos.Key.getDescriptor().getEnumTypes().get(1);
+      public static com.google.protobuf.Internal.EnumVerifier 
+          internalGetVerifier() {
+        return OutputScriptTypeVerifier.INSTANCE;
       }
 
-      private static final OutputScriptType[] VALUES = values();
-
-      public static OutputScriptType valueOf(
-          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
-        if (desc.getType() != getDescriptor()) {
-          throw new java.lang.IllegalArgumentException(
-            "EnumValueDescriptor is not for this type.");
-        }
-        return VALUES[desc.getIndex()];
-      }
+      private static final class OutputScriptTypeVerifier implements 
+           com.google.protobuf.Internal.EnumVerifier { 
+              static final com.google.protobuf.Internal.EnumVerifier           INSTANCE = new OutputScriptTypeVerifier();
+              @java.lang.Override
+              public boolean isInRange(int number) {
+                return OutputScriptType.forNumber(number) != null;
+              }
+            };
 
       private final int value;
 
@@ -3574,18 +2471,34 @@ public final class Protos {
      * required .wallet.Key.Type type = 1;
      * @return Whether the type field is set.
      */
-    @java.lang.Override public boolean hasType() {
+    @java.lang.Override
+    public boolean hasType() {
       return ((bitField0_ & 0x00000001) != 0);
     }
     /**
      * required .wallet.Key.Type type = 1;
      * @return The type.
      */
-    @java.lang.Override public org.bitcoinj.wallet.Protos.Key.Type getType() {
-      @SuppressWarnings("deprecation")
-      org.bitcoinj.wallet.Protos.Key.Type result = org.bitcoinj.wallet.Protos.Key.Type.valueOf(type_);
+    @java.lang.Override
+    public org.bitcoinj.wallet.Protos.Key.Type getType() {
+      org.bitcoinj.wallet.Protos.Key.Type result = org.bitcoinj.wallet.Protos.Key.Type.forNumber(type_);
       return result == null ? org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL : result;
     }
+    /**
+     * required .wallet.Key.Type type = 1;
+     * @param value The type to set.
+     */
+    private void setType(org.bitcoinj.wallet.Protos.Key.Type value) {
+      type_ = value.getNumber();
+      bitField0_ |= 0x00000001;
+    }
+    /**
+     * required .wallet.Key.Type type = 1;
+     */
+    private void clearType() {
+      bitField0_ = (bitField0_ & ~0x00000001);
+      type_ = 1;
+    }
 
     public static final int SECRET_BYTES_FIELD_NUMBER = 2;
     private com.google.protobuf.ByteString secretBytes_;
@@ -3615,6 +2528,32 @@ public final class Protos {
     public com.google.protobuf.ByteString getSecretBytes() {
       return secretBytes_;
     }
+    /**
+     * 
+     * Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed.
+     * If the secret is encrypted, or this is a "watching entry" then this is missing.
+     * 
+ * + * optional bytes secret_bytes = 2; + * @param value The secretBytes to set. + */ + private void setSecretBytes(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000002; + secretBytes_ = value; + } + /** + *
+     * Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed.
+     * If the secret is encrypted, or this is a "watching entry" then this is missing.
+     * 
+ * + * optional bytes secret_bytes = 2; + */ + private void clearSecretBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + secretBytes_ = getDefaultInstance().getSecretBytes(); + } public static final int ENCRYPTED_DATA_FIELD_NUMBER = 6; private org.bitcoinj.wallet.Protos.EncryptedData encryptedData_; @@ -3624,7 +2563,6 @@ public final class Protos { *
* * optional .wallet.EncryptedData encrypted_data = 6; - * @return Whether the encryptedData field is set. */ @java.lang.Override public boolean hasEncryptedData() { @@ -3636,7 +2574,6 @@ public final class Protos { *
* * optional .wallet.EncryptedData encrypted_data = 6; - * @return The encryptedData. */ @java.lang.Override public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { @@ -3649,9 +2586,39 @@ public final class Protos { * * optional .wallet.EncryptedData encrypted_data = 6; */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder() { - return encryptedData_ == null ? org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedData_; + private void setEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { + value.getClass(); + encryptedData_ = value; + bitField0_ |= 0x00000004; + } + /** + *
+     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
+     * 
+ * + * optional .wallet.EncryptedData encrypted_data = 6; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { + value.getClass(); + if (encryptedData_ != null && + encryptedData_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) { + encryptedData_ = + org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedData_).mergeFrom(value).buildPartial(); + } else { + encryptedData_ = value; + } + bitField0_ |= 0x00000004; + } + /** + *
+     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
+     * 
+ * + * optional .wallet.EncryptedData encrypted_data = 6; + */ + private void clearEncryptedData() { encryptedData_ = null; + bitField0_ = (bitField0_ & ~0x00000004); } public static final int PUBLIC_KEY_FIELD_NUMBER = 3; @@ -3682,9 +2649,35 @@ public final class Protos { public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } + /** + *
+     * The public EC key derived from the private key. We allow both to be stored to avoid mobile clients having to
+     * do lots of slow EC math on startup. For DETERMINISTIC_MNEMONIC entries this is missing.
+     * 
+ * + * optional bytes public_key = 3; + * @param value The publicKey to set. + */ + private void setPublicKey(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000008; + publicKey_ = value; + } + /** + *
+     * The public EC key derived from the private key. We allow both to be stored to avoid mobile clients having to
+     * do lots of slow EC math on startup. For DETERMINISTIC_MNEMONIC entries this is missing.
+     * 
+ * + * optional bytes public_key = 3; + */ + private void clearPublicKey() { + bitField0_ = (bitField0_ & ~0x00000008); + publicKey_ = getDefaultInstance().getPublicKey(); + } public static final int LABEL_FIELD_NUMBER = 4; - private volatile java.lang.Object label_; + private java.lang.String label_; /** *
      * User-provided label associated with the key.
@@ -3707,18 +2700,7 @@ public final class Protos {
      */
     @java.lang.Override
     public java.lang.String getLabel() {
-      java.lang.Object ref = label_;
-      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()) {
-          label_ = s;
-        }
-        return s;
-      }
+      return label_;
     }
     /**
      * 
@@ -3731,16 +2713,45 @@ public final class Protos {
     @java.lang.Override
     public com.google.protobuf.ByteString
         getLabelBytes() {
-      java.lang.Object ref = label_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        label_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
+      return com.google.protobuf.ByteString.copyFromUtf8(label_);
+    }
+    /**
+     * 
+     * User-provided label associated with the key.
+     * 
+ * + * optional string label = 4; + * @param value The label to set. + */ + private void setLabel( + java.lang.String value) { + value.getClass(); + bitField0_ |= 0x00000010; + label_ = value; + } + /** + *
+     * User-provided label associated with the key.
+     * 
+ * + * optional string label = 4; + */ + private void clearLabel() { + bitField0_ = (bitField0_ & ~0x00000010); + label_ = getDefaultInstance().getLabel(); + } + /** + *
+     * User-provided label associated with the key.
+     * 
+ * + * optional string label = 4; + * @param value The bytes for label to set. + */ + private void setLabelBytes( + com.google.protobuf.ByteString value) { + label_ = value.toStringUtf8(); + bitField0_ |= 0x00000010; } public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 5; @@ -3771,12 +2782,36 @@ public final class Protos { public long getCreationTimestamp() { return creationTimestamp_; } + /** + *
+     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point. The reason it's
+     * optional is that keys derived from a parent don't have this data.
+     * 
+ * + * optional int64 creation_timestamp = 5; + * @param value The creationTimestamp to set. + */ + private void setCreationTimestamp(long value) { + bitField0_ |= 0x00000020; + creationTimestamp_ = value; + } + /** + *
+     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point. The reason it's
+     * optional is that keys derived from a parent don't have this data.
+     * 
+ * + * optional int64 creation_timestamp = 5; + */ + private void clearCreationTimestamp() { + bitField0_ = (bitField0_ & ~0x00000020); + creationTimestamp_ = 0L; + } public static final int DETERMINISTIC_KEY_FIELD_NUMBER = 7; private org.bitcoinj.wallet.Protos.DeterministicKey deterministicKey_; /** * optional .wallet.DeterministicKey deterministic_key = 7; - * @return Whether the deterministicKey field is set. */ @java.lang.Override public boolean hasDeterministicKey() { @@ -3784,7 +2819,6 @@ public final class Protos { } /** * optional .wallet.DeterministicKey deterministic_key = 7; - * @return The deterministicKey. */ @java.lang.Override public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() { @@ -3793,9 +2827,31 @@ public final class Protos { /** * optional .wallet.DeterministicKey deterministic_key = 7; */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder() { - return deterministicKey_ == null ? org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance() : deterministicKey_; + private void setDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { + value.getClass(); + deterministicKey_ = value; + bitField0_ |= 0x00000040; + } + /** + * optional .wallet.DeterministicKey deterministic_key = 7; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { + value.getClass(); + if (deterministicKey_ != null && + deterministicKey_ != org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance()) { + deterministicKey_ = + org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder(deterministicKey_).mergeFrom(value).buildPartial(); + } else { + deterministicKey_ = value; + } + bitField0_ |= 0x00000040; + } + /** + * optional .wallet.DeterministicKey deterministic_key = 7; + */ + private void clearDeterministicKey() { deterministicKey_ = null; + bitField0_ = (bitField0_ & ~0x00000040); } public static final int DETERMINISTIC_SEED_FIELD_NUMBER = 8; @@ -3826,6 +2882,32 @@ public final class Protos { public com.google.protobuf.ByteString getDeterministicSeed() { return deterministicSeed_; } + /** + *
+     * The seed for a deterministic key hierarchy.  Derived from the mnemonic,
+     * but cached here for quick startup.  Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * optional bytes deterministic_seed = 8; + * @param value The deterministicSeed to set. + */ + private void setDeterministicSeed(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000080; + deterministicSeed_ = value; + } + /** + *
+     * The seed for a deterministic key hierarchy.  Derived from the mnemonic,
+     * but cached here for quick startup.  Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * optional bytes deterministic_seed = 8; + */ + private void clearDeterministicSeed() { + bitField0_ = (bitField0_ & ~0x00000080); + deterministicSeed_ = getDefaultInstance().getDeterministicSeed(); + } public static final int ENCRYPTED_DETERMINISTIC_SEED_FIELD_NUMBER = 9; private org.bitcoinj.wallet.Protos.EncryptedData encryptedDeterministicSeed_; @@ -3835,7 +2917,6 @@ public final class Protos { *
* * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return Whether the encryptedDeterministicSeed field is set. */ @java.lang.Override public boolean hasEncryptedDeterministicSeed() { @@ -3847,7 +2928,6 @@ public final class Protos { *
* * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return The encryptedDeterministicSeed. */ @java.lang.Override public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { @@ -3860,9 +2940,39 @@ public final class Protos { * * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder() { - return encryptedDeterministicSeed_ == null ? org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedDeterministicSeed_; + private void setEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { + value.getClass(); + encryptedDeterministicSeed_ = value; + bitField0_ |= 0x00000100; + } + /** + *
+     * Encrypted version of the seed
+     * 
+ * + * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { + value.getClass(); + if (encryptedDeterministicSeed_ != null && + encryptedDeterministicSeed_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) { + encryptedDeterministicSeed_ = + org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedDeterministicSeed_).mergeFrom(value).buildPartial(); + } else { + encryptedDeterministicSeed_ = value; + } + bitField0_ |= 0x00000100; + } + /** + *
+     * Encrypted version of the seed
+     * 
+ * + * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; + */ + private void clearEncryptedDeterministicSeed() { encryptedDeterministicSeed_ = null; + bitField0_ = (bitField0_ & ~0x00000100); } public static final int ACCOUNT_PATH_FIELD_NUMBER = 10; @@ -3888,6 +2998,7 @@ public final class Protos { * repeated uint32 account_path = 10 [packed = true]; * @return The count of accountPath. */ + @java.lang.Override public int getAccountPathCount() { return accountPath_.size(); } @@ -3900,10 +3011,68 @@ public final class Protos { * @param index The index of the element to return. * @return The accountPath at the given index. */ + @java.lang.Override public int getAccountPath(int index) { return accountPath_.getInt(index); } private int accountPathMemoizedSerializedSize = -1; + private void ensureAccountPathIsMutable() { + com.google.protobuf.Internal.IntList tmp = accountPath_; + if (!tmp.isModifiable()) { + accountPath_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * repeated uint32 account_path = 10 [packed = true]; + * @param index The index to set the value at. + * @param value The accountPath to set. + */ + private void setAccountPath( + int index, int value) { + ensureAccountPathIsMutable(); + accountPath_.setInt(index, value); + } + /** + *
+     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * repeated uint32 account_path = 10 [packed = true]; + * @param value The accountPath to add. + */ + private void addAccountPath(int value) { + ensureAccountPathIsMutable(); + accountPath_.addInt(value); + } + /** + *
+     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * repeated uint32 account_path = 10 [packed = true]; + * @param values The accountPath to add. + */ + private void addAllAccountPath( + java.lang.Iterable values) { + ensureAccountPathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, accountPath_); + } + /** + *
+     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
+     * 
+ * + * repeated uint32 account_path = 10 [packed = true]; + */ + private void clearAccountPath() { + accountPath_ = emptyIntList(); + } public static final int OUTPUT_SCRIPT_TYPE_FIELD_NUMBER = 11; private int outputScriptType_; @@ -3915,7 +3084,8 @@ public final class Protos { * optional .wallet.Key.OutputScriptType output_script_type = 11; * @return Whether the outputScriptType field is set. */ - @java.lang.Override public boolean hasOutputScriptType() { + @java.lang.Override + public boolean hasOutputScriptType() { return ((bitField0_ & 0x00000200) != 0); } /** @@ -3926,364 +3096,116 @@ public final class Protos { * optional .wallet.Key.OutputScriptType output_script_type = 11; * @return The outputScriptType. */ - @java.lang.Override public org.bitcoinj.wallet.Protos.Key.OutputScriptType getOutputScriptType() { - @SuppressWarnings("deprecation") - org.bitcoinj.wallet.Protos.Key.OutputScriptType result = org.bitcoinj.wallet.Protos.Key.OutputScriptType.valueOf(outputScriptType_); + @java.lang.Override + public org.bitcoinj.wallet.Protos.Key.OutputScriptType getOutputScriptType() { + org.bitcoinj.wallet.Protos.Key.OutputScriptType result = org.bitcoinj.wallet.Protos.Key.OutputScriptType.forNumber(outputScriptType_); return result == null ? org.bitcoinj.wallet.Protos.Key.OutputScriptType.P2PKH : result; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (hasEncryptedData()) { - if (!getEncryptedData().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasDeterministicKey()) { - if (!getDeterministicKey().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasEncryptedDeterministicSeed()) { - if (!getEncryptedDeterministicSeed().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * Type of addresses (aka output scripts) to generate for receiving.
+     * 
+ * + * optional .wallet.Key.OutputScriptType output_script_type = 11; + * @param value The outputScriptType to set. + */ + private void setOutputScriptType(org.bitcoinj.wallet.Protos.Key.OutputScriptType value) { + outputScriptType_ = value.getNumber(); + bitField0_ |= 0x00000200; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) != 0)) { - output.writeEnum(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeBytes(2, secretBytes_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeBytes(3, publicKey_); - } - if (((bitField0_ & 0x00000010) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, label_); - } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeInt64(5, creationTimestamp_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(6, getEncryptedData()); - } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(7, getDeterministicKey()); - } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeBytes(8, deterministicSeed_); - } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeMessage(9, getEncryptedDeterministicSeed()); - } - if (getAccountPathList().size() > 0) { - output.writeUInt32NoTag(82); - output.writeUInt32NoTag(accountPathMemoizedSerializedSize); - } - for (int i = 0; i < accountPath_.size(); i++) { - output.writeUInt32NoTag(accountPath_.getInt(i)); - } - if (((bitField0_ & 0x00000200) != 0)) { - output.writeEnum(11, outputScriptType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, secretBytes_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, publicKey_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, label_); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, creationTimestamp_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEncryptedData()); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getDeterministicKey()); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, deterministicSeed_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getEncryptedDeterministicSeed()); - } - { - int dataSize = 0; - for (int i = 0; i < accountPath_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(accountPath_.getInt(i)); - } - size += dataSize; - if (!getAccountPathList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - accountPathMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, outputScriptType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoinj.wallet.Protos.Key)) { - return super.equals(obj); - } - org.bitcoinj.wallet.Protos.Key other = (org.bitcoinj.wallet.Protos.Key) obj; - - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (type_ != other.type_) return false; - } - if (hasSecretBytes() != other.hasSecretBytes()) return false; - if (hasSecretBytes()) { - if (!getSecretBytes() - .equals(other.getSecretBytes())) return false; - } - if (hasEncryptedData() != other.hasEncryptedData()) return false; - if (hasEncryptedData()) { - if (!getEncryptedData() - .equals(other.getEncryptedData())) return false; - } - if (hasPublicKey() != other.hasPublicKey()) return false; - if (hasPublicKey()) { - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - } - if (hasLabel() != other.hasLabel()) return false; - if (hasLabel()) { - if (!getLabel() - .equals(other.getLabel())) return false; - } - if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; - if (hasCreationTimestamp()) { - if (getCreationTimestamp() - != other.getCreationTimestamp()) return false; - } - if (hasDeterministicKey() != other.hasDeterministicKey()) return false; - if (hasDeterministicKey()) { - if (!getDeterministicKey() - .equals(other.getDeterministicKey())) return false; - } - if (hasDeterministicSeed() != other.hasDeterministicSeed()) return false; - if (hasDeterministicSeed()) { - if (!getDeterministicSeed() - .equals(other.getDeterministicSeed())) return false; - } - if (hasEncryptedDeterministicSeed() != other.hasEncryptedDeterministicSeed()) return false; - if (hasEncryptedDeterministicSeed()) { - if (!getEncryptedDeterministicSeed() - .equals(other.getEncryptedDeterministicSeed())) return false; - } - if (!getAccountPathList() - .equals(other.getAccountPathList())) return false; - if (hasOutputScriptType() != other.hasOutputScriptType()) return false; - if (hasOutputScriptType()) { - if (outputScriptType_ != other.outputScriptType_) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - } - if (hasSecretBytes()) { - hash = (37 * hash) + SECRET_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getSecretBytes().hashCode(); - } - if (hasEncryptedData()) { - hash = (37 * hash) + ENCRYPTED_DATA_FIELD_NUMBER; - hash = (53 * hash) + getEncryptedData().hashCode(); - } - if (hasPublicKey()) { - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - } - if (hasLabel()) { - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - } - if (hasCreationTimestamp()) { - hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCreationTimestamp()); - } - if (hasDeterministicKey()) { - hash = (37 * hash) + DETERMINISTIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getDeterministicKey().hashCode(); - } - if (hasDeterministicSeed()) { - hash = (37 * hash) + DETERMINISTIC_SEED_FIELD_NUMBER; - hash = (53 * hash) + getDeterministicSeed().hashCode(); - } - if (hasEncryptedDeterministicSeed()) { - hash = (37 * hash) + ENCRYPTED_DETERMINISTIC_SEED_FIELD_NUMBER; - hash = (53 * hash) + getEncryptedDeterministicSeed().hashCode(); - } - if (getAccountPathCount() > 0) { - hash = (37 * hash) + ACCOUNT_PATH_FIELD_NUMBER; - hash = (53 * hash) + getAccountPathList().hashCode(); - } - if (hasOutputScriptType()) { - hash = (37 * hash) + OUTPUT_SCRIPT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + outputScriptType_; - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * Type of addresses (aka output scripts) to generate for receiving.
+     * 
+ * + * optional .wallet.Key.OutputScriptType output_script_type = 11; + */ + private void clearOutputScriptType() { + bitField0_ = (bitField0_ & ~0x00000200); + outputScriptType_ = 1; } public static org.bitcoinj.wallet.Protos.Key parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Key parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.Key prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** *
      **
@@ -4297,308 +3219,23 @@ public final class Protos {
      * Protobuf type {@code wallet.Key}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessageLite.Builder<
+          org.bitcoinj.wallet.Protos.Key, Builder> implements
         // @@protoc_insertion_point(builder_implements:wallet.Key)
         org.bitcoinj.wallet.Protos.KeyOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.bitcoinj.wallet.Protos.Key.class, org.bitcoinj.wallet.Protos.Key.Builder.class);
-      }
-
       // Construct using org.bitcoinj.wallet.Protos.Key.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+        super(DEFAULT_INSTANCE);
       }
 
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getEncryptedDataFieldBuilder();
-          getDeterministicKeyFieldBuilder();
-          getEncryptedDeterministicSeedFieldBuilder();
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        type_ = 1;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        secretBytes_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000002);
-        if (encryptedDataBuilder_ == null) {
-          encryptedData_ = null;
-        } else {
-          encryptedDataBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000004);
-        publicKey_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000008);
-        label_ = "";
-        bitField0_ = (bitField0_ & ~0x00000010);
-        creationTimestamp_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000020);
-        if (deterministicKeyBuilder_ == null) {
-          deterministicKey_ = null;
-        } else {
-          deterministicKeyBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000040);
-        deterministicSeed_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000080);
-        if (encryptedDeterministicSeedBuilder_ == null) {
-          encryptedDeterministicSeed_ = null;
-        } else {
-          encryptedDeterministicSeedBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000100);
-        accountPath_ = emptyIntList();
-        bitField0_ = (bitField0_ & ~0x00000200);
-        outputScriptType_ = 1;
-        bitField0_ = (bitField0_ & ~0x00000400);
-        return this;
-      }
 
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.Key getDefaultInstanceForType() {
-        return org.bitcoinj.wallet.Protos.Key.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.Key build() {
-        org.bitcoinj.wallet.Protos.Key result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public org.bitcoinj.wallet.Protos.Key buildPartial() {
-        org.bitcoinj.wallet.Protos.Key result = new org.bitcoinj.wallet.Protos.Key(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.type_ = type_;
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          to_bitField0_ |= 0x00000002;
-        }
-        result.secretBytes_ = secretBytes_;
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          if (encryptedDataBuilder_ == null) {
-            result.encryptedData_ = encryptedData_;
-          } else {
-            result.encryptedData_ = encryptedDataBuilder_.build();
-          }
-          to_bitField0_ |= 0x00000004;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          to_bitField0_ |= 0x00000008;
-        }
-        result.publicKey_ = publicKey_;
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          to_bitField0_ |= 0x00000010;
-        }
-        result.label_ = label_;
-        if (((from_bitField0_ & 0x00000020) != 0)) {
-          result.creationTimestamp_ = creationTimestamp_;
-          to_bitField0_ |= 0x00000020;
-        }
-        if (((from_bitField0_ & 0x00000040) != 0)) {
-          if (deterministicKeyBuilder_ == null) {
-            result.deterministicKey_ = deterministicKey_;
-          } else {
-            result.deterministicKey_ = deterministicKeyBuilder_.build();
-          }
-          to_bitField0_ |= 0x00000040;
-        }
-        if (((from_bitField0_ & 0x00000080) != 0)) {
-          to_bitField0_ |= 0x00000080;
-        }
-        result.deterministicSeed_ = deterministicSeed_;
-        if (((from_bitField0_ & 0x00000100) != 0)) {
-          if (encryptedDeterministicSeedBuilder_ == null) {
-            result.encryptedDeterministicSeed_ = encryptedDeterministicSeed_;
-          } else {
-            result.encryptedDeterministicSeed_ = encryptedDeterministicSeedBuilder_.build();
-          }
-          to_bitField0_ |= 0x00000100;
-        }
-        if (((bitField0_ & 0x00000200) != 0)) {
-          accountPath_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000200);
-        }
-        result.accountPath_ = accountPath_;
-        if (((from_bitField0_ & 0x00000400) != 0)) {
-          to_bitField0_ |= 0x00000200;
-        }
-        result.outputScriptType_ = outputScriptType_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.bitcoinj.wallet.Protos.Key) {
-          return mergeFrom((org.bitcoinj.wallet.Protos.Key)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(org.bitcoinj.wallet.Protos.Key other) {
-        if (other == org.bitcoinj.wallet.Protos.Key.getDefaultInstance()) return this;
-        if (other.hasType()) {
-          setType(other.getType());
-        }
-        if (other.hasSecretBytes()) {
-          setSecretBytes(other.getSecretBytes());
-        }
-        if (other.hasEncryptedData()) {
-          mergeEncryptedData(other.getEncryptedData());
-        }
-        if (other.hasPublicKey()) {
-          setPublicKey(other.getPublicKey());
-        }
-        if (other.hasLabel()) {
-          bitField0_ |= 0x00000010;
-          label_ = other.label_;
-          onChanged();
-        }
-        if (other.hasCreationTimestamp()) {
-          setCreationTimestamp(other.getCreationTimestamp());
-        }
-        if (other.hasDeterministicKey()) {
-          mergeDeterministicKey(other.getDeterministicKey());
-        }
-        if (other.hasDeterministicSeed()) {
-          setDeterministicSeed(other.getDeterministicSeed());
-        }
-        if (other.hasEncryptedDeterministicSeed()) {
-          mergeEncryptedDeterministicSeed(other.getEncryptedDeterministicSeed());
-        }
-        if (!other.accountPath_.isEmpty()) {
-          if (accountPath_.isEmpty()) {
-            accountPath_ = other.accountPath_;
-            bitField0_ = (bitField0_ & ~0x00000200);
-          } else {
-            ensureAccountPathIsMutable();
-            accountPath_.addAll(other.accountPath_);
-          }
-          onChanged();
-        }
-        if (other.hasOutputScriptType()) {
-          setOutputScriptType(other.getOutputScriptType());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        if (!hasType()) {
-          return false;
-        }
-        if (hasEncryptedData()) {
-          if (!getEncryptedData().isInitialized()) {
-            return false;
-          }
-        }
-        if (hasDeterministicKey()) {
-          if (!getDeterministicKey().isInitialized()) {
-            return false;
-          }
-        }
-        if (hasEncryptedDeterministicSeed()) {
-          if (!getEncryptedDeterministicSeed().isInitialized()) {
-            return false;
-          }
-        }
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.bitcoinj.wallet.Protos.Key parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.bitcoinj.wallet.Protos.Key) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private int type_ = 1;
       /**
        * required .wallet.Key.Type type = 1;
        * @return Whether the type field is set.
        */
-      @java.lang.Override public boolean hasType() {
-        return ((bitField0_ & 0x00000001) != 0);
+      @java.lang.Override
+      public boolean hasType() {
+        return instance.hasType();
       }
       /**
        * required .wallet.Key.Type type = 1;
@@ -4606,22 +3243,16 @@ public final class Protos {
        */
       @java.lang.Override
       public org.bitcoinj.wallet.Protos.Key.Type getType() {
-        @SuppressWarnings("deprecation")
-        org.bitcoinj.wallet.Protos.Key.Type result = org.bitcoinj.wallet.Protos.Key.Type.valueOf(type_);
-        return result == null ? org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL : result;
+        return instance.getType();
       }
       /**
        * required .wallet.Key.Type type = 1;
-       * @param value The type to set.
+       * @param value The enum numeric value on the wire for type to set.
        * @return This builder for chaining.
        */
       public Builder setType(org.bitcoinj.wallet.Protos.Key.Type value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000001;
-        type_ = value.getNumber();
-        onChanged();
+        copyOnWrite();
+        instance.setType(value);
         return this;
       }
       /**
@@ -4629,13 +3260,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearType() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        type_ = 1;
-        onChanged();
+        copyOnWrite();
+        instance.clearType();
         return this;
       }
 
-      private com.google.protobuf.ByteString secretBytes_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed.
@@ -4647,7 +3276,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasSecretBytes() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasSecretBytes();
       }
       /**
        * 
@@ -4660,7 +3289,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getSecretBytes() {
-        return secretBytes_;
+        return instance.getSecretBytes();
       }
       /**
        * 
@@ -4673,12 +3302,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setSecretBytes(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000002;
-        secretBytes_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setSecretBytes(value);
         return this;
       }
       /**
@@ -4691,25 +3316,21 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearSecretBytes() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        secretBytes_ = getDefaultInstance().getSecretBytes();
-        onChanged();
+        copyOnWrite();
+        instance.clearSecretBytes();
         return this;
       }
 
-      private org.bitcoinj.wallet.Protos.EncryptedData encryptedData_;
-      private com.google.protobuf.SingleFieldBuilderV3<
-          org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> encryptedDataBuilder_;
       /**
        * 
        * If the secret data is encrypted, then secret_bytes is missing and this field is set.
        * 
* * optional .wallet.EncryptedData encrypted_data = 6; - * @return Whether the encryptedData field is set. */ + @java.lang.Override public boolean hasEncryptedData() { - return ((bitField0_ & 0x00000004) != 0); + return instance.hasEncryptedData(); } /** *
@@ -4717,14 +3338,10 @@ public final class Protos {
        * 
* * optional .wallet.EncryptedData encrypted_data = 6; - * @return The encryptedData. */ + @java.lang.Override public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { - if (encryptedDataBuilder_ == null) { - return encryptedData_ == null ? org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedData_; - } else { - return encryptedDataBuilder_.getMessage(); - } + return instance.getEncryptedData(); } /** *
@@ -4734,18 +3351,10 @@ public final class Protos {
        * optional .wallet.EncryptedData encrypted_data = 6;
        */
       public Builder setEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) {
-        if (encryptedDataBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          encryptedData_ = value;
-          onChanged();
-        } else {
-          encryptedDataBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000004;
+        copyOnWrite();
+        instance.setEncryptedData(value);
         return this;
-      }
+        }
       /**
        * 
        * If the secret data is encrypted, then secret_bytes is missing and this field is set.
@@ -4755,13 +3364,8 @@ public final class Protos {
        */
       public Builder setEncryptedData(
           org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) {
-        if (encryptedDataBuilder_ == null) {
-          encryptedData_ = builderForValue.build();
-          onChanged();
-        } else {
-          encryptedDataBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000004;
+        copyOnWrite();
+        instance.setEncryptedData(builderForValue.build());
         return this;
       }
       /**
@@ -4772,20 +3376,8 @@ public final class Protos {
        * optional .wallet.EncryptedData encrypted_data = 6;
        */
       public Builder mergeEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) {
-        if (encryptedDataBuilder_ == null) {
-          if (((bitField0_ & 0x00000004) != 0) &&
-              encryptedData_ != null &&
-              encryptedData_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) {
-            encryptedData_ =
-              org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedData_).mergeFrom(value).buildPartial();
-          } else {
-            encryptedData_ = value;
-          }
-          onChanged();
-        } else {
-          encryptedDataBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000004;
+        copyOnWrite();
+        instance.mergeEncryptedData(value);
         return this;
       }
       /**
@@ -4795,65 +3387,11 @@ public final class Protos {
        *
        * optional .wallet.EncryptedData encrypted_data = 6;
        */
-      public Builder clearEncryptedData() {
-        if (encryptedDataBuilder_ == null) {
-          encryptedData_ = null;
-          onChanged();
-        } else {
-          encryptedDataBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000004);
+      public Builder clearEncryptedData() {  copyOnWrite();
+        instance.clearEncryptedData();
         return this;
       }
-      /**
-       * 
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - public org.bitcoinj.wallet.Protos.EncryptedData.Builder getEncryptedDataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getEncryptedDataFieldBuilder().getBuilder(); - } - /** - *
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder() { - if (encryptedDataBuilder_ != null) { - return encryptedDataBuilder_.getMessageOrBuilder(); - } else { - return encryptedData_ == null ? - org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedData_; - } - } - /** - *
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> - getEncryptedDataFieldBuilder() { - if (encryptedDataBuilder_ == null) { - encryptedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder>( - getEncryptedData(), - getParentForChildren(), - isClean()); - encryptedData_ = null; - } - return encryptedDataBuilder_; - } - private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY; /** *
        * The public EC key derived from the private key. We allow both to be stored to avoid mobile clients having to
@@ -4865,7 +3403,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasPublicKey() {
-        return ((bitField0_ & 0x00000008) != 0);
+        return instance.hasPublicKey();
       }
       /**
        * 
@@ -4878,7 +3416,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getPublicKey() {
-        return publicKey_;
+        return instance.getPublicKey();
       }
       /**
        * 
@@ -4891,12 +3429,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setPublicKey(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000008;
-        publicKey_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setPublicKey(value);
         return this;
       }
       /**
@@ -4909,13 +3443,11 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearPublicKey() {
-        bitField0_ = (bitField0_ & ~0x00000008);
-        publicKey_ = getDefaultInstance().getPublicKey();
-        onChanged();
+        copyOnWrite();
+        instance.clearPublicKey();
         return this;
       }
 
-      private java.lang.Object label_ = "";
       /**
        * 
        * User-provided label associated with the key.
@@ -4924,8 +3456,9 @@ public final class Protos {
        * optional string label = 4;
        * @return Whether the label field is set.
        */
+      @java.lang.Override
       public boolean hasLabel() {
-        return ((bitField0_ & 0x00000010) != 0);
+        return instance.hasLabel();
       }
       /**
        * 
@@ -4935,19 +3468,9 @@ public final class Protos {
        * optional string label = 4;
        * @return The label.
        */
+      @java.lang.Override
       public java.lang.String getLabel() {
-        java.lang.Object ref = label_;
-        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()) {
-            label_ = s;
-          }
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
+        return instance.getLabel();
       }
       /**
        * 
@@ -4957,18 +3480,10 @@ public final class Protos {
        * optional string label = 4;
        * @return The bytes for label.
        */
+      @java.lang.Override
       public com.google.protobuf.ByteString
           getLabelBytes() {
-        java.lang.Object ref = label_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          label_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
+        return instance.getLabelBytes();
       }
       /**
        * 
@@ -4981,12 +3496,8 @@ public final class Protos {
        */
       public Builder setLabel(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000010;
-        label_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setLabel(value);
         return this;
       }
       /**
@@ -4998,9 +3509,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearLabel() {
-        bitField0_ = (bitField0_ & ~0x00000010);
-        label_ = getDefaultInstance().getLabel();
-        onChanged();
+        copyOnWrite();
+        instance.clearLabel();
         return this;
       }
       /**
@@ -5014,16 +3524,11 @@ public final class Protos {
        */
       public Builder setLabelBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000010;
-        label_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setLabelBytes(value);
         return this;
       }
 
-      private long creationTimestamp_ ;
       /**
        * 
        * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point. The reason it's
@@ -5035,7 +3540,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasCreationTimestamp() {
-        return ((bitField0_ & 0x00000020) != 0);
+        return instance.hasCreationTimestamp();
       }
       /**
        * 
@@ -5048,7 +3553,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getCreationTimestamp() {
-        return creationTimestamp_;
+        return instance.getCreationTimestamp();
       }
       /**
        * 
@@ -5061,9 +3566,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setCreationTimestamp(long value) {
-        bitField0_ |= 0x00000020;
-        creationTimestamp_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setCreationTimestamp(value);
         return this;
       }
       /**
@@ -5076,133 +3580,58 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearCreationTimestamp() {
-        bitField0_ = (bitField0_ & ~0x00000020);
-        creationTimestamp_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearCreationTimestamp();
         return this;
       }
 
-      private org.bitcoinj.wallet.Protos.DeterministicKey deterministicKey_;
-      private com.google.protobuf.SingleFieldBuilderV3<
-          org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder> deterministicKeyBuilder_;
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
-       * @return Whether the deterministicKey field is set.
        */
+      @java.lang.Override
       public boolean hasDeterministicKey() {
-        return ((bitField0_ & 0x00000040) != 0);
+        return instance.hasDeterministicKey();
       }
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
-       * @return The deterministicKey.
        */
+      @java.lang.Override
       public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() {
-        if (deterministicKeyBuilder_ == null) {
-          return deterministicKey_ == null ? org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance() : deterministicKey_;
-        } else {
-          return deterministicKeyBuilder_.getMessage();
-        }
+        return instance.getDeterministicKey();
       }
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
        */
       public Builder setDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) {
-        if (deterministicKeyBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          deterministicKey_ = value;
-          onChanged();
-        } else {
-          deterministicKeyBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000040;
+        copyOnWrite();
+        instance.setDeterministicKey(value);
         return this;
-      }
+        }
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
        */
       public Builder setDeterministicKey(
           org.bitcoinj.wallet.Protos.DeterministicKey.Builder builderForValue) {
-        if (deterministicKeyBuilder_ == null) {
-          deterministicKey_ = builderForValue.build();
-          onChanged();
-        } else {
-          deterministicKeyBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000040;
+        copyOnWrite();
+        instance.setDeterministicKey(builderForValue.build());
         return this;
       }
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
        */
       public Builder mergeDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) {
-        if (deterministicKeyBuilder_ == null) {
-          if (((bitField0_ & 0x00000040) != 0) &&
-              deterministicKey_ != null &&
-              deterministicKey_ != org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance()) {
-            deterministicKey_ =
-              org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder(deterministicKey_).mergeFrom(value).buildPartial();
-          } else {
-            deterministicKey_ = value;
-          }
-          onChanged();
-        } else {
-          deterministicKeyBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000040;
+        copyOnWrite();
+        instance.mergeDeterministicKey(value);
         return this;
       }
       /**
        * optional .wallet.DeterministicKey deterministic_key = 7;
        */
-      public Builder clearDeterministicKey() {
-        if (deterministicKeyBuilder_ == null) {
-          deterministicKey_ = null;
-          onChanged();
-        } else {
-          deterministicKeyBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000040);
+      public Builder clearDeterministicKey() {  copyOnWrite();
+        instance.clearDeterministicKey();
         return this;
       }
-      /**
-       * optional .wallet.DeterministicKey deterministic_key = 7;
-       */
-      public org.bitcoinj.wallet.Protos.DeterministicKey.Builder getDeterministicKeyBuilder() {
-        bitField0_ |= 0x00000040;
-        onChanged();
-        return getDeterministicKeyFieldBuilder().getBuilder();
-      }
-      /**
-       * optional .wallet.DeterministicKey deterministic_key = 7;
-       */
-      public org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder() {
-        if (deterministicKeyBuilder_ != null) {
-          return deterministicKeyBuilder_.getMessageOrBuilder();
-        } else {
-          return deterministicKey_ == null ?
-              org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance() : deterministicKey_;
-        }
-      }
-      /**
-       * optional .wallet.DeterministicKey deterministic_key = 7;
-       */
-      private com.google.protobuf.SingleFieldBuilderV3<
-          org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder> 
-          getDeterministicKeyFieldBuilder() {
-        if (deterministicKeyBuilder_ == null) {
-          deterministicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-              org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder>(
-                  getDeterministicKey(),
-                  getParentForChildren(),
-                  isClean());
-          deterministicKey_ = null;
-        }
-        return deterministicKeyBuilder_;
-      }
 
-      private com.google.protobuf.ByteString deterministicSeed_ = com.google.protobuf.ByteString.EMPTY;
       /**
        * 
        * The seed for a deterministic key hierarchy.  Derived from the mnemonic,
@@ -5214,7 +3643,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasDeterministicSeed() {
-        return ((bitField0_ & 0x00000080) != 0);
+        return instance.hasDeterministicSeed();
       }
       /**
        * 
@@ -5227,7 +3656,7 @@ public final class Protos {
        */
       @java.lang.Override
       public com.google.protobuf.ByteString getDeterministicSeed() {
-        return deterministicSeed_;
+        return instance.getDeterministicSeed();
       }
       /**
        * 
@@ -5240,12 +3669,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setDeterministicSeed(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000080;
-        deterministicSeed_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setDeterministicSeed(value);
         return this;
       }
       /**
@@ -5258,25 +3683,21 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearDeterministicSeed() {
-        bitField0_ = (bitField0_ & ~0x00000080);
-        deterministicSeed_ = getDefaultInstance().getDeterministicSeed();
-        onChanged();
+        copyOnWrite();
+        instance.clearDeterministicSeed();
         return this;
       }
 
-      private org.bitcoinj.wallet.Protos.EncryptedData encryptedDeterministicSeed_;
-      private com.google.protobuf.SingleFieldBuilderV3<
-          org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> encryptedDeterministicSeedBuilder_;
       /**
        * 
        * Encrypted version of the seed
        * 
* * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return Whether the encryptedDeterministicSeed field is set. */ + @java.lang.Override public boolean hasEncryptedDeterministicSeed() { - return ((bitField0_ & 0x00000100) != 0); + return instance.hasEncryptedDeterministicSeed(); } /** *
@@ -5284,14 +3705,10 @@ public final class Protos {
        * 
* * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return The encryptedDeterministicSeed. */ + @java.lang.Override public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { - if (encryptedDeterministicSeedBuilder_ == null) { - return encryptedDeterministicSeed_ == null ? org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedDeterministicSeed_; - } else { - return encryptedDeterministicSeedBuilder_.getMessage(); - } + return instance.getEncryptedDeterministicSeed(); } /** *
@@ -5301,18 +3718,10 @@ public final class Protos {
        * optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
        */
       public Builder setEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) {
-        if (encryptedDeterministicSeedBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          encryptedDeterministicSeed_ = value;
-          onChanged();
-        } else {
-          encryptedDeterministicSeedBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000100;
+        copyOnWrite();
+        instance.setEncryptedDeterministicSeed(value);
         return this;
-      }
+        }
       /**
        * 
        * Encrypted version of the seed
@@ -5322,13 +3731,8 @@ public final class Protos {
        */
       public Builder setEncryptedDeterministicSeed(
           org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) {
-        if (encryptedDeterministicSeedBuilder_ == null) {
-          encryptedDeterministicSeed_ = builderForValue.build();
-          onChanged();
-        } else {
-          encryptedDeterministicSeedBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000100;
+        copyOnWrite();
+        instance.setEncryptedDeterministicSeed(builderForValue.build());
         return this;
       }
       /**
@@ -5339,20 +3743,8 @@ public final class Protos {
        * optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
        */
       public Builder mergeEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) {
-        if (encryptedDeterministicSeedBuilder_ == null) {
-          if (((bitField0_ & 0x00000100) != 0) &&
-              encryptedDeterministicSeed_ != null &&
-              encryptedDeterministicSeed_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) {
-            encryptedDeterministicSeed_ =
-              org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedDeterministicSeed_).mergeFrom(value).buildPartial();
-          } else {
-            encryptedDeterministicSeed_ = value;
-          }
-          onChanged();
-        } else {
-          encryptedDeterministicSeedBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000100;
+        copyOnWrite();
+        instance.mergeEncryptedDeterministicSeed(value);
         return this;
       }
       /**
@@ -5362,71 +3754,11 @@ public final class Protos {
        *
        * optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
        */
-      public Builder clearEncryptedDeterministicSeed() {
-        if (encryptedDeterministicSeedBuilder_ == null) {
-          encryptedDeterministicSeed_ = null;
-          onChanged();
-        } else {
-          encryptedDeterministicSeedBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000100);
+      public Builder clearEncryptedDeterministicSeed() {  copyOnWrite();
+        instance.clearEncryptedDeterministicSeed();
         return this;
       }
-      /**
-       * 
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public org.bitcoinj.wallet.Protos.EncryptedData.Builder getEncryptedDeterministicSeedBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getEncryptedDeterministicSeedFieldBuilder().getBuilder(); - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder() { - if (encryptedDeterministicSeedBuilder_ != null) { - return encryptedDeterministicSeedBuilder_.getMessageOrBuilder(); - } else { - return encryptedDeterministicSeed_ == null ? - org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedDeterministicSeed_; - } - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> - getEncryptedDeterministicSeedFieldBuilder() { - if (encryptedDeterministicSeedBuilder_ == null) { - encryptedDeterministicSeedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder>( - getEncryptedDeterministicSeed(), - getParentForChildren(), - isClean()); - encryptedDeterministicSeed_ = null; - } - return encryptedDeterministicSeedBuilder_; - } - private com.google.protobuf.Internal.IntList accountPath_ = emptyIntList(); - private void ensureAccountPathIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - accountPath_ = mutableCopy(accountPath_); - bitField0_ |= 0x00000200; - } - } /** *
        * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
@@ -5435,10 +3767,11 @@ public final class Protos {
        * repeated uint32 account_path = 10 [packed = true];
        * @return A list containing the accountPath.
        */
+      @java.lang.Override
       public java.util.List
           getAccountPathList() {
-        return ((bitField0_ & 0x00000200) != 0) ?
-                 java.util.Collections.unmodifiableList(accountPath_) : accountPath_;
+        return java.util.Collections.unmodifiableList(
+            instance.getAccountPathList());
       }
       /**
        * 
@@ -5448,8 +3781,9 @@ public final class Protos {
        * repeated uint32 account_path = 10 [packed = true];
        * @return The count of accountPath.
        */
+      @java.lang.Override
       public int getAccountPathCount() {
-        return accountPath_.size();
+        return instance.getAccountPathCount();
       }
       /**
        * 
@@ -5460,8 +3794,9 @@ public final class Protos {
        * @param index The index of the element to return.
        * @return The accountPath at the given index.
        */
+      @java.lang.Override
       public int getAccountPath(int index) {
-        return accountPath_.getInt(index);
+        return instance.getAccountPath(index);
       }
       /**
        * 
@@ -5469,15 +3804,13 @@ public final class Protos {
        * 
* * repeated uint32 account_path = 10 [packed = true]; - * @param index The index to set the value at. * @param value The accountPath to set. * @return This builder for chaining. */ public Builder setAccountPath( int index, int value) { - ensureAccountPathIsMutable(); - accountPath_.setInt(index, value); - onChanged(); + copyOnWrite(); + instance.setAccountPath(index, value); return this; } /** @@ -5490,9 +3823,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder addAccountPath(int value) { - ensureAccountPathIsMutable(); - accountPath_.addInt(value); - onChanged(); + copyOnWrite(); + instance.addAccountPath(value); return this; } /** @@ -5506,10 +3838,8 @@ public final class Protos { */ public Builder addAllAccountPath( java.lang.Iterable values) { - ensureAccountPathIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, accountPath_); - onChanged(); + copyOnWrite(); + instance.addAllAccountPath(values); return this; } /** @@ -5521,13 +3851,11 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearAccountPath() { - accountPath_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); + copyOnWrite(); + instance.clearAccountPath(); return this; } - private int outputScriptType_ = 1; /** *
        * Type of addresses (aka output scripts) to generate for receiving.
@@ -5536,8 +3864,9 @@ public final class Protos {
        * optional .wallet.Key.OutputScriptType output_script_type = 11;
        * @return Whether the outputScriptType field is set.
        */
-      @java.lang.Override public boolean hasOutputScriptType() {
-        return ((bitField0_ & 0x00000400) != 0);
+      @java.lang.Override
+      public boolean hasOutputScriptType() {
+        return instance.hasOutputScriptType();
       }
       /**
        * 
@@ -5549,9 +3878,7 @@ public final class Protos {
        */
       @java.lang.Override
       public org.bitcoinj.wallet.Protos.Key.OutputScriptType getOutputScriptType() {
-        @SuppressWarnings("deprecation")
-        org.bitcoinj.wallet.Protos.Key.OutputScriptType result = org.bitcoinj.wallet.Protos.Key.OutputScriptType.valueOf(outputScriptType_);
-        return result == null ? org.bitcoinj.wallet.Protos.Key.OutputScriptType.P2PKH : result;
+        return instance.getOutputScriptType();
       }
       /**
        * 
@@ -5559,16 +3886,12 @@ public final class Protos {
        * 
* * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @param value The outputScriptType to set. + * @param value The enum numeric value on the wire for outputScriptType to set. * @return This builder for chaining. */ public Builder setOutputScriptType(org.bitcoinj.wallet.Protos.Key.OutputScriptType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - outputScriptType_ = value.getNumber(); - onChanged(); + copyOnWrite(); + instance.setOutputScriptType(value); return this; } /** @@ -5580,67 +3903,105 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearOutputScriptType() { - bitField0_ = (bitField0_ & ~0x00000400); - outputScriptType_ = 1; - onChanged(); + copyOnWrite(); + instance.clearOutputScriptType(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:wallet.Key) } + private byte memoizedIsInitialized = 2; + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new org.bitcoinj.wallet.Protos.Key(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "bitField0_", + "type_", + org.bitcoinj.wallet.Protos.Key.Type.internalGetVerifier(), + "secretBytes_", + "publicKey_", + "label_", + "creationTimestamp_", + "encryptedData_", + "deterministicKey_", + "deterministicSeed_", + "encryptedDeterministicSeed_", + "accountPath_", + "outputScriptType_", + org.bitcoinj.wallet.Protos.Key.OutputScriptType.internalGetVerifier(), + }; + java.lang.String info = + "\u0001\u000b\u0000\u0001\u0001\u000b\u000b\u0000\u0001\u0004\u0001\u150c\u0000\u0002" + + "\u100a\u0001\u0003\u100a\u0003\u0004\u1008\u0004\u0005\u1002\u0005\u0006\u1409\u0002" + + "\u0007\u1409\u0006\b\u100a\u0007\t\u1409\b\n+\u000b\u100c\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (org.bitcoinj.wallet.Protos.Key.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return memoizedIsInitialized; + } + case SET_MEMOIZED_IS_INITIALIZED: { + memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1); + return null; + } + } + throw new UnsupportedOperationException(); + } + // @@protoc_insertion_point(class_scope:wallet.Key) private static final org.bitcoinj.wallet.Protos.Key DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new org.bitcoinj.wallet.Protos.Key(); + Key defaultInstance = new Key(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Key.class, defaultInstance); } public static org.bitcoinj.wallet.Protos.Key getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Key parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Key(input, extensionRegistry); - } - }; + private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { - return PARSER; + return DEFAULT_INSTANCE.getParserForType(); } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.Key getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } public interface ScriptOrBuilder extends // @@protoc_insertion_point(interface_extends:wallet.Script) - com.google.protobuf.MessageOrBuilder { + com.google.protobuf.MessageLiteOrBuilder { /** * required bytes program = 1; @@ -5677,92 +4038,14 @@ public final class Protos { /** * Protobuf type {@code wallet.Script} */ - public static final class Script extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Script extends + com.google.protobuf.GeneratedMessageLite< + Script, Script.Builder> implements // @@protoc_insertion_point(message_implements:wallet.Script) ScriptOrBuilder { - private static final long serialVersionUID = 0L; - // Use Script.newBuilder() to construct. - private Script(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } private Script() { program_ = com.google.protobuf.ByteString.EMPTY; } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Script(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Script( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - 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; - case 10: { - bitField0_ |= 0x00000001; - program_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - creationTimestamp_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).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_Script_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoinj.wallet.Protos.Script.class, org.bitcoinj.wallet.Protos.Script.Builder.class); - } - private int bitField0_; public static final int PROGRAM_FIELD_NUMBER = 1; private com.google.protobuf.ByteString program_; @@ -5782,6 +4065,22 @@ public final class Protos { public com.google.protobuf.ByteString getProgram() { return program_; } + /** + * required bytes program = 1; + * @param value The program to set. + */ + private void setProgram(com.google.protobuf.ByteString value) { + value.getClass(); + bitField0_ |= 0x00000001; + program_ = value; + } + /** + * required bytes program = 1; + */ + private void clearProgram() { + bitField0_ = (bitField0_ & ~0x00000001); + program_ = getDefaultInstance().getProgram(); + } public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 2; private long creationTimestamp_; @@ -5811,369 +4110,134 @@ public final class Protos { public long getCreationTimestamp() { return creationTimestamp_; } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasProgram()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCreationTimestamp()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + /** + *
+     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point
+     * when watching for scripts on the blockchain.
+     * 
+ * + * required int64 creation_timestamp = 2; + * @param value The creationTimestamp to set. + */ + private void setCreationTimestamp(long value) { + bitField0_ |= 0x00000002; + creationTimestamp_ = value; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, program_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt64(2, creationTimestamp_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, program_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, creationTimestamp_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.bitcoinj.wallet.Protos.Script)) { - return super.equals(obj); - } - org.bitcoinj.wallet.Protos.Script other = (org.bitcoinj.wallet.Protos.Script) obj; - - if (hasProgram() != other.hasProgram()) return false; - if (hasProgram()) { - if (!getProgram() - .equals(other.getProgram())) return false; - } - if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; - if (hasCreationTimestamp()) { - if (getCreationTimestamp() - != other.getCreationTimestamp()) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProgram()) { - hash = (37 * hash) + PROGRAM_FIELD_NUMBER; - hash = (53 * hash) + getProgram().hashCode(); - } - if (hasCreationTimestamp()) { - hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCreationTimestamp()); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + /** + *
+     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point
+     * when watching for scripts on the blockchain.
+     * 
+ * + * required int64 creation_timestamp = 2; + */ + private void clearCreationTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + creationTimestamp_ = 0L; } public static org.bitcoinj.wallet.Protos.Script parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Script parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Script parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Script parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Script parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); } public static org.bitcoinj.wallet.Protos.Script parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Script parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Script parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Script parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Script parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Script parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); } public static org.bitcoinj.wallet.Protos.Script parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.Script prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code wallet.Script} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessageLite.Builder< + org.bitcoinj.wallet.Protos.Script, Builder> implements // @@protoc_insertion_point(builder_implements:wallet.Script) org.bitcoinj.wallet.Protos.ScriptOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.bitcoinj.wallet.Protos.Script.class, org.bitcoinj.wallet.Protos.Script.Builder.class); - } - // Construct using org.bitcoinj.wallet.Protos.Script.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + super(DEFAULT_INSTANCE); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - program_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - creationTimestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_descriptor; - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.Script getDefaultInstanceForType() { - return org.bitcoinj.wallet.Protos.Script.getDefaultInstance(); - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.Script build() { - org.bitcoinj.wallet.Protos.Script result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.bitcoinj.wallet.Protos.Script buildPartial() { - org.bitcoinj.wallet.Protos.Script result = new org.bitcoinj.wallet.Protos.Script(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.program_ = program_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.creationTimestamp_ = creationTimestamp_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.bitcoinj.wallet.Protos.Script) { - return mergeFrom((org.bitcoinj.wallet.Protos.Script)other); - } else { - super.mergeFrom(other); - return this; - } - } - - 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.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - if (!hasProgram()) { - return false; - } - if (!hasCreationTimestamp()) { - return false; - } - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.bitcoinj.wallet.Protos.Script parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.bitcoinj.wallet.Protos.Script) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString program_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes program = 1; * @return Whether the program field is set. */ @java.lang.Override public boolean hasProgram() { - return ((bitField0_ & 0x00000001) != 0); + return instance.hasProgram(); } /** * required bytes program = 1; @@ -6181,7 +4245,7 @@ public final class Protos { */ @java.lang.Override public com.google.protobuf.ByteString getProgram() { - return program_; + return instance.getProgram(); } /** * required bytes program = 1; @@ -6189,12 +4253,8 @@ public final class Protos { * @return This builder for chaining. */ public Builder setProgram(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - program_ = value; - onChanged(); + copyOnWrite(); + instance.setProgram(value); return this; } /** @@ -6202,13 +4262,11 @@ public final class Protos { * @return This builder for chaining. */ public Builder clearProgram() { - bitField0_ = (bitField0_ & ~0x00000001); - program_ = getDefaultInstance().getProgram(); - onChanged(); + copyOnWrite(); + instance.clearProgram(); return this; } - private long creationTimestamp_ ; /** *
        * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point
@@ -6220,7 +4278,7 @@ public final class Protos {
        */
       @java.lang.Override
       public boolean hasCreationTimestamp() {
-        return ((bitField0_ & 0x00000002) != 0);
+        return instance.hasCreationTimestamp();
       }
       /**
        * 
@@ -6233,7 +4291,7 @@ public final class Protos {
        */
       @java.lang.Override
       public long getCreationTimestamp() {
-        return creationTimestamp_;
+        return instance.getCreationTimestamp();
       }
       /**
        * 
@@ -6246,9 +4304,8 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder setCreationTimestamp(long value) {
-        bitField0_ |= 0x00000002;
-        creationTimestamp_ = value;
-        onChanged();
+        copyOnWrite();
+        instance.setCreationTimestamp(value);
         return this;
       }
       /**
@@ -6261,67 +4318,93 @@ public final class Protos {
        * @return This builder for chaining.
        */
       public Builder clearCreationTimestamp() {
-        bitField0_ = (bitField0_ & ~0x00000002);
-        creationTimestamp_ = 0L;
-        onChanged();
+        copyOnWrite();
+        instance.clearCreationTimestamp();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:wallet.Script)
     }
+    private byte memoizedIsInitialized = 2;
+    @java.lang.Override
+    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
+    protected final java.lang.Object dynamicMethod(
+        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
+        java.lang.Object arg0, java.lang.Object arg1) {
+      switch (method) {
+        case NEW_MUTABLE_INSTANCE: {
+          return new org.bitcoinj.wallet.Protos.Script();
+        }
+        case NEW_BUILDER: {
+          return new Builder();
+        }
+        case BUILD_MESSAGE_INFO: {
+            java.lang.Object[] objects = new java.lang.Object[] {
+              "bitField0_",
+              "program_",
+              "creationTimestamp_",
+            };
+            java.lang.String info =
+                "\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0002\u0001\u150a\u0000\u0002" +
+                "\u1502\u0001";
+            return newMessageInfo(DEFAULT_INSTANCE, info, objects);
+        }
+        // fall through
+        case GET_DEFAULT_INSTANCE: {
+          return DEFAULT_INSTANCE;
+        }
+        case GET_PARSER: {
+          com.google.protobuf.Parser parser = PARSER;
+          if (parser == null) {
+            synchronized (org.bitcoinj.wallet.Protos.Script.class) {
+              parser = PARSER;
+              if (parser == null) {
+                parser =
+                    new DefaultInstanceBasedParser(
+                        DEFAULT_INSTANCE);
+                PARSER = parser;
+              }
+            }
+          }
+          return parser;
+      }
+      case GET_MEMOIZED_IS_INITIALIZED: {
+        return memoizedIsInitialized;
+      }
+      case SET_MEMOIZED_IS_INITIALIZED: {
+        memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
+        return null;
+      }
+      }
+      throw new UnsupportedOperationException();
+    }
+
 
     // @@protoc_insertion_point(class_scope:wallet.Script)
     private static final org.bitcoinj.wallet.Protos.Script DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new org.bitcoinj.wallet.Protos.Script();
+      Script defaultInstance = new Script();
+      // New instances are implicitly immutable so no need to make
+      // immutable.
+      DEFAULT_INSTANCE = defaultInstance;
+      com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
+        Script.class, defaultInstance);
     }
 
     public static org.bitcoinj.wallet.Protos.Script getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    @java.lang.Deprecated public static final com.google.protobuf.Parser