All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bitcoinj.wallet.Protos Maven / Gradle / Ivy

There is a newer version: 0.15-cm06
Show newest version
// 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.ExtensionRegistry registry) {
  }
  public interface PeerAddressOrBuilder extends
      // @@protoc_insertion_point(interface_extends:wallet.PeerAddress)
      com.google.protobuf.MessageOrBuilder {

    /**
     * required bytes ip_address = 1;
     */
    boolean hasIpAddress();
    /**
     * required bytes ip_address = 1;
     */
    com.google.protobuf.ByteString getIpAddress();

    /**
     * required uint32 port = 2;
     */
    boolean hasPort();
    /**
     * required uint32 port = 2;
     */
    int getPort();

    /**
     * required uint64 services = 3;
     */
    boolean hasServices();
    /**
     * required uint64 services = 3;
     */
    long getServices();
  }
  /**
   * Protobuf type {@code wallet.PeerAddress}
   */
  public static final class PeerAddress extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:wallet.PeerAddress)
      PeerAddressOrBuilder {
    // Use PeerAddress.newBuilder() to construct.
    private PeerAddress(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private PeerAddress(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final PeerAddress defaultInstance;
    public static PeerAddress getDefaultInstance() {
      return defaultInstance;
    }

    public PeerAddress getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private PeerAddress(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              ipAddress_ = input.readBytes();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              port_ = input.readUInt32();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              services_ = input.readUInt64();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.bitcoinj.wallet.Protos.PeerAddress.class, org.bitcoinj.wallet.Protos.PeerAddress.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public PeerAddress parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new PeerAddress(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int IP_ADDRESS_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString ipAddress_;
    /**
     * required bytes ip_address = 1;
     */
    public boolean hasIpAddress() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * required bytes ip_address = 1;
     */
    public com.google.protobuf.ByteString getIpAddress() {
      return ipAddress_;
    }

    public static final int PORT_FIELD_NUMBER = 2;
    private int port_;
    /**
     * required uint32 port = 2;
     */
    public boolean hasPort() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * required uint32 port = 2;
     */
    public int getPort() {
      return port_;
    }

    public static final int SERVICES_FIELD_NUMBER = 3;
    private long services_;
    /**
     * required uint64 services = 3;
     */
    public boolean hasServices() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * required uint64 services = 3;
     */
    public long getServices() {
      return services_;
    }

    private void initFields() {
      ipAddress_ = com.google.protobuf.ByteString.EMPTY;
      port_ = 0;
      services_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasIpAddress()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasPort()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasServices()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, ipAddress_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeUInt32(2, port_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeUInt64(3, services_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, ipAddress_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, port_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(3, services_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.bitcoinj.wallet.Protos.PeerAddress parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.bitcoinj.wallet.Protos.PeerAddress prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code wallet.PeerAddress}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder implements
        // @@protoc_insertion_point(builder_implements:wallet.PeerAddress)
        org.bitcoinj.wallet.Protos.PeerAddressOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.bitcoinj.wallet.Protos.PeerAddress.class, org.bitcoinj.wallet.Protos.PeerAddress.Builder.class);
      }

      // Construct using org.bitcoinj.wallet.Protos.PeerAddress.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        ipAddress_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        port_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        services_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.bitcoinj.wallet.Protos.internal_static_wallet_PeerAddress_descriptor;
      }

      public org.bitcoinj.wallet.Protos.PeerAddress getDefaultInstanceForType() {
        return org.bitcoinj.wallet.Protos.PeerAddress.getDefaultInstance();
      }

      public org.bitcoinj.wallet.Protos.PeerAddress build() {
        org.bitcoinj.wallet.Protos.PeerAddress result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.bitcoinj.wallet.Protos.PeerAddress buildPartial() {
        org.bitcoinj.wallet.Protos.PeerAddress result = new org.bitcoinj.wallet.Protos.PeerAddress(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.ipAddress_ = ipAddress_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.port_ = port_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.services_ = services_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.bitcoinj.wallet.Protos.PeerAddress) {
          return mergeFrom((org.bitcoinj.wallet.Protos.PeerAddress)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.bitcoinj.wallet.Protos.PeerAddress other) {
        if (other == org.bitcoinj.wallet.Protos.PeerAddress.getDefaultInstance()) return this;
        if (other.hasIpAddress()) {
          setIpAddress(other.getIpAddress());
        }
        if (other.hasPort()) {
          setPort(other.getPort());
        }
        if (other.hasServices()) {
          setServices(other.getServices());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasIpAddress()) {
          
          return false;
        }
        if (!hasPort()) {
          
          return false;
        }
        if (!hasServices()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.bitcoinj.wallet.Protos.PeerAddress parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.bitcoinj.wallet.Protos.PeerAddress) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * required bytes ip_address = 1;
       */
      public boolean hasIpAddress() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * required bytes ip_address = 1;
       */
      public com.google.protobuf.ByteString getIpAddress() {
        return ipAddress_;
      }
      /**
       * required bytes ip_address = 1;
       */
      public Builder setIpAddress(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        ipAddress_ = value;
        onChanged();
        return this;
      }
      /**
       * required bytes ip_address = 1;
       */
      public Builder clearIpAddress() {
        bitField0_ = (bitField0_ & ~0x00000001);
        ipAddress_ = getDefaultInstance().getIpAddress();
        onChanged();
        return this;
      }

      private int port_ ;
      /**
       * required uint32 port = 2;
       */
      public boolean hasPort() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * required uint32 port = 2;
       */
      public int getPort() {
        return port_;
      }
      /**
       * required uint32 port = 2;
       */
      public Builder setPort(int value) {
        bitField0_ |= 0x00000002;
        port_ = value;
        onChanged();
        return this;
      }
      /**
       * required uint32 port = 2;
       */
      public Builder clearPort() {
        bitField0_ = (bitField0_ & ~0x00000002);
        port_ = 0;
        onChanged();
        return this;
      }

      private long services_ ;
      /**
       * required uint64 services = 3;
       */
      public boolean hasServices() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * required uint64 services = 3;
       */
      public long getServices() {
        return services_;
      }
      /**
       * required uint64 services = 3;
       */
      public Builder setServices(long value) {
        bitField0_ |= 0x00000004;
        services_ = value;
        onChanged();
        return this;
      }
      /**
       * required uint64 services = 3;
       */
      public Builder clearServices() {
        bitField0_ = (bitField0_ & ~0x00000004);
        services_ = 0L;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:wallet.PeerAddress)
    }

    static {
      defaultInstance = new PeerAddress(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:wallet.PeerAddress)
  }

  public interface EncryptedDataOrBuilder extends
      // @@protoc_insertion_point(interface_extends:wallet.EncryptedData)
      com.google.protobuf.MessageOrBuilder {

    /**
     * required bytes initialisation_vector = 1;
     *
     * 
     * The initialisation vector for the AES encryption (16 bytes)
     * 
*/ boolean hasInitialisationVector(); /** * required bytes initialisation_vector = 1; * *
     * The initialisation vector for the AES encryption (16 bytes)
     * 
*/ com.google.protobuf.ByteString getInitialisationVector(); /** * required bytes encrypted_private_key = 2; * *
     * The encrypted private key
     * 
*/ boolean hasEncryptedPrivateKey(); /** * required bytes encrypted_private_key = 2; * *
     * The encrypted private key
     * 
*/ com.google.protobuf.ByteString getEncryptedPrivateKey(); } /** * Protobuf type {@code wallet.EncryptedData} */ public static final class EncryptedData extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:wallet.EncryptedData) EncryptedDataOrBuilder { // Use EncryptedData.newBuilder() to construct. private EncryptedData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private EncryptedData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final EncryptedData defaultInstance; public static EncryptedData getDefaultInstance() { return defaultInstance; } public EncryptedData getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private EncryptedData( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; initialisationVector_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; encryptedPrivateKey_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.EncryptedData.class, org.bitcoinj.wallet.Protos.EncryptedData.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public EncryptedData parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new EncryptedData(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; public static final int INITIALISATION_VECTOR_FIELD_NUMBER = 1; private com.google.protobuf.ByteString initialisationVector_; /** * required bytes initialisation_vector = 1; * *
     * The initialisation vector for the AES encryption (16 bytes)
     * 
*/ public boolean hasInitialisationVector() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required bytes initialisation_vector = 1; * *
     * The initialisation vector for the AES encryption (16 bytes)
     * 
*/ public com.google.protobuf.ByteString getInitialisationVector() { return initialisationVector_; } public static final int ENCRYPTED_PRIVATE_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString encryptedPrivateKey_; /** * required bytes encrypted_private_key = 2; * *
     * The encrypted private key
     * 
*/ public boolean hasEncryptedPrivateKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes encrypted_private_key = 2; * *
     * The encrypted private key
     * 
*/ public com.google.protobuf.ByteString getEncryptedPrivateKey() { return encryptedPrivateKey_; } private void initFields() { initialisationVector_ = com.google.protobuf.ByteString.EMPTY; encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasInitialisationVector()) { memoizedIsInitialized = 0; return false; } if (!hasEncryptedPrivateKey()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, initialisationVector_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, encryptedPrivateKey_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, initialisationVector_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, encryptedPrivateKey_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.EncryptedData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.EncryptedData prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code wallet.EncryptedData} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:wallet.EncryptedData) org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.EncryptedData.class, org.bitcoinj.wallet.Protos.EncryptedData.Builder.class); } // Construct using org.bitcoinj.wallet.Protos.EncryptedData.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); initialisationVector_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoinj.wallet.Protos.internal_static_wallet_EncryptedData_descriptor; } public org.bitcoinj.wallet.Protos.EncryptedData getDefaultInstanceForType() { return org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); } public org.bitcoinj.wallet.Protos.EncryptedData build() { org.bitcoinj.wallet.Protos.EncryptedData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoinj.wallet.Protos.EncryptedData buildPartial() { org.bitcoinj.wallet.Protos.EncryptedData result = new org.bitcoinj.wallet.Protos.EncryptedData(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.initialisationVector_ = initialisationVector_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.encryptedPrivateKey_ = encryptedPrivateKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoinj.wallet.Protos.EncryptedData) { return mergeFrom((org.bitcoinj.wallet.Protos.EncryptedData)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoinj.wallet.Protos.EncryptedData other) { if (other == org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) return this; if (other.hasInitialisationVector()) { setInitialisationVector(other.getInitialisationVector()); } if (other.hasEncryptedPrivateKey()) { setEncryptedPrivateKey(other.getEncryptedPrivateKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasInitialisationVector()) { return false; } if (!hasEncryptedPrivateKey()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoinj.wallet.Protos.EncryptedData parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoinj.wallet.Protos.EncryptedData) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString initialisationVector_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes initialisation_vector = 1; * *
       * The initialisation vector for the AES encryption (16 bytes)
       * 
*/ public boolean hasInitialisationVector() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required bytes initialisation_vector = 1; * *
       * The initialisation vector for the AES encryption (16 bytes)
       * 
*/ public com.google.protobuf.ByteString getInitialisationVector() { return initialisationVector_; } /** * required bytes initialisation_vector = 1; * *
       * The initialisation vector for the AES encryption (16 bytes)
       * 
*/ public Builder setInitialisationVector(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; initialisationVector_ = value; onChanged(); return this; } /** * required bytes initialisation_vector = 1; * *
       * The initialisation vector for the AES encryption (16 bytes)
       * 
*/ public Builder clearInitialisationVector() { bitField0_ = (bitField0_ & ~0x00000001); initialisationVector_ = getDefaultInstance().getInitialisationVector(); onChanged(); return this; } private com.google.protobuf.ByteString encryptedPrivateKey_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes encrypted_private_key = 2; * *
       * The encrypted private key
       * 
*/ public boolean hasEncryptedPrivateKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes encrypted_private_key = 2; * *
       * The encrypted private key
       * 
*/ public com.google.protobuf.ByteString getEncryptedPrivateKey() { return encryptedPrivateKey_; } /** * required bytes encrypted_private_key = 2; * *
       * The encrypted private key
       * 
*/ public Builder setEncryptedPrivateKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; encryptedPrivateKey_ = value; onChanged(); return this; } /** * required bytes encrypted_private_key = 2; * *
       * The encrypted private key
       * 
*/ public Builder clearEncryptedPrivateKey() { bitField0_ = (bitField0_ & ~0x00000002); encryptedPrivateKey_ = getDefaultInstance().getEncryptedPrivateKey(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:wallet.EncryptedData) } static { defaultInstance = new EncryptedData(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:wallet.EncryptedData) } public interface DeterministicKeyOrBuilder extends // @@protoc_insertion_point(interface_extends:wallet.DeterministicKey) com.google.protobuf.MessageOrBuilder { /** * required bytes chain_code = 1; * *
     * 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.
     * 
*/ boolean hasChainCode(); /** * required bytes chain_code = 1; * *
     * 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.
     * 
*/ com.google.protobuf.ByteString getChainCode(); /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ java.util.List getPathList(); /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ int getPathCount(); /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ int getPath(int index); /** * optional uint32 issued_subkeys = 3; * *
     * 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.
     * 
*/ boolean hasIssuedSubkeys(); /** * optional uint32 issued_subkeys = 3; * *
     * 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.
     * 
*/ int getIssuedSubkeys(); /** * optional uint32 lookahead_size = 4; */ boolean hasLookaheadSize(); /** * optional uint32 lookahead_size = 4; */ int getLookaheadSize(); /** * optional bool isFollowing = 5; * *
     **
     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
     * a single P2SH multisignature address
     * 
*/ boolean hasIsFollowing(); /** * optional bool isFollowing = 5; * *
     **
     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
     * a single P2SH multisignature address
     * 
*/ boolean getIsFollowing(); /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
     * 
*/ boolean hasSigsRequiredToSpend(); /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
     * 
*/ int getSigsRequiredToSpend(); } /** * Protobuf type {@code wallet.DeterministicKey} * *
   **
   * Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm.
   * 
*/ public static final class DeterministicKey extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:wallet.DeterministicKey) DeterministicKeyOrBuilder { // Use DeterministicKey.newBuilder() to construct. private DeterministicKey(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private DeterministicKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final DeterministicKey defaultInstance; public static DeterministicKey getDefaultInstance() { return defaultInstance; } public DeterministicKey getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DeterministicKey( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; chainCode_ = input.readBytes(); break; } case 16: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { path_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } path_.add(input.readUInt32()); break; } case 18: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { path_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } while (input.getBytesUntilLimit() > 0) { path_.add(input.readUInt32()); } input.popLimit(limit); break; } case 24: { bitField0_ |= 0x00000002; issuedSubkeys_ = input.readUInt32(); break; } case 32: { bitField0_ |= 0x00000004; lookaheadSize_ = input.readUInt32(); break; } case 40: { bitField0_ |= 0x00000008; isFollowing_ = input.readBool(); break; } case 48: { bitField0_ |= 0x00000010; sigsRequiredToSpend_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { path_ = java.util.Collections.unmodifiableList(path_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.DeterministicKey.class, org.bitcoinj.wallet.Protos.DeterministicKey.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public DeterministicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new DeterministicKey(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; public static final int CHAIN_CODE_FIELD_NUMBER = 1; private com.google.protobuf.ByteString chainCode_; /** * required bytes chain_code = 1; * *
     * 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.
     * 
*/ public boolean hasChainCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required bytes chain_code = 1; * *
     * 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.
     * 
*/ public com.google.protobuf.ByteString getChainCode() { return chainCode_; } public static final int PATH_FIELD_NUMBER = 2; private java.util.List path_; /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ public java.util.List getPathList() { return path_; } /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ public int getPathCount() { return path_.size(); } /** * repeated uint32 path = 2; * *
     * 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.
     * 
*/ public int getPath(int index) { return path_.get(index); } public static final int ISSUED_SUBKEYS_FIELD_NUMBER = 3; private int issuedSubkeys_; /** * optional uint32 issued_subkeys = 3; * *
     * 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.
     * 
*/ public boolean hasIssuedSubkeys() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional uint32 issued_subkeys = 3; * *
     * 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.
     * 
*/ public int getIssuedSubkeys() { return issuedSubkeys_; } public static final int LOOKAHEAD_SIZE_FIELD_NUMBER = 4; private int lookaheadSize_; /** * optional uint32 lookahead_size = 4; */ public boolean hasLookaheadSize() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional uint32 lookahead_size = 4; */ public int getLookaheadSize() { return lookaheadSize_; } public static final int ISFOLLOWING_FIELD_NUMBER = 5; private boolean isFollowing_; /** * optional bool isFollowing = 5; * *
     **
     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
     * a single P2SH multisignature address
     * 
*/ public boolean hasIsFollowing() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional bool isFollowing = 5; * *
     **
     * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
     * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
     * a single P2SH multisignature address
     * 
*/ public boolean getIsFollowing() { return isFollowing_; } public static final int SIGSREQUIREDTOSPEND_FIELD_NUMBER = 6; private int sigsRequiredToSpend_; /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
     * 
*/ public boolean hasSigsRequiredToSpend() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
     * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
     * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
     * 
*/ public int getSigsRequiredToSpend() { return sigsRequiredToSpend_; } private void initFields() { chainCode_ = com.google.protobuf.ByteString.EMPTY; path_ = java.util.Collections.emptyList(); issuedSubkeys_ = 0; lookaheadSize_ = 0; isFollowing_ = false; sigsRequiredToSpend_ = 1; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasChainCode()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, chainCode_); } for (int i = 0; i < path_.size(); i++) { output.writeUInt32(2, path_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(3, issuedSubkeys_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(4, lookaheadSize_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(5, isFollowing_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeUInt32(6, sigsRequiredToSpend_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, chainCode_); } { int dataSize = 0; for (int i = 0; i < path_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(path_.get(i)); } size += dataSize; size += 1 * getPathList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, issuedSubkeys_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, lookaheadSize_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isFollowing_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(6, sigsRequiredToSpend_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.DeterministicKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.DeterministicKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code wallet.DeterministicKey} * *
     **
     * Data attached to a Key message that defines the data needed by the BIP32 deterministic key hierarchy algorithm.
     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:wallet.DeterministicKey) org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.DeterministicKey.class, org.bitcoinj.wallet.Protos.DeterministicKey.Builder.class); } // Construct using org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); chainCode_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); path_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); issuedSubkeys_ = 0; bitField0_ = (bitField0_ & ~0x00000004); lookaheadSize_ = 0; bitField0_ = (bitField0_ & ~0x00000008); isFollowing_ = false; bitField0_ = (bitField0_ & ~0x00000010); sigsRequiredToSpend_ = 1; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoinj.wallet.Protos.internal_static_wallet_DeterministicKey_descriptor; } public org.bitcoinj.wallet.Protos.DeterministicKey getDefaultInstanceForType() { return org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance(); } public org.bitcoinj.wallet.Protos.DeterministicKey build() { org.bitcoinj.wallet.Protos.DeterministicKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoinj.wallet.Protos.DeterministicKey buildPartial() { org.bitcoinj.wallet.Protos.DeterministicKey result = new org.bitcoinj.wallet.Protos.DeterministicKey(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.chainCode_ = chainCode_; if (((bitField0_ & 0x00000002) == 0x00000002)) { path_ = java.util.Collections.unmodifiableList(path_); bitField0_ = (bitField0_ & ~0x00000002); } result.path_ = path_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.issuedSubkeys_ = issuedSubkeys_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.lookaheadSize_ = lookaheadSize_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } result.isFollowing_ = isFollowing_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } result.sigsRequiredToSpend_ = sigsRequiredToSpend_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoinj.wallet.Protos.DeterministicKey) { return mergeFrom((org.bitcoinj.wallet.Protos.DeterministicKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoinj.wallet.Protos.DeterministicKey other) { if (other == org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance()) return this; if (other.hasChainCode()) { setChainCode(other.getChainCode()); } if (!other.path_.isEmpty()) { if (path_.isEmpty()) { path_ = other.path_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePathIsMutable(); path_.addAll(other.path_); } onChanged(); } if (other.hasIssuedSubkeys()) { setIssuedSubkeys(other.getIssuedSubkeys()); } if (other.hasLookaheadSize()) { setLookaheadSize(other.getLookaheadSize()); } if (other.hasIsFollowing()) { setIsFollowing(other.getIsFollowing()); } if (other.hasSigsRequiredToSpend()) { setSigsRequiredToSpend(other.getSigsRequiredToSpend()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasChainCode()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoinj.wallet.Protos.DeterministicKey parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoinj.wallet.Protos.DeterministicKey) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString chainCode_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes chain_code = 1; * *
       * 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.
       * 
*/ public boolean hasChainCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required bytes chain_code = 1; * *
       * 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.
       * 
*/ public com.google.protobuf.ByteString getChainCode() { return chainCode_; } /** * required bytes chain_code = 1; * *
       * 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.
       * 
*/ public Builder setChainCode(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; chainCode_ = value; onChanged(); return this; } /** * required bytes chain_code = 1; * *
       * 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.
       * 
*/ public Builder clearChainCode() { bitField0_ = (bitField0_ & ~0x00000001); chainCode_ = getDefaultInstance().getChainCode(); onChanged(); return this; } private java.util.List path_ = java.util.Collections.emptyList(); private void ensurePathIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { path_ = new java.util.ArrayList(path_); bitField0_ |= 0x00000002; } } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public java.util.List getPathList() { return java.util.Collections.unmodifiableList(path_); } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public int getPathCount() { return path_.size(); } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public int getPath(int index) { return path_.get(index); } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public Builder setPath( int index, int value) { ensurePathIsMutable(); path_.set(index, value); onChanged(); return this; } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public Builder addPath(int value) { ensurePathIsMutable(); path_.add(value); onChanged(); return this; } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public Builder addAllPath( java.lang.Iterable values) { ensurePathIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, path_); onChanged(); return this; } /** * repeated uint32 path = 2; * *
       * 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.
       * 
*/ public Builder clearPath() { path_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } private int issuedSubkeys_ ; /** * optional uint32 issued_subkeys = 3; * *
       * 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.
       * 
*/ public boolean hasIssuedSubkeys() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional uint32 issued_subkeys = 3; * *
       * 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.
       * 
*/ public int getIssuedSubkeys() { return issuedSubkeys_; } /** * optional uint32 issued_subkeys = 3; * *
       * 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.
       * 
*/ public Builder setIssuedSubkeys(int value) { bitField0_ |= 0x00000004; issuedSubkeys_ = value; onChanged(); return this; } /** * optional uint32 issued_subkeys = 3; * *
       * 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.
       * 
*/ public Builder clearIssuedSubkeys() { bitField0_ = (bitField0_ & ~0x00000004); issuedSubkeys_ = 0; onChanged(); return this; } private int lookaheadSize_ ; /** * optional uint32 lookahead_size = 4; */ public boolean hasLookaheadSize() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional uint32 lookahead_size = 4; */ public int getLookaheadSize() { return lookaheadSize_; } /** * optional uint32 lookahead_size = 4; */ public Builder setLookaheadSize(int value) { bitField0_ |= 0x00000008; lookaheadSize_ = value; onChanged(); return this; } /** * optional uint32 lookahead_size = 4; */ public Builder clearLookaheadSize() { bitField0_ = (bitField0_ & ~0x00000008); lookaheadSize_ = 0; onChanged(); return this; } private boolean isFollowing_ ; /** * optional bool isFollowing = 5; * *
       **
       * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
       * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
       * a single P2SH multisignature address
       * 
*/ public boolean hasIsFollowing() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional bool isFollowing = 5; * *
       **
       * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
       * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
       * a single P2SH multisignature address
       * 
*/ public boolean getIsFollowing() { return isFollowing_; } /** * optional bool isFollowing = 5; * *
       **
       * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
       * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
       * a single P2SH multisignature address
       * 
*/ public Builder setIsFollowing(boolean value) { bitField0_ |= 0x00000010; isFollowing_ = value; onChanged(); return this; } /** * optional bool isFollowing = 5; * *
       **
       * Flag indicating that this key is a root of a following chain. This chain is following the next non-following chain.
       * Following/followed chains concept is used for married keychains, where the set of keys combined together to produce
       * a single P2SH multisignature address
       * 
*/ public Builder clearIsFollowing() { bitField0_ = (bitField0_ & ~0x00000010); isFollowing_ = false; onChanged(); return this; } private int sigsRequiredToSpend_ = 1; /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
       * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
       * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       * 
*/ public boolean hasSigsRequiredToSpend() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
       * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
       * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       * 
*/ public int getSigsRequiredToSpend() { return sigsRequiredToSpend_; } /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
       * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
       * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       * 
*/ public Builder setSigsRequiredToSpend(int value) { bitField0_ |= 0x00000020; sigsRequiredToSpend_ = value; onChanged(); return this; } /** * optional uint32 sigsRequiredToSpend = 6 [default = 1]; * *
       * Number of signatures required to spend. This field is needed only for married keychains to reconstruct KeyChain
       * and represents the N value from N-of-M CHECKMULTISIG script. For regular single keychains it will always be 1.
       * 
*/ public Builder clearSigsRequiredToSpend() { bitField0_ = (bitField0_ & ~0x00000020); sigsRequiredToSpend_ = 1; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:wallet.DeterministicKey) } static { defaultInstance = new DeterministicKey(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:wallet.DeterministicKey) } public interface KeyOrBuilder extends // @@protoc_insertion_point(interface_extends:wallet.Key) com.google.protobuf.MessageOrBuilder { /** * required .wallet.Key.Type type = 1; */ boolean hasType(); /** * required .wallet.Key.Type type = 1; */ org.bitcoinj.wallet.Protos.Key.Type getType(); /** * optional bytes secret_bytes = 2; * *
     * 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.
     * 
*/ boolean hasSecretBytes(); /** * optional bytes secret_bytes = 2; * *
     * 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.
     * 
*/ com.google.protobuf.ByteString getSecretBytes(); /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ boolean hasEncryptedData(); /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData(); /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder(); /** * optional bytes public_key = 3; * *
     * 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.
     * 
*/ boolean hasPublicKey(); /** * optional bytes public_key = 3; * *
     * 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.
     * 
*/ com.google.protobuf.ByteString getPublicKey(); /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ boolean hasLabel(); /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ java.lang.String getLabel(); /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ com.google.protobuf.ByteString getLabelBytes(); /** * optional int64 creation_timestamp = 5; * *
     * 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.
     * 
*/ boolean hasCreationTimestamp(); /** * optional int64 creation_timestamp = 5; * *
     * 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.
     * 
*/ long getCreationTimestamp(); /** * optional .wallet.DeterministicKey deterministic_key = 7; */ boolean hasDeterministicKey(); /** * optional .wallet.DeterministicKey deterministic_key = 7; */ org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey(); /** * optional .wallet.DeterministicKey deterministic_key = 7; */ org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder(); /** * optional bytes deterministic_seed = 8; * *
     * 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.
     * 
*/ boolean hasDeterministicSeed(); /** * optional bytes deterministic_seed = 8; * *
     * 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.
     * 
*/ com.google.protobuf.ByteString getDeterministicSeed(); /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ boolean hasEncryptedDeterministicSeed(); /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed(); /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder(); } /** * Protobuf type {@code wallet.Key} * *
   **
   * 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.
   * 
*/ public static final class Key extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:wallet.Key) KeyOrBuilder { // Use Key.newBuilder() to construct. private Key(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Key(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Key defaultInstance; public static Key getDefaultInstance() { return defaultInstance; } public Key getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Key( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); org.bitcoinj.wallet.Protos.Key.Type value = org.bitcoinj.wallet.Protos.Key.Type.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; type_ = value; } break; } case 18: { bitField0_ |= 0x00000002; secretBytes_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000008; publicKey_ = input.readBytes(); break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; label_ = bs; break; } case 40: { bitField0_ |= 0x00000020; creationTimestamp_ = input.readInt64(); break; } case 50: { org.bitcoinj.wallet.Protos.EncryptedData.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = encryptedData_.toBuilder(); } encryptedData_ = input.readMessage(org.bitcoinj.wallet.Protos.EncryptedData.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(encryptedData_); encryptedData_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } case 58: { org.bitcoinj.wallet.Protos.DeterministicKey.Builder subBuilder = null; if (((bitField0_ & 0x00000040) == 0x00000040)) { subBuilder = deterministicKey_.toBuilder(); } deterministicKey_ = input.readMessage(org.bitcoinj.wallet.Protos.DeterministicKey.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(deterministicKey_); deterministicKey_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000040; break; } case 66: { bitField0_ |= 0x00000080; deterministicSeed_ = input.readBytes(); break; } case 74: { org.bitcoinj.wallet.Protos.EncryptedData.Builder subBuilder = null; if (((bitField0_ & 0x00000100) == 0x00000100)) { subBuilder = encryptedDeterministicSeed_.toBuilder(); } encryptedDeterministicSeed_ = input.readMessage(org.bitcoinj.wallet.Protos.EncryptedData.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(encryptedDeterministicSeed_); encryptedDeterministicSeed_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000100; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.Key.class, org.bitcoinj.wallet.Protos.Key.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Key parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Key(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } /** * Protobuf enum {@code wallet.Key.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * ORIGINAL = 1; * *
       ** Unencrypted - Original bitcoin secp256k1 curve 
       * 
*/ ORIGINAL(0, 1), /** * ENCRYPTED_SCRYPT_AES = 2; * *
       ** Encrypted with Scrypt and AES - Original bitcoin secp256k1 curve 
       * 
*/ ENCRYPTED_SCRYPT_AES(1, 2), /** * DETERMINISTIC_MNEMONIC = 3; * *
       **
       * 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(2, 3), /** * DETERMINISTIC_KEY = 4; * *
       **
       * 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(3, 4), ; /** * ORIGINAL = 1; * *
       ** Unencrypted - Original bitcoin secp256k1 curve 
       * 
*/ public static final int ORIGINAL_VALUE = 1; /** * ENCRYPTED_SCRYPT_AES = 2; * *
       ** Encrypted with Scrypt and AES - Original bitcoin secp256k1 curve 
       * 
*/ public static final int ENCRYPTED_SCRYPT_AES_VALUE = 2; /** * DETERMINISTIC_MNEMONIC = 3; * *
       **
       * 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.
       * 
*/ public static final int DETERMINISTIC_MNEMONIC_VALUE = 3; /** * DETERMINISTIC_KEY = 4; * *
       **
       * 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.
       * 
*/ public static final int DETERMINISTIC_KEY_VALUE = 4; public final int getNumber() { return value; } public static Type valueOf(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 com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.bitcoinj.wallet.Protos.Key.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; private Type(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:wallet.Key.Type) } private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private org.bitcoinj.wallet.Protos.Key.Type type_; /** * required .wallet.Key.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .wallet.Key.Type type = 1; */ public org.bitcoinj.wallet.Protos.Key.Type getType() { return type_; } public static final int SECRET_BYTES_FIELD_NUMBER = 2; private com.google.protobuf.ByteString secretBytes_; /** * optional bytes secret_bytes = 2; * *
     * 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.
     * 
*/ public boolean hasSecretBytes() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional bytes secret_bytes = 2; * *
     * 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.
     * 
*/ public com.google.protobuf.ByteString getSecretBytes() { return secretBytes_; } public static final int ENCRYPTED_DATA_FIELD_NUMBER = 6; private org.bitcoinj.wallet.Protos.EncryptedData encryptedData_; /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ public boolean hasEncryptedData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { return encryptedData_; } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
     * If the secret data is encrypted, then secret_bytes is missing and this field is set.
     * 
*/ public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder() { return encryptedData_; } public static final int PUBLIC_KEY_FIELD_NUMBER = 3; private com.google.protobuf.ByteString publicKey_; /** * optional bytes public_key = 3; * *
     * 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.
     * 
*/ public boolean hasPublicKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional bytes public_key = 3; * *
     * 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.
     * 
*/ public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } public static final int LABEL_FIELD_NUMBER = 4; private java.lang.Object label_; /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ public boolean hasLabel() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } } /** * optional string label = 4; * *
     * User-provided label associated with the key.
     * 
*/ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 5; private long creationTimestamp_; /** * optional int64 creation_timestamp = 5; * *
     * 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.
     * 
*/ public boolean hasCreationTimestamp() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int64 creation_timestamp = 5; * *
     * 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.
     * 
*/ public long getCreationTimestamp() { return creationTimestamp_; } public static final int DETERMINISTIC_KEY_FIELD_NUMBER = 7; private org.bitcoinj.wallet.Protos.DeterministicKey deterministicKey_; /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public boolean hasDeterministicKey() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() { return deterministicKey_; } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder() { return deterministicKey_; } public static final int DETERMINISTIC_SEED_FIELD_NUMBER = 8; private com.google.protobuf.ByteString deterministicSeed_; /** * optional bytes deterministic_seed = 8; * *
     * 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.
     * 
*/ public boolean hasDeterministicSeed() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional bytes deterministic_seed = 8; * *
     * 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.
     * 
*/ public com.google.protobuf.ByteString getDeterministicSeed() { return deterministicSeed_; } public static final int ENCRYPTED_DETERMINISTIC_SEED_FIELD_NUMBER = 9; private org.bitcoinj.wallet.Protos.EncryptedData encryptedDeterministicSeed_; /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ public boolean hasEncryptedDeterministicSeed() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { return encryptedDeterministicSeed_; } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
     * Encrypted version of the seed
     * 
*/ public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder() { return encryptedDeterministicSeed_; } private void initFields() { type_ = org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL; secretBytes_ = com.google.protobuf.ByteString.EMPTY; encryptedData_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); publicKey_ = com.google.protobuf.ByteString.EMPTY; label_ = ""; creationTimestamp_ = 0L; deterministicKey_ = org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance(); deterministicSeed_ = com.google.protobuf.ByteString.EMPTY; encryptedDeterministicSeed_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasType()) { memoizedIsInitialized = 0; return false; } if (hasEncryptedData()) { if (!getEncryptedData().isInitialized()) { memoizedIsInitialized = 0; return false; } } if (hasDeterministicKey()) { if (!getDeterministicKey().isInitialized()) { memoizedIsInitialized = 0; return false; } } if (hasEncryptedDeterministicSeed()) { if (!getEncryptedDeterministicSeed().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, secretBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(3, publicKey_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(4, getLabelBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeInt64(5, creationTimestamp_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(6, encryptedData_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeMessage(7, deterministicKey_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeBytes(8, deterministicSeed_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeMessage(9, encryptedDeterministicSeed_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, secretBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, publicKey_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getLabelBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, creationTimestamp_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, encryptedData_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, deterministicKey_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(8, deterministicSeed_); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, encryptedDeterministicSeed_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.bitcoinj.wallet.Protos.Key parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static org.bitcoinj.wallet.Protos.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static org.bitcoinj.wallet.Protos.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.bitcoinj.wallet.Protos.Key prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code wallet.Key} * *
     **
     * 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.
     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:wallet.Key) org.bitcoinj.wallet.Protos.KeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.Key.class, org.bitcoinj.wallet.Protos.Key.Builder.class); } // Construct using org.bitcoinj.wallet.Protos.Key.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getEncryptedDataFieldBuilder(); getDeterministicKeyFieldBuilder(); getEncryptedDeterministicSeedFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); type_ = org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL; bitField0_ = (bitField0_ & ~0x00000001); secretBytes_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (encryptedDataBuilder_ == null) { encryptedData_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); } else { encryptedDataBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); publicKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); label_ = ""; bitField0_ = (bitField0_ & ~0x00000010); creationTimestamp_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); if (deterministicKeyBuilder_ == null) { deterministicKey_ = org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance(); } else { deterministicKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); deterministicSeed_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000080); if (encryptedDeterministicSeedBuilder_ == null) { encryptedDeterministicSeed_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); } else { encryptedDeterministicSeedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Key_descriptor; } public org.bitcoinj.wallet.Protos.Key getDefaultInstanceForType() { return org.bitcoinj.wallet.Protos.Key.getDefaultInstance(); } public org.bitcoinj.wallet.Protos.Key build() { org.bitcoinj.wallet.Protos.Key result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public org.bitcoinj.wallet.Protos.Key buildPartial() { org.bitcoinj.wallet.Protos.Key result = new org.bitcoinj.wallet.Protos.Key(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.secretBytes_ = secretBytes_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } if (encryptedDataBuilder_ == null) { result.encryptedData_ = encryptedData_; } else { result.encryptedData_ = encryptedDataBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.publicKey_ = publicKey_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.label_ = label_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.creationTimestamp_ = creationTimestamp_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } if (deterministicKeyBuilder_ == null) { result.deterministicKey_ = deterministicKey_; } else { result.deterministicKey_ = deterministicKeyBuilder_.build(); } if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } result.deterministicSeed_ = deterministicSeed_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } if (encryptedDeterministicSeedBuilder_ == null) { result.encryptedDeterministicSeed_ = encryptedDeterministicSeed_; } else { result.encryptedDeterministicSeed_ = encryptedDeterministicSeedBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.bitcoinj.wallet.Protos.Key) { return mergeFrom((org.bitcoinj.wallet.Protos.Key)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.bitcoinj.wallet.Protos.Key other) { if (other == org.bitcoinj.wallet.Protos.Key.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasSecretBytes()) { setSecretBytes(other.getSecretBytes()); } if (other.hasEncryptedData()) { mergeEncryptedData(other.getEncryptedData()); } if (other.hasPublicKey()) { setPublicKey(other.getPublicKey()); } if (other.hasLabel()) { bitField0_ |= 0x00000010; label_ = other.label_; onChanged(); } if (other.hasCreationTimestamp()) { setCreationTimestamp(other.getCreationTimestamp()); } if (other.hasDeterministicKey()) { mergeDeterministicKey(other.getDeterministicKey()); } if (other.hasDeterministicSeed()) { setDeterministicSeed(other.getDeterministicSeed()); } if (other.hasEncryptedDeterministicSeed()) { mergeEncryptedDeterministicSeed(other.getEncryptedDeterministicSeed()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasType()) { return false; } if (hasEncryptedData()) { if (!getEncryptedData().isInitialized()) { return false; } } if (hasDeterministicKey()) { if (!getDeterministicKey().isInitialized()) { return false; } } if (hasEncryptedDeterministicSeed()) { if (!getEncryptedDeterministicSeed().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.bitcoinj.wallet.Protos.Key parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.bitcoinj.wallet.Protos.Key) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private org.bitcoinj.wallet.Protos.Key.Type type_ = org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL; /** * required .wallet.Key.Type type = 1; */ public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .wallet.Key.Type type = 1; */ public org.bitcoinj.wallet.Protos.Key.Type getType() { return type_; } /** * required .wallet.Key.Type type = 1; */ public Builder setType(org.bitcoinj.wallet.Protos.Key.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); return this; } /** * required .wallet.Key.Type type = 1; */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = org.bitcoinj.wallet.Protos.Key.Type.ORIGINAL; onChanged(); return this; } private com.google.protobuf.ByteString secretBytes_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes secret_bytes = 2; * *
       * 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.
       * 
*/ public boolean hasSecretBytes() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional bytes secret_bytes = 2; * *
       * 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.
       * 
*/ public com.google.protobuf.ByteString getSecretBytes() { return secretBytes_; } /** * optional bytes secret_bytes = 2; * *
       * 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.
       * 
*/ public Builder setSecretBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; secretBytes_ = value; onChanged(); return this; } /** * optional bytes secret_bytes = 2; * *
       * 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.
       * 
*/ public Builder clearSecretBytes() { bitField0_ = (bitField0_ & ~0x00000002); secretBytes_ = getDefaultInstance().getSecretBytes(); onChanged(); return this; } private org.bitcoinj.wallet.Protos.EncryptedData encryptedData_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> encryptedDataBuilder_; /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public boolean hasEncryptedData() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedData() { if (encryptedDataBuilder_ == null) { return encryptedData_; } else { return encryptedDataBuilder_.getMessage(); } } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public Builder setEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { if (encryptedDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } encryptedData_ = value; onChanged(); } else { encryptedDataBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public Builder setEncryptedData( org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) { if (encryptedDataBuilder_ == null) { encryptedData_ = builderForValue.build(); onChanged(); } else { encryptedDataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public Builder mergeEncryptedData(org.bitcoinj.wallet.Protos.EncryptedData value) { if (encryptedDataBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && encryptedData_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) { encryptedData_ = org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedData_).mergeFrom(value).buildPartial(); } else { encryptedData_ = value; } onChanged(); } else { encryptedDataBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public Builder clearEncryptedData() { if (encryptedDataBuilder_ == null) { encryptedData_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); onChanged(); } else { encryptedDataBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData.Builder getEncryptedDataBuilder() { bitField0_ |= 0x00000004; onChanged(); return getEncryptedDataFieldBuilder().getBuilder(); } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder() { if (encryptedDataBuilder_ != null) { return encryptedDataBuilder_.getMessageOrBuilder(); } else { return encryptedData_; } } /** * optional .wallet.EncryptedData encrypted_data = 6; * *
       * If the secret data is encrypted, then secret_bytes is missing and this field is set.
       * 
*/ private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> getEncryptedDataFieldBuilder() { if (encryptedDataBuilder_ == null) { encryptedDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder>( getEncryptedData(), getParentForChildren(), isClean()); encryptedData_ = null; } return encryptedDataBuilder_; } private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes public_key = 3; * *
       * 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.
       * 
*/ public boolean hasPublicKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional bytes public_key = 3; * *
       * 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.
       * 
*/ public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } /** * optional bytes public_key = 3; * *
       * 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.
       * 
*/ public Builder setPublicKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; publicKey_ = value; onChanged(); return this; } /** * optional bytes public_key = 3; * *
       * 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.
       * 
*/ public Builder clearPublicKey() { bitField0_ = (bitField0_ & ~0x00000008); publicKey_ = getDefaultInstance().getPublicKey(); onChanged(); return this; } private java.lang.Object label_ = ""; /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public boolean hasLabel() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { label_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public Builder setLabel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; } /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public Builder clearLabel() { bitField0_ = (bitField0_ & ~0x00000010); label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * optional string label = 4; * *
       * User-provided label associated with the key.
       * 
*/ public Builder setLabelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; label_ = value; onChanged(); return this; } private long creationTimestamp_ ; /** * optional int64 creation_timestamp = 5; * *
       * 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.
       * 
*/ public boolean hasCreationTimestamp() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int64 creation_timestamp = 5; * *
       * 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.
       * 
*/ public long getCreationTimestamp() { return creationTimestamp_; } /** * optional int64 creation_timestamp = 5; * *
       * 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.
       * 
*/ public Builder setCreationTimestamp(long value) { bitField0_ |= 0x00000020; creationTimestamp_ = value; onChanged(); return this; } /** * optional int64 creation_timestamp = 5; * *
       * 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.
       * 
*/ public Builder clearCreationTimestamp() { bitField0_ = (bitField0_ & ~0x00000020); creationTimestamp_ = 0L; onChanged(); return this; } private org.bitcoinj.wallet.Protos.DeterministicKey deterministicKey_ = org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder> deterministicKeyBuilder_; /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public boolean hasDeterministicKey() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public org.bitcoinj.wallet.Protos.DeterministicKey getDeterministicKey() { if (deterministicKeyBuilder_ == null) { return deterministicKey_; } else { return deterministicKeyBuilder_.getMessage(); } } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public Builder setDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { if (deterministicKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } deterministicKey_ = value; onChanged(); } else { deterministicKeyBuilder_.setMessage(value); } bitField0_ |= 0x00000040; return this; } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public Builder setDeterministicKey( org.bitcoinj.wallet.Protos.DeterministicKey.Builder builderForValue) { if (deterministicKeyBuilder_ == null) { deterministicKey_ = builderForValue.build(); onChanged(); } else { deterministicKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; return this; } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public Builder mergeDeterministicKey(org.bitcoinj.wallet.Protos.DeterministicKey value) { if (deterministicKeyBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && deterministicKey_ != org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance()) { deterministicKey_ = org.bitcoinj.wallet.Protos.DeterministicKey.newBuilder(deterministicKey_).mergeFrom(value).buildPartial(); } else { deterministicKey_ = value; } onChanged(); } else { deterministicKeyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public Builder clearDeterministicKey() { if (deterministicKeyBuilder_ == null) { deterministicKey_ = org.bitcoinj.wallet.Protos.DeterministicKey.getDefaultInstance(); onChanged(); } else { deterministicKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public org.bitcoinj.wallet.Protos.DeterministicKey.Builder getDeterministicKeyBuilder() { bitField0_ |= 0x00000040; onChanged(); return getDeterministicKeyFieldBuilder().getBuilder(); } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ public org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder() { if (deterministicKeyBuilder_ != null) { return deterministicKeyBuilder_.getMessageOrBuilder(); } else { return deterministicKey_; } } /** * optional .wallet.DeterministicKey deterministic_key = 7; */ private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder> getDeterministicKeyFieldBuilder() { if (deterministicKeyBuilder_ == null) { deterministicKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.DeterministicKey, org.bitcoinj.wallet.Protos.DeterministicKey.Builder, org.bitcoinj.wallet.Protos.DeterministicKeyOrBuilder>( getDeterministicKey(), getParentForChildren(), isClean()); deterministicKey_ = null; } return deterministicKeyBuilder_; } private com.google.protobuf.ByteString deterministicSeed_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes deterministic_seed = 8; * *
       * 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.
       * 
*/ public boolean hasDeterministicSeed() { return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional bytes deterministic_seed = 8; * *
       * 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.
       * 
*/ public com.google.protobuf.ByteString getDeterministicSeed() { return deterministicSeed_; } /** * optional bytes deterministic_seed = 8; * *
       * 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.
       * 
*/ public Builder setDeterministicSeed(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; deterministicSeed_ = value; onChanged(); return this; } /** * optional bytes deterministic_seed = 8; * *
       * 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.
       * 
*/ public Builder clearDeterministicSeed() { bitField0_ = (bitField0_ & ~0x00000080); deterministicSeed_ = getDefaultInstance().getDeterministicSeed(); onChanged(); return this; } private org.bitcoinj.wallet.Protos.EncryptedData encryptedDeterministicSeed_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> encryptedDeterministicSeedBuilder_; /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public boolean hasEncryptedDeterministicSeed() { return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData getEncryptedDeterministicSeed() { if (encryptedDeterministicSeedBuilder_ == null) { return encryptedDeterministicSeed_; } else { return encryptedDeterministicSeedBuilder_.getMessage(); } } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public Builder setEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { if (encryptedDeterministicSeedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } encryptedDeterministicSeed_ = value; onChanged(); } else { encryptedDeterministicSeedBuilder_.setMessage(value); } bitField0_ |= 0x00000100; return this; } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public Builder setEncryptedDeterministicSeed( org.bitcoinj.wallet.Protos.EncryptedData.Builder builderForValue) { if (encryptedDeterministicSeedBuilder_ == null) { encryptedDeterministicSeed_ = builderForValue.build(); onChanged(); } else { encryptedDeterministicSeedBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; return this; } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public Builder mergeEncryptedDeterministicSeed(org.bitcoinj.wallet.Protos.EncryptedData value) { if (encryptedDeterministicSeedBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100) && encryptedDeterministicSeed_ != org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance()) { encryptedDeterministicSeed_ = org.bitcoinj.wallet.Protos.EncryptedData.newBuilder(encryptedDeterministicSeed_).mergeFrom(value).buildPartial(); } else { encryptedDeterministicSeed_ = value; } onChanged(); } else { encryptedDeterministicSeedBuilder_.mergeFrom(value); } bitField0_ |= 0x00000100; return this; } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public Builder clearEncryptedDeterministicSeed() { if (encryptedDeterministicSeedBuilder_ == null) { encryptedDeterministicSeed_ = org.bitcoinj.wallet.Protos.EncryptedData.getDefaultInstance(); onChanged(); } else { encryptedDeterministicSeedBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); return this; } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedData.Builder getEncryptedDeterministicSeedBuilder() { bitField0_ |= 0x00000100; onChanged(); return getEncryptedDeterministicSeedFieldBuilder().getBuilder(); } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ public org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder() { if (encryptedDeterministicSeedBuilder_ != null) { return encryptedDeterministicSeedBuilder_.getMessageOrBuilder(); } else { return encryptedDeterministicSeed_; } } /** * optional .wallet.EncryptedData encrypted_deterministic_seed = 9; * *
       * Encrypted version of the seed
       * 
*/ private com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder> getEncryptedDeterministicSeedFieldBuilder() { if (encryptedDeterministicSeedBuilder_ == null) { encryptedDeterministicSeedBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.bitcoinj.wallet.Protos.EncryptedData, org.bitcoinj.wallet.Protos.EncryptedData.Builder, org.bitcoinj.wallet.Protos.EncryptedDataOrBuilder>( getEncryptedDeterministicSeed(), getParentForChildren(), isClean()); encryptedDeterministicSeed_ = null; } return encryptedDeterministicSeedBuilder_; } // @@protoc_insertion_point(builder_scope:wallet.Key) } static { defaultInstance = new Key(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:wallet.Key) } public interface ScriptOrBuilder extends // @@protoc_insertion_point(interface_extends:wallet.Script) com.google.protobuf.MessageOrBuilder { /** * required bytes program = 1; */ boolean hasProgram(); /** * required bytes program = 1; */ com.google.protobuf.ByteString getProgram(); /** * required int64 creation_timestamp = 2; * *
     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point
     * when watching for scripts on the blockchain.
     * 
*/ boolean hasCreationTimestamp(); /** * required int64 creation_timestamp = 2; * *
     * Timestamp stored as millis since epoch. Useful for skipping block bodies before this point
     * when watching for scripts on the blockchain.
     * 
*/ long getCreationTimestamp(); } /** * Protobuf type {@code wallet.Script} */ public static final class Script extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:wallet.Script) ScriptOrBuilder { // Use Script.newBuilder() to construct. private Script(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Script(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Script defaultInstance; public static Script getDefaultInstance() { return defaultInstance; } public Script getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Script( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; program_ = input.readBytes(); break; } case 16: { bitField0_ |= 0x00000002; creationTimestamp_ = input.readInt64(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.bitcoinj.wallet.Protos.internal_static_wallet_Script_fieldAccessorTable .ensureFieldAccessorsInitialized( org.bitcoinj.wallet.Protos.Script.class, org.bitcoinj.wallet.Protos.Script.Builder.class); } public static com.google.protobuf.Parser