org.bitcoinj.wallet
Class Protos.Key.Builder

java.lang.Object
  extended by com.google.protobuf.AbstractMessageLite.Builder<BuilderType>
      extended by com.google.protobuf.AbstractMessage.Builder<BuilderType>
          extended by com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>
              extended by org.bitcoinj.wallet.Protos.Key.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Protos.KeyOrBuilder
Enclosing class:
Protos.Key

public static final class Protos.Key.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>
implements Protos.KeyOrBuilder

Protobuf type 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.
 


Method Summary
 Protos.Key build()
           
 Protos.Key buildPartial()
           
 Protos.Key.Builder clear()
           
 Protos.Key.Builder clearCreationTimestamp()
          optional int64 creation_timestamp = 5;
 Protos.Key.Builder clearEncryptedPrivateKey()
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.Key.Builder clearLabel()
          optional string label = 4;
 Protos.Key.Builder clearPrivateKey()
          optional bytes private_key = 2;
 Protos.Key.Builder clearPublicKey()
          optional bytes public_key = 3;
 Protos.Key.Builder clearType()
          required .wallet.Key.Type type = 1;
 Protos.Key.Builder clone()
           
 long getCreationTimestamp()
          optional int64 creation_timestamp = 5;
 Protos.Key getDefaultInstanceForType()
           
static com.google.protobuf.Descriptors.Descriptor getDescriptor()
           
 com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
           
 Protos.EncryptedPrivateKey getEncryptedPrivateKey()
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.EncryptedPrivateKey.Builder getEncryptedPrivateKeyBuilder()
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.EncryptedPrivateKeyOrBuilder getEncryptedPrivateKeyOrBuilder()
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 String getLabel()
          optional string label = 4;
 com.google.protobuf.ByteString getLabelBytes()
          optional string label = 4;
 com.google.protobuf.ByteString getPrivateKey()
          optional bytes private_key = 2;
 com.google.protobuf.ByteString getPublicKey()
          optional bytes public_key = 3;
 Protos.Key.Type getType()
          required .wallet.Key.Type type = 1;
 boolean hasCreationTimestamp()
          optional int64 creation_timestamp = 5;
 boolean hasEncryptedPrivateKey()
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 boolean hasLabel()
          optional string label = 4;
 boolean hasPrivateKey()
          optional bytes private_key = 2;
 boolean hasPublicKey()
          optional bytes public_key = 3;
 boolean hasType()
          required .wallet.Key.Type type = 1;
protected  com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
           
 boolean isInitialized()
           
 Protos.Key.Builder mergeEncryptedPrivateKey(Protos.EncryptedPrivateKey value)
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.Key.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           
 Protos.Key.Builder mergeFrom(com.google.protobuf.Message other)
           
 Protos.Key.Builder mergeFrom(Protos.Key other)
           
 Protos.Key.Builder setCreationTimestamp(long value)
          optional int64 creation_timestamp = 5;
 Protos.Key.Builder setEncryptedPrivateKey(Protos.EncryptedPrivateKey.Builder builderForValue)
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.Key.Builder setEncryptedPrivateKey(Protos.EncryptedPrivateKey value)
          optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 Protos.Key.Builder setLabel(String value)
          optional string label = 4;
 Protos.Key.Builder setLabelBytes(com.google.protobuf.ByteString value)
          optional string label = 4;
 Protos.Key.Builder setPrivateKey(com.google.protobuf.ByteString value)
          optional bytes private_key = 2;
 Protos.Key.Builder setPublicKey(com.google.protobuf.ByteString value)
          optional bytes public_key = 3;
 Protos.Key.Builder setType(Protos.Key.Type value)
          required .wallet.Key.Type type = 1;
 
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, getAllFields, getField, getFieldBuilder, getParentForChildren, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, isClean, markClean, mergeUnknownFields, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields
 
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
 
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, newUninitializedMessageException
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField
 

Method Detail

getDescriptor

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()

internalGetFieldAccessorTable

protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Specified by:
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>

clear

public Protos.Key.Builder clear()
Specified by:
clear in interface com.google.protobuf.Message.Builder
Specified by:
clear in interface com.google.protobuf.MessageLite.Builder
Overrides:
clear in class com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>

clone

public Protos.Key.Builder clone()
Specified by:
clone in interface com.google.protobuf.Message.Builder
Specified by:
clone in interface com.google.protobuf.MessageLite.Builder
Overrides:
clone in class com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Specified by:
getDescriptorForType in interface com.google.protobuf.Message.Builder
Specified by:
getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
Overrides:
getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>

getDefaultInstanceForType

public Protos.Key getDefaultInstanceForType()
Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder

build

public Protos.Key build()
Specified by:
build in interface com.google.protobuf.Message.Builder
Specified by:
build in interface com.google.protobuf.MessageLite.Builder

buildPartial

public Protos.Key buildPartial()
Specified by:
buildPartial in interface com.google.protobuf.Message.Builder
Specified by:
buildPartial in interface com.google.protobuf.MessageLite.Builder

mergeFrom

public Protos.Key.Builder mergeFrom(com.google.protobuf.Message other)
Specified by:
mergeFrom in interface com.google.protobuf.Message.Builder
Overrides:
mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Protos.Key.Builder>

mergeFrom

public Protos.Key.Builder mergeFrom(Protos.Key other)

isInitialized

public final boolean isInitialized()
Specified by:
isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
Overrides:
isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Protos.Key.Builder>

mergeFrom

public Protos.Key.Builder mergeFrom(com.google.protobuf.CodedInputStream input,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws IOException
Specified by:
mergeFrom in interface com.google.protobuf.Message.Builder
Specified by:
mergeFrom in interface com.google.protobuf.MessageLite.Builder
Overrides:
mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Protos.Key.Builder>
Throws:
IOException

hasType

public boolean hasType()
required .wallet.Key.Type type = 1;

Specified by:
hasType in interface Protos.KeyOrBuilder

getType

public Protos.Key.Type getType()
required .wallet.Key.Type type = 1;

Specified by:
getType in interface Protos.KeyOrBuilder

setType

public Protos.Key.Builder setType(Protos.Key.Type value)
required .wallet.Key.Type type = 1;


clearType

public Protos.Key.Builder clearType()
required .wallet.Key.Type type = 1;


hasPrivateKey

public boolean hasPrivateKey()
optional bytes private_key = 2;
 The private EC key bytes without any ASN.1 wrapping.
 

Specified by:
hasPrivateKey in interface Protos.KeyOrBuilder

getPrivateKey

public com.google.protobuf.ByteString getPrivateKey()
optional bytes private_key = 2;
 The private EC key bytes without any ASN.1 wrapping.
 

Specified by:
getPrivateKey in interface Protos.KeyOrBuilder

setPrivateKey

public Protos.Key.Builder setPrivateKey(com.google.protobuf.ByteString value)
optional bytes private_key = 2;
 The private EC key bytes without any ASN.1 wrapping.
 


clearPrivateKey

public Protos.Key.Builder clearPrivateKey()
optional bytes private_key = 2;
 The private EC key bytes without any ASN.1 wrapping.
 


hasEncryptedPrivateKey

public boolean hasEncryptedPrivateKey()
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 

Specified by:
hasEncryptedPrivateKey in interface Protos.KeyOrBuilder

getEncryptedPrivateKey

public Protos.EncryptedPrivateKey getEncryptedPrivateKey()
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 

Specified by:
getEncryptedPrivateKey in interface Protos.KeyOrBuilder

setEncryptedPrivateKey

public Protos.Key.Builder setEncryptedPrivateKey(Protos.EncryptedPrivateKey value)
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 


setEncryptedPrivateKey

public Protos.Key.Builder setEncryptedPrivateKey(Protos.EncryptedPrivateKey.Builder builderForValue)
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 


mergeEncryptedPrivateKey

public Protos.Key.Builder mergeEncryptedPrivateKey(Protos.EncryptedPrivateKey value)
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 


clearEncryptedPrivateKey

public Protos.Key.Builder clearEncryptedPrivateKey()
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 


getEncryptedPrivateKeyBuilder

public Protos.EncryptedPrivateKey.Builder getEncryptedPrivateKeyBuilder()
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 


getEncryptedPrivateKeyOrBuilder

public Protos.EncryptedPrivateKeyOrBuilder getEncryptedPrivateKeyOrBuilder()
optional .wallet.EncryptedPrivateKey encrypted_private_key = 6;
 The message containing the encrypted private EC key information.
 When an EncryptedPrivateKey is present then the (unencrypted) private_key will be a zero length byte array or contain all zeroes.
 This is for security of the private key information.
 

Specified by:
getEncryptedPrivateKeyOrBuilder in interface Protos.KeyOrBuilder

hasPublicKey

public 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.
 

Specified by:
hasPublicKey in interface Protos.KeyOrBuilder

getPublicKey

public com.google.protobuf.ByteString getPublicKey()
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.
 

Specified by:
getPublicKey in interface Protos.KeyOrBuilder

setPublicKey

public Protos.Key.Builder setPublicKey(com.google.protobuf.ByteString value)
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.
 


clearPublicKey

public Protos.Key.Builder clearPublicKey()
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.
 


hasLabel

public boolean hasLabel()
optional string label = 4;
 User-provided label associated with the key.
 

Specified by:
hasLabel in interface Protos.KeyOrBuilder

getLabel

public String getLabel()
optional string label = 4;
 User-provided label associated with the key.
 

Specified by:
getLabel in interface Protos.KeyOrBuilder

getLabelBytes

public com.google.protobuf.ByteString getLabelBytes()
optional string label = 4;
 User-provided label associated with the key.
 

Specified by:
getLabelBytes in interface Protos.KeyOrBuilder

setLabel

public Protos.Key.Builder setLabel(String value)
optional string label = 4;
 User-provided label associated with the key.
 


clearLabel

public Protos.Key.Builder clearLabel()
optional string label = 4;
 User-provided label associated with the key.
 


setLabelBytes

public Protos.Key.Builder setLabelBytes(com.google.protobuf.ByteString value)
optional string label = 4;
 User-provided label associated with the key.
 


hasCreationTimestamp

public boolean hasCreationTimestamp()
optional int64 creation_timestamp = 5;
 Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
 

Specified by:
hasCreationTimestamp in interface Protos.KeyOrBuilder

getCreationTimestamp

public long getCreationTimestamp()
optional int64 creation_timestamp = 5;
 Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
 

Specified by:
getCreationTimestamp in interface Protos.KeyOrBuilder

setCreationTimestamp

public Protos.Key.Builder setCreationTimestamp(long value)
optional int64 creation_timestamp = 5;
 Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
 


clearCreationTimestamp

public Protos.Key.Builder clearCreationTimestamp()
optional int64 creation_timestamp = 5;
 Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
 



Copyright © 2014. All rights reserved.