From 1cbe86646895fe3e1c93be44daa461c5fdd5101d Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Mon, 19 May 2025 12:07:10 +0200 Subject: monero.dart: add ledger callback api --- impls/monero.dart/lib/monero.dart | 11 ++++++++++- impls/monero.dart/lib/src/monero.dart | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/impls/monero.dart/lib/monero.dart b/impls/monero.dart/lib/monero.dart index ff77b16..a80924e 100644 --- a/impls/monero.dart/lib/monero.dart +++ b/impls/monero.dart/lib/monero.dart @@ -3594,7 +3594,16 @@ void Wallet_setDeviceSendData(Pointer data, int len) { debugEnd?.call('MONERO_Wallet_setDeviceSendData'); return ret; } - + +@Deprecated("TODO") +void Wallet_setLedgerCallback(Pointer, UnsignedInt)>> callback) { + debugStart?.call('MONERO_Wallet_setDeviceSendData'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + final ret = lib!.MONERO_Wallet_setLedgerCallback(callback); + debugEnd?.call('MONERO_Wallet_setDeviceSendData'); + return ret; +} + // WalletManager @Deprecated("TODO") typedef WalletManager = Pointer; diff --git a/impls/monero.dart/lib/src/monero.dart b/impls/monero.dart/lib/src/monero.dart index 4353841..ad9ec5a 100644 --- a/impls/monero.dart/lib/src/monero.dart +++ b/impls/monero.dart/lib/src/monero.dart @@ -1357,6 +1357,10 @@ class MoneroWallet implements Wallet2Wallet { static void setDeviceSendData(Pointer data, int len) { monero.Wallet_setDeviceSendData(data, len); } + + static void serLedgerCallback(Pointer, UnsignedInt)>> callback) { + monero.Wallet_setLedgerCallback(callback); + } @override void setOffline({required bool offline}) { -- cgit v1.2.3