diff --git a/snippets/csharp/Hello.cs b/snippets/csharp/Hello.cs
index 5913349..a3825be 100644
--- a/snippets/csharp/Hello.cs
+++ b/snippets/csharp/Hello.cs
@@ -14,7 +14,8 @@ public static async Task SayHello()
// ANCHOR_END: client
// ANCHOR: connect
- await client.AddRelay("wss://relay.damus.io");
+ var relayUrl = RelayUrl.Parse("wss://relay.damus.io");
+ await client.AddRelay(relayUrl);
await client.Connect();
// ANCHOR_END: connect
diff --git a/snippets/csharp/Req/Fetch.cs b/snippets/csharp/Req/Fetch.cs
index d2ed61f..c427a0e 100644
--- a/snippets/csharp/Req/Fetch.cs
+++ b/snippets/csharp/Req/Fetch.cs
@@ -10,7 +10,8 @@ public static async Task Run()
// ANCHOR: client
var client = new Client();
- await client.AddRelay("wss://relay.damus.io");
+ var relayUrl = RelayUrl.Parse("wss://relay.damus.io");
+ await client.AddRelay(relayUrl);
await client.Connect();
// ANCHOR_END: client
@@ -21,7 +22,7 @@ public static async Task Run()
// ANCHOR: fetch-from
var filter2 = new Filter().Kind(Kind.FromStd(KindStandard.TextNote)).Limit(5);
- var events2 = await client.FetchEventsFrom(["wss://relay.damus.io"], filter2, TimeSpan.FromSeconds(10));
+ var events2 = await client.FetchEventsFrom([relayUrl], filter2, TimeSpan.FromSeconds(10));
// ANCHOR_END: fetch-from
}
}
diff --git a/snippets/csharp/Req/Stream.cs b/snippets/csharp/Req/Stream.cs
index 5725fff..0afe44f 100644
--- a/snippets/csharp/Req/Stream.cs
+++ b/snippets/csharp/Req/Stream.cs
@@ -9,7 +9,8 @@ public static async Task Run()
{
var client = new Client();
- await client.AddRelay("wss://relay.damus.io");
+ var relayUrl = RelayUrl.Parse("wss://relay.damus.io");
+ await client.AddRelay(relayUrl);
await client.Connect();
// ANCHOR: init-stream
diff --git a/snippets/csharp/Snippets.csproj b/snippets/csharp/Snippets.csproj
index 7a8c537..4270f44 100644
--- a/snippets/csharp/Snippets.csproj
+++ b/snippets/csharp/Snippets.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/snippets/js/package.json b/snippets/js/package.json
index 63949f9..b5f56eb 100644
--- a/snippets/js/package.json
+++ b/snippets/js/package.json
@@ -5,7 +5,7 @@
"type": "module",
"license": "MIT",
"dependencies": {
- "@rust-nostr/nostr-sdk": "0.42.1",
+ "@rust-nostr/nostr-sdk": "0.43.0",
"bip39": "^3.1.0"
},
"devDependencies": {
diff --git a/snippets/js/src/event/id.ts b/snippets/js/src/event/id.ts
index e323bda..c8de90d 100644
--- a/snippets/js/src/event/id.ts
+++ b/snippets/js/src/event/id.ts
@@ -12,7 +12,7 @@ function eventId() {
// ANCHOR: build-event-id
console.log(" Build Event ID:");
- let event_id = new EventId(keys.publicKey, Timestamp.now(), new Kind(1), new Tags(), "");
+ let event_id = new EventId(keys.publicKey, Timestamp.now(), new Kind(1), Tags.fromList([]), "");
console.log(` - ${event_id}`);
// ANCHOR_END: build-event-id
diff --git a/snippets/js/src/nip05.ts b/snippets/js/src/nip05.ts
deleted file mode 100644
index 578ce99..0000000
--- a/snippets/js/src/nip05.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import {PublicKey, Metadata, verifyNip05, getNip05Profile, loadWasmAsync} from "@rust-nostr/nostr-sdk";
-
-async function run() {
- // Load WASM
- await loadWasmAsync();
-
- // ANCHOR: set-metadata
- // Create metadata object with name and NIP05
- let metadata = new Metadata()
- .name("TestName")
- .nip05("TestName@rustNostr.com");
- // ANCHOR_END: set-metadata
-
- // ANCHOR: verify-nip05
- console.log("Verify NIP-05:");
- let nip05 = "Rydal@gitlurker.info";
- let publicKey = PublicKey.parse("npub1zwnx29tj2lnem8wvjcx7avm8l4unswlz6zatk0vxzeu62uqagcash7fhrf");
- if (await verifyNip05(publicKey, nip05)) {
- console.log(` '${nip05}' verified, for ${publicKey.toBech32()}`);
- } else {
- console.log(` Unable to verify NIP-05, for ${publicKey.toBech32()}`);
- }
- // ANCHOR_END: verify-nip05
-
- // ANCHOR: nip05-profile
- console.log("Get NIP-05 profile:");
- let nip_05 = "yuki@yukikishimoto.com";
- let profile = await getNip05Profile(nip_05);
- console.log(` ${nip_05} Public key: ${profile.publicKey().toBech32()}`);
- // ANCHOR_END: nip05-profile
-}
-
-run();
diff --git a/snippets/js/src/nip47.ts b/snippets/js/src/nip47.ts
index 927febe..db0ed15 100644
--- a/snippets/js/src/nip47.ts
+++ b/snippets/js/src/nip47.ts
@@ -20,13 +20,11 @@ async function main() {
console.log("Balance", balance, "mSAT");
// Pay an invoice
- let payInvoiceParams = new PayInvoiceRequest();
- payInvoiceParams.invoice = "lnbc..";
+ let payInvoiceParams = new PayInvoiceRequest("lnbc...");
await nwc.payInvoice(payInvoiceParams);
// Make an invoice
- let makeInvoiceParams = new MakeInvoiceRequest();
- makeInvoiceParams.amount = BigInt(100);
+ let makeInvoiceParams = new MakeInvoiceRequest(BigInt(100));
const result = await nwc.makeInvoice(makeInvoiceParams)
console.log("Invoice: " + result.invoice);
diff --git a/snippets/kotlin/build.gradle.kts b/snippets/kotlin/build.gradle.kts
index b5af96b..7f16812 100644
--- a/snippets/kotlin/build.gradle.kts
+++ b/snippets/kotlin/build.gradle.kts
@@ -11,7 +11,7 @@ repositories {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
- implementation("org.rust-nostr:nostr-sdk-jvm:0.42.1")
+ implementation("org.rust-nostr:nostr-sdk-jvm:0.43.0")
}
tasks.test {
diff --git a/snippets/kotlin/src/main/kotlin/Hello.kt b/snippets/kotlin/src/main/kotlin/Hello.kt
index 7140177..bdcf498 100644
--- a/snippets/kotlin/src/main/kotlin/Hello.kt
+++ b/snippets/kotlin/src/main/kotlin/Hello.kt
@@ -12,7 +12,8 @@ suspend fun hello() {
// ANCHOR_END: client
// ANCHOR: connect
- client.addRelay("wss://relay.damus.io")
+ val relayUrl = RelayUrl.parse("wss://relay.damus.io")
+ client.addRelay(relayUrl)
client.connect()
// ANCHOR_END: connect
diff --git a/snippets/kotlin/src/main/kotlin/req/Fetch.kt b/snippets/kotlin/src/main/kotlin/req/Fetch.kt
index 9ec9408..631e28a 100644
--- a/snippets/kotlin/src/main/kotlin/req/Fetch.kt
+++ b/snippets/kotlin/src/main/kotlin/req/Fetch.kt
@@ -9,7 +9,8 @@ suspend fun fetch() {
// ANCHOR: client
val client = Client()
- client.addRelay("wss://relay.damus.io")
+ val relayUrl = RelayUrl.parse("wss://relay.damus.io")
+ client.addRelay(relayUrl)
client.connect()
// ANCHOR_END: client
@@ -21,7 +22,7 @@ suspend fun fetch() {
// ANCHOR: fetch-from
val filter2: Filter = Filter().kind(Kind.fromStd(KindStandard.TEXT_NOTE)).limit(5u)
val events2: Events = client.fetchEventsFrom(
- urls = listOf("wss://relay.damus.io"),
+ urls = listOf(relayUrl),
filter = filter2,
timeout = Duration.ofSeconds(10L)
)
diff --git a/snippets/kotlin/src/main/kotlin/req/Stream.kt b/snippets/kotlin/src/main/kotlin/req/Stream.kt
index c3932f2..fe029fc 100644
--- a/snippets/kotlin/src/main/kotlin/req/Stream.kt
+++ b/snippets/kotlin/src/main/kotlin/req/Stream.kt
@@ -7,7 +7,8 @@ import rust.nostr.sdk.*
suspend fun stream() {
val client = Client()
- client.addRelay("wss://relay.damus.io")
+ val relayUrl = RelayUrl.parse("wss://relay.damus.io")
+ client.addRelay(relayUrl)
client.connect()
// ANCHOR: init-stream
diff --git a/snippets/python/requirements.txt b/snippets/python/requirements.txt
index 3f4fc97..fde3746 100644
--- a/snippets/python/requirements.txt
+++ b/snippets/python/requirements.txt
@@ -1,3 +1,3 @@
mnemonic==0.21
-nostr-sdk==0.42.1
+nostr-sdk==0.43.0
pyright==1.1.399
diff --git a/snippets/python/src/event/tags.py b/snippets/python/src/event/tags.py
index 2babee7..2455888 100644
--- a/snippets/python/src/event/tags.py
+++ b/snippets/python/src/event/tags.py
@@ -1,5 +1,5 @@
from typing import cast
-from nostr_sdk import EventBuilder, Keys, Tag, Contact, Coordinate, Kind, RelayMetadata, TagKind
+from nostr_sdk import EventBuilder, Keys, Tag, Contact, Coordinate, Kind, RelayMetadata, TagKind, RelayUrl
def tags():
@@ -25,7 +25,7 @@ def tags():
tag = Tag.identifier("This is an identifier value")
print(f" - Identifier : {tag.as_vec()}")
# Reference/Relay
- tag = Tag.relay_metadata("wss://relay.example.com",RelayMetadata.READ)
+ tag = Tag.relay_metadata(RelayUrl.parse("wss://relay.example.com"), RelayMetadata.READ)
print(f" - Reference/Relays : {tag.as_vec()}")
# Hashtag
tag = Tag.hashtag("#AskNostr")
diff --git a/snippets/python/src/hello.py b/snippets/python/src/hello.py
index ddfaa66..73bb5d3 100644
--- a/snippets/python/src/hello.py
+++ b/snippets/python/src/hello.py
@@ -1,6 +1,6 @@
# ANCHOR: full
import asyncio
-from nostr_sdk import Keys, Client, EventBuilder, NostrSigner
+from nostr_sdk import Keys, Client, EventBuilder, NostrSigner, RelayUrl
async def hello():
@@ -11,7 +11,8 @@ async def hello():
# ANCHOR_END: client
# ANCHOR: connect
- await client.add_relay("wss://relay.damus.io")
+ relay_url = RelayUrl.parse("wss://relay.damus.io")
+ await client.add_relay(relay_url)
await client.connect()
# ANCHOR_END: connect
diff --git a/snippets/python/src/nip01.py b/snippets/python/src/nip01.py
index f91ccb6..7db1723 100644
--- a/snippets/python/src/nip01.py
+++ b/snippets/python/src/nip01.py
@@ -1,4 +1,4 @@
-from nostr_sdk import Keys, Metadata, EventBuilder
+from nostr_sdk import Keys, Metadata, EventBuilder, MetadataRecord
def nip01():
@@ -7,17 +7,19 @@ def nip01():
# ANCHOR: create-event
# Create metadata object with desired content
- metadata_content = Metadata()\
- .set_name("TestName")\
- .set_display_name("PyTestur")\
- .set_about("This is a Test Account for Rust Nostr Python Bindings")\
- .set_website("https://rust-nostr.org/")\
- .set_picture("https://avatars.githubusercontent.com/u/123304603?s=200&v=4")\
- .set_banner("https://nostr-resources.com/assets/images/cover.png")\
- .set_nip05("TestName@rustNostr.com")
+ metadata_record = MetadataRecord(
+ name="TestName",
+ display_name="PyTestur",
+ about="This is a Test Account for Rust Nostr Python Bindings",
+ website="https://rust-nostr.org/",
+ picture="https://avatars.githubusercontent.com/u/123304603?s=200&v=4",
+ banner="https://nostr-resources.com/assets/images/cover.png",
+ nip05="TestName@rustNostr.com",
+ )
# Build metadata event and assign content
- builder = EventBuilder.metadata(metadata_content)
+ metadata = Metadata.from_record(metadata_record)
+ builder = EventBuilder.metadata(metadata)
# Signed event and print details
print("Creating Metadata Event:")
@@ -37,15 +39,16 @@ def nip01():
# Deserialize Metadata from event
print("Deserializing Metadata Event:")
metadata = Metadata().from_json(event.content())
+ metadata_record = metadata.as_record()
print(" Metadata Details:")
- print(f" Name : {metadata.get_name()}")
- print(f" Display : {metadata.get_display_name()}")
- print(f" About : {metadata.get_about()}")
- print(f" Website : {metadata.get_website()}")
- print(f" Picture : {metadata.get_picture()}")
- print(f" Banner : {metadata.get_banner()}")
- print(f" NIP05 : {metadata.get_nip05()}")
+ print(f" Name : {metadata_record.name}")
+ print(f" Display : {metadata_record.display_name}")
+ print(f" About : {metadata_record.about}")
+ print(f" Website : {metadata_record.website}")
+ print(f" Picture : {metadata_record.picture}")
+ print(f" Banner : {metadata_record.banner}")
+ print(f" NIP05 : {metadata_record.nip05}")
# ANCHOR_END: create-metadata
if __name__ == '__main__':
diff --git a/snippets/python/src/nip05.py b/snippets/python/src/nip05.py
deleted file mode 100644
index 525ea28..0000000
--- a/snippets/python/src/nip05.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import asyncio
-from nostr_sdk import Metadata, PublicKey, verify_nip05, get_nip05_profile
-
-
-async def nip05():
- # ANCHOR: set-metadata
- # Create metadata object with name and NIP05
- metadata = Metadata() \
- .set_name("TestName") \
- .set_nip05("TestName@rustNostr.com")
- # ANCHOR_END: set-metadata
-
- # ANCHOR: verify-nip05
- print("Verify NIP-05:")
- nip_05 = "yuki@yukikishimoto.com"
- public_key = PublicKey.parse("npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet")
- proxy = None
- if await verify_nip05(public_key, nip_05, proxy):
- print(f" '{nip_05}' verified, for {public_key.to_bech32()}")
- else:
- print(f" Unable to verify NIP-05, for {public_key.to_bech32()}")
- # ANCHOR_END: verify-nip05
-
- print()
-
- # ANCHOR: nip05-profile
- print("Profile NIP-05:")
- nip_05 = "yuki@yukikishimoto.com"
- profile = await get_nip05_profile(nip_05)
- print(f" {nip_05} Public key: {profile.public_key().to_bech32()}")
- # ANCHOR_END: nip05-profile
-
-if __name__ == '__main__':
- asyncio.run(nip05())
\ No newline at end of file
diff --git a/snippets/python/src/nip65.py b/snippets/python/src/nip65.py
index 08e8912..1a778ce 100644
--- a/snippets/python/src/nip65.py
+++ b/snippets/python/src/nip65.py
@@ -1,18 +1,22 @@
-from nostr_sdk import EventBuilder, Tag, Kind, Keys, RelayMetadata
+from nostr_sdk import EventBuilder, Tag, Kind, Keys, RelayMetadata, RelayUrl
def nip65():
# Get Keys
keys = Keys.generate()
+ damus = RelayUrl.parse("wss://relay.damus.io")
+ primal = RelayUrl.parse("wss://relay.primal.net")
+ nostr_band = RelayUrl.parse("wss://relay.nostr.band")
+
print()
print("Relay Metadata:")
# ANCHOR: relay-metadata-simple
# Create relay dictionary
relays_dict = {
- "wss://relay.damus.io": RelayMetadata.READ,
- "wss://relay.primal.net": RelayMetadata.WRITE,
- "wss://relay.nostr.band": None
+ damus: RelayMetadata.READ,
+ primal: RelayMetadata.WRITE,
+ nostr_band: None
}
# Build/sign event
@@ -27,9 +31,9 @@ def nip65():
# ANCHOR: relay-metadata-custom
# Create relay metadata tags
- tag1 = Tag.relay_metadata("wss://relay.damus.io", RelayMetadata.READ)
- tag2 = Tag.relay_metadata("wss://relay.primal.net", RelayMetadata.WRITE)
- tag3 = Tag.relay_metadata("wss://relay.nostr.band", None)
+ tag1 = Tag.relay_metadata(damus, RelayMetadata.READ)
+ tag2 = Tag.relay_metadata(primal, RelayMetadata.WRITE)
+ tag3 = Tag.relay_metadata(nostr_band, None)
# Build/sign event
kind = Kind(10002)
diff --git a/snippets/python/src/req/fetch.py b/snippets/python/src/req/fetch.py
index 2396afc..b6c9ef3 100644
--- a/snippets/python/src/req/fetch.py
+++ b/snippets/python/src/req/fetch.py
@@ -2,14 +2,15 @@
import asyncio
from datetime import timedelta
-from nostr_sdk import Client, Filter, Events, Kind, KindStandard
+from nostr_sdk import Client, Filter, Events, Kind, KindStandard, RelayUrl
async def fetch():
# ANCHOR: client
client = Client()
- await client.add_relay("wss://relay.damus.io")
+ relay_url = RelayUrl.parse("wss://relay.damus.io")
+ await client.add_relay(relay_url)
await client.connect()
# ANCHOR_END: client
@@ -20,7 +21,7 @@ async def fetch():
# ANCHOR: fetch-from
filter: Filter = Filter().kind(Kind.from_std(KindStandard.TEXT_NOTE)).limit(5)
- events: Events = await client.fetch_events_from(["wss://relay.damus.io"], filter, timedelta(seconds=10))
+ events: Events = await client.fetch_events_from([relay_url], filter, timedelta(seconds=10))
# ANCHOR_END: fetch-from
diff --git a/snippets/python/src/req/stream.py b/snippets/python/src/req/stream.py
index 78be63f..9429382 100644
--- a/snippets/python/src/req/stream.py
+++ b/snippets/python/src/req/stream.py
@@ -2,13 +2,14 @@
import asyncio
from datetime import timedelta
-from nostr_sdk import Client
+from nostr_sdk import Client, RelayUrl
async def stream():
client = Client()
- await client.add_relay("wss://relay.damus.io")
+ relay_url = RelayUrl.parse("wss://relay.damus.io")
+ await client.add_relay(relay_url)
await client.connect()
# ANCHOR: init-stream
diff --git a/snippets/rust/Cargo.toml b/snippets/rust/Cargo.toml
index f22e12e..1a9c4a3 100644
--- a/snippets/rust/Cargo.toml
+++ b/snippets/rust/Cargo.toml
@@ -4,9 +4,9 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-nostr-sdk = { version = "0.42", features = ["all-nips"] }
-nostr-relay-builder = "0.42"
-nwc = "0.42"
+nostr-sdk = { version = "0.43", features = ["all-nips"] }
+nostr-relay-builder = "0.43"
+nwc = "0.43"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
[[bin]]
diff --git a/snippets/rust/src/nip19.rs b/snippets/rust/src/nip19.rs
index c2782d0..653dbdf 100644
--- a/snippets/rust/src/nip19.rs
+++ b/snippets/rust/src/nip19.rs
@@ -27,7 +27,7 @@ pub fn nip19() -> Result<()> {
// Create NIP-19 profile including relays data
let relay_url = RelayUrl::parse("wss://relay.damus.io")?;
let relays = vec![relay_url];
- let nprofile = Nip19Profile::new(keys.public_key, &relays)?;
+ let nprofile = Nip19Profile::new(keys.public_key, relays.clone());
println!("Profile (encoded): {}", nprofile.to_bech32()?);
// ANCHOR_END: nip19-nprofile-encode
@@ -89,7 +89,7 @@ pub fn nip19() -> Result<()> {
// Create NIP-19 coordinate
let kind = Kind::TextNote;
let coord = Coordinate::new(kind, keys.public_key);
- let coordinate = Nip19Coordinate::new(coord, &relays)?;
+ let coordinate = Nip19Coordinate::new(coord, relays);
let bech_32_coordinate = coordinate.to_bech32()?;
println!(" Coordinate (encoded): {}", bech_32_coordinate);
// ANCHOR_END: nip19-naddr-encode
diff --git a/snippets/swift/Package.swift b/snippets/swift/Package.swift
index b2894b5..8c69c7f 100644
--- a/snippets/swift/Package.swift
+++ b/snippets/swift/Package.swift
@@ -7,7 +7,7 @@ let package = Package(
name: "NostrSnippets",
platforms: [.macOS(.v12)],
dependencies: [
- .package(url: "https://github.com/rust-nostr/nostr-sdk-swift", from: "0.42.1")
+ .package(url: "https://github.com/rust-nostr/nostr-sdk-swift", from: "0.43.0")
],
targets: [
.executableTarget(
diff --git a/snippets/swift/Sources/Hello.swift b/snippets/swift/Sources/Hello.swift
index a67d56a..a48ea2e 100644
--- a/snippets/swift/Sources/Hello.swift
+++ b/snippets/swift/Sources/Hello.swift
@@ -10,7 +10,8 @@ func hello() async throws {
// ANCHOR_END: client
// ANCHOR: connect
- try await client.addRelay(url: "wss://relay.damus.io")
+ let relayUrl = try RelayUrl.parse(url: "wss://relay.damus.io")
+ try await client.addRelay(url: relayUrl)
await client.connect()
// ANCHOR_END: connect
diff --git a/snippets/swift/Sources/Req/Fetch.swift b/snippets/swift/Sources/Req/Fetch.swift
index 93eb7f2..0a7207d 100644
--- a/snippets/swift/Sources/Req/Fetch.swift
+++ b/snippets/swift/Sources/Req/Fetch.swift
@@ -6,8 +6,9 @@ func fetch() async throws {
// ANCHOR: client
let client = Client()
- try await client.addRelay(url: "wss://relay.damus.io")
- await client.connect()
+ let relayUrl = try RelayUrl.parse(url: "wss://relay.damus.io")
+ try await client.addRelay(url: relayUrl)
+ await client.connect()
// ANCHOR_END: client
// ANCHOR: fetch
@@ -18,7 +19,7 @@ func fetch() async throws {
// ANCHOR: fetch-from
let filter2 = Filter().kind(kind: Kind.fromStd(e: KindStandard.textNote)).limit(limit: 5)
let events2 = try await client.fetchEventsFrom(
- urls: ["wss://relay.damus.io"],
+ urls: [relayUrl],
filter: filter2,
timeout: 10.0
)
diff --git a/snippets/swift/Sources/Req/Stream.swift b/snippets/swift/Sources/Req/Stream.swift
index 257f52b..9d59a97 100644
--- a/snippets/swift/Sources/Req/Stream.swift
+++ b/snippets/swift/Sources/Req/Stream.swift
@@ -5,7 +5,8 @@ import NostrSDK
func stream() async throws {
let client = Client()
- try await client.addRelay(url: "wss://relay.damus.io")
+ let relayUrl = try RelayUrl.parse(url: "wss://relay.damus.io")
+ try await client.addRelay(url: relayUrl)
await client.connect()
// ANCHOR: init-stream
diff --git a/src/sdk/install.md b/src/sdk/install.md
index 4e920da..8758d77 100644
--- a/src/sdk/install.md
+++ b/src/sdk/install.md
@@ -9,14 +9,14 @@ Add the `nostr-sdk` dependency in your `Cargo.toml` file:
```toml
[dependencies]
-nostr-sdk = "0.42"
+nostr-sdk = "0.43"
```
Alternatively, you can add it directly from `git` source:
```toml
[dependencies]
-nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.42.0" }
+nostr-sdk = { git = "https://github.com/rust-nostr/nostr", tag = "v0.43.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.42.1
+nostr-sdk==0.43.0
```
Import the library in your code:
@@ -63,6 +63,7 @@ The following OS and architectures are supported:
| Android | ❌ | ❌ | ❌ | ❌ | ❌ |
| Linux (GLIBC) | ✅ | ✅ | ✅ | ✅ | ✅* |
| Linux (MUSL) | ✅ | ✅ | ✅ | ✅ | ✅* |
+| FreeBSD | ✅* | ❌ | ❌ | ❌ | ❌ |
| macOS | ✅ | ✅ | ❌ | ❌ | ❌ |
| Windows | ✅ | ✅ | ❌ | ✅ | ❌ |
@@ -99,7 +100,7 @@ Alternatively, you can manually add the dependency in your `package.json` file:
```json
{
"dependencies": {
- "@rust-nostr/nostr-sdk": "0.42.1"
+ "@rust-nostr/nostr-sdk": "0.43.0"
}
}
```
@@ -153,7 +154,7 @@ repositories {
}
dependencies {
- implementation("org.rust-nostr:nostr-sdk:0.42.3")
+ implementation("org.rust-nostr:nostr-sdk:0.43.0")
}
```
@@ -165,7 +166,7 @@ repositories {
}
dependencies {
- implementation("org.rust-nostr:nostr-sdk-jvm:0.42.1")
+ implementation("org.rust-nostr:nostr-sdk-jvm:0.43.0")
}
```
@@ -186,6 +187,7 @@ The following OS and architectures are supported:
| Android | ✅ | ✅ | ✅ | ✅ | ❌ | `nostr-sdk` |
| Linux (GLIBC) | ✅ | ✅ | ✅ | ✅ | ✅ | `nostr-sdk-jvm` |
| Linux (MUSL) | ✅ | ✅ | ✅ | ✅ | ✅ | `nostr-sdk-jvm` |
+| FreeBSD | ✅ | ❌ | ❌ | ❌ | ❌ | `nostr-sdk-jvm` |
| macOS | ✅ | ✅ | ❌ | ❌ | ❌ | `nostr-sdk-jvm` |
| Windows | ✅ | ✅ | ❌ | ✅ | ❌ | `nostr-sdk-jvm` |
@@ -239,7 +241,7 @@ as a package dependency in Xcode.
Add the following to the dependency array in your `Package.swift`:
``` swift
-.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.42.1"),
+.package(url: "https://github.com/rust-nostr/nostr-sdk-swift.git", from: "0.43.0"),
```
### Supported platforms
@@ -268,7 +270,7 @@ Are you interested in other platforms? Open an issue [here](https://github.com/r
The `Nostr.Sdk` package is available on [nuget](https://www.nuget.org/packages/Nostr.Sdk):
```bash
-dotnet add package Nostr.Sdk --version 0.42.1
+dotnet add package Nostr.Sdk --version 0.43.0
```
### Requirements and supported platforms
@@ -282,6 +284,7 @@ The following OS and architectures are supported:
| Android | ❌ | ❌ | ❌ | ❌ | ❌ |
| Linux (GLIBC) | ✅ | ✅ | ✅ | ✅ | ✅ |
| Linux (MUSL) | ✅ | ✅ | ✅ | ✅ | ✅ |
+| FreeBSD | ✅ | ❌ | ❌ | ❌ | ❌ |
| macOS | ✅ | ✅ | ❌ | ❌ | ❌ |
| Windows | ✅ | ✅ | ❌ | ✅ | ❌ |
diff --git a/src/sdk/nips/05.md b/src/sdk/nips/05.md
index 8ab4ffa..1e0f681 100644
--- a/src/sdk/nips/05.md
+++ b/src/sdk/nips/05.md
@@ -15,50 +15,14 @@ TODO
Python
-Using the `Metadata` class to build the metadata object and incorporate the NIP-05 identifier with the `set_nip05()` method.
-
-For more details on metadata (or general) events please refer back to the [examples](01.md) provided for NIP-01.
-
-```python,ignore
-{{#include ../../../snippets/python/src/nip05.py:set-metadata}}
-```
-
-For verification of NIP-05 identifiers associated with a given `PublicKey` object we can the `verify_nip05()` function as follows:
-
-```python,ignore
-{{#include ../../../snippets/python/src/nip05.py:verify-nip05}}
-```
-
-To get the NIP-05 profile data (ex. user public key and relays) the `get_nip05_profile()` function can be called:
-
-```python,ignore
-{{#include ../../../snippets/python/src/nip05.py:nip05-profile}}
-```
+TODO
JavaScript
-Using the `Metadata` class to build the metadata object and incorporate the NIP-05 identifier with the `nip05()` method.
-
-For more details on metadata (or general) events please refer back to the [examples](01.md) provided for NIP-01.
-
-```typescript,ignore
-{{#include ../../../snippets/js/src/nip05.ts:set-metadata}}
-```
-
-For verification of NIP-05 identifiers associated with a given `PublicKey` object we can the `verifyNip05()` function as follows:
-
-```typescript,ignore
-{{#include ../../../snippets/js/src/nip05.ts:verify-nip05}}
-```
-
-To get the NIP-05 profile data (ex. user public key and relays) the `getNip05Profile()` function can be called:
-
-```typescript,ignore
-{{#include ../../../snippets/js/src/nip05.ts:nip05-profile}}
-```
+TODO