TxDatabase

interface TxDatabase

Inheritors

Functions

Link copied to clipboard
abstract fun clear()

Delete all items

Link copied to clipboard
abstract fun clearDecrypter()

If you want to use the same database sequentially with multiple wallets, then you can clear the decrypter. This is really meant for efficient tests not production use.

Link copied to clipboard
abstract fun close()

close this database, releasing any resources

Link copied to clipboard
abstract fun delete(vararg idems: ByteArray)
open fun delete(vararg idems: Hash256)
Link copied to clipboard
abstract fun forEach(doit: (TransactionHistory) -> Boolean, startingDate: Long = Long.MAX_VALUE, count: Long = Long.MAX_VALUE)

Iterates from newest to oldest

Link copied to clipboard
abstract fun forEachForwards(doit: (TransactionHistory) -> Boolean, startingDate: Long = Long.MAX_VALUE, count: Long = Long.MAX_VALUE)

Iterates from oldest to newest

Link copied to clipboard

Wallet history iterator, of a particular address.

Link copied to clipboard
abstract fun installDecrypter(decrypt: (ByteArray, Int) -> ByteArray)

Provide a decryption function to associate with any SecuredSecrets stored in this database. The decryption function will not be called until the secret is actually needed.

Link copied to clipboard
abstract fun read(idem: Hash256): TransactionHistory?

Read one item

Link copied to clipboard

Read all items and return a map of each entry

Link copied to clipboard
abstract fun size(): Long
Link copied to clipboard
abstract fun write(vararg txh: TransactionHistory?)
Link copied to clipboard

Insert or overwrite all items in the provided map into the database

Link copied to clipboard

Insert or overwrite all changed items in the provided map into the database