From c7f7bfaab4b2a0d06aacefe54fd228817bded815 Mon Sep 17 00:00:00 2001 From: Grant Wuerker Date: Wed, 12 Dec 2018 17:57:14 -0600 Subject: [PATCH] deposit and deposit_parameters types added --- beacon_chain/types/src/deposit.rs | 14 ++++++++++++++ beacon_chain/types/src/deposit_parameters.rs | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 beacon_chain/types/src/deposit.rs create mode 100644 beacon_chain/types/src/deposit_parameters.rs diff --git a/beacon_chain/types/src/deposit.rs b/beacon_chain/types/src/deposit.rs new file mode 100644 index 000000000..778ebbe8b --- /dev/null +++ b/beacon_chain/types/src/deposit.rs @@ -0,0 +1,14 @@ +use super::deposit_parameters::DepositParameters; +use super::{Hash256}; + +pub struct Deposit { + pub merkle_branch: Hash256, + pub merkle_tree_index: u64, + pub deposit_data: DepositDate +} + +pub struct DepositDate { + pub deposit_parameters: DepositParameters, + pub value: u64, + pub timestamp: u64 +} diff --git a/beacon_chain/types/src/deposit_parameters.rs b/beacon_chain/types/src/deposit_parameters.rs new file mode 100644 index 000000000..9ff121fb9 --- /dev/null +++ b/beacon_chain/types/src/deposit_parameters.rs @@ -0,0 +1,9 @@ +use super::bls::{Keypair, PublicKey, AggregateSignature}; +use super::{Hash256}; + +pub struct DepositParameters { + pub pubkey: PublicKey, + pub proof_of_possession: AggregateSignature, + pub withdrawal_credentials: Hash256, + pub randao_commitment: Hash256 +}