From 36dce3d9d52c322270192eadb7fa53f0dd7c13a5 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Fri, 28 Jul 2023 21:44:13 +0200 Subject: [PATCH] wallet.proto, paymentrequest.proto: move generated files to dedicated packages * Modify the `java_package` setting in our two `.proto` source files * Move 2 existing generated-but-checked-in Protos.java files to dedicated packages (i.e. packages without hand-coded "artisanal" files) This is a step towards more compatibility with ProtoBuf tooling which sometimes likes to delete the generated files and: > can't distinguish between "old generated code" and "your artisan source files." and more importantly it is a step towards fixing Gradle 8 caching issues. --- .gitignore | 1 + .../bitcoin/protocols/payments/Protos.java | 4722 ----- .../main/java/org/bitcoinj/crypto/ECKey.java | 2 +- .../org/bitcoinj/crypto/EncryptableItem.java | 2 +- .../java/org/bitcoinj/crypto/KeyCrypter.java | 2 +- .../org/bitcoinj/crypto/KeyCrypterScrypt.java | 6 +- .../protocols/payments/PaymentProtocol.java | 2 +- .../protocols/payments/PaymentSession.java | 2 +- .../org/bitcoinj/wallet/BasicKeyChain.java | 1 + .../wallet/DeterministicKeyChain.java | 1 + .../bitcoinj/wallet/DeterministicSeed.java | 1 + .../java/org/bitcoinj/wallet/KeyChain.java | 1 + .../org/bitcoinj/wallet/KeyChainGroup.java | 1 + .../main/java/org/bitcoinj/wallet/Protos.java | 15292 ---------------- .../java/org/bitcoinj/wallet/SendRequest.java | 2 +- .../main/java/org/bitcoinj/wallet/Wallet.java | 3 +- .../wallet/WalletProtobufSerializer.java | 5 +- core/src/main/proto/paymentrequest.proto | 2 +- core/src/main/proto/wallet.proto | 2 +- .../payments/PaymentProtocolTest.java | 8 +- .../payments/PaymentSessionTest.java | 2 +- .../store/WalletProtobufSerializerTest.java | 2 +- .../bitcoinj/wallet/BasicKeyChainTest.java | 1 + .../wallet/DeterministicKeyChainTest.java | 1 + .../bitcoinj/wallet/KeyChainGroupTest.java | 1 + .../java/org/bitcoinj/wallet/WalletTest.java | 3 +- .../bitcoinj/tools/PaymentProtocolTool.java | 2 +- .../WalletSetPasswordController.java | 2 +- .../org/bitcoinj/wallettool/WalletTool.java | 6 +- 29 files changed, 38 insertions(+), 20040 deletions(-) delete mode 100644 core/src/main/java/org/bitcoin/protocols/payments/Protos.java delete mode 100644 core/src/main/java/org/bitcoinj/wallet/Protos.java diff --git a/.gitignore b/.gitignore index 2c21d5cc6..866f30aae 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ bin/ out/ *.chain *.spvchain +core/src/main/java/org/bitcoinj/protobuf/ diff --git a/core/src/main/java/org/bitcoin/protocols/payments/Protos.java b/core/src/main/java/org/bitcoin/protocols/payments/Protos.java deleted file mode 100644 index 6e4d57fdc..000000000 --- a/core/src/main/java/org/bitcoin/protocols/payments/Protos.java +++ /dev/null @@ -1,4722 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: paymentrequest.proto - -package org.bitcoin.protocols.payments; - -public final class Protos { - private Protos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - public interface OutputOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.Output) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * amount is integer-number-of-satoshis
-     * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return Whether the amount field is set. - */ - boolean hasAmount(); - /** - *
-     * amount is integer-number-of-satoshis
-     * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return The amount. - */ - long getAmount(); - - /** - *
-     * usually one of the standard Script forms
-     * 
- * - * required bytes script = 2; - * @return Whether the script field is set. - */ - boolean hasScript(); - /** - *
-     * usually one of the standard Script forms
-     * 
- * - * required bytes script = 2; - * @return The script. - */ - com.google.protobuf.ByteString getScript(); - } - /** - *
-   * Generalized form of "send payment to this/these bitcoin addresses"
-   * 
- * - * Protobuf type {@code payments.Output} - */ - public static final class Output extends - com.google.protobuf.GeneratedMessageLite< - Output, Output.Builder> implements - // @@protoc_insertion_point(message_implements:payments.Output) - OutputOrBuilder { - private Output() { - script_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int AMOUNT_FIELD_NUMBER = 1; - private long amount_; - /** - *
-     * amount is integer-number-of-satoshis
-     * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return Whether the amount field is set. - */ - @java.lang.Override - public boolean hasAmount() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * amount is integer-number-of-satoshis
-     * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return The amount. - */ - @java.lang.Override - 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_; - /** - *
-     * usually one of the standard Script forms
-     * 
- * - * required bytes script = 2; - * @return Whether the script field is set. - */ - @java.lang.Override - public boolean hasScript() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * usually one of the standard Script forms
-     * 
- * - * required bytes script = 2; - * @return The script. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScript() { - return script_; - } - /** - *
-     * 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) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000002; - script_ = value; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.Output parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.Output prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     * Generalized form of "send payment to this/these bitcoin addresses"
-     * 
- * - * Protobuf type {@code payments.Output} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.Output.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * amount is integer-number-of-satoshis
-       * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return Whether the amount field is set. - */ - @java.lang.Override - public boolean hasAmount() { - return instance.hasAmount(); - } - /** - *
-       * amount is integer-number-of-satoshis
-       * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return instance.getAmount(); - } - /** - *
-       * amount is integer-number-of-satoshis
-       * 
- * - * optional uint64 amount = 1 [default = 0]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - copyOnWrite(); - instance.setAmount(value); - return this; - } - /** - *
-       * amount is integer-number-of-satoshis
-       * 
- * - * optional uint64 amount = 1 [default = 0]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - copyOnWrite(); - instance.clearAmount(); - return this; - } - - /** - *
-       * usually one of the standard Script forms
-       * 
- * - * required bytes script = 2; - * @return Whether the script field is set. - */ - @java.lang.Override - public boolean hasScript() { - return instance.hasScript(); - } - /** - *
-       * usually one of the standard Script forms
-       * 
- * - * required bytes script = 2; - * @return The script. - */ - @java.lang.Override - public com.google.protobuf.ByteString getScript() { - return instance.getScript(); - } - /** - *
-       * usually one of the standard Script forms
-       * 
- * - * required bytes script = 2; - * @param value The script to set. - * @return This builder for chaining. - */ - public Builder setScript(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setScript(value); - return this; - } - /** - *
-       * usually one of the standard Script forms
-       * 
- * - * required bytes script = 2; - * @return This builder for chaining. - */ - public Builder clearScript() { - copyOnWrite(); - instance.clearScript(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PaymentDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.PaymentDetails) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return Whether the network field is set. - */ - boolean hasNetwork(); - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return The network. - */ - java.lang.String getNetwork(); - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return The bytes for network. - */ - com.google.protobuf.ByteString - getNetworkBytes(); - - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - java.util.List - getOutputsList(); - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - org.bitcoin.protocols.payments.Protos.Output getOutputs(int index); - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - int getOutputsCount(); - - /** - *
-     * Timestamp; when payment request created
-     * 
- * - * required uint64 time = 3; - * @return Whether the time field is set. - */ - boolean hasTime(); - /** - *
-     * Timestamp; when payment request created
-     * 
- * - * required uint64 time = 3; - * @return The time. - */ - long getTime(); - - /** - *
-     * Timestamp; when this request should be considered invalid
-     * 
- * - * optional uint64 expires = 4; - * @return Whether the expires field is set. - */ - boolean hasExpires(); - /** - *
-     * Timestamp; when this request should be considered invalid
-     * 
- * - * optional uint64 expires = 4; - * @return The expires. - */ - long getExpires(); - - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return Whether the memo field is set. - */ - boolean hasMemo(); - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return Whether the paymentUrl field is set. - */ - boolean hasPaymentUrl(); - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return The paymentUrl. - */ - java.lang.String getPaymentUrl(); - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return The bytes for paymentUrl. - */ - com.google.protobuf.ByteString - getPaymentUrlBytes(); - - /** - *
-     * Arbitrary data to include in the Payment message
-     * 
- * - * optional bytes merchant_data = 7; - * @return Whether the merchantData field is set. - */ - boolean hasMerchantData(); - /** - *
-     * Arbitrary data to include in the Payment message
-     * 
- * - * optional bytes merchant_data = 7; - * @return The merchantData. - */ - com.google.protobuf.ByteString getMerchantData(); - } - /** - * Protobuf type {@code payments.PaymentDetails} - */ - public static final class PaymentDetails extends - com.google.protobuf.GeneratedMessageLite< - PaymentDetails, PaymentDetails.Builder> implements - // @@protoc_insertion_point(message_implements:payments.PaymentDetails) - PaymentDetailsOrBuilder { - private PaymentDetails() { - network_ = "main"; - outputs_ = emptyProtobufList(); - memo_ = ""; - paymentUrl_ = ""; - merchantData_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int NETWORK_FIELD_NUMBER = 1; - private java.lang.String network_; - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return Whether the network field is set. - */ - @java.lang.Override - public boolean hasNetwork() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return The network. - */ - @java.lang.Override - public java.lang.String getNetwork() { - return network_; - } - /** - *
-     * "main" or "test"
-     * 
- * - * optional string network = 1 [default = "main"]; - * @return The bytes for network. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNetworkBytes() { - 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) { - java.lang.Class valueClass = 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 com.google.protobuf.Internal.ProtobufList outputs_; - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - @java.lang.Override - public java.util.List getOutputsList() { - return outputs_; - } - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - public java.util.List - getOutputsOrBuilderList() { - return outputs_; - } - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - @java.lang.Override - public int getOutputsCount() { - return outputs_.size(); - } - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Output getOutputs(int index) { - return outputs_.get(index); - } - /** - *
-     * Where payment should be sent
-     * 
- * - * repeated .payments.Output outputs = 2; - */ - 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_; - /** - *
-     * Timestamp; when payment request created
-     * 
- * - * required uint64 time = 3; - * @return Whether the time field is set. - */ - @java.lang.Override - public boolean hasTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Timestamp; when payment request created
-     * 
- * - * required uint64 time = 3; - * @return The time. - */ - @java.lang.Override - 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_; - /** - *
-     * Timestamp; when this request should be considered invalid
-     * 
- * - * optional uint64 expires = 4; - * @return Whether the expires field is set. - */ - @java.lang.Override - public boolean hasExpires() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * Timestamp; when this request should be considered invalid
-     * 
- * - * optional uint64 expires = 4; - * @return The expires. - */ - @java.lang.Override - 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 java.lang.String memo_; - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return memo_; - } - /** - *
-     * Human-readable description of request for the customer
-     * 
- * - * optional string memo = 5; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - 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) { - java.lang.Class valueClass = 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 java.lang.String paymentUrl_; - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return Whether the paymentUrl field is set. - */ - @java.lang.Override - public boolean hasPaymentUrl() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return The paymentUrl. - */ - @java.lang.Override - public java.lang.String getPaymentUrl() { - return paymentUrl_; - } - /** - *
-     * URL to send Payment and get PaymentACK
-     * 
- * - * optional string payment_url = 6; - * @return The bytes for paymentUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPaymentUrlBytes() { - 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) { - java.lang.Class valueClass = 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; - private com.google.protobuf.ByteString merchantData_; - /** - *
-     * Arbitrary data to include in the Payment message
-     * 
- * - * optional bytes merchant_data = 7; - * @return Whether the merchantData field is set. - */ - @java.lang.Override - public boolean hasMerchantData() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * Arbitrary data to include in the Payment message
-     * 
- * - * optional bytes merchant_data = 7; - * @return The merchantData. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMerchantData() { - return merchantData_; - } - /** - *
-     * 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) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000020; - merchantData_ = value; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.PaymentDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentDetails prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code payments.PaymentDetails} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.PaymentDetails.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @return Whether the network field is set. - */ - @java.lang.Override - public boolean hasNetwork() { - return instance.hasNetwork(); - } - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @return The network. - */ - @java.lang.Override - public java.lang.String getNetwork() { - return instance.getNetwork(); - } - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @return The bytes for network. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNetworkBytes() { - return instance.getNetworkBytes(); - } - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @param value The network to set. - * @return This builder for chaining. - */ - public Builder setNetwork( - java.lang.String value) { - copyOnWrite(); - instance.setNetwork(value); - return this; - } - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @return This builder for chaining. - */ - public Builder clearNetwork() { - copyOnWrite(); - instance.clearNetwork(); - return this; - } - /** - *
-       * "main" or "test"
-       * 
- * - * optional string network = 1 [default = "main"]; - * @param value The bytes for network to set. - * @return This builder for chaining. - */ - public Builder setNetworkBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setNetworkBytes(value); - return this; - } - - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - @java.lang.Override - public java.util.List getOutputsList() { - return java.util.Collections.unmodifiableList( - instance.getOutputsList()); - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - @java.lang.Override - public int getOutputsCount() { - 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) { - return instance.getOutputs(index); - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder setOutputs( - int index, org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.setOutputs(index, value); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder setOutputs( - int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.setOutputs(index, - builderForValue.build()); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder addOutputs(org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.addOutputs(value); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder addOutputs( - int index, org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.addOutputs(index, value); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder addOutputs( - org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.addOutputs(builderForValue.build()); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder addOutputs( - int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.addOutputs(index, - builderForValue.build()); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder addAllOutputs( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllOutputs(values); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder clearOutputs() { - copyOnWrite(); - instance.clearOutputs(); - return this; - } - /** - *
-       * Where payment should be sent
-       * 
- * - * repeated .payments.Output outputs = 2; - */ - public Builder removeOutputs(int index) { - copyOnWrite(); - instance.removeOutputs(index); - return this; - } - - /** - *
-       * Timestamp; when payment request created
-       * 
- * - * required uint64 time = 3; - * @return Whether the time field is set. - */ - @java.lang.Override - public boolean hasTime() { - return instance.hasTime(); - } - /** - *
-       * Timestamp; when payment request created
-       * 
- * - * required uint64 time = 3; - * @return The time. - */ - @java.lang.Override - public long getTime() { - return instance.getTime(); - } - /** - *
-       * Timestamp; when payment request created
-       * 
- * - * required uint64 time = 3; - * @param value The time to set. - * @return This builder for chaining. - */ - public Builder setTime(long value) { - copyOnWrite(); - instance.setTime(value); - return this; - } - /** - *
-       * Timestamp; when payment request created
-       * 
- * - * required uint64 time = 3; - * @return This builder for chaining. - */ - public Builder clearTime() { - copyOnWrite(); - instance.clearTime(); - return this; - } - - /** - *
-       * Timestamp; when this request should be considered invalid
-       * 
- * - * optional uint64 expires = 4; - * @return Whether the expires field is set. - */ - @java.lang.Override - public boolean hasExpires() { - return instance.hasExpires(); - } - /** - *
-       * Timestamp; when this request should be considered invalid
-       * 
- * - * optional uint64 expires = 4; - * @return The expires. - */ - @java.lang.Override - public long getExpires() { - return instance.getExpires(); - } - /** - *
-       * Timestamp; when this request should be considered invalid
-       * 
- * - * optional uint64 expires = 4; - * @param value The expires to set. - * @return This builder for chaining. - */ - public Builder setExpires(long value) { - copyOnWrite(); - instance.setExpires(value); - return this; - } - /** - *
-       * Timestamp; when this request should be considered invalid
-       * 
- * - * optional uint64 expires = 4; - * @return This builder for chaining. - */ - public Builder clearExpires() { - copyOnWrite(); - instance.clearExpires(); - return this; - } - - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return instance.hasMemo(); - } - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return instance.getMemo(); - } - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - return instance.getMemoBytes(); - } - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - copyOnWrite(); - instance.setMemo(value); - return this; - } - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @return This builder for chaining. - */ - public Builder clearMemo() { - copyOnWrite(); - instance.clearMemo(); - return this; - } - /** - *
-       * Human-readable description of request for the customer
-       * 
- * - * optional string memo = 5; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setMemoBytes(value); - return this; - } - - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @return Whether the paymentUrl field is set. - */ - @java.lang.Override - public boolean hasPaymentUrl() { - return instance.hasPaymentUrl(); - } - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @return The paymentUrl. - */ - @java.lang.Override - public java.lang.String getPaymentUrl() { - return instance.getPaymentUrl(); - } - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @return The bytes for paymentUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPaymentUrlBytes() { - return instance.getPaymentUrlBytes(); - } - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @param value The paymentUrl to set. - * @return This builder for chaining. - */ - public Builder setPaymentUrl( - java.lang.String value) { - copyOnWrite(); - instance.setPaymentUrl(value); - return this; - } - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @return This builder for chaining. - */ - public Builder clearPaymentUrl() { - copyOnWrite(); - instance.clearPaymentUrl(); - return this; - } - /** - *
-       * URL to send Payment and get PaymentACK
-       * 
- * - * optional string payment_url = 6; - * @param value The bytes for paymentUrl to set. - * @return This builder for chaining. - */ - public Builder setPaymentUrlBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setPaymentUrlBytes(value); - return this; - } - - /** - *
-       * Arbitrary data to include in the Payment message
-       * 
- * - * optional bytes merchant_data = 7; - * @return Whether the merchantData field is set. - */ - @java.lang.Override - public boolean hasMerchantData() { - return instance.hasMerchantData(); - } - /** - *
-       * Arbitrary data to include in the Payment message
-       * 
- * - * optional bytes merchant_data = 7; - * @return The merchantData. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMerchantData() { - return instance.getMerchantData(); - } - /** - *
-       * Arbitrary data to include in the Payment message
-       * 
- * - * optional bytes merchant_data = 7; - * @param value The merchantData to set. - * @return This builder for chaining. - */ - public Builder setMerchantData(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setMerchantData(value); - return this; - } - /** - *
-       * Arbitrary data to include in the Payment message
-       * 
- * - * optional bytes merchant_data = 7; - * @return This builder for chaining. - */ - public Builder clearMerchantData() { - copyOnWrite(); - instance.clearMerchantData(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PaymentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.PaymentRequest) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return Whether the paymentDetailsVersion field is set. - */ - boolean hasPaymentDetailsVersion(); - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return The paymentDetailsVersion. - */ - int getPaymentDetailsVersion(); - - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return Whether the pkiType field is set. - */ - boolean hasPkiType(); - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The pkiType. - */ - java.lang.String getPkiType(); - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The bytes for pkiType. - */ - com.google.protobuf.ByteString - getPkiTypeBytes(); - - /** - *
-     * depends on pki_type
-     * 
- * - * optional bytes pki_data = 3; - * @return Whether the pkiData field is set. - */ - boolean hasPkiData(); - /** - *
-     * depends on pki_type
-     * 
- * - * optional bytes pki_data = 3; - * @return The pkiData. - */ - com.google.protobuf.ByteString getPkiData(); - - /** - *
-     * PaymentDetails
-     * 
- * - * required bytes serialized_payment_details = 4; - * @return Whether the serializedPaymentDetails field is set. - */ - boolean hasSerializedPaymentDetails(); - /** - *
-     * PaymentDetails
-     * 
- * - * required bytes serialized_payment_details = 4; - * @return The serializedPaymentDetails. - */ - com.google.protobuf.ByteString getSerializedPaymentDetails(); - - /** - *
-     * pki-dependent signature
-     * 
- * - * optional bytes signature = 5; - * @return Whether the signature field is set. - */ - boolean hasSignature(); - /** - *
-     * pki-dependent signature
-     * 
- * - * optional bytes signature = 5; - * @return The signature. - */ - com.google.protobuf.ByteString getSignature(); - } - /** - * Protobuf type {@code payments.PaymentRequest} - */ - public static final class PaymentRequest extends - com.google.protobuf.GeneratedMessageLite< - PaymentRequest, PaymentRequest.Builder> implements - // @@protoc_insertion_point(message_implements:payments.PaymentRequest) - PaymentRequestOrBuilder { - private PaymentRequest() { - paymentDetailsVersion_ = 1; - pkiType_ = "none"; - pkiData_ = com.google.protobuf.ByteString.EMPTY; - serializedPaymentDetails_ = com.google.protobuf.ByteString.EMPTY; - signature_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int PAYMENT_DETAILS_VERSION_FIELD_NUMBER = 1; - private int paymentDetailsVersion_; - /** - * 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); - } - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return The paymentDetailsVersion. - */ - @java.lang.Override - 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 java.lang.String pkiType_; - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return Whether the pkiType field is set. - */ - @java.lang.Override - public boolean hasPkiType() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The pkiType. - */ - @java.lang.Override - public java.lang.String getPkiType() { - return pkiType_; - } - /** - *
-     * none / x509+sha256 / x509+sha1
-     * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The bytes for pkiType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPkiTypeBytes() { - 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) { - java.lang.Class valueClass = 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; - private com.google.protobuf.ByteString pkiData_; - /** - *
-     * depends on pki_type
-     * 
- * - * optional bytes pki_data = 3; - * @return Whether the pkiData field is set. - */ - @java.lang.Override - public boolean hasPkiData() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * depends on pki_type
-     * 
- * - * optional bytes pki_data = 3; - * @return The pkiData. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * PaymentDetails
-     * 
- * - * required bytes serialized_payment_details = 4; - * @return Whether the serializedPaymentDetails field is set. - */ - @java.lang.Override - public boolean hasSerializedPaymentDetails() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * PaymentDetails
-     * 
- * - * required bytes serialized_payment_details = 4; - * @return The serializedPaymentDetails. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * pki-dependent signature
-     * 
- * - * optional bytes signature = 5; - * @return Whether the signature field is set. - */ - @java.lang.Override - public boolean hasSignature() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * pki-dependent signature
-     * 
- * - * optional bytes signature = 5; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - /** - *
-     * pki-dependent signature
-     * 
- * - * optional bytes signature = 5; - * @param value The signature to set. - */ - private void setSignature(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000010; - signature_ = value; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.PaymentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentRequest prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code payments.PaymentRequest} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.PaymentRequest.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return Whether the paymentDetailsVersion field is set. - */ - @java.lang.Override - public boolean hasPaymentDetailsVersion() { - return instance.hasPaymentDetailsVersion(); - } - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return The paymentDetailsVersion. - */ - @java.lang.Override - public int getPaymentDetailsVersion() { - return instance.getPaymentDetailsVersion(); - } - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @param value The paymentDetailsVersion to set. - * @return This builder for chaining. - */ - public Builder setPaymentDetailsVersion(int value) { - copyOnWrite(); - instance.setPaymentDetailsVersion(value); - return this; - } - /** - * optional uint32 payment_details_version = 1 [default = 1]; - * @return This builder for chaining. - */ - public Builder clearPaymentDetailsVersion() { - copyOnWrite(); - instance.clearPaymentDetailsVersion(); - return this; - } - - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return Whether the pkiType field is set. - */ - @java.lang.Override - public boolean hasPkiType() { - return instance.hasPkiType(); - } - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The pkiType. - */ - @java.lang.Override - public java.lang.String getPkiType() { - return instance.getPkiType(); - } - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return The bytes for pkiType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPkiTypeBytes() { - return instance.getPkiTypeBytes(); - } - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @param value The pkiType to set. - * @return This builder for chaining. - */ - public Builder setPkiType( - java.lang.String value) { - copyOnWrite(); - instance.setPkiType(value); - return this; - } - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @return This builder for chaining. - */ - public Builder clearPkiType() { - copyOnWrite(); - instance.clearPkiType(); - return this; - } - /** - *
-       * none / x509+sha256 / x509+sha1
-       * 
- * - * optional string pki_type = 2 [default = "none"]; - * @param value The bytes for pkiType to set. - * @return This builder for chaining. - */ - public Builder setPkiTypeBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setPkiTypeBytes(value); - return this; - } - - /** - *
-       * depends on pki_type
-       * 
- * - * optional bytes pki_data = 3; - * @return Whether the pkiData field is set. - */ - @java.lang.Override - public boolean hasPkiData() { - return instance.hasPkiData(); - } - /** - *
-       * depends on pki_type
-       * 
- * - * optional bytes pki_data = 3; - * @return The pkiData. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPkiData() { - return instance.getPkiData(); - } - /** - *
-       * depends on pki_type
-       * 
- * - * optional bytes pki_data = 3; - * @param value The pkiData to set. - * @return This builder for chaining. - */ - public Builder setPkiData(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setPkiData(value); - return this; - } - /** - *
-       * depends on pki_type
-       * 
- * - * optional bytes pki_data = 3; - * @return This builder for chaining. - */ - public Builder clearPkiData() { - copyOnWrite(); - instance.clearPkiData(); - return this; - } - - /** - *
-       * PaymentDetails
-       * 
- * - * required bytes serialized_payment_details = 4; - * @return Whether the serializedPaymentDetails field is set. - */ - @java.lang.Override - public boolean hasSerializedPaymentDetails() { - return instance.hasSerializedPaymentDetails(); - } - /** - *
-       * PaymentDetails
-       * 
- * - * required bytes serialized_payment_details = 4; - * @return The serializedPaymentDetails. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSerializedPaymentDetails() { - return instance.getSerializedPaymentDetails(); - } - /** - *
-       * PaymentDetails
-       * 
- * - * required bytes serialized_payment_details = 4; - * @param value The serializedPaymentDetails to set. - * @return This builder for chaining. - */ - public Builder setSerializedPaymentDetails(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSerializedPaymentDetails(value); - return this; - } - /** - *
-       * PaymentDetails
-       * 
- * - * required bytes serialized_payment_details = 4; - * @return This builder for chaining. - */ - public Builder clearSerializedPaymentDetails() { - copyOnWrite(); - instance.clearSerializedPaymentDetails(); - return this; - } - - /** - *
-       * pki-dependent signature
-       * 
- * - * optional bytes signature = 5; - * @return Whether the signature field is set. - */ - @java.lang.Override - public boolean hasSignature() { - return instance.hasSignature(); - } - /** - *
-       * pki-dependent signature
-       * 
- * - * optional bytes signature = 5; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return instance.getSignature(); - } - /** - *
-       * pki-dependent signature
-       * 
- * - * optional bytes signature = 5; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSignature(value); - return this; - } - /** - *
-       * pki-dependent signature
-       * 
- * - * optional bytes signature = 5; - * @return This builder for chaining. - */ - public Builder clearSignature() { - copyOnWrite(); - instance.clearSignature(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface X509CertificatesOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.X509Certificates) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @return A list containing the certificate. - */ - java.util.List getCertificateList(); - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @return The count of certificate. - */ - int getCertificateCount(); - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @param index The index of the element to return. - * @return The certificate at the given index. - */ - com.google.protobuf.ByteString getCertificate(int index); - } - /** - * Protobuf type {@code payments.X509Certificates} - */ - public static final class X509Certificates extends - com.google.protobuf.GeneratedMessageLite< - X509Certificates, X509Certificates.Builder> implements - // @@protoc_insertion_point(message_implements:payments.X509Certificates) - X509CertificatesOrBuilder { - private X509Certificates() { - certificate_ = emptyProtobufList(); - } - public static final int CERTIFICATE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.ProtobufList certificate_; - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @return A list containing the certificate. - */ - @java.lang.Override - public java.util.List - getCertificateList() { - return certificate_; - } - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @return The count of certificate. - */ - @java.lang.Override - public int getCertificateCount() { - return certificate_.size(); - } - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @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 void ensureCertificateIsMutable() { - com.google.protobuf.Internal.ProtobufList tmp = certificate_; - if (!tmp.isModifiable()) { - certificate_ = - com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); - } - } - /** - *
-     * 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) { - java.lang.Class valueClass = value.getClass(); - ensureCertificateIsMutable(); - certificate_.set(index, value); - } - /** - *
-     * DER-encoded X.509 certificate chain
-     * 
- * - * repeated bytes certificate = 1; - * @param value The certificate to add. - */ - private void addCertificate(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - ensureCertificateIsMutable(); - certificate_.add(value); - } - /** - *
-     * 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_); - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.X509Certificates parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.X509Certificates prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code payments.X509Certificates} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.X509Certificates.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @return A list containing the certificate. - */ - @java.lang.Override - public java.util.List - getCertificateList() { - return java.util.Collections.unmodifiableList( - instance.getCertificateList()); - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @return The count of certificate. - */ - @java.lang.Override - public int getCertificateCount() { - return instance.getCertificateCount(); - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @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 instance.getCertificate(index); - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @param value The certificate to set. - * @return This builder for chaining. - */ - public Builder setCertificate( - int index, com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setCertificate(index, value); - return this; - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @param value The certificate to add. - * @return This builder for chaining. - */ - public Builder addCertificate(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.addCertificate(value); - return this; - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @param values The certificate to add. - * @return This builder for chaining. - */ - public Builder addAllCertificate( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllCertificate(values); - return this; - } - /** - *
-       * DER-encoded X.509 certificate chain
-       * 
- * - * repeated bytes certificate = 1; - * @return This builder for chaining. - */ - public Builder clearCertificate() { - copyOnWrite(); - instance.clearCertificate(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PaymentOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.Payment) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * From PaymentDetails.merchant_data
-     * 
- * - * optional bytes merchant_data = 1; - * @return Whether the merchantData field is set. - */ - boolean hasMerchantData(); - /** - *
-     * From PaymentDetails.merchant_data
-     * 
- * - * optional bytes merchant_data = 1; - * @return The merchantData. - */ - com.google.protobuf.ByteString getMerchantData(); - - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @return A list containing the transactions. - */ - java.util.List getTransactionsList(); - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @return The count of transactions. - */ - int getTransactionsCount(); - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @param index The index of the element to return. - * @return The transactions at the given index. - */ - com.google.protobuf.ByteString getTransactions(int index); - - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - java.util.List - getRefundToList(); - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - org.bitcoin.protocols.payments.Protos.Output getRefundTo(int index); - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - int getRefundToCount(); - - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return Whether the memo field is set. - */ - boolean hasMemo(); - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - * Protobuf type {@code payments.Payment} - */ - public static final class Payment extends - com.google.protobuf.GeneratedMessageLite< - Payment, Payment.Builder> implements - // @@protoc_insertion_point(message_implements:payments.Payment) - PaymentOrBuilder { - private Payment() { - merchantData_ = com.google.protobuf.ByteString.EMPTY; - transactions_ = emptyProtobufList(); - refundTo_ = emptyProtobufList(); - memo_ = ""; - } - private int bitField0_; - public static final int MERCHANT_DATA_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString merchantData_; - /** - *
-     * From PaymentDetails.merchant_data
-     * 
- * - * optional bytes merchant_data = 1; - * @return Whether the merchantData field is set. - */ - @java.lang.Override - public boolean hasMerchantData() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * From PaymentDetails.merchant_data
-     * 
- * - * optional bytes merchant_data = 1; - * @return The merchantData. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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 com.google.protobuf.Internal.ProtobufList transactions_; - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @return A list containing the transactions. - */ - @java.lang.Override - public java.util.List - getTransactionsList() { - return transactions_; - } - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @return The count of transactions. - */ - @java.lang.Override - public int getTransactionsCount() { - return transactions_.size(); - } - /** - *
-     * Signed transactions that satisfy PaymentDetails.outputs
-     * 
- * - * repeated bytes transactions = 2; - * @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) { - java.lang.Class valueClass = 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) { - java.lang.Class valueClass = 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 com.google.protobuf.Internal.ProtobufList refundTo_; - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - @java.lang.Override - public java.util.List getRefundToList() { - return refundTo_; - } - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - public java.util.List - getRefundToOrBuilderList() { - return refundTo_; - } - /** - *
-     * Where to send refunds, if a refund is necessary
-     * 
- * - * repeated .payments.Output refund_to = 3; - */ - @java.lang.Override - public int getRefundToCount() { - return refundTo_.size(); - } - /** - *
-     * 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) { - return refundTo_.get(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) { - 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 java.lang.String memo_; - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return memo_; - } - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - return com.google.protobuf.ByteString.copyFromUtf8(memo_); - } - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - * @param value The memo to set. - */ - private void setMemo( - java.lang.String value) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000002; - memo_ = value; - } - /** - *
-     * Human-readable message for the merchant
-     * 
- * - * optional string memo = 4; - */ - private void clearMemo() { - bitField0_ = (bitField0_ & ~0x00000002); - memo_ = getDefaultInstance().getMemo(); - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.Payment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.Payment prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code payments.Payment} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.Payment.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * From PaymentDetails.merchant_data
-       * 
- * - * optional bytes merchant_data = 1; - * @return Whether the merchantData field is set. - */ - @java.lang.Override - public boolean hasMerchantData() { - return instance.hasMerchantData(); - } - /** - *
-       * From PaymentDetails.merchant_data
-       * 
- * - * optional bytes merchant_data = 1; - * @return The merchantData. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMerchantData() { - return instance.getMerchantData(); - } - /** - *
-       * From PaymentDetails.merchant_data
-       * 
- * - * optional bytes merchant_data = 1; - * @param value The merchantData to set. - * @return This builder for chaining. - */ - public Builder setMerchantData(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setMerchantData(value); - return this; - } - /** - *
-       * From PaymentDetails.merchant_data
-       * 
- * - * optional bytes merchant_data = 1; - * @return This builder for chaining. - */ - public Builder clearMerchantData() { - copyOnWrite(); - instance.clearMerchantData(); - return this; - } - - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @return A list containing the transactions. - */ - @java.lang.Override - public java.util.List - getTransactionsList() { - return java.util.Collections.unmodifiableList( - instance.getTransactionsList()); - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @return The count of transactions. - */ - @java.lang.Override - public int getTransactionsCount() { - return instance.getTransactionsCount(); - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @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 instance.getTransactions(index); - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @param value The transactions to set. - * @return This builder for chaining. - */ - public Builder setTransactions( - int index, com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setTransactions(index, value); - return this; - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @param value The transactions to add. - * @return This builder for chaining. - */ - public Builder addTransactions(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.addTransactions(value); - return this; - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @param values The transactions to add. - * @return This builder for chaining. - */ - public Builder addAllTransactions( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllTransactions(values); - return this; - } - /** - *
-       * Signed transactions that satisfy PaymentDetails.outputs
-       * 
- * - * repeated bytes transactions = 2; - * @return This builder for chaining. - */ - public Builder clearTransactions() { - copyOnWrite(); - instance.clearTransactions(); - return this; - } - - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - @java.lang.Override - public java.util.List getRefundToList() { - return java.util.Collections.unmodifiableList( - instance.getRefundToList()); - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - @java.lang.Override - public int getRefundToCount() { - 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) { - return instance.getRefundTo(index); - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder setRefundTo( - int index, org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.setRefundTo(index, value); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder setRefundTo( - int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.setRefundTo(index, - builderForValue.build()); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder addRefundTo(org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.addRefundTo(value); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder addRefundTo( - int index, org.bitcoin.protocols.payments.Protos.Output value) { - copyOnWrite(); - instance.addRefundTo(index, value); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder addRefundTo( - org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.addRefundTo(builderForValue.build()); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder addRefundTo( - int index, org.bitcoin.protocols.payments.Protos.Output.Builder builderForValue) { - copyOnWrite(); - instance.addRefundTo(index, - builderForValue.build()); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder addAllRefundTo( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllRefundTo(values); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder clearRefundTo() { - copyOnWrite(); - instance.clearRefundTo(); - return this; - } - /** - *
-       * Where to send refunds, if a refund is necessary
-       * 
- * - * repeated .payments.Output refund_to = 3; - */ - public Builder removeRefundTo(int index) { - copyOnWrite(); - instance.removeRefundTo(index); - return this; - } - - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return instance.hasMemo(); - } - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return instance.getMemo(); - } - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - return instance.getMemoBytes(); - } - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - copyOnWrite(); - instance.setMemo(value); - return this; - } - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @return This builder for chaining. - */ - public Builder clearMemo() { - copyOnWrite(); - instance.clearMemo(); - return this; - } - /** - *
-       * Human-readable message for the merchant
-       * 
- * - * optional string memo = 4; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setMemoBytes(value); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PaymentACKOrBuilder extends - // @@protoc_insertion_point(interface_extends:payments.PaymentACK) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - * @return Whether the payment field is set. - */ - boolean hasPayment(); - /** - *
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - * @return The payment. - */ - org.bitcoin.protocols.payments.Protos.Payment getPayment(); - - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return Whether the memo field is set. - */ - boolean hasMemo(); - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - * Protobuf type {@code payments.PaymentACK} - */ - public static final class PaymentACK extends - com.google.protobuf.GeneratedMessageLite< - PaymentACK, PaymentACK.Builder> implements - // @@protoc_insertion_point(message_implements:payments.PaymentACK) - PaymentACKOrBuilder { - private PaymentACK() { - memo_ = ""; - } - private int bitField0_; - public static final int PAYMENT_FIELD_NUMBER = 1; - private org.bitcoin.protocols.payments.Protos.Payment payment_; - /** - *
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - */ - @java.lang.Override - public boolean hasPayment() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - */ - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Payment getPayment() { - return payment_ == null ? org.bitcoin.protocols.payments.Protos.Payment.getDefaultInstance() : payment_; - } - /** - *
-     * Payment message that triggered this ACK
-     * 
- * - * required .payments.Payment payment = 1; - */ - 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 java.lang.String memo_; - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return memo_; - } - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - return com.google.protobuf.ByteString.copyFromUtf8(memo_); - } - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - * @param value The memo to set. - */ - private void setMemo( - java.lang.String value) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000002; - memo_ = value; - } - /** - *
-     * human-readable message for customer
-     * 
- * - * optional string memo = 2; - */ - private void clearMemo() { - bitField0_ = (bitField0_ & ~0x00000002); - memo_ = getDefaultInstance().getMemo(); - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoin.protocols.payments.Protos.PaymentACK parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoin.protocols.payments.Protos.PaymentACK prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code payments.PaymentACK} - */ - public static final class Builder extends - 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 { - // Construct using org.bitcoin.protocols.payments.Protos.PaymentACK.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - @java.lang.Override - public boolean hasPayment() { - return instance.hasPayment(); - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - @java.lang.Override - public org.bitcoin.protocols.payments.Protos.Payment getPayment() { - return instance.getPayment(); - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public Builder setPayment(org.bitcoin.protocols.payments.Protos.Payment value) { - copyOnWrite(); - instance.setPayment(value); - return this; - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public Builder setPayment( - org.bitcoin.protocols.payments.Protos.Payment.Builder builderForValue) { - copyOnWrite(); - instance.setPayment(builderForValue.build()); - return this; - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public Builder mergePayment(org.bitcoin.protocols.payments.Protos.Payment value) { - copyOnWrite(); - instance.mergePayment(value); - return this; - } - /** - *
-       * Payment message that triggered this ACK
-       * 
- * - * required .payments.Payment payment = 1; - */ - public Builder clearPayment() { copyOnWrite(); - instance.clearPayment(); - return this; - } - - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @return Whether the memo field is set. - */ - @java.lang.Override - public boolean hasMemo() { - return instance.hasMemo(); - } - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - return instance.getMemo(); - } - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - return instance.getMemoBytes(); - } - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - copyOnWrite(); - instance.setMemo(value); - return this; - } - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @return This builder for chaining. - */ - public Builder clearMemo() { - copyOnWrite(); - instance.clearMemo(); - return this; - } - /** - *
-       * human-readable message for customer
-       * 
- * - * optional string memo = 2; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setMemoBytes(value); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - - static { - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/bitcoinj/crypto/ECKey.java b/core/src/main/java/org/bitcoinj/crypto/ECKey.java index 46c0366a7..bbdcbbd7f 100644 --- a/core/src/main/java/org/bitcoinj/crypto/ECKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/ECKey.java @@ -35,7 +35,7 @@ import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.base.VarInt; import org.bitcoinj.crypto.internal.CryptoUtils; import org.bitcoinj.crypto.utils.MessageVerifyUtils; -import org.bitcoinj.wallet.Protos; +import org.bitcoinj.protobuf.wallet.Protos; import org.bitcoinj.wallet.Wallet; import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1Integer; diff --git a/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java index ab121d374..6589dc9a9 100644 --- a/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java +++ b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java @@ -16,7 +16,7 @@ package org.bitcoinj.crypto; -import org.bitcoinj.wallet.Protos; +import org.bitcoinj.protobuf.wallet.Protos; import javax.annotation.Nullable; import java.time.Instant; diff --git a/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java b/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java index addc0b5ef..c2a46c63d 100644 --- a/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java +++ b/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java @@ -16,7 +16,7 @@ package org.bitcoinj.crypto; -import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; +import org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType; /** *

A KeyCrypter can be used to encrypt and decrypt a message. The sequence of events to encrypt and then decrypt diff --git a/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java index 250e75972..e4f22ffd8 100644 --- a/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java +++ b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java @@ -20,9 +20,9 @@ package org.bitcoinj.crypto; import com.google.protobuf.ByteString; import org.bitcoinj.base.internal.Stopwatch; import org.bitcoinj.base.internal.TimeUtils; -import org.bitcoinj.wallet.Protos; -import org.bitcoinj.wallet.Protos.ScryptParameters; -import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; +import org.bitcoinj.protobuf.wallet.Protos; +import org.bitcoinj.protobuf.wallet.Protos.ScryptParameters; +import org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType; import org.bouncycastle.crypto.BufferedBlockCipher; import org.bouncycastle.crypto.InvalidCipherTextException; import org.bouncycastle.crypto.engines.AESEngine; diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java index 58bedfd8a..5bb1ebd80 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java @@ -20,7 +20,7 @@ package org.bitcoinj.protocols.payments; import com.google.common.base.MoreObjects; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; -import org.bitcoin.protocols.payments.Protos; +import org.bitcoinj.protobuf.payments.Protos; import org.bitcoinj.base.Address; import org.bitcoinj.base.Coin; import org.bitcoinj.base.internal.TimeUtils; diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java index ac9c0a4a2..6a6e44592 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java @@ -18,7 +18,7 @@ package org.bitcoinj.protocols.payments; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.InvalidProtocolBufferException; -import org.bitcoin.protocols.payments.Protos; +import org.bitcoinj.protobuf.payments.Protos; import org.bitcoinj.base.Address; import org.bitcoinj.base.Coin; import org.bitcoinj.base.internal.TimeUtils; diff --git a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java index 59f37e310..6dfba880d 100644 --- a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java @@ -31,6 +31,7 @@ import org.bitcoinj.crypto.KeyCrypterScrypt; import org.bitcoinj.utils.ListenerRegistration; import org.bitcoinj.utils.Threading; import org.bitcoinj.wallet.listeners.KeyChainEventListener; +import org.bitcoinj.protobuf.wallet.Protos; import javax.annotation.Nullable; import java.time.Instant; diff --git a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java index d6499bd70..9b5927bbe 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java @@ -44,6 +44,7 @@ import org.bitcoinj.script.Script; import org.bitcoinj.utils.ListenerRegistration; import org.bitcoinj.utils.Threading; import org.bitcoinj.wallet.listeners.KeyChainEventListener; +import org.bitcoinj.protobuf.wallet.Protos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java index fc3ee4605..cc3944ce8 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java @@ -37,6 +37,7 @@ import java.util.Objects; import java.util.Optional; import org.bitcoinj.base.internal.ByteUtils; +import org.bitcoinj.protobuf.wallet.Protos; import static org.bitcoinj.base.internal.Preconditions.checkArgument; import static org.bitcoinj.base.internal.Preconditions.checkState; diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyChain.java b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java index 5cf627d80..48c8329d0 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java @@ -19,6 +19,7 @@ package org.bitcoinj.wallet; import org.bitcoinj.core.BloomFilter; import org.bitcoinj.crypto.ECKey; import org.bitcoinj.wallet.listeners.KeyChainEventListener; +import org.bitcoinj.protobuf.wallet.Protos; import java.time.Instant; import java.util.List; diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java index 8200262a3..715351018 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java @@ -39,6 +39,7 @@ import org.bitcoinj.utils.ListenerRegistration; import org.bitcoinj.utils.Threading; import org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener; import org.bitcoinj.wallet.listeners.KeyChainEventListener; +import org.bitcoinj.protobuf.wallet.Protos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/bitcoinj/wallet/Protos.java b/core/src/main/java/org/bitcoinj/wallet/Protos.java deleted file mode 100644 index c367c0e7e..000000000 --- a/core/src/main/java/org/bitcoinj/wallet/Protos.java +++ /dev/null @@ -1,15292 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wallet.proto - -package org.bitcoinj.wallet; - -public final class Protos { - private Protos() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - public interface PeerAddressOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.PeerAddress) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * required bytes ip_address = 1; - * @return Whether the ipAddress field is set. - */ - boolean hasIpAddress(); - /** - * required bytes ip_address = 1; - * @return The ipAddress. - */ - com.google.protobuf.ByteString getIpAddress(); - - /** - * required uint32 port = 2; - * @return Whether the port field is set. - */ - boolean hasPort(); - /** - * required uint32 port = 2; - * @return The port. - */ - int getPort(); - - /** - * required uint64 services = 3; - * @return Whether the services field is set. - */ - boolean hasServices(); - /** - * required uint64 services = 3; - * @return The services. - */ - long getServices(); - } - /** - * Protobuf type {@code wallet.PeerAddress} - */ - public static final class PeerAddress extends - com.google.protobuf.GeneratedMessageLite< - PeerAddress, PeerAddress.Builder> implements - // @@protoc_insertion_point(message_implements:wallet.PeerAddress) - PeerAddressOrBuilder { - private PeerAddress() { - ipAddress_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int IP_ADDRESS_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString ipAddress_; - /** - * required bytes ip_address = 1; - * @return Whether the ipAddress field is set. - */ - @java.lang.Override - public boolean hasIpAddress() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required bytes ip_address = 1; - * @return The ipAddress. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - * required uint32 port = 2; - * @return Whether the port field is set. - */ - @java.lang.Override - public boolean hasPort() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * required uint32 port = 2; - * @return The port. - */ - @java.lang.Override - 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_; - /** - * required uint64 services = 3; - * @return Whether the services field is set. - */ - @java.lang.Override - public boolean hasServices() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * required uint64 services = 3; - * @return The services. - */ - @java.lang.Override - public long getServices() { - return services_; - } - /** - * required uint64 services = 3; - * @param value The services to set. - */ - private void setServices(long value) { - bitField0_ |= 0x00000004; - services_ = value; - } - /** - * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.PeerAddress parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.PeerAddress prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code wallet.PeerAddress} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.bitcoinj.wallet.Protos.PeerAddress, Builder> implements - // @@protoc_insertion_point(builder_implements:wallet.PeerAddress) - org.bitcoinj.wallet.Protos.PeerAddressOrBuilder { - // Construct using org.bitcoinj.wallet.Protos.PeerAddress.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * required bytes ip_address = 1; - * @return Whether the ipAddress field is set. - */ - @java.lang.Override - public boolean hasIpAddress() { - return instance.hasIpAddress(); - } - /** - * required bytes ip_address = 1; - * @return The ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIpAddress() { - return instance.getIpAddress(); - } - /** - * required bytes ip_address = 1; - * @param value The ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddress(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setIpAddress(value); - return this; - } - /** - * required bytes ip_address = 1; - * @return This builder for chaining. - */ - public Builder clearIpAddress() { - copyOnWrite(); - instance.clearIpAddress(); - return this; - } - - /** - * required uint32 port = 2; - * @return Whether the port field is set. - */ - @java.lang.Override - public boolean hasPort() { - return instance.hasPort(); - } - /** - * required uint32 port = 2; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return instance.getPort(); - } - /** - * required uint32 port = 2; - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - copyOnWrite(); - instance.setPort(value); - return this; - } - /** - * required uint32 port = 2; - * @return This builder for chaining. - */ - public Builder clearPort() { - copyOnWrite(); - instance.clearPort(); - return this; - } - - /** - * required uint64 services = 3; - * @return Whether the services field is set. - */ - @java.lang.Override - public boolean hasServices() { - return instance.hasServices(); - } - /** - * required uint64 services = 3; - * @return The services. - */ - @java.lang.Override - public long getServices() { - return instance.getServices(); - } - /** - * required uint64 services = 3; - * @param value The services to set. - * @return This builder for chaining. - */ - public Builder setServices(long value) { - copyOnWrite(); - instance.setServices(value); - return this; - } - /** - * required uint64 services = 3; - * @return This builder for chaining. - */ - public Builder clearServices() { - copyOnWrite(); - instance.clearServices(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface EncryptedDataOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.EncryptedData) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *

-     * The initialisation vector for the AES encryption (16 bytes)
-     * 
- * - * required bytes initialisation_vector = 1; - * @return Whether the initialisationVector field is set. - */ - boolean hasInitialisationVector(); - /** - *
-     * The initialisation vector for the AES encryption (16 bytes)
-     * 
- * - * required bytes initialisation_vector = 1; - * @return The initialisationVector. - */ - com.google.protobuf.ByteString getInitialisationVector(); - - /** - *
-     * The encrypted private key
-     * 
- * - * required bytes encrypted_private_key = 2; - * @return Whether the encryptedPrivateKey field is set. - */ - boolean hasEncryptedPrivateKey(); - /** - *
-     * The encrypted private key
-     * 
- * - * required bytes encrypted_private_key = 2; - * @return The encryptedPrivateKey. - */ - com.google.protobuf.ByteString getEncryptedPrivateKey(); - } - /** - * Protobuf type {@code wallet.EncryptedData} - */ - public static final class EncryptedData extends - com.google.protobuf.GeneratedMessageLite< - EncryptedData, EncryptedData.Builder> implements - // @@protoc_insertion_point(message_implements:wallet.EncryptedData) - EncryptedDataOrBuilder { - private EncryptedData() { - initialisationVector_ = com.google.protobuf.ByteString.EMPTY; - encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int INITIALISATION_VECTOR_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString initialisationVector_; - /** - *
-     * The initialisation vector for the AES encryption (16 bytes)
-     * 
- * - * required bytes initialisation_vector = 1; - * @return Whether the initialisationVector field is set. - */ - @java.lang.Override - public boolean hasInitialisationVector() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * The initialisation vector for the AES encryption (16 bytes)
-     * 
- * - * required bytes initialisation_vector = 1; - * @return The initialisationVector. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * The encrypted private key
-     * 
- * - * required bytes encrypted_private_key = 2; - * @return Whether the encryptedPrivateKey field is set. - */ - @java.lang.Override - public boolean hasEncryptedPrivateKey() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * The encrypted private key
-     * 
- * - * required bytes encrypted_private_key = 2; - * @return The encryptedPrivateKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEncryptedPrivateKey() { - return encryptedPrivateKey_; - } - /** - *
-     * The encrypted private key
-     * 
- * - * required bytes encrypted_private_key = 2; - * @param value The encryptedPrivateKey to set. - */ - private void setEncryptedPrivateKey(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - bitField0_ |= 0x00000002; - encryptedPrivateKey_ = value; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.EncryptedData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.EncryptedData prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code wallet.EncryptedData} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.bitcoinj.wallet.Protos.EncryptedData, Builder> implements - // @@protoc_insertion_point(builder_implements:wallet.EncryptedData) - org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder { - // Construct using org.bitcoinj.wallet.Protos.EncryptedData.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * The initialisation vector for the AES encryption (16 bytes)
-       * 
- * - * required bytes initialisation_vector = 1; - * @return Whether the initialisationVector field is set. - */ - @java.lang.Override - public boolean hasInitialisationVector() { - return instance.hasInitialisationVector(); - } - /** - *
-       * The initialisation vector for the AES encryption (16 bytes)
-       * 
- * - * required bytes initialisation_vector = 1; - * @return The initialisationVector. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInitialisationVector() { - return instance.getInitialisationVector(); - } - /** - *
-       * The initialisation vector for the AES encryption (16 bytes)
-       * 
- * - * required bytes initialisation_vector = 1; - * @param value The initialisationVector to set. - * @return This builder for chaining. - */ - public Builder setInitialisationVector(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setInitialisationVector(value); - return this; - } - /** - *
-       * The initialisation vector for the AES encryption (16 bytes)
-       * 
- * - * required bytes initialisation_vector = 1; - * @return This builder for chaining. - */ - public Builder clearInitialisationVector() { - copyOnWrite(); - instance.clearInitialisationVector(); - return this; - } - - /** - *
-       * The encrypted private key
-       * 
- * - * required bytes encrypted_private_key = 2; - * @return Whether the encryptedPrivateKey field is set. - */ - @java.lang.Override - public boolean hasEncryptedPrivateKey() { - return instance.hasEncryptedPrivateKey(); - } - /** - *
-       * The encrypted private key
-       * 
- * - * required bytes encrypted_private_key = 2; - * @return The encryptedPrivateKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEncryptedPrivateKey() { - return instance.getEncryptedPrivateKey(); - } - /** - *
-       * The encrypted private key
-       * 
- * - * required bytes encrypted_private_key = 2; - * @param value The encryptedPrivateKey to set. - * @return This builder for chaining. - */ - public Builder setEncryptedPrivateKey(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setEncryptedPrivateKey(value); - return this; - } - /** - *
-       * The encrypted private key
-       * 
- * - * required bytes encrypted_private_key = 2; - * @return This builder for chaining. - */ - public Builder clearEncryptedPrivateKey() { - copyOnWrite(); - instance.clearEncryptedPrivateKey(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface DeterministicKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.DeterministicKey) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * 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; - * @return Whether the chainCode field is set. - */ - boolean hasChainCode(); - /** - *
-     * 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; - * @return The chainCode. - */ - com.google.protobuf.ByteString getChainCode(); - - /** - *
-     * 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; - * @return A list containing the path. - */ - java.util.List getPathList(); - /** - *
-     * 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; - * @return The count of path. - */ - int getPathCount(); - /** - *
-     * 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 of the element to return. - * @return The path at the given index. - */ - int getPath(int index); - - /** - *
-     * 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; - * @return Whether the issuedSubkeys field is set. - */ - boolean hasIssuedSubkeys(); - /** - *
-     * 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; - * @return The issuedSubkeys. - */ - int getIssuedSubkeys(); - - /** - * optional uint32 lookahead_size = 4; - * @return Whether the lookaheadSize field is set. - */ - boolean hasLookaheadSize(); - /** - * optional uint32 lookahead_size = 4; - * @return The lookaheadSize. - */ - int getLookaheadSize(); - - /** - *
-     **
-     * 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * optional bool isFollowing = 5; - * @return Whether the isFollowing field is set. - */ - boolean hasIsFollowing(); - /** - *
-     **
-     * 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * optional bool isFollowing = 5; - * @return The isFollowing. - */ - boolean getIsFollowing(); - - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * For regular single keychains it will always be 1.
-     * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return Whether the sigsRequiredToSpend field is set. - */ - boolean hasSigsRequiredToSpend(); - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * For regular single keychains it will always be 1.
-     * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return The sigsRequiredToSpend. - */ - int getSigsRequiredToSpend(); - } - /** - *
-   **
-   * Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm.
-   * 
- * - * Protobuf type {@code wallet.DeterministicKey} - */ - public static final class DeterministicKey extends - com.google.protobuf.GeneratedMessageLite< - DeterministicKey, DeterministicKey.Builder> implements - // @@protoc_insertion_point(message_implements:wallet.DeterministicKey) - DeterministicKeyOrBuilder { - private DeterministicKey() { - chainCode_ = com.google.protobuf.ByteString.EMPTY; - path_ = emptyIntList(); - sigsRequiredToSpend_ = 1; - } - private int bitField0_; - public static final int CHAIN_CODE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString 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; - * @return Whether the chainCode field is set. - */ - @java.lang.Override - public boolean hasChainCode() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * 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; - * @return The chainCode. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * 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; - * @return A list containing the path. - */ - @java.lang.Override - public java.util.List - getPathList() { - return 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; - * @return The count of path. - */ - @java.lang.Override - public int getPathCount() { - return path_.size(); - } - /** - *
-     * 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 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_; - /** - *
-     * 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; - * @return Whether the issuedSubkeys field is set. - */ - @java.lang.Override - public boolean hasIssuedSubkeys() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * 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; - * @return The issuedSubkeys. - */ - @java.lang.Override - 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_; - /** - * optional uint32 lookahead_size = 4; - * @return Whether the lookaheadSize field is set. - */ - @java.lang.Override - public boolean hasLookaheadSize() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * optional uint32 lookahead_size = 4; - * @return The lookaheadSize. - */ - @java.lang.Override - 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_; - /** - *
-     **
-     * 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * optional bool isFollowing = 5; - * @return Whether the isFollowing field is set. - */ - @java.lang.Override - public boolean hasIsFollowing() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     **
-     * 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * optional bool isFollowing = 5; - * @return The isFollowing. - */ - @java.lang.Override - 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * 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 was used for married keychains, where the set of keys combined together to produce
-     * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-     * 
- * - * optional bool isFollowing = 5; - */ - private void clearIsFollowing() { - bitField0_ = (bitField0_ & ~0x00000008); - isFollowing_ = false; - } - - public static final int SIGSREQUIREDTOSPEND_FIELD_NUMBER = 6; - private int sigsRequiredToSpend_; - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * For regular single keychains it will always be 1.
-     * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return Whether the sigsRequiredToSpend field is set. - */ - @java.lang.Override - public boolean hasSigsRequiredToSpend() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * For regular single keychains it will always be 1.
-     * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return The sigsRequiredToSpend. - */ - @java.lang.Override - public int getSigsRequiredToSpend() { - return sigsRequiredToSpend_; - } - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * 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; - } - /** - *
-     * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-     * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.DeterministicKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.DeterministicKey prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     **
-     * Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm.
-     * 
- * - * Protobuf type {@code wallet.DeterministicKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.bitcoinj.wallet.Protos.DeterministicKey, Builder> implements - // @@protoc_insertion_point(builder_implements:wallet.DeterministicKey) - org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder { - // Construct using org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * 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; - * @return Whether the chainCode field is set. - */ - @java.lang.Override - public boolean hasChainCode() { - return instance.hasChainCode(); - } - /** - *
-       * 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; - * @return The chainCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChainCode() { - return instance.getChainCode(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setChainCode(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setChainCode(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearChainCode() { - copyOnWrite(); - instance.clearChainCode(); - return this; - } - - /** - *
-       * 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; - * @return A list containing the path. - */ - @java.lang.Override - public java.util.List - getPathList() { - return java.util.Collections.unmodifiableList( - instance.getPathList()); - } - /** - *
-       * 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; - * @return The count of path. - */ - @java.lang.Override - public int getPathCount() { - return instance.getPathCount(); - } - /** - *
-       * 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 of the element to return. - * @return The path at the given index. - */ - @java.lang.Override - public int getPath(int index) { - return instance.getPath(index); - } - /** - *
-       * 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 set. - * @return This builder for chaining. - */ - public Builder setPath( - int index, int value) { - copyOnWrite(); - instance.setPath(index, value); - return this; - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder addPath(int value) { - copyOnWrite(); - instance.addPath(value); - return this; - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder addAllPath( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllPath(values); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearPath() { - copyOnWrite(); - instance.clearPath(); - return this; - } - - /** - *
-       * 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; - * @return Whether the issuedSubkeys field is set. - */ - @java.lang.Override - public boolean hasIssuedSubkeys() { - return instance.hasIssuedSubkeys(); - } - /** - *
-       * 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; - * @return The issuedSubkeys. - */ - @java.lang.Override - public int getIssuedSubkeys() { - return instance.getIssuedSubkeys(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setIssuedSubkeys(int value) { - copyOnWrite(); - instance.setIssuedSubkeys(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearIssuedSubkeys() { - copyOnWrite(); - instance.clearIssuedSubkeys(); - return this; - } - - /** - * optional uint32 lookahead_size = 4; - * @return Whether the lookaheadSize field is set. - */ - @java.lang.Override - public boolean hasLookaheadSize() { - return instance.hasLookaheadSize(); - } - /** - * optional uint32 lookahead_size = 4; - * @return The lookaheadSize. - */ - @java.lang.Override - public int getLookaheadSize() { - return instance.getLookaheadSize(); - } - /** - * optional uint32 lookahead_size = 4; - * @param value The lookaheadSize to set. - * @return This builder for chaining. - */ - public Builder setLookaheadSize(int value) { - copyOnWrite(); - instance.setLookaheadSize(value); - return this; - } - /** - * optional uint32 lookahead_size = 4; - * @return This builder for chaining. - */ - public Builder clearLookaheadSize() { - copyOnWrite(); - instance.clearLookaheadSize(); - return this; - } - - /** - *
-       **
-       * 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 was used for married keychains, where the set of keys combined together to produce
-       * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-       * 
- * - * optional bool isFollowing = 5; - * @return Whether the isFollowing field is set. - */ - @java.lang.Override - public boolean hasIsFollowing() { - return instance.hasIsFollowing(); - } - /** - *
-       **
-       * 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 was used for married keychains, where the set of keys combined together to produce
-       * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-       * 
- * - * optional bool isFollowing = 5; - * @return The isFollowing. - */ - @java.lang.Override - public boolean getIsFollowing() { - return instance.getIsFollowing(); - } - /** - *
-       **
-       * 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 was used for married keychains, where the set of keys combined together to produce
-       * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-       * 
- * - * optional bool isFollowing = 5; - * @param value The isFollowing to set. - * @return This builder for chaining. - */ - public Builder setIsFollowing(boolean value) { - copyOnWrite(); - instance.setIsFollowing(value); - return this; - } - /** - *
-       **
-       * 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 was used for married keychains, where the set of keys combined together to produce
-       * a single P2SH multisignature address. It is currently unused, but this flag is preserved.
-       * 
- * - * optional bool isFollowing = 5; - * @return This builder for chaining. - */ - public Builder clearIsFollowing() { - copyOnWrite(); - instance.clearIsFollowing(); - return this; - } - - /** - *
-       * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-       * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-       * For regular single keychains it will always be 1.
-       * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return Whether the sigsRequiredToSpend field is set. - */ - @java.lang.Override - public boolean hasSigsRequiredToSpend() { - return instance.hasSigsRequiredToSpend(); - } - /** - *
-       * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-       * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-       * For regular single keychains it will always be 1.
-       * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return The sigsRequiredToSpend. - */ - @java.lang.Override - public int getSigsRequiredToSpend() { - return instance.getSigsRequiredToSpend(); - } - /** - *
-       * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-       * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-       * For regular single keychains it will always be 1.
-       * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @param value The sigsRequiredToSpend to set. - * @return This builder for chaining. - */ - public Builder setSigsRequiredToSpend(int value) { - copyOnWrite(); - instance.setSigsRequiredToSpend(value); - return this; - } - /** - *
-       * Number of signatures required to spend. This field was needed only for married keychains to reconstruct KeyChain
-       * and represents the N value from N-of-M CHECKMULTISIG script. It is currently unused, but this number is preserved.
-       * For regular single keychains it will always be 1.
-       * 
- * - * optional uint32 sigsRequiredToSpend = 6 [default = 1]; - * @return This builder for chaining. - */ - public Builder clearSigsRequiredToSpend() { - copyOnWrite(); - instance.clearSigsRequiredToSpend(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface KeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.Key) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * required .wallet.Key.Type type = 1; - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * required .wallet.Key.Type type = 1; - * @return The type. - */ - org.bitcoinj.wallet.Protos.Key.Type getType(); - - /** - *
-     * 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; - * @return Whether the secretBytes field is set. - */ - boolean hasSecretBytes(); - /** - *
-     * 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; - * @return The secretBytes. - */ - com.google.protobuf.ByteString getSecretBytes(); - - /** - *
-     * 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. - */ - boolean hasEncryptedData(); - /** - *
-     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-     * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - * @return The encryptedData. - */ - org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData(); - - /** - *
-     * 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; - * @return Whether the publicKey field is set. - */ - boolean hasPublicKey(); - /** - *
-     * 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; - * @return The publicKey. - */ - com.google.protobuf.ByteString getPublicKey(); - - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return Whether the label field is set. - */ - boolean hasLabel(); - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * 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; - * @return Whether the creationTimestamp field is set. - */ - boolean hasCreationTimestamp(); - /** - *
-     * 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; - * @return The creationTimestamp. - */ - long getCreationTimestamp(); - - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - * @return Whether the deterministicKey field is set. - */ - boolean hasDeterministicKey(); - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - * @return The deterministicKey. - */ - org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey(); - - /** - *
-     * 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; - * @return Whether the deterministicSeed field is set. - */ - boolean hasDeterministicSeed(); - /** - *
-     * 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; - * @return The deterministicSeed. - */ - com.google.protobuf.ByteString getDeterministicSeed(); - - /** - *
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return Whether the encryptedDeterministicSeed field is set. - */ - boolean hasEncryptedDeterministicSeed(); - /** - *
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - * @return The encryptedDeterministicSeed. - */ - org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed(); - - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return A list containing the accountPath. - */ - java.util.List getAccountPathList(); - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return The count of accountPath. - */ - int getAccountPathCount(); - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @param index The index of the element to return. - * @return The accountPath at the given index. - */ - int getAccountPath(int index); - - /** - *
-     * Type of addresses (aka output scripts) to generate for receiving.
-     * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return Whether the outputScriptType field is set. - */ - boolean hasOutputScriptType(); - /** - *
-     * Type of addresses (aka output scripts) to generate for receiving.
-     * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return The outputScriptType. - */ - org.bitcoinj.wallet.Protos.Key.OutputScriptType getOutputScriptType(); - } - /** - *
-   **
-   * A key used to control Bitcoin spending.
-   *
-   * Either the private key, the public key or both may be present.  It is recommended that
-   * if the private key is provided that the public key is provided too because deriving it is slow.
-   *
-   * If only the public key is provided, the key can only be used to watch the blockchain and verify
-   * transactions, and not for spending.
-   * 
- * - * Protobuf type {@code wallet.Key} - */ - public static final class Key extends - com.google.protobuf.GeneratedMessageLite< - Key, Key.Builder> implements - // @@protoc_insertion_point(message_implements:wallet.Key) - KeyOrBuilder { - private Key() { - type_ = 1; - secretBytes_ = com.google.protobuf.ByteString.EMPTY; - publicKey_ = com.google.protobuf.ByteString.EMPTY; - label_ = ""; - deterministicSeed_ = com.google.protobuf.ByteString.EMPTY; - accountPath_ = emptyIntList(); - outputScriptType_ = 1; - } - /** - * Protobuf enum {@code wallet.Key.Type} - */ - public enum Type - implements com.google.protobuf.Internal.EnumLite { - /** - *
-       ** Unencrypted - Original bitcoin secp256k1 curve 
-       * 
- * - * ORIGINAL = 1; - */ - ORIGINAL(1), - /** - *
-       ** Encrypted with Scrypt and AES - Original bitcoin secp256k1 curve 
-       * 
- * - * ENCRYPTED_SCRYPT_AES = 2; - */ - ENCRYPTED_SCRYPT_AES(2), - /** - *
-       **
-       * Not really a key, but rather contains the mnemonic phrase for a deterministic key hierarchy in the private_key field.
-       * The label and public_key fields are missing. Creation timestamp will exist.
-       * 
- * - * DETERMINISTIC_MNEMONIC = 3; - */ - DETERMINISTIC_MNEMONIC(3), - /** - *
-       **
-       * A key that was derived deterministically. Note that the root seed that created it may NOT be present in the
-       * wallet, for the case of watching wallets. A deterministic key may or may not have the private key bytes present.
-       * However the public key bytes and the deterministic_key field are guaranteed to exist. In a wallet where there
-       * is a path from this key up to a key that has (possibly encrypted) private bytes, it's expected that the private
-       * key can be rederived on the fly.
-       * 
- * - * DETERMINISTIC_KEY = 4; - */ - DETERMINISTIC_KEY(4), - ; - - /** - *
-       ** Unencrypted - Original bitcoin secp256k1 curve 
-       * 
- * - * ORIGINAL = 1; - */ - public static final int ORIGINAL_VALUE = 1; - /** - *
-       ** Encrypted with Scrypt and AES - Original bitcoin secp256k1 curve 
-       * 
- * - * ENCRYPTED_SCRYPT_AES = 2; - */ - public static final int ENCRYPTED_SCRYPT_AES_VALUE = 2; - /** - *
-       **
-       * Not really a key, but rather contains the mnemonic phrase for a deterministic key hierarchy in the private_key field.
-       * The label and public_key fields are missing. Creation timestamp will exist.
-       * 
- * - * DETERMINISTIC_MNEMONIC = 3; - */ - public static final int DETERMINISTIC_MNEMONIC_VALUE = 3; - /** - *
-       **
-       * A key that was derived deterministically. Note that the root seed that created it may NOT be present in the
-       * wallet, for the case of watching wallets. A deterministic key may or may not have the private key bytes present.
-       * However the public key bytes and the deterministic_key field are guaranteed to exist. In a wallet where there
-       * is a path from this key up to a key that has (possibly encrypted) private bytes, it's expected that the private
-       * key can be rederived on the fly.
-       * 
- * - * DETERMINISTIC_KEY = 4; - */ - public static final int DETERMINISTIC_KEY_VALUE = 4; - - - @java.lang.Override - public final int getNumber() { - return 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 - public static Type valueOf(int value) { - return forNumber(value); - } - - public static Type forNumber(int value) { - switch (value) { - case 1: return ORIGINAL; - case 2: return ENCRYPTED_SCRYPT_AES; - case 3: return DETERMINISTIC_MNEMONIC; - case 4: return DETERMINISTIC_KEY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - 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 static com.google.protobuf.Internal.EnumVerifier - internalGetVerifier() { - return TypeVerifier.INSTANCE; - } - - 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; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:wallet.Key.Type) - } - - /** - * Protobuf enum {@code wallet.Key.OutputScriptType} - */ - public enum OutputScriptType - implements com.google.protobuf.Internal.EnumLite { - /** - * P2PKH = 1; - */ - P2PKH(1), - /** - * P2WPKH = 2; - */ - P2WPKH(2), - ; - - /** - * P2PKH = 1; - */ - public static final int P2PKH_VALUE = 1; - /** - * P2WPKH = 2; - */ - public static final int P2WPKH_VALUE = 2; - - - @java.lang.Override - public final int getNumber() { - return 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 - public static OutputScriptType valueOf(int value) { - return forNumber(value); - } - - public static OutputScriptType forNumber(int value) { - switch (value) { - case 1: return P2PKH; - case 2: return P2WPKH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - 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 static com.google.protobuf.Internal.EnumVerifier - internalGetVerifier() { - return OutputScriptTypeVerifier.INSTANCE; - } - - 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; - - private OutputScriptType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:wallet.Key.OutputScriptType) - } - - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * required .wallet.Key.Type type = 1; - * @return Whether the type field is set. - */ - @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() { - 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_; - /** - *
-     * 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; - * @return Whether the secretBytes field is set. - */ - @java.lang.Override - public boolean hasSecretBytes() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * 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; - * @return The secretBytes. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-     * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - @java.lang.Override - public boolean hasEncryptedData() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - *
-     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-     * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { - 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 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; - private com.google.protobuf.ByteString 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; - * @return Whether the publicKey field is set. - */ - @java.lang.Override - public boolean hasPublicKey() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
-     * 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; - * @return The publicKey. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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 java.lang.String label_; - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return Whether the label field is set. - */ - @java.lang.Override - public boolean hasLabel() { - return ((bitField0_ & 0x00000010) != 0); - } - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - return label_; - } - /** - *
-     * User-provided label associated with the key.
-     * 
- * - * optional string label = 4; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - 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) { - java.lang.Class valueClass = 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; - private long 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; - * @return Whether the creationTimestamp field is set. - */ - @java.lang.Override - public boolean hasCreationTimestamp() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     * 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; - * @return The creationTimestamp. - */ - @java.lang.Override - 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; - */ - @java.lang.Override - public boolean hasDeterministicKey() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() { - return deterministicKey_ == null ? org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance() : deterministicKey_; - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - 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; - private com.google.protobuf.ByteString 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; - * @return Whether the deterministicSeed field is set. - */ - @java.lang.Override - public boolean hasDeterministicSeed() { - return ((bitField0_ & 0x00000080) != 0); - } - /** - *
-     * 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; - * @return The deterministicSeed. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - @java.lang.Override - public boolean hasEncryptedDeterministicSeed() { - return ((bitField0_ & 0x00000100) != 0); - } - /** - *
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { - return encryptedDeterministicSeed_ == null ? org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance() : encryptedDeterministicSeed_; - } - /** - *
-     * Encrypted version of the seed
-     * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - 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; - private com.google.protobuf.Internal.IntList accountPath_; - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return A list containing the accountPath. - */ - @java.lang.Override - public java.util.List - getAccountPathList() { - return accountPath_; - } - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return The count of accountPath. - */ - @java.lang.Override - public int getAccountPathCount() { - return accountPath_.size(); - } - /** - *
-     * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-     * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @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_; - /** - *
-     * Type of addresses (aka output scripts) to generate for receiving.
-     * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return Whether the outputScriptType field is set. - */ - @java.lang.Override - public boolean hasOutputScriptType() { - return ((bitField0_ & 0x00000200) != 0); - } - /** - *
-     * Type of addresses (aka output scripts) to generate for receiving.
-     * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return The 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; - } - /** - *
-     * 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; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.Key parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.Key prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     **
-     * A key used to control Bitcoin spending.
-     *
-     * Either the private key, the public key or both may be present.  It is recommended that
-     * if the private key is provided that the public key is provided too because deriving it is slow.
-     *
-     * If only the public key is provided, the key can only be used to watch the blockchain and verify
-     * transactions, and not for spending.
-     * 
- * - * Protobuf type {@code wallet.Key} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.bitcoinj.wallet.Protos.Key, Builder> implements - // @@protoc_insertion_point(builder_implements:wallet.Key) - org.bitcoinj.wallet.Protos.KeyOrBuilder { - // Construct using org.bitcoinj.wallet.Protos.Key.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * required .wallet.Key.Type type = 1; - * @return Whether the type field is set. - */ - @java.lang.Override - public boolean hasType() { - return instance.hasType(); - } - /** - * required .wallet.Key.Type type = 1; - * @return The type. - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.Key.Type getType() { - return instance.getType(); - } - /** - * required .wallet.Key.Type type = 1; - * @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) { - copyOnWrite(); - instance.setType(value); - return this; - } - /** - * required .wallet.Key.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - copyOnWrite(); - instance.clearType(); - return this; - } - - /** - *
-       * 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; - * @return Whether the secretBytes field is set. - */ - @java.lang.Override - public boolean hasSecretBytes() { - return instance.hasSecretBytes(); - } - /** - *
-       * 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; - * @return The secretBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecretBytes() { - return instance.getSecretBytes(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setSecretBytes(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSecretBytes(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearSecretBytes() { - copyOnWrite(); - instance.clearSecretBytes(); - return this; - } - - /** - *
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - @java.lang.Override - public boolean hasEncryptedData() { - return instance.hasEncryptedData(); - } - /** - *
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { - return instance.getEncryptedData(); - } - /** - *
-       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
-       * 
- * - * optional .wallet.EncryptedData encrypted_data = 6; - */ - public Builder setEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { - copyOnWrite(); - instance.setEncryptedData(value); - 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 Builder setEncryptedData( - org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) { - copyOnWrite(); - instance.setEncryptedData(builderForValue.build()); - 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 Builder mergeEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { - copyOnWrite(); - instance.mergeEncryptedData(value); - 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 Builder clearEncryptedData() { copyOnWrite(); - instance.clearEncryptedData(); - return this; - } - - /** - *
-       * 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; - * @return Whether the publicKey field is set. - */ - @java.lang.Override - public boolean hasPublicKey() { - return instance.hasPublicKey(); - } - /** - *
-       * 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; - * @return The publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPublicKey() { - return instance.getPublicKey(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setPublicKey(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setPublicKey(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - copyOnWrite(); - instance.clearPublicKey(); - return this; - } - - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @return Whether the label field is set. - */ - @java.lang.Override - public boolean hasLabel() { - return instance.hasLabel(); - } - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - return instance.getLabel(); - } - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - return instance.getLabelBytes(); - } - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - copyOnWrite(); - instance.setLabel(value); - return this; - } - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @return This builder for chaining. - */ - public Builder clearLabel() { - copyOnWrite(); - instance.clearLabel(); - return this; - } - /** - *
-       * User-provided label associated with the key.
-       * 
- * - * optional string label = 4; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setLabelBytes(value); - return this; - } - - /** - *
-       * 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; - * @return Whether the creationTimestamp field is set. - */ - @java.lang.Override - public boolean hasCreationTimestamp() { - return instance.hasCreationTimestamp(); - } - /** - *
-       * 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; - * @return The creationTimestamp. - */ - @java.lang.Override - public long getCreationTimestamp() { - return instance.getCreationTimestamp(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setCreationTimestamp(long value) { - copyOnWrite(); - instance.setCreationTimestamp(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearCreationTimestamp() { - copyOnWrite(); - instance.clearCreationTimestamp(); - return this; - } - - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - @java.lang.Override - public boolean hasDeterministicKey() { - return instance.hasDeterministicKey(); - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() { - return instance.getDeterministicKey(); - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - public Builder setDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { - copyOnWrite(); - instance.setDeterministicKey(value); - return this; - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - public Builder setDeterministicKey( - org.bitcoinj.wallet.Protos.DeterministicKey.Builder builderForValue) { - copyOnWrite(); - instance.setDeterministicKey(builderForValue.build()); - return this; - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - public Builder mergeDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { - copyOnWrite(); - instance.mergeDeterministicKey(value); - return this; - } - /** - * optional .wallet.DeterministicKey deterministic_key = 7; - */ - public Builder clearDeterministicKey() { copyOnWrite(); - instance.clearDeterministicKey(); - return this; - } - - /** - *
-       * 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; - * @return Whether the deterministicSeed field is set. - */ - @java.lang.Override - public boolean hasDeterministicSeed() { - return instance.hasDeterministicSeed(); - } - /** - *
-       * 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; - * @return The deterministicSeed. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDeterministicSeed() { - return instance.getDeterministicSeed(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setDeterministicSeed(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setDeterministicSeed(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearDeterministicSeed() { - copyOnWrite(); - instance.clearDeterministicSeed(); - return this; - } - - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - @java.lang.Override - public boolean hasEncryptedDeterministicSeed() { - return instance.hasEncryptedDeterministicSeed(); - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { - return instance.getEncryptedDeterministicSeed(); - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public Builder setEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { - copyOnWrite(); - instance.setEncryptedDeterministicSeed(value); - return this; - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public Builder setEncryptedDeterministicSeed( - org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) { - copyOnWrite(); - instance.setEncryptedDeterministicSeed(builderForValue.build()); - return this; - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public Builder mergeEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { - copyOnWrite(); - instance.mergeEncryptedDeterministicSeed(value); - return this; - } - /** - *
-       * Encrypted version of the seed
-       * 
- * - * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; - */ - public Builder clearEncryptedDeterministicSeed() { copyOnWrite(); - instance.clearEncryptedDeterministicSeed(); - return this; - } - - /** - *
-       * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-       * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return A list containing the accountPath. - */ - @java.lang.Override - public java.util.List - getAccountPathList() { - return java.util.Collections.unmodifiableList( - instance.getAccountPathList()); - } - /** - *
-       * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-       * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return The count of accountPath. - */ - @java.lang.Override - public int getAccountPathCount() { - return instance.getAccountPathCount(); - } - /** - *
-       * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-       * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @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 instance.getAccountPath(index); - } - /** - *
-       * 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 set. - * @return This builder for chaining. - */ - public Builder setAccountPath( - int index, int value) { - copyOnWrite(); - instance.setAccountPath(index, value); - return this; - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder addAccountPath(int value) { - copyOnWrite(); - instance.addAccountPath(value); - return this; - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder addAllAccountPath( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllAccountPath(values); - return this; - } - /** - *
-       * The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
-       * 
- * - * repeated uint32 account_path = 10 [packed = true]; - * @return This builder for chaining. - */ - public Builder clearAccountPath() { - copyOnWrite(); - instance.clearAccountPath(); - return this; - } - - /** - *
-       * Type of addresses (aka output scripts) to generate for receiving.
-       * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return Whether the outputScriptType field is set. - */ - @java.lang.Override - public boolean hasOutputScriptType() { - return instance.hasOutputScriptType(); - } - /** - *
-       * Type of addresses (aka output scripts) to generate for receiving.
-       * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return The outputScriptType. - */ - @java.lang.Override - public org.bitcoinj.wallet.Protos.Key.OutputScriptType getOutputScriptType() { - return instance.getOutputScriptType(); - } - /** - *
-       * Type of addresses (aka output scripts) to generate for receiving.
-       * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @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) { - copyOnWrite(); - instance.setOutputScriptType(value); - return this; - } - /** - *
-       * Type of addresses (aka output scripts) to generate for receiving.
-       * 
- * - * optional .wallet.Key.OutputScriptType output_script_type = 11; - * @return This builder for chaining. - */ - public Builder clearOutputScriptType() { - copyOnWrite(); - instance.clearOutputScriptType(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ScriptOrBuilder extends - // @@protoc_insertion_point(interface_extends:wallet.Script) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * required bytes program = 1; - * @return Whether the program field is set. - */ - boolean hasProgram(); - /** - * required bytes program = 1; - * @return The program. - */ - com.google.protobuf.ByteString getProgram(); - - /** - *
-     * 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; - * @return Whether the creationTimestamp field is set. - */ - boolean hasCreationTimestamp(); - /** - *
-     * 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; - * @return The creationTimestamp. - */ - long getCreationTimestamp(); - } - /** - * Protobuf type {@code wallet.Script} - */ - public static final class Script extends - com.google.protobuf.GeneratedMessageLite< - Script, Script.Builder> implements - // @@protoc_insertion_point(message_implements:wallet.Script) - ScriptOrBuilder { - private Script() { - program_ = com.google.protobuf.ByteString.EMPTY; - } - private int bitField0_; - public static final int PROGRAM_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString program_; - /** - * required bytes program = 1; - * @return Whether the program field is set. - */ - @java.lang.Override - public boolean hasProgram() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * required bytes program = 1; - * @return The program. - */ - @java.lang.Override - 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) { - java.lang.Class valueClass = 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_; - /** - *
-     * 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; - * @return Whether the creationTimestamp field is set. - */ - @java.lang.Override - public boolean hasCreationTimestamp() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * 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; - * @return The creationTimestamp. - */ - @java.lang.Override - public long getCreationTimestamp() { - return creationTimestamp_; - } - /** - *
-     * 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; - } - /** - *
-     * 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 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 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 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 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 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static org.bitcoinj.wallet.Protos.Script parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - 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 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.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.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(org.bitcoinj.wallet.Protos.Script prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code wallet.Script} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.bitcoinj.wallet.Protos.Script, Builder> implements - // @@protoc_insertion_point(builder_implements:wallet.Script) - org.bitcoinj.wallet.Protos.ScriptOrBuilder { - // Construct using org.bitcoinj.wallet.Protos.Script.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * required bytes program = 1; - * @return Whether the program field is set. - */ - @java.lang.Override - public boolean hasProgram() { - return instance.hasProgram(); - } - /** - * required bytes program = 1; - * @return The program. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProgram() { - return instance.getProgram(); - } - /** - * required bytes program = 1; - * @param value The program to set. - * @return This builder for chaining. - */ - public Builder setProgram(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setProgram(value); - return this; - } - /** - * required bytes program = 1; - * @return This builder for chaining. - */ - public Builder clearProgram() { - copyOnWrite(); - instance.clearProgram(); - return this; - } - - /** - *
-       * 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; - * @return Whether the creationTimestamp field is set. - */ - @java.lang.Override - public boolean hasCreationTimestamp() { - return instance.hasCreationTimestamp(); - } - /** - *
-       * 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; - * @return The creationTimestamp. - */ - @java.lang.Override - public long getCreationTimestamp() { - return instance.getCreationTimestamp(); - } - /** - *
-       * 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. - * @return This builder for chaining. - */ - public Builder setCreationTimestamp(long value) { - copyOnWrite(); - instance.setCreationTimestamp(value); - return this; - } - /** - *
-       * 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; - * @return This builder for chaining. - */ - public Builder clearCreationTimestamp() { - copyOnWrite(); - instance.clearCreationTimestamp(); - return this; - } - - // @@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 { - 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; - } - - private static volatile com.google.protobuf.Parser