Crate db_sync_sqlx

Source
Expand description

helpers and primitive types for querying Cardano Db-Sync data using sqlx

§About

This crate is meant to provide help when writing queries for data produced by Db-Sync, a Cardano blockchain indexer. Db-Sync keeps the indexed data in a Postgre database that can be queried using SQL. This crate defines primitive types that correspond to column types used in the Db-Sync schema, along with some other helpers and casts to types defined in sidechain_domain.

Macros§

sqlx_implementations_for_wrapper
Macro to handle numeric types that are non-negative but are stored by Db-Sync using signed SQL types.

Structs§

Address
Cardano address in human-readable form. Either Base58 for Byron addresses and Bech32 for Shelley.
Asset
Full identifier of a Cardano native asset
AssetName
Cardano native asset name, typically UTF-8 encoding of a human-readable name
BlockNumber
Cardano block number
EpochNumber
Cardano epoch number
EpochNumberRowDeprecated
MainchainEpochNonce
Cardano epoch nonce, ie. random 32 bytes generated by Cardano every epoch.
PolicyId
Cardano minting policy ID. This value is obtained by hashing the Plutus script of the policy.
SlotNumber
Cardano slot number
StakeDelegation
Number of ADA delegated by a Cardano delegator to a single SPO, expressed in Lovelace (1 million-th of ADA)
TxIndex
Index of a Cardano transaction output
TxIndexInBlock
Index of a Cardano transaction with its block
TxValue
Number of ADA expressed in Lovelace (1 million-th of ADA)