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 |
DETERMINISTIC_KEY_FIELD_NUMBER |
static int |
DETERMINISTIC_SEED_FIELD_NUMBER |
static int |
ENCRYPTED_DATA_FIELD_NUMBER |
static int |
ENCRYPTED_DETERMINISTIC_SEED_FIELD_NUMBER |
static int |
LABEL_FIELD_NUMBER |
static com.google.protobuf.Parser<Protos.Key> |
PARSER |
static int |
PUBLIC_KEY_FIELD_NUMBER |
static int |
SECRET_BYTES_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.DeterministicKey |
getDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7; |
Protos.DeterministicKeyOrBuilder |
getDeterministicKeyOrBuilder()
optional .wallet.DeterministicKey deterministic_key = 7; |
com.google.protobuf.ByteString |
getDeterministicSeed()
optional bytes deterministic_seed = 8; |
Protos.EncryptedData |
getEncryptedData()
optional .wallet.EncryptedData encrypted_data = 6; |
Protos.EncryptedDataOrBuilder |
getEncryptedDataOrBuilder()
optional .wallet.EncryptedData encrypted_data = 6; |
Protos.EncryptedData |
getEncryptedDeterministicSeed()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9; |
Protos.EncryptedDataOrBuilder |
getEncryptedDeterministicSeedOrBuilder()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9; |
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 |
getPublicKey()
optional bytes public_key = 3; |
com.google.protobuf.ByteString |
getSecretBytes()
optional bytes secret_bytes = 2; |
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 |
hasDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7; |
boolean |
hasDeterministicSeed()
optional bytes deterministic_seed = 8; |
boolean |
hasEncryptedData()
optional .wallet.EncryptedData encrypted_data = 6; |
boolean |
hasEncryptedDeterministicSeed()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9; |
boolean |
hasLabel()
optional string label = 4; |
boolean |
hasPublicKey()
optional bytes public_key = 3; |
boolean |
hasSecretBytes()
optional bytes secret_bytes = 2; |
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 SECRET_BYTES_FIELD_NUMBER
public static final int ENCRYPTED_DATA_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 final int DETERMINISTIC_KEY_FIELD_NUMBER
public static final int DETERMINISTIC_SEED_FIELD_NUMBER
public static final int ENCRYPTED_DETERMINISTIC_SEED_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 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.
hasSecretBytes
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getSecretBytes()
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.
getSecretBytes
in interface Protos.KeyOrBuilder
public boolean hasEncryptedData()
optional .wallet.EncryptedData encrypted_data = 6;
If the secret data is encrypted, then secret_bytes is missing and this field is set.
hasEncryptedData
in interface Protos.KeyOrBuilder
public 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.
getEncryptedData
in interface Protos.KeyOrBuilder
public Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder()
optional .wallet.EncryptedData encrypted_data = 6;
If the secret data is encrypted, then secret_bytes is missing and this field is set.
getEncryptedDataOrBuilder
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. For DETERMINISTIC_MNEMONIC entries this is missing.
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. For DETERMINISTIC_MNEMONIC entries this is missing.
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. Only reason it's optional is that some very old wallets don't have this data.
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. Only reason it's optional is that some very old wallets don't have this data.
getCreationTimestamp
in interface Protos.KeyOrBuilder
public boolean hasDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7;
hasDeterministicKey
in interface Protos.KeyOrBuilder
public Protos.DeterministicKey getDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7;
getDeterministicKey
in interface Protos.KeyOrBuilder
public Protos.DeterministicKeyOrBuilder getDeterministicKeyOrBuilder()
optional .wallet.DeterministicKey deterministic_key = 7;
getDeterministicKeyOrBuilder
in interface Protos.KeyOrBuilder
public 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.
hasDeterministicSeed
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getDeterministicSeed()
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.
getDeterministicSeed
in interface Protos.KeyOrBuilder
public boolean hasEncryptedDeterministicSeed()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
Encrypted version of the seed
hasEncryptedDeterministicSeed
in interface Protos.KeyOrBuilder
public Protos.EncryptedData getEncryptedDeterministicSeed()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
Encrypted version of the seed
getEncryptedDeterministicSeed
in interface Protos.KeyOrBuilder
public Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder()
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
Encrypted version of the seed
getEncryptedDeterministicSeedOrBuilder
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.