Skip to content

Commit

Permalink
Release v0.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Feb 16, 2024
1 parent 5eacb35 commit 60ad4ac
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 22 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.10.0",
"@rust-nostr/nostr-sdk": "^0.11.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.27"
nostr-sdk = "0.28"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
2 changes: 1 addition & 1 deletion book/snippets/nostr-sdk/rust/src/quickstart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub async fn quickstart() -> Result<()> {
client
.add_relay_with_opts(
"wss://relay.nostr.info",
RelayOptions::new().proxy(proxy).write(false),
RelayOptions::new().proxy(proxy).flags(RelayServiceFlags::default().remove(RelayServiceFlags::WRITE)),
)
.await?;
client
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.10.0"
"@rust-nostr/nostr": "0.11.0"
}
}
4 changes: 2 additions & 2 deletions book/snippets/nostr/js/src/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function keys() {
let keys2 = new Keys(secretKey);
console.log("Secret key (hex): ", keys2.secretKey.toHex());

// Try to init Keys from hex or bech32 secret key
let keys3 = Keys.fromSkStr("nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85");
// Try to parse Keys from secret key hex or bech32
let keys3 = Keys.parse("nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85");

let publicKey = PublicKey.fromHex("7b911fd37cdf5c81d4c0adb1ab7fa822ed253ab0ad9aa18d77257c88b29b718e");
let keys4 = Keys.fromPublicKey(publicKey);
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.8.0
nostr-protocol==0.9.0
3 changes: 3 additions & 0 deletions book/snippets/nostr/python/src/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ def keys():
print(" Secret keys:")
print(f" hex: {secret_key.to_hex()}")
print(f" bech32: {secret_key.to_bech32()}")

# Parse keys from hex or bech32
keys = Keys.parse("nsec1j4c6269y9w0q2er2xjw8sv2ehyrtfxq3jwgdlxj6qfn8z4gjsq5qfvfk99")
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.27"
nostr = "0.28"
5 changes: 4 additions & 1 deletion book/snippets/nostr/rust/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ pub fn keys() -> Result<()> {

println!("Public key (hex): {}", public_key);
println!("Public key (bech32): {}", public_key.to_bech32()?);
println!("Secret key (hex): {}", keys.secret_key()?.display_secret());
println!("Secret key (hex): {}", keys.secret_key()?.to_secret_hex());
println!("Secret key (bech32): {}", secret_key.to_bech32()?);

// Parse keys from hex or bech32
let keys = Keys::parse("nsec1j4c6269y9w0q2er2xjw8sv2ehyrtfxq3jwgdlxj6qfn8z4gjsq5qfvfk99")?;

Ok(())
}
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.27"
nostr-sdk = "0.28"
```

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

```toml
[dependencies]
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.27.0" }
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.28.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.8.0
nostr-sdk==0.9.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.10.0"
"@rust-nostr/nostr-sdk": "0.11.0"
}
}
```
Expand Down Expand Up @@ -140,7 +140,7 @@ repositories {
}

dependencies {
implementation("io.github.rust-nostr:nostr-sdk:0.8.0")
implementation("io.github.rust-nostr:nostr-sdk:0.9.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.8.0"),
.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.9.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.27"
nostr = "0.28"
```

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

```toml,ignore
[dependencies]
nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.27.0" }
nostr = { git = "https://github.com/rust-nostr/nostr", tag = "v0.28.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.8.0
nostr-protocol==0.9.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.10.0"
"@rust-nostr/nostr": "0.11.0"
}
}
```
Expand Down Expand Up @@ -139,7 +139,7 @@ repositories {
}
dependencies {
implementation("io.github.rust-nostr:nostr:0.8.0")
implementation("io.github.rust-nostr:nostr:0.9.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.8.0"),
.package(url: "https://github.com/rust-nostr/nostr-swift.git", from: "0.9.0"),
```

Import the library in your code:
Expand Down
2 changes: 1 addition & 1 deletion contrib/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Publish `JS` bindings
* Publish `Swift` bindings

* Bump versions in `book`
* Bump versions in `book` (**without commit**, commit in next step)
* Update examples
* Rust book tests: `make check-book`

Expand Down

0 comments on commit 60ad4ac

Please sign in to comment.