# Packages
No description provided by the author
# Functions
DisableLog disables all library log output.
InsertTestdata reads the given file from the testdata directory and inserts its content into the given database.
IsDeadlockError returns true if the given error is a deadlock error.
IsSchemaError returns true if the given error is a schema error.
IsSerializationError returns true if the given error is a serialization error.
IsSerializationOrDeadlockError returns true if the given error is either a deadlock error or a serialization error.
MapSQLError attempts to interpret a given error as a database agnostic SQL error.
NewAddrBookReadTx creates a new read transaction option set.
NewAssetMintingStore creates a new AssetMintingStore from the specified BatchedPendingAssetStore interface.
NewAssetStore creates a new AssetStore from the specified BatchedAssetStore interface.
NewAssetStoreReadTx creates a new read transaction option set.
NewBaseMultiverseReadTx creates a new read-only transaction for the multiverse.
NewBaseUniverseReadTx creates a new read-only transaction for the base universe.
NewBaseUniverseTree creates a new base Universe tree.
NewKeyStoreReadOpts returns a new KeyStoreTxOptions instance triggers a read transaction.
NewMultiverseStore creates a new multiverse DB store handle.
NewPostgresStore creates a new store that is backed by a Postgres database backend.
NewProofKey takes a universe identifier and leaf key, and returns a proof key.
NewRootKeyStore creates a new RKS from the passed querier interface.
NewSqliteStore attempts to open a new sqlite database based on the passed config.
NewTapAddressBook creates a new TapAddressBook instance given a open BatchedAddrBook storage backend.
NewTaprootAssetTreeStore creates a new TaprootAssetTreeStore instance given an open BatchedTreeStore storage backend.
NewTestDB is a helper function that creates an SQLite database for testing.
NewTestDbHandleFromPath is a helper function that creates a new handle to an existing SQLite database for testing.
NewTestDBWithVersion is a helper function that creates an SQLite database for testing and migrates it to the given version.
NewTestPgFixture constructs a new TestPgFixture starting up a docker container running Postgres 11.
NewTestPostgresDB is a helper function that creates a Postgres database for testing.
NewTestPostgresDBWithVersion is a helper function that creates a Postgres database for testing and migrates it to the given version.
NewTestSqliteDB is a helper function that creates an SQLite database for testing.
NewTestSqliteDbHandleFromPath is a helper function that creates a SQLite database handle given a database file path.
NewTestSqliteDBWithVersion is a helper function that creates an SQLite database for testing and migrates it to the given version.
NewTransactionExecutor creates a new instance of a TransactionExecutor given a Querier query object and a concrete type for the type of transactions the Querier understands.
NewTreeStoreReadTx creates a new read transaction option set.
NewUniverseFederationDB makes a new Universe federation DB.
NewUniverseFederationReadTx returns a new read tx for the federation.
NewUniverseStats creates a new instance of the UniverseStats backed by the database.
NewUniverseStatsReadTx creates a new read-only transaction for the universe stats instance.
UseLogger uses a specified Logger to output package logging info.
WithLatestVersion allows callers to override the default latest version setting.
WithStatsCacheDuration is a functional option that can be used to set the amount of time the stats are cached for.
WithTxRetries is a functional option that allows us to specify the number of times a transaction should be retried if it fails with a repeatable error.
WithTxRetryDelay is a functional option that allows us to specify the delay to wait before a transaction is retried.
# Constants
DefaultInitialRetryDelay is the default initial delay between retries.
DefaultMaxRetryDelay is the default maximum delay between retries.
DefaultNumTxRetries is the default number of times we'll retry a transaction if it fails with an error that permits transaction repetition.
LatestMigrationVersion is the latest migration version of the database.
No description provided by the author
StatsCacheDuration is the duration for which the stats cache is valid.
Subsystem defines the logging code for this subsystem.
# Variables
DefaultPostgresFixtureLifetime is the default maximum time a Postgres test fixture is being kept alive.
DefaultStoreTimeout is the default timeout used for any interaction with the storage/database.
ErrAssetMetaNotFound is returned when an asset meta is not found in the database.
ErrBatchParsing is returned when parsing a fetching minting batch fails.
ErrBindBatchTx is returned when binding a tx to a minting batch fails.
ErrEncodeGenesisPoint is returned when encoding a genesis point before upserting it fails.
ErrEcodePsbt is returned when serializing a PSBT fails.
ErrFetchGenesisAsset is returned when fetching the database ID for an asset genesis fails.
ErrFetchMintingBatches is returned when fetching multiple minting batches fails.
ErrGroupGenesisInfo is returned when fetching genesis info for an asset group fails.
ErrMigrationDowngrade is returned when a database downgrade is detected.
ErrNoAssetGroup is returned when no matching asset group is found.
ErrNoMultiverseRoot is returned when no universe root is found for the target proof type.
ErrReadOutpoint is returned when decoding an outpoint fails.
ErrRetriesExceeded is returned when a transaction is retried more than the max allowed valued without a success.
ErrTapscriptRootSize is returned when the given tapscript root is not exactly 32 bytes.
ErrUpsertGenesisPoint is returned when upserting a genesis point fails.
ErrUpsertGroupKey is returned when upserting a group key fails.
ErrUpsertInternalKey is returned when upserting an internal key fails.
ErrUpsertScriptKey is returned when upserting a script key fails.
MaxValidSQLTime is the maximum valid time that can be rendered as a time string and can be used for comparisons in SQL.
TargetLatest is a MigrationTarget that migrates to the latest version available.
TargetVersion is a MigrationTarget that migrates to the given version.
# Structs
AddrBookTxOptions defines the set of db txn options the AddrBook understands.
AssetBalance holds a balance query result for a particular asset or all assets tracked by this daemon.
AssetGroupBalance holds abalance query result for a particular asset group or all asset groups tracked by this daemon.
AssetHumanReadable is a subset of the base asset struct that only includes human-readable asset fields.
AssetMintingStore is an implementation of the tapgarden.PlantingLog interface backed by a persistent database.
AssetQueryFilters is a wrapper struct over the CommitmentConstraints struct which lets us filter the results of the set of assets returned.
AssetStore is used to query for the set of pending and confirmed assets.
AssetStoreTxOptions defines the set of db txn options the PendingAssetStore understands.
BaseDB is the base database struct that each implementation can embed to gain some common functionality.
BaseMultiverseOptions is the set of options for multiverse queries.
BaseUniverseStoreOptions is the set of options for universe tree queries.
BaseUniverseTree implements the persistent storage for the Base universe for a given asset.
ErrDeadlockError is an error type which represents a database agnostic error where transactions have led to cyclic dependencies in lock acquisition.
ErrSchemaError is an error type which represents a database agnostic error that the schema of the database is incorrect for the given query.
ErrSerializationError is an error type which represents a database agnostic error that a transaction couldn't be serialized with other concurrent db transactions.
ErrSqlUniqueConstraintViolation is an error type which represents a database agnostic SQL unique constraint violation.
KeyStoreTxOptions defines the set of db txn options the KeyStore understands.
ManagedUTXO holds information about a given UTXO we manage.
MultiverseStore implements the persistent storage for a multiverse.
OptionalSeedlingFields contains database IDs for optional seedling fields that have been stored on disk.
PostgresConfig holds the postgres database configuration.
PostgresStore is a database store implementation that uses a Postgres backend.
RootKeyStore is an implementation of the bakery.RootKeyStore interface that'll be used to store macaroons for the project.
SqliteConfig holds all the config arguments needed to interact with our sqlite DB.
SqliteStore is a sqlite3 based database for the Taproot Asset daemon.
TapAddressBook represents a storage backend for all the Taproot Asset addresses a daemon has created.
TaprootAssetTreeStore is an persistent MS-SMT implementation backed by a live SQL database.
TestPgFixture is a test fixture that starts a Postgres 11 instance in a docker container.
TransactionExecutor is a generic struct that abstracts away from the type of query a type needs to run under a database transaction, and also the set of options for that transaction.
No description provided by the author
UniverseFederationDB is used to manage the set of universe servers by sub-systems that need to manage syncing and pushing new proofs amongst the federation set.
UniverseFederationOptions is the database tx object for the universe server store.
UniverseStats is an implementation of the universe.Telemetry interface that is backed by the on-disk Universe event and MS-SMT tree store.
UniverseStatsOptions defines the set of txn options for the universe stats.
# Interfaces
ActiveAssetsStore is a sub-set of the main sqlc.Querier interface that contains methods related to querying the set of confirmed assets.
AddrBook is an interface that represents the storage backed needed to create the TapAddressBook book.
BaseMultiverseStore is used to interact with a set of base universe roots, also known as a multiverse.
BaseUniverseStore is the main interface for the Taproot Asset universe store.
BatchedAddrBook is a version of the AddrBook that's capable of batched database operations.
BatchedAssetStore combines the AssetStore interface with the BatchedTx interface, allowing for multiple queries to be executed in a single SQL transaction.
BatchedKeyStore is the main storage interface for the RootKeyStore.
BatchedMultiverse is a wrapper around the base multiverse that allows us to perform batch transactional database queries with all the relevant query interfaces.
BatchedPendingAssetStore combines the PendingAssetStore interface with the BatchedTx interface, allowing for multiple queries to be executed in a single SQL transaction.
BatchedQuerier is a generic interface that allows callers to create a new database transaction based on an abstract type that implements the TxOptions interface.
BatchedTreeStore is a version of the AddrBook that's capable of batched database operations.
BatchedTx is a generic interface that represents the ability to execute several operations to a given storage interface in a single atomic transaction.
BatchedUniverseServerStore allows for batched DB transactions for the universe server store.
BatchedUniverseStats is a wrapper around the set of UniverseSyncEvents that supports batched DB operations.
BatchedUniverseTree is a wrapper around the base universe tree that allows us to perform batch queries with all the relevant query interfaces.
FederationProofSyncLogStore is used to log the sync status of individual universe proofs.
FederationSyncConfigStore is used to manage the set of Universe servers as part of a federation.
FetchGenesisStore houses the methods related to fetching genesis assets.
FetchScriptKeyStore houses the methods related to fetching all information about a script key.
GroupStore houses the methods related to fetching specific asset groups.
KeyStore represents access to a persistence key store for macaroon root key IDs.
PendingAssetStore is a sub-set of the main sqlc.Querier interface that contains only the methods needed to drive the process of batching and creating a new set of assets.
TapscriptTreeStore houses the methods related to storing, fetching, and deleting tapscript trees.
TreeStore is a sub-set of the main sqlc.Querier interface that contains only the methods needed to manipulate and query stored MSSMT trees.
Tx represents a database transaction that can be committed or rolled back.
TxOptions represents a set of options one can use to control what type of database transaction is created.
UniverseServerStore is used to manage the set of Universe servers as part of a federation.
UniverseStatsStore is an interface that defines the methods required to implement the universe.Telemetry interface.
UpsertAssetStore is a sub-set of the main sqlc.Querier interface that contains methods related to inserting/updating assets.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MacaroonID is used to insert new (id, rootKey) into the database.
MacaroonRootKey is a tuple of (id, rootKey) that is used to validate + create macaroons.
No description provided by the author
MigrateOpt is a functional option that can be passed to migrate related methods to modify behavior.
MigrationTarget is a functional option that can be passed to applyMigrations to specify a target version to migrate to.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProofKey is used to uniquely identify a proof within a universe.
No description provided by the author
No description provided by the author
No description provided by the author
QueryCreator is a generic function that's used to create a Querier, which is a type of interface that implements storage related methods from a database transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TxExecutorOption is a functional option that allows us to pass in optional argument when creating the executor.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UniverseStatOption is a functional option that can be used to modify the way that the UniverseStats struct is created.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author