ouput (#51)
This commit is contained in:
@@ -31,7 +31,7 @@ pub enum TxCommand {
|
||||
#[derive(Deserialize)]
|
||||
pub struct ResolvedInput {
|
||||
pub input: Input,
|
||||
pub ouput: Output,
|
||||
pub output: Output,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -44,6 +44,15 @@ pub struct Input {
|
||||
pub struct Output {
|
||||
pub address: String,
|
||||
pub value: (u64, HashMap<String, HashMap<String, u64>>),
|
||||
pub datum: Option<OutputDatum>,
|
||||
pub script: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum OutputDatum {
|
||||
DatumHash(String),
|
||||
Datum(String),
|
||||
}
|
||||
|
||||
/// Commands for working with Untyped Plutus Core
|
||||
|
||||
@@ -18,7 +18,7 @@ pub fn get_tx_in_info(resolved_inputs: &[ResolvedInput]) -> anyhow::Result<Vec<P
|
||||
]),
|
||||
});
|
||||
|
||||
let address = Address::from_bech32(&resolved_input.ouput.address)?;
|
||||
let address = Address::from_bech32(&resolved_input.output.address)?;
|
||||
|
||||
let payment_tag = match address.typeid() % 2 {
|
||||
0 => 0,
|
||||
@@ -36,9 +36,9 @@ pub fn get_tx_in_info(resolved_inputs: &[ResolvedInput]) -> anyhow::Result<Vec<P
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
let lovelace = resolved_input.ouput.value.0;
|
||||
let lovelace = resolved_input.output.value.0;
|
||||
|
||||
let mut assets = resolved_input.ouput.value.1.clone();
|
||||
let mut assets = resolved_input.output.value.1.clone();
|
||||
|
||||
assets.insert(
|
||||
"".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user