Addition of functinality for manipulating Unified Addresses and Viewing Keys #1

Merged
pitmutt merged 17 commits from dev020 into master 2023-12-04 16:31:17 +00:00
1 changed files with 15 additions and 8 deletions
Showing only changes of commit 697ce83f7c - Show all commits

View File

@ -445,15 +445,22 @@ pub extern "C" fn rust_wrapper_tx_parse(
let parsed_tx = Transaction::read(&mut tx_reader, Nu5);
match parsed_tx {
Ok(t) => {
let s_bundle = t.sapling_bundle().unwrap().shielded_outputs();
let mut s_output = Vec::new();
for s_each_out in s_bundle.iter() {
let mut out_bytes = Vec::new();
let _ = s_each_out.write_v4(&mut out_bytes);
s_output.push(out_bytes);
let s_bundle = t.sapling_bundle();
match s_bundle {
Some(b) => {
let mut s_output = Vec::new();
for s_each_out in b.shielded_outputs().iter() {
let mut out_bytes = Vec::new();
let _ = s_each_out.write_v4(&mut out_bytes);
s_output.push(out_bytes);
}
marshall_to_haskell_var(&s_output, out, out_len, RW);
},
None => {
let z = HrawTx { bytes: vec![0], s: false, o: false};
marshall_to_haskell_var(&z, out, out_len, RW);
}
}
marshall_to_haskell_var(&s_output, out, out_len, RW);
//TODO: write array of bytes
},
Err(_e) => {