X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fchain%2Fkeysinterface.rs;h=d037f793c60174cad48db7d2a7e4edf8353e9b0d;hb=8e312af8e3dc1de09d5ed95372c1cfab8d83a6d0;hp=2a0ea4f690989322f93145047344d16d6934f209;hpb=45ad3320df3768514d968c70fc4b6a9d50028050;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/chain/keysinterface.rs b/lightning-c-bindings/src/lightning/chain/keysinterface.rs index 2a0ea4f..d037f79 100644 --- a/lightning-c-bindings/src/lightning/chain/keysinterface.rs +++ b/lightning-c-bindings/src/lightning/chain/keysinterface.rs @@ -106,6 +106,14 @@ pub extern "C" fn DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: &mu unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.to_self_delay = val; } /// The output which is referenced by the given outpoint +/// +/// Returns a copy of the field. +#[no_mangle] +pub extern "C" fn DelayedPaymentOutputDescriptor_get_output(this_ptr: &DelayedPaymentOutputDescriptor) -> crate::c_types::TxOut { + let mut inner_val = this_ptr.get_native_mut_ref().output.clone(); + crate::c_types::TxOut::from_rust(inner_val) +} +/// The output which is referenced by the given outpoint #[no_mangle] pub extern "C" fn DelayedPaymentOutputDescriptor_set_output(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::c_types::TxOut) { unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.output = val.into_rust(); @@ -262,6 +270,14 @@ pub extern "C" fn StaticPaymentOutputDescriptor_set_outpoint(this_ptr: &mut Stat unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.outpoint = *unsafe { Box::from_raw(val.take_inner()) }; } /// The output which is referenced by the given outpoint +/// +/// Returns a copy of the field. +#[no_mangle] +pub extern "C" fn StaticPaymentOutputDescriptor_get_output(this_ptr: &StaticPaymentOutputDescriptor) -> crate::c_types::TxOut { + let mut inner_val = this_ptr.get_native_mut_ref().output.clone(); + crate::c_types::TxOut::from_rust(inner_val) +} +/// The output which is referenced by the given outpoint #[no_mangle] pub extern "C" fn StaticPaymentOutputDescriptor_set_output(this_ptr: &mut StaticPaymentOutputDescriptor, mut val: crate::c_types::TxOut) { unsafe { &mut *ObjOps::untweak_ptr(this_ptr.inner) }.output = val.into_rust(); @@ -1042,7 +1058,9 @@ pub struct KeysInterface { /// An opaque pointer which is passed to your function implementations as an argument. /// This has no meaning in the LDK, and can be NULL or any other value. pub this_arg: *mut c_void, - /// Get node secret key (aka node_id or network_key) based on the provided [`Recipient`]. + /// Get node secret key based on the provided [`Recipient`]. + /// + /// The node_id/network_key is the public key that corresponds to this secret key. /// /// This method must return the same value each time it is called with a given `Recipient` /// parameter.