payment.rs 563 B

123456789101112131415161718192021
  1. use crate::{AccountId, Amount, PaymentId};
  2. use serde::{Deserialize, Serialize};
  3. #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
  4. pub struct PaymentTo {
  5. /// Which account can spend this new payment
  6. pub to: AccountId,
  7. /// The amount of the payment
  8. pub amount: Amount,
  9. }
  10. /// Payment
  11. #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
  12. pub struct PaymentFrom {
  13. /// The payment ID
  14. pub id: PaymentId,
  15. /// Which account is paying
  16. pub from: AccountId,
  17. /// The amount of the payment
  18. pub amount: Amount,
  19. }