Add confirm command to wallet, and update RPU to check bank for a signature

This commit is contained in:
Tyera Eulberg
2018-06-28 12:58:33 -06:00
committed by Grimes
parent d680f6b3a5
commit 0112a24179
5 changed files with 175 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
//! The `request` module defines the messages for the thin client.
use hash::Hash;
use signature::PublicKey;
use signature::{PublicKey, Signature};
#[cfg_attr(feature = "cargo-clippy", allow(large_enum_variant))]
#[derive(Serialize, Deserialize, Debug, Clone)]
@@ -9,6 +9,7 @@ pub enum Request {
GetBalance { key: PublicKey },
GetLastId,
GetTransactionCount,
GetSignature { signature: Signature },
}
impl Request {
@@ -20,7 +21,17 @@ impl Request {
#[derive(Serialize, Deserialize, Debug)]
pub enum Response {
Balance { key: PublicKey, val: Option<i64> },
LastId { id: Hash },
TransactionCount { transaction_count: u64 },
Balance {
key: PublicKey,
val: Option<i64>,
},
LastId {
id: Hash,
},
TransactionCount {
transaction_count: u64,
},
SignatureStatus {
signature_status: Option<(Hash, Signature)>,
},
}