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 extends java.lang.Integer> 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 extends java.lang.Integer> 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 extends java.lang.Integer> 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 extends java.lang.Integer> 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