zcash-android-wallet-sdk / cash.z.wallet.sdk.db

Package cash.z.wallet.sdk.db

Types

BlockDao

The data access object for blocks, used for determining the last scanned height.

interface BlockDao

CompactBlockDao

Data access object for compact blocks in the "Cache DB."

interface CompactBlockDao

CompactBlockDb

The "Cache DB", serving as a cache of compact blocks, waiting to be processed. This will contain the entire blockchain, from the birthdate of the wallet, forward. The CompactBlockProcessor will copy blocks from this database, as they are scanned. In the future, those blocks can be deleted because they are no longer needed. Currently, this efficiency has not been implemented.

abstract class CompactBlockDb : RoomDatabase

DerivedDataDb

The "Data DB," where all data derived from the compact blocks is stored. Most importantly, this database contains transaction information and can be queried for the current balance. The "blocks" table contains a copy of everything that has been scanned. In the future, that table can be truncated up to the last scanned block, for storage efficiency. Wallets should only read from, but never write to, this database.

abstract class DerivedDataDb : RoomDatabase

PendingTransactionDao

Data access object providing crud for pending transactions.

interface PendingTransactionDao

PendingTransactionDb

Database for pending transaction information. Unlike with the "Data DB," the wallet is free to write to this database. In a way, this almost serves as a local mempool for all transactions initiated by this wallet. Currently, the data necessary to support expired transactions is there but it is not being leveraged.

abstract class PendingTransactionDb : RoomDatabase

ReceivedDao

The data access object for notes, used for determining whether transactions exist.

interface ReceivedDao

SentDao

The data access object for sent notes, used for determining whether outbound transactions exist.

interface SentDao

TransactionDao

The data access object for transactions, used for querying all transaction information, including whether transactions are mined.

interface TransactionDao