// Hash Wallet: stub for the FFI bindings normally generated by ffigen from // cw_mweb/android/src/main/jniLibs/arm64-v8a/libmweb.h. // // Upstream Cake only ships MWeb on iOS + Android — no Linux/macOS/Windows // build of the Go-based mwebd daemon exists. Without this stub the Dart // build fails on those platforms because cw_mweb/lib/mweb_ffi.dart imports // MWebFlutter from this file at compile time. // // At runtime, attempting to use MWeb features will throw because // DynamicLibrary.open(libPath) won't find a libmweb.so on desktop. That's // fine — Litecoin's MWEB extension is a niche feature most users won't hit, // and standard LTC sends/receives still work without it. // // To get real bindings (e.g. for an Android build): run ffigen against the // libmweb.h header generated by `go build -buildmode=c-shared` in cw_mweb/go. // See scripts/android/build_mwebd.sh for the canonical Android build. import 'dart:ffi'; import 'package:ffi/ffi.dart'; class MWebFlutter { MWebFlutter(DynamicLibrary _); int StartServer( Pointer chain, Pointer dataDir, Pointer nodeUri, Pointer> errMsg, ) => 0; void StopServer() {} Pointer Addresses( Pointer scanSecret, int scanSecretLen, Pointer spendPub, int spendPubLen, int fromIndex, int toIndex, ) => ''.toNativeUtf8().cast(); }