├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md └── src ├── api_author ├── announce.rs ├── get_subscribers.rs ├── mod.rs ├── send_masked_payload.rs └── send_message.rs ├── bin └── subscriber.rs └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target -------------------------------------------------------------------------------- /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 = "aead" 7 | version = "0.4.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "6e3e798aa0c8239776f54415bc06f3d74b1850f3f830b45c35cfc80556973f70" 10 | dependencies = [ 11 | "generic-array", 12 | ] 13 | 14 | [[package]] 15 | name = "aes" 16 | version = "0.7.4" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "495ee669413bfbe9e8cace80f4d3d78e6d8c8d99579f97fb93bde351b185f2d4" 19 | dependencies = [ 20 | "cfg-if", 21 | "cipher", 22 | "cpufeatures", 23 | "opaque-debug", 24 | ] 25 | 26 | [[package]] 27 | name = "aes-gcm" 28 | version = "0.9.2" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" 31 | dependencies = [ 32 | "aead", 33 | "aes", 34 | "cipher", 35 | "ctr", 36 | "ghash", 37 | "subtle", 38 | ] 39 | 40 | [[package]] 41 | name = "ahash" 42 | version = "0.3.8" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" 45 | 46 | [[package]] 47 | name = "ahash" 48 | version = "0.7.4" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" 51 | dependencies = [ 52 | "getrandom 0.2.3", 53 | "once_cell", 54 | "version_check", 55 | ] 56 | 57 | [[package]] 58 | name = "aho-corasick" 59 | version = "0.7.18" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 62 | dependencies = [ 63 | "memchr", 64 | ] 65 | 66 | [[package]] 67 | name = "anyhow" 68 | version = "1.0.42" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "595d3cfa7a60d4555cb5067b99f07142a08ea778de5cf993f7b75c7d8fabc486" 71 | 72 | [[package]] 73 | name = "arrayref" 74 | version = "0.3.6" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 77 | 78 | [[package]] 79 | name = "asn1_der" 80 | version = "0.7.4" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" 83 | 84 | [[package]] 85 | name = "async-trait" 86 | version = "0.1.50" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722" 89 | dependencies = [ 90 | "proc-macro2", 91 | "quote", 92 | "syn", 93 | ] 94 | 95 | [[package]] 96 | name = "asynchronous-codec" 97 | version = "0.6.0" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" 100 | dependencies = [ 101 | "bytes", 102 | "futures-sink", 103 | "futures-util", 104 | "memchr", 105 | "pin-project-lite", 106 | ] 107 | 108 | [[package]] 109 | name = "atomic" 110 | version = "0.5.0" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" 113 | dependencies = [ 114 | "autocfg", 115 | ] 116 | 117 | [[package]] 118 | name = "atty" 119 | version = "0.2.14" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 122 | dependencies = [ 123 | "hermit-abi", 124 | "libc", 125 | "winapi", 126 | ] 127 | 128 | [[package]] 129 | name = "author" 130 | version = "0.1.0" 131 | dependencies = [ 132 | "anyhow", 133 | "iota-streams", 134 | "tokio", 135 | ] 136 | 137 | [[package]] 138 | name = "autocfg" 139 | version = "1.0.1" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 142 | 143 | [[package]] 144 | name = "base64" 145 | version = "0.12.3" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 148 | 149 | [[package]] 150 | name = "base64" 151 | version = "0.13.0" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 154 | 155 | [[package]] 156 | name = "bech32" 157 | version = "0.8.1" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" 160 | 161 | [[package]] 162 | name = "bee-common" 163 | version = "0.4.1" 164 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 165 | dependencies = [ 166 | "autocfg", 167 | "chrono", 168 | "fern", 169 | "log", 170 | "serde", 171 | "thiserror", 172 | ] 173 | 174 | [[package]] 175 | name = "bee-crypto" 176 | version = "0.2.1-alpha" 177 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 178 | dependencies = [ 179 | "bee-ternary", 180 | "byteorder", 181 | "lazy_static", 182 | "thiserror", 183 | "tiny-keccak", 184 | ] 185 | 186 | [[package]] 187 | name = "bee-ledger" 188 | version = "0.4.0" 189 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 190 | dependencies = [ 191 | "bee-common", 192 | "bee-message", 193 | "thiserror", 194 | ] 195 | 196 | [[package]] 197 | name = "bee-message" 198 | version = "0.1.5" 199 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 200 | dependencies = [ 201 | "bech32", 202 | "bee-common", 203 | "bee-pow", 204 | "bee-ternary", 205 | "bytemuck", 206 | "digest", 207 | "hex", 208 | "iota-crypto 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 209 | "serde", 210 | "thiserror", 211 | ] 212 | 213 | [[package]] 214 | name = "bee-network" 215 | version = "0.2.1" 216 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 217 | dependencies = [ 218 | "async-trait", 219 | "bee-runtime", 220 | "futures", 221 | "hashbrown 0.11.2", 222 | "libp2p", 223 | "libp2p-core", 224 | "log", 225 | "once_cell", 226 | "rand 0.8.4", 227 | "serde", 228 | "thiserror", 229 | "tokio", 230 | "tokio-stream", 231 | ] 232 | 233 | [[package]] 234 | name = "bee-pow" 235 | version = "0.1.0" 236 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 237 | dependencies = [ 238 | "bee-crypto", 239 | "bee-ternary", 240 | "iota-crypto 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 241 | "thiserror", 242 | ] 243 | 244 | [[package]] 245 | name = "bee-protocol" 246 | version = "0.1.0-alpha" 247 | source = "git+https://github.com/iotaledger/bee?rev=c5b44f0a2867bb1655960e9418a87599e6565418#c5b44f0a2867bb1655960e9418a87599e6565418" 248 | dependencies = [ 249 | "bee-message", 250 | "bee-network", 251 | "bee-pow", 252 | ] 253 | 254 | [[package]] 255 | name = "bee-rest-api" 256 | version = "0.1.0-alpha" 257 | source = "git+https://github.com/iotaledger/bee?rev=c5b44f0a2867bb1655960e9418a87599e6565418#c5b44f0a2867bb1655960e9418a87599e6565418" 258 | dependencies = [ 259 | "bee-ledger", 260 | "bee-message", 261 | "bee-pow", 262 | "bee-protocol", 263 | "hex", 264 | "multiaddr 0.12.0", 265 | "serde", 266 | "serde_json", 267 | "thiserror", 268 | ] 269 | 270 | [[package]] 271 | name = "bee-runtime" 272 | version = "0.1.1-alpha" 273 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 274 | dependencies = [ 275 | "async-trait", 276 | "bee-storage", 277 | "dashmap", 278 | "futures", 279 | "log", 280 | ] 281 | 282 | [[package]] 283 | name = "bee-storage" 284 | version = "0.9.0" 285 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 286 | dependencies = [ 287 | "bee-common", 288 | "serde", 289 | "thiserror", 290 | ] 291 | 292 | [[package]] 293 | name = "bee-ternary" 294 | version = "0.4.2-alpha" 295 | source = "git+https://github.com/iotaledger/bee.git?branch=dev#aba384b293a350be2ca6cb783b37cf4189254fc6" 296 | dependencies = [ 297 | "autocfg", 298 | "num-traits", 299 | "serde", 300 | ] 301 | 302 | [[package]] 303 | name = "bitflags" 304 | version = "1.2.1" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 307 | 308 | [[package]] 309 | name = "blake2" 310 | version = "0.9.1" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "10a5720225ef5daecf08657f23791354e1685a8c91a4c60c7f3d3b2892f978f4" 313 | dependencies = [ 314 | "crypto-mac 0.8.0", 315 | "digest", 316 | "opaque-debug", 317 | ] 318 | 319 | [[package]] 320 | name = "block-buffer" 321 | version = "0.9.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 324 | dependencies = [ 325 | "generic-array", 326 | ] 327 | 328 | [[package]] 329 | name = "bs58" 330 | version = "0.4.0" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 333 | 334 | [[package]] 335 | name = "bumpalo" 336 | version = "3.7.0" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" 339 | 340 | [[package]] 341 | name = "bytemuck" 342 | version = "1.7.0" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435" 345 | 346 | [[package]] 347 | name = "byteorder" 348 | version = "1.4.3" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 351 | 352 | [[package]] 353 | name = "bytes" 354 | version = "1.0.1" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" 357 | 358 | [[package]] 359 | name = "cc" 360 | version = "1.0.69" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" 363 | 364 | [[package]] 365 | name = "cfg-if" 366 | version = "1.0.0" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 369 | 370 | [[package]] 371 | name = "chacha20" 372 | version = "0.7.1" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" 375 | dependencies = [ 376 | "cfg-if", 377 | "cipher", 378 | "cpufeatures", 379 | "zeroize", 380 | ] 381 | 382 | [[package]] 383 | name = "chacha20poly1305" 384 | version = "0.8.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" 387 | dependencies = [ 388 | "aead", 389 | "chacha20", 390 | "cipher", 391 | "poly1305", 392 | "zeroize", 393 | ] 394 | 395 | [[package]] 396 | name = "chrono" 397 | version = "0.4.19" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 400 | dependencies = [ 401 | "libc", 402 | "num-integer", 403 | "num-traits", 404 | "time", 405 | "winapi", 406 | ] 407 | 408 | [[package]] 409 | name = "chunked_transfer" 410 | version = "1.4.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" 413 | 414 | [[package]] 415 | name = "cipher" 416 | version = "0.3.0" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" 419 | dependencies = [ 420 | "generic-array", 421 | ] 422 | 423 | [[package]] 424 | name = "colored" 425 | version = "1.9.3" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" 428 | dependencies = [ 429 | "atty", 430 | "lazy_static", 431 | "winapi", 432 | ] 433 | 434 | [[package]] 435 | name = "cpufeatures" 436 | version = "0.1.5" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" 439 | dependencies = [ 440 | "libc", 441 | ] 442 | 443 | [[package]] 444 | name = "crunchy" 445 | version = "0.2.2" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 448 | 449 | [[package]] 450 | name = "crypto-mac" 451 | version = "0.8.0" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 454 | dependencies = [ 455 | "generic-array", 456 | "subtle", 457 | ] 458 | 459 | [[package]] 460 | name = "crypto-mac" 461 | version = "0.11.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" 464 | dependencies = [ 465 | "generic-array", 466 | "subtle", 467 | ] 468 | 469 | [[package]] 470 | name = "cstr_core" 471 | version = "0.2.4" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "917ba9efe9e1e736671d5a03f006afc4e7e3f32503e2077e0bcaf519c0c8c1d3" 474 | dependencies = [ 475 | "cty", 476 | "memchr", 477 | ] 478 | 479 | [[package]] 480 | name = "ctr" 481 | version = "0.7.0" 482 | source = "registry+https://github.com/rust-lang/crates.io-index" 483 | checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" 484 | dependencies = [ 485 | "cipher", 486 | ] 487 | 488 | [[package]] 489 | name = "cty" 490 | version = "0.2.1" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "7313c0d620d0cb4dbd9d019e461a4beb501071ff46ec0ab933efb4daa76d73e3" 493 | 494 | [[package]] 495 | name = "curve25519-dalek" 496 | version = "3.1.0" 497 | source = "registry+https://github.com/rust-lang/crates.io-index" 498 | checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" 499 | dependencies = [ 500 | "byteorder", 501 | "digest", 502 | "rand_core 0.5.1", 503 | "subtle", 504 | "zeroize", 505 | ] 506 | 507 | [[package]] 508 | name = "dashmap" 509 | version = "4.0.2" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" 512 | dependencies = [ 513 | "cfg-if", 514 | "num_cpus", 515 | ] 516 | 517 | [[package]] 518 | name = "data-encoding" 519 | version = "2.3.2" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" 522 | 523 | [[package]] 524 | name = "digest" 525 | version = "0.9.0" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 528 | dependencies = [ 529 | "generic-array", 530 | ] 531 | 532 | [[package]] 533 | name = "displaydoc" 534 | version = "0.2.2" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "278ef1934318d524612205f69df005eea30ec10edf7913e500b5a527fce55bc0" 537 | dependencies = [ 538 | "proc-macro2", 539 | "quote", 540 | "syn", 541 | ] 542 | 543 | [[package]] 544 | name = "ed25519" 545 | version = "1.1.1" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "8d0860415b12243916284c67a9be413e044ee6668247b99ba26d94b2bc06c8f6" 548 | dependencies = [ 549 | "signature", 550 | ] 551 | 552 | [[package]] 553 | name = "ed25519-dalek" 554 | version = "1.0.1" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" 557 | dependencies = [ 558 | "curve25519-dalek", 559 | "ed25519", 560 | "rand 0.7.3", 561 | "rand_core 0.5.1", 562 | "serde", 563 | "sha2", 564 | "zeroize", 565 | ] 566 | 567 | [[package]] 568 | name = "ed25519-zebra" 569 | version = "2.2.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "0a128b76af6dd4b427e34a6fd43dc78dbfe73672ec41ff615a2414c1a0ad0409" 572 | dependencies = [ 573 | "curve25519-dalek", 574 | "hex", 575 | "rand_core 0.5.1", 576 | "sha2", 577 | "thiserror", 578 | ] 579 | 580 | [[package]] 581 | name = "either" 582 | version = "1.6.1" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 585 | 586 | [[package]] 587 | name = "enum-as-inner" 588 | version = "0.3.3" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" 591 | dependencies = [ 592 | "heck", 593 | "proc-macro2", 594 | "quote", 595 | "syn", 596 | ] 597 | 598 | [[package]] 599 | name = "fern" 600 | version = "0.6.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "8c9a4820f0ccc8a7afd67c39a0f1a0f4b07ca1725164271a64939d7aeb9af065" 603 | dependencies = [ 604 | "colored", 605 | "log", 606 | ] 607 | 608 | [[package]] 609 | name = "fixedbitset" 610 | version = "0.2.0" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" 613 | 614 | [[package]] 615 | name = "fnv" 616 | version = "1.0.7" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 619 | 620 | [[package]] 621 | name = "form_urlencoded" 622 | version = "1.0.1" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 625 | dependencies = [ 626 | "matches", 627 | "percent-encoding", 628 | ] 629 | 630 | [[package]] 631 | name = "futures" 632 | version = "0.3.15" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" 635 | dependencies = [ 636 | "futures-channel", 637 | "futures-core", 638 | "futures-executor", 639 | "futures-io", 640 | "futures-sink", 641 | "futures-task", 642 | "futures-util", 643 | ] 644 | 645 | [[package]] 646 | name = "futures-channel" 647 | version = "0.3.15" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" 650 | dependencies = [ 651 | "futures-core", 652 | "futures-sink", 653 | ] 654 | 655 | [[package]] 656 | name = "futures-core" 657 | version = "0.3.15" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" 660 | 661 | [[package]] 662 | name = "futures-executor" 663 | version = "0.3.15" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" 666 | dependencies = [ 667 | "futures-core", 668 | "futures-task", 669 | "futures-util", 670 | "num_cpus", 671 | ] 672 | 673 | [[package]] 674 | name = "futures-io" 675 | version = "0.3.15" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" 678 | 679 | [[package]] 680 | name = "futures-macro" 681 | version = "0.3.15" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" 684 | dependencies = [ 685 | "autocfg", 686 | "proc-macro-hack", 687 | "proc-macro2", 688 | "quote", 689 | "syn", 690 | ] 691 | 692 | [[package]] 693 | name = "futures-sink" 694 | version = "0.3.15" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" 697 | 698 | [[package]] 699 | name = "futures-task" 700 | version = "0.3.15" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" 703 | 704 | [[package]] 705 | name = "futures-timer" 706 | version = "3.0.2" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" 709 | 710 | [[package]] 711 | name = "futures-util" 712 | version = "0.3.15" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" 715 | dependencies = [ 716 | "autocfg", 717 | "futures-channel", 718 | "futures-core", 719 | "futures-io", 720 | "futures-macro", 721 | "futures-sink", 722 | "futures-task", 723 | "memchr", 724 | "pin-project-lite", 725 | "pin-utils", 726 | "proc-macro-hack", 727 | "proc-macro-nested", 728 | "slab", 729 | ] 730 | 731 | [[package]] 732 | name = "generic-array" 733 | version = "0.14.4" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" 736 | dependencies = [ 737 | "typenum", 738 | "version_check", 739 | ] 740 | 741 | [[package]] 742 | name = "getrandom" 743 | version = "0.1.16" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 746 | dependencies = [ 747 | "cfg-if", 748 | "js-sys", 749 | "libc", 750 | "wasi 0.9.0+wasi-snapshot-preview1", 751 | "wasm-bindgen", 752 | ] 753 | 754 | [[package]] 755 | name = "getrandom" 756 | version = "0.2.3" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" 759 | dependencies = [ 760 | "cfg-if", 761 | "js-sys", 762 | "libc", 763 | "wasi 0.10.2+wasi-snapshot-preview1", 764 | "wasm-bindgen", 765 | ] 766 | 767 | [[package]] 768 | name = "ghash" 769 | version = "0.4.2" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "7bbd60caa311237d508927dbba7594b483db3ef05faa55172fcf89b1bcda7853" 772 | dependencies = [ 773 | "opaque-debug", 774 | "polyval", 775 | ] 776 | 777 | [[package]] 778 | name = "hashbrown" 779 | version = "0.8.2" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" 782 | dependencies = [ 783 | "ahash 0.3.8", 784 | "autocfg", 785 | ] 786 | 787 | [[package]] 788 | name = "hashbrown" 789 | version = "0.11.2" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 792 | dependencies = [ 793 | "ahash 0.7.4", 794 | ] 795 | 796 | [[package]] 797 | name = "heck" 798 | version = "0.3.3" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 801 | dependencies = [ 802 | "unicode-segmentation", 803 | ] 804 | 805 | [[package]] 806 | name = "hermit-abi" 807 | version = "0.1.19" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 810 | dependencies = [ 811 | "libc", 812 | ] 813 | 814 | [[package]] 815 | name = "hex" 816 | version = "0.4.3" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 819 | 820 | [[package]] 821 | name = "hmac" 822 | version = "0.8.1" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 825 | dependencies = [ 826 | "crypto-mac 0.8.0", 827 | "digest", 828 | ] 829 | 830 | [[package]] 831 | name = "hmac" 832 | version = "0.11.0" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" 835 | dependencies = [ 836 | "crypto-mac 0.11.0", 837 | "digest", 838 | ] 839 | 840 | [[package]] 841 | name = "hmac-drbg" 842 | version = "0.3.0" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 845 | dependencies = [ 846 | "digest", 847 | "generic-array", 848 | "hmac 0.8.1", 849 | ] 850 | 851 | [[package]] 852 | name = "hostname" 853 | version = "0.3.1" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" 856 | dependencies = [ 857 | "libc", 858 | "match_cfg", 859 | "winapi", 860 | ] 861 | 862 | [[package]] 863 | name = "idna" 864 | version = "0.2.3" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 867 | dependencies = [ 868 | "matches", 869 | "unicode-bidi", 870 | "unicode-normalization", 871 | ] 872 | 873 | [[package]] 874 | name = "if-addrs" 875 | version = "0.6.5" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "28538916eb3f3976311f5dfbe67b5362d0add1293d0a9cad17debf86f8e3aa48" 878 | dependencies = [ 879 | "if-addrs-sys", 880 | "libc", 881 | "winapi", 882 | ] 883 | 884 | [[package]] 885 | name = "if-addrs-sys" 886 | version = "0.3.2" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" 889 | dependencies = [ 890 | "cc", 891 | "libc", 892 | ] 893 | 894 | [[package]] 895 | name = "indexmap" 896 | version = "1.7.0" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" 899 | dependencies = [ 900 | "autocfg", 901 | "hashbrown 0.11.2", 902 | ] 903 | 904 | [[package]] 905 | name = "instant" 906 | version = "0.1.10" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" 909 | dependencies = [ 910 | "cfg-if", 911 | ] 912 | 913 | [[package]] 914 | name = "iota-client" 915 | version = "1.0.1" 916 | source = "git+https://github.com/iotaledger/iota.rs?branch=dev#7407b957efe0136e04c61eef1b30f6873ee3eb67" 917 | dependencies = [ 918 | "async-trait", 919 | "bee-common", 920 | "bee-message", 921 | "bee-pow", 922 | "bee-rest-api", 923 | "futures", 924 | "hex", 925 | "iota-crypto 0.6.0 (git+https://github.com/iotaledger/crypto.rs?rev=e42be4d)", 926 | "log", 927 | "num_cpus", 928 | "regex", 929 | "serde", 930 | "serde_json", 931 | "thiserror", 932 | "tokio", 933 | "ureq", 934 | "url", 935 | "zeroize", 936 | ] 937 | 938 | [[package]] 939 | name = "iota-crypto" 940 | version = "0.6.0" 941 | source = "git+https://github.com/iotaledger/crypto.rs?branch=dev#e42be4d028edc520a3d71b5f37bf37f5a128dc32" 942 | dependencies = [ 943 | "blake2", 944 | "digest", 945 | ] 946 | 947 | [[package]] 948 | name = "iota-crypto" 949 | version = "0.6.0" 950 | source = "git+https://github.com/iotaledger/crypto.rs?rev=e42be4d#e42be4d028edc520a3d71b5f37bf37f5a128dc32" 951 | dependencies = [ 952 | "blake2", 953 | "digest", 954 | "ed25519-zebra", 955 | "getrandom 0.2.3", 956 | "hmac 0.11.0", 957 | "pbkdf2", 958 | "serde", 959 | "sha2", 960 | "unicode-normalization", 961 | ] 962 | 963 | [[package]] 964 | name = "iota-crypto" 965 | version = "0.6.0" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "3a563712b1857f24cd194eb799ddee2c9f5fdb9f8cadc8cae333da5c7d2a9213" 968 | dependencies = [ 969 | "blake2", 970 | "digest", 971 | "ed25519-zebra", 972 | ] 973 | 974 | [[package]] 975 | name = "iota-streams" 976 | version = "1.0.0" 977 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 978 | dependencies = [ 979 | "iota-streams-app", 980 | "iota-streams-app-channels", 981 | "iota-streams-core", 982 | "iota-streams-core-edsig", 983 | "iota-streams-core-keccak", 984 | "iota-streams-ddml", 985 | ] 986 | 987 | [[package]] 988 | name = "iota-streams-app" 989 | version = "1.0.1" 990 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 991 | dependencies = [ 992 | "anyhow", 993 | "chrono", 994 | "cstr_core", 995 | "cty", 996 | "futures", 997 | "hex", 998 | "iota-client", 999 | "iota-streams-core", 1000 | "iota-streams-core-edsig", 1001 | "iota-streams-ddml", 1002 | "num_cpus", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "iota-streams-app-channels" 1007 | version = "1.0.1" 1008 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 1009 | dependencies = [ 1010 | "hex", 1011 | "iota-streams-app", 1012 | "iota-streams-core", 1013 | "iota-streams-core-edsig", 1014 | "iota-streams-core-keccak", 1015 | "iota-streams-ddml", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "iota-streams-core" 1020 | version = "0.3.1" 1021 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 1022 | dependencies = [ 1023 | "anyhow", 1024 | "digest", 1025 | "displaydoc", 1026 | "hashbrown 0.11.2", 1027 | "hex", 1028 | "iota-crypto 0.6.0 (git+https://github.com/iotaledger/crypto.rs?branch=dev)", 1029 | "rand 0.7.3", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "iota-streams-core-edsig" 1034 | version = "0.2.1" 1035 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 1036 | dependencies = [ 1037 | "curve25519-dalek", 1038 | "ed25519-dalek", 1039 | "hashbrown 0.8.2", 1040 | "iota-streams-core", 1041 | "x25519-dalek", 1042 | ] 1043 | 1044 | [[package]] 1045 | name = "iota-streams-core-keccak" 1046 | version = "0.3.1" 1047 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 1048 | dependencies = [ 1049 | "iota-streams-core", 1050 | "keccak", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "iota-streams-ddml" 1055 | version = "0.2.3" 1056 | source = "git+https://github.com/iotaledger/streams?branch=develop#d7f0219e42448217c800d36d2c487f3acd7da0fe" 1057 | dependencies = [ 1058 | "hashbrown 0.8.2", 1059 | "iota-streams-core", 1060 | "iota-streams-core-edsig", 1061 | "rand 0.7.3", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "ipconfig" 1066 | version = "0.2.2" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" 1069 | dependencies = [ 1070 | "socket2 0.3.19", 1071 | "widestring", 1072 | "winapi", 1073 | "winreg", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "ipnet" 1078 | version = "2.3.1" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" 1081 | 1082 | [[package]] 1083 | name = "itertools" 1084 | version = "0.10.1" 1085 | source = "registry+https://github.com/rust-lang/crates.io-index" 1086 | checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" 1087 | dependencies = [ 1088 | "either", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "itoa" 1093 | version = "0.4.7" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" 1096 | 1097 | [[package]] 1098 | name = "js-sys" 1099 | version = "0.3.51" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" 1102 | dependencies = [ 1103 | "wasm-bindgen", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "keccak" 1108 | version = "0.1.0" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" 1111 | 1112 | [[package]] 1113 | name = "lazy_static" 1114 | version = "1.4.0" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1117 | 1118 | [[package]] 1119 | name = "libc" 1120 | version = "0.2.98" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" 1123 | 1124 | [[package]] 1125 | name = "libp2p" 1126 | version = "0.39.1" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "9004c06878ef8f3b4b4067e69a140d87ed20bf777287f82223e49713b36ee433" 1129 | dependencies = [ 1130 | "atomic", 1131 | "bytes", 1132 | "futures", 1133 | "lazy_static", 1134 | "libp2p-core", 1135 | "libp2p-dns", 1136 | "libp2p-identify", 1137 | "libp2p-mplex", 1138 | "libp2p-noise", 1139 | "libp2p-swarm", 1140 | "libp2p-swarm-derive", 1141 | "libp2p-tcp", 1142 | "libp2p-yamux", 1143 | "multiaddr 0.13.0", 1144 | "parking_lot", 1145 | "pin-project 1.0.7", 1146 | "smallvec", 1147 | "wasm-timer", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "libp2p-core" 1152 | version = "0.29.0" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "af9b4abdeaa420593a297c8592f63fad4234f4b88dc9343b8fd8e736c35faa59" 1155 | dependencies = [ 1156 | "asn1_der", 1157 | "bs58", 1158 | "ed25519-dalek", 1159 | "either", 1160 | "fnv", 1161 | "futures", 1162 | "futures-timer", 1163 | "lazy_static", 1164 | "libsecp256k1", 1165 | "log", 1166 | "multiaddr 0.13.0", 1167 | "multihash 0.14.0", 1168 | "multistream-select", 1169 | "parking_lot", 1170 | "pin-project 1.0.7", 1171 | "prost", 1172 | "prost-build", 1173 | "rand 0.7.3", 1174 | "ring", 1175 | "rw-stream-sink", 1176 | "sha2", 1177 | "smallvec", 1178 | "thiserror", 1179 | "unsigned-varint 0.7.0", 1180 | "void", 1181 | "zeroize", 1182 | ] 1183 | 1184 | [[package]] 1185 | name = "libp2p-dns" 1186 | version = "0.29.0" 1187 | source = "registry+https://github.com/rust-lang/crates.io-index" 1188 | checksum = "58ff08b3196b85a17f202d80589e93b1660a574af67275706657fdc762e42c32" 1189 | dependencies = [ 1190 | "futures", 1191 | "libp2p-core", 1192 | "log", 1193 | "smallvec", 1194 | "trust-dns-resolver", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "libp2p-identify" 1199 | version = "0.30.0" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "a7b61f6cf07664fb97016c318c4d4512b3dd4cc07238607f3f0163245f99008e" 1202 | dependencies = [ 1203 | "futures", 1204 | "libp2p-core", 1205 | "libp2p-swarm", 1206 | "log", 1207 | "prost", 1208 | "prost-build", 1209 | "smallvec", 1210 | "wasm-timer", 1211 | ] 1212 | 1213 | [[package]] 1214 | name = "libp2p-mplex" 1215 | version = "0.29.0" 1216 | source = "registry+https://github.com/rust-lang/crates.io-index" 1217 | checksum = "313d9ea526c68df4425f580024e67a9d3ffd49f2c33de5154b1f5019816f7a99" 1218 | dependencies = [ 1219 | "asynchronous-codec", 1220 | "bytes", 1221 | "futures", 1222 | "libp2p-core", 1223 | "log", 1224 | "nohash-hasher", 1225 | "parking_lot", 1226 | "rand 0.7.3", 1227 | "smallvec", 1228 | "unsigned-varint 0.7.0", 1229 | ] 1230 | 1231 | [[package]] 1232 | name = "libp2p-noise" 1233 | version = "0.32.0" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "3f1db7212f342b6ba7c981cc40e31f76e9e56cb48e65fa4c142ecaca5839523e" 1236 | dependencies = [ 1237 | "bytes", 1238 | "curve25519-dalek", 1239 | "futures", 1240 | "lazy_static", 1241 | "libp2p-core", 1242 | "log", 1243 | "prost", 1244 | "prost-build", 1245 | "rand 0.8.4", 1246 | "sha2", 1247 | "snow", 1248 | "static_assertions", 1249 | "x25519-dalek", 1250 | "zeroize", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "libp2p-swarm" 1255 | version = "0.30.0" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "7083861341e1555467863b4cd802bea1e8c4787c0f7b5110097d0f1f3248f9a9" 1258 | dependencies = [ 1259 | "either", 1260 | "futures", 1261 | "libp2p-core", 1262 | "log", 1263 | "rand 0.7.3", 1264 | "smallvec", 1265 | "void", 1266 | "wasm-timer", 1267 | ] 1268 | 1269 | [[package]] 1270 | name = "libp2p-swarm-derive" 1271 | version = "0.24.0" 1272 | source = "registry+https://github.com/rust-lang/crates.io-index" 1273 | checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" 1274 | dependencies = [ 1275 | "quote", 1276 | "syn", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "libp2p-tcp" 1281 | version = "0.29.0" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "79edd26b6b4bb5feee210dcda562dca186940dfecb0024b979c3f50824b3bf28" 1284 | dependencies = [ 1285 | "futures", 1286 | "futures-timer", 1287 | "if-addrs", 1288 | "ipnet", 1289 | "libc", 1290 | "libp2p-core", 1291 | "log", 1292 | "socket2 0.4.0", 1293 | "tokio", 1294 | ] 1295 | 1296 | [[package]] 1297 | name = "libp2p-yamux" 1298 | version = "0.33.0" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" 1301 | dependencies = [ 1302 | "futures", 1303 | "libp2p-core", 1304 | "parking_lot", 1305 | "thiserror", 1306 | "yamux", 1307 | ] 1308 | 1309 | [[package]] 1310 | name = "libsecp256k1" 1311 | version = "0.5.0" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" 1314 | dependencies = [ 1315 | "arrayref", 1316 | "base64 0.12.3", 1317 | "digest", 1318 | "hmac-drbg", 1319 | "libsecp256k1-core", 1320 | "libsecp256k1-gen-ecmult", 1321 | "libsecp256k1-gen-genmult", 1322 | "rand 0.7.3", 1323 | "serde", 1324 | "sha2", 1325 | "typenum", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "libsecp256k1-core" 1330 | version = "0.2.1" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "4ee11012b293ea30093c129173cac4335513064094619f4639a25b310fd33c11" 1333 | dependencies = [ 1334 | "crunchy", 1335 | "digest", 1336 | "subtle", 1337 | ] 1338 | 1339 | [[package]] 1340 | name = "libsecp256k1-gen-ecmult" 1341 | version = "0.2.0" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "32239626ffbb6a095b83b37a02ceb3672b2443a87a000a884fc3c4d16925c9c0" 1344 | dependencies = [ 1345 | "libsecp256k1-core", 1346 | ] 1347 | 1348 | [[package]] 1349 | name = "libsecp256k1-gen-genmult" 1350 | version = "0.2.0" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "76acb433e21d10f5f9892b1962c2856c58c7f39a9e4bd68ac82b9436a0ffd5b9" 1353 | dependencies = [ 1354 | "libsecp256k1-core", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "linked-hash-map" 1359 | version = "0.5.4" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" 1362 | 1363 | [[package]] 1364 | name = "lock_api" 1365 | version = "0.4.4" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" 1368 | dependencies = [ 1369 | "scopeguard", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "log" 1374 | version = "0.4.14" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 1377 | dependencies = [ 1378 | "cfg-if", 1379 | "serde", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "lru-cache" 1384 | version = "0.1.2" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" 1387 | dependencies = [ 1388 | "linked-hash-map", 1389 | ] 1390 | 1391 | [[package]] 1392 | name = "match_cfg" 1393 | version = "0.1.0" 1394 | source = "registry+https://github.com/rust-lang/crates.io-index" 1395 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" 1396 | 1397 | [[package]] 1398 | name = "matches" 1399 | version = "0.1.8" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1402 | 1403 | [[package]] 1404 | name = "memchr" 1405 | version = "2.4.0" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" 1408 | 1409 | [[package]] 1410 | name = "mio" 1411 | version = "0.7.13" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" 1414 | dependencies = [ 1415 | "libc", 1416 | "log", 1417 | "miow", 1418 | "ntapi", 1419 | "winapi", 1420 | ] 1421 | 1422 | [[package]] 1423 | name = "miow" 1424 | version = "0.3.7" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 1427 | dependencies = [ 1428 | "winapi", 1429 | ] 1430 | 1431 | [[package]] 1432 | name = "multiaddr" 1433 | version = "0.12.0" 1434 | source = "registry+https://github.com/rust-lang/crates.io-index" 1435 | checksum = "7139982f583d7e53879d9f611fe48ced18e77d684309484f2252c76bcd39f549" 1436 | dependencies = [ 1437 | "arrayref", 1438 | "bs58", 1439 | "byteorder", 1440 | "data-encoding", 1441 | "multihash 0.13.2", 1442 | "percent-encoding", 1443 | "serde", 1444 | "static_assertions", 1445 | "unsigned-varint 0.7.0", 1446 | "url", 1447 | ] 1448 | 1449 | [[package]] 1450 | name = "multiaddr" 1451 | version = "0.13.0" 1452 | source = "registry+https://github.com/rust-lang/crates.io-index" 1453 | checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" 1454 | dependencies = [ 1455 | "arrayref", 1456 | "bs58", 1457 | "byteorder", 1458 | "data-encoding", 1459 | "multihash 0.14.0", 1460 | "percent-encoding", 1461 | "serde", 1462 | "static_assertions", 1463 | "unsigned-varint 0.7.0", 1464 | "url", 1465 | ] 1466 | 1467 | [[package]] 1468 | name = "multihash" 1469 | version = "0.13.2" 1470 | source = "registry+https://github.com/rust-lang/crates.io-index" 1471 | checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" 1472 | dependencies = [ 1473 | "generic-array", 1474 | "multihash-derive", 1475 | "unsigned-varint 0.5.1", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "multihash" 1480 | version = "0.14.0" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" 1483 | dependencies = [ 1484 | "digest", 1485 | "generic-array", 1486 | "multihash-derive", 1487 | "sha2", 1488 | "unsigned-varint 0.7.0", 1489 | ] 1490 | 1491 | [[package]] 1492 | name = "multihash-derive" 1493 | version = "0.7.2" 1494 | source = "registry+https://github.com/rust-lang/crates.io-index" 1495 | checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" 1496 | dependencies = [ 1497 | "proc-macro-crate", 1498 | "proc-macro-error", 1499 | "proc-macro2", 1500 | "quote", 1501 | "syn", 1502 | "synstructure", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "multimap" 1507 | version = "0.8.3" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" 1510 | 1511 | [[package]] 1512 | name = "multistream-select" 1513 | version = "0.10.2" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8" 1516 | dependencies = [ 1517 | "bytes", 1518 | "futures", 1519 | "log", 1520 | "pin-project 1.0.7", 1521 | "smallvec", 1522 | "unsigned-varint 0.7.0", 1523 | ] 1524 | 1525 | [[package]] 1526 | name = "nohash-hasher" 1527 | version = "0.2.0" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" 1530 | 1531 | [[package]] 1532 | name = "ntapi" 1533 | version = "0.3.6" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 1536 | dependencies = [ 1537 | "winapi", 1538 | ] 1539 | 1540 | [[package]] 1541 | name = "num-integer" 1542 | version = "0.1.44" 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" 1544 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 1545 | dependencies = [ 1546 | "autocfg", 1547 | "num-traits", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "num-traits" 1552 | version = "0.2.14" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1555 | dependencies = [ 1556 | "autocfg", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "num_cpus" 1561 | version = "1.13.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1564 | dependencies = [ 1565 | "hermit-abi", 1566 | "libc", 1567 | ] 1568 | 1569 | [[package]] 1570 | name = "once_cell" 1571 | version = "1.8.0" 1572 | source = "registry+https://github.com/rust-lang/crates.io-index" 1573 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 1574 | 1575 | [[package]] 1576 | name = "opaque-debug" 1577 | version = "0.3.0" 1578 | source = "registry+https://github.com/rust-lang/crates.io-index" 1579 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 1580 | 1581 | [[package]] 1582 | name = "parking_lot" 1583 | version = "0.11.1" 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" 1585 | checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" 1586 | dependencies = [ 1587 | "instant", 1588 | "lock_api", 1589 | "parking_lot_core", 1590 | ] 1591 | 1592 | [[package]] 1593 | name = "parking_lot_core" 1594 | version = "0.8.3" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" 1597 | dependencies = [ 1598 | "cfg-if", 1599 | "instant", 1600 | "libc", 1601 | "redox_syscall", 1602 | "smallvec", 1603 | "winapi", 1604 | ] 1605 | 1606 | [[package]] 1607 | name = "pbkdf2" 1608 | version = "0.8.0" 1609 | source = "registry+https://github.com/rust-lang/crates.io-index" 1610 | checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" 1611 | dependencies = [ 1612 | "crypto-mac 0.11.0", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "percent-encoding" 1617 | version = "2.1.0" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1620 | 1621 | [[package]] 1622 | name = "pest" 1623 | version = "2.1.3" 1624 | source = "registry+https://github.com/rust-lang/crates.io-index" 1625 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 1626 | dependencies = [ 1627 | "ucd-trie", 1628 | ] 1629 | 1630 | [[package]] 1631 | name = "petgraph" 1632 | version = "0.5.1" 1633 | source = "registry+https://github.com/rust-lang/crates.io-index" 1634 | checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" 1635 | dependencies = [ 1636 | "fixedbitset", 1637 | "indexmap", 1638 | ] 1639 | 1640 | [[package]] 1641 | name = "pin-project" 1642 | version = "0.4.28" 1643 | source = "registry+https://github.com/rust-lang/crates.io-index" 1644 | checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" 1645 | dependencies = [ 1646 | "pin-project-internal 0.4.28", 1647 | ] 1648 | 1649 | [[package]] 1650 | name = "pin-project" 1651 | version = "1.0.7" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" 1654 | dependencies = [ 1655 | "pin-project-internal 1.0.7", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "pin-project-internal" 1660 | version = "0.4.28" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" 1663 | dependencies = [ 1664 | "proc-macro2", 1665 | "quote", 1666 | "syn", 1667 | ] 1668 | 1669 | [[package]] 1670 | name = "pin-project-internal" 1671 | version = "1.0.7" 1672 | source = "registry+https://github.com/rust-lang/crates.io-index" 1673 | checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" 1674 | dependencies = [ 1675 | "proc-macro2", 1676 | "quote", 1677 | "syn", 1678 | ] 1679 | 1680 | [[package]] 1681 | name = "pin-project-lite" 1682 | version = "0.2.7" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" 1685 | 1686 | [[package]] 1687 | name = "pin-utils" 1688 | version = "0.1.0" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1691 | 1692 | [[package]] 1693 | name = "poly1305" 1694 | version = "0.7.0" 1695 | source = "registry+https://github.com/rust-lang/crates.io-index" 1696 | checksum = "4fe800695325da85083cd23b56826fccb2e2dc29b218e7811a6f33bc93f414be" 1697 | dependencies = [ 1698 | "cpufeatures", 1699 | "opaque-debug", 1700 | "universal-hash", 1701 | ] 1702 | 1703 | [[package]] 1704 | name = "polyval" 1705 | version = "0.5.1" 1706 | source = "registry+https://github.com/rust-lang/crates.io-index" 1707 | checksum = "e597450cbf209787f0e6de80bf3795c6b2356a380ee87837b545aded8dbc1823" 1708 | dependencies = [ 1709 | "cfg-if", 1710 | "cpufeatures", 1711 | "opaque-debug", 1712 | "universal-hash", 1713 | ] 1714 | 1715 | [[package]] 1716 | name = "ppv-lite86" 1717 | version = "0.2.10" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 1720 | 1721 | [[package]] 1722 | name = "proc-macro-crate" 1723 | version = "1.0.0" 1724 | source = "registry+https://github.com/rust-lang/crates.io-index" 1725 | checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" 1726 | dependencies = [ 1727 | "thiserror", 1728 | "toml", 1729 | ] 1730 | 1731 | [[package]] 1732 | name = "proc-macro-error" 1733 | version = "1.0.4" 1734 | source = "registry+https://github.com/rust-lang/crates.io-index" 1735 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1736 | dependencies = [ 1737 | "proc-macro-error-attr", 1738 | "proc-macro2", 1739 | "quote", 1740 | "syn", 1741 | "version_check", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "proc-macro-error-attr" 1746 | version = "1.0.4" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1749 | dependencies = [ 1750 | "proc-macro2", 1751 | "quote", 1752 | "version_check", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "proc-macro-hack" 1757 | version = "0.5.19" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 1760 | 1761 | [[package]] 1762 | name = "proc-macro-nested" 1763 | version = "0.1.7" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 1766 | 1767 | [[package]] 1768 | name = "proc-macro2" 1769 | version = "1.0.27" 1770 | source = "registry+https://github.com/rust-lang/crates.io-index" 1771 | checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" 1772 | dependencies = [ 1773 | "unicode-xid", 1774 | ] 1775 | 1776 | [[package]] 1777 | name = "prost" 1778 | version = "0.8.0" 1779 | source = "registry+https://github.com/rust-lang/crates.io-index" 1780 | checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" 1781 | dependencies = [ 1782 | "bytes", 1783 | "prost-derive", 1784 | ] 1785 | 1786 | [[package]] 1787 | name = "prost-build" 1788 | version = "0.8.0" 1789 | source = "registry+https://github.com/rust-lang/crates.io-index" 1790 | checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" 1791 | dependencies = [ 1792 | "bytes", 1793 | "heck", 1794 | "itertools", 1795 | "log", 1796 | "multimap", 1797 | "petgraph", 1798 | "prost", 1799 | "prost-types", 1800 | "tempfile", 1801 | "which", 1802 | ] 1803 | 1804 | [[package]] 1805 | name = "prost-derive" 1806 | version = "0.8.0" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" 1809 | dependencies = [ 1810 | "anyhow", 1811 | "itertools", 1812 | "proc-macro2", 1813 | "quote", 1814 | "syn", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "prost-types" 1819 | version = "0.8.0" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" 1822 | dependencies = [ 1823 | "bytes", 1824 | "prost", 1825 | ] 1826 | 1827 | [[package]] 1828 | name = "quick-error" 1829 | version = "1.2.3" 1830 | source = "registry+https://github.com/rust-lang/crates.io-index" 1831 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 1832 | 1833 | [[package]] 1834 | name = "quote" 1835 | version = "1.0.9" 1836 | source = "registry+https://github.com/rust-lang/crates.io-index" 1837 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 1838 | dependencies = [ 1839 | "proc-macro2", 1840 | ] 1841 | 1842 | [[package]] 1843 | name = "rand" 1844 | version = "0.7.3" 1845 | source = "registry+https://github.com/rust-lang/crates.io-index" 1846 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1847 | dependencies = [ 1848 | "getrandom 0.1.16", 1849 | "libc", 1850 | "rand_chacha 0.2.2", 1851 | "rand_core 0.5.1", 1852 | "rand_hc 0.2.0", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "rand" 1857 | version = "0.8.4" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" 1860 | dependencies = [ 1861 | "libc", 1862 | "rand_chacha 0.3.1", 1863 | "rand_core 0.6.3", 1864 | "rand_hc 0.3.1", 1865 | ] 1866 | 1867 | [[package]] 1868 | name = "rand_chacha" 1869 | version = "0.2.2" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1872 | dependencies = [ 1873 | "ppv-lite86", 1874 | "rand_core 0.5.1", 1875 | ] 1876 | 1877 | [[package]] 1878 | name = "rand_chacha" 1879 | version = "0.3.1" 1880 | source = "registry+https://github.com/rust-lang/crates.io-index" 1881 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1882 | dependencies = [ 1883 | "ppv-lite86", 1884 | "rand_core 0.6.3", 1885 | ] 1886 | 1887 | [[package]] 1888 | name = "rand_core" 1889 | version = "0.5.1" 1890 | source = "registry+https://github.com/rust-lang/crates.io-index" 1891 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1892 | dependencies = [ 1893 | "getrandom 0.1.16", 1894 | ] 1895 | 1896 | [[package]] 1897 | name = "rand_core" 1898 | version = "0.6.3" 1899 | source = "registry+https://github.com/rust-lang/crates.io-index" 1900 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1901 | dependencies = [ 1902 | "getrandom 0.2.3", 1903 | ] 1904 | 1905 | [[package]] 1906 | name = "rand_hc" 1907 | version = "0.2.0" 1908 | source = "registry+https://github.com/rust-lang/crates.io-index" 1909 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1910 | dependencies = [ 1911 | "rand_core 0.5.1", 1912 | ] 1913 | 1914 | [[package]] 1915 | name = "rand_hc" 1916 | version = "0.3.1" 1917 | source = "registry+https://github.com/rust-lang/crates.io-index" 1918 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" 1919 | dependencies = [ 1920 | "rand_core 0.6.3", 1921 | ] 1922 | 1923 | [[package]] 1924 | name = "redox_syscall" 1925 | version = "0.2.9" 1926 | source = "registry+https://github.com/rust-lang/crates.io-index" 1927 | checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" 1928 | dependencies = [ 1929 | "bitflags", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "regex" 1934 | version = "1.5.4" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1937 | dependencies = [ 1938 | "aho-corasick", 1939 | "memchr", 1940 | "regex-syntax", 1941 | ] 1942 | 1943 | [[package]] 1944 | name = "regex-syntax" 1945 | version = "0.6.25" 1946 | source = "registry+https://github.com/rust-lang/crates.io-index" 1947 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1948 | 1949 | [[package]] 1950 | name = "remove_dir_all" 1951 | version = "0.5.3" 1952 | source = "registry+https://github.com/rust-lang/crates.io-index" 1953 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1954 | dependencies = [ 1955 | "winapi", 1956 | ] 1957 | 1958 | [[package]] 1959 | name = "resolv-conf" 1960 | version = "0.7.0" 1961 | source = "registry+https://github.com/rust-lang/crates.io-index" 1962 | checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" 1963 | dependencies = [ 1964 | "hostname", 1965 | "quick-error", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "ring" 1970 | version = "0.16.20" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1973 | dependencies = [ 1974 | "cc", 1975 | "libc", 1976 | "once_cell", 1977 | "spin", 1978 | "untrusted", 1979 | "web-sys", 1980 | "winapi", 1981 | ] 1982 | 1983 | [[package]] 1984 | name = "rustc_version" 1985 | version = "0.3.3" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" 1988 | dependencies = [ 1989 | "semver", 1990 | ] 1991 | 1992 | [[package]] 1993 | name = "rustls" 1994 | version = "0.19.1" 1995 | source = "registry+https://github.com/rust-lang/crates.io-index" 1996 | checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" 1997 | dependencies = [ 1998 | "base64 0.13.0", 1999 | "log", 2000 | "ring", 2001 | "sct", 2002 | "webpki", 2003 | ] 2004 | 2005 | [[package]] 2006 | name = "rw-stream-sink" 2007 | version = "0.2.1" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" 2010 | dependencies = [ 2011 | "futures", 2012 | "pin-project 0.4.28", 2013 | "static_assertions", 2014 | ] 2015 | 2016 | [[package]] 2017 | name = "ryu" 2018 | version = "1.0.5" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 2021 | 2022 | [[package]] 2023 | name = "scopeguard" 2024 | version = "1.1.0" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2027 | 2028 | [[package]] 2029 | name = "sct" 2030 | version = "0.6.1" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" 2033 | dependencies = [ 2034 | "ring", 2035 | "untrusted", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "semver" 2040 | version = "0.11.0" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" 2043 | dependencies = [ 2044 | "semver-parser", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "semver-parser" 2049 | version = "0.10.2" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" 2052 | dependencies = [ 2053 | "pest", 2054 | ] 2055 | 2056 | [[package]] 2057 | name = "serde" 2058 | version = "1.0.126" 2059 | source = "registry+https://github.com/rust-lang/crates.io-index" 2060 | checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" 2061 | dependencies = [ 2062 | "serde_derive", 2063 | ] 2064 | 2065 | [[package]] 2066 | name = "serde_derive" 2067 | version = "1.0.126" 2068 | source = "registry+https://github.com/rust-lang/crates.io-index" 2069 | checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" 2070 | dependencies = [ 2071 | "proc-macro2", 2072 | "quote", 2073 | "syn", 2074 | ] 2075 | 2076 | [[package]] 2077 | name = "serde_json" 2078 | version = "1.0.64" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" 2081 | dependencies = [ 2082 | "itoa", 2083 | "ryu", 2084 | "serde", 2085 | ] 2086 | 2087 | [[package]] 2088 | name = "sha2" 2089 | version = "0.9.5" 2090 | source = "registry+https://github.com/rust-lang/crates.io-index" 2091 | checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" 2092 | dependencies = [ 2093 | "block-buffer", 2094 | "cfg-if", 2095 | "cpufeatures", 2096 | "digest", 2097 | "opaque-debug", 2098 | ] 2099 | 2100 | [[package]] 2101 | name = "signal-hook-registry" 2102 | version = "1.4.0" 2103 | source = "registry+https://github.com/rust-lang/crates.io-index" 2104 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 2105 | dependencies = [ 2106 | "libc", 2107 | ] 2108 | 2109 | [[package]] 2110 | name = "signature" 2111 | version = "1.3.1" 2112 | source = "registry+https://github.com/rust-lang/crates.io-index" 2113 | checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" 2114 | 2115 | [[package]] 2116 | name = "slab" 2117 | version = "0.4.3" 2118 | source = "registry+https://github.com/rust-lang/crates.io-index" 2119 | checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" 2120 | 2121 | [[package]] 2122 | name = "smallvec" 2123 | version = "1.6.1" 2124 | source = "registry+https://github.com/rust-lang/crates.io-index" 2125 | checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" 2126 | 2127 | [[package]] 2128 | name = "snow" 2129 | version = "0.8.0" 2130 | source = "registry+https://github.com/rust-lang/crates.io-index" 2131 | checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" 2132 | dependencies = [ 2133 | "aes-gcm", 2134 | "blake2", 2135 | "chacha20poly1305", 2136 | "rand 0.8.4", 2137 | "rand_core 0.6.3", 2138 | "ring", 2139 | "rustc_version", 2140 | "sha2", 2141 | "subtle", 2142 | "x25519-dalek", 2143 | ] 2144 | 2145 | [[package]] 2146 | name = "socket2" 2147 | version = "0.3.19" 2148 | source = "registry+https://github.com/rust-lang/crates.io-index" 2149 | checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" 2150 | dependencies = [ 2151 | "cfg-if", 2152 | "libc", 2153 | "winapi", 2154 | ] 2155 | 2156 | [[package]] 2157 | name = "socket2" 2158 | version = "0.4.0" 2159 | source = "registry+https://github.com/rust-lang/crates.io-index" 2160 | checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" 2161 | dependencies = [ 2162 | "libc", 2163 | "winapi", 2164 | ] 2165 | 2166 | [[package]] 2167 | name = "spin" 2168 | version = "0.5.2" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2171 | 2172 | [[package]] 2173 | name = "static_assertions" 2174 | version = "1.1.0" 2175 | source = "registry+https://github.com/rust-lang/crates.io-index" 2176 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2177 | 2178 | [[package]] 2179 | name = "subtle" 2180 | version = "2.4.1" 2181 | source = "registry+https://github.com/rust-lang/crates.io-index" 2182 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2183 | 2184 | [[package]] 2185 | name = "syn" 2186 | version = "1.0.73" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" 2189 | dependencies = [ 2190 | "proc-macro2", 2191 | "quote", 2192 | "unicode-xid", 2193 | ] 2194 | 2195 | [[package]] 2196 | name = "synstructure" 2197 | version = "0.12.5" 2198 | source = "registry+https://github.com/rust-lang/crates.io-index" 2199 | checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" 2200 | dependencies = [ 2201 | "proc-macro2", 2202 | "quote", 2203 | "syn", 2204 | "unicode-xid", 2205 | ] 2206 | 2207 | [[package]] 2208 | name = "tempfile" 2209 | version = "3.2.0" 2210 | source = "registry+https://github.com/rust-lang/crates.io-index" 2211 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 2212 | dependencies = [ 2213 | "cfg-if", 2214 | "libc", 2215 | "rand 0.8.4", 2216 | "redox_syscall", 2217 | "remove_dir_all", 2218 | "winapi", 2219 | ] 2220 | 2221 | [[package]] 2222 | name = "thiserror" 2223 | version = "1.0.26" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" 2226 | dependencies = [ 2227 | "thiserror-impl", 2228 | ] 2229 | 2230 | [[package]] 2231 | name = "thiserror-impl" 2232 | version = "1.0.26" 2233 | source = "registry+https://github.com/rust-lang/crates.io-index" 2234 | checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" 2235 | dependencies = [ 2236 | "proc-macro2", 2237 | "quote", 2238 | "syn", 2239 | ] 2240 | 2241 | [[package]] 2242 | name = "time" 2243 | version = "0.1.43" 2244 | source = "registry+https://github.com/rust-lang/crates.io-index" 2245 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 2246 | dependencies = [ 2247 | "libc", 2248 | "winapi", 2249 | ] 2250 | 2251 | [[package]] 2252 | name = "tiny-keccak" 2253 | version = "2.0.2" 2254 | source = "registry+https://github.com/rust-lang/crates.io-index" 2255 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2256 | dependencies = [ 2257 | "crunchy", 2258 | ] 2259 | 2260 | [[package]] 2261 | name = "tinyvec" 2262 | version = "1.2.0" 2263 | source = "registry+https://github.com/rust-lang/crates.io-index" 2264 | checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" 2265 | dependencies = [ 2266 | "tinyvec_macros", 2267 | ] 2268 | 2269 | [[package]] 2270 | name = "tinyvec_macros" 2271 | version = "0.1.0" 2272 | source = "registry+https://github.com/rust-lang/crates.io-index" 2273 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2274 | 2275 | [[package]] 2276 | name = "tokio" 2277 | version = "1.8.1" 2278 | source = "registry+https://github.com/rust-lang/crates.io-index" 2279 | checksum = "98c8b05dc14c75ea83d63dd391100353789f5f24b8b3866542a5e85c8be8e985" 2280 | dependencies = [ 2281 | "autocfg", 2282 | "bytes", 2283 | "libc", 2284 | "memchr", 2285 | "mio", 2286 | "num_cpus", 2287 | "once_cell", 2288 | "parking_lot", 2289 | "pin-project-lite", 2290 | "signal-hook-registry", 2291 | "tokio-macros", 2292 | "winapi", 2293 | ] 2294 | 2295 | [[package]] 2296 | name = "tokio-macros" 2297 | version = "1.3.0" 2298 | source = "registry+https://github.com/rust-lang/crates.io-index" 2299 | checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" 2300 | dependencies = [ 2301 | "proc-macro2", 2302 | "quote", 2303 | "syn", 2304 | ] 2305 | 2306 | [[package]] 2307 | name = "tokio-stream" 2308 | version = "0.1.7" 2309 | source = "registry+https://github.com/rust-lang/crates.io-index" 2310 | checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" 2311 | dependencies = [ 2312 | "futures-core", 2313 | "pin-project-lite", 2314 | "tokio", 2315 | ] 2316 | 2317 | [[package]] 2318 | name = "toml" 2319 | version = "0.5.8" 2320 | source = "registry+https://github.com/rust-lang/crates.io-index" 2321 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 2322 | dependencies = [ 2323 | "serde", 2324 | ] 2325 | 2326 | [[package]] 2327 | name = "trust-dns-proto" 2328 | version = "0.20.3" 2329 | source = "registry+https://github.com/rust-lang/crates.io-index" 2330 | checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4" 2331 | dependencies = [ 2332 | "async-trait", 2333 | "cfg-if", 2334 | "data-encoding", 2335 | "enum-as-inner", 2336 | "futures-channel", 2337 | "futures-io", 2338 | "futures-util", 2339 | "idna", 2340 | "ipnet", 2341 | "lazy_static", 2342 | "log", 2343 | "rand 0.8.4", 2344 | "smallvec", 2345 | "thiserror", 2346 | "tinyvec", 2347 | "tokio", 2348 | "url", 2349 | ] 2350 | 2351 | [[package]] 2352 | name = "trust-dns-resolver" 2353 | version = "0.20.3" 2354 | source = "registry+https://github.com/rust-lang/crates.io-index" 2355 | checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770" 2356 | dependencies = [ 2357 | "cfg-if", 2358 | "futures-util", 2359 | "ipconfig", 2360 | "lazy_static", 2361 | "log", 2362 | "lru-cache", 2363 | "parking_lot", 2364 | "resolv-conf", 2365 | "smallvec", 2366 | "thiserror", 2367 | "tokio", 2368 | "trust-dns-proto", 2369 | ] 2370 | 2371 | [[package]] 2372 | name = "typenum" 2373 | version = "1.13.0" 2374 | source = "registry+https://github.com/rust-lang/crates.io-index" 2375 | checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" 2376 | 2377 | [[package]] 2378 | name = "ucd-trie" 2379 | version = "0.1.3" 2380 | source = "registry+https://github.com/rust-lang/crates.io-index" 2381 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 2382 | 2383 | [[package]] 2384 | name = "unicode-bidi" 2385 | version = "0.3.5" 2386 | source = "registry+https://github.com/rust-lang/crates.io-index" 2387 | checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" 2388 | dependencies = [ 2389 | "matches", 2390 | ] 2391 | 2392 | [[package]] 2393 | name = "unicode-normalization" 2394 | version = "0.1.19" 2395 | source = "registry+https://github.com/rust-lang/crates.io-index" 2396 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 2397 | dependencies = [ 2398 | "tinyvec", 2399 | ] 2400 | 2401 | [[package]] 2402 | name = "unicode-segmentation" 2403 | version = "1.8.0" 2404 | source = "registry+https://github.com/rust-lang/crates.io-index" 2405 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 2406 | 2407 | [[package]] 2408 | name = "unicode-xid" 2409 | version = "0.2.2" 2410 | source = "registry+https://github.com/rust-lang/crates.io-index" 2411 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 2412 | 2413 | [[package]] 2414 | name = "universal-hash" 2415 | version = "0.4.0" 2416 | source = "registry+https://github.com/rust-lang/crates.io-index" 2417 | checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" 2418 | dependencies = [ 2419 | "generic-array", 2420 | "subtle", 2421 | ] 2422 | 2423 | [[package]] 2424 | name = "unsigned-varint" 2425 | version = "0.5.1" 2426 | source = "registry+https://github.com/rust-lang/crates.io-index" 2427 | checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" 2428 | 2429 | [[package]] 2430 | name = "unsigned-varint" 2431 | version = "0.7.0" 2432 | source = "registry+https://github.com/rust-lang/crates.io-index" 2433 | checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" 2434 | dependencies = [ 2435 | "asynchronous-codec", 2436 | "bytes", 2437 | ] 2438 | 2439 | [[package]] 2440 | name = "untrusted" 2441 | version = "0.7.1" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2444 | 2445 | [[package]] 2446 | name = "ureq" 2447 | version = "2.1.1" 2448 | source = "registry+https://github.com/rust-lang/crates.io-index" 2449 | checksum = "2475a6781e9bc546e7b64f4013d2f4032c8c6a40fcffd7c6f4ee734a890972ab" 2450 | dependencies = [ 2451 | "base64 0.13.0", 2452 | "chunked_transfer", 2453 | "log", 2454 | "once_cell", 2455 | "rustls", 2456 | "serde", 2457 | "serde_json", 2458 | "url", 2459 | "webpki", 2460 | "webpki-roots", 2461 | ] 2462 | 2463 | [[package]] 2464 | name = "url" 2465 | version = "2.2.2" 2466 | source = "registry+https://github.com/rust-lang/crates.io-index" 2467 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 2468 | dependencies = [ 2469 | "form_urlencoded", 2470 | "idna", 2471 | "matches", 2472 | "percent-encoding", 2473 | ] 2474 | 2475 | [[package]] 2476 | name = "version_check" 2477 | version = "0.9.3" 2478 | source = "registry+https://github.com/rust-lang/crates.io-index" 2479 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 2480 | 2481 | [[package]] 2482 | name = "void" 2483 | version = "1.0.2" 2484 | source = "registry+https://github.com/rust-lang/crates.io-index" 2485 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 2486 | 2487 | [[package]] 2488 | name = "wasi" 2489 | version = "0.9.0+wasi-snapshot-preview1" 2490 | source = "registry+https://github.com/rust-lang/crates.io-index" 2491 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2492 | 2493 | [[package]] 2494 | name = "wasi" 2495 | version = "0.10.2+wasi-snapshot-preview1" 2496 | source = "registry+https://github.com/rust-lang/crates.io-index" 2497 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 2498 | 2499 | [[package]] 2500 | name = "wasm-bindgen" 2501 | version = "0.2.74" 2502 | source = "registry+https://github.com/rust-lang/crates.io-index" 2503 | checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" 2504 | dependencies = [ 2505 | "cfg-if", 2506 | "wasm-bindgen-macro", 2507 | ] 2508 | 2509 | [[package]] 2510 | name = "wasm-bindgen-backend" 2511 | version = "0.2.74" 2512 | source = "registry+https://github.com/rust-lang/crates.io-index" 2513 | checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" 2514 | dependencies = [ 2515 | "bumpalo", 2516 | "lazy_static", 2517 | "log", 2518 | "proc-macro2", 2519 | "quote", 2520 | "syn", 2521 | "wasm-bindgen-shared", 2522 | ] 2523 | 2524 | [[package]] 2525 | name = "wasm-bindgen-futures" 2526 | version = "0.4.24" 2527 | source = "registry+https://github.com/rust-lang/crates.io-index" 2528 | checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" 2529 | dependencies = [ 2530 | "cfg-if", 2531 | "js-sys", 2532 | "wasm-bindgen", 2533 | "web-sys", 2534 | ] 2535 | 2536 | [[package]] 2537 | name = "wasm-bindgen-macro" 2538 | version = "0.2.74" 2539 | source = "registry+https://github.com/rust-lang/crates.io-index" 2540 | checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" 2541 | dependencies = [ 2542 | "quote", 2543 | "wasm-bindgen-macro-support", 2544 | ] 2545 | 2546 | [[package]] 2547 | name = "wasm-bindgen-macro-support" 2548 | version = "0.2.74" 2549 | source = "registry+https://github.com/rust-lang/crates.io-index" 2550 | checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" 2551 | dependencies = [ 2552 | "proc-macro2", 2553 | "quote", 2554 | "syn", 2555 | "wasm-bindgen-backend", 2556 | "wasm-bindgen-shared", 2557 | ] 2558 | 2559 | [[package]] 2560 | name = "wasm-bindgen-shared" 2561 | version = "0.2.74" 2562 | source = "registry+https://github.com/rust-lang/crates.io-index" 2563 | checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" 2564 | 2565 | [[package]] 2566 | name = "wasm-timer" 2567 | version = "0.2.5" 2568 | source = "registry+https://github.com/rust-lang/crates.io-index" 2569 | checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" 2570 | dependencies = [ 2571 | "futures", 2572 | "js-sys", 2573 | "parking_lot", 2574 | "pin-utils", 2575 | "wasm-bindgen", 2576 | "wasm-bindgen-futures", 2577 | "web-sys", 2578 | ] 2579 | 2580 | [[package]] 2581 | name = "web-sys" 2582 | version = "0.3.51" 2583 | source = "registry+https://github.com/rust-lang/crates.io-index" 2584 | checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" 2585 | dependencies = [ 2586 | "js-sys", 2587 | "wasm-bindgen", 2588 | ] 2589 | 2590 | [[package]] 2591 | name = "webpki" 2592 | version = "0.21.4" 2593 | source = "registry+https://github.com/rust-lang/crates.io-index" 2594 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 2595 | dependencies = [ 2596 | "ring", 2597 | "untrusted", 2598 | ] 2599 | 2600 | [[package]] 2601 | name = "webpki-roots" 2602 | version = "0.21.1" 2603 | source = "registry+https://github.com/rust-lang/crates.io-index" 2604 | checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" 2605 | dependencies = [ 2606 | "webpki", 2607 | ] 2608 | 2609 | [[package]] 2610 | name = "which" 2611 | version = "4.1.0" 2612 | source = "registry+https://github.com/rust-lang/crates.io-index" 2613 | checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" 2614 | dependencies = [ 2615 | "either", 2616 | "libc", 2617 | ] 2618 | 2619 | [[package]] 2620 | name = "widestring" 2621 | version = "0.4.3" 2622 | source = "registry+https://github.com/rust-lang/crates.io-index" 2623 | checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" 2624 | 2625 | [[package]] 2626 | name = "winapi" 2627 | version = "0.3.9" 2628 | source = "registry+https://github.com/rust-lang/crates.io-index" 2629 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2630 | dependencies = [ 2631 | "winapi-i686-pc-windows-gnu", 2632 | "winapi-x86_64-pc-windows-gnu", 2633 | ] 2634 | 2635 | [[package]] 2636 | name = "winapi-i686-pc-windows-gnu" 2637 | version = "0.4.0" 2638 | source = "registry+https://github.com/rust-lang/crates.io-index" 2639 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2640 | 2641 | [[package]] 2642 | name = "winapi-x86_64-pc-windows-gnu" 2643 | version = "0.4.0" 2644 | source = "registry+https://github.com/rust-lang/crates.io-index" 2645 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2646 | 2647 | [[package]] 2648 | name = "winreg" 2649 | version = "0.6.2" 2650 | source = "registry+https://github.com/rust-lang/crates.io-index" 2651 | checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" 2652 | dependencies = [ 2653 | "winapi", 2654 | ] 2655 | 2656 | [[package]] 2657 | name = "x25519-dalek" 2658 | version = "1.1.1" 2659 | source = "registry+https://github.com/rust-lang/crates.io-index" 2660 | checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" 2661 | dependencies = [ 2662 | "curve25519-dalek", 2663 | "rand_core 0.5.1", 2664 | "zeroize", 2665 | ] 2666 | 2667 | [[package]] 2668 | name = "yamux" 2669 | version = "0.9.0" 2670 | source = "registry+https://github.com/rust-lang/crates.io-index" 2671 | checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" 2672 | dependencies = [ 2673 | "futures", 2674 | "log", 2675 | "nohash-hasher", 2676 | "parking_lot", 2677 | "rand 0.8.4", 2678 | "static_assertions", 2679 | ] 2680 | 2681 | [[package]] 2682 | name = "zeroize" 2683 | version = "1.3.0" 2684 | source = "registry+https://github.com/rust-lang/crates.io-index" 2685 | checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" 2686 | dependencies = [ 2687 | "zeroize_derive", 2688 | ] 2689 | 2690 | [[package]] 2691 | name = "zeroize_derive" 2692 | version = "1.1.0" 2693 | source = "registry+https://github.com/rust-lang/crates.io-index" 2694 | checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" 2695 | dependencies = [ 2696 | "proc-macro2", 2697 | "quote", 2698 | "syn", 2699 | "synstructure", 2700 | ] 2701 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "author" 3 | version = "0.1.0" 4 | authors = ["JakeSCahill ", "kwek20 "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | anyhow = { version = "1.0", default-features = false } 11 | iota-streams = { git = "https://github.com/iotaledger/streams", branch = "develop"} 12 | tokio = { version = "1.5.0", features = ["full"] } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | This repository contains sample code for you to get started with the Channels application in IOTA Streams. 4 | 5 | You can find documentation for these examples on the [IOTA documentation portal](https://docs.iota.org/docs/channels/1.1/overview). 6 | 7 | ## Getting started 8 | 9 | To get started you need [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Rust](https://www.rust-lang.org/tools/install) installed on your device. 10 | 11 | 1. Clone this repository 12 | 13 | ```bash 14 | git clone https://github.com/iotaledger/channels-examples.git 15 | cd channels-examples 16 | ``` 17 | 18 | 2. Open the `src/main.rs` file and change the author's secret to something secure 19 | 20 | ```rust 21 | // REPLACE THE SECRET WITH YOUR OWN 22 | let mut author = Author::new("MYAUTHORSECRET", ...); 23 | ``` 24 | 25 | 3. Start the author and follow the prompts 26 | 27 | ```bash 28 | cargo +nightly run --release --bin author 29 | ``` 30 | 31 | When you run this command for the first time, it may take a minute or two to download and compile the dependencies. 32 | 33 | In the console, you should see something like the following: 34 | 35 | ```bash 36 | Creating a new channel 37 | Channel published 38 | 39 | Sending signed message 40 | Published signed message 41 | 42 | Now, in a new terminal window, use the subscriber to publish a `Subscribe` message on the channel 43 | 44 | cargo +nightly run --release --bin subscriber 276f7c4ecca06dda9f46480fae75364a0b8f995f9ffad7ab354c8fc806b4d7660000000000000000 bf48e8635ef335611e5db26e 6ae36d590eae46fe3b1fa219 45 | 46 | Enter the message identifier of the `Subscribe` message that was published by the subscriber: 47 | ``` 48 | 49 | 4. Open the `bin/subscriber.rs` file, and change the subscriber's secret to something secure 50 | 51 | ```rust 52 | // REPLACE THE SECRET WITH YOUR OWN 53 | let mut subscriber = Subscriber::new("MYSUBSCRIBERSECRET", ...); 54 | ``` 55 | 56 | 5. Copy the `cargo run` command and paste it into a new terminal window to start the subscriber 57 | 58 | ```bash 59 | cargo +nightly run --release --bin subscriber 276f7c4ecca06dda9f46480fae75364a0b8f995f9ffad7ab354c8fc806b4d7660000000000000000 bf48e8635ef335611e5db26e 6ae36d590eae46fe3b1fa219 60 | ``` 61 | 62 | The first argument is the channel address, the second argument is the `Announce` message identifier, and the third argument is the `SignedPacket` message identifier. 63 | 64 | The subscriber needs all this information to get the messages from the channel. 65 | 66 | 6. Follow the prompts 67 | 68 | In the console, you should see that the subscriber was able to subscribe to the channel and read the encrypted message. 69 | 70 | ## Supporting the project 71 | 72 | Channels is an alpha project that is being developed as a built-in protocol of the Streams framework. 73 | 74 | If you want to support the sample code in this repository, consider: 75 | 76 | - [Opening an issue](https://github.com/iotaledger/channels-examples/issues/new/choose) 77 | - [Submitting a pull request](https://github.com/iotaledger/channels-examples/compare) 78 | - [Improving the documentation](https://github.com/iotaledger/documentation/tree/develop/channels) 79 | 80 | If you want to support the Streams project, please head over to the GitHub repository and take a look at the [contribution guidelines](https://github.com/iotaledger/streams/blob/master/.github/CONTRIBUTING.md). 81 | 82 | ## Joining the discussion 83 | 84 | If you want to get involved in discussions about this technology, or you're looking for support, go to the #streams-discussion channel on [Discord](https://discord.iota.org/). 85 | -------------------------------------------------------------------------------- /src/api_author/announce.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | use anyhow::{Result}; 3 | use iota_streams::app_channels::api::tangle::{Author, Transport, Address}; 4 | 5 | pub fn start_a_new_channel(author: &mut Author) -> Result
{ 6 | // Create an `Announce` message to start the channel 7 | println!("Creating a new channel"); 8 | let announce_result = author.send_announce()?; 9 | println!("Channel published"); 10 | Ok(announce_result) 11 | } -------------------------------------------------------------------------------- /src/api_author/get_subscribers.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | 3 | use anyhow::{bail, Result}; 4 | use iota_streams::app_channels::api::tangle::{Address, Author, Transport}; 5 | 6 | pub fn get_subscriptions_and_share_keyload( 7 | author: &mut Author, 8 | channel_address: &String, 9 | subscribe_message_identifier: &String, 10 | ) -> Result
{ 11 | println!("Receiving Subscribe messages"); 12 | 13 | // Use the IOTA client to find transactions with the corresponding channel address and tag 14 | let subscription_link = match Address::from_str(&channel_address, &subscribe_message_identifier) 15 | { 16 | Ok(subscription_link) => subscription_link, 17 | Err(e) => bail!( 18 | "Failed to create Address from {}:{}. Reason: {}", 19 | &channel_address, 20 | &subscribe_message_identifier, 21 | e 22 | ), 23 | }; 24 | author.receive_subscribe(&subscription_link)?; 25 | 26 | println!("Sending keyload"); 27 | 28 | // Publish a Keyload message for all the subscribers whose `Subscribe` messages have been processed 29 | let (msg, seq) = author.send_keyload_for_everyone(&subscription_link)?; 30 | Ok(seq.unwrap_or(msg)) 31 | } 32 | -------------------------------------------------------------------------------- /src/api_author/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod announce; 2 | pub mod get_subscribers; 3 | pub mod send_message; 4 | pub mod send_masked_payload; -------------------------------------------------------------------------------- /src/api_author/send_masked_payload.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | use iota_streams::app_channels::api::tangle::{Address, Author, Transport}; 3 | use iota_streams::ddml::types::Bytes; 4 | 5 | use anyhow::{bail, Result}; 6 | 7 | pub fn send_masked_payload( 8 | author: &mut Author, 9 | channel_address: &String, 10 | keyload_message_identifier: &String, 11 | public_payload: &String, 12 | masked_payload: &String, 13 | ) -> Result
14 | where { 15 | // Convert the payloads to a Trytes type 16 | let public_payload = Bytes(public_payload.as_bytes().to_vec()); 17 | let masked_payload = Bytes(masked_payload.as_bytes().to_vec()); 18 | 19 | // Convert the channel address and message identifier to an Address link type 20 | let keyload_link = match Address::from_str(&channel_address, &keyload_message_identifier) { 21 | Ok(keyload_link) => keyload_link, 22 | Err(e) => bail!( 23 | "Failed to create Address from {}:{}. Reason: {}", 24 | &channel_address, 25 | &keyload_message_identifier, 26 | e 27 | ), 28 | }; 29 | 30 | // Create a `SignedPacket` message and link it to the message identifier of the `Keyload` message 31 | // whose session key is used to encrypt the masked payload 32 | let (msg, seq) = author.send_signed_packet(&keyload_link, &public_payload, &masked_payload)?; 33 | 34 | Ok(seq.unwrap_or(msg)) 35 | } 36 | -------------------------------------------------------------------------------- /src/api_author/send_message.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | 3 | use anyhow::{bail, Result}; 4 | use iota_streams::app_channels::api::tangle::{Address, Author, Transport}; 5 | use iota_streams::ddml::types::Bytes; 6 | 7 | pub fn send_signed_message( 8 | author: &mut Author, 9 | channel_address: &String, 10 | announce_message_identifier: &String, 11 | public_payload: &String, 12 | ) -> Result
{ 13 | // Convert the payloads to a Trytes type 14 | let public_payload = Bytes(public_payload.as_bytes().to_vec()); 15 | let empty_masked_payload = Bytes("".as_bytes().to_vec()); 16 | 17 | // Convert the channel address and message identifier to an Address link type 18 | let announcement_link = match Address::from_str(&channel_address, &announce_message_identifier) 19 | { 20 | Ok(announcement_link) => announcement_link, 21 | Err(e) => bail!( 22 | "Failed to create Address from {}:{}. Reason: {}", 23 | &channel_address, 24 | &announce_message_identifier, 25 | e 26 | ), 27 | }; 28 | 29 | // Create a `SignedPacket` message and link it to the message identifier of the `Announce` message 30 | let (msg, seq) = 31 | author.send_signed_packet(&announcement_link, &public_payload, &empty_masked_payload)?; 32 | 33 | Ok(seq.unwrap_or(msg)) 34 | } 35 | -------------------------------------------------------------------------------- /src/bin/subscriber.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | 3 | use anyhow::{bail, Result}; 4 | use iota_streams::app::transport::tangle::{ 5 | client::{iota_client, Client, SendOptions}, 6 | PAYLOAD_BYTES, 7 | }; 8 | use iota_streams::app_channels::api::tangle::{Address, Subscriber, Transport}; 9 | use std::env; 10 | 11 | fn get_signed_messages( 12 | subscriber: &mut Subscriber, 13 | channel_address: &String, 14 | signed_message_identifier: &String, 15 | ) -> Result<()> { 16 | // Convert the channel address and message identifier to a link 17 | let message_link = match create_message_link(&channel_address, &signed_message_identifier) { 18 | Ok(message_link) => message_link, 19 | Err(error) => bail!(error), 20 | }; 21 | 22 | // First returned value is the senders public key. We wont be using that in this tutorial 23 | let (_, public_payload, masked_payload) = subscriber.receive_signed_packet(&message_link)?; 24 | println!("Found and verified message"); 25 | println!( 26 | "Public message: {:?}, private message: {:?}", 27 | String::from_utf8(public_payload.0), 28 | String::from_utf8(masked_payload.0) 29 | ); 30 | Ok(()) 31 | } 32 | 33 | fn get_announcement( 34 | subscriber: &mut Subscriber, 35 | channel_address: &String, 36 | announce_message_identifier: &String, 37 | ) -> Result<()> { 38 | // Convert the channel address and message identifier to a link 39 | let announcement_link = 40 | match create_message_link(&channel_address, &announce_message_identifier) { 41 | Ok(announcement_link) => announcement_link, 42 | Err(error) => bail!(error), 43 | }; 44 | 45 | println!("Receiving announcement message"); 46 | subscriber.receive_announcement(&announcement_link)?; 47 | 48 | Ok(()) 49 | } 50 | 51 | fn get_keyload( 52 | subscriber: &mut Subscriber, 53 | channel_address: &String, 54 | keyload_message_identifier: &String, 55 | ) -> Result<()> { 56 | // Convert the channel address and message identifier to an Address link type 57 | let keyload_link = match create_message_link(&channel_address, &keyload_message_identifier) { 58 | Ok(keyload_link) => keyload_link, 59 | Err(error) => bail!(error), 60 | }; 61 | 62 | // Use the IOTA client to find transactions with the corresponding channel address and tag 63 | subscriber.receive_keyload(&keyload_link)?; 64 | Ok(()) 65 | } 66 | 67 | fn create_message_link(channel_address: &String, message_identifier: &String) -> Result
{ 68 | // Convert the channel address and message identifier to a link 69 | let message_link = match Address::from_str(&channel_address, &message_identifier) { 70 | Ok(message_link) => message_link, 71 | Err(e) => bail!( 72 | "Failed to create Address from {}:{}. Reason: {}", 73 | &channel_address, 74 | &message_identifier, 75 | e 76 | ), 77 | }; 78 | 79 | // Use the IOTA client to find transactions with the corresponding channel address and tag 80 | Ok(message_link) 81 | } 82 | 83 | fn subscribe( 84 | subscriber: &mut Subscriber, 85 | channel_address: &String, 86 | announce_message_identifier: &String, 87 | ) -> Result<()> { 88 | // Convert the channel address and message identifier to a link 89 | let announcement_link = create_message_link(&channel_address, &announce_message_identifier)?; 90 | 91 | println!("Subscribing to channel"); 92 | 93 | // Send a `Subscribe` message and link it to the message identifier 94 | //of the first valid `Announce` message that was found on the Tangle 95 | let subscription = subscriber.send_subscribe(&announcement_link)?; 96 | println!("Published `Subscribe` message"); 97 | println!( 98 | "Paste this `Subscribe` message identifier into your author's command prompt {}", 99 | subscription.msgid 100 | ); 101 | Ok(()) 102 | } 103 | 104 | #[tokio::main] 105 | async fn main() { 106 | let mut send_opt = SendOptions::default(); 107 | send_opt.local_pow = false; 108 | 109 | let url = "https://chrysalis-nodes.iota.org"; 110 | 111 | // Connect to an IOTA node 112 | let client: Client = Client::new( 113 | send_opt, 114 | iota_client::ClientBuilder::new() 115 | .with_node(url) 116 | .unwrap() 117 | .finish() 118 | .await 119 | .unwrap(), 120 | ); 121 | 122 | // Create a new subscriber 123 | // REPLACE THE SECRET WITH YOUR OWN 124 | let mut subscriber = 125 | Subscriber::new("MYSUBSCRIBERSECRETSTRING", 126 | client); 127 | 128 | let args: Vec = env::args().collect(); 129 | 130 | let channel_address = &args[1]; 131 | let announce_message_identifier = &args[2]; 132 | let signed_message_identifier = &args[3]; 133 | 134 | match get_announcement( 135 | &mut subscriber, 136 | &channel_address.to_string(), 137 | &announce_message_identifier.to_string(), 138 | ) { 139 | Ok(()) => (), 140 | Err(error) => println!("Failed with error {}", error), 141 | } 142 | 143 | match get_signed_messages( 144 | &mut subscriber, 145 | &channel_address.to_string(), 146 | &signed_message_identifier.to_string(), 147 | ) { 148 | Ok(()) => (), 149 | Err(error) => println!("Failed with error {}", error), 150 | } 151 | 152 | match subscribe( 153 | &mut subscriber, 154 | &channel_address.to_string(), 155 | &announce_message_identifier.to_string(), 156 | ) { 157 | Ok(()) => (), 158 | Err(error) => println!("Failed with error {}", error), 159 | } 160 | 161 | let mut keyload_message_identifier = String::new(); 162 | println!("Enter the Keyload message identifier that was published by the author:"); 163 | std::io::stdin() 164 | .read_line(&mut keyload_message_identifier) 165 | .unwrap(); 166 | 167 | if keyload_message_identifier.ends_with('\n') { 168 | keyload_message_identifier.pop(); 169 | } 170 | if keyload_message_identifier.ends_with('\r') { 171 | keyload_message_identifier.pop(); 172 | } 173 | 174 | match get_keyload( 175 | &mut subscriber, 176 | &channel_address.to_string(), 177 | &keyload_message_identifier.to_string(), 178 | ) { 179 | Ok(()) => (), 180 | Err(error) => println!("Failed with error {}", error), 181 | } 182 | 183 | let mut signed_private_message_identifier = String::new(); 184 | println!("Enter the SignedPacket message identifier that was published by the author:"); 185 | std::io::stdin() 186 | .read_line(&mut signed_private_message_identifier) 187 | .unwrap(); 188 | 189 | if signed_private_message_identifier.ends_with('\n') { 190 | signed_private_message_identifier.pop(); 191 | } 192 | if signed_private_message_identifier.ends_with('\r') { 193 | signed_private_message_identifier.pop(); 194 | } 195 | 196 | match get_signed_messages( 197 | &mut subscriber, 198 | &channel_address.to_string(), 199 | &signed_private_message_identifier.to_string(), 200 | ) { 201 | Ok(()) => (), 202 | Err(error) => println!("Failed with error {}", error), 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(debug_assertions, allow(dead_code, unused_imports))] 2 | 3 | use iota_streams::app_channels::api::tangle::{Author, ChannelType}; 4 | 5 | mod api_author; 6 | use crate::api_author::announce::start_a_new_channel; 7 | use crate::api_author::get_subscribers::get_subscriptions_and_share_keyload; 8 | use crate::api_author::send_masked_payload::send_masked_payload; 9 | use crate::api_author::send_message::send_signed_message; 10 | 11 | use iota_streams::app::transport::tangle::{ 12 | client::{iota_client, Client, SendOptions}, 13 | PAYLOAD_BYTES, 14 | }; 15 | 16 | #[tokio::main] 17 | async fn main() { 18 | // -------- IOTA network settings --------- 19 | // Change the default settings to use a lower minimum weight magnitude for the Devnet 20 | let mut send_opt = SendOptions::default(); 21 | send_opt.local_pow = false; 22 | 23 | let url = "https://chrysalis-nodes.iota.org"; 24 | 25 | // Connect to an IOTA node 26 | let client: Client = Client::new( 27 | send_opt, 28 | iota_client::ClientBuilder::new() 29 | .with_node(url) 30 | .unwrap() 31 | .finish() 32 | .await 33 | .unwrap(), 34 | ); 35 | 36 | // --------------- Author ------------------- 37 | 38 | // Create a new channel 39 | // REPLACE THE SECRET WITH YOUR OWN 40 | let mut author = Author::new( 41 | "MYAUTHORSEC9ETSTRING", 42 | ChannelType::SingleBranch, 43 | client, 44 | ); 45 | 46 | let channel_address = author.channel_address().unwrap().to_string(); 47 | // announce_message is a link, thus it contains the channel address (appinst) and message identifier (msgid) 48 | let announce_message = start_a_new_channel(&mut author).unwrap(); 49 | let announce_msgid = announce_message.msgid.to_string(); 50 | 51 | let public_payload = "BREAKINGCHANGES"; 52 | 53 | // signed_message is a link, thus it contains the channel address (appinst) and message identifier (msgid) 54 | let signed_message = send_signed_message( 55 | &mut author, 56 | &channel_address, 57 | &announce_msgid, 58 | &public_payload.to_string(), 59 | ) 60 | .unwrap(); 61 | println!(""); 62 | println!("Now, in a new terminal window, use the subscriber to publish a `Subscribe` message on the channel"); 63 | println!(""); 64 | println!( 65 | "cargo +nightly run --release --bin subscriber {} {} {}", 66 | channel_address, announce_msgid, signed_message.msgid 67 | ); 68 | 69 | let mut subscribe_message_identifier = String::new(); 70 | println!("Enter the message identifier of the `Subscribe` message that was published by the subscriber:"); 71 | std::io::stdin() 72 | .read_line(&mut subscribe_message_identifier) 73 | .unwrap(); 74 | 75 | if subscribe_message_identifier.ends_with('\n') { 76 | subscribe_message_identifier.pop(); 77 | } 78 | if subscribe_message_identifier.ends_with('\r') { 79 | subscribe_message_identifier.pop(); 80 | } 81 | 82 | let keyload_message = get_subscriptions_and_share_keyload( 83 | &mut author, 84 | &channel_address, 85 | &mut subscribe_message_identifier, 86 | ) 87 | .unwrap(); 88 | 89 | println!( 90 | "Paste this `Keyload` message identifier in the subscriber's command prompt: {}", 91 | keyload_message.msgid 92 | ); 93 | 94 | let masked_payload = "SUPERSECRETPAYLOAD"; 95 | 96 | let signed_private_message = send_masked_payload( 97 | &mut author, 98 | &channel_address, 99 | &keyload_message.msgid.to_string(), 100 | &public_payload.to_string(), 101 | &masked_payload.to_string(), 102 | ) 103 | .unwrap(); 104 | 105 | println!( 106 | "Paste this `SignedPacket` message identifier in the subscriber's command prompt: {}", 107 | signed_private_message.msgid 108 | ); 109 | } 110 | --------------------------------------------------------------------------------