public interface Wallet
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Wallet.Address |
| Modifier and Type | Field and Description |
|---|---|
static BigDecimal |
ALL_FUNDS |
static String |
LABEL_CHANGE |
static String |
LABEL_DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
Wallet.Address |
addAddress(String key,
List<String> labels)
Add a watch only address to this wallet
|
Wallet.Address |
addPrivateKey(String privKey,
List<String> labels) |
Wallet.Address |
findAddress(String rawAddr)
Find the address for a given raw address
|
Wallet.Address |
getAddress(String label)
Get the default address for a given label
|
List<Wallet.Address> |
getAddresses()
Get all addresses.
|
List<Wallet.Address> |
getAddresses(String label)
Get addresses for a given label.
|
BigDecimal |
getBalance(String label)
Get the balance for a given label
|
BigDecimal |
getBalance(Wallet.Address addr)
Get the balance for a given address
|
Wallet.Address |
getChangeAddress(String label)
Get the default change address for a given label
|
List<Wallet.Address> |
getChangeAddresses(String label)
Get change addresses for a given label
|
List<String> |
getLabels()
List available label
|
Tx |
getTransaction(String txId)
Get the transaction for the given Id
|
List<UTXO> |
listUnspent(List<Wallet.Address> addrs)
List UTOXs associated with a list of addresses
|
List<UTXO> |
listUnspent(String label)
Get all unspent transaction outputs associated with the given label
|
Wallet.Address |
newAddress(List<String> labels)
Generate new address for this wallet
|
List<UTXO> |
selectUnspent(List<Wallet.Address> addrs,
BigDecimal amount)
Select a list of unspent transaction outputs that satisfy the requested amount
|
List<UTXO> |
selectUnspent(String label,
BigDecimal amount)
Select a list of unspent transaction outputs that satisfy the requested amount
|
String |
sendFromLabel(String label,
String toAddress,
BigDecimal amount)
Sends funds that are associated with a given label to an address
|
String |
sendToAddress(String toAddress,
BigDecimal amount)
Sends funds from the default account to an address
|
String |
sendTx(Tx tx)
Send a raw transaction to the network
|
static final String LABEL_DEFAULT
static final String LABEL_CHANGE
static final BigDecimal ALL_FUNDS
Wallet.Address addPrivateKey(String privKey, List<String> labels)
Wallet.Address addAddress(String key, List<String> labels)
Wallet.Address newAddress(List<String> labels)
List<Wallet.Address> getAddresses()
Wallet.Address getAddress(String label)
Wallet.Address findAddress(String rawAddr)
List<Wallet.Address> getAddresses(String label)
Wallet.Address getChangeAddress(String label)
List<Wallet.Address> getChangeAddresses(String label)
BigDecimal getBalance(String label)
BigDecimal getBalance(Wallet.Address addr)
String sendToAddress(String toAddress, BigDecimal amount)
String sendFromLabel(String label, String toAddress, BigDecimal amount)
List<UTXO> selectUnspent(String label, BigDecimal amount)
List<UTXO> selectUnspent(List<Wallet.Address> addrs, BigDecimal amount)
List<UTXO> listUnspent(String label)
List<UTXO> listUnspent(List<Wallet.Address> addrs)
Copyright © 2018. All rights reserved.