Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ interface Bolt12Invoice {
sequence<u8> encode();
};

interface PaymentPreimage {
[Throws=NodeError, Name=from_str]
constructor([ByRef] string preimage_str);
};

[Custom]
typedef string Txid;

Expand Down Expand Up @@ -830,9 +835,6 @@ typedef string PaymentId;
[Custom]
typedef string PaymentHash;

[Custom]
typedef string PaymentPreimage;

[Custom]
typedef string PaymentSecret;

Expand Down
4 changes: 2 additions & 2 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ where
}

#[cfg(feature = "uniffi")]
pub fn maybe_try_convert_enum<T, R>(wrapped_type: &T) -> Result<R, crate::error::Error>
pub fn maybe_try_from<T, R>(wrapped_type: &T) -> Result<R, crate::error::Error>
where
for<'a> R: TryFrom<&'a T, Error = crate::error::Error>,
{
Expand All @@ -37,7 +37,7 @@ pub fn maybe_deref<T>(value: &T) -> &T {
}

#[cfg(not(feature = "uniffi"))]
pub fn maybe_try_convert_enum<T>(value: &T) -> Result<&T, crate::error::Error> {
pub fn maybe_try_from<T>(value: &T) -> Result<&T, crate::error::Error> {
Ok(value)
}

Expand Down
Loading
Loading