Almost there!
Here is the current issue:
This code builds, but when you try to launch the app on the iOS emulator you get the following error:
Could not cast value of type 'BitcoinDevKit.Wallet' (0x10556e248) to 'SharedFFIWallet' (0x10556c060).
2023-09-18 15:29:48.629184-0400 iosApp[63471:3933267] Could not cast value of type 'BitcoinDevKit.Wallet' (0x10556e248) to 'SharedFFIWallet' (0x10556c060).
The cast to the FFIWallet class happens on line 16 of ContentView.swift. I put it there after trying not to cast it at all and simply passing the bdkWallet object directly, in which case the project will not compile and you'll get the error:
Argument type 'Wallet' does not conform to expected type 'FFIWallet'
The core idea here is to pass at runtime the wallet object coming from the Swift BitcoinDevKit library to the Koltin common code. But I'm not sure how to make it see this wallet object as a valid argument to the constructor. Is it simply that my interface in Wallet.kt is not correctly defined? It does have the same function signature as the Swift wallet... Any input appreciated!