Nice, so I'll expose the database soon

Reply to this note

Please Login to reply.

Discussion

Done, I've exposed the NostrDatabase, added some other Client method and released the v0.39 (tagged in the git repo, I can't publish it to pub.dev).

How do the bindings work? If i wanted to expose the profile metadata stuff?

I usually copy the stuff I already exposed in the UniFFI bindings and adapt it to the flutter_rust_bridge.

So, in the case of metadata stuff, I would copy and adapt this: https://github.com/rust-nostr/nostr/blob/d7a8372e28a5dd7e1ce02b725ee0b43c798e332f/bindings/nostr-sdk-ffi/src/protocol/nips/nip01.rs

To adapt it, I follow these docs https://cjycode.com/flutter_rust_bridge/ or I just check the other modules I already adapted. In short: replace the uniffi macros with `frb` and use the `Result` from anyhow. If a new module is added, it must be exported in the `lib/nostr_sdk.dart` file.