Package | Description |
---|---|
org.bitcoinj.crypto |
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys),
BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general
cryptography tasks.
|
org.bitcoinj.wallet |
Classes that support the
Wallet , which knows how to find and save transactions relevant to
a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended
in various ways, please refer to the website for documentation on how to use it. |
Modifier and Type | Method and Description |
---|---|
static DeterministicKey |
HDKeyDerivation.createMasterPrivateKey(byte[] seed)
Generates a new deterministic key from the given seed, which can be any arbitrary byte array.
|
static DeterministicKey |
HDKeyDerivation.createMasterPrivKeyFromBytes(byte[] privKeyBytes,
byte[] chainCode) |
static DeterministicKey |
HDKeyDerivation.createMasterPubKeyFromBytes(byte[] pubKeyBytes,
byte[] chainCode) |
DeterministicKey |
DeterministicKey.decrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey) |
DeterministicKey |
DeterministicKey.decrypt(org.spongycastle.crypto.params.KeyParameter aesKey) |
DeterministicKey |
DeterministicKey.derive(int child)
Derives a child at the given index using hardened derivation.
|
DeterministicKey |
DeterministicHierarchy.deriveChild(List<ChildNumber> parentPath,
boolean relative,
boolean createParent,
ChildNumber createChildNumber)
Extends the tree by calculating the requested child for the given path.
|
static DeterministicKey |
HDKeyDerivation.deriveChildKey(DeterministicKey parent,
ChildNumber childNumber) |
static DeterministicKey |
HDKeyDerivation.deriveChildKey(DeterministicKey parent,
int childNumber)
Derives a key given the "extended" child number, ie.
|
DeterministicKey |
DeterministicHierarchy.deriveNextChild(ImmutableList<ChildNumber> parentPath,
boolean relative,
boolean createParent,
boolean privateDerivation)
Extends the tree by calculating the next key that hangs off the given parent path.
|
static DeterministicKey |
HDKeyDerivation.deriveThisOrNextChildKey(DeterministicKey parent,
int childNumber)
Derives a key of the "extended" child number, ie.
|
static DeterministicKey |
DeterministicKey.deserialize(NetworkParameters params,
byte[] serializedKey)
Deserialize an HD Key with no parent
|
static DeterministicKey |
DeterministicKey.deserialize(NetworkParameters params,
byte[] serializedKey,
DeterministicKey parent)
Deserialize an HD Key.
|
static DeterministicKey |
DeterministicKey.deserializeB58(DeterministicKey parent,
String base58,
NetworkParameters params)
Deserialize a base-58-encoded HD Key.
|
static DeterministicKey |
DeterministicKey.deserializeB58(String base58,
NetworkParameters params)
Deserialize a base-58-encoded HD Key with no parent
|
DeterministicKey |
DeterministicKey.dropParent()
Returns the same key with the parent pointer removed (it still knows its own path and the parent fingerprint).
|
DeterministicKey |
DeterministicKey.dropPrivateBytes()
Returns the same key with the private bytes removed.
|
DeterministicKey |
DeterministicKey.encrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey) |
DeterministicKey |
DeterministicKey.encrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey,
DeterministicKey newParent) |
DeterministicKey |
DeterministicHierarchy.get(List<ChildNumber> path,
boolean relativePath,
boolean create)
Returns a key for the given path, optionally creating it.
|
DeterministicKey |
DeterministicKey.getParent() |
DeterministicKey |
DeterministicHierarchy.getRootKey()
Returns the root key that the
DeterministicHierarchy was created with. |
Modifier and Type | Method and Description |
---|---|
static DeterministicKey |
HDKeyDerivation.deriveChildKey(DeterministicKey parent,
ChildNumber childNumber) |
static DeterministicKey |
HDKeyDerivation.deriveChildKey(DeterministicKey parent,
int childNumber)
Derives a key given the "extended" child number, ie.
|
static HDKeyDerivation.RawKeyBytes |
HDKeyDerivation.deriveChildKeyBytesFromPrivate(DeterministicKey parent,
ChildNumber childNumber) |
static HDKeyDerivation.RawKeyBytes |
HDKeyDerivation.deriveChildKeyBytesFromPublic(DeterministicKey parent,
ChildNumber childNumber,
HDKeyDerivation.PublicDeriveMode mode) |
static DeterministicKey |
HDKeyDerivation.deriveThisOrNextChildKey(DeterministicKey parent,
int childNumber)
Derives a key of the "extended" child number, ie.
|
static DeterministicKey |
DeterministicKey.deserialize(NetworkParameters params,
byte[] serializedKey,
DeterministicKey parent)
Deserialize an HD Key.
|
static DeterministicKey |
DeterministicKey.deserializeB58(DeterministicKey parent,
String base58,
NetworkParameters params)
Deserialize a base-58-encoded HD Key.
|
DeterministicKey |
DeterministicKey.encrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey,
DeterministicKey newParent) |
void |
DeterministicHierarchy.putKey(DeterministicKey key)
Inserts a key into the heirarchy.
|
Constructor and Description |
---|
DeterministicHierarchy(DeterministicKey rootKey)
Constructs a new hierarchy rooted at the given key.
|
DeterministicKey(DeterministicKey keyToClone,
DeterministicKey newParent)
Clones the key
|
DeterministicKey(ImmutableList<ChildNumber> childNumberPath,
byte[] chainCode,
BigInteger priv,
DeterministicKey parent)
Constructs a key from its components.
|
DeterministicKey(ImmutableList<ChildNumber> childNumberPath,
byte[] chainCode,
org.spongycastle.math.ec.ECPoint publicAsPoint,
BigInteger priv,
DeterministicKey parent) |
DeterministicKey(ImmutableList<ChildNumber> childNumberPath,
byte[] chainCode,
KeyCrypter crypter,
LazyECPoint pub,
EncryptedData priv,
DeterministicKey parent)
Constructs a key from its components.
|
DeterministicKey(ImmutableList<ChildNumber> childNumberPath,
byte[] chainCode,
LazyECPoint publicAsPoint,
BigInteger priv,
DeterministicKey parent)
Constructs a key from its components.
|
Modifier and Type | Field and Description |
---|---|
protected DeterministicKey |
DeterministicKeyChain.Builder.watchingKey |
Modifier and Type | Method and Description |
---|---|
DeterministicKey |
KeyChainGroup.currentKey(KeyChain.KeyPurpose purpose)
Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet
user interface as "a convenient key to receive funds on" when the purpose parameter is
KeyChain.KeyPurpose.RECEIVE_FUNDS . |
DeterministicKey |
Wallet.currentKey(KeyChain.KeyPurpose purpose)
Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet
user interface as "a convenient key to receive funds on" when the purpose parameter is
KeyChain.KeyPurpose.RECEIVE_FUNDS . |
DeterministicKey |
Wallet.currentReceiveKey()
An alias for calling
Wallet.currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose) with
KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter. |
DeterministicKey |
DeterministicKeyChain.findKeyFromPubHash(byte[] pubkeyHash) |
DeterministicKey |
DeterministicKeyChain.findKeyFromPubKey(byte[] pubkey) |
DeterministicKey |
KeyChainGroup.freshKey(KeyChain.KeyPurpose purpose)
Returns a key that has not been returned by this method before (fresh).
|
DeterministicKey |
Wallet.freshKey(KeyChain.KeyPurpose purpose)
Returns a key that has not been returned by this method before (fresh).
|
DeterministicKey |
Wallet.freshReceiveKey()
An alias for calling
Wallet.freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose) with
KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter. |
DeterministicKey |
DeterministicKeyChain.getKey(KeyChain.KeyPurpose purpose)
Returns a freshly derived key that has not been returned by this method before.
|
protected DeterministicKey |
DeterministicKeyChain.getKeyByPath(ChildNumber... path)
Returns the deterministic key for the given absolute path in the hierarchy.
|
DeterministicKey |
Wallet.getKeyByPath(List<ChildNumber> path)
Returns a key for the given HD path, assuming it's already been derived.
|
protected DeterministicKey |
DeterministicKeyChain.getKeyByPath(List<ChildNumber> path)
Returns the deterministic key for the given absolute path in the hierarchy.
|
DeterministicKey |
DeterministicKeyChain.getKeyByPath(List<ChildNumber> path,
boolean create)
Returns the deterministic key for the given absolute path in the hierarchy, optionally creating it
|
DeterministicKey |
Wallet.getWatchingKey()
Returns a public-only DeterministicKey that can be used to set up a watching wallet: that is, a wallet that
can import transactions from the block chain just as the normal wallet can, but which cannot spend.
|
DeterministicKey |
DeterministicKeyChain.getWatchingKey()
An alias for
getKeyByPath(getAccountPath()) . |
DeterministicKey |
DeterministicKeyChain.markKeyAsUsed(DeterministicKey k)
Mark the DeterministicKey as used.
|
DeterministicKey |
DeterministicKeyChain.markPubHashAsUsed(byte[] pubkeyHash)
Mark the DeterministicKeys as used, if they match the pubkeyHash
See
DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this. |
DeterministicKey |
DeterministicKeyChain.markPubKeyAsUsed(byte[] pubkey)
Mark the DeterministicKeys as used, if they match the pubkey
See
DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this. |
Modifier and Type | Method and Description |
---|---|
List<DeterministicKey> |
KeyChainGroup.freshKeys(KeyChain.KeyPurpose purpose,
int numberOfKeys)
Returns a key/s that have not been returned by this method before (fresh).
|
List<DeterministicKey> |
Wallet.freshKeys(KeyChain.KeyPurpose purpose,
int numberOfKeys)
Returns a key/s that has not been returned by this method before (fresh).
|
List<DeterministicKey> |
DeterministicKeyChain.getKeys(KeyChain.KeyPurpose purpose,
int numberOfKeys)
Returns freshly derived key/s that have not been returned by this method before.
|
List<DeterministicKey> |
DeterministicKeyChain.getLeafKeys()
Returns leaf keys issued by this chain (including lookahead zone)
|
Modifier and Type | Method and Description |
---|---|
T |
MarriedKeyChain.Builder.followingKeys(DeterministicKey followingKey,
DeterministicKey... followingKeys) |
T |
MarriedKeyChain.Builder.followingKeys(DeterministicKey followingKey,
DeterministicKey... followingKeys) |
static Wallet |
Wallet.fromWatchingKey(NetworkParameters params,
DeterministicKey watchKey)
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key.
|
RedeemData |
MarriedKeyChain.getRedeemData(DeterministicKey followedKey)
Get the redeem data for a key in this married chain
|
RedeemData |
DeterministicKeyChain.getRedeemData(DeterministicKey followedKey)
Get redeem data for a key.
|
DeterministicKeyChain |
DefaultKeyChainFactory.makeWatchingKeyChain(Protos.Key key,
Protos.Key firstSubKey,
DeterministicKey accountKey,
boolean isFollowingKey,
boolean isMarried) |
DeterministicKeyChain |
KeyChainFactory.makeWatchingKeyChain(Protos.Key key,
Protos.Key firstSubKey,
DeterministicKey accountKey,
boolean isFollowingKey,
boolean isMarried)
Make a watching keychain.
|
DeterministicKey |
DeterministicKeyChain.markKeyAsUsed(DeterministicKey k)
Mark the DeterministicKey as used.
|
static DeterministicKeyChain |
DeterministicKeyChain.watch(DeterministicKey accountKey)
Creates a key chain that watches the given account key.
|
static DeterministicKeyChain |
DeterministicKeyChain.watchAndFollow(DeterministicKey watchKey)
Creates a deterministic key chain with the given watch key and that follows some other keychain.
|
T |
DeterministicKeyChain.Builder.watchingKey(DeterministicKey watchingKey) |
Modifier and Type | Method and Description |
---|---|
T |
MarriedKeyChain.Builder.followingKeys(List<DeterministicKey> followingKeys) |
Constructor and Description |
---|
DeterministicKeyChain(DeterministicKey watchingKey)
Creates a deterministic key chain that watches the given (public only) root key.
|
DeterministicKeyChain(DeterministicKey watchKey,
boolean isFollowing)
Creates a deterministic key chain with the given watch key.
|
KeyChainGroup(NetworkParameters params,
DeterministicKey watchKey)
Creates a keychain group with no basic chain, and an HD chain that is watching the given watching key.
|
Copyright © 2016. All rights reserved.