1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//! Types which are serializable to JSON, and which map to types defined outside this crate.

use std::collections::BTreeMap;

use casper_types::Key;

mod auction_state;
mod deploy_info;
mod execution_result;
mod public_key;
mod stored_value;

pub use auction_state::AuctionState;
pub use deploy_info::DeployInfo;
pub use execution_result::ExecutionResult;
pub use public_key::PublicKey;
pub use stored_value::StoredValue;

fn convert_named_keys(named_keys: &BTreeMap<String, Key>) -> BTreeMap<String, String> {
    named_keys
        .iter()
        .map(|(name, key)| (name.clone(), key.to_formatted_string()))
        .collect()
}