Skip to content

Commit 0bf0415

Browse files
committed
Add lnurl-auth support
1 parent 064187e commit 0bf0415

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

orange-sdk/src/ffi/orange/wallet.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ impl Wallet {
195195
Ok(())
196196
}
197197

198+
/// Authenticates the user via [LNURL-auth] for the given LNURL string.
199+
///
200+
/// [LNURL-auth]: https://github.com/lnurl/luds/blob/luds/04.md
201+
pub fn lnurl_auth(&self, lnurl: &str) -> Result<(), WalletError> {
202+
self.inner.lnurl_auth(lnurl)?;
203+
Ok(())
204+
}
205+
198206
/// Returns the wallet's configured tunables.
199207
pub fn get_tunables(&self) -> Arc<Tunables> {
200208
Arc::new(self.inner.get_tunables().into())

orange-sdk/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,14 @@ impl Wallet {
12421242
Ok(())
12431243
}
12441244

1245+
/// Authenticates the user via [LNURL-auth] for the given LNURL string.
1246+
///
1247+
/// [LNURL-auth]: https://github.com/lnurl/luds/blob/luds/04.md
1248+
pub fn lnurl_auth(&self, lnurl: &str) -> Result<(), WalletError> {
1249+
self.inner.ln_wallet.inner.ldk_node.lnurl_auth(lnurl)?;
1250+
Ok(())
1251+
}
1252+
12451253
/// Returns the wallet's configured tunables.
12461254
pub fn get_tunables(&self) -> Tunables {
12471255
self.inner.tunables

0 commit comments

Comments
 (0)