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
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); let parsed_tx = Transaction::read(&mut tx_reader, Nu5);
match parsed_tx { match parsed_tx {
Ok(t) => { Ok(t) => {
let s_bundle = t.sapling_bundle().unwrap().shielded_outputs(); let s_bundle = t.sapling_bundle();
match s_bundle {
Some(b) => {
let mut s_output = Vec::new(); let mut s_output = Vec::new();
for s_each_out in s_bundle.iter() { for s_each_out in b.shielded_outputs().iter() {
let mut out_bytes = Vec::new(); let mut out_bytes = Vec::new();
let _ = s_each_out.write_v4(&mut out_bytes); let _ = s_each_out.write_v4(&mut out_bytes);
s_output.push(out_bytes); s_output.push(out_bytes);
} }
marshall_to_haskell_var(&s_output, out, out_len, RW); marshall_to_haskell_var(&s_output, out, out_len, RW);
//TODO: write array of bytes },
None => {
let z = HrawTx { bytes: vec![0], s: false, o: false};
marshall_to_haskell_var(&z, out, out_len, RW);
}
}
}, },
Err(_e) => { Err(_e) => {