Update Rust crate nostr to 0.36.0 - autoclosed #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.34.1
->0.36.0
0.35.0
->0.36.0
Release Notes
rust-nostr/nostr (nostr)
v0.36.0
Compare Source
Summary
Many, many improvements to
Relay
andRelayPool
performance (reduced atomic operations and switched to async concurrency),add
NostrSigner
trait, better methods and struct names (fetch_events
instead ofget_events_of
,sync
instead ofreconcile
,NostrConnect
instead ofNip46Signer
and so on), addLocalRelay
and allow to easily serve it as hidden onion service with the embeddedtor client, allow to keep track of negentropy sync progress, almost halved the weight of JavaScript SDK bindings (from ~6.3MB to ~3.6MB), some fixes and many more!
Note for Python, Kotlin, Swift and JavaScript devs: unfortunately I can't mark things as deprecated in bindings, so this release have many breaking changes, sorry :(
Note for devs who are using
nostr-protocol
(Python),org.rust-nostr:nostr
(Kotlin),nostr-swift
(Swift) or@rust-nostr/nostr
(JavaScript) libraries: these packages are now deprecated. Only thenostr-sdk
library will be released, which include everything that was in thenostr
library.Changed
1.82.0
nostr-signer
crate tonostr-connect
([Yuki Kishimoto])TagsIndexes
intoTags
struct ([Yuki Kishimoto])OnceCell
implementation fromstd
lib instead ofonce_cell
([Yuki Kishimoto])impl Ord for Event
behaviour (descending order instead of ascending) ([Yuki Kishimoto])TagStandard::Relays
variant value fromVec<UncheckedUrl>
toVec<Url>
([Yuki Kishimoto])EventBuilder
([Yuki Kishimoto])sign
,sign_with_keys
,sign_with_ctx
,build
andbuild_with_supplier
methods toEventBuilder
([Yuki Kishimoto])to_event
,to_event_with_ctx
andto_unsigned_event
methods ([Yuki Kishimoto])Session::check_rate_limit
method ([Yuki Kishimoto])RelayPool::remove_relay
behavior ([Yuki Kishimoto])60_000
([Yuki Kishimoto])RelayNotification::Shutdown
variant ([Yuki Kishimoto])NegentropyOptions
andNegentropyDirection
toSyncOptions
andSyncDirection
([Yuki Kishimoto])RelayPool
methods ([Yuki Kishimoto])RelayConnectionStats
andRelayFiltering
structs ([Yuki Kishimoto])RelayStatus
([Yuki Kishimoto])RwLock
withOnceCell
forexternal_notification_sender
([Yuki Kishimoto])InternalRelay::send_notification
and linked methods to sync ([Yuki Kishimoto])RelayNotification
cloning when not needed inInternalRelay::send_notification
([Yuki Kishimoto])InnerRelay
clone when requesting NIP11 document ([Yuki Kishimoto])MAX_ADJ_RETRY_SEC
to 120 secs ([Yuki Kishimoto])Relay
andRelayPool
([Yuki Kishimoto])RelaySendOptions::skip_disconnected
([Yuki Kishimoto])RelayConnectionStats::uptime
([Yuki Kishimoto])Initialized
([Yuki Kishimoto])RelayPool
([Yuki Kishimoto])Relay::batch_event
andRelay::auth
([Yuki Kishimoto])RelaySendOptions
([Yuki Kishimoto])Client::get_events_of
andClient::get_events_from
methods ([Yuki Kishimoto])Events
instead ofVec<Event>
in fetch and query methods ([Yuki Kishimoto])stream_events_of
tostream_events
([Yuki Kishimoto])Client::reconcile
andClient::reconcile_with
([Yuki Kishimoto])tor
feature is enabled on non-mobile targets ([Yuki Kishimoto])RelayPool
instead of clone inClient:pool
([Yuki Kishimoto])nip44
feature ifnip59
is enabled ([Yuki Kishimoto])Nip46Signer
toNostrConnect
([Yuki Kishimoto])BTreeCappedSet
([Yuki Kishimoto])Lmdb::single_filter_query
([Yuki Kishimoto])tag
module ([Yuki Kishimoto])nostr-ffi
innostr-sdk-ffi
([Yuki Kishimoto])nostr-js
intonostr-sdk-js
([Yuki Kishimoto])opt-level
toz
([Yuki Kishimoto])Added
TagKind::Client
variant ([Yuki Kishimoto])TagKind::SingleLetter
([Yuki Kishimoto])Tags
struct ([Yuki Kishimoto])d
tag extraction test fromTags
([Yuki Kishimoto])TagStandard::GitClone
andTagKind::Clone
variants ([Yuki Kishimoto])TagStandard::GitCommit
andTagKind::Commit
variants ([Yuki Kishimoto])TagStandard::GitEarliestUniqueCommitId
variant ([Yuki Kishimoto])TagStandard::GitMaintainers
andTagKind::Maintainers
variants ([Yuki Kishimoto])TagStandard::Web
andTagKind::Web
variants ([Yuki Kishimoto])EventBuilder::git_repository_announcement
([Yuki Kishimoto])EventBuilder::git_issue
([Yuki Kishimoto])EventBuilder::git_patch
([Yuki Kishimoto])Tag::reference
constructor ([Yuki Kishimoto])nip59::make_seal
function ([Yuki Kishimoto])NostrSigner
trait ([Yuki Kishimoto])Backend::is_persistent
method ([Yuki Kishimoto])Events
struct ([Yuki Kishimoto])LocalRelay
andRelayBuilder
([Yuki Kishimoto])RelayBuilderMode
([Yuki Kishimoto])RelayBuilder
([Yuki Kishimoto])RelayPool::force_remove_relay
method ([Yuki Kishimoto])RelayFiltering::overwrite_public_keys
method ([Yuki Kishimoto])RelayPool::sync_targeted
([Yuki Kishimoto])Relay::reconcile_multi
([Yuki Kishimoto])RelayConnectionStats::success_rate
([Yuki Kishimoto])Client::fetch_events
andClient::fetch_events_from
methods ([Yuki Kishimoto])Client::sync
andClient::sync_with
methods ([Yuki Kishimoto])Client::sync
([Yuki Kishimoto])Client::force_remove_all_relays
([Yuki Kishimoto])Client::reset
andswitch-account
example ([Yuki Kishimoto])NostrSigner::gift_wrap
([Yuki Kishimoto])WebLNZapper
struct (moved fromnostr-webln
crate) ([Yuki Kishimoto])tag_kind_to_string
func ([Yuki Kishimoto])Tag::kind_str
method ([Yuki Kishimoto])Display
forKind
([Yuki Kishimoto])JsKind::_to_string
method ([Yuki Kishimoto])from_nostr_uri
andto_nostr_uri
forPublicKey
andEventId
([Yuki Kishimoto])Fixed
NostrConnectURI
de/serialization according to NIP46 ([Yuki Kishimoto])NostrConnect
according to NIP46Store::delete
([Yuki Kishimoto])Store::save_event
issues ([Yuki Kishimoto])filters empty
error when gossip option is enabled ([Yuki Kishimoto])Removed
RelayPool::reconcile_advanced
([Yuki Kishimoto])RelayPool::reconcile_with_items
([Yuki Kishimoto])nostr-webln
crate ([Yuki Kishimoto])nostr-sqlite
crate ([Yuki Kishimoto])v0.35.0
Summary
Add gossip model support, deprecate
SQLite
database in favor ofLMDB
(fork of pocket database),
add support to negentropy v1 (old version is still supported!), add
MockRelay
(a local disposable relay for tests),allow usage of embedded tor client on mobile devices, many improvements, bugs fix and more!
Changed
bitcoin
tov0.32
([Yuki Kishimoto])base64
tov0.22
([Yuki Kishimoto])Event::from_value
([Yuki Kishimoto])Tag::as_vec
([Yuki Kishimoto])RawRelayMessage
parsing ([Yuki Kishimoto])Event
fields ([Yuki Kishimoto])Event::is_*
kind related methods ([Yuki Kishimoto])TryIntoUrl::Err
toInfallible
forUrl
([Yuki Kishimoto])Event::verify_id
andEvent::verify_signature
fingerprint ([Yuki Kishimoto])Debug
,PartialEq
andEq
forKeys
([Yuki Kishimoto])PartialOrd
,Ord
andHash
forKeys
([Yuki Kishimoto])Keys::secret_key
andKeys::sign_schnorr
methods fingerprint ([Yuki Kishimoto])Keys::generate_without_keypair
([Yuki Kishimoto])NostrWalletConnectURI
parsing ([Yuki Kishimoto])EventBuilder::job_feedback
method fingerprint ([Yuki Kishimoto])EventBuilder::to_pow_event
([Yuki Kishimoto])Display
forMachineReadablePrefix
([Yuki Kishimoto])Keys
docs ([Yuki Kishimoto])public_key
field inKeys
struct ([Yuki Kishimoto])Keys::public_key_ref
([Yuki Kishimoto])OsRng
instead ofThreadRng
forSECP256K1
global context and schnorr signing ([Yuki Kishimoto])Timestamp::to_human_datetime
performance ([Yuki Kishimoto])EventId::owned
([Yuki Kishimoto])EventId::all_zeroes
to const function ([Yuki Kishimoto])Timestamp::from_secs
to const function ([Yuki Kishimoto])Kind::as_u32
andKind::as_u64
([Yuki Kishimoto])NostrDatabase
supertraits ([Yuki Kishimoto])Clone
forMemoryDatabase
([Yuki Kishimoto])NostrDatabase::event_by_id
fingerprint ([Yuki Kishimoto])tokio-tungstenite
tov0.24
([Yuki Kishimoto])async-wsocket
tov0.8
([Yuki Kishimoto])Url
andRelay
clone inRelayPool
methods ([Yuki Kishimoto])Relay
clone inRelayPool::connect_relay
method ([Yuki Kishimoto])RelayPool::send_event
andRelayPool::batch_event
send only to relays withWRITE
flag ([Yuki Kishimoto])RelayPool::subscribe_with_id
,RelayPool::get_events_of
andRelayPool::stream_events_of
REQ events only to relays withREAD
flag ([Yuki Kishimoto])async-wsocket
tov0.9
([Yuki Kishimoto])Relay::support_negentropy
method ([Yuki Kishimoto])error
towarn
([Yuki Kishimoto])webln
tov0.3
([Yuki Kishimoto])SQLiteDatabase
in favor of LMDB ([Yuki Kishimoto])lnurl-pay
tov0.6
([Yuki Kishimoto])Client::gift_wrap
andClient::gift_wrap_to
methods signature ([Yuki Kishimoto])Client::metadata
toClient::fetch_metadata
([Janek])Client::shutdown
method fingerprint ([Yuki Kishimoto])Client::add_relay_with_opts
andClient::add_relays
([Yuki Kishimoto])RelayPool::send_msg
andRelayPool::batch_msg
([Yuki Kishimoto])Client::add_relay
orClient::add_read_relay
methods ([Yuki Kishimoto])Display
forCoordinate
([Yuki Kishimoto])Connection::embedded_tor
fingerprint forandroid
andios
targets ([Yuki Kishimoto])open
command toshell
([Yuki Kishimoto])serve-signer
command tobunker
([Yuki Kishimoto])Added
TryFrom<Vec<Tag>>
forLiveEvent
([w3irdrobot])Tag::as_slice
([Yuki Kishimoto])NostrWalletConnectURI::parse
([Yuki Kishimoto])JobFeedbackData
struct ([Yuki Kishimoto])EventBuilder::pow
method ([Yuki Kishimoto])TagKind::custom
constructor ([Yuki Kishimoto])Timestamp::from_secs
([Yuki Kishimoto])EventId::from_byte_array
([Yuki Kishimoto])Timestamp::min
andTimestamp::max
([Yuki Kishimoto])nip65::extract_owned_relay_list
([Yuki Kishimoto])Kind::from_u16
([Yuki Kishimoto])DatabaseHelper::fast_query
([Yuki Kishimoto])NostrDatabase::check_id
([Yuki Kishimoto])NostrDatabaseExt::relay_lists
([Yuki Kishimoto])MockRelay
([Yuki Kishimoto])RelayPool::disconnect_relay
method ([Yuki Kishimoto])RelayPool::relays_with_flag
andRelayPool::all_relays
([Yuki Kishimoto])Client::add_discovery_relay
([Yuki Kishimoto])Client::add_read_relay
andClient::add_write_relay
([Yuki Kishimoto])Client::stream_events_targeted
([Yuki Kishimoto])Client::subscribe_targeted
([Yuki Kishimoto])Client::send_event
([Yuki Kishimoto])Client::get_events_of
andClient::stream_events_of
([Yuki Kishimoto])Client::subscribe
andClient::subscribe_with_id
([Yuki Kishimoto])as_pretty_json
for some structs ([Yuki Kishimoto])Client::fetch_metadata
([Yuki Kishimoto])Client::pool
method ([Yuki Kishimoto])Kind::is_*
methods ([Yuki Kishimoto])MockRelay
([Yuki Kishimoto])Kind
object ([Yuki Kishimoto])getNip05Profile
function ([Yuki Kishimoto])JsCoordinate
([Yuki Kishimoto])RelayPool::relays
([Yuki Kishimoto])serve
command ([Yuki Kishimoto])Fixed
TagStanderd::to_vec
([nanikamado])JsonUtil::try_as_pretty_json
method ([Yuki Kishimoto])Kind::is_regular
method ([Yuki Kishimoto])Removed
rocksdb
([Yuki Kishimoto])bech32
from the public API ([Yuki Kishimoto])Keys::from_public_key
([Yuki Kishimoto])tracing
dep ([Yuki Kishimoto])fmt::Display
forSecretKey
([Yuki Kishimoto])has_event_already_been_saved
,has_event_already_been_seen
andhas_event_id_been_deleted
methods fromNostrDatabase
([Yuki Kishimoto])Err
fromNostrDatabase
([Yuki Kishimoto])NostrDatabase::bulk_import
([Yuki Kishimoto])DatabaseError::NotFound
variant ([Yuki Kishimoto])DatabaseError::Nostr
variant ([Yuki Kishimoto])Order
enum ([Yuki Kishimoto])order
arg fromNostrDatabase::query
([Yuki Kishimoto])Error::OneShotRecvError
variant ([Yuki Kishimoto])Err
fromNostrZapper
and unnecessary variants fromZapperError
([Yuki Kishimoto])Keys::vanity
([Yuki Kishimoto])reverse
flag fromquery
command ([Yuki Kishimoto])Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.