diff --git a/book/snippets/nostr/python/requirements.txt b/book/snippets/nostr/python/requirements.txt index 4a2c14bfa..192030b4b 100644 --- a/book/snippets/nostr/python/requirements.txt +++ b/book/snippets/nostr/python/requirements.txt @@ -1 +1 @@ -nostr-protocol==0.7.1 \ No newline at end of file +nostr-protocol==0.8.0 \ No newline at end of file diff --git a/book/snippets/nostr/python/src/event/builder.py b/book/snippets/nostr/python/src/event/builder.py index ef26c131c..128d8c409 100644 --- a/book/snippets/nostr/python/src/event/builder.py +++ b/book/snippets/nostr/python/src/event/builder.py @@ -7,10 +7,10 @@ def event_builder(): custom_event = EventBuilder(1111, "", []).to_event(keys) # Compose text note - textnote_event = EventBuilder.new_text_note("Hello", []).to_event(keys) + textnote_event = EventBuilder.text_note("Hello", []).to_event(keys) # Compose reply to above text note - reply_event = EventBuilder.new_text_note("Reply to hello", [Tag.event(textnote_event.id())]).to_event(keys) + reply_event = EventBuilder.text_note("Reply to hello", [Tag.event(textnote_event.id())]).to_event(keys) # Compose POW event - pow_event = EventBuilder.new_text_note("Another reply with POW", [Tag.event(textnote_event.id())]).to_pow_event(keys, 20) + pow_event = EventBuilder.text_note("Another reply with POW", [Tag.event(textnote_event.id())]).to_pow_event(keys, 20) diff --git a/book/snippets/nostr/rust/Cargo.toml b/book/snippets/nostr/rust/Cargo.toml index 416d80eae..b2a5f24fb 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.26" +nostr = "0.27" diff --git a/book/snippets/nostr/rust/src/event/builder.rs b/book/snippets/nostr/rust/src/event/builder.rs index b3a34d074..54edf026a 100644 --- a/book/snippets/nostr/rust/src/event/builder.rs +++ b/book/snippets/nostr/rust/src/event/builder.rs @@ -7,16 +7,16 @@ pub fn event() -> Result<()> { let custom_event = EventBuilder::new(Kind::Custom(1111), "", []).to_event(&keys)?; // Compose text note - let textnote_event = EventBuilder::new_text_note("Hello", []).to_event(&keys)?; + let textnote_event = EventBuilder::text_note("Hello", []).to_event(&keys)?; // Compose reply to above text note let reply_event = - EventBuilder::new_text_note("Reply to hello", [Tag::event(textnote_event.id)]) + EventBuilder::text_note("Reply to hello", [Tag::event(textnote_event.id)]) .to_event(&keys)?; // Compose POW event let pow_event = - EventBuilder::new_text_note("Another reply with POW", [Tag::event(textnote_event.id)]) + EventBuilder::text_note("Another reply with POW", [Tag::event(textnote_event.id)]) .to_pow_event(&keys, 20)?; Ok(()) diff --git a/book/src/nostr-sdk/02-installation.md b/book/src/nostr-sdk/02-installation.md index 8e4e694e5..582afa83e 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.26" +nostr-sdk = "0.27" ``` Alternatively, you can add it directly from `git` source: ```toml [dependencies] -nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.26.0" } +nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.27.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.7.1 +nostr-sdk==0.8.0 ``` Import the library in your code: @@ -140,7 +140,7 @@ repositories { } dependencies { - implementation("io.github.rust-nostr:nostr-sdk:") + implementation("io.github.rust-nostr:nostr-sdk:0.8.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.7.1"), +.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.8.0"), ``` diff --git a/book/src/nostr/02-installation.md b/book/src/nostr/02-installation.md index a6982f380..d27e2555b 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.26" +nostr = "0.27" ``` Alternatively, you can add it directly from `git` source: ```toml,ignore [dependencies] -nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.26.0" } +nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.27.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.7.1 +nostr-protocol==0.8.0 ``` Import the library in your code: @@ -139,7 +139,7 @@ repositories { } dependencies { - implementation("io.github.rust-nostr:nostr:") + implementation("io.github.rust-nostr:nostr:0.8.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.7.1"), +.package(url: "https://github.com/rust-nostr/nostr-swift.git", from: "0.8.0"), ``` Import the library in your code: