Package org.bitcoinj.protobuf.wallet
Interface Protos.KeyOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
- All Known Implementing Classes:
Protos.Key
,Protos.Key.Builder
- Enclosing class:
- Protos
public static interface Protos.KeyOrBuilder extends com.google.protobuf.MessageLiteOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.Protos.DeterministicKey
getDeterministicKey()
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.EncryptedData
getEncryptedDeterministicSeed()
Encrypted version of the seedjava.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.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.Protos.Key.Type
getType()
required .wallet.Key.Type type = 1;
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 seedboolean
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;
-
-
-
Method Detail
-
hasType
boolean hasType()
required .wallet.Key.Type type = 1;
- Returns:
- Whether the type field is set.
-
getType
Protos.Key.Type getType()
required .wallet.Key.Type type = 1;
- Returns:
- The type.
-
hasSecretBytes
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;
- Returns:
- Whether the secretBytes field is set.
-
getSecretBytes
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;
- Returns:
- The secretBytes.
-
hasEncryptedData
boolean hasEncryptedData()
If the secret data is encrypted, then secret_bytes is missing and this field is set.
optional .wallet.EncryptedData encrypted_data = 6;
- Returns:
- Whether the encryptedData field is set.
-
getEncryptedData
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;
- Returns:
- The encryptedData.
-
hasPublicKey
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;
- Returns:
- Whether the publicKey field is set.
-
getPublicKey
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;
- Returns:
- The publicKey.
-
hasLabel
boolean hasLabel()
User-provided label associated with the key.
optional string label = 4;
- Returns:
- Whether the label field is set.
-
getLabel
java.lang.String getLabel()
User-provided label associated with the key.
optional string label = 4;
- Returns:
- The label.
-
getLabelBytes
com.google.protobuf.ByteString getLabelBytes()
User-provided label associated with the key.
optional string label = 4;
- Returns:
- The bytes for label.
-
hasCreationTimestamp
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;
- Returns:
- Whether the creationTimestamp field is set.
-
getCreationTimestamp
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;
- Returns:
- The creationTimestamp.
-
hasDeterministicKey
boolean hasDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7;
- Returns:
- Whether the deterministicKey field is set.
-
getDeterministicKey
Protos.DeterministicKey getDeterministicKey()
optional .wallet.DeterministicKey deterministic_key = 7;
- Returns:
- The deterministicKey.
-
hasDeterministicSeed
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;
- Returns:
- Whether the deterministicSeed field is set.
-
getDeterministicSeed
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;
- Returns:
- The deterministicSeed.
-
hasEncryptedDeterministicSeed
boolean hasEncryptedDeterministicSeed()
Encrypted version of the seed
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
- Returns:
- Whether the encryptedDeterministicSeed field is set.
-
getEncryptedDeterministicSeed
Protos.EncryptedData getEncryptedDeterministicSeed()
Encrypted version of the seed
optional .wallet.EncryptedData encrypted_deterministic_seed = 9;
- Returns:
- The encryptedDeterministicSeed.
-
getAccountPathList
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];
- Returns:
- A list containing the accountPath.
-
getAccountPathCount
int getAccountPathCount()
The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
repeated uint32 account_path = 10 [packed = true];
- Returns:
- The count of accountPath.
-
getAccountPath
int getAccountPath(int index)
The path to the root. Only applicable to a DETERMINISTIC_MNEMONIC key entry.
repeated uint32 account_path = 10 [packed = true];
- Parameters:
index
- The index of the element to return.- Returns:
- The accountPath at the given index.
-
hasOutputScriptType
boolean hasOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
optional .wallet.Key.OutputScriptType output_script_type = 11;
- Returns:
- Whether the outputScriptType field is set.
-
getOutputScriptType
Protos.Key.OutputScriptType getOutputScriptType()
Type of addresses (aka output scripts) to generate for receiving.
optional .wallet.Key.OutputScriptType output_script_type = 11;
- Returns:
- The outputScriptType.
-
-