From 5d9cd759512cd2c6196be9645dd26371d24218ac Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Fri, 12 Apr 2024 17:24:22 +0200 Subject: [PATCH] Release `v0.30.0` Signed-off-by: Yuki Kishimoto --- CHANGELOG.md | 15 ++++++++++++++- book/snippets/nostr-sdk/rust/Cargo.toml | 2 +- book/snippets/nostr/js/package.json | 2 +- book/snippets/nostr/js/src/nip59.js | 6 ++++-- .../nostr/kotlin/gradle/libs.versions.toml | 2 +- book/snippets/nostr/python/requirements.txt | 2 +- book/snippets/nostr/python/src/nip59.py | 7 +++++-- book/snippets/nostr/rust/Cargo.toml | 2 +- .../nostr/swift/NostrSnippets/Package.swift | 2 +- book/src/nostr-sdk/02-installation.md | 12 ++++++------ book/src/nostr/02-installation.md | 12 ++++++------ contrib/release.md | 2 ++ 12 files changed, 43 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2327d061e..6c43d0474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Summary +### Changed + +### Added + +### Fixed + +### Removed + +## [v0.30.0] + +### Summary + Adapted NIP46 to last changes, added `NostrConnectRemoteSigner` to easily build remote signers (just construct it and call `serve` method), improved proxy options (allow to specify the proxy target: all relays or only `.onion` ones), improvements to NWC client, fixed equality operator for some foreign language (python still need to use `a.__eq__(b)`), @@ -95,4 +107,5 @@ added `nostrdb` storage backend, added NIP32 and completed NIP51 support and mor [Xiao Yu]: https://github.com/kasugamirai -[Unreleased]: https://github.com/rust-nostr/nostr/compare/v0.29.0...HEAD +[Unreleased]: https://github.com/rust-nostr/nostr/compare/v0.30.0...HEAD +[v0.30.0]: https://github.com/rust-nostr/nostr/compare/v0.30.0...HEAD diff --git a/book/snippets/nostr-sdk/rust/Cargo.toml b/book/snippets/nostr-sdk/rust/Cargo.toml index 4e24fb93f..4fc79aba1 100644 --- a/book/snippets/nostr-sdk/rust/Cargo.toml +++ b/book/snippets/nostr-sdk/rust/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" members = ["."] [dependencies] -nostr-sdk = "0.29" +nostr-sdk = "0.30" tokio = { version = "1", features = ["rt-multi-thread", "macros"] } \ No newline at end of file diff --git a/book/snippets/nostr/js/package.json b/book/snippets/nostr/js/package.json index 31abf7eba..4d694e9f1 100644 --- a/book/snippets/nostr/js/package.json +++ b/book/snippets/nostr/js/package.json @@ -5,6 +5,6 @@ "main": "index.js", "license": "MIT", "dependencies": { - "@rust-nostr/nostr": "0.12.0" + "@rust-nostr/nostr": "0.13.0" } } \ No newline at end of file diff --git a/book/snippets/nostr/js/src/nip59.js b/book/snippets/nostr/js/src/nip59.js index b329177e2..ecfe1c98d 100644 --- a/book/snippets/nostr/js/src/nip59.js +++ b/book/snippets/nostr/js/src/nip59.js @@ -1,4 +1,4 @@ -const { Keys, EventBuilder, loadWasmSync } = require("@rust-nostr/nostr"); +const { Keys, EventBuilder, UnwrappedGift, loadWasmSync } = require("@rust-nostr/nostr"); function run() { loadWasmSync(); @@ -17,7 +17,9 @@ function run() { console.log("Gift Wrap: " + gw.asJson()) // Extract rumor from gift wrap with receiver keys - // TODO + let unwrapped_gift = UnwrappedGift.fromGiftWrap(bob_keys, gw); + console.log("Sender: ", unwrapped_gift.sender.toBech32()) + console.log("Rumor: ", unwrapped_gift.rumor.asJson()) } module.exports.run = run; \ No newline at end of file diff --git a/book/snippets/nostr/kotlin/gradle/libs.versions.toml b/book/snippets/nostr/kotlin/gradle/libs.versions.toml index cc7cda1b4..a3a8b0f31 100644 --- a/book/snippets/nostr/kotlin/gradle/libs.versions.toml +++ b/book/snippets/nostr/kotlin/gradle/libs.versions.toml @@ -3,7 +3,7 @@ agp = "8.1.4" kotlin = "1.9.22" [libraries] -nostr = { module = "io.github.rust-nostr:nostr", version = "0.10.0" } +nostr = { module = "io.github.rust-nostr:nostr", version = "0.11.0" } [plugins] androidLibrary = { id = "com.android.library", version.ref = "agp" } diff --git a/book/snippets/nostr/python/requirements.txt b/book/snippets/nostr/python/requirements.txt index 844391942..c1f70d89c 100644 --- a/book/snippets/nostr/python/requirements.txt +++ b/book/snippets/nostr/python/requirements.txt @@ -1 +1 @@ -nostr-protocol==0.10.0 \ No newline at end of file +nostr-protocol==0.11.0 \ No newline at end of file diff --git a/book/snippets/nostr/python/src/nip59.py b/book/snippets/nostr/python/src/nip59.py index 62abd3145..bf538a9d2 100644 --- a/book/snippets/nostr/python/src/nip59.py +++ b/book/snippets/nostr/python/src/nip59.py @@ -1,4 +1,4 @@ -from nostr_protocol import Keys, EventBuilder, Event, gift_wrap, nip59_extract_rumor +from nostr_protocol import Keys, EventBuilder, Event, gift_wrap, UnwrappedGift, UnsignedEvent def nip59(): @@ -16,5 +16,8 @@ def nip59(): print(f"Gift Wrap: {gw.as_json()}") # Extract rumor from gift wrap with receiver keys - rumor = nip59_extract_rumor(bob_keys, gw) + unwrapped_gift = UnwrappedGift.from_gift_wrap(bob_keys, gw) + sender = unwrapped_gift.sender() + rumor: UnsignedEvent = unwrapped_gift.rumor() + print(f"Sender: {sender.to_bech32()}") print(f"Rumor: {rumor.as_json()}") diff --git a/book/snippets/nostr/rust/Cargo.toml b/book/snippets/nostr/rust/Cargo.toml index 831415999..9d4b1ef32 100644 --- a/book/snippets/nostr/rust/Cargo.toml +++ b/book/snippets/nostr/rust/Cargo.toml @@ -8,4 +8,4 @@ edition = "2021" members = ["."] [dependencies] -nostr = "0.29" +nostr = "0.30" diff --git a/book/snippets/nostr/swift/NostrSnippets/Package.swift b/book/snippets/nostr/swift/NostrSnippets/Package.swift index 2d391703a..4cd70de93 100644 --- a/book/snippets/nostr/swift/NostrSnippets/Package.swift +++ b/book/snippets/nostr/swift/NostrSnippets/Package.swift @@ -7,7 +7,7 @@ let package = Package( name: "NostrSnippets", platforms: [.macOS(.v13)], dependencies: [ - .package(url: "https://github.com/rust-nostr/nostr-swift", from:"0.10.0") + .package(url: "https://github.com/rust-nostr/nostr-swift", from:"0.11.0") ], targets: [ .executableTarget( diff --git a/book/src/nostr-sdk/02-installation.md b/book/src/nostr-sdk/02-installation.md index 25b3b880e..607274a2f 100644 --- a/book/src/nostr-sdk/02-installation.md +++ b/book/src/nostr-sdk/02-installation.md @@ -9,14 +9,14 @@ Add the `nostr-sdk` dependency in your `Cargo.toml` file: ```toml [dependencies] -nostr-sdk = "0.29" +nostr-sdk = "0.30" ``` Alternatively, you can add it directly from `git` source: ```toml [dependencies] -nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.29.0" } +nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.30.0" } ``` ```admonish info @@ -43,7 +43,7 @@ pip install nostr-sdk Alternatively, you can manually add the dependency in your `requrements.txt`, `setup.py`, etc.: ``` -nostr-sdk==0.10.0 +nostr-sdk==0.11.0 ``` Import the library in your code: @@ -88,7 +88,7 @@ Alternatively, you can manually add the dependency in your `package.json` file: ```json { "dependencies": { - "@rust-nostr/nostr-sdk": "0.12.0" + "@rust-nostr/nostr-sdk": "0.13.0" } } ``` @@ -140,7 +140,7 @@ repositories { } dependencies { - implementation("io.github.rust-nostr:nostr-sdk:0.10.0") + implementation("io.github.rust-nostr:nostr-sdk:0.11.0") } ``` @@ -190,7 +190,7 @@ as a package dependency in Xcode. Add the following to the dependencies array in your `Package.swift`: ``` swift -.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.10.0"), +.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.11.0"), ``` diff --git a/book/src/nostr/02-installation.md b/book/src/nostr/02-installation.md index 1ec704b0f..f45e16891 100644 --- a/book/src/nostr/02-installation.md +++ b/book/src/nostr/02-installation.md @@ -9,14 +9,14 @@ Add the `nostr` dependency in your `Cargo.toml` file: ```toml,ignore [dependencies] -nostr = "0.29" +nostr = "0.30" ``` Alternatively, you can add it directly from `git` source: ```toml,ignore [dependencies] -nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.29.0" } +nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.30.0" } ``` ```admonish info @@ -43,7 +43,7 @@ pip install nostr-protocol Alternatively, you can manually add the dependency in your `requrements.txt`, `setup.py`, etc.: ``` -nostr-protocol==0.10.0 +nostr-protocol==0.11.0 ``` Import the library in your code: @@ -87,7 +87,7 @@ Alternatively, you can manually add the dependency in your `package.json` file: ```json { "dependencies": { - "@rust-nostr/nostr": "0.12.0" + "@rust-nostr/nostr": "0.13.0" } } ``` @@ -139,7 +139,7 @@ repositories { } dependencies { - implementation("io.github.rust-nostr:nostr:0.10.0") + implementation("io.github.rust-nostr:nostr:0.11.0") } ``` @@ -188,7 +188,7 @@ as a package dependency in Xcode. Add the following to the dependencies array in your `Package.swift`: ``` swift -.package(url: "https://github.com/rust-nostr/nostr-swift.git", from: "0.10.0"), +.package(url: "https://github.com/rust-nostr/nostr-swift.git", from: "0.11.0"), ``` Import the library in your code: diff --git a/contrib/release.md b/contrib/release.md index a3caddfe8..e0e706a7d 100644 --- a/contrib/release.md +++ b/contrib/release.md @@ -28,6 +28,8 @@ * Bump versions in `book` (**without commit**, commit in next step) * Update examples * Rust book tests: `just check-book` + +* Update `CHANGELOG.md` * Commit and push (**WITH tag**) * `Release vX.X.X`