├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "aes" 13 | version = "0.8.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" 16 | dependencies = [ 17 | "cfg-if", 18 | "cipher", 19 | "cpufeatures", 20 | ] 21 | 22 | [[package]] 23 | name = "aho-corasick" 24 | version = "0.6.10" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" 27 | dependencies = [ 28 | "memchr", 29 | ] 30 | 31 | [[package]] 32 | name = "autocfg" 33 | version = "1.1.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 36 | 37 | [[package]] 38 | name = "base64" 39 | version = "0.13.1" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 42 | 43 | [[package]] 44 | name = "base64" 45 | version = "0.21.0" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 48 | 49 | [[package]] 50 | name = "bech32" 51 | version = "0.9.1" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" 54 | 55 | [[package]] 56 | name = "bip39" 57 | version = "2.0.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" 60 | dependencies = [ 61 | "bitcoin_hashes", 62 | "serde", 63 | "unicode-normalization", 64 | ] 65 | 66 | [[package]] 67 | name = "bitcoin" 68 | version = "0.29.2" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" 71 | dependencies = [ 72 | "bech32", 73 | "bitcoin_hashes", 74 | "secp256k1", 75 | ] 76 | 77 | [[package]] 78 | name = "bitcoin_hashes" 79 | version = "0.11.0" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" 82 | dependencies = [ 83 | "serde", 84 | ] 85 | 86 | [[package]] 87 | name = "bitflags" 88 | version = "1.3.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 91 | 92 | [[package]] 93 | name = "block-buffer" 94 | version = "0.10.3" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 97 | dependencies = [ 98 | "generic-array", 99 | ] 100 | 101 | [[package]] 102 | name = "block-padding" 103 | version = "0.3.2" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "0a90ec2df9600c28a01c56c4784c9207a96d2451833aeceb8cc97e4c9548bb78" 106 | dependencies = [ 107 | "generic-array", 108 | ] 109 | 110 | [[package]] 111 | name = "bumpalo" 112 | version = "3.12.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 115 | 116 | [[package]] 117 | name = "byteorder" 118 | version = "1.4.3" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 121 | 122 | [[package]] 123 | name = "bytes" 124 | version = "1.4.0" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 127 | 128 | [[package]] 129 | name = "cbc" 130 | version = "0.1.2" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" 133 | dependencies = [ 134 | "cipher", 135 | ] 136 | 137 | [[package]] 138 | name = "cc" 139 | version = "1.0.79" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 142 | 143 | [[package]] 144 | name = "cfg-if" 145 | version = "1.0.0" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 148 | 149 | [[package]] 150 | name = "cipher" 151 | version = "0.4.3" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" 154 | dependencies = [ 155 | "crypto-common", 156 | "inout", 157 | ] 158 | 159 | [[package]] 160 | name = "cpufeatures" 161 | version = "0.2.5" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 164 | dependencies = [ 165 | "libc", 166 | ] 167 | 168 | [[package]] 169 | name = "crc32fast" 170 | version = "1.3.2" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 173 | dependencies = [ 174 | "cfg-if", 175 | ] 176 | 177 | [[package]] 178 | name = "crypto-common" 179 | version = "0.1.6" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 182 | dependencies = [ 183 | "generic-array", 184 | "typenum", 185 | ] 186 | 187 | [[package]] 188 | name = "digest" 189 | version = "0.10.6" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 192 | dependencies = [ 193 | "block-buffer", 194 | "crypto-common", 195 | ] 196 | 197 | [[package]] 198 | name = "either" 199 | version = "1.8.1" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 202 | 203 | [[package]] 204 | name = "encoding_rs" 205 | version = "0.8.32" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 208 | dependencies = [ 209 | "cfg-if", 210 | ] 211 | 212 | [[package]] 213 | name = "env_logger" 214 | version = "0.4.3" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" 217 | dependencies = [ 218 | "log 0.3.9", 219 | "regex", 220 | ] 221 | 222 | [[package]] 223 | name = "flate2" 224 | version = "1.0.25" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 227 | dependencies = [ 228 | "crc32fast", 229 | "miniz_oxide", 230 | ] 231 | 232 | [[package]] 233 | name = "fnv" 234 | version = "1.0.7" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 237 | 238 | [[package]] 239 | name = "form_urlencoded" 240 | version = "1.1.0" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 243 | dependencies = [ 244 | "percent-encoding", 245 | ] 246 | 247 | [[package]] 248 | name = "fuchsia-cprng" 249 | version = "0.1.1" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 252 | 253 | [[package]] 254 | name = "futures-channel" 255 | version = "0.3.26" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" 258 | dependencies = [ 259 | "futures-core", 260 | ] 261 | 262 | [[package]] 263 | name = "futures-core" 264 | version = "0.3.26" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" 267 | 268 | [[package]] 269 | name = "futures-macro" 270 | version = "0.3.26" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" 273 | dependencies = [ 274 | "proc-macro2", 275 | "quote", 276 | "syn", 277 | ] 278 | 279 | [[package]] 280 | name = "futures-sink" 281 | version = "0.3.26" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" 284 | 285 | [[package]] 286 | name = "futures-task" 287 | version = "0.3.26" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" 290 | 291 | [[package]] 292 | name = "futures-util" 293 | version = "0.3.26" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" 296 | dependencies = [ 297 | "futures-core", 298 | "futures-macro", 299 | "futures-sink", 300 | "futures-task", 301 | "pin-project-lite", 302 | "pin-utils", 303 | "slab", 304 | ] 305 | 306 | [[package]] 307 | name = "gcc" 308 | version = "0.3.55" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" 311 | 312 | [[package]] 313 | name = "generic-array" 314 | version = "0.14.6" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 317 | dependencies = [ 318 | "typenum", 319 | "version_check", 320 | ] 321 | 322 | [[package]] 323 | name = "getrandom" 324 | version = "0.2.8" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 327 | dependencies = [ 328 | "cfg-if", 329 | "js-sys", 330 | "libc", 331 | "wasi 0.11.0+wasi-snapshot-preview1", 332 | "wasm-bindgen", 333 | ] 334 | 335 | [[package]] 336 | name = "h2" 337 | version = "0.3.16" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" 340 | dependencies = [ 341 | "bytes", 342 | "fnv", 343 | "futures-core", 344 | "futures-sink", 345 | "futures-util", 346 | "http", 347 | "indexmap", 348 | "slab", 349 | "tokio", 350 | "tokio-util", 351 | "tracing", 352 | ] 353 | 354 | [[package]] 355 | name = "hashbrown" 356 | version = "0.12.3" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 359 | 360 | [[package]] 361 | name = "hello-nostr" 362 | version = "0.1.0" 363 | dependencies = [ 364 | "nostr-sdk", 365 | "tokio", 366 | ] 367 | 368 | [[package]] 369 | name = "hermit-abi" 370 | version = "0.2.6" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 373 | dependencies = [ 374 | "libc", 375 | ] 376 | 377 | [[package]] 378 | name = "http" 379 | version = "0.2.9" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 382 | dependencies = [ 383 | "bytes", 384 | "fnv", 385 | "itoa", 386 | ] 387 | 388 | [[package]] 389 | name = "http-body" 390 | version = "0.4.5" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 393 | dependencies = [ 394 | "bytes", 395 | "http", 396 | "pin-project-lite", 397 | ] 398 | 399 | [[package]] 400 | name = "httparse" 401 | version = "1.8.0" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 404 | 405 | [[package]] 406 | name = "httpdate" 407 | version = "1.0.2" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 410 | 411 | [[package]] 412 | name = "hyper" 413 | version = "0.14.24" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" 416 | dependencies = [ 417 | "bytes", 418 | "futures-channel", 419 | "futures-core", 420 | "futures-util", 421 | "h2", 422 | "http", 423 | "http-body", 424 | "httparse", 425 | "httpdate", 426 | "itoa", 427 | "pin-project-lite", 428 | "socket2", 429 | "tokio", 430 | "tower-service", 431 | "tracing", 432 | "want", 433 | ] 434 | 435 | [[package]] 436 | name = "hyper-rustls" 437 | version = "0.23.2" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" 440 | dependencies = [ 441 | "http", 442 | "hyper", 443 | "rustls", 444 | "tokio", 445 | "tokio-rustls", 446 | ] 447 | 448 | [[package]] 449 | name = "idna" 450 | version = "0.3.0" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 453 | dependencies = [ 454 | "unicode-bidi", 455 | "unicode-normalization", 456 | ] 457 | 458 | [[package]] 459 | name = "indexmap" 460 | version = "1.9.2" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 463 | dependencies = [ 464 | "autocfg", 465 | "hashbrown", 466 | ] 467 | 468 | [[package]] 469 | name = "inout" 470 | version = "0.1.3" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 473 | dependencies = [ 474 | "block-padding", 475 | "generic-array", 476 | ] 477 | 478 | [[package]] 479 | name = "instant" 480 | version = "0.1.12" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 483 | dependencies = [ 484 | "cfg-if", 485 | "js-sys", 486 | "wasm-bindgen", 487 | "web-sys", 488 | ] 489 | 490 | [[package]] 491 | name = "ipnet" 492 | version = "2.7.1" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" 495 | 496 | [[package]] 497 | name = "itoa" 498 | version = "1.0.6" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 501 | 502 | [[package]] 503 | name = "js-sys" 504 | version = "0.3.61" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 507 | dependencies = [ 508 | "wasm-bindgen", 509 | ] 510 | 511 | [[package]] 512 | name = "lazy_static" 513 | version = "1.4.0" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 516 | 517 | [[package]] 518 | name = "libc" 519 | version = "0.2.139" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" 522 | 523 | [[package]] 524 | name = "lock_api" 525 | version = "0.4.9" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 528 | dependencies = [ 529 | "autocfg", 530 | "scopeguard", 531 | ] 532 | 533 | [[package]] 534 | name = "log" 535 | version = "0.3.9" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 538 | dependencies = [ 539 | "log 0.4.17", 540 | ] 541 | 542 | [[package]] 543 | name = "log" 544 | version = "0.4.17" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 547 | dependencies = [ 548 | "cfg-if", 549 | ] 550 | 551 | [[package]] 552 | name = "memchr" 553 | version = "2.5.0" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 556 | 557 | [[package]] 558 | name = "mime" 559 | version = "0.3.16" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 562 | 563 | [[package]] 564 | name = "miniz_oxide" 565 | version = "0.6.2" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 568 | dependencies = [ 569 | "adler", 570 | ] 571 | 572 | [[package]] 573 | name = "mio" 574 | version = "0.8.6" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 577 | dependencies = [ 578 | "libc", 579 | "log 0.4.17", 580 | "wasi 0.11.0+wasi-snapshot-preview1", 581 | "windows-sys", 582 | ] 583 | 584 | [[package]] 585 | name = "nostr" 586 | version = "0.19.2" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "24aa7f71193e1b617a294122ab2c038545cb19eedd7a2a4f4bc33124bb511b5c" 589 | dependencies = [ 590 | "aes", 591 | "base64 0.21.0", 592 | "bech32", 593 | "bip39", 594 | "bitcoin", 595 | "bitcoin_hashes", 596 | "cbc", 597 | "getrandom", 598 | "instant", 599 | "log 0.4.17", 600 | "nostr-ots", 601 | "reqwest", 602 | "secp256k1", 603 | "serde", 604 | "serde_json", 605 | "thiserror", 606 | "url", 607 | ] 608 | 609 | [[package]] 610 | name = "nostr-ots" 611 | version = "0.2.0" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "8ef094791c6f25f23208066b949aaf66baf1a8e074975e665d15ae033724c0e1" 614 | dependencies = [ 615 | "base64 0.21.0", 616 | "bitcoin_hashes", 617 | "opentimestamps", 618 | "thiserror", 619 | "ureq", 620 | ] 621 | 622 | [[package]] 623 | name = "nostr-sdk" 624 | version = "0.19.1" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "481d934879674b590de88216cc809bf60293bce4c89c092b6121e83371ad7d73" 627 | dependencies = [ 628 | "futures-util", 629 | "log 0.4.17", 630 | "nostr", 631 | "once_cell", 632 | "thiserror", 633 | "tokio", 634 | "tokio-rustls", 635 | "tokio-socks", 636 | "tokio-tungstenite", 637 | "webpki-roots", 638 | ] 639 | 640 | [[package]] 641 | name = "num_cpus" 642 | version = "1.15.0" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 645 | dependencies = [ 646 | "hermit-abi", 647 | "libc", 648 | ] 649 | 650 | [[package]] 651 | name = "once_cell" 652 | version = "1.17.1" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 655 | 656 | [[package]] 657 | name = "opentimestamps" 658 | version = "0.1.2" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | checksum = "620900565529f3aa9482e4af511749dcde0fa64b3268bd690ce04bcd8662fcb5" 661 | dependencies = [ 662 | "env_logger", 663 | "log 0.3.9", 664 | "rust-crypto", 665 | ] 666 | 667 | [[package]] 668 | name = "parking_lot" 669 | version = "0.12.1" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 672 | dependencies = [ 673 | "lock_api", 674 | "parking_lot_core", 675 | ] 676 | 677 | [[package]] 678 | name = "parking_lot_core" 679 | version = "0.9.7" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 682 | dependencies = [ 683 | "cfg-if", 684 | "libc", 685 | "redox_syscall", 686 | "smallvec", 687 | "windows-sys", 688 | ] 689 | 690 | [[package]] 691 | name = "percent-encoding" 692 | version = "2.2.0" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 695 | 696 | [[package]] 697 | name = "pin-project-lite" 698 | version = "0.2.9" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 701 | 702 | [[package]] 703 | name = "pin-utils" 704 | version = "0.1.0" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 707 | 708 | [[package]] 709 | name = "ppv-lite86" 710 | version = "0.2.17" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 713 | 714 | [[package]] 715 | name = "proc-macro2" 716 | version = "1.0.51" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" 719 | dependencies = [ 720 | "unicode-ident", 721 | ] 722 | 723 | [[package]] 724 | name = "quote" 725 | version = "1.0.23" 726 | source = "registry+https://github.com/rust-lang/crates.io-index" 727 | checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" 728 | dependencies = [ 729 | "proc-macro2", 730 | ] 731 | 732 | [[package]] 733 | name = "rand" 734 | version = "0.3.23" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" 737 | dependencies = [ 738 | "libc", 739 | "rand 0.4.6", 740 | ] 741 | 742 | [[package]] 743 | name = "rand" 744 | version = "0.4.6" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" 747 | dependencies = [ 748 | "fuchsia-cprng", 749 | "libc", 750 | "rand_core 0.3.1", 751 | "rdrand", 752 | "winapi", 753 | ] 754 | 755 | [[package]] 756 | name = "rand" 757 | version = "0.8.5" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 760 | dependencies = [ 761 | "libc", 762 | "rand_chacha", 763 | "rand_core 0.6.4", 764 | ] 765 | 766 | [[package]] 767 | name = "rand_chacha" 768 | version = "0.3.1" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 771 | dependencies = [ 772 | "ppv-lite86", 773 | "rand_core 0.6.4", 774 | ] 775 | 776 | [[package]] 777 | name = "rand_core" 778 | version = "0.3.1" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 781 | dependencies = [ 782 | "rand_core 0.4.2", 783 | ] 784 | 785 | [[package]] 786 | name = "rand_core" 787 | version = "0.4.2" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 790 | 791 | [[package]] 792 | name = "rand_core" 793 | version = "0.6.4" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 796 | dependencies = [ 797 | "getrandom", 798 | ] 799 | 800 | [[package]] 801 | name = "rdrand" 802 | version = "0.4.0" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 805 | dependencies = [ 806 | "rand_core 0.3.1", 807 | ] 808 | 809 | [[package]] 810 | name = "redox_syscall" 811 | version = "0.2.16" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 814 | dependencies = [ 815 | "bitflags", 816 | ] 817 | 818 | [[package]] 819 | name = "regex" 820 | version = "0.2.11" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" 823 | dependencies = [ 824 | "aho-corasick", 825 | "memchr", 826 | "regex-syntax", 827 | "thread_local", 828 | "utf8-ranges", 829 | ] 830 | 831 | [[package]] 832 | name = "regex-syntax" 833 | version = "0.5.6" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" 836 | dependencies = [ 837 | "ucd-util", 838 | ] 839 | 840 | [[package]] 841 | name = "reqwest" 842 | version = "0.11.14" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" 845 | dependencies = [ 846 | "base64 0.21.0", 847 | "bytes", 848 | "encoding_rs", 849 | "futures-core", 850 | "futures-util", 851 | "h2", 852 | "http", 853 | "http-body", 854 | "hyper", 855 | "hyper-rustls", 856 | "ipnet", 857 | "js-sys", 858 | "log 0.4.17", 859 | "mime", 860 | "once_cell", 861 | "percent-encoding", 862 | "pin-project-lite", 863 | "rustls", 864 | "rustls-pemfile", 865 | "serde", 866 | "serde_json", 867 | "serde_urlencoded", 868 | "tokio", 869 | "tokio-rustls", 870 | "tokio-socks", 871 | "tower-service", 872 | "url", 873 | "wasm-bindgen", 874 | "wasm-bindgen-futures", 875 | "web-sys", 876 | "webpki-roots", 877 | "winreg", 878 | ] 879 | 880 | [[package]] 881 | name = "ring" 882 | version = "0.16.20" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 885 | dependencies = [ 886 | "cc", 887 | "libc", 888 | "once_cell", 889 | "spin", 890 | "untrusted", 891 | "web-sys", 892 | "winapi", 893 | ] 894 | 895 | [[package]] 896 | name = "rust-crypto" 897 | version = "0.2.36" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" 900 | dependencies = [ 901 | "gcc", 902 | "libc", 903 | "rand 0.3.23", 904 | "rustc-serialize", 905 | "time", 906 | ] 907 | 908 | [[package]] 909 | name = "rustc-serialize" 910 | version = "0.3.24" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" 913 | 914 | [[package]] 915 | name = "rustls" 916 | version = "0.20.8" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" 919 | dependencies = [ 920 | "log 0.4.17", 921 | "ring", 922 | "sct", 923 | "webpki", 924 | ] 925 | 926 | [[package]] 927 | name = "rustls-pemfile" 928 | version = "1.0.2" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" 931 | dependencies = [ 932 | "base64 0.21.0", 933 | ] 934 | 935 | [[package]] 936 | name = "ryu" 937 | version = "1.0.13" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 940 | 941 | [[package]] 942 | name = "scopeguard" 943 | version = "1.1.0" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 946 | 947 | [[package]] 948 | name = "sct" 949 | version = "0.7.0" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 952 | dependencies = [ 953 | "ring", 954 | "untrusted", 955 | ] 956 | 957 | [[package]] 958 | name = "secp256k1" 959 | version = "0.24.3" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" 962 | dependencies = [ 963 | "bitcoin_hashes", 964 | "rand 0.8.5", 965 | "secp256k1-sys", 966 | "serde", 967 | ] 968 | 969 | [[package]] 970 | name = "secp256k1-sys" 971 | version = "0.6.1" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" 974 | dependencies = [ 975 | "cc", 976 | ] 977 | 978 | [[package]] 979 | name = "serde" 980 | version = "1.0.152" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" 983 | dependencies = [ 984 | "serde_derive", 985 | ] 986 | 987 | [[package]] 988 | name = "serde_derive" 989 | version = "1.0.152" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" 992 | dependencies = [ 993 | "proc-macro2", 994 | "quote", 995 | "syn", 996 | ] 997 | 998 | [[package]] 999 | name = "serde_json" 1000 | version = "1.0.93" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" 1003 | dependencies = [ 1004 | "itoa", 1005 | "ryu", 1006 | "serde", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "serde_urlencoded" 1011 | version = "0.7.1" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1014 | dependencies = [ 1015 | "form_urlencoded", 1016 | "itoa", 1017 | "ryu", 1018 | "serde", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "sha1" 1023 | version = "0.10.5" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1026 | dependencies = [ 1027 | "cfg-if", 1028 | "cpufeatures", 1029 | "digest", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "signal-hook-registry" 1034 | version = "1.4.1" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1037 | dependencies = [ 1038 | "libc", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "slab" 1043 | version = "0.4.8" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1046 | dependencies = [ 1047 | "autocfg", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "smallvec" 1052 | version = "1.10.0" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1055 | 1056 | [[package]] 1057 | name = "socket2" 1058 | version = "0.4.9" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1061 | dependencies = [ 1062 | "libc", 1063 | "winapi", 1064 | ] 1065 | 1066 | [[package]] 1067 | name = "spin" 1068 | version = "0.5.2" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1071 | 1072 | [[package]] 1073 | name = "syn" 1074 | version = "1.0.109" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1077 | dependencies = [ 1078 | "proc-macro2", 1079 | "quote", 1080 | "unicode-ident", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "thiserror" 1085 | version = "1.0.38" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" 1088 | dependencies = [ 1089 | "thiserror-impl", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "thiserror-impl" 1094 | version = "1.0.38" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" 1097 | dependencies = [ 1098 | "proc-macro2", 1099 | "quote", 1100 | "syn", 1101 | ] 1102 | 1103 | [[package]] 1104 | name = "thread_local" 1105 | version = "0.3.6" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1108 | dependencies = [ 1109 | "lazy_static", 1110 | ] 1111 | 1112 | [[package]] 1113 | name = "time" 1114 | version = "0.1.45" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 1117 | dependencies = [ 1118 | "libc", 1119 | "wasi 0.10.0+wasi-snapshot-preview1", 1120 | "winapi", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "tinyvec" 1125 | version = "1.6.0" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1128 | dependencies = [ 1129 | "tinyvec_macros", 1130 | ] 1131 | 1132 | [[package]] 1133 | name = "tinyvec_macros" 1134 | version = "0.1.1" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1137 | 1138 | [[package]] 1139 | name = "tokio" 1140 | version = "1.26.0" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" 1143 | dependencies = [ 1144 | "autocfg", 1145 | "bytes", 1146 | "libc", 1147 | "memchr", 1148 | "mio", 1149 | "num_cpus", 1150 | "parking_lot", 1151 | "pin-project-lite", 1152 | "signal-hook-registry", 1153 | "socket2", 1154 | "tokio-macros", 1155 | "windows-sys", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "tokio-macros" 1160 | version = "1.8.2" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" 1163 | dependencies = [ 1164 | "proc-macro2", 1165 | "quote", 1166 | "syn", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "tokio-rustls" 1171 | version = "0.23.4" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 1174 | dependencies = [ 1175 | "rustls", 1176 | "tokio", 1177 | "webpki", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "tokio-socks" 1182 | version = "0.5.1" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" 1185 | dependencies = [ 1186 | "either", 1187 | "futures-util", 1188 | "thiserror", 1189 | "tokio", 1190 | ] 1191 | 1192 | [[package]] 1193 | name = "tokio-tungstenite" 1194 | version = "0.18.0" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" 1197 | dependencies = [ 1198 | "futures-util", 1199 | "log 0.4.17", 1200 | "rustls", 1201 | "tokio", 1202 | "tokio-rustls", 1203 | "tungstenite", 1204 | "webpki", 1205 | "webpki-roots", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "tokio-util" 1210 | version = "0.7.7" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 1213 | dependencies = [ 1214 | "bytes", 1215 | "futures-core", 1216 | "futures-sink", 1217 | "pin-project-lite", 1218 | "tokio", 1219 | "tracing", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "tower-service" 1224 | version = "0.3.2" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1227 | 1228 | [[package]] 1229 | name = "tracing" 1230 | version = "0.1.37" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1233 | dependencies = [ 1234 | "cfg-if", 1235 | "pin-project-lite", 1236 | "tracing-core", 1237 | ] 1238 | 1239 | [[package]] 1240 | name = "tracing-core" 1241 | version = "0.1.30" 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" 1243 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1244 | dependencies = [ 1245 | "once_cell", 1246 | ] 1247 | 1248 | [[package]] 1249 | name = "try-lock" 1250 | version = "0.2.4" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1253 | 1254 | [[package]] 1255 | name = "tungstenite" 1256 | version = "0.18.0" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" 1259 | dependencies = [ 1260 | "base64 0.13.1", 1261 | "byteorder", 1262 | "bytes", 1263 | "http", 1264 | "httparse", 1265 | "log 0.4.17", 1266 | "rand 0.8.5", 1267 | "rustls", 1268 | "sha1", 1269 | "thiserror", 1270 | "url", 1271 | "utf-8", 1272 | "webpki", 1273 | ] 1274 | 1275 | [[package]] 1276 | name = "typenum" 1277 | version = "1.16.0" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1280 | 1281 | [[package]] 1282 | name = "ucd-util" 1283 | version = "0.1.10" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "abd2fc5d32b590614af8b0a20d837f32eca055edd0bbead59a9cfe80858be003" 1286 | 1287 | [[package]] 1288 | name = "unicode-bidi" 1289 | version = "0.3.10" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" 1292 | 1293 | [[package]] 1294 | name = "unicode-ident" 1295 | version = "1.0.7" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "775c11906edafc97bc378816b94585fbd9a054eabaf86fdd0ced94af449efab7" 1298 | 1299 | [[package]] 1300 | name = "unicode-normalization" 1301 | version = "0.1.22" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1304 | dependencies = [ 1305 | "tinyvec", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "untrusted" 1310 | version = "0.7.1" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1313 | 1314 | [[package]] 1315 | name = "ureq" 1316 | version = "2.6.2" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" 1319 | dependencies = [ 1320 | "base64 0.13.1", 1321 | "flate2", 1322 | "log 0.4.17", 1323 | "once_cell", 1324 | "rustls", 1325 | "url", 1326 | "webpki", 1327 | "webpki-roots", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "url" 1332 | version = "2.3.1" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1335 | dependencies = [ 1336 | "form_urlencoded", 1337 | "idna", 1338 | "percent-encoding", 1339 | "serde", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "utf-8" 1344 | version = "0.7.6" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 1347 | 1348 | [[package]] 1349 | name = "utf8-ranges" 1350 | version = "1.0.5" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" 1353 | 1354 | [[package]] 1355 | name = "version_check" 1356 | version = "0.9.4" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1359 | 1360 | [[package]] 1361 | name = "want" 1362 | version = "0.3.0" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1365 | dependencies = [ 1366 | "log 0.4.17", 1367 | "try-lock", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "wasi" 1372 | version = "0.10.0+wasi-snapshot-preview1" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1375 | 1376 | [[package]] 1377 | name = "wasi" 1378 | version = "0.11.0+wasi-snapshot-preview1" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1381 | 1382 | [[package]] 1383 | name = "wasm-bindgen" 1384 | version = "0.2.84" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 1387 | dependencies = [ 1388 | "cfg-if", 1389 | "wasm-bindgen-macro", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "wasm-bindgen-backend" 1394 | version = "0.2.84" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 1397 | dependencies = [ 1398 | "bumpalo", 1399 | "log 0.4.17", 1400 | "once_cell", 1401 | "proc-macro2", 1402 | "quote", 1403 | "syn", 1404 | "wasm-bindgen-shared", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "wasm-bindgen-futures" 1409 | version = "0.4.34" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" 1412 | dependencies = [ 1413 | "cfg-if", 1414 | "js-sys", 1415 | "wasm-bindgen", 1416 | "web-sys", 1417 | ] 1418 | 1419 | [[package]] 1420 | name = "wasm-bindgen-macro" 1421 | version = "0.2.84" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 1424 | dependencies = [ 1425 | "quote", 1426 | "wasm-bindgen-macro-support", 1427 | ] 1428 | 1429 | [[package]] 1430 | name = "wasm-bindgen-macro-support" 1431 | version = "0.2.84" 1432 | source = "registry+https://github.com/rust-lang/crates.io-index" 1433 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 1434 | dependencies = [ 1435 | "proc-macro2", 1436 | "quote", 1437 | "syn", 1438 | "wasm-bindgen-backend", 1439 | "wasm-bindgen-shared", 1440 | ] 1441 | 1442 | [[package]] 1443 | name = "wasm-bindgen-shared" 1444 | version = "0.2.84" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 1447 | 1448 | [[package]] 1449 | name = "web-sys" 1450 | version = "0.3.61" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 1453 | dependencies = [ 1454 | "js-sys", 1455 | "wasm-bindgen", 1456 | ] 1457 | 1458 | [[package]] 1459 | name = "webpki" 1460 | version = "0.22.0" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 1463 | dependencies = [ 1464 | "ring", 1465 | "untrusted", 1466 | ] 1467 | 1468 | [[package]] 1469 | name = "webpki-roots" 1470 | version = "0.22.6" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 1473 | dependencies = [ 1474 | "webpki", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "winapi" 1479 | version = "0.3.9" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1482 | dependencies = [ 1483 | "winapi-i686-pc-windows-gnu", 1484 | "winapi-x86_64-pc-windows-gnu", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "winapi-i686-pc-windows-gnu" 1489 | version = "0.4.0" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1492 | 1493 | [[package]] 1494 | name = "winapi-x86_64-pc-windows-gnu" 1495 | version = "0.4.0" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1498 | 1499 | [[package]] 1500 | name = "windows-sys" 1501 | version = "0.45.0" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1504 | dependencies = [ 1505 | "windows-targets", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "windows-targets" 1510 | version = "0.42.1" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" 1513 | dependencies = [ 1514 | "windows_aarch64_gnullvm", 1515 | "windows_aarch64_msvc", 1516 | "windows_i686_gnu", 1517 | "windows_i686_msvc", 1518 | "windows_x86_64_gnu", 1519 | "windows_x86_64_gnullvm", 1520 | "windows_x86_64_msvc", 1521 | ] 1522 | 1523 | [[package]] 1524 | name = "windows_aarch64_gnullvm" 1525 | version = "0.42.1" 1526 | source = "registry+https://github.com/rust-lang/crates.io-index" 1527 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" 1528 | 1529 | [[package]] 1530 | name = "windows_aarch64_msvc" 1531 | version = "0.42.1" 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" 1533 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" 1534 | 1535 | [[package]] 1536 | name = "windows_i686_gnu" 1537 | version = "0.42.1" 1538 | source = "registry+https://github.com/rust-lang/crates.io-index" 1539 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" 1540 | 1541 | [[package]] 1542 | name = "windows_i686_msvc" 1543 | version = "0.42.1" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" 1546 | 1547 | [[package]] 1548 | name = "windows_x86_64_gnu" 1549 | version = "0.42.1" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" 1552 | 1553 | [[package]] 1554 | name = "windows_x86_64_gnullvm" 1555 | version = "0.42.1" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" 1558 | 1559 | [[package]] 1560 | name = "windows_x86_64_msvc" 1561 | version = "0.42.1" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" 1564 | 1565 | [[package]] 1566 | name = "winreg" 1567 | version = "0.10.1" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1570 | dependencies = [ 1571 | "winapi", 1572 | ] 1573 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello-nostr" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | nostr-sdk = "*" 10 | tokio = { version = "1", features = ["full"] } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Check https://rust-nostr.org 2 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::str::FromStr; 2 | use std::time::Duration; 3 | 4 | use nostr_sdk::prelude::*; 5 | use tokio::time; 6 | 7 | const PRIVATE_KEY: &str = "9c3654397cf1d1cf4068111e23510ed872849353756032b69ab0e475b9564450"; 8 | 9 | #[tokio::main] 10 | async fn main() -> Result<()> { 11 | let secret_key = SecretKey::from_str(PRIVATE_KEY)?; 12 | let my_keys = Keys::new(secret_key); 13 | 14 | let message = format!("Hello, world! My public key is: {}", my_keys.public_key()); 15 | println!("{}", message); 16 | 17 | let opts = Options::new().wait_for_send(true); 18 | let client = Client::new_with_opts(&my_keys, opts); 19 | client.add_relay("wss://relay.house", None).await?; 20 | client.add_relay("wss://relay.damus.io", None).await?; 21 | 22 | client.connect().await; 23 | 24 | let event_id = client.publish_text_note(message, &[]).await?; 25 | println!("{}", event_id); 26 | 27 | // Retrieve only our last event (from both relays) 28 | // let filter = Filter::new().id(event_id); 29 | 30 | // Retrieve all the events that we have posted 31 | let filter = Filter { 32 | ids: None, 33 | authors: Some(vec![my_keys.public_key()]), 34 | kinds: None, 35 | events: None, 36 | pubkeys: None, 37 | hashtags: None, 38 | references: None, 39 | search: None, 40 | since: None, 41 | until: None, 42 | limit: None, 43 | }; 44 | 45 | time::sleep(Duration::from_secs(1)).await; 46 | 47 | let events = client.get_events_of(vec![filter], None).await?; 48 | println!("{:#?}", events); 49 | 50 | Ok(()) 51 | } 52 | --------------------------------------------------------------------------------