#[unsafe(no_mangle)]pub unsafe extern "C" fn decode_psbt(
network: *const c_char,
psbt: *const c_char,
) -> *mut c_charExpand description
Decodes a PSBT and returns all outputs of the transaction and total size. “miner” is used in the ‘to’ field of an output to indicate fee.
- OUTPUT
DecodedTx{
outputs: Vec<DecodedTxIO {
value: u64,
to: String,
}>
}§Safety
- This function is unsafe because it dereferences and a returns raw pointer.
- ENSURE that result is passed into cstring_free(ptr: *mut c_char) after use.