Skip to content

Commit 7b1a4f3

Browse files
committed
partially revert examples modification
1 parent d264da8 commit 7b1a4f3

File tree

8 files changed

+18
-54
lines changed

8 files changed

+18
-54
lines changed

crates/nostr-sdk/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ tokio = { version = "1", features = ["full"] }
3232
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
3333
3434
use nostr_sdk::prelude::*;
35-
use nostr_sdk::key::XOnlyPublicKey;
3635
3736
#[tokio::main]
3837
async fn main() -> Result<()> {

crates/nostr-sdk/examples/client-with-opts.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
55

6-
use nostr_sdk::key::SecretKey;
7-
use nostr_sdk::nips::nip04::decrypt;
8-
use nostr_sdk::prelude::FromBech32;
96
use nostr_sdk::prelude::*;
107

118
const BECH32_SK: &str = "nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85";

crates/nostr-sdk/examples/client.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) 2022-2023 Yuki Kishimoto
22
// Distributed under the MIT software license
33

4-
use nostr_sdk::key::SecretKey;
5-
use nostr_sdk::prelude::FromBech32;
64
use nostr_sdk::prelude::*;
75

86
const BECH32_SK: &str = "nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85";

crates/nostr-sdk/examples/nostr-connect.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33

44
use std::time::Duration;
55

6-
use nostr_sdk::client::RemoteSigner;
7-
use nostr_sdk::key::SecretKey;
8-
use nostr_sdk::key::XOnlyPublicKey;
9-
use nostr_sdk::nips::nip46::NostrConnectMetadata;
10-
use nostr_sdk::nips::nip46::NostrConnectURI;
11-
use nostr_sdk::prelude::FromBech32;
126
use nostr_sdk::prelude::*;
137

148
const APP_SECRET_KEY: &str = "nsec1j4c6269y9w0q2er2xjw8sv2ehyrtfxq3jwgdlxj6qfn8z4gjsq5qfvfk99";

crates/nostr-sdk/src/client/mod.rs

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ impl Client {
120120
///
121121
/// # Example
122122
/// ```rust,no_run
123-
/// use nostr::Keys;
124123
/// use nostr_sdk::prelude::*;
125124
///
126125
/// let my_keys = Keys::generate();
@@ -134,7 +133,7 @@ impl Client {
134133
///
135134
/// # Example
136135
/// ```rust,no_run
137-
/// use nostr::Keys;
136+
138137
/// use nostr_sdk::prelude::*;
139138
///
140139
/// let my_keys = Keys::generate();
@@ -224,7 +223,7 @@ impl Client {
224223
///
225224
/// # Example
226225
/// ```rust,no_run
227-
/// use nostr::Keys;
226+
228227
/// use nostr_sdk::prelude::*;
229228
///
230229
/// # #[tokio::main]
@@ -263,7 +262,7 @@ impl Client {
263262
///
264263
/// # Example
265264
/// ```rust,no_run
266-
/// use nostr::Keys;
265+
267266
/// use nostr_sdk::prelude::*;
268267
///
269268
/// # #[tokio::main]
@@ -309,7 +308,7 @@ impl Client {
309308
///
310309
/// # Example
311310
/// ```rust,no_run
312-
/// use nostr::Keys;
311+
313312
/// use nostr_sdk::prelude::*;
314313
/// # #[tokio::main]
315314
/// # async fn main() {
@@ -355,7 +354,7 @@ impl Client {
355354
///
356355
/// # Example
357356
/// ```rust,no_run
358-
/// use nostr::Keys;
357+
359358
/// use nostr_sdk::prelude::*;
360359
///
361360
/// # #[tokio::main]
@@ -386,7 +385,7 @@ impl Client {
386385
///
387386
/// # Example
388387
/// ```rust,no_run
389-
/// use nostr::Keys;
388+
390389
/// use nostr_sdk::prelude::*;
391390
///
392391
/// # #[tokio::main]
@@ -415,7 +414,7 @@ impl Client {
415414
///
416415
/// # Example
417416
/// ```rust,no_run
418-
/// use nostr::Keys;
417+
419418
/// use nostr_sdk::prelude::*;
420419
/// # #[tokio::main]
421420
/// # async fn main() {
@@ -432,7 +431,7 @@ impl Client {
432431
///
433432
/// # Example
434433
/// ```rust,no_run
435-
/// use nostr::Keys;
434+
436435
/// use nostr_sdk::prelude::*;
437436
/// # #[tokio::main]
438437
/// # async fn main() {
@@ -449,7 +448,7 @@ impl Client {
449448
///
450449
/// # Example
451450
/// ```rust,no_run
452-
/// use nostr::Keys;
451+
453452
/// use nostr_sdk::prelude::*;
454453
/// # #[tokio::main]
455454
/// # async fn main() {
@@ -478,8 +477,7 @@ impl Client {
478477
/// # Example
479478
/// ```rust,no_run
480479
/// use std::time::Duration;
481-
///
482-
/// use nostr::Keys;
480+
483481
/// use nostr_sdk::prelude::*;
484482
/// # #[tokio::main]
485483
/// # async fn main() {
@@ -611,7 +609,7 @@ impl Client {
611609
///
612610
/// # Example
613611
/// ```rust,no_run
614-
/// use nostr::Keys;
612+
615613
/// use nostr_sdk::prelude::*;
616614
/// # #[tokio::main]
617615
/// # async fn main() {
@@ -638,7 +636,7 @@ impl Client {
638636
///
639637
/// # Example
640638
/// ```rust,no_run
641-
/// use nostr::Keys;
639+
642640
/// use nostr_sdk::prelude::*;
643641
/// # #[tokio::main]
644642
/// # async fn main() {
@@ -664,7 +662,7 @@ impl Client {
664662
///
665663
/// # Example
666664
/// ```rust,no_run
667-
/// use nostr::Keys;
665+
668666
/// use nostr_sdk::prelude::*;
669667
/// # #[tokio::main]
670668
/// # async fn main() {
@@ -728,8 +726,7 @@ impl Client {
728726
/// # Example
729727
/// ```rust,no_run
730728
/// use std::time::Duration;
731-
///
732-
/// use nostr::Keys;
729+
733730
/// use nostr_sdk::prelude::*;
734731
/// # #[tokio::main]
735732
/// # async fn main() {
@@ -827,9 +824,7 @@ impl Client {
827824
///
828825
/// # Example
829826
/// ```rust,no_run
830-
/// use nostr::Keys;
831-
/// use nostr_sdk::key::XOnlyPublicKey;
832-
/// use nostr_sdk::prelude::FromBech32;
827+
833828
/// use nostr_sdk::prelude::*;
834829
/// # #[tokio::main]
835830
/// # async fn main() {
@@ -915,9 +910,7 @@ impl Client {
915910
/// # Example
916911
/// ```rust,no_run
917912
/// use std::str::FromStr;
918-
///
919-
/// use nostr::Keys;
920-
/// use nostr_sdk::key::XOnlyPublicKey;
913+
921914
/// use nostr_sdk::prelude::*;
922915
/// # #[tokio::main]
923916
/// # async fn main() {
@@ -950,9 +943,7 @@ impl Client {
950943
/// # Example
951944
/// ```rust,no_run
952945
/// use std::str::FromStr;
953-
///
954-
/// use nostr::Keys;
955-
/// use nostr_sdk::key::XOnlyPublicKey;
946+
956947
/// use nostr_sdk::prelude::*;
957948
/// # #[tokio::main]
958949
/// # async fn main() {
@@ -985,9 +976,7 @@ impl Client {
985976
/// # Example
986977
/// ```rust,no_run
987978
/// use std::str::FromStr;
988-
///
989-
/// use nostr::Keys;
990-
/// use nostr_sdk::key::XOnlyPublicKey;
979+
991980
/// use nostr_sdk::prelude::*;
992981
/// # #[tokio::main]
993982
/// # async fn main() {

crates/nostr-sdk/src/client/signer/remote.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ impl Client {
6565
/// ```rust,no_run
6666
/// use std::time::Duration;
6767
///
68-
/// use nostr_sdk::client::RemoteSigner;
6968
/// use nostr_sdk::prelude::*;
7069
///
7170
/// #[tokio::main]
@@ -87,8 +86,6 @@ impl Client {
8786
/// ```rust,no_run
8887
/// use std::str::FromStr;
8988
///
90-
/// use nostr_sdk::client::RemoteSigner;
91-
/// use nostr_sdk::key::XOnlyPublicKey;
9289
/// use nostr_sdk::prelude::*;
9390
///
9491
/// #[tokio::main]

crates/nostr/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ tungstenite = { version = "0.18", features = ["rustls-tls-webpki-roots"]}
2424

2525
```rust,no_run
2626
use nostr::prelude::*;
27-
use nostr::Keys;
28-
use nostr::Event;
29-
use nostr::Metadata;
30-
use nostr::EventBuilder;
31-
use nostr::ClientMessage;
32-
use crate::nostr::nips::nip19::ToBech32;
3327
use tungstenite::{Message as WsMessage};
3428
3529
fn main() -> Result<()> {

crates/nostr/examples/nip13.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
use std::str::FromStr;
55

6-
use nostr::key::SecretKey;
76
use nostr::prelude::*;
8-
use nostr::Event;
9-
use nostr::EventBuilder;
10-
use nostr::Keys;
117

128
const ALICE_SK: &str = "6b911fd37cdf5c81d4c0adb1ab7fa822ed253ab0ad9aa18d77257c88b29b718e";
139

0 commit comments

Comments
 (0)