public static final class Protos.Key extends com.google.protobuf.GeneratedMessage implements Protos.KeyOrBuilder
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.
Modifier and Type | Class and Description |
---|---|
static class |
Protos.Key.Builder
Protobuf type
wallet.Key |
static class |
Protos.Key.Type
Protobuf enum
wallet.Key.Type |
com.google.protobuf.GeneratedMessage.BuilderParent, com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessage.ExtendableBuilder>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingType extends com.google.protobuf.Message,Type>
Modifier and Type | Field and Description |
---|---|
static int |
CREATION_TIMESTAMP_FIELD_NUMBER |
static int |
ENCRYPTED_PRIVATE_KEY_FIELD_NUMBER |
static int |
LABEL_FIELD_NUMBER |
static com.google.protobuf.Parser<Protos.Key> |
PARSER |
static int |
PRIVATE_KEY_FIELD_NUMBER |
static int |
PUBLIC_KEY_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
long |
getCreationTimestamp()
optional int64 creation_timestamp = 5; |
static Protos.Key |
getDefaultInstance() |
Protos.Key |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Protos.EncryptedPrivateKey |
getEncryptedPrivateKey()
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.Parser<Protos.Key> |
getParserForType() |
com.google.protobuf.ByteString |
getPrivateKey()
optional bytes private_key = 2; |
com.google.protobuf.ByteString |
getPublicKey()
optional bytes public_key = 3; |
int |
getSerializedSize() |
Protos.Key.Type |
getType()
required .wallet.Key.Type type = 1; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
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() |
static Protos.Key.Builder |
newBuilder() |
static Protos.Key.Builder |
newBuilder(Protos.Key prototype) |
Protos.Key.Builder |
newBuilderForType() |
protected Protos.Key.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) |
static Protos.Key |
parseDelimitedFrom(InputStream input) |
static Protos.Key |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Key |
parseFrom(byte[] data) |
static Protos.Key |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Key |
parseFrom(com.google.protobuf.ByteString data) |
static Protos.Key |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Key |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Protos.Key |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Protos.Key |
parseFrom(InputStream input) |
static Protos.Key |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Protos.Key.Builder |
toBuilder() |
protected Object |
writeReplace() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
getAllFields, getDescriptorForType, getField, getRepeatedField, getRepeatedFieldCount, hasField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField
equals, findInitializationErrors, getInitializationErrorString, hashBoolean, hashCode, hashEnum, hashEnumList, hashFields, hashLong, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static com.google.protobuf.Parser<Protos.Key> PARSER
public static final int TYPE_FIELD_NUMBER
public static final int PRIVATE_KEY_FIELD_NUMBER
public static final int ENCRYPTED_PRIVATE_KEY_FIELD_NUMBER
public static final int PUBLIC_KEY_FIELD_NUMBER
public static final int LABEL_FIELD_NUMBER
public static final int CREATION_TIMESTAMP_FIELD_NUMBER
public static Protos.Key getDefaultInstance()
public Protos.Key getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessage
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public com.google.protobuf.Parser<Protos.Key> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public boolean hasType()
required .wallet.Key.Type type = 1;
hasType
in interface Protos.KeyOrBuilder
public Protos.Key.Type getType()
required .wallet.Key.Type type = 1;
getType
in interface Protos.KeyOrBuilder
public boolean hasPrivateKey()
optional bytes private_key = 2;
The private EC key bytes without any ASN.1 wrapping.
hasPrivateKey
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getPrivateKey()
optional bytes private_key = 2;
The private EC key bytes without any ASN.1 wrapping.
getPrivateKey
in interface Protos.KeyOrBuilder
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.
hasEncryptedPrivateKey
in interface Protos.KeyOrBuilder
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.
getEncryptedPrivateKey
in interface Protos.KeyOrBuilder
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.
getEncryptedPrivateKeyOrBuilder
in interface Protos.KeyOrBuilder
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.
hasPublicKey
in interface Protos.KeyOrBuilder
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.
getPublicKey
in interface Protos.KeyOrBuilder
public boolean hasLabel()
optional string label = 4;
User-provided label associated with the key.
hasLabel
in interface Protos.KeyOrBuilder
public String getLabel()
optional string label = 4;
User-provided label associated with the key.
getLabel
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getLabelBytes()
optional string label = 4;
User-provided label associated with the key.
getLabelBytes
in interface Protos.KeyOrBuilder
public boolean hasCreationTimestamp()
optional int64 creation_timestamp = 5;
Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
hasCreationTimestamp
in interface Protos.KeyOrBuilder
public long getCreationTimestamp()
optional int64 creation_timestamp = 5;
Timestamp stored as millis since epoch. Useful for skipping block bodies before this point.
getCreationTimestamp
in interface Protos.KeyOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.AbstractMessage
IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.AbstractMessage
protected Object writeReplace() throws ObjectStreamException
writeReplace
in class com.google.protobuf.GeneratedMessage
ObjectStreamException
public static Protos.Key parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Key parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Key parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Key parseFrom(InputStream input) throws IOException
IOException
public static Protos.Key parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Key parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Protos.Key parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOException
public static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Protos.Key.Builder newBuilder()
public Protos.Key.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static Protos.Key.Builder newBuilder(Protos.Key prototype)
public Protos.Key.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected Protos.Key.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessage
Copyright © 2014. All rights reserved.