Package | Description |
---|---|
com.google.bitcoin.core | |
com.google.bitcoin.crypto | |
com.google.bitcoin.jni | |
com.google.bitcoin.protocols.channels | |
com.google.bitcoin.script | |
com.google.bitcoin.utils |
Modifier and Type | Method and Description |
---|---|
ECKey |
Wallet.addNewEncryptedKey(CharSequence password)
Convenience wrapper around
Wallet.addNewEncryptedKey(com.google.bitcoin.crypto.KeyCrypter,
org.spongycastle.crypto.params.KeyParameter) which just derives the key afresh and uses the pre-set
keycrypter. |
ECKey |
Wallet.addNewEncryptedKey(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey)
Create a new, random encrypted ECKey and add it to the wallet.
|
ECKey |
ECKey.decrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey)
Create a decrypted private key with the keyCrypter and AES key supplied.
|
ECKey |
ECKey.encrypt(KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey)
Create an encrypted private key with the keyCrypter and the AES key supplied.
|
ECKey |
Wallet.findKeyFromPubHash(byte[] pubkeyHash)
Locates a keypair from the keychain given the hash of the public key.
|
ECKey |
Wallet.findKeyFromPubKey(byte[] pubkey)
Locates a keypair from the keychain given the raw public key bytes.
|
static ECKey |
ECKey.fromASN1(byte[] asn1privkey)
Construct an ECKey from an ASN.1 encoded private key.
|
ECKey |
TransactionOutPoint.getConnectedKey(Wallet wallet)
Returns the ECKey identified in the connected output, for either pay-to-address scripts or pay-to-key scripts.
|
ECKey |
DumpedPrivateKey.getKey()
Returns an ECKey created from this encoded private key.
|
static ECKey |
ECKey.recoverFromSignature(int recId,
ECKey.ECDSASignature sig,
Sha256Hash message,
boolean compressed)
Given the components of a signature and a selector value, recover and return the public key
that generated the signature according to the algorithm in SEC1v2 section 4.1.6.
|
static ECKey |
ECKey.signedMessageToKey(String message,
String signatureBase64)
Given an arbitrary piece of text and a Bitcoin-format message signature encoded in base64, returns an ECKey
containing the public key that was used to sign it.
|
Modifier and Type | Method and Description |
---|---|
List<ECKey> |
Wallet.getKeys()
Returns a snapshot of the keychain.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Wallet.addKey(ECKey key)
Adds the given ECKey to the wallet.
|
TransactionOutput |
Transaction.addOutput(BigInteger value,
ECKey pubkey)
Creates an output that pays to the given pubkey directly (no address) with the given value, adds it to this
transaction, and returns the new output.
|
TransactionInput |
Transaction.addSignedInput(TransactionOutPoint prevOut,
Script scriptPubKey,
ECKey sigKey)
Same as
Transaction.addSignedInput(TransactionOutPoint, com.google.bitcoin.script.Script, ECKey, com.google.bitcoin.core.Transaction.SigHash, boolean)
but defaults to Transaction.SigHash.ALL and "false" for the anyoneCanPay flag. |
TransactionInput |
Transaction.addSignedInput(TransactionOutPoint prevOut,
Script scriptPubKey,
ECKey sigKey,
Transaction.SigHash sigHash,
boolean anyoneCanPay)
Adds a new and fully signed input for the given parameters.
|
TransactionSignature |
Transaction.calculateSignature(int inputIndex,
ECKey key,
org.spongycastle.crypto.params.KeyParameter aesKey,
byte[] connectedPubKeyScript,
Transaction.SigHash hashType,
boolean anyoneCanPay)
Calculates a signature that is valid for being inserted into the input at the given position.
|
TransactionSignature |
Transaction.calculateSignature(int inputIndex,
ECKey key,
Script connectedPubKeyScript,
Transaction.SigHash hashType,
boolean anyoneCanPay)
Calculates a signature that is valid for being inserted into the input at the given position.
|
static boolean |
ECKey.encryptionIsReversible(ECKey originalKey,
ECKey encryptedKey,
KeyCrypter keyCrypter,
org.spongycastle.crypto.params.KeyParameter aesKey)
Check that it is possible to decrypt the key with the keyCrypter and that the original key is returned.
|
boolean |
Wallet.hasKey(ECKey key)
Returns true if the given key is in the wallet, false otherwise.
|
boolean |
Wallet.isKeyRotating(ECKey key)
Returns whether the keys creation time is before the key rotation time, if one was set.
|
boolean |
Wallet.removeKey(ECKey key)
Removes the given key from the keychain.
|
static Wallet.SendRequest |
Wallet.SendRequest.to(NetworkParameters params,
ECKey destination,
BigInteger value)
Creates a new SendRequest to the given pubkey for the given value.
|
Modifier and Type | Method and Description |
---|---|
int |
Wallet.addKeys(List<ECKey> keys)
Adds the given keys to the wallet.
|
void |
WalletEventListener.onKeysAdded(Wallet wallet,
List<ECKey> keys)
Called whenever a new key is added to the wallet, whether that be via
Wallet.addKeys(java.util.List)
or due to some other automatic derivation. |
void |
AbstractWalletEventListener.onKeysAdded(Wallet wallet,
List<ECKey> keys) |
Constructor and Description |
---|
TransactionOutput(NetworkParameters params,
Transaction parent,
BigInteger value,
ECKey to)
Creates an output that sends 'value' to the given public key using a simple CHECKSIG script (no addresses).
|
Modifier and Type | Method and Description |
---|---|
ECKey |
DeterministicKey.toECKey() |
Modifier and Type | Method and Description |
---|---|
void |
NativeWalletEventListener.onKeysAdded(Wallet wallet,
List<ECKey> keys) |
Constructor and Description |
---|
PaymentChannelClient(Wallet wallet,
ECKey myKey,
BigInteger maxValue,
Sha256Hash serverId,
IPaymentChannelClient.ClientConnection conn)
Constructs a new channel manager which waits for
PaymentChannelClient.connectionOpen() before acting. |
PaymentChannelClientConnection(InetSocketAddress server,
int timeoutSeconds,
Wallet wallet,
ECKey myKey,
BigInteger maxValue,
String serverId)
Attempts to open a new connection to and open a payment channel with the given host and port, blocking until the
connection is open
|
PaymentChannelClientState(Wallet wallet,
ECKey myKey,
ECKey serverMultisigKey,
BigInteger value,
long expiryTimeInSeconds)
Creates a state object for a payment channel client.
|
PaymentChannelServerState(TransactionBroadcaster broadcaster,
Wallet wallet,
ECKey serverKey,
long minExpireTime)
Creates a new state object to track the server side of a payment channel.
|
Modifier and Type | Method and Description |
---|---|
static Script |
ScriptBuilder.createInputScript(TransactionSignature signature,
ECKey pubKey)
Creates a scriptSig that can redeem a pay-to-address output.
|
static Script |
ScriptBuilder.createOutputScript(ECKey key)
Creates a scriptPubKey that encodes payment to the given raw public key.
|
Modifier and Type | Method and Description |
---|---|
static Script |
ScriptBuilder.createMultiSigOutputScript(int threshold,
List<ECKey> pubkeys)
Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
|
static byte[] |
Script.createMultiSigOutputScript(int threshold,
List<ECKey> pubkeys)
Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
|
Modifier and Type | Field and Description |
---|---|
protected ECKey |
TestWithWallet.myKey |
Modifier and Type | Method and Description |
---|---|
static Transaction |
TestUtils.createFakeTx(NetworkParameters params,
BigInteger nanocoins,
ECKey to) |
protected Transaction |
TestWithWallet.sendMoneyToWallet(Wallet wallet,
BigInteger value,
ECKey toPubKey,
AbstractBlockChain.NewBlockType type) |
Copyright © 2014. All rights reserved.