public static final class Protos.Key extends com.google.protobuf.GeneratedMessageV3 implements Protos.KeyOrBuilder
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.Protobuf type
wallet.Key
Modifier and Type | Class and Description |
---|---|
static class |
Protos.Key.Builder
A key used to control Bitcoin spending.
|
static class |
Protos.Key.OutputScriptType
Protobuf enum
wallet.Key.OutputScriptType |
static class |
Protos.Key.Type
Protobuf enum
wallet.Key.Type |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
ACCOUNT_PATH_FIELD_NUMBER |
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 int |
OUTPUT_SCRIPT_TYPE_FIELD_NUMBER |
static com.google.protobuf.Parser<Protos.Key> |
PARSER
Deprecated.
|
static int |
PUBLIC_KEY_FIELD_NUMBER |
static int |
SECRET_BYTES_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getAccountPath(int index)
The path to the root.
|
int |
getAccountPathCount()
The path to the root.
|
java.util.List<java.lang.Integer> |
getAccountPathList()
The path to the root.
|
long |
getCreationTimestamp()
Timestamp stored as millis since epoch.
|
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()
The seed for a deterministic key hierarchy.
|
Protos.EncryptedData |
getEncryptedData()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
|
Protos.EncryptedDataOrBuilder |
getEncryptedDataOrBuilder()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
|
Protos.EncryptedData |
getEncryptedDeterministicSeed()
Encrypted version of the seed
|
Protos.EncryptedDataOrBuilder |
getEncryptedDeterministicSeedOrBuilder()
Encrypted version of the seed
|
java.lang.String |
getLabel()
User-provided label associated with the key.
|
com.google.protobuf.ByteString |
getLabelBytes()
User-provided label associated with the key.
|
Protos.Key.OutputScriptType |
getOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
|
com.google.protobuf.Parser<Protos.Key> |
getParserForType() |
com.google.protobuf.ByteString |
getPublicKey()
The public EC key derived from the private key.
|
com.google.protobuf.ByteString |
getSecretBytes()
Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed.
|
int |
getSerializedSize() |
Protos.Key.Type |
getType()
required .wallet.Key.Type type = 1; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasCreationTimestamp()
Timestamp stored as millis since epoch.
|
boolean |
hasDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7; |
boolean |
hasDeterministicSeed()
The seed for a deterministic key hierarchy.
|
boolean |
hasEncryptedData()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
|
boolean |
hasEncryptedDeterministicSeed()
Encrypted version of the seed
|
int |
hashCode() |
boolean |
hasLabel()
User-provided label associated with the key.
|
boolean |
hasOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
|
boolean |
hasPublicKey()
The public EC key derived from the private key.
|
boolean |
hasSecretBytes()
Either the private EC key bytes (without any ASN.1 wrapping), or the deterministic root seed.
|
boolean |
hasType()
required .wallet.Key.Type type = 1; |
protected com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.BuilderParent parent) |
protected java.lang.Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Protos.Key |
parseDelimitedFrom(java.io.InputStream input) |
static Protos.Key |
parseDelimitedFrom(java.io.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(java.nio.ByteBuffer data) |
static Protos.Key |
parseFrom(java.nio.ByteBuffer 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(java.io.InputStream input) |
static Protos.Key |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Protos.Key> |
parser() |
Protos.Key.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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 final int ACCOUNT_PATH_FIELD_NUMBER
public static final int OUTPUT_SCRIPT_TYPE_FIELD_NUMBER
@Deprecated public static final com.google.protobuf.Parser<Protos.Key> PARSER
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class com.google.protobuf.GeneratedMessageV3
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessageV3
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3
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()
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.
optional bytes secret_bytes = 2;
hasSecretBytes
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getSecretBytes()
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.
optional bytes secret_bytes = 2;
getSecretBytes
in interface Protos.KeyOrBuilder
public boolean hasEncryptedData()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
optional .wallet.EncryptedData encrypted_data = 6;
hasEncryptedData
in interface Protos.KeyOrBuilder
public Protos.EncryptedData getEncryptedData()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
optional .wallet.EncryptedData encrypted_data = 6;
getEncryptedData
in interface Protos.KeyOrBuilder
public Protos.EncryptedDataOrBuilder getEncryptedDataOrBuilder()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
optional .wallet.EncryptedData encrypted_data = 6;
getEncryptedDataOrBuilder
in interface Protos.KeyOrBuilder
public boolean hasPublicKey()
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.
optional bytes public_key = 3;
hasPublicKey
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getPublicKey()
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.
optional bytes public_key = 3;
getPublicKey
in interface Protos.KeyOrBuilder
public boolean hasLabel()
User-provided label associated with the key.
optional string label = 4;
hasLabel
in interface Protos.KeyOrBuilder
public java.lang.String getLabel()
User-provided label associated with the key.
optional string label = 4;
getLabel
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getLabelBytes()
User-provided label associated with the key.
optional string label = 4;
getLabelBytes
in interface Protos.KeyOrBuilder
public boolean hasCreationTimestamp()
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.
optional int64 creation_timestamp = 5;
hasCreationTimestamp
in interface Protos.KeyOrBuilder
public long getCreationTimestamp()
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.
optional int64 creation_timestamp = 5;
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()
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.
optional bytes deterministic_seed = 8;
hasDeterministicSeed
in interface Protos.KeyOrBuilder
public com.google.protobuf.ByteString getDeterministicSeed()
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.
optional bytes deterministic_seed = 8;
getDeterministicSeed
in interface Protos.KeyOrBuilder
public boolean hasEncryptedDeterministicSeed()
Encrypted version of the seed
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
hasEncryptedDeterministicSeed
in interface Protos.KeyOrBuilder
public Protos.EncryptedData getEncryptedDeterministicSeed()
Encrypted version of the seed
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
getEncryptedDeterministicSeed
in interface Protos.KeyOrBuilder
public Protos.EncryptedDataOrBuilder getEncryptedDeterministicSeedOrBuilder()
Encrypted version of the seed
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
getEncryptedDeterministicSeedOrBuilder
in interface Protos.KeyOrBuilder
public java.util.List<java.lang.Integer> getAccountPathList()
The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
repeated uint32 account_path = 10 [packed = true];
getAccountPathList
in interface Protos.KeyOrBuilder
public int getAccountPathCount()
The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
repeated uint32 account_path = 10 [packed = true];
getAccountPathCount
in interface Protos.KeyOrBuilder
public int getAccountPath(int index)
The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
repeated uint32 account_path = 10 [packed = true];
getAccountPath
in interface Protos.KeyOrBuilder
public boolean hasOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
optional .wallet.Key.OutputScriptType output_script_type = 11;
hasOutputScriptType
in interface Protos.KeyOrBuilder
public Protos.Key.OutputScriptType getOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
optional .wallet.Key.OutputScriptType output_script_type = 11;
getOutputScriptType
in interface Protos.KeyOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static Protos.Key parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static Protos.Key parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
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(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Protos.Key parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Protos.Key parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Protos.Key parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Protos.Key parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
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()
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.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessageV3
public static Protos.Key getDefaultInstance()
public static com.google.protobuf.Parser<Protos.Key> parser()
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.GeneratedMessageV3
public Protos.Key getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder