Skip to content

Commit

Permalink
Release v0.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Mar 15, 2024
1 parent ee2f59a commit e675b47
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion bindings/nostr-sdk-js/examples/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@rust-nostr/nostr-sdk": "^0.11.0",
"@rust-nostr/nostr-sdk": "^0.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/nostr-sdk/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
members = ["."]

[dependencies]
nostr-sdk = "0.28"
nostr-sdk = "0.29"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
6 changes: 3 additions & 3 deletions book/snippets/nostr-sdk/rust/src/quickstart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ pub async fn quickstart() -> Result<()> {

// ANCHOR: create-filter
let filter = Filter::new().kind(Kind::Metadata);
client.subscribe(vec![filter]).await;
let sub_id: SubscriptionId = client.subscribe(vec![filter], None).await;
// ANCHOR_END: create-filter

// ANCHOR: notifications
let mut notifications = client.notifications();
while let Ok(notification) = notifications.recv().await {
if let RelayPoolNotification::Event { event, .. } = notification {
if event.kind == Kind::Metadata {
if let RelayPoolNotification::Event { subscription_id, event, .. } = notification {
if subscription_id == sub_id && event.kind == Kind::Metadata {
// handle the event
break; // Exit
}
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/nostr/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@rust-nostr/nostr": "0.11.0"
"@rust-nostr/nostr": "0.12.0"
}
}
6 changes: 3 additions & 3 deletions book/snippets/nostr/js/src/nip44.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Keys, PublicKey, nip44_encrypt, nip44_decrypt, NIP44Version, loadWasmSync } = require("@rust-nostr/nostr");
const { Keys, PublicKey, nip44Encrypt, nip44Decrypt, NIP44Version, loadWasmSync } = require("@rust-nostr/nostr");

function run() {
loadWasmSync();
Expand All @@ -7,10 +7,10 @@ function run() {

let public_key = PublicKey.fromHex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798");

let ciphertext = nip44_encrypt(keys.secretKey, public_key, "my message", NIP44Version.V2)
let ciphertext = nip44Encrypt(keys.secretKey, public_key, "my message", NIP44Version.V2)
console.log("Encrypted: " + ciphertext)

let plaintext = nip44_decrypt(keys.secretKey, public_key, ciphertext)
let plaintext = nip44Decrypt(keys.secretKey, public_key, ciphertext)
console.log("Decrypted: " + plaintext)
}

Expand Down
2 changes: 1 addition & 1 deletion book/snippets/nostr/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nostr-protocol==0.9.0
nostr-protocol==0.10.0
2 changes: 1 addition & 1 deletion book/snippets/nostr/python/src/event/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def event_builder():
keys = Keys.generate()

# Compose custom event
custom_event = EventBuilder(1111, "", []).to_event(keys)
custom_event = EventBuilder(Kind(1111), "", []).to_event(keys)

# Compose text note
textnote_event = EventBuilder.text_note("Hello", []).to_event(keys)
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/nostr/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2021"
members = ["."]

[dependencies]
nostr = "0.28"
nostr = "0.29"
12 changes: 6 additions & 6 deletions book/src/nostr-sdk/02-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Add the `nostr-sdk` dependency in your `Cargo.toml` file:

```toml
[dependencies]
nostr-sdk = "0.28"
nostr-sdk = "0.29"
```

Alternatively, you can add it directly from `git` source:

```toml
[dependencies]
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.28.0" }
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.29.0" }
```

```admonish info
Expand All @@ -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.9.1
nostr-sdk==0.10.0
```

Import the library in your code:
Expand Down Expand Up @@ -88,7 +88,7 @@ Alternatively, you can manually add the dependency in your `package.json` file:
```json
{
"dependencies": {
"@rust-nostr/nostr-sdk": "0.11.0"
"@rust-nostr/nostr-sdk": "0.12.0"
}
}
```
Expand Down Expand Up @@ -140,7 +140,7 @@ repositories {
}

dependencies {
implementation("io.github.rust-nostr:nostr-sdk:0.9.1")
implementation("io.github.rust-nostr:nostr-sdk:0.10.0")
}
```

Expand Down Expand Up @@ -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.9.1"),
.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.10.0"),
```

</section>
Expand Down
12 changes: 6 additions & 6 deletions book/src/nostr/02-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Add the `nostr` dependency in your `Cargo.toml` file:

```toml,ignore
[dependencies]
nostr = "0.28"
nostr = "0.29"
```

Alternatively, you can add it directly from `git` source:

```toml,ignore
[dependencies]
nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.28.0" }
nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.29.0" }
```

```admonish info
Expand All @@ -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.9.0
nostr-protocol==0.10.0
```

Import the library in your code:
Expand Down Expand Up @@ -87,7 +87,7 @@ Alternatively, you can manually add the dependency in your `package.json` file:
```json
{
"dependencies": {
"@rust-nostr/nostr": "0.11.0"
"@rust-nostr/nostr": "0.12.0"
}
}
```
Expand Down Expand Up @@ -139,7 +139,7 @@ repositories {
}
dependencies {
implementation("io.github.rust-nostr:nostr:0.9.0")
implementation("io.github.rust-nostr:nostr:0.10.0")
}
```

Expand Down Expand Up @@ -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.9.0"),
.package(url: "https://github.com/rust-nostr/nostr-swift.git", from: "0.10.0"),
```

Import the library in your code:
Expand Down

0 comments on commit e675b47

Please sign in to comment.