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, parseUnknownFieldequals, findInitializationErrors, getInitializationErrorString, hashBoolean, hashCode, hashEnum, hashEnumList, hashFields, hashLong, toStringtoByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic 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.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessagepublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic com.google.protobuf.Parser<Protos.Key> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic boolean hasType()
required .wallet.Key.Type type = 1;hasType in interface Protos.KeyOrBuilderpublic Protos.Key.Type getType()
required .wallet.Key.Type type = 1;getType in interface Protos.KeyOrBuilderpublic boolean hasPrivateKey()
optional bytes private_key = 2;
The private EC key bytes without any ASN.1 wrapping.
hasPrivateKey in interface Protos.KeyOrBuilderpublic com.google.protobuf.ByteString getPrivateKey()
optional bytes private_key = 2;
The private EC key bytes without any ASN.1 wrapping.
getPrivateKey in interface Protos.KeyOrBuilderpublic 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.KeyOrBuilderpublic 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.KeyOrBuilderpublic 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.KeyOrBuilderpublic 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.KeyOrBuilderpublic 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.KeyOrBuilderpublic boolean hasLabel()
optional string label = 4;
User-provided label associated with the key.
hasLabel in interface Protos.KeyOrBuilderpublic String getLabel()
optional string label = 4;
User-provided label associated with the key.
getLabel in interface Protos.KeyOrBuilderpublic com.google.protobuf.ByteString getLabelBytes()
optional string label = 4;
User-provided label associated with the key.
getLabelBytes in interface Protos.KeyOrBuilderpublic 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.KeyOrBuilderpublic 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.KeyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.AbstractMessageIOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.AbstractMessageprotected Object writeReplace() throws ObjectStreamException
writeReplace in class com.google.protobuf.GeneratedMessageObjectStreamExceptionpublic static Protos.Key parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Key parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Key parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Key parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Protos.Key parseFrom(InputStream input) throws IOException
IOExceptionpublic static Protos.Key parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Protos.Key parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Protos.Key parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Protos.Key.Builder newBuilder()
public Protos.Key.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Protos.Key.Builder newBuilder(Protos.Key prototype)
public Protos.Key.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Protos.Key.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageCopyright © 2014. All rights reserved.