mod.rs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* This file is part of DarkFi (https://dark.fi)
  2. *
  3. * Copyright (C) 2020-2023 Dyne.org foundation
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Affero General Public License as
  7. * published by the Free Software Foundation, either version 3 of the
  8. * License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Affero General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Affero General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /// Block definition
  19. pub mod block;
  20. pub use block::{Block, BlockInfo, BlockProposal, Header};
  21. /// Constants
  22. pub mod constants;
  23. pub use constants::{
  24. TESTNET_BOOTSTRAP_TIMESTAMP, TESTNET_GENESIS_HASH_BYTES, TESTNET_GENESIS_TIMESTAMP,
  25. TESTNET_INITIAL_DISTRIBUTION,
  26. };
  27. /// Consensus block leader information
  28. pub mod lead_info;
  29. pub use lead_info::{LeadInfo, LeadProof};
  30. /// Consensus state
  31. pub mod state;
  32. pub use state::SlotCheckpoint;
  33. /// Consensus validator state
  34. pub mod validator;
  35. pub use validator::{ValidatorState, ValidatorStatePtr};
  36. /// Fee calculations
  37. pub mod fees;
  38. /// P2P net protocols
  39. pub mod proto;
  40. /// async tasks to utilize the protocols
  41. pub mod task;
  42. /// Lamport clock
  43. pub mod clock;
  44. pub use clock::{Clock, Ticks};
  45. /// Consensus participation coin functions and definitions
  46. pub mod lead_coin;
  47. pub use lead_coin::LeadCoin;
  48. /// Utility types
  49. pub mod types;
  50. pub use types::Float10;
  51. /// Utility functions
  52. pub mod utils;
  53. /// Wallet functions
  54. pub mod wallet;
  55. /// transfered tx proof with public inputs.
  56. pub mod stx;
  57. pub use stx::TransferStx;
  58. /// encrypted receipient coin info
  59. pub mod rcpt;
  60. pub use rcpt::{EncryptedTxRcpt, TxRcpt};
  61. /// transfer transaction
  62. pub mod tx;
  63. pub use tx::Tx;