Crate mainnet_lib
source ·Expand description
Rust implementation of Cardano various tools
InMemoryDbSync
- mock of db sync based on json file rather than postgres db
Network - mock of cardano network in memory
Wallet - api implementation of cardano wallet which is capable of sending and signing registration
transactions
Re-exports
pub use crate::wallet::METADATUM_1;
pub use crate::wallet::METADATUM_1;
pub use crate::wallet::METADATUM_2;
pub use crate::wallet::METADATUM_2;
pub use crate::wallet::METADATUM_3;
pub use crate::wallet::METADATUM_3;
pub use crate::wallet::METADATUM_4;
pub use crate::wallet::METADATUM_4;
pub use crate::wallet::REGISTRATION_METADATA_IDX;
pub use crate::wallet::REGISTRATION_METADATA_IDX;
pub use crate::wallet::REGISTRATION_METADATA_LABEL;
pub use crate::wallet::REGISTRATION_METADATA_LABEL;
pub use crate::wallet::REGISTRATION_METADATA_SIGNATURE_LABEL;
pub use crate::wallet::REGISTRATION_METADATA_SIGNATURE_LABEL;
pub use crate::wallet::REGISTRATION_SIGNATURE_METADATA_IDX;
pub use crate::wallet::REGISTRATION_SIGNATURE_METADATA_IDX;
Modules
Structs
- Block0 representation
- Block builder responsible for building blocks
- Represents Cardano mainnet wallet which is able to generate registration transaction metadata
- Mock of real cardano db sync. At this moment we only stores transactions metadata as the only purpose of existance for this struct is to provide catalyst voting registrations Struct can be persisted and restored from json file using
serde_json
. - In memory cardano node implementation. Basic design contains read write lock over ledger struct as well as background task for updating ledger
- Root struct for defining snapshot template
- Simulates cardano node behavior. Contains mempool of transactions as well as blockchain. Meant to be used as library in current thread.
- metadatum label 1 constant
- metadatum label 2 constant
- metadatum label 3 constant
- metadatum label 4 constant
- Cardano Network state builder, responsible to create a given state of cardano network which will be an input for snapshot
- registration metadata index constant
- registration metadata constant
- registration signature metadata constant
- registration signature metadata index constant
- Responsible for building registration transaction metadata
- Cardano node mock settings
- thread safe
InMemoryDbSync
. It has inner structdb_sync
with rw lock guard and handle to update thread which listen toInMemoryNode
mock block updates - Snapshot
- Transaction builder for cardano mainnet
Enums
- Db sync error
- Metadata conversion error
Constants
- Const defining caradno mainnet slot per epoch setting
Traits
- Basic converter from absolute slot number and {epoch,slot} pair
- Extension for
GeneralTransactionMetadata
tailored for Catalyst purposes