diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2025-05-19 12:07:10 +0200 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2025-05-19 12:07:14 +0200 |
| commit | 1cbe86646895fe3e1c93be44daa461c5fdd5101d (patch) | |
| tree | 1d095d0f87108cff0efea2d77c0fe172ba982905 /impls/monero.dart/lib | |
| parent | c44cc3b6a07493ca1fc42d8edbc041ade9a63d4f (diff) | |
monero.dart: add ledger callback apicyjan-ledger-v2
Diffstat (limited to 'impls/monero.dart/lib')
| -rw-r--r-- | impls/monero.dart/lib/monero.dart | 11 | ||||
| -rw-r--r-- | impls/monero.dart/lib/src/monero.dart | 4 |
2 files changed, 14 insertions, 1 deletions
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<UnsignedChar> data, int len) { debugEnd?.call('MONERO_Wallet_setDeviceSendData'); return ret; } - + +@Deprecated("TODO") +void Wallet_setLedgerCallback(Pointer<NativeFunction<Void Function(Pointer<UnsignedChar>, 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<Void>; 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<UnsignedChar> data, int len) { monero.Wallet_setDeviceSendData(data, len); } + + static void serLedgerCallback(Pointer<NativeFunction<Void Function(Pointer<UnsignedChar>, UnsignedInt)>> callback) { + monero.Wallet_setLedgerCallback(callback); + } @override void setOffline({required bool offline}) { |
