mod.rs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. /// Consensus validator state
  33. pub mod validator;
  34. pub use validator::{ValidatorState, ValidatorStatePtr};
  35. /// Fee calculations
  36. pub mod fees;
  37. /// P2P net protocols
  38. pub mod proto;
  39. /// async tasks to utilize the protocols
  40. pub mod task;
  41. /// Lamport clock
  42. pub mod clock;
  43. pub use clock::{Clock, Ticks};
  44. /// Consensus participation coin functions and definitions
  45. pub mod lead_coin;
  46. pub use lead_coin::LeadCoin;
  47. /// Utility types
  48. pub mod types;
  49. pub use types::Float10;
  50. /// Utility functions
  51. pub mod utils;
  52. /// Wallet functions
  53. pub mod wallet;
  54. /// transfered tx proof with public inputs.
  55. pub mod stx;
  56. pub use stx::TransferStx;
  57. /// encrypted receipient coin info
  58. pub mod rcpt;
  59. pub use rcpt::{EncryptedTxRcpt, TxRcpt};
  60. /// transfer transaction
  61. pub mod tx;
  62. pub use tx::Tx;