summaryrefslogtreecommitdiff
path: root/impls
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2025-05-08 13:15:39 +0200
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2025-05-08 13:15:39 +0200
commitfbd21359f3b325466087c665035f22ff55b36f68 (patch)
treec09d687e528e934be99de76754a109cdf5769a83 /impls
parenta479a569bc25dd1e9701436404a46f0f509096a4 (diff)
feat: callback-based ledger connection
Diffstat (limited to 'impls')
-rw-r--r--impls/monero.dart/lib/src/generated_bindings_monero.g.dart146
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..5f5657c 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.Int 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.Int 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.Int Function(ffi.Pointer<ffi.UnsignedChar> command,
+ ffi.UnsignedInt cmd_len)>>)>();
ffi.Pointer<ffi.Void> MONERO_WalletManager_createWallet(
ffi.Pointer<ffi.Void> wm_ptr,