#[unsafe(no_mangle)]pub unsafe extern "C" fn compile(
policy: *const c_char,
script_type: *const c_char,
) -> *mut c_charExpand description
Compiles a policy into a descriptor of the specified script type. Use wpkh for a single signature Native native wallet (default). Use wsh for a scripted Native native wallet.
- OUTPUT
WalletPolicy {
policy: String,
descriptor: 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.