Update auto-generated bindings
[ldk-c-bindings] / lightning-c-bindings / src / lightning / chain / chaininterface.rs
index b1c180bbf5a130f10244807d809580345a363cce..40406be1b9e1e892bd00d09593522c7a80e3be91 100644 (file)
 //! Includes traits for monitoring and receiving notifications of new blocks and block
 //! disconnections, transaction broadcasting, and feerate information requests.
 
-use std::str::FromStr;
-use std::ffi::c_void;
+use alloc::str::FromStr;
+use core::ffi::c_void;
 use core::convert::Infallible;
 use bitcoin::hashes::Hash;
 use crate::c_types::*;
+#[cfg(feature="no-std")]
+use alloc::{vec::Vec, boxed::Box};
 
 /// An interface to send a transaction to the Bitcoin network.
 #[repr(C)]
@@ -50,7 +52,7 @@ impl rustBroadcasterInterface for BroadcasterInterface {
 
 // We're essentially a pointer already, or at least a set of pointers, so allow us to be used
 // directly as a Deref trait in higher-level structs:
-impl std::ops::Deref for BroadcasterInterface {
+impl core::ops::Deref for BroadcasterInterface {
        type Target = Self;
        fn deref(&self) -> &Self {
                self
@@ -68,8 +70,8 @@ impl Drop for BroadcasterInterface {
 }
 /// An enum that represents the speed at which we want a transaction to confirm used for feerate
 /// estimation.
-#[must_use]
 #[derive(Clone)]
+#[must_use]
 #[repr(C)]
 pub enum ConfirmationTarget {
        /// We are happy with this transaction confirming slowly when feerate drops some.
@@ -79,7 +81,9 @@ pub enum ConfirmationTarget {
        /// We'd like this transaction to confirm in the next few blocks.
        HighPriority,
 }
-use lightning::chain::chaininterface::ConfirmationTarget as nativeConfirmationTarget;
+use lightning::chain::chaininterface::ConfirmationTarget as ConfirmationTargetImport;
+pub(crate) type nativeConfirmationTarget = ConfirmationTargetImport;
+
 impl ConfirmationTarget {
        #[allow(unused)]
        pub(crate) fn to_native(&self) -> nativeConfirmationTarget {
@@ -182,7 +186,7 @@ impl rustFeeEstimator for FeeEstimator {
 
 // We're essentially a pointer already, or at least a set of pointers, so allow us to be used
 // directly as a Deref trait in higher-level structs:
-impl std::ops::Deref for FeeEstimator {
+impl core::ops::Deref for FeeEstimator {
        type Target = Self;
        fn deref(&self) -> &Self {
                self