lib.rs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //! # Verax: A simple ledger database
  2. //!
  3. //! It is a simple Ledger database which aims to be a building block for
  4. //! financial products.
  5. //!
  6. //! Verax uses a UTXO model (unspent transaction output), heavily inspired by
  7. //! Bitcoin. Having UTXO each account balance is isolated from the rest and it's
  8. //! easy to track the history of each payment. In Verax the terminology is
  9. //! slighly different, there are unspent payments instead of UTXO.
  10. //!
  11. //! The data model is simple, any transaction spends one or many payments. Those
  12. //! payments cannot be spend again and are marked as spent. The transaction can
  13. //! be settled or not, if it's not settled it can be rolled back. Each
  14. //! transaction creates new payments that can be spend in the future by other
  15. //! transactions.
  16. //!
  17. //! Verax aims to be simple, auditable, cryptographically provable and human
  18. //! auditable friendly.
  19. #![deny(missing_docs)]
  20. #![deny(warnings)]
  21. mod amount;
  22. mod asset;
  23. mod asset_manager;
  24. mod changelog;
  25. mod error;
  26. mod id;
  27. mod ledger;
  28. mod payment;
  29. mod serde;
  30. #[cfg(any(feature = "sqlite", test))]
  31. pub mod sqlite;
  32. mod status;
  33. pub mod storage;
  34. #[cfg(test)]
  35. mod tests;
  36. mod transaction;
  37. #[cfg(test)]
  38. pub use self::storage::test as storage_test;
  39. pub use self::{
  40. amount::Amount,
  41. asset::Asset,
  42. asset_manager::{AssetDefinition, AssetManager},
  43. error::Error,
  44. id::*,
  45. ledger::Ledger,
  46. payment::{Payment, PaymentId},
  47. serde::*,
  48. status::Status,
  49. transaction::{Transaction, Type},
  50. };
  51. #[cfg(any(feature = "sqlite", test))]
  52. pub use self::sqlite::{Batch, SQLite};