diff options
| author | cyan <cyjan@mrcyjanek.net> | 2025-05-19 12:09:32 +0200 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2025-05-19 12:16:22 +0200 |
| commit | 4868eb9220962a4176a7ed0fc7c809c6200e71a0 (patch) | |
| tree | 0407d44c8919072b8b464192ce3de9d2a3fa9bbe /impls/monero.dart/lib/src/generated_bindings_monero.g.dart | |
| parent | a479a569bc25dd1e9701436404a46f0f509096a4 (diff) | |
feat: callback-based ledger connection (#137)
* feat: callback-based ledger connection
* int -> void use sendToLedgerDeviceCallback only when needed
* fix(ledger): fix binds, make functions static
* update ledger patch
* monero.dart: add ledger callback api
Diffstat (limited to 'impls/monero.dart/lib/src/generated_bindings_monero.g.dart')
| -rw-r--r-- | impls/monero.dart/lib/src/generated_bindings_monero.g.dart | 146 |
1 files changed, 65 insertions, 81 deletions
diff --git a/impls/monero.dart/lib/src/generated_bindings_monero.g.dart b/impls/monero.dart/lib/src/generated_bindings_monero.g.dart index 77e2899..81649b1 100644 --- a/impls/monero.dart/lib/src/generated_bindings_monero.g.dart +++ b/impls/monero.dart/lib/src/generated_bindings_monero.g.dart @@ -4351,120 +4351,83 @@ class MoneroC { late final _MONERO_Wallet_getBytesSent = _MONERO_Wallet_getBytesSentPtr .asFunction<int Function(ffi.Pointer<ffi.Void>)>(); - bool MONERO_Wallet_getStateIsConnected( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getStateIsConnected( - wallet_ptr, - ); + bool MONERO_Wallet_getStateIsConnected() { + return _MONERO_Wallet_getStateIsConnected(); } late final _MONERO_Wallet_getStateIsConnectedPtr = - _lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Pointer<ffi.Void>)>>( + _lookup<ffi.NativeFunction<ffi.Bool Function()>>( 'MONERO_Wallet_getStateIsConnected'); late final _MONERO_Wallet_getStateIsConnected = - _MONERO_Wallet_getStateIsConnectedPtr.asFunction< - bool Function(ffi.Pointer<ffi.Void>)>(); + _MONERO_Wallet_getStateIsConnectedPtr.asFunction<bool Function()>(); - ffi.Pointer<ffi.UnsignedChar> MONERO_Wallet_getSendToDevice( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getSendToDevice( - wallet_ptr, - ); + ffi.Pointer<ffi.UnsignedChar> MONERO_Wallet_getSendToDevice() { + return _MONERO_Wallet_getSendToDevice(); } - late final _MONERO_Wallet_getSendToDevicePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer<ffi.UnsignedChar> Function( - ffi.Pointer<ffi.Void>)>>('MONERO_Wallet_getSendToDevice'); - late final _MONERO_Wallet_getSendToDevice = - _MONERO_Wallet_getSendToDevicePtr.asFunction< - ffi.Pointer<ffi.UnsignedChar> Function(ffi.Pointer<ffi.Void>)>(); + late final _MONERO_Wallet_getSendToDevicePtr = + _lookup<ffi.NativeFunction<ffi.Pointer<ffi.UnsignedChar> Function()>>( + 'MONERO_Wallet_getSendToDevice'); + late final _MONERO_Wallet_getSendToDevice = _MONERO_Wallet_getSendToDevicePtr + .asFunction<ffi.Pointer<ffi.UnsignedChar> Function()>(); - int MONERO_Wallet_getSendToDeviceLength( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getSendToDeviceLength( - wallet_ptr, - ); + int MONERO_Wallet_getSendToDeviceLength() { + return _MONERO_Wallet_getSendToDeviceLength(); } late final _MONERO_Wallet_getSendToDeviceLengthPtr = - _lookup<ffi.NativeFunction<ffi.Size Function(ffi.Pointer<ffi.Void>)>>( + _lookup<ffi.NativeFunction<ffi.Size Function()>>( 'MONERO_Wallet_getSendToDeviceLength'); late final _MONERO_Wallet_getSendToDeviceLength = - _MONERO_Wallet_getSendToDeviceLengthPtr.asFunction< - int Function(ffi.Pointer<ffi.Void>)>(); + _MONERO_Wallet_getSendToDeviceLengthPtr.asFunction<int Function()>(); - ffi.Pointer<ffi.UnsignedChar> MONERO_Wallet_getReceivedFromDevice( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getReceivedFromDevice( - wallet_ptr, - ); + ffi.Pointer<ffi.UnsignedChar> MONERO_Wallet_getReceivedFromDevice() { + return _MONERO_Wallet_getReceivedFromDevice(); } - late final _MONERO_Wallet_getReceivedFromDevicePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer<ffi.UnsignedChar> Function( - ffi.Pointer<ffi.Void>)>>('MONERO_Wallet_getReceivedFromDevice'); + late final _MONERO_Wallet_getReceivedFromDevicePtr = + _lookup<ffi.NativeFunction<ffi.Pointer<ffi.UnsignedChar> Function()>>( + 'MONERO_Wallet_getReceivedFromDevice'); late final _MONERO_Wallet_getReceivedFromDevice = _MONERO_Wallet_getReceivedFromDevicePtr.asFunction< - ffi.Pointer<ffi.UnsignedChar> Function(ffi.Pointer<ffi.Void>)>(); + ffi.Pointer<ffi.UnsignedChar> Function()>(); - int MONERO_Wallet_getReceivedFromDeviceLength( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getReceivedFromDeviceLength( - wallet_ptr, - ); + int MONERO_Wallet_getReceivedFromDeviceLength() { + return _MONERO_Wallet_getReceivedFromDeviceLength(); } late final _MONERO_Wallet_getReceivedFromDeviceLengthPtr = - _lookup<ffi.NativeFunction<ffi.Size Function(ffi.Pointer<ffi.Void>)>>( + _lookup<ffi.NativeFunction<ffi.Size Function()>>( 'MONERO_Wallet_getReceivedFromDeviceLength'); late final _MONERO_Wallet_getReceivedFromDeviceLength = _MONERO_Wallet_getReceivedFromDeviceLengthPtr.asFunction< - int Function(ffi.Pointer<ffi.Void>)>(); + int Function()>(); - bool MONERO_Wallet_getWaitsForDeviceSend( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getWaitsForDeviceSend( - wallet_ptr, - ); + bool MONERO_Wallet_getWaitsForDeviceSend() { + return _MONERO_Wallet_getWaitsForDeviceSend(); } late final _MONERO_Wallet_getWaitsForDeviceSendPtr = - _lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Pointer<ffi.Void>)>>( + _lookup<ffi.NativeFunction<ffi.Bool Function()>>( 'MONERO_Wallet_getWaitsForDeviceSend'); late final _MONERO_Wallet_getWaitsForDeviceSend = - _MONERO_Wallet_getWaitsForDeviceSendPtr.asFunction< - bool Function(ffi.Pointer<ffi.Void>)>(); + _MONERO_Wallet_getWaitsForDeviceSendPtr.asFunction<bool Function()>(); - bool MONERO_Wallet_getWaitsForDeviceReceive( - ffi.Pointer<ffi.Void> wallet_ptr, - ) { - return _MONERO_Wallet_getWaitsForDeviceReceive( - wallet_ptr, - ); + bool MONERO_Wallet_getWaitsForDeviceReceive() { + return _MONERO_Wallet_getWaitsForDeviceReceive(); } late final _MONERO_Wallet_getWaitsForDeviceReceivePtr = - _lookup<ffi.NativeFunction<ffi.Bool Function(ffi.Pointer<ffi.Void>)>>( + _lookup<ffi.NativeFunction<ffi.Bool Function()>>( 'MONERO_Wallet_getWaitsForDeviceReceive'); late final _MONERO_Wallet_getWaitsForDeviceReceive = - _MONERO_Wallet_getWaitsForDeviceReceivePtr.asFunction< - bool Function(ffi.Pointer<ffi.Void>)>(); + _MONERO_Wallet_getWaitsForDeviceReceivePtr.asFunction<bool Function()>(); void MONERO_Wallet_setDeviceReceivedData( - ffi.Pointer<ffi.Void> wallet_ptr, ffi.Pointer<ffi.UnsignedChar> data, int len, ) { return _MONERO_Wallet_setDeviceReceivedData( - wallet_ptr, data, len, ); @@ -4472,22 +4435,17 @@ class MoneroC { late final _MONERO_Wallet_setDeviceReceivedDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<ffi.Void>, - ffi.Pointer<ffi.UnsignedChar>, + ffi.Void Function(ffi.Pointer<ffi.UnsignedChar>, ffi.Size)>>('MONERO_Wallet_setDeviceReceivedData'); late final _MONERO_Wallet_setDeviceReceivedData = _MONERO_Wallet_setDeviceReceivedDataPtr.asFunction< - void Function( - ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.UnsignedChar>, int)>(); + void Function(ffi.Pointer<ffi.UnsignedChar>, int)>(); void MONERO_Wallet_setDeviceSendData( - ffi.Pointer<ffi.Void> wallet_ptr, ffi.Pointer<ffi.UnsignedChar> data, int len, ) { return _MONERO_Wallet_setDeviceSendData( - wallet_ptr, data, len, ); @@ -4495,14 +4453,40 @@ class MoneroC { late final _MONERO_Wallet_setDeviceSendDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<ffi.Void>, - ffi.Pointer<ffi.UnsignedChar>, + ffi.Void Function(ffi.Pointer<ffi.UnsignedChar>, ffi.Size)>>('MONERO_Wallet_setDeviceSendData'); late final _MONERO_Wallet_setDeviceSendData = _MONERO_Wallet_setDeviceSendDataPtr.asFunction< + void Function(ffi.Pointer<ffi.UnsignedChar>, int)>(); + + void MONERO_Wallet_setLedgerCallback( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<ffi.UnsignedChar> command, + ffi.UnsignedInt cmd_len)>> + sendToLedgerDevice, + ) { + return _MONERO_Wallet_setLedgerCallback( + sendToLedgerDevice, + ); + } + + late final _MONERO_Wallet_setLedgerCallbackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<ffi.UnsignedChar> command, + ffi.UnsignedInt cmd_len)>>)>>( + 'MONERO_Wallet_setLedgerCallback'); + late final _MONERO_Wallet_setLedgerCallback = + _MONERO_Wallet_setLedgerCallbackPtr.asFunction< void Function( - ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.UnsignedChar>, int)>(); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<ffi.UnsignedChar> command, + ffi.UnsignedInt cmd_len)>>)>(); ffi.Pointer<ffi.Void> MONERO_WalletManager_createWallet( ffi.Pointer<ffi.Void> wm_ptr, |
