File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ required-features = ["std"]
134
134
name = " nip96"
135
135
required-features = [" std" , " nip96" ]
136
136
137
+ [[example ]]
138
+ name = " nip98"
139
+ required-features = [" std" , " nip98" ]
140
+
137
141
[[example ]]
138
142
name = " parser"
139
143
required-features = [" std" , " parser" ]
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2022-2023 Yuki Kishimoto
2
+ // Copyright (c) 2023-2025 Rust Nostr Developers
3
+ // Distributed under the MIT software license
4
+
5
+ use nostr:: prelude:: * ;
6
+
7
+ #[ tokio:: main]
8
+ async fn main ( ) -> Result < ( ) > {
9
+ let keys = Keys :: parse ( "nsec1j4c6269y9w0q2er2xjw8sv2ehyrtfxq3jwgdlxj6qfn8z4gjsq5qfvfk99" ) ?;
10
+
11
+ let server_url: Url = Url :: parse ( "https://example.com" ) ?;
12
+ let method = HttpMethod :: GET ;
13
+
14
+ let auth = HttpData :: new ( server_url, method)
15
+ . to_authorization ( & keys)
16
+ . await ?;
17
+
18
+ println ! ( "{auth}" ) ;
19
+
20
+ Ok ( ( ) )
21
+ }
You can’t perform that action at this time.
0 commit comments