Avatar
Yuki Kishimoto
68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272
GitHub: https://github.com/yukibtc PGP: 86F3 105A DFA8 AB58 7268 DCD7 8D3D CD04 2496 19D1

nostr:nprofile1qqsprwdgjszdhucrfelp3p46nhzvd5mk7gu6zxp8r0fwc4n63zv9pnsppemhxue69uhkummn9ekx7mp0rqtknc, yeah, you can use nostrdb APIs directly for the zero-copy queries and nostr-sdk for the networking stuff.

You can eventually clone the nostrdb instance and pass it to nostr-sdk just to automatically save the events received from the relays into nostrdb.

## rust-nostr v0.40 is out! πŸ¦€

### Summary

Add NIP-38 and NIP-62 support, add nostr parser, to easily parse any text and extract nostr URIs, URLs and more, extend `Tags` capabilities (i.e., add deduplication support), add admission policy, to selectively select which events to allow receiving and which to reject, add Mac Catalyst support for Swift package, many cleanups, refactoring and performance improvements and more!

Full changelog: https://rust-nostr.org/changelog

### Contributors

Thanks to all contributors!

* nostr:npub1ahaz04ya9tehace3uy39hdhdryfvdkve9qdndkqp3tvehs6h8s5slq45hy

* nostr:nprofile1qqsqqqqqq9g9uljgjfcyd6dm4fegk8em2yfz0c3qp3tc6mntkrrhawgpzfmhxue69uhkummnw3ezudrjwvhxumq3dg0ly

* nostr:npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445

* nostr:npub16ye7evyevwnl0fc9hujsxf9zym72e063awn0pvde0huvpyec5nyq4dg4wn

* magine

### Links

https://rust-nostr.org

https://rust-nostr.org/donate

#rustnostr #nostr #rustlang #programming #rust #python #javascript #kotlin #swift #flutter

Replying to Avatar lemon

I pushed an update to publish a DM instead of a Kind 1 note, but it’s still not working quite right

I see the DM response in Damus, but it doesn’t show in Primal

Not sure of the issue so I’ll have to keep working on it

nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet, direct messages are no longer possible on the Nostr-sdk, right?

Only NIP17 private messages?

I prefer NIP17, but a lot of users still use Damus and Primal and they are behind in that regard unfortunately

You have to build manually the event:

```python

encrypted_content = nip04_encrypt(sk, pk, msg)

builder = EventBuilder(4, encrypted_content).tag(Tag.public_key(pk))

client.send_event_builder(builder)

```

I've started working on it here: https://github.com/rust-nostr/nostr/pull/797

For now I've only implemented the algorithm for NIP117. Soon I'll add also support for persistent session state and integration with the nostr-sdk library.

For devs who use rust-nostr bindings and care about app size: use v0.39 or later, older versions are bloated due to a bug in uniffi.

#rustnostr #rust-nostr #kotlin #python #swift #jvm

Replying to Avatar LibertyImp

I've uses both the book and rustlings: https://github.com/rust-lang/rustlings/

There is also the "Rust by example" book: https://doc.rust-lang.org/rust-by-example/

While you read the book, try to make projects from scratch (not just simple ones). At the end, writing code is the best way to learn it.

Yes, it's most likely due to the python version. What python version are you using?

Replying to Avatar 0xtr

Just want to say thank you to the nostr OGs still working on freedom tech. We were few at the beginning but this is only the start πŸ”₯

nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6

nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s

nostr:npub12262qa4uhw7u8gdwlgmntqtv7aye8vdcmvszkqwgs0zchel6mz7s6cgrkj

nostr:npub1melv683fw6n2mvhl5h6dhqd8mqfv3wmxnz4qph83ua4dk4006ezsrt5c24

nostr:npub1gm7tuvr9atc6u7q3gevjfeyfyvmrlul4y67k7u7hcxztz67ceexs078rf6

nostr:npub1qqqqqqyz0la2jjl752yv8h7wgs3v098mh9nztd4nr6gynaef6uqqt0n47m

nostr:npub1nxy4qpqnld6kmpphjykvx2lqwvxmuxluddwjamm4nc29ds3elyzsm5avr7

nostr:npub1dergggklka99wwrs92yz8wdjs952h2ux2ha2ed598ngwu9w7a6fsh9xzpc

nostr:npub15lmjekxgcl8337n0gnqnrcqatwyv9arhywjkvfh0x0tfjrn2nu2sgz2796

nostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m

nostr:npub1yxp7j36cfqws7yj0hkfu2mx25308u4zua6ud22zglxp98ayhh96s8c399s

nostr:npub1nmr6w7qk0ta36vxysv77jv3d5rqghfc6d8sez8240rf3gja4vsmsd2yha8

nostr:npub1qny3tkh0acurzla8x3zy4nhrjz5zd8l9sy9jys09umwng00manysew95gx

nostr:npub19mun7qwdyjf7qs3456u8kyxncjn5u2n7klpu4utgy68k4aenzj6synjnft

nostr:npub1az9xj85cmxv8e9j9y80lvqp97crsqdu2fpu3srwthd99qfu9qsgstam8y8

nostr:npub1c878wu04lfqcl5avfy3p5x83ndpvedaxv0dg7pxthakq3jqdyzcs2n8avm

nostr:npub1jutptdc2m8kgjmudtws095qk2tcale0eemvp4j2xnjnl4nh6669slrf04x

nostr:npub1u8lnhlw5usp3t9vmpz60ejpyt649z33hu82wc2hpv6m5xdqmuxhs46turz

nostr:npub13prsf02zzus79yhdhl6zadm4gllpzhr0lxp9kz8uxe47fntfa8mqyrh6a9

The dishwasher bot account.

Whoever made Anigma.

And all the others I forget to mention. i am sorry if I forgot you, please reply so history is not forgotten!

I have screenshots of most of you from 2022. We all had a vision and decided to start and build a decentralized social network outside of Twitter and wannabe freedom network Mastodon.

Ya’ll have my utmost respect, forever.

Long live nostr. Long live freedom of speech.

We do not forgive. We do not forget. Expect us.

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.

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).

The rust library for flutter compiles to wasm but I don't know how to pack and ship the flutter package for web. For the desktop and mobile platforms I use cargokit but it doesn't work for the web.

For now are available: Keys signer (with both NIP04 and NIP44 support), NIP59, event de/serialization, event building and the SDK Client (NIP42 auto authentication, gossip, event sending, event fetching and subscriptions).

I'll add the other stuff as I find the time. If you need something specific, let me know that I'll expose it.

## rust-nostr v0.39 is out! πŸ¦€

### Summary

Add NIP96 support, add NIP22 helpers, NIP01 adjustments, add `try_connect` and `wait_for_connection` methods for better connection handling, support for custom WebSocket clients (both in Rust, Python, Kotlin and Swift), new JVM bindings (Linux, macOS and Windows), huge reduction of UniFFI bindings binaries size, many cleanups, refactoring and performance improvements and more!

Full changelog: https://rust-nostr.org/changelog

### Contributors

Thanks to all code contributors!

* nostr:npub1qqqqqqqx2tj99mng5qgc07cgezv5jm95dj636x4qsq7svwkwmwnse3rfkq

* nostr:npub1zwnx29tj2lnem8wvjcx7avm8l4unswlz6zatk0vxzeu62uqagcash7fhrf

* nostr:npub1r3cnzta52fee26c83cnes8wvzkch3kud2kll67k402x04mttt26q0wfx0c

* nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49

* ethicnology

* Gudnessuche

Thank also to nostr:npub1useke4f9maul5nf67dj0m9sq6jcsmnjzzk4ycvldwl4qss35fvgqjdk5ks, nostr:npub1a3tx8wcrt789skl6gg7rqwj4wey0j53eesr4z6asd4h4jwrd62jq0wkq4k and spacecowboy!

### Links

https://rust-nostr.org

https://rust-nostr.org/donate

#rustnostr #nostr #rustlang #programming #rust #python #javascript #kotlin #swift #flutter