public class AccountStateManager extends Object
| Constructor and Description |
|---|
AccountStateManager(AccountBalanceCache cache,
String accountId,
InputSelectionStrategy inputSelector,
AccountState state,
AddressGeneratorService addressService,
AccountOptions options,
AccountStore store) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDepositRequest(int index,
StoredDepositAddress request) |
void |
addPendingTransfer(Hash tailTx,
Trytes[] bundleTrytes,
int... indices) |
void |
addTailHash(Hash tailHash,
Hash newTailTxHash) |
Input |
createRemainder(long remainder)
Creates a remainder input.
|
AccountState |
getAccountState() |
long |
getAvailableBalance()
Returns the total balance of addresses which have their deposit conditions fulfilled
|
Map<Integer,StoredDepositAddress> |
getDepositRequests()
Makes a copy of the current deposit addresses
|
List<Input> |
getInputAddresses(long value)
Calculates the required inputs for the given balance.
|
Address |
getNextAddress() |
Map<String,PendingTransfer> |
getPendingTransfers() |
long |
getTotalBalance() |
boolean |
isNew() |
boolean |
isOwnAddress(String hash) |
Hash |
nextZeroValueAddress() |
int |
readIndex() |
void |
removeDepositRequest(int index) |
void |
removePendingTransfer(Hash tailHash) |
void |
save() |
void |
writeIndex(int index) |
public AccountStateManager(AccountBalanceCache cache, String accountId, InputSelectionStrategy inputSelector, AccountState state, AddressGeneratorService addressService, AccountOptions options, AccountStore store)
public AccountState getAccountState()
public void save()
public Hash nextZeroValueAddress() throws AddressGenerationError
AddressGenerationErrorpublic Address getNextAddress()
public Input createRemainder(long remainder)
remainder - the remainder we have left from the inputspublic List<Input> getInputAddresses(long value) throws AccountError
value - required valueAccountErrorpublic long getTotalBalance()
public long getAvailableBalance()
public boolean isNew()
public int readIndex()
public void writeIndex(int index)
public void addDepositRequest(int index,
StoredDepositAddress request)
public void removeDepositRequest(int index)
public Map<Integer,StoredDepositAddress> getDepositRequests()
public void addPendingTransfer(Hash tailTx, Trytes[] bundleTrytes, int... indices)
public void removePendingTransfer(Hash tailHash)
public Map<String,PendingTransfer> getPendingTransfers()
public boolean isOwnAddress(String hash)
Copyright © 2019. All rights reserved.