Package nxt
Class Account
- java.lang.Object
-
- nxt.Account
-
public final class Account extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccount.AccountAssetstatic classAccount.AccountCurrencystatic classAccount.AccountInfostatic classAccount.AccountLeasestatic classAccount.AccountPropertystatic classAccount.ControlTypestatic classAccount.Eventstatic classAccount.PublicKey
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaddAssetListener(Listener<Account.AccountAsset> listener, Account.Event eventType)static booleanaddCurrencyListener(Listener<Account.AccountCurrency> listener, Account.Event eventType)static booleanaddLeaseListener(Listener<Account.AccountLease> listener, Account.Event eventType)static booleanaddListener(Listener<Account> listener, Account.Event eventType)static booleanaddPropertyListener(Listener<Account.AccountProperty> listener, Account.Event eventType)static byte[]decryptFrom(byte[] publicKey, EncryptedData encryptedData, java.lang.String recipientSecretPhrase, boolean uncompress)byte[]decryptFrom(EncryptedData encryptedData, java.lang.String recipientSecretPhrase, boolean uncompress)static EncryptedDataencryptTo(byte[] publicKey, byte[] data, java.lang.String senderSecretPhrase, boolean compress)EncryptedDataencryptTo(byte[] data, java.lang.String senderSecretPhrase, boolean compress)static AccountgetAccount(byte[] publicKey)static AccountgetAccount(long id)static AccountgetAccount(long id, int height)static Account.AccountAssetgetAccountAsset(long accountId, long assetId)static Account.AccountAssetgetAccountAsset(long accountId, long assetId, int height)static intgetAccountAssetCount(long accountId)static intgetAccountAssetCount(long accountId, int height)static DbIterator<Account.AccountAsset>getAccountAssets(long accountId, int from, int to)static DbIterator<Account.AccountAsset>getAccountAssets(long accountId, int height, int from, int to)static DbIterator<Account.AccountCurrency>getAccountCurrencies(long accountId, int from, int to)static DbIterator<Account.AccountCurrency>getAccountCurrencies(long accountId, int height, int from, int to)static Account.AccountCurrencygetAccountCurrency(long accountId, long currencyId)static Account.AccountCurrencygetAccountCurrency(long accountId, long currencyId, int height)static intgetAccountCurrencyCount(long accountId)static intgetAccountCurrencyCount(long accountId, int height)Account.AccountInfogetAccountInfo()Account.AccountLeasegetAccountLease()static intgetAccountLeaseCount()static intgetActiveLeaseCount()Account.AccountAssetgetAsset(long assetId)Account.AccountAssetgetAsset(long assetId, int height)static intgetAssetAccountCount(long assetId)static intgetAssetAccountCount(long assetId, int height)static DbIterator<Account.AccountAsset>getAssetAccounts(long assetId, int from, int to)static DbIterator<Account.AccountAsset>getAssetAccounts(long assetId, int height, int from, int to)longgetAssetBalanceQNT(long assetId)longgetAssetBalanceQNT(long assetId, int height)static longgetAssetBalanceQNT(long accountId, long assetId)static longgetAssetBalanceQNT(long accountId, long assetId, int height)DbIterator<Account.AccountAsset>getAssets(int from, int to)DbIterator<Account.AccountAsset>getAssets(int height, int from, int to)DbIterator<AssetTransfer>getAssetTransfers(int from, int to)longgetBalanceNQT()java.util.Set<Account.ControlType>getControls()static intgetCount()DbIterator<Account.AccountCurrency>getCurrencies(int from, int to)DbIterator<Account.AccountCurrency>getCurrencies(int height, int from, int to)Account.AccountCurrencygetCurrency(long currencyId)Account.AccountCurrencygetCurrency(long currencyId, int height)static intgetCurrencyAccountCount(long currencyId)static intgetCurrencyAccountCount(long currencyId, int height)static DbIterator<Account.AccountCurrency>getCurrencyAccounts(long currencyId, int from, int to)static DbIterator<Account.AccountCurrency>getCurrencyAccounts(long currencyId, int height, int from, int to)DbIterator<CurrencyTransfer>getCurrencyTransfers(int from, int to)longgetCurrencyUnits(long currencyId)longgetCurrencyUnits(long currencyId, int height)static longgetCurrencyUnits(long accountId, long currencyId)static longgetCurrencyUnits(long accountId, long currencyId, int height)longgetEffectiveBalanceNXT()longgetEffectiveBalanceNXT(int height)DbIterator<Exchange>getExchanges(int from, int to)longgetForgedBalanceNQT()longgetGuaranteedBalanceNQT()longgetGuaranteedBalanceNQT(int numberOfConfirmations, int currentHeight)longgetId()static longgetId(byte[] publicKey)DbIterator<Account>getLessors()DbIterator<Account>getLessors(int height)static DbIterator<Account.AccountProperty>getProperties(long recipientId, long setterId, java.lang.String property, int from, int to)static Account.AccountPropertygetProperty(long propertyId)static Account.AccountPropertygetProperty(long recipientId, java.lang.String property)static Account.AccountPropertygetProperty(long recipientId, java.lang.String property, long setterId)static byte[]getPublicKey(long id)DbIterator<Trade>getTrades(int from, int to)longgetUnconfirmedAssetBalanceQNT(long assetId)static longgetUnconfirmedAssetBalanceQNT(long accountId, long assetId)longgetUnconfirmedBalanceNQT()longgetUnconfirmedCurrencyUnits(long currencyId)static longgetUnconfirmedCurrencyUnits(long accountId, long currencyId)static booleanremoveAssetListener(Listener<Account.AccountAsset> listener, Account.Event eventType)static booleanremoveCurrencyListener(Listener<Account.AccountCurrency> listener, Account.Event eventType)static booleanremoveLeaseListener(Listener<Account.AccountLease> listener, Account.Event eventType)static booleanremoveListener(Listener<Account> listener, Account.Event eventType)static booleanremovePropertyListener(Listener<Account.AccountProperty> listener, Account.Event eventType)static DbIterator<Account.AccountInfo>searchAccounts(java.lang.String query, int from, int to)java.lang.StringtoString()
-
-
-
Method Detail
-
addListener
public static boolean addListener(Listener<Account> listener, Account.Event eventType)
-
removeListener
public static boolean removeListener(Listener<Account> listener, Account.Event eventType)
-
addAssetListener
public static boolean addAssetListener(Listener<Account.AccountAsset> listener, Account.Event eventType)
-
removeAssetListener
public static boolean removeAssetListener(Listener<Account.AccountAsset> listener, Account.Event eventType)
-
addCurrencyListener
public static boolean addCurrencyListener(Listener<Account.AccountCurrency> listener, Account.Event eventType)
-
removeCurrencyListener
public static boolean removeCurrencyListener(Listener<Account.AccountCurrency> listener, Account.Event eventType)
-
addLeaseListener
public static boolean addLeaseListener(Listener<Account.AccountLease> listener, Account.Event eventType)
-
removeLeaseListener
public static boolean removeLeaseListener(Listener<Account.AccountLease> listener, Account.Event eventType)
-
addPropertyListener
public static boolean addPropertyListener(Listener<Account.AccountProperty> listener, Account.Event eventType)
-
removePropertyListener
public static boolean removePropertyListener(Listener<Account.AccountProperty> listener, Account.Event eventType)
-
getCount
public static int getCount()
-
getAssetAccountCount
public static int getAssetAccountCount(long assetId)
-
getAssetAccountCount
public static int getAssetAccountCount(long assetId, int height)
-
getAccountAssetCount
public static int getAccountAssetCount(long accountId)
-
getAccountAssetCount
public static int getAccountAssetCount(long accountId, int height)
-
getCurrencyAccountCount
public static int getCurrencyAccountCount(long currencyId)
-
getCurrencyAccountCount
public static int getCurrencyAccountCount(long currencyId, int height)
-
getAccountCurrencyCount
public static int getAccountCurrencyCount(long accountId)
-
getAccountCurrencyCount
public static int getAccountCurrencyCount(long accountId, int height)
-
getAccountLeaseCount
public static int getAccountLeaseCount()
-
getActiveLeaseCount
public static int getActiveLeaseCount()
-
getProperty
public static Account.AccountProperty getProperty(long propertyId)
-
getProperties
public static DbIterator<Account.AccountProperty> getProperties(long recipientId, long setterId, java.lang.String property, int from, int to)
-
getProperty
public static Account.AccountProperty getProperty(long recipientId, java.lang.String property)
-
getProperty
public static Account.AccountProperty getProperty(long recipientId, java.lang.String property, long setterId)
-
getAccount
public static Account getAccount(long id)
-
getAccount
public static Account getAccount(long id, int height)
-
getAccount
public static Account getAccount(byte[] publicKey)
-
getId
public static long getId(byte[] publicKey)
-
getPublicKey
public static byte[] getPublicKey(long id)
-
getAccountAssets
public static DbIterator<Account.AccountAsset> getAccountAssets(long accountId, int from, int to)
-
getAccountAssets
public static DbIterator<Account.AccountAsset> getAccountAssets(long accountId, int height, int from, int to)
-
getAccountAsset
public static Account.AccountAsset getAccountAsset(long accountId, long assetId)
-
getAccountAsset
public static Account.AccountAsset getAccountAsset(long accountId, long assetId, int height)
-
getAssetAccounts
public static DbIterator<Account.AccountAsset> getAssetAccounts(long assetId, int from, int to)
-
getAssetAccounts
public static DbIterator<Account.AccountAsset> getAssetAccounts(long assetId, int height, int from, int to)
-
getAccountCurrency
public static Account.AccountCurrency getAccountCurrency(long accountId, long currencyId)
-
getAccountCurrency
public static Account.AccountCurrency getAccountCurrency(long accountId, long currencyId, int height)
-
getAccountCurrencies
public static DbIterator<Account.AccountCurrency> getAccountCurrencies(long accountId, int from, int to)
-
getAccountCurrencies
public static DbIterator<Account.AccountCurrency> getAccountCurrencies(long accountId, int height, int from, int to)
-
getCurrencyAccounts
public static DbIterator<Account.AccountCurrency> getCurrencyAccounts(long currencyId, int from, int to)
-
getCurrencyAccounts
public static DbIterator<Account.AccountCurrency> getCurrencyAccounts(long currencyId, int height, int from, int to)
-
getAssetBalanceQNT
public static long getAssetBalanceQNT(long accountId, long assetId, int height)
-
getAssetBalanceQNT
public static long getAssetBalanceQNT(long accountId, long assetId)
-
getUnconfirmedAssetBalanceQNT
public static long getUnconfirmedAssetBalanceQNT(long accountId, long assetId)
-
getCurrencyUnits
public static long getCurrencyUnits(long accountId, long currencyId, int height)
-
getCurrencyUnits
public static long getCurrencyUnits(long accountId, long currencyId)
-
getUnconfirmedCurrencyUnits
public static long getUnconfirmedCurrencyUnits(long accountId, long currencyId)
-
searchAccounts
public static DbIterator<Account.AccountInfo> searchAccounts(java.lang.String query, int from, int to)
-
getId
public long getId()
-
getAccountInfo
public Account.AccountInfo getAccountInfo()
-
getAccountLease
public Account.AccountLease getAccountLease()
-
encryptTo
public EncryptedData encryptTo(byte[] data, java.lang.String senderSecretPhrase, boolean compress)
-
encryptTo
public static EncryptedData encryptTo(byte[] publicKey, byte[] data, java.lang.String senderSecretPhrase, boolean compress)
-
decryptFrom
public byte[] decryptFrom(EncryptedData encryptedData, java.lang.String recipientSecretPhrase, boolean uncompress)
-
decryptFrom
public static byte[] decryptFrom(byte[] publicKey, EncryptedData encryptedData, java.lang.String recipientSecretPhrase, boolean uncompress)
-
getBalanceNQT
public long getBalanceNQT()
-
getUnconfirmedBalanceNQT
public long getUnconfirmedBalanceNQT()
-
getForgedBalanceNQT
public long getForgedBalanceNQT()
-
getEffectiveBalanceNXT
public long getEffectiveBalanceNXT()
-
getEffectiveBalanceNXT
public long getEffectiveBalanceNXT(int height)
-
getLessors
public DbIterator<Account> getLessors()
-
getLessors
public DbIterator<Account> getLessors(int height)
-
getGuaranteedBalanceNQT
public long getGuaranteedBalanceNQT()
-
getGuaranteedBalanceNQT
public long getGuaranteedBalanceNQT(int numberOfConfirmations, int currentHeight)
-
getAssets
public DbIterator<Account.AccountAsset> getAssets(int from, int to)
-
getAssets
public DbIterator<Account.AccountAsset> getAssets(int height, int from, int to)
-
getTrades
public DbIterator<Trade> getTrades(int from, int to)
-
getAssetTransfers
public DbIterator<AssetTransfer> getAssetTransfers(int from, int to)
-
getCurrencyTransfers
public DbIterator<CurrencyTransfer> getCurrencyTransfers(int from, int to)
-
getExchanges
public DbIterator<Exchange> getExchanges(int from, int to)
-
getAsset
public Account.AccountAsset getAsset(long assetId)
-
getAsset
public Account.AccountAsset getAsset(long assetId, int height)
-
getAssetBalanceQNT
public long getAssetBalanceQNT(long assetId)
-
getAssetBalanceQNT
public long getAssetBalanceQNT(long assetId, int height)
-
getUnconfirmedAssetBalanceQNT
public long getUnconfirmedAssetBalanceQNT(long assetId)
-
getCurrency
public Account.AccountCurrency getCurrency(long currencyId)
-
getCurrency
public Account.AccountCurrency getCurrency(long currencyId, int height)
-
getCurrencies
public DbIterator<Account.AccountCurrency> getCurrencies(int from, int to)
-
getCurrencies
public DbIterator<Account.AccountCurrency> getCurrencies(int height, int from, int to)
-
getCurrencyUnits
public long getCurrencyUnits(long currencyId)
-
getCurrencyUnits
public long getCurrencyUnits(long currencyId, int height)
-
getUnconfirmedCurrencyUnits
public long getUnconfirmedCurrencyUnits(long currencyId)
-
getControls
public java.util.Set<Account.ControlType> getControls()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-