Damus

Recent Notes

reya · 1d
I got the dependency issues fixed. But look like async api from sdk didn't work in wasm enviroment? ``` error: future cannot be sent between threads safely --> crates/state/src/lib.rs:307:12 | 307 | cx.background_spawn(async move { | ^^^^^^^^^^^^^^^^ future created by ...
reya · 3d
Hi nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet I want to port coop (desktop) to web via wasm, but look like getrandom isn't enable wasm support (via wasm_js feature). Can yo...
Yuki Kishimoto profile picture
We've removed it (getrandom + wasm_js feature) because in some context was causing issues (wasm32-unknown-unknown used outside JS).

You can solve the issue by adding the getrandom dep in your Cargo.toml, and enable the wasm_js feature. Make sure to do it for the right getrandom version(s), which can be found in the Cargo.lock

1
reya · 2d
Look like rust-secp256k1 isn't support wasm either. Do you know other solution?
reya · 2w
hmm, somehow I still got the warning. maybe it don't work on KMP but only Android?
Yuki Kishimoto profile picture
I've checked the `libnostr_sdk_ffi.so` libraries used in the KMP package and they seem to be correctly aligned:

```text
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**14
LOAD off 0x000000000032f3c0 vaddr 0x00000000003333c0 paddr 0x00000000003333c0 align 2**14
```

Have you tried verifying whether the APK itself is aligned? From my understanding, the ELF files can be correctly aligned but still be packaged incorrectly inside the APK:

```bash
$ANDROID_HOME/build-tools/<version>/zipalign -c -P 16 -v 4 app-release.apk
```
reya · 2w
hmm, somehow I still got the warning. maybe it don't work on KMP but only Android?
Yuki Kishimoto · 3w
auth-required*
reya · 3w
I think this is a bug from haven, instead of sent auth-request, it sent: ``` 2026-06-27T14:19:18.099984Z DEBUG nostr_sdk::relay::inner: Received '["CLOSED","gift-wraps","blocked: you must be in the web of trust to chat with the relay owner"]' from 'wss://relay.reya.su/chat' ```
reya · 3w
the issue still persist, here are my logs: ``` 2026-06-27T14:19:18.058769Z DEBUG nostr_sdk::relay::inner: Received '["AUTH","050e843f5f3ee2d0"]' from 'wss://relay.reya.su/chat' 2026-06-27T14:19:18.069279Z DEBUG nostr_sdk::relay::inner: Sending '["AUTH",{"content":"" 2026-06-27T14:19:18.099984Z DEBUG...
Yuki Kishimoto profile picture
rust-nostr v0.45.0-alpha.2 is out for testing!

This alpha includes a major API redesign and several improvements.

Still WIP, feedback is welcome before the final release.

#rustnostr #rust-nostr #nostr #rustlang #rust
11❤️1🚀1
daywalker · 3w
Looking good in my local branch for cln-nip47.
reya · 10w
You can try run my project: https://git.reya.su/reya/coop-mobile/src/branch/develop/ it is very basic app, didn't have much code for now, and it run on a my fork of nostr-sdk-ffi, but it almost same a...
Yuki Kishimoto profile picture
I just took a quick look, and I think the problem is that the relays being added with NONE capabilites. This means they can't do anything (neither read nor write).

Unless you want to use specific capabilities, you can omit that argument in addRelay, so they will be added with the default capabilities (READ + WRITE).
reya · 10w
You can try run my project: https://git.reya.su/reya/coop-mobile/src/branch/develop/ it is very basic app, didn't have much code for now, and it run on a my fork of nostr-sdk-ffi, but it almost same as upstream (I only add more functions)