kon-cli/crates/cardano-tx-builder/src/value.rs

32 lines
583 B
Rust

// TODO: Write some sane value handling fuctions:
// - add
// - sub
// - prune
// - split (negative, positive)
// - is_positive
use super::pallas::era;
use std::collections::HashMap;
/// Naive version of value
pub type MultiAsset = HashMap<[u8; 28], HashMap<Vec<u8>, u64>>;
#[derive(Debug)]
pub struct Value(pub u64, pub MultiAsset);
impl Value {
pub fn add(self, _other: Value) -> Self {
todo!()
}
pub fn sub(self, _other: Value) -> Self {
todo!()
}
}
impl Into<era::Value> for Value {
fn into(self) -> era::Value {
todo!()
}
}