diff --git a/Cargo.lock b/Cargo.lock index 92f53f307..fd861551c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3741 +1,3805 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "addr2line" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456d75cbb82da1ad150c8a9d97285ffcd21c9931dcb11e995903e7d75141b38b" +dependencies = [ + "gimli", +] + [[package]] name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aho-corasick" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "antidote" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" [[package]] name = "arc-swap" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" [[package]] name = "arc-swap" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" [[package]] name = "arrayref" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f" dependencies = [ - "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "odds 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop", + "odds", ] [[package]] name = "arrayvec" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" dependencies = [ - "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop", ] [[package]] name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" [[package]] name = "async-socks5" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "609de2890db64f56cfde4a45a4b946f4c037e3e39fc3f5a3f0989affb06e2f9d" dependencies = [ - "async-trait 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "async-trait", + "thiserror", + "tokio", ] [[package]] name = "async-trait" -version = "0.1.24" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26c4f3195085c36ea8d24d32b2f828d23296a9370a28aa39d111f6f16bef9f3b" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi 0.3.8", ] [[package]] name = "autocfg" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "backtrace" -version = "0.3.45" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df2f85c8a2abbe3b7d7e748052fdd9b76a0458fdeb16ad4223f5eca78c7c130" dependencies = [ - "backtrace-sys 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "addr2line", + "cfg-if", + "libc", + "object", + "rustc-demangle", ] [[package]] name = "base64" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "safemem", ] [[package]] name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", ] [[package]] name = "base64" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "bindgen" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1c85344eb535a31b62f0af37be84441ba9e7f0f4111eb0530f43d15e513fe57" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "which 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2 1.0.12", + "quote 1.0.5", + "regex", + "rustc-hash", + "shlex", + "which", ] [[package]] name = "bit-vec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" [[package]] name = "bitflags" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" [[package]] name = "bitflags" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "blake2-rfc" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" dependencies = [ - "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.12", + "constant_time_eq", ] [[package]] name = "blake2b_simd" version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", ] [[package]] name = "block-buffer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "byte-tools 0.2.0", ] [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding", + "byte-tools 0.3.1", + "byteorder", + "generic-array 0.12.3", ] [[package]] name = "block-padding" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1", ] [[package]] name = "built" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d2315cfb416f86e05360edc950b1d7d25ecfb00f7f8eba60dbd7882a0f2e944" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "git2 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "git2", + "semver 0.9.0", + "toml 0.5.6", ] [[package]] name = "bumpalo" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" [[package]] name = "byte-tools" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" [[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "iovec", ] [[package]] name = "bytes" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" [[package]] name = "cc" -version = "1.0.50" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d" dependencies = [ - "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver", ] [[package]] name = "cexpr" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "nom", ] [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" dependencies = [ - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer", + "num-traits 0.2.11", + "serde", + "time", ] [[package]] name = "clang-sys" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" dependencies = [ - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glob", + "libc", + "libloading", ] [[package]] name = "clap" -version = "2.33.0" +version = "2.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags 1.2.1", + "strsim", + "textwrap", + "unicode-width", + "vec_map", + "yaml-rust 0.3.5", ] [[package]] name = "clear_on_drop" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", ] [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "core-foundation" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2", + "libc", ] [[package]] name = "core-foundation" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0", + "libc", ] [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" [[package]] name = "core-foundation-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "croaring-mw" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcdee571ce4bf3e49c382de29c38bd33b9fa871e1358c7749b9dcc5dc2776221" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "croaring-sys-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "croaring-sys-mw", + "libc", ] [[package]] name = "croaring-sys-mw" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea52c177269fa54c526b054dac8e623721de18143ebfd2ea84ffc023d6c271ee" dependencies = [ - "bindgen 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen", + "cc", + "libc", ] [[package]] name = "crossbeam-deque" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ - "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", ] [[package]] name = "crossbeam-epoch" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "maybe-uninit", + "memoffset", + "scopeguard 1.1.0", ] [[package]] name = "crossbeam-queue" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "cfg-if", + "lazy_static", ] [[package]] name = "crypto-mac" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7afa06d05a046c7a47c3a849907ec303504608c927f4e85f7bfff22b7180d971" dependencies = [ - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq", + "generic-array 0.9.0", ] [[package]] name = "csv" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef22b37c7a51c564a365892c012dc0271221fdcc64c69b19ba4d6fa8bd96d9c" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "memchr 1.0.2", + "rustc-serialize", ] [[package]] name = "ct-logs" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" dependencies = [ - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sct", ] [[package]] name = "curve25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize 1.1.0", ] [[package]] name = "data-encoding" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" [[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "digest" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" dependencies = [ - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.9.0", ] [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3", ] [[package]] name = "dirs" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "redox_users", + "winapi 0.3.8", ] [[package]] name = "dirs" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "dirs-sys", ] [[package]] name = "dirs-sys" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_users", + "winapi 0.3.8", ] [[package]] name = "doc-comment" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dtoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" [[package]] name = "easy-jsonrpc" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e05c6cb07c5bb6fdedd8de84a96c9e0aafc5a9d4e725b735ca5eddb770ae33" dependencies = [ - "easy-jsonrpc-proc-macro 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "easy-jsonrpc-proc-macro", + "jsonrpc-core", + "rand 0.6.5", + "serde", + "serde_json", ] [[package]] name = "easy-jsonrpc-mw" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b1a91569d50e3bba3c9febb22ef54d78c6e8a8d8dd91ae859896c8ba05f4e3" dependencies = [ - "easy-jsonrpc-proc-macro-mw 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "easy-jsonrpc-proc-macro-mw", + "jsonrpc-core", + "rand 0.6.5", + "serde", + "serde_json", ] [[package]] name = "easy-jsonrpc-proc-macro" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9fb33793846951f339a70580375734416898ff8ddbb74401865031e25ba6751" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", ] [[package]] name = "easy-jsonrpc-proc-macro-mw" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6368dbd2c6685fb84fc6e6a4749917ddc98905793fd06341c7e11a2504f2724" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", ] [[package]] name = "ed25519-dalek" version = "1.0.0-pre.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" dependencies = [ - "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clear_on_drop", + "curve25519-dalek", + "rand 0.7.3", + "sha2 0.8.1", ] [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "encode_unicode" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "enum_primitive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" dependencies = [ - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43", ] [[package]] name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] name = "failure" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ - "backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "failure_derive", ] [[package]] name = "failure_derive" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", + "synstructure 0.12.3", ] [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "flate2" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "fuchsia-zircon-sys", ] [[package]] name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" [[package]] name = "futures" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] name = "futures-channel" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", ] [[package]] name = "futures-core" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" [[package]] name = "futures-executor" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-task", + "futures-util", ] [[package]] name = "futures-io" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" [[package]] name = "futures-macro" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" dependencies = [ - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "futures-sink" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" [[package]] name = "futures-task" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" +dependencies = [ + "once_cell", +] [[package]] name = "futures-util" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr 2.3.3", + "pin-project", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", ] [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generic-array" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" dependencies = [ - "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] name = "generic-array" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "wasi", ] +[[package]] +name = "gimli" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" + [[package]] name = "git2" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c1af51ea8a906616af45a4ce78eacf25860f7a13ae7bf8a814693f0f4037a26" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "libgit2-sys 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "libc", + "libgit2-sys", + "log", + "url 2.1.1", ] [[package]] name = "glob" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "grin_api" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" -dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "easy-jsonrpc-mw 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_chain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_p2p 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_pool 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_store 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-timeout 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" +dependencies = [ + "bytes 0.5.4", + "easy-jsonrpc-mw", + "failure", + "failure_derive", + "futures 0.3.5", + "grin_chain", + "grin_core", + "grin_p2p", + "grin_pool", + "grin_store", + "grin_util", + "http 0.1.21", + "hyper", + "hyper-rustls 0.20.0", + "hyper-timeout", + "lazy_static", + "log", + "regex", + "ring", + "rustls 0.17.0", + "serde", + "serde_derive", + "serde_json", + "tokio", + "tokio-rustls 0.13.0", + "url 1.7.2", ] [[package]] name = "grin_chain" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" -dependencies = [ - "bit-vec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "croaring-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_keychain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_store 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" +dependencies = [ + "bit-vec", + "bitflags 1.2.1", + "byteorder", + "chrono", + "croaring-mw", + "failure", + "failure_derive", + "grin_core", + "grin_keychain", + "grin_store", + "grin_util", + "lazy_static", + "log", + "lru-cache", + "serde", + "serde_derive", ] [[package]] name = "grin_core" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" -dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "croaring-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_keychain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" +dependencies = [ + "blake2-rfc", + "byteorder", + "chrono", + "croaring-mw", + "enum_primitive", + "failure", + "failure_derive", + "grin_keychain", + "grin_util", + "lazy_static", + "log", + "lru-cache", + "num 0.2.1", + "num-bigint 0.2.6", + "rand 0.6.5", + "serde", + "serde_derive", + "siphasher", + "zeroize 0.9.3", ] [[package]] name = "grin_keychain" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" -dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ripemd160 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" +dependencies = [ + "blake2-rfc", + "byteorder", + "digest 0.7.6", + "grin_util", + "hmac", + "lazy_static", + "log", + "pbkdf2", + "rand 0.6.5", + "ripemd160", + "serde", + "serde_derive", + "serde_json", + "sha2 0.7.1", + "zeroize 0.9.3", ] [[package]] name = "grin_p2p" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_chain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_store 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "chrono", + "enum_primitive", + "grin_chain", + "grin_core", + "grin_store", + "grin_util", + "log", + "lru-cache", + "num 0.1.42", + "rand 0.6.5", + "serde", + "serde_derive", + "tempfile", ] [[package]] name = "grin_pool" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_keychain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc", + "chrono", + "failure", + "failure_derive", + "grin_core", + "grin_keychain", + "grin_util", + "log", + "rand 0.6.5", + "serde", + "serde_derive", ] [[package]] name = "grin_secp256k1zkp" version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c2e7431d1999f02112c2383c9d33e7a6212947abfba92c87ab7283ba667a8b" dependencies = [ - "arrayvec 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.3.25", + "cc", + "libc", + "rand 0.5.6", + "rustc-serialize", + "serde", + "serde_json", + "zeroize 0.9.3", ] [[package]] name = "grin_store" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "croaring-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "croaring-mw", + "failure", + "failure_derive", + "grin_core", + "grin_util", + "libc", + "lmdb-zero", + "log", + "memmap", + "serde", + "serde_derive", + "tempfile", ] [[package]] name = "grin_util" version = "4.0.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#2397407dc4d7e196c6edc6436e9545149ccb1a21" +source = "git+https://github.com/mimblewimble/grin#2c621115612013a68de7bd973a42ec88ae5f44fc" dependencies = [ - "backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_secp256k1zkp 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "base64 0.9.3", + "byteorder", + "grin_secp256k1zkp", + "lazy_static", + "log", + "log4rs", + "parking_lot", + "rand 0.6.5", + "serde", + "serde_derive", + "walkdir", + "zeroize 0.9.3", + "zip", ] [[package]] name = "grin_wallet" version = "4.0.0-alpha.1" dependencies = [ - "built 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "easy-jsonrpc 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_api 4.0.0-alpha.1", - "grin_wallet_config 4.0.0-alpha.1", - "grin_wallet_controller 4.0.0-alpha.1", - "grin_wallet_impls 4.0.0-alpha.1", - "grin_wallet_libwallet 4.0.0-alpha.1", - "grin_wallet_util 4.0.0-alpha.1", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "linefeed 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustyline 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "built", + "clap", + "easy-jsonrpc", + "failure", + "failure_derive", + "grin_wallet_api", + "grin_wallet_config", + "grin_wallet_controller", + "grin_wallet_impls", + "grin_wallet_libwallet", + "grin_wallet_util", + "lazy_static", + "linefeed", + "log", + "prettytable-rs", + "rpassword", + "rustyline", + "semver 0.9.0", + "serde", + "serde_derive", + "serde_json", + "url 1.7.2", ] [[package]] name = "grin_wallet_api" version = "4.0.0-alpha.1" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "easy-jsonrpc-mw 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 4.0.0-alpha.1", - "grin_wallet_impls 4.0.0-alpha.1", - "grin_wallet_libwallet 4.0.0-alpha.1", - "grin_wallet_util 4.0.0-alpha.1", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3", + "chrono", + "easy-jsonrpc-mw", + "ed25519-dalek", + "failure", + "failure_derive", + "grin_wallet_config", + "grin_wallet_impls", + "grin_wallet_libwallet", + "grin_wallet_util", + "log", + "rand 0.5.6", + "ring", + "serde", + "serde_derive", + "serde_json", + "tempfile", + "uuid", ] [[package]] name = "grin_wallet_config" version = "4.0.0-alpha.1" dependencies = [ - "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_util 4.0.0-alpha.1", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs 1.0.5", + "grin_wallet_util", + "pretty_assertions", + "rand 0.5.6", + "serde", + "serde_derive", + "toml 0.4.10", ] [[package]] name = "grin_wallet_controller" version = "4.0.0-alpha.1" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "easy-jsonrpc-mw 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_api 4.0.0-alpha.1", - "grin_wallet_config 4.0.0-alpha.1", - "grin_wallet_impls 4.0.0-alpha.1", - "grin_wallet_libwallet 4.0.0-alpha.1", - "grin_wallet_util 4.0.0-alpha.1", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "easy-jsonrpc-mw", + "failure", + "failure_derive", + "futures 0.3.5", + "grin_wallet_api", + "grin_wallet_config", + "grin_wallet_impls", + "grin_wallet_libwallet", + "grin_wallet_util", + "hyper", + "lazy_static", + "log", + "prettytable-rs", + "rand 0.5.6", + "ring", + "serde", + "serde_derive", + "serde_json", + "term", + "tokio", + "url 1.7.2", + "uuid", ] [[package]] name = "grin_wallet_impls" version = "4.0.0-alpha.1" dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "data-encoding 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 4.0.0-alpha.1", - "grin_wallet_libwallet 4.0.0-alpha.1", - "grin_wallet_util 4.0.0-alpha.1", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-socks2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-timeout 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", - "timer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc", + "byteorder", + "chrono", + "crossbeam-utils", + "data-encoding", + "ed25519-dalek", + "failure", + "failure_derive", + "futures 0.3.5", + "grin_wallet_config", + "grin_wallet_libwallet", + "grin_wallet_util", + "http 0.1.21", + "hyper", + "hyper-rustls 0.19.1", + "hyper-socks2", + "hyper-timeout", + "log", + "rand 0.5.6", + "regex", + "ring", + "serde", + "serde_derive", + "serde_json", + "sysinfo", + "timer", + "tokio", + "uuid", ] [[package]] name = "grin_wallet_libwallet" version = "4.0.0-alpha.1" dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_wallet_config 4.0.0-alpha.1", - "grin_wallet_util 4.0.0-alpha.1", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "strum 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "strum_macros 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3", + "blake2-rfc", + "byteorder", + "chrono", + "ed25519-dalek", + "failure", + "failure_derive", + "grin_wallet_config", + "grin_wallet_util", + "lazy_static", + "log", + "rand 0.5.6", + "serde", + "serde_derive", + "serde_json", + "strum", + "strum_macros", + "uuid", ] [[package]] name = "grin_wallet_util" version = "4.0.0-alpha.1" dependencies = [ - "data-encoding 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", - "grin_api 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_chain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_keychain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_store 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)", - "pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "data-encoding", + "ed25519-dalek", + "grin_api", + "grin_chain", + "grin_core", + "grin_keychain", + "grin_store", + "grin_util", + "pretty_assertions", + "rand 0.5.6", + "serde", + "serde_derive", + "sha3", ] [[package]] name = "h2" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.1", + "indexmap", + "log", + "slab", + "tokio", + "tokio-util", ] [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.8" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "hmac" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" dependencies = [ - "crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac", + "digest 0.7.6", ] [[package]] name = "http" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "fnv", + "itoa", ] [[package]] name = "http" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "itoa", ] [[package]] name = "http-body" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "http 0.2.1", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error", ] [[package]] name = "hyper" -version = "0.13.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.1", + "http-body", + "httparse", + "itoa", + "log", + "net2", + "pin-project", + "time", + "tokio", + "tower-service", + "want", ] [[package]] name = "hyper-rustls" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" +dependencies = [ + "bytes 0.5.4", + "ct-logs", + "futures-util", + "hyper", + "rustls 0.16.0", + "rustls-native-certs 0.1.0", + "tokio", + "tokio-rustls 0.12.2", + "webpki", +] + +[[package]] +name = "hyper-rustls" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls 0.17.0", + "rustls-native-certs 0.3.0", + "tokio", + "tokio-rustls 0.13.0", + "webpki", ] [[package]] name = "hyper-socks2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b04745c5e7e8f4f93209f411644659055ce99f1973bd615015e3a7321ec2771" dependencies = [ - "async-socks5 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "async-socks5", + "futures 0.3.5", + "http 0.2.1", + "hyper", + "hyper-tls", + "thiserror", + "tokio", ] [[package]] name = "hyper-timeout" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d1f9b0b8258e3ef8f45928021d3ef14096c2b93b99e4b8cfcabf1f58ec84b0a" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io-timeout 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "hyper", + "tokio", + "tokio-io-timeout", ] [[package]] name = "hyper-tls" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "hyper", + "native-tls", + "tokio", + "tokio-tls", ] [[package]] name = "idna" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "idna" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", ] [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "itoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" [[package]] name = "jobserver" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "js-sys" -version = "0.3.36" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7" dependencies = [ - "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "jsonrpc-core" version = "10.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "log", + "serde", + "serde_derive", + "serde_json", ] [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lazycell" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" [[package]] name = "libc" -version = "0.2.67" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" [[package]] name = "libgit2-sys" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4870c781f6063efb83150cd22c1ddf6ecf58531419e7570cdcced46970f64a16" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "libz-sys", + "pkg-config", ] [[package]] name = "liblmdb-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49" dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", + "libc", ] [[package]] name = "libloading" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "winapi 0.3.8", ] [[package]] name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "linefeed" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2abb5810ef55bb5f5f33b010cc280b3ab877764c902681efc7c8c95628004c" dependencies = [ - "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mortal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "dirs 1.0.5", + "mortal", + "winapi 0.3.8", ] [[package]] name = "linked-hash-map" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "lmdb-zero" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13416eee745b087c22934f35f1f24da22da41ba2a5ce197143d168ce055cc58d" dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "liblmdb-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "supercow 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1", + "libc", + "liblmdb-sys", + "supercow", ] [[package]] name = "lock_api" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" dependencies = [ - "owning_ref 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref", + "scopeguard 0.3.3", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "serde", ] [[package]] name = "log-mdc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" [[package]] name = "log4rs" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "100052474df98158c0738a7d3f4249c99978490178b5f9f68cd835ac57adbd1b" dependencies = [ - "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", - "thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "antidote", + "arc-swap 0.3.11", + "chrono", + "flate2", + "fnv", + "humantime", + "libc", + "log", + "log-mdc", + "serde", + "serde-value", + "serde_derive", + "serde_json", + "serde_yaml", + "thread-id", + "typemap", + "winapi 0.3.8", ] [[package]] name = "lru-cache" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "maybe-uninit" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.8", ] [[package]] name = "memoffset" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", ] [[package]] name = "miniz_oxide" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" dependencies = [ - "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32", ] [[package]] name = "mio" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow 0.2.1", + "net2", + "slab", + "winapi 0.2.8", ] [[package]] name = "mio-named-pipes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "mio", + "miow 0.3.3", + "winapi 0.3.8", ] [[package]] name = "mio-uds" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec", + "libc", + "mio", ] [[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "miow" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" dependencies = [ - "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2", + "winapi 0.3.8", ] [[package]] name = "mortal" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26153280e6a955881f761354b130aa7838f9983836f3de438ac0a8f22cfab1ff" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallstr 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "terminfo 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "libc", + "nix 0.7.0", + "smallstr", + "terminfo", + "unicode-normalization", + "unicode-width", + "winapi 0.3.8", ] [[package]] name = "native-tls" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework 0.4.4", + "security-framework-sys 0.4.3", + "tempfile", ] [[package]] name = "net2" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "winapi 0.3.8", ] [[package]] name = "nix" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b" dependencies = [ - "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.4.0", + "cfg-if", + "libc", + "rustc_version 0.1.7", + "semver 0.1.20", + "void", ] [[package]] name = "nix" -version = "0.14.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "cc", + "cfg-if", + "libc", + "void", ] [[package]] name = "nodrop" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3", + "version_check", ] [[package]] name = "num" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.44", + "num-complex 0.1.43", + "num-integer", + "num-iter", + "num-rational 0.1.42", + "num-traits 0.2.11", ] [[package]] name = "num" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" dependencies = [ - "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6", + "num-complex 0.2.4", + "num-integer", + "num-iter", + "num-rational 0.2.4", + "num-traits 0.2.11", ] [[package]] name = "num-bigint" version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" dependencies = [ - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer", + "num-traits 0.2.11", + "rand 0.4.6", + "rustc-serialize", ] [[package]] name = "num-bigint" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-integer", + "num-traits 0.2.11", ] [[package]] name = "num-complex" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11", + "rustc-serialize", ] [[package]] name = "num-complex" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-traits 0.2.11", ] [[package]] name = "num-integer" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-traits 0.2.11", ] [[package]] name = "num-iter" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-integer", + "num-traits 0.2.11", ] [[package]] name = "num-rational" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.44", + "num-integer", + "num-traits 0.2.11", + "rustc-serialize", ] [[package]] name = "num-rational" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "num-bigint 0.2.6", + "num-integer", + "num-traits 0.2.11", ] [[package]] name = "num-traits" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11", ] [[package]] name = "num-traits" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", ] [[package]] name = "num_cpus" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] +[[package]] +name = "object" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" + [[package]] name = "odds" version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eae0151b9dacf24fcc170d9995e511669a082856a91f958a2fe380bfab3fb22" + +[[package]] +name = "once_cell" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" [[package]] name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "openssl" -version = "0.10.28" +version = "0.10.29" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.54" +version = "0.9.56" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02309a7f127000ed50594f0b50ecc69e7c654e16d41b4e8156d1b3df8e0b52e" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "ordered-float" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11", ] [[package]] name = "owning_ref" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait", ] [[package]] name = "parking_lot" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand 0.5.6", + "rustc_version 0.2.3", + "smallvec 0.6.13", + "winapi 0.3.8", ] [[package]] name = "pbkdf2" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c09cddfbfc98de7f76931acf44460972edb4023eb14d0c6d4018800e552d8e0" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.9.3", + "byteorder", + "constant_time_eq", + "crypto-mac", + "generic-array 0.9.0", + "hmac", + "rand 0.5.6", + "sha2 0.7.1", ] [[package]] name = "peeking_take_while" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "phf" version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared", ] [[package]] name = "phf_codegen" version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" dependencies = [ - "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_generator", + "phf_shared", ] [[package]] name = "phf_generator" version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared", + "rand 0.6.5", ] [[package]] name = "phf_shared" version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" dependencies = [ - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "siphasher", ] [[package]] name = "pin-project" -version = "0.4.8" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d480cb4e89522ccda96d0eed9af94180b7a5f93fb28f66e1fd7d68431663d1" dependencies = [ - "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.8" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a82996f11efccb19b685b14b5df818de31c1edcee3daa256ab5775dd98e72feb" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "pin-project-lite" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" [[package]] name = "pin-utils" -version = "0.1.0-alpha.4" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "podio" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "pretty_assertions" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "difference", ] [[package]] name = "prettytable-rs" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5511ca4c805aa35f0abff6be7923231d664408b60c09f44ef715f2bce106cd9e" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "csv", + "encode_unicode", + "lazy_static", + "term", + "unicode-width", ] [[package]] name = "proc-macro-hack" -version = "0.5.11" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" [[package]] name = "proc-macro-nested" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", ] [[package]] name = "proc-macro2" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0", ] [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] name = "quote" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42934bc9c8ab0d3b273a16d8551c8f0fcff46be73276ca083ec2414c15c4ba5e" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", ] [[package]] name = "rand" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" dependencies = [ - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi 0.3.8", ] [[package]] name = "rand" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "winapi 0.3.8", ] [[package]] name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi 0.3.8", ] [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", ] [[package]] name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "rand_core 0.3.1", ] [[package]] name = "rand_chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2", ] [[package]] name = "rand_core" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1", ] [[package]] name = "rand_isaac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand_core 0.4.2", + "winapi 0.3.8", ] [[package]] name = "rand_os" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.8", ] [[package]] name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7", + "rand_core 0.4.2", ] [[package]] name = "rand_xorshift" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rayon" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" dependencies = [ - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] name = "rayon-core" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" dependencies = [ - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "lazy_static", + "num_cpus", ] [[package]] name = "rdrand" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "redox_users" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "redox_syscall", + "rust-argon2", ] [[package]] name = "regex" -version = "1.3.4" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" dependencies = [ - "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr 2.3.3", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.16" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "ring" -version = "0.16.11" +version = "0.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703516ae74571f24b465b4a1431e81e2ad51336cb0ded733a55a1aa3eccac196" dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.8", ] [[package]] name = "ripemd160" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "482aa56cc68aaeccdaaff1cc5a72c247da8bbad3beb174ca5741f274c22883fb" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.3.3", + "byte-tools 0.2.0", + "digest 0.7.6", ] [[package]] name = "rpassword" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "libc", + "winapi 0.2.8", ] [[package]] name = "rust-argon2" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", ] [[package]] name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" [[package]] name = "rustc_version" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.1.20", ] [[package]] name = "rustc_version" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0", ] [[package]] name = "rustls" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" +dependencies = [ + "base64 0.10.1", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "log", + "ring", + "sct", + "webpki", ] [[package]] name = "rustls-native-certs" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" +dependencies = [ + "openssl-probe", + "rustls 0.16.0", + "schannel", + "security-framework 0.3.4", +] + +[[package]] +name = "rustls-native-certs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" dependencies = [ - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe", + "rustls 0.17.0", + "schannel", + "security-framework 0.4.4", ] [[package]] name = "rustyline" -version = "6.0.0" +version = "6.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd20b28d972040c627e209eb29f19c24a71a19d661cc5a220089176e20ee202" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "dirs 2.0.2", + "libc", + "log", + "memchr 2.3.3", + "nix 0.17.0", + "scopeguard 1.1.0", + "unicode-segmentation", + "unicode-width", + "utf8parse", + "winapi 0.3.8", ] [[package]] name = "ryu" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" [[package]] name = "safemem" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "schannel" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "winapi 0.3.8", ] [[package]] name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "security-framework" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" dependencies = [ - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.4", + "core-foundation-sys 0.6.2", + "libc", + "security-framework-sys 0.3.3", ] [[package]] name = "security-framework" -version = "0.4.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1", + "core-foundation 0.7.0", + "core-foundation-sys 0.7.0", + "libc", + "security-framework-sys 0.4.3", ] [[package]] name = "security-framework-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2", ] [[package]] name = "security-framework-sys" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0", + "libc", ] [[package]] name = "semver" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.104" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" dependencies = [ - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde-value" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" dependencies = [ - "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "ordered-float", + "serde", ] [[package]] name = "serde_derive" -version = "1.0.104" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "serde_json" -version = "1.0.48" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" dependencies = [ - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] [[package]] name = "serde_yaml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16c7a592a1ec97c9c1c68d75b6e537dcbf60c7618e038e7841e00af1d9ccf0c4" dependencies = [ - "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "linked-hash-map", + "serde", + "yaml-rust 0.4.3", ] [[package]] name = "sha2" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.3.3", + "byte-tools 0.2.0", + "digest 0.7.6", + "fake-simd", ] [[package]] name = "sha2" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug", ] [[package]] name = "sha3" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3", + "byte-tools 0.3.1", + "digest 0.8.1", + "keccak", + "opaque-debug", ] [[package]] name = "shlex" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "signal-hook-registry" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" dependencies = [ - "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap 0.4.6", + "libc", ] [[package]] name = "siphasher" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallstr" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aa65bb4d5b2bbc90d36af64e29802f788aa614783fa1d0df011800ddcec6e8e" dependencies = [ - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13", ] [[package]] name = "smallvec" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit", ] [[package]] name = "smallvec" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" [[package]] name = "socket2" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.8", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "stable_deref_trait" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strum" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1c33039533f051704951680f1adfd468fd37ac46816ded0d9ee068e60f05f" [[package]] name = "strum_macros" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47cd23f5c7dee395a00fa20135e2ec0fffcdfa151c56182966d7a3261343432e" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "heck", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", ] [[package]] name = "subtle" version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] name = "supercow" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63" [[package]] name = "syn" version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", ] [[package]] name = "syn" -version = "1.0.16" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4696caa4048ac7ce2bcd2e484b3cef88c1004e41b8e945a277e2c25dc0b72060" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "unicode-xid 0.2.0", ] [[package]] name = "synstructure" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", + "unicode-xid 0.1.0", ] [[package]] name = "synstructure" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", + "unicode-xid 0.2.0", ] [[package]] name = "sysinfo" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "doc-comment 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "doc-comment", + "libc", + "rayon", + "winapi 0.3.8", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "rand 0.7.3", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.8", ] [[package]] name = "term" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "dirs 1.0.5", + "winapi 0.3.8", ] [[package]] name = "termcolor" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" dependencies = [ - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "terminfo" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e51065bafd2abe106b6036483b69d1741f4a1ec56ce8a2378de341637de689e" dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv", + "nom", + "phf", + "phf_codegen", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thiserror" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467e5ff447618a916519a4e0d62772ab14f434897f3d63f05d8700ef1e9b22c1" dependencies = [ - "thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63c1091225b9834089b429bc4a2e01223470e3183e891582909e9d1c4cb55d9" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "thread-id" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "redox_syscall", + "winapi 0.3.8", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "time" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.8", ] [[package]] name = "timer" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31d42176308937165701f50638db1c31586f183f1aab416268216577aec7306b" dependencies = [ - "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", ] [[package]] name = "tokio" -version = "0.2.13" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "libc", + "memchr 2.3.3", + "mio", + "mio-named-pipes", + "mio-uds", + "num_cpus", + "pin-project-lite", + "signal-hook-registry", + "slab", + "tokio-macros", + "winapi 0.3.8", ] [[package]] name = "tokio-io-timeout" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9390a43272c8a6ac912ed1d1e2b6abeafd5047e05530a2fa304deee041a06215" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "tokio", ] [[package]] name = "tokio-macros" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", ] [[package]] name = "tokio-rustls" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" +dependencies = [ + "futures-core", + "rustls 0.16.0", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "rustls 0.17.0", + "tokio", + "webpki", ] [[package]] name = "tokio-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ - "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls", + "tokio", ] [[package]] name = "tokio-util" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", ] [[package]] name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "tower-service" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "traitobject" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "typemap" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" dependencies = [ - "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unsafe-any", ] [[package]] name = "typenum" -version = "1.11.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" dependencies = [ - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.4.0", ] [[package]] name = "unicode-segmentation" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" [[package]] name = "unicode-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "unsafe-any" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" dependencies = [ - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "traitobject", ] [[package]] name = "untrusted" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", ] [[package]] name = "url" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" dependencies = [ - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0", + "matches", + "percent-encoding 2.1.0", ] [[package]] name = "utf8parse" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" [[package]] name = "uuid" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5", + "serde", ] [[package]] name = "vcpkg" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" [[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi 0.3.8", + "winapi-util", ] [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "try-lock", ] [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasm-bindgen" -version = "0.2.59" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.59" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94" dependencies = [ - "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.59" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776" dependencies = [ - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.5", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.59" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.12", + "quote 1.0.5", + "syn 1.0.21", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.59" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" [[package]] name = "web-sys" -version = "0.3.36" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642" dependencies = [ - "js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" dependencies = [ - "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "which" version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "ws2_32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "yaml-rust" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" [[package]] name = "yaml-rust" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map", ] [[package]] name = "zeroize" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" dependencies = [ - "zeroize_derive 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize_derive", ] [[package]] name = "zeroize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" [[package]] name = "zeroize_derive" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080616bd0e31f36095288bb0acdf1f78ef02c2fa15527d7e993f2a6c7591643e" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", + "synstructure 0.10.2", ] [[package]] name = "zip" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6df134e83b8f0f8153a094c7b0fd79dfebe437f1d76e7715afa18ed95ebe2fd7" dependencies = [ - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" -"checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" -"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -"checksum arrayvec 0.3.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f" -"checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -"checksum async-socks5 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57ef0ef2aa333e2544c528e34d355430f20cdbfedd4ba68ebe942815f9f022ea" -"checksum async-trait 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "750b1c38a1dfadd108da0f01c08f4cdc7ff1bb39b325f9c82cc972361780a6e1" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8" -"checksum backtrace-sys 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "e17b52e737c40a7d75abca20b29a19a0eb7ba9fc72c5a72dd282a0a3c2c0dc35" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bindgen 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f1c85344eb535a31b62f0af37be84441ba9e7f0f4111eb0530f43d15e513fe57" -"checksum bit-vec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a4523a10839ffae575fb08aa3423026c8cb4687eef43952afb956229d4f246f7" -"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" -"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum built 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2315cfb416f86e05360edc950b1d7d25ecfb00f7f8eba60dbd7882a0f2e944" -"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" -"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" -"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" -"checksum cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" -"checksum clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum croaring-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bcdee571ce4bf3e49c382de29c38bd33b9fa871e1358c7749b9dcc5dc2776221" -"checksum croaring-sys-mw 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea52c177269fa54c526b054dac8e623721de18143ebfd2ea84ffc023d6c271ee" -"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -"checksum crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7afa06d05a046c7a47c3a849907ec303504608c927f4e85f7bfff22b7180d971" -"checksum csv 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7ef22b37c7a51c564a365892c012dc0271221fdcc64c69b19ba4d6fa8bd96d9c" -"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" -"checksum curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" -"checksum data-encoding 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" -"checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" -"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" -"checksum doc-comment 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "807e5847c39ad6a11eac66de492ed1406f76a260eb8656e8740cad9eabc69c27" -"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" -"checksum easy-jsonrpc 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07e05c6cb07c5bb6fdedd8de84a96c9e0aafc5a9d4e725b735ca5eddb770ae33" -"checksum easy-jsonrpc-mw 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b1a91569d50e3bba3c9febb22ef54d78c6e8a8d8dd91ae859896c8ba05f4e3" -"checksum easy-jsonrpc-proc-macro 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9fb33793846951f339a70580375734416898ff8ddbb74401865031e25ba6751" -"checksum easy-jsonrpc-proc-macro-mw 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a6368dbd2c6685fb84fc6e6a4749917ddc98905793fd06341c7e11a2504f2724" -"checksum ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)" = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" -"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" -"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -"checksum failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" -"checksum failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" -"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" -"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" -"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" -"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" -"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" -"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" -"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" -"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" -"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum git2 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c1af51ea8a906616af45a4ce78eacf25860f7a13ae7bf8a814693f0f4037a26" -"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum grin_api 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_chain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_core 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_keychain 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_p2p 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_pool 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_secp256k1zkp 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c2e7431d1999f02112c2383c9d33e7a6212947abfba92c87ab7283ba667a8b" -"checksum grin_store 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum grin_util 4.0.0-alpha.1 (git+https://github.com/mimblewimble/grin)" = "" -"checksum h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9d5c295d1c0c68e4e42003d75f908f5e16a1edd1cbe0b0d02e4dc2006a384f47" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" -"checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" -"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" -"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b15203263d1faa615f9337d79c1d37959439dc46c2b4faab33286fadc2a1c5" -"checksum hyper-rustls 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf" -"checksum hyper-socks2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b950dc6d3ea74cbb1f4c4ad217c20ca3e846b3f39468baef13d222c80a386bd6" -"checksum hyper-timeout 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d1f9b0b8258e3ef8f45928021d3ef14096c2b93b99e4b8cfcabf1f58ec84b0a" -"checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" -"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" -"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -"checksum js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1cb931d43e71f560c81badb0191596562bafad2be06a3f9025b845c847c60df5" -"checksum jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc15eef5f8b6bef5ac5f7440a957ff95d036e2f98706947741bfc93d1976db4c" -"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" -"checksum libgit2-sys 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4870c781f6063efb83150cd22c1ddf6ecf58531419e7570cdcced46970f64a16" -"checksum liblmdb-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49" -"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" -"checksum linefeed 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2abb5810ef55bb5f5f33b010cc280b3ab877764c902681efc7c8c95628004c" -"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "13416eee745b087c22934f35f1f24da22da41ba2a5ce197143d168ce055cc58d" -"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum log-mdc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" -"checksum log4rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "100052474df98158c0738a7d3f4249c99978490178b5f9f68cd835ac57adbd1b" -"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" -"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" -"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" -"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" -"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" -"checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" -"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" -"checksum mortal 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26153280e6a955881f761354b130aa7838f9983836f3de438ac0a8f22cfab1ff" -"checksum native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" -"checksum nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b" -"checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" -"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -"checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" -"checksum num-complex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" -"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -"checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" -"checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" -"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" -"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" -"checksum odds 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "4eae0151b9dacf24fcc170d9995e511669a082856a91f958a2fe380bfab3fb22" -"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" -"checksum ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "18869315e81473c951eb56ad5558bbc56978562d3ecfb87abb7a1e944cea4518" -"checksum owning_ref 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" -"checksum pbkdf2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0c09cddfbfc98de7f76931acf44460972edb4023eb14d0c6d4018800e552d8e0" -"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" -"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" -"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" -"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" -"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6" -"checksum prettytable-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5511ca4c805aa35f0abff6be7923231d664408b60c09f44ef715f2bce106cd9e" -"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" -"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" -"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" -"checksum regex-syntax 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "1132f845907680735a84409c3bebc64d1364a5683ffbce899550cd09d5eaefc1" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" -"checksum ripemd160 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "482aa56cc68aaeccdaaff1cc5a72c247da8bbad3beb174ca5741f274c22883fb" -"checksum rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec" -"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -"checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" -"checksum rustyline 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de64be8eecbe428b6924f1d8430369a01719fbb182c26fa431ddbb0a95f5315d" -"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" -"checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" -"checksum security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0" -"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" -"checksum security-framework-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "06fd2f23e31ef68dd2328cc383bd493142e46107a3a0e24f7d734e3f3b80fe4c" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" -"checksum serde-value 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7a663f873dedc4eac1a559d4c6bc0d0b2c34dc5ac4702e105014b8281489e44f" -"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" -"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" -"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" -"checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" -"checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" -"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" -"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallstr 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa65bb4d5b2bbc90d36af64e29802f788aa614783fa1d0df011800ddcec6e8e" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" -"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" -"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum strum 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1c33039533f051704951680f1adfd468fd37ac46816ded0d9ee068e60f05f" -"checksum strum_macros 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47cd23f5c7dee395a00fa20135e2ec0fffcdfa151c56182966d7a3261343432e" -"checksum subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" -"checksum supercow 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" -"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" -"checksum sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" -"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -"checksum terminfo 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e51065bafd2abe106b6036483b69d1741f4a1ec56ce8a2378de341637de689e" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db" -"checksum thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4" -"checksum thread-id 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum timer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31d42176308937165701f50638db1c31586f183f1aab416268216577aec7306b" -"checksum tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616" -"checksum tokio-io-timeout 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9390a43272c8a6ac912ed1d1e2b6abeafd5047e05530a2fa304deee041a06215" -"checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -"checksum tokio-rustls 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc" -"checksum tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" -"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" -"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" -"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "3557c397ab5a8e347d434782bcd31fc1483d927a6826804cec05cc792ee2519d" -"checksum wasm-bindgen-backend 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "e0da9c9a19850d3af6df1cb9574970b566d617ecfaf36eb0b706b6f3ef9bd2f8" -"checksum wasm-bindgen-macro 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "0f6fde1d36e75a714b5fe0cffbb78978f222ea6baebb726af13c78869fdb4205" -"checksum wasm-bindgen-macro-support 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "25bda4168030a6412ea8a047e27238cadf56f0e53516e1e83fec0a8b7c786f6d" -"checksum wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "fc9f36ad51f25b0219a3d4d13b90eb44cd075dff8b6280cca015775d7acaddd8" -"checksum web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)" = "721c6263e2c66fd44501cc5efbfa2b7dfa775d13e4ea38c46299646ed1f9c70a" -"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -"checksum which 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" -"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" -"checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" -"checksum zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" -"checksum zeroize_derive 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "080616bd0e31f36095288bb0acdf1f78ef02c2fa15527d7e993f2a6c7591643e" -"checksum zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6df134e83b8f0f8153a094c7b0fd79dfebe437f1d76e7715afa18ed95ebe2fd7" + "crc32fast", + "podio", +] diff --git a/api/src/foreign.rs b/api/src/foreign.rs index 3016628b5..f8ba7d80a 100644 --- a/api/src/foreign.rs +++ b/api/src/foreign.rs @@ -268,57 +268,6 @@ where ) } - /// Verifies all messages in the slate match their public keys. - /// - /// The option messages themselves are part of the `participant_data` field within the slate. - /// Messages are signed with the same key used to sign for the paricipant's inputs, and can thus be - /// verified with the public key found in the `public_blind_excess` field. This function is a - /// simple helper to returns whether all signatures in the participant data match their public - /// keys. - /// - /// # Arguments - /// - /// * `slate` - The transaction [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html). - /// - /// # Returns - /// * `Ok(())` if successful and the signatures validate - /// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered. - /// - /// # Example - /// Set up as in [`new`](struct.Foreign.html#method.new) method above. - /// ``` - /// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config); - /// - /// let mut api_foreign = Foreign::new(wallet.clone(), None, None); - /// - /// # let slate = Slate::blank(2); - /// // Receive a slate via some means - /// - /// let res = api_foreign.verify_slate_messages(&slate); - /// - /// if let Err(e) = res { - /// // Messages don't validate, likely return an error - /// // ... - /// } else { - /// // Slate messages are fine - /// } - /// - /// - /// ``` - - pub fn verify_slate_messages(&self, slate: &Slate) -> Result<(), Error> { - if let Some(m) = self.middleware.as_ref() { - let mut w_lock = self.wallet_inst.lock(); - let w = w_lock.lc_provider()?.wallet_inst()?; - m( - ForeignCheckMiddlewareFn::VerifySlateMessages, - w.w2n_client().get_version_info(), - Some(slate), - )?; - } - foreign::verify_slate_messages(slate) - } - /// Recieve a tranaction created by another party, returning the modified /// [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html) object, modified with /// the recipient's output for the transaction amount, and public signature data. This slate can @@ -340,12 +289,6 @@ where /// excess value). /// * `dest_acct_name` - The name of the account into which the slate should be received. If /// `None`, the default account is used. - /// * `message` - An optional participant message to include alongside the recipient's public - /// ParticipantData within the slate. This message will include a signature created with the - /// recipient's private excess value, and will be publically verifiable. Note this message is for - /// the convenience of the participants during the exchange; it is not included in the final - /// transaction sent to the chain. The message will be truncated to 256 characters. - /// Validation of this message is optional. /// /// # Returns /// * a result containing: @@ -363,11 +306,11 @@ where /// # grin_wallet_api::doctest_helper_setup_doc_env_foreign!(wallet, wallet_config); /// /// let mut api_foreign = Foreign::new(wallet.clone(), None, None); - /// # let slate = Slate::blank(2); + /// # let slate = Slate::blank(2, false); /// /// // . . . /// // Obtain a sent slate somehow - /// let result = api_foreign.receive_tx(&slate, None, None); + /// let result = api_foreign.receive_tx(&slate, None); /// /// if let Ok(slate) = result { /// // Send back to recipient somehow @@ -375,12 +318,7 @@ where /// } /// ``` - pub fn receive_tx( - &self, - slate: &Slate, - dest_acct_name: Option<&str>, - message: Option, - ) -> Result { + pub fn receive_tx(&self, slate: &Slate, dest_acct_name: Option<&str>) -> Result { let mut w_lock = self.wallet_inst.lock(); let w = w_lock.lc_provider()?.wallet_inst()?; if let Some(m) = self.middleware.as_ref() { @@ -395,7 +333,6 @@ where (&self.keychain_mask).as_ref(), slate, dest_acct_name, - message, self.doctest_mode, ) } @@ -441,7 +378,7 @@ where /// // If result okay, send to payer, who will apply the transaction via their /// // owner API, then send back the slate /// // ... - /// # let slate = Slate::blank(2); + /// # let slate = Slate::blank(2, true); /// /// let slate = api_foreign.finalize_invoice_tx(&slate); /// // if okay, then post via the owner API diff --git a/api/src/foreign_rpc.rs b/api/src/foreign_rpc.rs index b4795ffc1..ef1e8a413 100644 --- a/api/src/foreign_rpc.rs +++ b/api/src/foreign_rpc.rs @@ -116,88 +116,6 @@ pub trait ForeignRpc { fn build_coinbase(&self, block_fees: &BlockFees) -> Result; - /** - Networked version of [Foreign::verify_slate_messages](struct.Foreign.html#method.verify_slate_messages). - - # Json rpc example - - ``` - # grin_wallet_api::doctest_helper_json_rpc_foreign_assert_response!( - # r#" - { - "jsonrpc": "2.0", - "method": "verify_slate_messages", - "id": 1, - "params": [ { - "amount": "6000000000", - "fee": "8000000", - "height": "4", - "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "4", - "ttl_cutoff_height": null, - "payment_proof": null, - "num_participants": 2, - "participant_data": [ - { - "id": "0", - "message": "my message", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1d4c1358be398f801eb90d933774b5218fa7e769b11c4c640402253353656f75", - "part_sig": null, - "public_blind_excess": "034b4df2f0558b73ea72a1ca5c4ab20217c66bbe0829056fca7abe76888e9349ee", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - } - ], - "tx": { - "body": { - "inputs": [ - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "HeightLocked", - "fee": "8000000", - "lock_height": "4" - } - ], - "outputs": [ - { - "commit": "094be57c91787fc2033d5d97fae099f1a6ddb37ea48370f1a138f09524c767fdd3", - "features": "Plain", - "proof": "2a42e9e902b70ce44e1fccb14de87ee0a97100bddf12c6bead1b9c5f4eb60300f29c13094fa12ffeee238fb4532b18f6b61cf51b23c1c7e1ad2e41560dc27edc0a2b9e647a0b3e4e806fced5b65e61d0f1f5197d3e2285c632d359e27b6b9206b2caffea4f67e0c7a2812e7a22c134b98cf89bd43d9f28b8bec25cce037a0ac5b1ae8f667e54e1250813a5263004486b4465ad4e641ab2b535736ea26535a11013564f08f483b7dab1c2bcc3ee38eadf2f7850eff7e3459a4bbabf9f0cf6c50d0c0a4120565cd4a2ce3e354c11721cd695760a24c70e0d5a0dfc3c5dcd51dfad6de2c237a682f36dc0b271f21bb3655e5333016aaa42c2efa1446e5f3c0a79ec417c4d30f77556951cb0f05dbfafb82d9f95951a9ea241fda2a6388f73ace036b98acce079f0e4feebccc96290a86dcc89118a901210b245f2d114cf94396e4dbb461e82aa26a0581389707957968c7cdc466213bb1cd417db207ef40c05842ab67a01a9b96eb1430ebc26e795bb491258d326d5174ad549401059e41782121e506744af8af9d8e493644a87d613600888541cbbe538c625883f3eb4aa3102c5cfcc25de8e97af8927619ce6a731b3b8462d51d993066b935b0648d2344ad72e4fd70f347fbd81041042e5ea31cc7b2e3156a920b80ecba487b950ca32ca95fae85b759c936246ecf441a9fdd95e8fee932d6782cdec686064018c857efc47fb4b2a122600d5fdd79af2486f44df7e629184e1c573bc0a9b3feb40b190ef2861a1ab45e2ac2201b9cd42e495deea247269820ed32389a2810ad6c0f9a296d2a2d9c54089fed50b7f5ecfcd33ab9954360e1d7f5598c32128cfcf2a1d8bf14616818da8a5343bfa88f0eedf392e9d4ab1ace1b60324129cd4852c2e27813a9cf71a6ae6229a4fcecc1a756b3e664c5f50af333082616815a3bec8fc0b75b8e4e767d719" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 2, - "version": 2, - "block_header_version": 2 - } - } - ] - } - # "# - # , - # r#" - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "Ok": null - } - } - # "# - # ,false, 1 ,false, false); - ``` - */ - fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind>; - /** Networked version of [Foreign::receive_tx](struct.Foreign.html#method.receive_tx). @@ -212,63 +130,21 @@ pub trait ForeignRpc { "id": 1, "params": [ { - "version_info": { - "version": 2, - "orig_version": 2, - "block_header_version": 2 - }, - "num_participants": 2, - "id": "0436430c-2b02-624c-2032-570501212b00", - "tx": { - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000", - "body": { - "inputs": [ - { - "features": "Coinbase", - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045" - }, - { - "features": "Coinbase", - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7" - } - ], - "outputs": [ - { - "features": "Plain", - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ], - "kernels": [ - { - "features": "Plain", - "fee": "7000000", - "lock_height": "0", - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - ] - } + "ver": "4:2", + "id": "0436430c-2b02-624c-2032-570501212b00", + "sta": "S1", + "amt": "60000000000", + "fee": "7000000", + "off": "0gKWSQAAAADTApZJAAAAANQClkkAAAAA1QKWSQAAAAA=", + "sigs": [ + { + "xs": "AwFS0tcuLbp8YIatSaIZ2f8N/g/Zk9yuoi4FjCEAM86T", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP" + } + ] }, - "amount": "60000000000", - "fee": "7000000", - "height": "5", - "lock_height": "0", - "ttl_cutoff_height": null, - "payment_proof": null, - "participant_data": [ - { - "id": "0", - "public_blind_excess": "033ac2158fa0077f087de60c19d8e431753baa5b63b6e1477f05a2a6e7190d4592", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", - "part_sig": null, - "message": null, - "message_sig": null - } - ] - }, - null, - "Thanks, Yeastplume" + null, + null ] } # "# @@ -279,73 +155,23 @@ pub trait ForeignRpc { "jsonrpc": "2.0", "result": { "Ok": { - "amount": "60000000000", - "fee": "7000000", - "height": "5", - "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "payment_proof": null, - "num_participants": 2, - "participant_data": [ - { - "id": "0", - "message": null, - "message_sig": null, - "part_sig": null, - "public_blind_excess": "033ac2158fa0077f087de60c19d8e431753baa5b63b6e1477f05a2a6e7190d4592", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - }, - { - "id": "1", - "message": "Thanks, Yeastplume", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b30a1f1b21eade1b4bd211e1f137fbdbca1b78dc43da21b1695f6a0edf2437ff9", - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b2b35bd28dfd2269e0670e0cf9270bd6df2d03fbd64523ee4ae622396055b96fc", - "public_blind_excess": "038fe0443243dab173c068ef5fa891b242d2b5eb890ea09475e6e381170442ee16", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - } - ], - "tx": { - "body": { - "inputs": [ - { - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045", - "features": "Coinbase" - }, + "coms": [ { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" + "c": "CE7pfe+ow3Ek1MabqnU+JTJTX6qB956l4EidslKX1b64", + "p": "AH333d0e/KdXsgcHQMxgRig5DrWeFR+W/y6qU2H1Q1/Rqm6j/ryX/P4bMkjQQMgt42GAOSl2ui0RR8L7AhyHrQRPH5djk02dP0QxQXdi7tA8U84Xrtt4JFZcH0j8zsnEq8DSi9MrAs6b7kC/amDPfJwgPMJOS3efkB4SyYdXNpjPfwTjqs4m5xJiE4YFQkgArfMpXQn39F3d8YVceF6Y1F6uPNER0YVS5zOJVFjfFecaE4ONeJpMs2n03biqnFA7CA/YihRyRd8FItQTbTahg72UHmz5Tf/HhDixIZTU33EU0eJ6ei8BSSCjISI+y+uyuWQqIvjtTnSIMSXz51ey8RiFP/qxto8VwaLQIeWD/z/R6ihyCoEyWzzCMnup+y/ZsmRK2388ey4xmyU2o09n5vCTRvJNpryuGyQfhZBJNHbf41sYPlTxBeshm2AeDlOWVAlwHcH9lWLEKtl3UF6nvyZPAXcFaaSjWKcPsLLGWWn6w7I5VPDKCtrOBwMkPx2rYmUJqGVuepgXCcOsHVFpS6+lWq1FwQGTfL8+RdZwjAe+cUGXaaEKT2Tyt9U6VOrHPNvTJ5+RxfiZGksXYhw2GVqTkTZPoiHoqN7iHrw6brnNKUCjZ25+883UYxm9wR90h4Xkn/Qb7CwyQyVdg8aJW8DIk+anctdECmgyEkaxd3CdO9gtDcL1vKQMh46Fm2+CMZo4bgt/y8gBCiUXiwhBg4m6fGp3+ZrH9K5caGq2V0/NARb4VzvM2j7f3/NsnJLOL7i/sM4v5caySYxusW/C1A3p3cuhmafpPWSKvznWskjhlt5xJ+a4EuMIBJfyqCr6aaRxq1EedT5bF6HDnGcooGWJivZnRgjZKmJeluLwJY/i6waifQWG2InWH5f6qj+s9Yza" } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "7000000", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "084ee97defa8c37124d4c69baa753e2532535faa81f79ea5e0489db25297d5beb8", - "features": "Plain", - "proof": "007df7dddd1efca757b2070740cc604628390eb59e151f96ff2eaa5361f5435fd1aa6ea3febc97fcfe1b3248d040c82de36180392976ba2d1147c2fb021c87ad044f1f9763934d9d3f4431417762eed03c53ce17aedb7824565c1f48fccec9c4abc0d28bd32b02ce9bee40bf6a60cf7c9c203cc24e4b779f901e12c987573698cf7f04e3aace26e71262138605424800adf3295d09f7f45dddf1855c785e98d45eae3cd111d18552e733895458df15e71a13838d789a4cb369f4ddb8aa9c503b080fd88a147245df0522d4136d36a183bd941e6cf94dffc78438b12194d4df7114d1e27a7a2f014920a321223ecbebb2b9642a22f8ed4e74883125f3e757b2f118853ffab1b68f15c1a2d021e583ff3fd1ea28720a81325b3cc2327ba9fb2fd9b2644adb7f3c7b2e319b2536a34f67e6f09346f24da6bcae1b241f8590493476dfe35b183e54f105eb219b601e0e53965409701dc1fd9562c42ad977505ea7bf264f01770569a4a358a70fb0b2c65969fac3b23954f0ca0adace0703243f1dab626509a8656e7a981709c3ac1d51694bafa55aad45c101937cbf3e45d6708c07be71419769a10a4f64f2b7d53a54eac73cdbd3279f91c5f8991a4b17621c36195a9391364fa221e8a8dee21ebc3a6eb9cd2940a3676e7ef3cdd46319bdc11f748785e49ff41bec2c3243255d83c6895bc0c893e6a772d7440a68321246b177709d3bd82d0dc2f5bca40c878e859b6f82319a386e0b7fcbc8010a25178b08418389ba7c6a77f99ac7f4ae5c686ab6574fcd0116f8573bccda3edfdff36c9c92ce2fb8bfb0ce2fe5c6b2498c6eb16fc2d40de9ddcba199a7e93d648abf39d6b248e196de7127e6b812e3080497f2a82afa69a471ab511e753e5b17a1c39c6728a065898af6674608d92a625e96e2f0258fe2eb06a27d0586d889d61f97faaa3facf58cda" - }, + ], + "id": "0436430c-2b02-624c-2032-570501212b00", + "off": "pAUskgAAAAGmBSySAAAAAu1WT6tQt1/F6jLOBS/Jvr8=", + "sigs": [ { - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "features": "Plain", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBsFiJtL7+KpZhceAUs9zF+T6CiXy18Hr2cIYcJ9XmH+ag==", + "xs": "A6ZTwAjgK+rW7OC8F/8UHcRBH5NW+xZBLlx7x6fcv3PU" } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 2, - "version": 2, - "block_header_version": 2 - } + ], + "sta": "S2", + "ver": "4:2" } } } @@ -357,6 +183,7 @@ pub trait ForeignRpc { &self, slate: VersionedSlate, dest_acct_name: Option, + //TODO: Remove post-HF3 message: Option, ) -> Result; @@ -374,71 +201,30 @@ pub trait ForeignRpc { "method": "finalize_invoice_tx", "id": 1, "params": [{ - "version_info": { - "version": 2, - "orig_version": 2, - "block_header_version": 2 - }, - "num_participants": 2, + "ver": "4:2", "id": "0436430c-2b02-624c-2032-570501212b00", - "tx": { - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000", - "body": { - "inputs": [ - { - "features": "Coinbase", - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045" - }, - { - "features": "Coinbase", - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7" - } - ], - "outputs": [ - { - "features": "Plain", - "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", - "proof": "7ebcd2ed9bf5fb29854033ba3d0e720613bdf7dfacc586d2f6084c1cde0a2b72e955d4ce625916701dc7c347132f40d0f102a34e801d745ee54b49b765d08aae0bb801c60403e57cafade3b4b174e795b633ab9e402b5b1b6e1243fd10bbcf9368a75cb6a6c375c7bdf02da9e03b7f210df45d942e6fba2729cd512a372e6ed91a1b5c9c22831febea843e3f85adcf198f39ac9f7b73b70c60bfb474aa69878ea8d1d32fef30166b59caacaec3fd024de29a90f1587e08d2c36b3d5c560cabf658e212e0a40a4129b3e5c35557058def5551f4eb395759597ba808b3c34eac3bfb9716e4480d7931c5789c538463ec75be0eb807c894047fda6cbcd22682d3c6d3823cb330f090a2099e3510a3706b57d46c95224394d7f1c0a20d99cc314b8f1d9d02668e2e435f62e1194de0be6a1f50f72ed777ed51c8819f527a94918d1aa8df6461e98ed4c2b18210de50fbcf8c3df210bfe326d41f1dc0ad748cb0320ae28401c85ab4f7dcb99d88a052e95dc85b76d22b36cabd60e06ab84bb7e4ddfdab9c9730c8a986583237ed1ecbb323ee8e79b8cadca4b438b7c09531670b471dda6a2eb3e747916c88ce7d9d8e1b7f61660eeb9e5a13c60e4dfe89d1177d81d6f6570fda85158e646a15f1e8b9e977494dc19a339aab2e0e478670d80092d6ba37646e60714ef64eb4a3d37fe15f8f38b59114af34b235489eed3f69b7781c5fe496eb43ffe245c14bd740f745844a38cf0d904347aaa2b64f51add18822dac009d8b63fa3e4c9b1fa72187f9a4acba1ab315daa1b04c9a41f3be846ac420b37990e6c947a16cc9d5c0671b292bf77d7d8b8974d2ad3afae95ba7772c37432840f53a007f31e0195f3abdf100c4477723cc6c6d5da14894a73dfac342833731036487488fdade7b9d556c06f26173b6b67598d3769447ce2828d71dd45ac5af436c6b0" - }, - { - "features": "Plain", - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ], - "kernels": [ - { - "features": "Plain", - "fee": "7000000", - "lock_height": "0", - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - ] - } - }, - "amount": "60000000000", + "sta": "I2", "fee": "7000000", - "height": "5", - "lock_height": "0", - "ttl_cutoff_height": null, - "payment_proof": null, - "participant_data": [ + "off": "dQ2/T9Q7f0z9aNJpilIvP/bmoArZiVsz8exGSTuDe0k=", + "sigs": [ + { + "xs": "AwFS0tcuLbp8YIatSaIZ2f8N/g/Zk9yuoi4FjCEAM86T", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBva2TTaoX235HfE7tkK/tQNEReJbfjE9YYbYwmpSYeAdA==" + } + ], + "coms": [ + { + "f": 1, + "c": "CH3zIwTF1K6LKvC8MecAAZ1yKRDvh91O7DGXuAsgfjBF" + }, { - "id": "1", - "public_blind_excess": "033bbe2a419ea2e9d6810a8d66552e709d1783ca50759a44dbaf63fc79c0164c4c", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", - "part_sig": null, - "message": null, - "message_sig": null + "f": 1, + "c": "COHanm3E1ugIpxiy8RCpkd13XWXOWuQIpOHwAqSWGqnn" }, { - "id": "0", - "public_blind_excess": "029f12f9f8c5489a18904de7cd46dc3384b79369d4cbc17cd74b299da8c2cf7445", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1840d69ed5f33bc9b424422903d5d1d3e9b914143bcbe3b7ed32d8f15fcccce3", - "message": null, - "message_sig": null + "c": "CBInbMeI5ocGEiltkmy6nw57mBBnBxC1pubxugBtOVd0", + "p": "KEufkZlBHGu/cifq4VzJ+n7TBTSvPs/4Ww0BbaMpyuHx7fefAUJkNMuQr8wvCh+yluXFGpG15XofAjD9pPjFlQ55hvo3m5nWS2A5qGzH414EC6GSt4EEOVmFEmjKmHSpGIBeqVjIT3/ujTq0Ji8DL1o/hA683Sc7Kb6BARTm6GqVnY5MCAVy4+8knt1q1oUD7DvESGVIUg6id1pBrqZ6rJmUX86eendp1x+JOtfw0BCGkva2hSMSyub5hXBjBVvaWdzlIZJ8cAQLgCakG2UXyuChyUfKJEmEpcCt98ZIOwk5NGxI9hysN9UB9GocWHi2fO4NByP07q3J9dce1enzO0KUtY0+vu/qoT8gNXWZvlSc4Y5uLrHVDhI1zMQOyRhMaKYjdBpyOM5pqjodJRVrO36zj91vvlRzl5/u4zF98nnGDUiiiYJqpMdtvOJNUmiQ1Obi+D6A9nShJI/B3AN9mCAJASrhEz9eFYrmza2xjI1T5KiuVZXHWHgsZ6oMIPFG1SCFz0WjV5TOxFcCgw+JUqaXRHGPvm/g09pm40jdNHOgrO1wgPv1SUw+fhQZFvOxNbMyd/mY/Nms+8qHCYFIZumDil3NpMKUIs8VcpPm/CzMLSVCNReEO9jiHGHO1yMSwLSIFMMSAhsNMVmNI4mwsym6oRaZIqTDQXPdX1QFRb5QZqDykfGocOGq/5TBnwqFUlSIKheYS67aCOjq1T0VY+nuS8NnQnic7086sVgFTX3f4qKze1qKML6E/335p9dYqbdnUaNiIFdyGj7FuHNYLQyRzR/rvBU2YnOYVOoVyZAwI8GTxrV2i1VIQQj4l83EfROpCIsyVY5X8S9YB2aGScmaF7UZBRJzQOi0nEJ3Xxs8qwct+tM9M8weS6WWTXKO0KkF" } ] }] @@ -451,73 +237,41 @@ pub trait ForeignRpc { "jsonrpc": "2.0", "result": { "Ok": { - "amount": "60000000000", + "coms": [ + { + "c": "CH3zIwTF1K6LKvC8MecAAZ1yKRDvh91O7DGXuAsgfjBF", + "f": 1 + }, + { + "c": "COHanm3E1ugIpxiy8RCpkd13XWXOWuQIpOHwAqSWGqnn", + "f": 1 + }, + { + "c": "CZtIz7H4CiNH3ImBhEnmjnajxoF6UyqOnvK0pcz0NjhQ", + "p": "KXAc6uJiysd7ebhoyIOikuYebegZK4aO3NEwCwlz2ROWsVas5r1nNAKjA94Q3dil5rfxe6ZVeldKZyvQTMJzqwTtjiyoC6xIM0XA7IQ/UhgUzhMB7JrcOJVqErTZSKzOcSlaT1K83rihyfLWstpdcxJipenAJ275BN+e+NSAAUIM1Z91ovGuXHocfGufFA52E+Uu+eJJ8p+TQLfvuAaZ5GAWQyRhb5j9TN49tSSXyRnpUiL//qy35l3sp+NoqAznE8Gd59pTaXJiKO4zb1vUlFOMEsy//rG5v9X8iQbRxkJFtRbxA/qW2cVpdYN2UsHg+lgD18zxFH2Pkn422nF/eteUcdvhkvX1D4enn8P+Aw26VptjS5LSzzB5k8zlRWM68mOJfNfm6/Tcr7F20HNYvcONA+RaSd+pyMZRfNaNFn/79sO03g4t0hkJy61MRnuE5XAL5HOjmsWcZp18FVxLyrm4Am7qNDHHec0nfkki0rl0Lh9meMvoaew7W370Ey3bbN0Gzyfb6yi+crlJ+ol2EOSOOg14n9Lup1q8l7PcfgDlyLPSTkDG8kESrbcjUriaK+8FmTRTOOnnYgKjxG76Y3CVKyrKQarbrg6jJTGsr82rbdBm12nr9Qz088ClnS1fp5YAoge5QXxiP3atBejMz81AOPlEi8QPEnynwNNy5GB04zT+SfWpVuwAVvTaYB5q+A6xpsSVEFSGnmZbKW2MFPNEyi3F/dXfSjZSU2NloWFa2bQiFlx3v4/mWoNcjgxB4HABTrZu+MUlIE6ZCzo9ZjweQiIbSWiVw3ovDBvwXpEjVAnD/j2JqaedbHhgmrGKRjMRkR9x+je7c7FfzTgUPRQE/SzoEATcf/ic8RFdzAw1zhwb+ZQVhvuVl3DyYYzLcRin" + }, + { + "c": "CBInbMeI5ocGEiltkmy6nw57mBBnBxC1pubxugBtOVd0", + "p": "KEufkZlBHGu/cifq4VzJ+n7TBTSvPs/4Ww0BbaMpyuHx7fefAUJkNMuQr8wvCh+yluXFGpG15XofAjD9pPjFlQ55hvo3m5nWS2A5qGzH414EC6GSt4EEOVmFEmjKmHSpGIBeqVjIT3/ujTq0Ji8DL1o/hA683Sc7Kb6BARTm6GqVnY5MCAVy4+8knt1q1oUD7DvESGVIUg6id1pBrqZ6rJmUX86eendp1x+JOtfw0BCGkva2hSMSyub5hXBjBVvaWdzlIZJ8cAQLgCakG2UXyuChyUfKJEmEpcCt98ZIOwk5NGxI9hysN9UB9GocWHi2fO4NByP07q3J9dce1enzO0KUtY0+vu/qoT8gNXWZvlSc4Y5uLrHVDhI1zMQOyRhMaKYjdBpyOM5pqjodJRVrO36zj91vvlRzl5/u4zF98nnGDUiiiYJqpMdtvOJNUmiQ1Obi+D6A9nShJI/B3AN9mCAJASrhEz9eFYrmza2xjI1T5KiuVZXHWHgsZ6oMIPFG1SCFz0WjV5TOxFcCgw+JUqaXRHGPvm/g09pm40jdNHOgrO1wgPv1SUw+fhQZFvOxNbMyd/mY/Nms+8qHCYFIZumDil3NpMKUIs8VcpPm/CzMLSVCNReEO9jiHGHO1yMSwLSIFMMSAhsNMVmNI4mwsym6oRaZIqTDQXPdX1QFRb5QZqDykfGocOGq/5TBnwqFUlSIKheYS67aCOjq1T0VY+nuS8NnQnic7086sVgFTX3f4qKze1qKML6E/335p9dYqbdnUaNiIFdyGj7FuHNYLQyRzR/rvBU2YnOYVOoVyZAwI8GTxrV2i1VIQQj4l83EfROpCIsyVY5X8S9YB2aGScmaF7UZBRJzQOi0nEJ3Xxs8qwct+tM9M8weS6WWTXKO0KkF" + } + ], "fee": "7000000", - "height": "5", "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "payment_proof": null, - "num_participants": 2, - "participant_data": [ + "off": "dQ2/T9Q7f0z9aNJpilIvP/bmoArZiVsz8exGSTuDe0k=", + "sigs": [ { - "id": "1", - "message": null, - "message_sig": null, - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841bc9ea21b259d61e4de177d9ef8ab475dfab0ec7299009a7fea61010f963f2e6c0", - "public_blind_excess": "033bbe2a419ea2e9d6810a8d66552e709d1783ca50759a44dbaf63fc79c0164c4c", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBva2TTaoX235HfE7tkK/tQNEReJbfjE9YYbYwmpSYeAdA==", + "xs": "AwFS0tcuLbp8YIatSaIZ2f8N/g/Zk9yuoi4FjCEAM86T" }, { - "id": "0", - "message": null, - "message_sig": null, - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1840d69ed5f33bc9b424422903d5d1d3e9b914143bcbe3b7ed32d8f15fcccce3", - "public_blind_excess": "029f12f9f8c5489a18904de7cd46dc3384b79369d4cbc17cd74b299da8c2cf7445", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBs1/f5VJx8q5z119Yxw0e+2mzOEx7xQfVfpnlbed+IIdA==", + "xs": "Azu+KkGeounWgQqNZlUucJ0Xg8pQdZpE269j/HnAFkxM" } ], - "tx": { - "body": { - "inputs": [ - { - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045", - "features": "Coinbase" - }, - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "09bac6083b05a32a9d9b37710c70dd0a1ef9329fde0848558976b6f1b81d80ceed", - "excess_sig": "66074d25a751c4743342c90ad8ead9454daa00d9b9aed29bca321036d16c4b4da0e9c180a26b88565afcd269a7ac98f896c8db3dcbd48ab69443e8eac3beb3a4", - "features": "Plain", - "fee": "7000000", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", - "features": "Plain", - "proof": "7ebcd2ed9bf5fb29854033ba3d0e720613bdf7dfacc586d2f6084c1cde0a2b72e955d4ce625916701dc7c347132f40d0f102a34e801d745ee54b49b765d08aae0bb801c60403e57cafade3b4b174e795b633ab9e402b5b1b6e1243fd10bbcf9368a75cb6a6c375c7bdf02da9e03b7f210df45d942e6fba2729cd512a372e6ed91a1b5c9c22831febea843e3f85adcf198f39ac9f7b73b70c60bfb474aa69878ea8d1d32fef30166b59caacaec3fd024de29a90f1587e08d2c36b3d5c560cabf658e212e0a40a4129b3e5c35557058def5551f4eb395759597ba808b3c34eac3bfb9716e4480d7931c5789c538463ec75be0eb807c894047fda6cbcd22682d3c6d3823cb330f090a2099e3510a3706b57d46c95224394d7f1c0a20d99cc314b8f1d9d02668e2e435f62e1194de0be6a1f50f72ed777ed51c8819f527a94918d1aa8df6461e98ed4c2b18210de50fbcf8c3df210bfe326d41f1dc0ad748cb0320ae28401c85ab4f7dcb99d88a052e95dc85b76d22b36cabd60e06ab84bb7e4ddfdab9c9730c8a986583237ed1ecbb323ee8e79b8cadca4b438b7c09531670b471dda6a2eb3e747916c88ce7d9d8e1b7f61660eeb9e5a13c60e4dfe89d1177d81d6f6570fda85158e646a15f1e8b9e977494dc19a339aab2e0e478670d80092d6ba37646e60714ef64eb4a3d37fe15f8f38b59114af34b235489eed3f69b7781c5fe496eb43ffe245c14bd740f745844a38cf0d904347aaa2b64f51add18822dac009d8b63fa3e4c9b1fa72187f9a4acba1ab315daa1b04c9a41f3be846ac420b37990e6c947a16cc9d5c0671b292bf77d7d8b8974d2ad3afae95ba7772c37432840f53a007f31e0195f3abdf100c4477723cc6c6d5da14894a73dfac342833731036487488fdade7b9d556c06f26173b6b67598d3769447ce2828d71dd45ac5af436c6b0" - }, - { - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "features": "Plain", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 2, - "version": 2, - "block_header_version": 2 - } + "sta": "I3", + "ver": "4:2" } } } @@ -543,15 +297,12 @@ where Ok(VersionedCoinbase::into_version(cb, SlateVersion::V3)) } - fn verify_slate_messages(&self, slate: VersionedSlate) -> Result<(), ErrorKind> { - Foreign::verify_slate_messages(self, &Slate::from(slate)).map_err(|e| e.kind()) - } - fn receive_tx( &self, in_slate: VersionedSlate, dest_acct_name: Option, - message: Option, + //TODO: Remove post HF3 + _message: Option, ) -> Result { let version = in_slate.version(); let slate_from = Slate::from(in_slate); @@ -559,7 +310,6 @@ where self, &slate_from, dest_acct_name.as_ref().map(String::as_str), - message, ) .map_err(|e| e.kind())?; Ok(VersionedSlate::into_version(out_slate, version).map_err(|e| e.kind())?) diff --git a/api/src/owner.rs b/api/src/owner.rs index d8f87989b..1cb7a5322 100644 --- a/api/src/owner.rs +++ b/api/src/owner.rs @@ -625,7 +625,6 @@ where /// max_outputs: 500, /// num_change_outputs: 1, /// selection_strategy_is_use_all: false, - /// message: Some("Have some Grins. Love, Yeastplume".to_owned()), /// ..Default::default() /// }; /// let result = api_owner.init_send_tx( @@ -637,7 +636,7 @@ where /// // Send slate somehow /// // ... /// // Lock our outputs if we're happy the slate was (or is being) sent - /// api_owner.tx_lock_outputs(None, &slate, 0); + /// api_owner.tx_lock_outputs(None, &slate); /// } /// ``` @@ -670,14 +669,14 @@ where let comm_adapter = create_sender(&sa.method, &sa.dest, tor_config_lock.clone()) .map_err(|e| ErrorKind::GenericError(format!("{}", e)))?; slate = comm_adapter.send_tx(&slate)?; - self.tx_lock_outputs(keychain_mask, &slate, 0)?; + self.tx_lock_outputs(keychain_mask, &slate)?; let slate = match sa.finalize { true => self.finalize_tx(keychain_mask, &slate)?, false => slate, }; if sa.post_tx { - self.post_tx(keychain_mask, slate.tx_or_err()?, sa.fluff)?; + self.post_tx(keychain_mask, &slate, sa.fluff)?; } Ok(slate) } @@ -766,7 +765,7 @@ where /// /// // . . . /// // The slate has been recieved from the invoicer, somehow - /// # let slate = Slate::blank(2); + /// # let slate = Slate::blank(2, true); /// let args = InitTxArgs { /// src_acct_name: None, /// amount: slate.amount, @@ -835,7 +834,6 @@ where /// max_outputs: 500, /// num_change_outputs: 1, /// selection_strategy_is_use_all: false, - /// message: Some("Remember to lock this when we're happy this is sent".to_owned()), /// ..Default::default() /// }; /// let result = api_owner.init_send_tx( @@ -847,7 +845,7 @@ where /// // Send slate somehow /// // ... /// // Lock our outputs if we're happy the slate was (or is being) sent - /// api_owner.tx_lock_outputs(None, &slate, 0); + /// api_owner.tx_lock_outputs(None, &slate); /// } /// ``` @@ -855,11 +853,10 @@ where &self, keychain_mask: Option<&SecretKey>, slate: &Slate, - participant_id: usize, ) -> Result<(), Error> { let mut w_lock = self.wallet_inst.lock(); let w = w_lock.lc_provider()?.wallet_inst()?; - owner::tx_lock_outputs(&mut **w, keychain_mask, slate, participant_id) + owner::tx_lock_outputs(&mut **w, keychain_mask, slate) } /// Finalizes a transaction, after all parties @@ -899,7 +896,6 @@ where /// max_outputs: 500, /// num_change_outputs: 1, /// selection_strategy_is_use_all: false, - /// message: Some("Finalize this tx now".to_owned()), /// ..Default::default() /// }; /// let result = api_owner.init_send_tx( @@ -911,7 +907,7 @@ where /// // Send slate somehow /// // ... /// // Lock our outputs if we're happy the slate was (or is being) sent - /// let res = api_owner.tx_lock_outputs(None, &slate, 0); + /// let res = api_owner.tx_lock_outputs(None, &slate); /// // /// // Retrieve slate back from recipient /// // @@ -959,7 +955,6 @@ where /// max_outputs: 500, /// num_change_outputs: 1, /// selection_strategy_is_use_all: false, - /// message: Some("Post this tx".to_owned()), /// ..Default::default() /// }; /// let result = api_owner.init_send_tx( @@ -971,19 +966,19 @@ where /// // Send slate somehow /// // ... /// // Lock our outputs if we're happy the slate was (or is being) sent - /// let res = api_owner.tx_lock_outputs(None, &slate, 0); + /// let res = api_owner.tx_lock_outputs(None, &slate); /// // /// // Retrieve slate back from recipient /// // /// let res = api_owner.finalize_tx(None, &slate); - /// let res = api_owner.post_tx(None, slate.tx_or_err().unwrap(), true); + /// let res = api_owner.post_tx(None, &slate, true); /// } /// ``` pub fn post_tx( &self, keychain_mask: Option<&SecretKey>, - tx: &Transaction, + slate: &Slate, fluff: bool, ) -> Result<(), Error> { let client = { @@ -993,7 +988,7 @@ where let _ = w.keychain(keychain_mask)?; w.w2n_client().clone() }; - owner::post_tx(&client, tx, fluff) + owner::post_tx(&client, slate.tx_or_err()?, fluff) } /// Cancels a transaction. This entails: @@ -1031,7 +1026,6 @@ where /// max_outputs: 500, /// num_change_outputs: 1, /// selection_strategy_is_use_all: false, - /// message: Some("Cancel this tx".to_owned()), /// ..Default::default() /// }; /// let result = api_owner.init_send_tx( @@ -1043,7 +1037,7 @@ where /// // Send slate somehow /// // ... /// // Lock our outputs if we're happy the slate was (or is being) sent - /// let res = api_owner.tx_lock_outputs(None, &slate, 0); + /// let res = api_owner.tx_lock_outputs(None, &slate); /// // /// // We didn't get the slate back, or something else went wrong /// // @@ -1098,86 +1092,21 @@ where /// let result = api_owner.retrieve_txs(None, update_from_node, tx_id, tx_slate_id); /// /// if let Ok((was_updated, tx_log_entries)) = result { - /// let stored_tx = api_owner.get_stored_tx(None, &tx_log_entries[0]).unwrap(); + /// let stored_tx = api_owner.get_stored_tx(None, tx_log_entries[0].tx_slate_id.unwrap()).unwrap(); /// //... /// } /// ``` - // TODO: Should be accepting an id, not an entire entry struct pub fn get_stored_tx( &self, keychain_mask: Option<&SecretKey>, - tx_log_entry: &TxLogEntry, + tx_id: Uuid, ) -> Result, Error> { let mut w_lock = self.wallet_inst.lock(); let w = w_lock.lc_provider()?.wallet_inst()?; // Test keychain mask, to keep API consistent let _ = w.keychain(keychain_mask)?; - owner::get_stored_tx(&**w, tx_log_entry) - } - - /// Verifies all messages in the slate match their public keys. - /// - /// The optional messages themselves are part of the `participant_data` field within the slate. - /// Messages are signed with the same key used to sign for the paricipant's inputs, and can thus be - /// verified with the public key found in the `public_blind_excess` field. This function is a - /// simple helper to returns whether all signatures in the participant data match their public - /// keys. - /// - /// # Arguments - /// - /// * `keychain_mask` - Wallet secret mask to XOR against the stored wallet seed before using, if - /// being used. - /// * `slate` - The transaction [`Slate`](../grin_wallet_libwallet/slate/struct.Slate.html). - /// - /// # Returns - /// * `Ok(())` if successful and the signatures validate - /// * or [`libwallet::Error`](../grin_wallet_libwallet/struct.Error.html) if an error is encountered. - /// - /// # Example - /// Set up as in [`new`](struct.Owner.html#method.new) method above. - /// ``` - /// # grin_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config); - /// - /// let mut api_owner = Owner::new(wallet.clone(), None); - /// let args = InitTxArgs { - /// src_acct_name: None, - /// amount: 2_000_000_000, - /// minimum_confirmations: 10, - /// max_outputs: 500, - /// num_change_outputs: 1, - /// selection_strategy_is_use_all: false, - /// message: Some("Just verify messages".to_owned()), - /// ..Default::default() - /// }; - /// let result = api_owner.init_send_tx( - /// None, - /// args, - /// ); - /// - /// if let Ok(slate) = result { - /// // Send slate somehow - /// // ... - /// // Lock our outputs if we're happy the slate was (or is being) sent - /// let res = api_owner.tx_lock_outputs(None, &slate, 0); - /// // - /// // Retrieve slate back from recipient - /// // - /// let res = api_owner.verify_slate_messages(None, &slate); - /// } - /// ``` - pub fn verify_slate_messages( - &self, - keychain_mask: Option<&SecretKey>, - slate: &Slate, - ) -> Result<(), Error> { - { - let mut w_lock = self.wallet_inst.lock(); - let w = w_lock.lc_provider()?.wallet_inst()?; - // Test keychain mask, to keep API consistent - let _ = w.keychain(keychain_mask)?; - } - owner::verify_slate_messages(slate) + owner::get_stored_tx(&**w, &tx_id) } /// Scans the entire UTXO set from the node, identify which outputs belong to the given wallet @@ -2149,6 +2078,16 @@ where ) -> Result<(bool, bool), Error> { owner::verify_payment_proof(self.wallet_inst.clone(), keychain_mask, proof) } + + /// Return my participant data + // TODO: This will be removed once state is added to slate + pub fn context_is_invoice( + &self, + keychain_mask: Option<&SecretKey>, + slate: &Slate, + ) -> Result { + owner::context_is_invoice(self.wallet_inst.clone(), keychain_mask, slate) + } } #[doc(hidden)] diff --git a/api/src/owner_rpc.rs b/api/src/owner_rpc.rs index 4bf1bd6f4..ac1461bba 100644 --- a/api/src/owner_rpc.rs +++ b/api/src/owner_rpc.rs @@ -19,7 +19,6 @@ use crate::config::{TorConfig, WalletConfig}; use crate::core::core::Transaction; use crate::core::global; use crate::keychain::{Identifier, Keychain}; -use crate::libwallet::slate_versions::v4::TransactionV4; use crate::libwallet::{ AcctPathMapping, ErrorKind, InitTxArgs, IssueInvoiceTxArgs, NodeClient, NodeHeightResult, OutputCommitMapping, PaymentProof, Slate, SlateVersion, StatusMessage, TxLogEntry, @@ -262,7 +261,6 @@ pub trait OwnerRpc { "id": 0, "kernel_excess": "0838e19c490038b10f051c9c190a9b1f96d59bbd242f5d3143f50630deb74342ed", "kernel_lookup_min_height": 1, - "messages": null, "num_inputs": 0, "num_outputs": 1, "parent_key_id": "0200000000000000000000000000000000", @@ -283,7 +281,6 @@ pub trait OwnerRpc { "id": 1, "kernel_excess": "08cd9d890c0b6a004f700aa5939a1ce0488fe2a11fa33cf096b50732ceab0be1df", "kernel_lookup_min_height": 2, - "messages": null, "num_inputs": 0, "num_outputs": 1, "parent_key_id": "0200000000000000000000000000000000", @@ -380,7 +377,6 @@ pub trait OwnerRpc { "max_outputs": 500, "num_change_outputs": 1, "selection_strategy_is_use_all": true, - "message": "my message", "target_slate_version": null, "payment_proof_recipient_address": "pa7wkkdgs5bkteha7lykl7ff2wztgdrxxo442xdcq2lnaphe5aidd4id", "ttl_blocks": null, @@ -393,67 +389,29 @@ pub trait OwnerRpc { # , # r#" { - "id": 1, - "jsonrpc": "2.0", - "result": { - "Ok": { - "amount": "6000000000", - "fee": "8000000", - "height": "4", - "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": { - "receiver_address": "783f6528669742a990e0faf0a5fca5d5b3330e37bbb9cd5c628696d03ce4e810", - "receiver_signature": null, - "sender_address": "32cdd63928854f8b2628b1dce4626ddcdf35d56cb7cfdf7d64cca5822b78d4d3" - }, - "participant_data": [ - { - "id": "0", - "message": "my message", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1d4c1358be398f801eb90d933774b5218fa7e769b11c4c640402253353656f75", - "part_sig": null, - "public_blind_excess": "034b4df2f0558b73ea72a1ca5c4ab20217c66bbe0829056fca7abe76888e9349ee", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - } - ], - "tx": { - "body": { - "inputs": [ - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "8000000", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "094be57c91787fc2033d5d97fae099f1a6ddb37ea48370f1a138f09524c767fdd3", - "features": "Plain", - "proof": "1319630b26d02363861ebdb15514086dc8b0772b4bb63ef9b828704e0ac348efada6747dd7a29848138d630c7b403e573c9cde04be5d25f2d344db4b010d6b890dd6c54cc0911c0cadc7a8a225b2ec3f2dcac88189a17aa62257e969eef9de9172009d8e864e413f1953998b28531e580d3ea495a512d320e8d4ff50e7495a6c283c6e544d16364d34272805893526f1e3b6fd176ef4adc5671b165cf28efcfb8d25c0dfcd018a2c5e65beeb9201f3983194e5a521c0844d05c700654dfaed1b9b39dae08cc9afab9cb891256bc0237ad2ce78da8b44586580f52dd346dcafde5e471917f16e4c4b51e966e1946f13e31771503c85bb0f1b41d1c7fcc953e70af55400638a35e7f5610f9f4c5b881a35060a693deaf46e1839c54a8f7d2c626b05acd3450b72ae8f2e0f8721bcbbd8562141d3fef851c6ac3c8069fa6389389bc4fcba5e4fb49709a3b63a59ba96a82827dfbd6f16de849ef95f3114593d207aff6e030152929fa220b0c3b54ca419cfcbffb7a0106dd3154e858878c7d8f38cadcc376c502bdc50292b494484936d0846fc3fac10910962bca4ddcca5c80b458fd7df15e9a6c2f39b516425a2190a97c9d0e2e2f105ee29905f36e3a648a135ebf387d0bb2a6b61d95b215319d6dc9ee8b4b2798810fb6e01c007041b288c2b39e805c9af86c88dd4a380b6a346b4a0e67bba6aaac5acc70088ac3297486b90cfe371d9464552747a2f7680f42d5629fb09bed835382d842234712c0574c5b4f256c226e77602429983e4def71541cff80ccf4cd3b761685c91463c8e1c7bf828699c688509282b85e752424df3da670b3cfacdea2f66cfb804fecdf8b7eb056e8917fdae78d83c011964e3d5a0748873f817d0abf4b04c20452733eac35c318b96e100a5ace0f54085bd24f968b8fc5b276e0d7b134f01db50b3d2771cdcf1423d44" + "id": 1, + "jsonrpc": "2.0", + "result": { + "Ok": { + "amt": "6000000000", + "fee": "8000000", + "id": "0436430c-2b02-624c-2032-570501212b00", + "off": "0gKWSQAAAADTApZJAAAAANQClkkAAAAA1QKWSQAAAAA=", + "proof": { + "raddr": "eD9lKGaXQqmQ4Prwpfyl1bMzDje7uc1cYoaW0Dzk6BA=", + "saddr": "Ms3WOSiFT4smKLHc5GJt3N811Wy3z999ZMylgit41NM=" + }, + "sigs": [ + { + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "xs": "Ajh4zoRXJ/Ok7HbKPz20s4otBdY2uMNjIQi4V/7WPJbe" + } + ], + "sta": "S1", + "ver": "4:2" } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 4, - "version": 4, - "block_header_version": 2 - } + } } - } - } # "# # , 4, false, false, false, false); ``` @@ -474,7 +432,6 @@ pub trait OwnerRpc { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", "args": { "amount": "6000000000", - "message": "Please give me your grins", "dest_acct_name": null, "target_slate_version": null } @@ -489,51 +446,17 @@ pub trait OwnerRpc { "jsonrpc": "2.0", "result": { "Ok": { - "amount": "6000000000", - "fee": "0", - "height": "4", + "amt": "6000000000", "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": null, - "participant_data": [ + "off": "0gKWSQAAAADTApZJAAAAANQClkkAAAAA1QKWSQAAAAA=", + "sigs": [ { - "id": "1", - "message": "Please give me your grins", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841bd9bccdcf5d3a402bccc77d36346d3a899259a884f643e90266984289b39a59d2", - "part_sig": null, - "public_blind_excess": "028e95921cc0d5be5922362265d352c9bdabe51a9e1502a3f0d4a10387f1893f40", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "xs": "Ao6VkhzA1b5ZIjYiZdNSyb2r5RqeFQKj8NShA4fxiT9A" } ], - "tx": { - "body": { - "inputs": [], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "0", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "09cf47204446c326e361a1a92f34b174deff732daaedb80d7339fbe3db5ca2f6ba", - "features": "Plain", - "proof": "b368448efb3bfae95e7f18381883d64cbc9f01390e9c677d5d9f3523df43754dd174811768b7ffcafbfb284ae7413bdf56640ecb06918a5c38a5dae6cb33baff099c7cca6b052e07f915faecedee50a11ceaf41a7809bd33b51e22306ddf42620f7118133a418802f6e98222a8f3683cf3d5a5314155d0bf5f2e8be68e81ebe049ece23b0135d7b878c1ecebbf03de69fb8cbaf5f9611a430ae3083f71e0a74db8899b0083123a9e1924db8d340fdcc0bba4816afc613a0c6622fa89a84f31982cd4298a3b4c4de9d5f67800f48c6b37b4b49fb527290ec92f1551f4570abe42ac6ac42b05e3579b33533b784061ccbd2507af419079c3ea846f1af1aa2bfb04837166c60eab8207fed9000d3c2f5166e655e9220051223b90fb5751becc8a18cf10fb43cbc1cdeb8d0f11f5d0eb9dffdd4480abd69a49737f526b41b78f3c00bd7ef10f6ad3d8704f9ac6e79196c57b315a37265ca561fa333733e9c9275a2a4dc703b509b3ff11e6d983dd43a06566c82832ae0da9c8e9759038c6c86b30a05dd5cacc42c10fad496dee8cf63127233ae0bd27c766aed7448ebd7afbaa35c5491795fca7441b5373c4912e99ffbded6c7082d67f0b688f5af662be375f76699a69fcccb9c1c1841056fb4b6ec3f1c4dc40f032675fc2c87bab58e3375dac567533c4d0e3f1521e561029e231f3675368bde5817d177bd9c20b8cd7eb3b94260b0794f207bb33b9b8157518dbac8d725352b27ffa0e2aaa95d04592a87a6ee68deebaf1c51183704bea8ddd4298616fa353bc411936eafa1b31cc667a41a13a2d1a91db48464ea26c39ee1f68e67cbdd652165b040b43df2c80beda6af53dfbe0aa3aeb06c1887f9be83ed19b4b7094ba35700dad3ea4090594e662ae2a1c276b969751ab6d5d49a2c727d7ee2c80ffdc3d1ba040a20269b9bfc45930f467dbb43f64" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 4, - "version": 4, - "block_header_version": 2 - } + "sta": "I1", + "ver": "4:2" } } } @@ -560,51 +483,17 @@ pub trait OwnerRpc { "params": { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", "slate": { - "amount": "6000000000", - "fee": "0", - "height": "4", + "amt": "6000000000", "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": null, - "participant_data": [ + "off": "QNjHljmHml/Ot7ogVQDjr3a0M8mBzgN/SLj6NuVh8IM=", + "sigs": [ { - "id": "1", - "message": "Please give me your grins", - "message_sig": "1b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078fd2599ab38942986602e943f684a85992893a6d34367dc7cc2b403a5dcfcdbcd9", - "part_sig": null, - "public_blind_excess": "028e95921cc0d5be5922362265d352c9bdabe51a9e1502a3f0d4a10387f1893f40", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "xs": "Ao6VkhzA1b5ZIjYiZdNSyb2r5RqeFQKj8NShA4fxiT9A" } ], - "tx": { - "body": { - "inputs": [], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "0", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "09cf47204446c326e361a1a92f34b174deff732daaedb80d7339fbe3db5ca2f6ba", - "features": "Plain", - "proof": "8f511614315626b5f39224482351d766f5a8ef136262befc050d839be8479b0a13470cd88f4436346d213d83847a4055c6e0ac63681556470349a1aab47034a3015eb64d8163955998e2dd4165dd24386b1e279974b05deb5d46ba2bc321f7000c0784f8f10690605ffe717119d045e02b141ed12d8fc6d20930483a8af889ef533495eb442fcff36d98ebc104f13fc645c28431b3296e4a11f7c991ff97f9abbc2f8886762d7f29fdacb31d52c6850e6ccf5386117d89e8ea4ca3071c56c218dd5d3bcd65f6c06ed9f51f848507ca1d594f41796d1cf99f68a5c3f0c5dd9873602284cff31269b102fcc6c68607565faaf0adb04ed4ff3ea5d41f3b5235ac6cb90e4046c808c9c48c27172c891b20085c56a99913ef47fd8b3dc4920cef50534b9319a7cefe0df10a0206a634ac837e11da92df83ff58b1a14de81313400988aa48b946fcbe1b81f0e79e13f7c6c639b1c10983b424bda08d0ce593a20f1f47e0aa01473e7144f116b76d9ebc60599053d8f1542d60747793d99064e51fce8f8866390325d48d6e8e3bbdbc1822c864303451525c6cb4c6902f105a70134186fb32110d8192fc2528a9483fc8a4001f4bdeab1dd7b3d1ccb9ae2e746a78013ef74043f0b2436f0ca49627af1768b7c791c669bd331fd18c16ef88ad0a29861db70f2f76f3e74fde5accb91b73573e31333333223693d6fbc786e740c085e4fc6e7bde0a3f54e9703f816c54f012d3b1f41ec4d253d9337af61e7f1f1383bd929421ac346e3d2771dfee0b60503b33938e7c83eb37af3b6bf66041a3519a2b4cb557b34e3b9afcf95524f9a011425a34d32e7b6e9f255291094930acae26e8f7a1e4e6bc405d0f88e919f354f3ba85356a34f1aba5f7da1fad88e2692f4129cc1fb80a2122b2d996c6ccf7f08d8248e511d92af9ce49039de728848a2dc74101f4e94a" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 4, - "version": 4, - "block_header_version": 2 - } + "sta": "I1", + "ver": "4:2" }, "args": { "src_acct_name": null, @@ -613,7 +502,6 @@ pub trait OwnerRpc { "max_outputs": 500, "num_change_outputs": 1, "selection_strategy_is_use_all": true, - "message": "Ok, here are your grins", "target_slate_version": null, "payment_proof_recipient_address": null, "ttl_blocks": null, @@ -630,69 +518,28 @@ pub trait OwnerRpc { "jsonrpc": "2.0", "result": { "Ok": { - "amount": "6000000000", - "fee": "8000000", - "height": "4", - "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": null, - "participant_data": [ + "coms": [ { - "id": "1", - "message": "Please give me your grins", - "message_sig": "1b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078fd2599ab38942986602e943f684a85992893a6d34367dc7cc2b403a5dcfcdbcd9", - "part_sig": null, - "public_blind_excess": "028e95921cc0d5be5922362265d352c9bdabe51a9e1502a3f0d4a10387f1893f40", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "c": "COHanm3E1ugIpxiy8RCpkd13XWXOWuQIpOHwAqSWGqnn", + "f": 1 }, { - "id": "0", - "message": "Ok, here are your grins", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be91ae0f6b50fabc39eefa28118cccdd8fbf5b5afe96972630450f47b72433646", - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b619d40fb6a6fb60449ef9727aeb782e7a5b50fdbfd2d735b49ccc55b477cd319", - "public_blind_excess": "0309e22f2adaa9b81f51414b775b86acd096e17794eb8159bfcfef27caa4bf5c90", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "c": "CUvlfJF4f8IDPV2X+uCZ8abds36kg3DxoTjwlSTHZ/3T", + "p": "ExljCybQI2OGHr2xVRQIbciwdytLtj75uChwTgrDSO+tpnR916KYSBONYwx7QD5XPJzeBL5dJfLTRNtLAQ1riQ3WxUzAkRwMrceooiWy7D8tysiBiaF6piJX6Wnu+d6RcgCdjoZOQT8ZU5mLKFMeWA0+pJWlEtMg6NT/UOdJWmwoPG5UTRY2TTQnKAWJNSbx47b9F270rcVnGxZc8o78+40lwN/NAYosXmW+65IB85gxlOWlIcCETQXHAGVN+u0bmzna4IzJr6ucuJEla8AjetLOeNqLRFhlgPUt00bcr95eRxkX8W5MS1HpZuGUbxPjF3FQPIW7DxtB0cf8yVPnCvVUAGOKNef1YQ+fTFuIGjUGCmk96vRuGDnFSo99LGJrBazTRQtyro8uD4chvLvYViFB0/74UcasPIBp+mOJOJvE/LpeT7SXCaO2Olm6lqgoJ9+9bxbehJ75XzEUWT0gev9uAwFSkp+iILDDtUykGc/L/7egEG3TFU6FiHjH2POMrcw3bFAr3FApK0lEhJNtCEb8P6wQkQlivKTdzKXIC0WP198V6abC85tRZCWiGQqXydDi4vEF7imQXzbjpkihNevzh9C7Kmth2VshUxnW3J7otLJ5iBD7bgHABwQbKIwrOegFya+GyI3Uo4C2o0a0oOZ7umqqxazHAIisMpdIa5DP43HZRkVSdHovdoD0LVYp+wm+2DU4LYQiNHEsBXTFtPJWwibndgJCmYPk3vcVQc/4DM9M07dhaFyRRjyOHHv4KGmcaIUJKCuF51JCTfPaZws8+s3qL2bPuAT+zfi36wVuiRf9rnjYPAEZZOPVoHSIc/gX0Kv0sEwgRScz6sNcMYuW4QClrOD1QIW9JPlouPxbJ24NexNPAdtQs9J3HNzxQj1E" } ], - "tx": { - "body": { - "inputs": [ - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "8000000", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "09cf47204446c326e361a1a92f34b174deff732daaedb80d7339fbe3db5ca2f6ba", - "features": "Plain", - "proof": "8f511614315626b5f39224482351d766f5a8ef136262befc050d839be8479b0a13470cd88f4436346d213d83847a4055c6e0ac63681556470349a1aab47034a3015eb64d8163955998e2dd4165dd24386b1e279974b05deb5d46ba2bc321f7000c0784f8f10690605ffe717119d045e02b141ed12d8fc6d20930483a8af889ef533495eb442fcff36d98ebc104f13fc645c28431b3296e4a11f7c991ff97f9abbc2f8886762d7f29fdacb31d52c6850e6ccf5386117d89e8ea4ca3071c56c218dd5d3bcd65f6c06ed9f51f848507ca1d594f41796d1cf99f68a5c3f0c5dd9873602284cff31269b102fcc6c68607565faaf0adb04ed4ff3ea5d41f3b5235ac6cb90e4046c808c9c48c27172c891b20085c56a99913ef47fd8b3dc4920cef50534b9319a7cefe0df10a0206a634ac837e11da92df83ff58b1a14de81313400988aa48b946fcbe1b81f0e79e13f7c6c639b1c10983b424bda08d0ce593a20f1f47e0aa01473e7144f116b76d9ebc60599053d8f1542d60747793d99064e51fce8f8866390325d48d6e8e3bbdbc1822c864303451525c6cb4c6902f105a70134186fb32110d8192fc2528a9483fc8a4001f4bdeab1dd7b3d1ccb9ae2e746a78013ef74043f0b2436f0ca49627af1768b7c791c669bd331fd18c16ef88ad0a29861db70f2f76f3e74fde5accb91b73573e31333333223693d6fbc786e740c085e4fc6e7bde0a3f54e9703f816c54f012d3b1f41ec4d253d9337af61e7f1f1383bd929421ac346e3d2771dfee0b60503b33938e7c83eb37af3b6bf66041a3519a2b4cb557b34e3b9afcf95524f9a011425a34d32e7b6e9f255291094930acae26e8f7a1e4e6bc405d0f88e919f354f3ba85356a34f1aba5f7da1fad88e2692f4129cc1fb80a2122b2d996c6ccf7f08d8248e511d92af9ce49039de728848a2dc74101f4e94a" - }, - { - "commit": "094be57c91787fc2033d5d97fae099f1a6ddb37ea48370f1a138f09524c767fdd3", - "features": "Plain", - "proof": "1319630b26d02363861ebdb15514086dc8b0772b4bb63ef9b828704e0ac348efada6747dd7a29848138d630c7b403e573c9cde04be5d25f2d344db4b010d6b890dd6c54cc0911c0cadc7a8a225b2ec3f2dcac88189a17aa62257e969eef9de9172009d8e864e413f1953998b28531e580d3ea495a512d320e8d4ff50e7495a6c283c6e544d16364d34272805893526f1e3b6fd176ef4adc5671b165cf28efcfb8d25c0dfcd018a2c5e65beeb9201f3983194e5a521c0844d05c700654dfaed1b9b39dae08cc9afab9cb891256bc0237ad2ce78da8b44586580f52dd346dcafde5e471917f16e4c4b51e966e1946f13e31771503c85bb0f1b41d1c7fcc953e70af55400638a35e7f5610f9f4c5b881a35060a693deaf46e1839c54a8f7d2c626b05acd3450b72ae8f2e0f8721bcbbd8562141d3fef851c6ac3c8069fa6389389bc4fcba5e4fb49709a3b63a59ba96a82827dfbd6f16de849ef95f3114593d207aff6e030152929fa220b0c3b54ca419cfcbffb7a0106dd3154e858878c7d8f38cadcc376c502bdc50292b494484936d0846fc3fac10910962bca4ddcca5c80b458fd7df15e9a6c2f39b516425a2190a97c9d0e2e2f105ee29905f36e3a648a135ebf387d0bb2a6b61d95b215319d6dc9ee8b4b2798810fb6e01c007041b288c2b39e805c9af86c88dd4a380b6a346b4a0e67bba6aaac5acc70088ac3297486b90cfe371d9464552747a2f7680f42d5629fb09bed835382d842234712c0574c5b4f256c226e77602429983e4def71541cff80ccf4cd3b761685c91463c8e1c7bf828699c688509282b85e752424df3da670b3cfacdea2f66cfb804fecdf8b7eb056e8917fdae78d83c011964e3d5a0748873f817d0abf4b04c20452733eac35c318b96e100a5ace0f54085bd24f968b8fc5b276e0d7b134f01db50b3d2771cdcf1423d44" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 4, - "version": 4, - "block_header_version": 2 - } + "fee": "8000000", + "id": "0436430c-2b02-624c-2032-570501212b00", + "off": "CkRYNMTRYXJonCcMMoSQZz8qlEXOyLnKGeS9dhyGDbk=", + "sigs": [ + { + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBvxgE9v6OVfVVa72Af++81ysw2Qz3CPjFZEesxjIoJ05g==", + "xs": "Ajh4zoRXJ/Ok7HbKPz20s4otBdY2uMNjIQi4V/7WPJbe" + } + ], + "sta": "I2", + "ver": "4:2" } } } @@ -721,58 +568,18 @@ pub trait OwnerRpc { "params": { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", "slate": { - "amount": "6000000000", - "fee": "8000000", - "height": "4", + "ver": "4:2", "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "4", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": null, - "participant_data": [ - { - "id": "0", - "message": "my message", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1d4c1358be398f801eb90d933774b5218fa7e769b11c4c640402253353656f75", - "part_sig": null, - "public_blind_excess": "034b4df2f0558b73ea72a1ca5c4ab20217c66bbe0829056fca7abe76888e9349ee", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - } - ], - "tx": { - "body": { - "inputs": [ - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "HeightLocked", - "fee": "8000000", - "lock_height": "4" - } - ], - "outputs": [ - { - "commit": "094be57c91787fc2033d5d97fae099f1a6ddb37ea48370f1a138f09524c767fdd3", - "features": "Plain", - "proof": "2a42e9e902b70ce44e1fccb14de87ee0a97100bddf12c6bead1b9c5f4eb60300f29c13094fa12ffeee238fb4532b18f6b61cf51b23c1c7e1ad2e41560dc27edc0a2b9e647a0b3e4e806fced5b65e61d0f1f5197d3e2285c632d359e27b6b9206b2caffea4f67e0c7a2812e7a22c134b98cf89bd43d9f28b8bec25cce037a0ac5b1ae8f667e54e1250813a5263004486b4465ad4e641ab2b535736ea26535a11013564f08f483b7dab1c2bcc3ee38eadf2f7850eff7e3459a4bbabf9f0cf6c50d0c0a4120565cd4a2ce3e354c11721cd695760a24c70e0d5a0dfc3c5dcd51dfad6de2c237a682f36dc0b271f21bb3655e5333016aaa42c2efa1446e5f3c0a79ec417c4d30f77556951cb0f05dbfafb82d9f95951a9ea241fda2a6388f73ace036b98acce079f0e4feebccc96290a86dcc89118a901210b245f2d114cf94396e4dbb461e82aa26a0581389707957968c7cdc466213bb1cd417db207ef40c05842ab67a01a9b96eb1430ebc26e795bb491258d326d5174ad549401059e41782121e506744af8af9d8e493644a87d613600888541cbbe538c625883f3eb4aa3102c5cfcc25de8e97af8927619ce6a731b3b8462d51d993066b935b0648d2344ad72e4fd70f347fbd81041042e5ea31cc7b2e3156a920b80ecba487b950ca32ca95fae85b759c936246ecf441a9fdd95e8fee932d6782cdec686064018c857efc47fb4b2a122600d5fdd79af2486f44df7e629184e1c573bc0a9b3feb40b190ef2861a1ab45e2ac2201b9cd42e495deea247269820ed32389a2810ad6c0f9a296d2a2d9c54089fed50b7f5ecfcd33ab9954360e1d7f5598c32128cfcf2a1d8bf14616818da8a5343bfa88f0eedf392e9d4ab1ace1b60324129cd4852c2e27813a9cf71a6ae6229a4fcecc1a756b3e664c5f50af333082616815a3bec8fc0b75b8e4e767d719" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 4, - "version": 4, - "block_header_version": 2 - } - }, - "participant_id": 0 + "sta": "S1", + "amt": "60000000000", + "fee": "7000000", + "sigs": [ + { + "xs": "AzrCFY+gB38IfeYMGdjkMXU7qltjtuFHfwWipucZDUWS", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP" + } + ] + } } } # "# @@ -790,12 +597,7 @@ pub trait OwnerRpc { ``` */ - fn tx_lock_outputs( - &self, - token: Token, - slate: VersionedSlate, - participant_id: usize, - ) -> Result<(), ErrorKind>; + fn tx_lock_outputs(&self, token: Token, slate: VersionedSlate) -> Result<(), ErrorKind>; /** Networked version of [Owner::finalize_tx](struct.Owner.html#method.finalize_tx). @@ -809,72 +611,23 @@ pub trait OwnerRpc { "id": 1, "params": { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", - "slate": { - "version_info": { - "version": 3, - "orig_version": 3, - "block_header_version": 2 - }, - "num_participants": 2, + "slate": + { + "ver": "4:2", "id": "0436430c-2b02-624c-2032-570501212b00", - "payment_proof": null, - "tx": { - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000", - "body": { - "inputs": [ - { - "features": "Coinbase", - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045" - }, - { - "features": "Coinbase", - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7" - } - ], - "outputs": [ - { - "features": "Plain", - "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", - "proof": "7ebcd2ed9bf5fb29854033ba3d0e720613bdf7dfacc586d2f6084c1cde0a2b72e955d4ce625916701dc7c347132f40d0f102a34e801d745ee54b49b765d08aae0bb801c60403e57cafade3b4b174e795b633ab9e402b5b1b6e1243fd10bbcf9368a75cb6a6c375c7bdf02da9e03b7f210df45d942e6fba2729cd512a372e6ed91a1b5c9c22831febea843e3f85adcf198f39ac9f7b73b70c60bfb474aa69878ea8d1d32fef30166b59caacaec3fd024de29a90f1587e08d2c36b3d5c560cabf658e212e0a40a4129b3e5c35557058def5551f4eb395759597ba808b3c34eac3bfb9716e4480d7931c5789c538463ec75be0eb807c894047fda6cbcd22682d3c6d3823cb330f090a2099e3510a3706b57d46c95224394d7f1c0a20d99cc314b8f1d9d02668e2e435f62e1194de0be6a1f50f72ed777ed51c8819f527a94918d1aa8df6461e98ed4c2b18210de50fbcf8c3df210bfe326d41f1dc0ad748cb0320ae28401c85ab4f7dcb99d88a052e95dc85b76d22b36cabd60e06ab84bb7e4ddfdab9c9730c8a986583237ed1ecbb323ee8e79b8cadca4b438b7c09531670b471dda6a2eb3e747916c88ce7d9d8e1b7f61660eeb9e5a13c60e4dfe89d1177d81d6f6570fda85158e646a15f1e8b9e977494dc19a339aab2e0e478670d80092d6ba37646e60714ef64eb4a3d37fe15f8f38b59114af34b235489eed3f69b7781c5fe496eb43ffe245c14bd740f745844a38cf0d904347aaa2b64f51add18822dac009d8b63fa3e4c9b1fa72187f9a4acba1ab315daa1b04c9a41f3be846ac420b37990e6c947a16cc9d5c0671b292bf77d7d8b8974d2ad3afae95ba7772c37432840f53a007f31e0195f3abdf100c4477723cc6c6d5da14894a73dfac342833731036487488fdade7b9d556c06f26173b6b67598d3769447ce2828d71dd45ac5af436c6b0" - }, - { - "features": "Plain", - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ], - "kernels": [ - { - "features": "Plain", - "fee": "7000000", - "lock_height": "0", - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - ] - } - }, - "amount": "60000000000", - "fee": "7000000", - "height": "5", - "lock_height": "0", - "ttl_cutoff_height": null, - "participant_data": [ + "sta": "S2", + "off": "pAUskgAAAAGmBSySAAAAAu1WT6tQt1/F6jLOBS/Jvr8=", + "sigs": [ { - "id": "0", - "public_blind_excess": "033ac2158fa0077f087de60c19d8e431753baa5b63b6e1477f05a2a6e7190d4592", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", - "part_sig": null, - "message": null, - "message_sig": null - }, - { - "id": "1", - "public_blind_excess": "024f9bc78c984c78d6e916d3a00746aa30fa1172124c8dbc0cbddcb7b486719bc7", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f", - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841ba9c6dd6185c2b819799700fa1a69201f96cc6dfb9ca205a0ef7c35fb81d57dac", - "message": null, - "message_sig": null + "xs": "Azu+KkGeounWgQqNZlUucJ0Xg8pQdZpE269j/HnAFkxM", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBs1/f5VJx8q5z119Yxw0e+2mzOEx7xQfVfpnlbed+IIdA==" + } + ], + "coms": [ + { + "c": "CZtIz7H4CiNH3ImBhEnmjnajxoF6UyqOnvK0pcz0NjhQ", + "p": "KXAc6uJiysd7ebhoyIOikuYebegZK4aO3NEwCwlz2ROWsVas5r1nNAKjA94Q3dil5rfxe6ZVeldKZyvQTMJzqwTtjiyoC6xIM0XA7IQ/UhgUzhMB7JrcOJVqErTZSKzOcSlaT1K83rihyfLWstpdcxJipenAJ275BN+e+NSAAUIM1Z91ovGuXHocfGufFA52E+Uu+eJJ8p+TQLfvuAaZ5GAWQyRhb5j9TN49tSSXyRnpUiL//qy35l3sp+NoqAznE8Gd59pTaXJiKO4zb1vUlFOMEsy//rG5v9X8iQbRxkJFtRbxA/qW2cVpdYN2UsHg+lgD18zxFH2Pkn422nF/eteUcdvhkvX1D4enn8P+Aw26VptjS5LSzzB5k8zlRWM68mOJfNfm6/Tcr7F20HNYvcONA+RaSd+pyMZRfNaNFn/79sO03g4t0hkJy61MRnuE5XAL5HOjmsWcZp18FVxLyrm4Am7qNDHHec0nfkki0rl0Lh9meMvoaew7W370Ey3bbN0Gzyfb6yi+crlJ+ol2EOSOOg14n9Lup1q8l7PcfgDlyLPSTkDG8kESrbcjUriaK+8FmTRTOOnnYgKjxG76Y3CVKyrKQarbrg6jJTGsr82rbdBm12nr9Qz088ClnS1fp5YAoge5QXxiP3atBejMz81AOPlEi8QPEnynwNNy5GB04zT+SfWpVuwAVvTaYB5q+A6xpsSVEFSGnmZbKW2MFPNEyi3F/dXfSjZSU2NloWFa2bQiFlx3v4/mWoNcjgxB4HABTrZu+MUlIE6ZCzo9ZjweQiIbSWiVw3ovDBvwXpEjVAnD/j2JqaedbHhgmrGKRjMRkR9x+je7c7FfzTgUPRQE/SzoEATcf/ic8RFdzAw1zhwb+ZQVhvuVl3DyYYzLcRin" } ] } @@ -887,74 +640,42 @@ pub trait OwnerRpc { "jsonrpc": "2.0", "id": 1, "result": { - "Ok": { - "amount": "60000000000", + "Ok": { + "coms": [ + { + "c": "CH3zIwTF1K6LKvC8MecAAZ1yKRDvh91O7DGXuAsgfjBF", + "f": 1 + }, + { + "c": "COHanm3E1ugIpxiy8RCpkd13XWXOWuQIpOHwAqSWGqnn", + "f": 1 + }, + { + "c": "CZtIz7H4CiNH3ImBhEnmjnajxoF6UyqOnvK0pcz0NjhQ", + "p": "KXAc6uJiysd7ebhoyIOikuYebegZK4aO3NEwCwlz2ROWsVas5r1nNAKjA94Q3dil5rfxe6ZVeldKZyvQTMJzqwTtjiyoC6xIM0XA7IQ/UhgUzhMB7JrcOJVqErTZSKzOcSlaT1K83rihyfLWstpdcxJipenAJ275BN+e+NSAAUIM1Z91ovGuXHocfGufFA52E+Uu+eJJ8p+TQLfvuAaZ5GAWQyRhb5j9TN49tSSXyRnpUiL//qy35l3sp+NoqAznE8Gd59pTaXJiKO4zb1vUlFOMEsy//rG5v9X8iQbRxkJFtRbxA/qW2cVpdYN2UsHg+lgD18zxFH2Pkn422nF/eteUcdvhkvX1D4enn8P+Aw26VptjS5LSzzB5k8zlRWM68mOJfNfm6/Tcr7F20HNYvcONA+RaSd+pyMZRfNaNFn/79sO03g4t0hkJy61MRnuE5XAL5HOjmsWcZp18FVxLyrm4Am7qNDHHec0nfkki0rl0Lh9meMvoaew7W370Ey3bbN0Gzyfb6yi+crlJ+ol2EOSOOg14n9Lup1q8l7PcfgDlyLPSTkDG8kESrbcjUriaK+8FmTRTOOnnYgKjxG76Y3CVKyrKQarbrg6jJTGsr82rbdBm12nr9Qz088ClnS1fp5YAoge5QXxiP3atBejMz81AOPlEi8QPEnynwNNy5GB04zT+SfWpVuwAVvTaYB5q+A6xpsSVEFSGnmZbKW2MFPNEyi3F/dXfSjZSU2NloWFa2bQiFlx3v4/mWoNcjgxB4HABTrZu+MUlIE6ZCzo9ZjweQiIbSWiVw3ovDBvwXpEjVAnD/j2JqaedbHhgmrGKRjMRkR9x+je7c7FfzTgUPRQE/SzoEATcf/ic8RFdzAw1zhwb+ZQVhvuVl3DyYYzLcRin" + }, + { + "c": "CBInbMeI5ocGEiltkmy6nw57mBBnBxC1pubxugBtOVd0", + "p": "KEufkZlBHGu/cifq4VzJ+n7TBTSvPs/4Ww0BbaMpyuHx7fefAUJkNMuQr8wvCh+yluXFGpG15XofAjD9pPjFlQ55hvo3m5nWS2A5qGzH414EC6GSt4EEOVmFEmjKmHSpGIBeqVjIT3/ujTq0Ji8DL1o/hA683Sc7Kb6BARTm6GqVnY5MCAVy4+8knt1q1oUD7DvESGVIUg6id1pBrqZ6rJmUX86eendp1x+JOtfw0BCGkva2hSMSyub5hXBjBVvaWdzlIZJ8cAQLgCakG2UXyuChyUfKJEmEpcCt98ZIOwk5NGxI9hysN9UB9GocWHi2fO4NByP07q3J9dce1enzO0KUtY0+vu/qoT8gNXWZvlSc4Y5uLrHVDhI1zMQOyRhMaKYjdBpyOM5pqjodJRVrO36zj91vvlRzl5/u4zF98nnGDUiiiYJqpMdtvOJNUmiQ1Obi+D6A9nShJI/B3AN9mCAJASrhEz9eFYrmza2xjI1T5KiuVZXHWHgsZ6oMIPFG1SCFz0WjV5TOxFcCgw+JUqaXRHGPvm/g09pm40jdNHOgrO1wgPv1SUw+fhQZFvOxNbMyd/mY/Nms+8qHCYFIZumDil3NpMKUIs8VcpPm/CzMLSVCNReEO9jiHGHO1yMSwLSIFMMSAhsNMVmNI4mwsym6oRaZIqTDQXPdX1QFRb5QZqDykfGocOGq/5TBnwqFUlSIKheYS67aCOjq1T0VY+nuS8NnQnic7086sVgFTX3f4qKze1qKML6E/335p9dYqbdnUaNiIFdyGj7FuHNYLQyRzR/rvBU2YnOYVOoVyZAwI8GTxrV2i1VIQQj4l83EfROpCIsyVY5X8S9YB2aGScmaF7UZBRJzQOi0nEJ3Xxs8qwct+tM9M8weS6WWTXKO0KkF" + } + ], "fee": "7000000", - "height": "5", "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "0", - "ttl_cutoff_height": null, - "num_participants": 2, - "payment_proof": null, - "participant_data": [ + "off": "dQ2/T9Q7f0z9aNJpilIvP/bmoArZiVsz8exGSTuDe0k=", + "sigs": [ { - "id": "0", - "message": null, - "message_sig": null, - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b38641aefa907a2fc1c051b1f73202794fffb6d422e328516a5c6b2ef41e935f8", - "public_blind_excess": "033ac2158fa0077f087de60c19d8e431753baa5b63b6e1477f05a2a6e7190d4592", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBs1/f5VJx8q5z119Yxw0e+2mzOEx7xQfVfpnlbed+IIdA==", + "xs": "Azu+KkGeounWgQqNZlUucJ0Xg8pQdZpE269j/HnAFkxM" }, { - "id": "1", - "message": null, - "message_sig": null, - "part_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841ba9c6dd6185c2b819799700fa1a69201f96cc6dfb9ca205a0ef7c35fb81d57dac", - "public_blind_excess": "024f9bc78c984c78d6e916d3a00746aa30fa1172124c8dbc0cbddcb7b486719bc7", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBva2TTaoX235HfE7tkK/tQNEReJbfjE9YYbYwmpSYeAdA==", + "xs": "AwFS0tcuLbp8YIatSaIZ2f8N/g/Zk9yuoi4FjCEAM86T" } ], - "tx": { - "body": { - "inputs": [ - { - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045", - "features": "Coinbase" - }, - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "09bac6083b05a32a9d9b37710c70dd0a1ef9329fde0848558976b6f1b81d80ceed", - "excess_sig": "66074d25a751c4743342c90ad8ead9454daa00d9b9aed29bca321036d16c4b4da0e9c180a26b88565afcd269a7ac98f896c8db3dcbd48ab69443e8eac3beb3a4", - "features": "Plain", - "fee": "7000000", - "lock_height": "0" - } - ], - "outputs": [ - { - "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", - "features": "Plain", - "proof": "7ebcd2ed9bf5fb29854033ba3d0e720613bdf7dfacc586d2f6084c1cde0a2b72e955d4ce625916701dc7c347132f40d0f102a34e801d745ee54b49b765d08aae0bb801c60403e57cafade3b4b174e795b633ab9e402b5b1b6e1243fd10bbcf9368a75cb6a6c375c7bdf02da9e03b7f210df45d942e6fba2729cd512a372e6ed91a1b5c9c22831febea843e3f85adcf198f39ac9f7b73b70c60bfb474aa69878ea8d1d32fef30166b59caacaec3fd024de29a90f1587e08d2c36b3d5c560cabf658e212e0a40a4129b3e5c35557058def5551f4eb395759597ba808b3c34eac3bfb9716e4480d7931c5789c538463ec75be0eb807c894047fda6cbcd22682d3c6d3823cb330f090a2099e3510a3706b57d46c95224394d7f1c0a20d99cc314b8f1d9d02668e2e435f62e1194de0be6a1f50f72ed777ed51c8819f527a94918d1aa8df6461e98ed4c2b18210de50fbcf8c3df210bfe326d41f1dc0ad748cb0320ae28401c85ab4f7dcb99d88a052e95dc85b76d22b36cabd60e06ab84bb7e4ddfdab9c9730c8a986583237ed1ecbb323ee8e79b8cadca4b438b7c09531670b471dda6a2eb3e747916c88ce7d9d8e1b7f61660eeb9e5a13c60e4dfe89d1177d81d6f6570fda85158e646a15f1e8b9e977494dc19a339aab2e0e478670d80092d6ba37646e60714ef64eb4a3d37fe15f8f38b59114af34b235489eed3f69b7781c5fe496eb43ffe245c14bd740f745844a38cf0d904347aaa2b64f51add18822dac009d8b63fa3e4c9b1fa72187f9a4acba1ab315daa1b04c9a41f3be846ac420b37990e6c947a16cc9d5c0671b292bf77d7d8b8974d2ad3afae95ba7772c37432840f53a007f31e0195f3abdf100c4477723cc6c6d5da14894a73dfac342833731036487488fdade7b9d556c06f26173b6b67598d3769447ce2828d71dd45ac5af436c6b0" - }, - { - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "features": "Plain", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" - }, - "version_info": { - "orig_version": 3, - "version": 3, - "block_header_version": 2 - } + "sta": "S3", + "ver": "4:2" } } } @@ -977,42 +698,43 @@ pub trait OwnerRpc { "method": "post_tx", "params": { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", - "tx": { - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000", - "body": { - "inputs": [ + "slate": { + "ver": "4:2", + "id": "0436430c-2b02-624c-2032-570501212b00", + "sta": "S3", + "fee": "7000000", + "off": "dQ2/T9Q7f0z9aNJpilIvP/bmoArZiVsz8exGSTuDe0k=", + "sigs": [ + { + "xs": "Azu+KkGeounWgQqNZlUucJ0Xg8pQdZpE269j/HnAFkxM", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBs1/f5VJx8q5z119Yxw0e+2mzOEx7xQfVfpnlbed+IIdA==" + }, + { + "xs": "AwFS0tcuLbp8YIatSaIZ2f8N/g/Zk9yuoi4FjCEAM86T", + "nonce": "AxuExVZ7EmRAmV0+1aq6BWXXHhg0YEgZ/5wX9enV3QeP", + "part": "jwfd1en1F5z/GUhgNBge12UFuqrVPl2ZQGQSe1bFhBva2TTaoX235HfE7tkK/tQNEReJbfjE9YYbYwmpSYeAdA==" + } + ], + "coms": [ { - "features": "Coinbase", - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045" + "f": 1, + "c": "CH3zIwTF1K6LKvC8MecAAZ1yKRDvh91O7DGXuAsgfjBF" }, { - "features": "Coinbase", - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7" - } - ], - "outputs": [ - { - "features": "Plain", - "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", - "proof": "7ebcd2ed9bf5fb29854033ba3d0e720613bdf7dfacc586d2f6084c1cde0a2b72e955d4ce625916701dc7c347132f40d0f102a34e801d745ee54b49b765d08aae0bb801c60403e57cafade3b4b174e795b633ab9e402b5b1b6e1243fd10bbcf9368a75cb6a6c375c7bdf02da9e03b7f210df45d942e6fba2729cd512a372e6ed91a1b5c9c22831febea843e3f85adcf198f39ac9f7b73b70c60bfb474aa69878ea8d1d32fef30166b59caacaec3fd024de29a90f1587e08d2c36b3d5c560cabf658e212e0a40a4129b3e5c35557058def5551f4eb395759597ba808b3c34eac3bfb9716e4480d7931c5789c538463ec75be0eb807c894047fda6cbcd22682d3c6d3823cb330f090a2099e3510a3706b57d46c95224394d7f1c0a20d99cc314b8f1d9d02668e2e435f62e1194de0be6a1f50f72ed777ed51c8819f527a94918d1aa8df6461e98ed4c2b18210de50fbcf8c3df210bfe326d41f1dc0ad748cb0320ae28401c85ab4f7dcb99d88a052e95dc85b76d22b36cabd60e06ab84bb7e4ddfdab9c9730c8a986583237ed1ecbb323ee8e79b8cadca4b438b7c09531670b471dda6a2eb3e747916c88ce7d9d8e1b7f61660eeb9e5a13c60e4dfe89d1177d81d6f6570fda85158e646a15f1e8b9e977494dc19a339aab2e0e478670d80092d6ba37646e60714ef64eb4a3d37fe15f8f38b59114af34b235489eed3f69b7781c5fe496eb43ffe245c14bd740f745844a38cf0d904347aaa2b64f51add18822dac009d8b63fa3e4c9b1fa72187f9a4acba1ab315daa1b04c9a41f3be846ac420b37990e6c947a16cc9d5c0671b292bf77d7d8b8974d2ad3afae95ba7772c37432840f53a007f31e0195f3abdf100c4477723cc6c6d5da14894a73dfac342833731036487488fdade7b9d556c06f26173b6b67598d3769447ce2828d71dd45ac5af436c6b0" + "f": 1, + "c": "COHanm3E1ugIpxiy8RCpkd13XWXOWuQIpOHwAqSWGqnn" }, { - "features": "Plain", - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "proof": "dcff6175390c602bfa92c2ffd1a9b2d84dcc9ea941f6f317bdd0f875244ef23e696fd17c71df79760ce5ce1a96aab1d15dd057358dc835e972febeb86d50ccec0dad7cfe0246d742eb753cf7b88c045d15bc7123f8cf7155647ccf663fca92a83c9a65d0ed756ea7ebffd2cac90c380a102ed9caaa355d175ed0bf58d3ac2f5e909d6c447dfc6b605e04925c2b17c33ebd1908c965a5541ea5d2ed45a0958e6402f89d7a56df1992e036d836e74017e73ccad5cb3a82b8e139e309792a31b15f3ffd72ed033253428c156c2b9799458a25c1da65b719780a22de7fe7f437ae2fccd22cf7ea357ab5aa66a5ef7d71fb0dc64aa0b5761f68278062bb39bb296c787e4cabc5e2a2933a416ce1c9a9696160386449c437e9120f7bb26e5b0e74d1f2e7d5bcd7aafb2a92b87d1548f1f911fb06af7bd6cc13cee29f7c9cb79021aed18186272af0e9d189ec107c81a8a3aeb4782b0d950e4881aa51b776bb6844b25bce97035b48a9bdb2aea3608687bcdd479d4fa998b5a839ff88558e4a29dff0ed13b55900abb5d439b70793d902ae9ad34587b18c919f6b875c91d14deeb1c373f5e76570d59a6549758f655f1128a54f162dfe8868e1587028e26ad91e528c5ae7ee9335fa58fb59022b5de29d80f0764a9917390d46db899acc6a5b416e25ecc9dccb7153646addcc81cadb5f0078febc7e05d7735aba494f39ef05697bbcc9b47b2ccc79595d75fc13c80678b5e237edce58d731f34c05b1ddcaa649acf2d865bbbc3ceda10508bcdd29d0496744644bf1c3516f6687dfeef5649c7dff90627d642739a59d91a8d1d0c4dc55d74a949e1074427664b467992c9e0f7d3af9d6ea79513e8946ddc0d356bac49878e64e6a95b0a30214214faf2ce317fa622ff3266b32a816e10a18e6d789a5da1f23e67b4f970a68a7bcd9e18825ee274b0483896a40" - } - ], - "kernels": [ + "c": "CZtIz7H4CiNH3ImBhEnmjnajxoF6UyqOnvK0pcz0NjhQ", + "p": "KXAc6uJiysd7ebhoyIOikuYebegZK4aO3NEwCwlz2ROWsVas5r1nNAKjA94Q3dil5rfxe6ZVeldKZyvQTMJzqwTtjiyoC6xIM0XA7IQ/UhgUzhMB7JrcOJVqErTZSKzOcSlaT1K83rihyfLWstpdcxJipenAJ275BN+e+NSAAUIM1Z91ovGuXHocfGufFA52E+Uu+eJJ8p+TQLfvuAaZ5GAWQyRhb5j9TN49tSSXyRnpUiL//qy35l3sp+NoqAznE8Gd59pTaXJiKO4zb1vUlFOMEsy//rG5v9X8iQbRxkJFtRbxA/qW2cVpdYN2UsHg+lgD18zxFH2Pkn422nF/eteUcdvhkvX1D4enn8P+Aw26VptjS5LSzzB5k8zlRWM68mOJfNfm6/Tcr7F20HNYvcONA+RaSd+pyMZRfNaNFn/79sO03g4t0hkJy61MRnuE5XAL5HOjmsWcZp18FVxLyrm4Am7qNDHHec0nfkki0rl0Lh9meMvoaew7W370Ey3bbN0Gzyfb6yi+crlJ+ol2EOSOOg14n9Lup1q8l7PcfgDlyLPSTkDG8kESrbcjUriaK+8FmTRTOOnnYgKjxG76Y3CVKyrKQarbrg6jJTGsr82rbdBm12nr9Qz088ClnS1fp5YAoge5QXxiP3atBejMz81AOPlEi8QPEnynwNNy5GB04zT+SfWpVuwAVvTaYB5q+A6xpsSVEFSGnmZbKW2MFPNEyi3F/dXfSjZSU2NloWFa2bQiFlx3v4/mWoNcjgxB4HABTrZu+MUlIE6ZCzo9ZjweQiIbSWiVw3ovDBvwXpEjVAnD/j2JqaedbHhgmrGKRjMRkR9x+je7c7FfzTgUPRQE/SzoEATcf/ic8RFdzAw1zhwb+ZQVhvuVl3DyYYzLcRin" + }, { - "features": "Plain", - "fee": "7000000", - "lock_height": "0", - "excess": "09bac6083b05a32a9d9b37710c70dd0a1ef9329fde0848558976b6f1b81d80ceed", - "excess_sig": "66074d25a751c4743342c90ad8ead9454daa00d9b9aed29bca321036d16c4b4da0e9c180a26b88565afcd269a7ac98f896c8db3dcbd48ab69443e8eac3beb3a4" + "c": "CBInbMeI5ocGEiltkmy6nw57mBBnBxC1pubxugBtOVd0", + "p": "KEufkZlBHGu/cifq4VzJ+n7TBTSvPs/4Ww0BbaMpyuHx7fefAUJkNMuQr8wvCh+yluXFGpG15XofAjD9pPjFlQ55hvo3m5nWS2A5qGzH414EC6GSt4EEOVmFEmjKmHSpGIBeqVjIT3/ujTq0Ji8DL1o/hA683Sc7Kb6BARTm6GqVnY5MCAVy4+8knt1q1oUD7DvESGVIUg6id1pBrqZ6rJmUX86eendp1x+JOtfw0BCGkva2hSMSyub5hXBjBVvaWdzlIZJ8cAQLgCakG2UXyuChyUfKJEmEpcCt98ZIOwk5NGxI9hysN9UB9GocWHi2fO4NByP07q3J9dce1enzO0KUtY0+vu/qoT8gNXWZvlSc4Y5uLrHVDhI1zMQOyRhMaKYjdBpyOM5pqjodJRVrO36zj91vvlRzl5/u4zF98nnGDUiiiYJqpMdtvOJNUmiQ1Obi+D6A9nShJI/B3AN9mCAJASrhEz9eFYrmza2xjI1T5KiuVZXHWHgsZ6oMIPFG1SCFz0WjV5TOxFcCgw+JUqaXRHGPvm/g09pm40jdNHOgrO1wgPv1SUw+fhQZFvOxNbMyd/mY/Nms+8qHCYFIZumDil3NpMKUIs8VcpPm/CzMLSVCNReEO9jiHGHO1yMSwLSIFMMSAhsNMVmNI4mwsym6oRaZIqTDQXPdX1QFRb5QZqDykfGocOGq/5TBnwqFUlSIKheYS67aCOjq1T0VY+nuS8NnQnic7086sVgFTX3f4qKze1qKML6E/335p9dYqbdnUaNiIFdyGj7FuHNYLQyRzR/rvBU2YnOYVOoVyZAwI8GTxrV2i1VIQQj4l83EfROpCIsyVY5X8S9YB2aGScmaF7UZBRJzQOi0nEJ3Xxs8qwct+tM9M8weS6WWTXKO0KkF" } ] - } - }, + }, "fluff": false } } @@ -1031,7 +753,7 @@ pub trait OwnerRpc { ``` */ - fn post_tx(&self, token: Token, tx: TransactionV4, fluff: bool) -> Result<(), ErrorKind>; + fn post_tx(&self, token: Token, slate: VersionedSlate, fluff: bool) -> Result<(), ErrorKind>; /** Networked version of [Owner::cancel_tx](struct.Owner.html#method.cancel_tx). @@ -1083,39 +805,7 @@ pub trait OwnerRpc { "id": 1, "params": { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", - "tx": { - "amount_credited": "59993000000", - "amount_debited": "120000000000", - "confirmation_ts": "2019-01-15T16:01:26Z", - "confirmed": false, - "creation_ts": "2019-01-15T16:01:26Z", - "fee": "7000000", - "id": 5, - "messages": { - "messages": [ - { - "id": "0", - "message": null, - "message_sig": null, - "public_key": "033ac2158fa0077f087de60c19d8e431753baa5b63b6e1477f05a2a6e7190d4592" - }, - { - "id": "1", - "message": null, - "message_sig": null, - "public_key": "024f9bc78c984c78d6e916d3a00746aa30fa1172124c8dbc0cbddcb7b486719bc7" - } - ] - }, - "num_inputs": 2, - "num_outputs": 1, - "parent_key_id": "0200000000000000000000000000000000", - "stored_tx": "0436430c-2b02-624c-2032-570501212b00.grintx", - "tx_slate_id": "0436430c-2b02-624c-2032-570501212b00", - "tx_type": "TxSent", - "kernel_excess": null, - "kernel_lookup_min_height": null - } + "id": "0436430c-2b02-624c-2032-570501212b00" } } # "# @@ -1127,23 +817,16 @@ pub trait OwnerRpc { "result": { "Ok": { "body": { - "inputs": [ - { - "commit": "087df32304c5d4ae8b2af0bc31e700019d722910ef87dd4eec3197b80b207e3045", - "features": "Coinbase" - }, - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], + "inputs": [], "kernels": [ { "excess": "000000000000000000000000000000000000000000000000000000000000000000", "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "Plain", - "fee": "7000000", - "lock_height": "0" + "features": { + "Plain": { + "fee": 7000000 + } + } } ], "outputs": [ @@ -1151,15 +834,10 @@ pub trait OwnerRpc { "commit": "099b48cfb1f80a2347dc89818449e68e76a3c6817a532a8e9ef2b4a5ccf4363850", "features": "Plain", "proof": "29701ceae262cac77b79b868c883a292e61e6de8192b868edcd1300b0973d91396b156ace6bd673402a303de10ddd8a5e6b7f17ba6557a574a672bd04cc273ab04ed8e2ca80bac483345c0ec843f521814ce1301ec9adc38956a12b4d948acce71295a4f52bcdeb8a1c9f2d6b2da5d731262a5e9c0276ef904df9ef8d48001420cd59f75a2f1ae5c7a1c7c6b9f140e7613e52ef9e249f29f9340b7efb80699e460164324616f98fd4cde3db52497c919e95222fffeacb7e65deca7e368a80ce713c19de7da5369726228ee336f5bd494538c12ccbffeb1b9bfd5fc8906d1c64245b516f103fa96d9c56975837652c1e0fa5803d7ccf1147d8f927e36da717f7ad79471dbe192f5f50f87a79fc3fe030dba569b634b92d2cf307993cce545633af263897cd7e6ebf4dcafb176d07358bdc38d03e45a49dfa9c8c6517cd68d167ffbf6c3b4de0e2dd21909cbad4c467b84e5700be473a39ac59c669d7c155c4bcab9b8026eea3431c779cd277e4922d2b9742e1f6678cbe869ec3b5b7ef4132ddb6cdd06cf27dbeb28be72b949fa897610e48e3a0d789fd2eea75abc97b3dc7e00e5c8b3d24e40c6f24112adb72352b89a2bef0599345338e9e76202a3c46efa6370952b2aca41aadbae0ea32531acafcdab6dd066d769ebf50cf4f3c0a59d2d5fa79600a207b9417c623f76ad05e8cccfcd4038f9448bc40f127ca7c0d372e46074e334fe49f5a956ec0056f4da601e6af80eb1a6c4951054869e665b296d8c14f344ca2dc5fdd5df4a3652536365a1615ad9b422165c77bf8fe65a835c8e0c41e070014eb66ef8c525204e990b3a3d663c1e42221b496895c37a2f0c1bf05e91235409c3fe3d89a9a79d6c78609ab18a463311911f71fa37bb73b15fcd38143d1404fd2ce81004dc7ff89cf1115dcc0c35ce1c1bf9941586fb959770f2618ccb7118a7" - }, - { - "commit": "0812276cc788e6870612296d926cba9f0e7b9810670710b5a6e6f1ba006d395774", - "features": "Plain", - "proof": "284b9f9199411c6bbf7227eae15cc9fa7ed30534af3ecff85b0d016da329cae1f1edf79f01426434cb90afcc2f0a1fb296e5c51a91b5e57a1f0230fda4f8c5950e7986fa379b99d64b6039a86cc7e35e040ba192b781043959851268ca9874a918805ea958c84f7fee8d3ab4262f032f5a3f840ebcdd273b29be810114e6e86a959d8e4c080572e3ef249edd6ad68503ec3bc4486548520ea2775a41aea67aac99945fce9e7a7769d71f893ad7f0d0108692f6b6852312cae6f9857063055bda59dce521927c70040b8026a41b6517cae0a1c947ca244984a5c0adf7c6483b0939346c48f61cac37d501f46a1c5878b67cee0d0723f4eeadc9f5d71ed5e9f33b4294b58d3ebeefeaa13f20357599be549ce18e6e2eb1d50e1235ccc40ec9184c68a623741a7238ce69aa3a1d25156b3b7eb38fdd6fbe5473979feee3317df279c60d48a289826aa4c76dbce24d526890d4e6e2f83e80f674a1248fc1dc037d982009012ae1133f5e158ae6cdadb18c8d53e4a8ae5595c758782c67aa0c20f146d52085cf45a35794cec45702830f8952a69744718fbe6fe0d3da66e348dd3473a0aced7080fbf5494c3e7e141916f3b135b33277f998fcd9acfbca8709814866e9838a5dcda4c29422cf157293e6fc2ccc2d25423517843bd8e21c61ced72312c0b48814c312021b0d31598d2389b0b329baa1169922a4c34173dd5f540545be5066a0f291f1a870e1aaff94c19f0a855254882a17984baeda08e8ead53d1563e9ee4bc36742789cef4f3ab158054d7ddfe2a2b37b5a8a30be84ff7df9a7d758a9b76751a3622057721a3ec5b873582d0c91cd1febbc153662739854ea15c9903023c193c6b5768b55484108f897cdc47d13a9088b32558e57f12f5807668649c99a17b51905127340e8b49c42775f1b3cab072dfad33d33cc1e4ba5964d728ed0a905" } ] }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000" + "offset": "0000000000000000000000000000000000000000000000000000000000000000" } } } @@ -1167,93 +845,7 @@ pub trait OwnerRpc { # , 5, true, true, false, false); ``` */ - fn get_stored_tx( - &self, - token: Token, - tx: &TxLogEntry, - ) -> Result, ErrorKind>; - - /** - Networked version of [Owner::verify_slate_messages](struct.Owner.html#method.verify_slate_messages). - - ``` - # grin_wallet_api::doctest_helper_json_rpc_owner_assert_response!( - # r#" - { - "jsonrpc": "2.0", - "method": "verify_slate_messages", - "id": 1, - "params": { - "token": "d202964900000000d302964900000000d402964900000000d502964900000000", - "slate": { - "amount": "6000000000", - "fee": "8000000", - "height": "4", - "id": "0436430c-2b02-624c-2032-570501212b00", - "lock_height": "4", - "ttl_cutoff_height": null, - "num_participants": 2, - "participant_data": [ - { - "id": "0", - "message": "my message", - "message_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841b1d4c1358be398f801eb90d933774b5218fa7e769b11c4c640402253353656f75", - "part_sig": null, - "public_blind_excess": "034b4df2f0558b73ea72a1ca5c4ab20217c66bbe0829056fca7abe76888e9349ee", - "public_nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f" - } - ], - "tx": { - "body": { - "inputs": [ - { - "commit": "08e1da9e6dc4d6e808a718b2f110a991dd775d65ce5ae408a4e1f002a4961aa9e7", - "features": "Coinbase" - } - ], - "kernels": [ - { - "excess": "000000000000000000000000000000000000000000000000000000000000000000", - "excess_sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "features": "HeightLocked", - "fee": "8000000", - "lock_height": "4" - } - ], - "outputs": [ - { - "commit": "094be57c91787fc2033d5d97fae099f1a6ddb37ea48370f1a138f09524c767fdd3", - "features": "Plain", - "proof": "2a42e9e902b70ce44e1fccb14de87ee0a97100bddf12c6bead1b9c5f4eb60300f29c13094fa12ffeee238fb4532b18f6b61cf51b23c1c7e1ad2e41560dc27edc0a2b9e647a0b3e4e806fced5b65e61d0f1f5197d3e2285c632d359e27b6b9206b2caffea4f67e0c7a2812e7a22c134b98cf89bd43d9f28b8bec25cce037a0ac5b1ae8f667e54e1250813a5263004486b4465ad4e641ab2b535736ea26535a11013564f08f483b7dab1c2bcc3ee38eadf2f7850eff7e3459a4bbabf9f0cf6c50d0c0a4120565cd4a2ce3e354c11721cd695760a24c70e0d5a0dfc3c5dcd51dfad6de2c237a682f36dc0b271f21bb3655e5333016aaa42c2efa1446e5f3c0a79ec417c4d30f77556951cb0f05dbfafb82d9f95951a9ea241fda2a6388f73ace036b98acce079f0e4feebccc96290a86dcc89118a901210b245f2d114cf94396e4dbb461e82aa26a0581389707957968c7cdc466213bb1cd417db207ef40c05842ab67a01a9b96eb1430ebc26e795bb491258d326d5174ad549401059e41782121e506744af8af9d8e493644a87d613600888541cbbe538c625883f3eb4aa3102c5cfcc25de8e97af8927619ce6a731b3b8462d51d993066b935b0648d2344ad72e4fd70f347fbd81041042e5ea31cc7b2e3156a920b80ecba487b950ca32ca95fae85b759c936246ecf441a9fdd95e8fee932d6782cdec686064018c857efc47fb4b2a122600d5fdd79af2486f44df7e629184e1c573bc0a9b3feb40b190ef2861a1ab45e2ac2201b9cd42e495deea247269820ed32389a2810ad6c0f9a296d2a2d9c54089fed50b7f5ecfcd33ab9954360e1d7f5598c32128cfcf2a1d8bf14616818da8a5343bfa88f0eedf392e9d4ab1ace1b60324129cd4852c2e27813a9cf71a6ae6229a4fcecc1a756b3e664c5f50af333082616815a3bec8fc0b75b8e4e767d719" - } - ] - }, - "offset": "d202964900000000d302964900000000d402964900000000d502964900000000", - "payment_proof": null - }, - "version_info": { - "orig_version": 3, - "version": 3, - "block_header_version": 2 - } - } - } - } - # "# - # , - # r#" - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "Ok": null - } - } - # "# - # , 0 ,false, false, false, false); - ``` - */ - fn verify_slate_messages(&self, token: Token, slate: VersionedSlate) -> Result<(), ErrorKind>; + fn get_stored_tx(&self, token: Token, id: Uuid) -> Result, ErrorKind>; /** Networked version of [Owner::scan](struct.Owner.html#method.scan). @@ -1886,11 +1478,11 @@ pub trait OwnerRpc { "result": { "Ok": { "amount": "60000000000", - "excess": "09bac6083b05a32a9d9b37710c70dd0a1ef9329fde0848558976b6f1b81d80ceed", + "excess": "091f151170bfac881479bfb56c7012c52cd4ce4198ad661586374dd499925922fb", "recipient_address": "pa7wkkdgs5bkteha7lykl7ff2wztgdrxxo442xdcq2lnaphe5aidd4id", - "recipient_sig": "42b6f2bbcee432185993867d1a338e260454ead536bf728f4dcc8f535508715e92a0695486ba3c9945d8ecb2cf7f703a955780253b12d0048f02d318c8f08702", + "recipient_sig": "b9b1885a3f33297df32e1aa4db23220bd305da8ed92ff6873faf3ab2c116fea25e9d0e34bd4f567f022b88a37400821ffbcaec71c9a8c3a327c4626611886d0d", "sender_address": "glg5mojiqvhywjriwhooiytn3tptlvlmw7h567lezssyek3y2tjzznad", - "sender_sig": "5e3f5596852e83f6db7152fc51c41b4ed8742eb8045fa85a6965c52d09fcb46ba67d4f86660c9f3dc55ab84faea79d11c3831aa77934f7e90695e63d523f8604" + "sender_sig": "611b92331e395c3d29871ac35b1fce78ec595e28ccbe8cc55452da40775e8e46d35a2e84eaffd986935da3275e34d46a8d777d02dabcf4339704c2a621da9700" } } } @@ -1919,11 +1511,11 @@ pub trait OwnerRpc { "token": "d202964900000000d302964900000000d402964900000000d502964900000000", "proof": { "amount": "60000000000", - "excess": "09bac6083b05a32a9d9b37710c70dd0a1ef9329fde0848558976b6f1b81d80ceed", + "excess": "091f151170bfac881479bfb56c7012c52cd4ce4198ad661586374dd499925922fb", "recipient_address": "pa7wkkdgs5bkteha7lykl7ff2wztgdrxxo442xdcq2lnaphe5aidd4id", - "recipient_sig": "42b6f2bbcee432185993867d1a338e260454ead536bf728f4dcc8f535508715e92a0695486ba3c9945d8ecb2cf7f703a955780253b12d0048f02d318c8f08702", + "recipient_sig": "b9b1885a3f33297df32e1aa4db23220bd305da8ed92ff6873faf3ab2c116fea25e9d0e34bd4f567f022b88a37400821ffbcaec71c9a8c3a327c4626611886d0d", "sender_address": "glg5mojiqvhywjriwhooiytn3tptlvlmw7h567lezssyek3y2tjzznad", - "sender_sig": "5e3f5596852e83f6db7152fc51c41b4ed8742eb8045fa85a6965c52d09fcb46ba67d4f86660c9f3dc55ab84faea79d11c3831aa77934f7e90695e63d523f8604" + "sender_sig": "611b92331e395c3d29871ac35b1fce78ec595e28ccbe8cc55452da40775e8e46d35a2e84eaffd986935da3275e34d46a8d777d02dabcf4339704c2a621da9700" } }, "id": 1 @@ -2105,17 +1697,11 @@ where Ok(VersionedSlate::into_version(out_slate, version).map_err(|e| e.kind())?) } - fn tx_lock_outputs( - &self, - token: Token, - in_slate: VersionedSlate, - participant_id: usize, - ) -> Result<(), ErrorKind> { + fn tx_lock_outputs(&self, token: Token, in_slate: VersionedSlate) -> Result<(), ErrorKind> { Owner::tx_lock_outputs( self, (&token.keychain_mask).as_ref(), &Slate::from(in_slate), - participant_id, ) .map_err(|e| e.kind()) } @@ -2130,31 +1716,20 @@ where .map_err(|e| e.kind()) } - fn get_stored_tx( - &self, - token: Token, - tx: &TxLogEntry, - ) -> Result, ErrorKind> { - Owner::get_stored_tx(self, (&token.keychain_mask).as_ref(), tx) - .map(|x| x.map(TransactionV4::from)) - .map_err(|e| e.kind()) + fn get_stored_tx(&self, token: Token, uuid: Uuid) -> Result, ErrorKind> { + Owner::get_stored_tx(self, (&token.keychain_mask).as_ref(), uuid).map_err(|e| e.kind()) } - fn post_tx(&self, token: Token, tx: TransactionV4, fluff: bool) -> Result<(), ErrorKind> { + fn post_tx(&self, token: Token, slate: VersionedSlate, fluff: bool) -> Result<(), ErrorKind> { Owner::post_tx( self, (&token.keychain_mask).as_ref(), - &Transaction::from(tx), + &Slate::from(slate), fluff, ) .map_err(|e| e.kind()) } - fn verify_slate_messages(&self, token: Token, slate: VersionedSlate) -> Result<(), ErrorKind> { - Owner::verify_slate_messages(self, (&token.keychain_mask).as_ref(), &Slate::from(slate)) - .map_err(|e| e.kind()) - } - fn scan( &self, token: Token, @@ -2408,7 +1983,7 @@ pub fn run_doctest_owner( mask1.clone(), ); - let mut slate_outer = Slate::blank(2); + let mut slate_outer = Slate::blank(2, false); let rec_phrase_2 = util::ZeroingString::from( "hour kingdom ripple lunch razor inquiry coyote clay stamp mean \ @@ -2501,25 +2076,19 @@ pub fn run_doctest_owner( { let mut w_lock = wallet2.lock(); let w2 = w_lock.lc_provider().unwrap().wallet_inst().unwrap(); - slate = api_impl::foreign::receive_tx( - &mut **w2, - (&mask2).as_ref(), - &slate, - None, - None, - true, - ) - .unwrap(); + slate = api_impl::foreign::receive_tx(&mut **w2, (&mask2).as_ref(), &slate, None, true) + .unwrap(); w2.close().unwrap(); } // Spit out slate for input to finalize_tx if lock_tx { - api_impl::owner::tx_lock_outputs(&mut **w, (&mask2).as_ref(), &slate, 0).unwrap(); + println!("LOCKING TX"); + api_impl::owner::tx_lock_outputs(&mut **w, (&mask1).as_ref(), &slate).unwrap(); } println!("RECEIPIENT SLATE"); println!("{}", serde_json::to_string_pretty(&slate).unwrap()); if finalize_tx { - slate = api_impl::owner::finalize_tx(&mut **w, (&mask2).as_ref(), &slate).unwrap(); + slate = api_impl::owner::finalize_tx(&mut **w, (&mask1).as_ref(), &slate).unwrap(); error!("FINALIZED TX SLATE"); println!("{}", serde_json::to_string_pretty(&slate).unwrap()); } diff --git a/controller/src/command.rs b/controller/src/command.rs index ab476b616..08887bdc8 100644 --- a/controller/src/command.rs +++ b/controller/src/command.rs @@ -20,10 +20,11 @@ use crate::config::{TorConfig, WalletConfig, WALLET_CONFIG_FILE_NAME}; use crate::core::{core, global}; use crate::error::{Error, ErrorKind}; use crate::impls::{create_sender, KeybaseAllChannels, SlateGetter as _, SlateReceiver as _}; -use crate::impls::{PathToSlate, SlatePutter}; +use crate::impls::{HttpSlateSender, PathToSlate, SlatePutter}; use crate::keychain; use crate::libwallet::{ - self, InitTxArgs, IssueInvoiceTxArgs, NodeClient, PaymentProof, WalletLCProvider, + self, InitTxArgs, IssueInvoiceTxArgs, NodeClient, PaymentProof, Slate, SlateVersion, + WalletLCProvider, }; use crate::util::secp::key::SecretKey; use crate::util::{Mutex, ZeroingString}; @@ -266,7 +267,6 @@ where /// Arguments for the send command pub struct SendArgs { pub amount: u64, - pub message: Option, pub minimum_confirmations: u64, pub selection_strategy: String, pub estimate_selection_strategies: bool, @@ -278,6 +278,8 @@ pub struct SendArgs { pub target_slate_version: Option, pub payment_proof_address: Option, pub ttl_blocks: Option, + //TODO: Remove HF3 + pub output_v4_slate: bool, } pub fn send( @@ -293,6 +295,60 @@ where K: keychain::Keychain + 'static, { let wallet_inst = owner_api.wallet_inst.clone(); + // Check other version, and if it only supports 3 set the target slate + // version to 3 to avoid removing the transaction object + // TODO: This block is temporary, for the period between the release of v4.0.0 and HF3, + // after which this should be removable + let mut args = args; + { + let invalid = || { + ErrorKind::GenericError(format!( + "Invalid wallet comm type and destination. method: {}, dest: {}", + args.method, args.dest + )) + }; + let trailing = match args.dest.ends_with('/') { + true => "", + false => "/", + }; + let url_str = format!("{}{}v2/foreign", args.dest, trailing); + match args.method.as_ref() { + "http" => { + let v_sender = HttpSlateSender::new(&args.dest).map_err(|_| invalid())?; + let other_version = v_sender.check_other_version(&url_str)?; + if other_version == SlateVersion::V3 { + args.target_slate_version = Some(3); + } + } + "tor" => { + let v_sender = HttpSlateSender::with_socks_proxy( + &args.dest, + &tor_config.as_ref().unwrap().socks_proxy_addr, + &tor_config.as_ref().unwrap().send_config_dir, + ) + .map_err(|_| invalid())?; + let other_version = v_sender.check_other_version(&url_str)?; + if other_version == SlateVersion::V3 { + args.target_slate_version = Some(3); + } + } + "file" => { + // For files spit out a V3 Slate if we're before HF3, + // Or V4 slate otherwise + let cur_height = { + libwallet::wallet_lock!(wallet_inst, w); + w.w2n_client().get_chain_tip()?.0 + }; + // TODO: Floonet HF4 + if cur_height < 786240 && !args.output_v4_slate { + args.target_slate_version = Some(3); + } + } + _ => {} + } + } + // end block to delete post HF3 + controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { if args.estimate_selection_strategies { let strategies = vec!["smallest", "all"] @@ -321,7 +377,6 @@ where max_outputs: args.max_outputs as u32, num_change_outputs: args.change_outputs as u32, selection_strategy_is_use_all: args.selection_strategy == "all", - message: args.message.clone(), target_slate_version: args.target_slate_version, payment_proof_recipient_address: args.payment_proof_address.clone(), ttl_blocks: args.ttl_blocks, @@ -347,34 +402,35 @@ where match args.method.as_str() { "file" => { - PathToSlate((&args.dest).into()).put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + PathToSlate((&args.dest).into()).put_tx(&slate, false)?; + api.tx_lock_outputs(m, &slate)?; + return Ok(()); + } + "binfile" => { + PathToSlate((&args.dest).into()).put_tx(&slate, true)?; + api.tx_lock_outputs(m, &slate)?; return Ok(()); } "self" => { - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; let km = match keychain_mask.as_ref() { None => None, Some(&m) => Some(m.to_owned()), }; controller::foreign_single_use(wallet_inst, km, |api| { - slate = api.receive_tx(&slate, Some(&args.dest), None)?; + slate = api.receive_tx(&slate, Some(&args.dest))?; Ok(()) })?; } method => { let sender = create_sender(method, &args.dest, tor_config)?; slate = sender.send_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; } } - api.verify_slate_messages(m, &slate).map_err(|e| { - error!("Error validating participant messages: {}", e); - e - })?; slate = api.finalize_tx(m, &slate)?; - let result = api.post_tx(m, slate.tx_or_err()?, args.fluff); + let result = api.post_tx(m, &slate, args.fluff); match result { Ok(_) => { info!("Tx sent ok",); @@ -394,7 +450,6 @@ where /// Receive command argument pub struct ReceiveArgs { pub input: String, - pub message: Option, } pub fn receive( @@ -408,20 +463,16 @@ where C: NodeClient + 'static, K: keychain::Keychain + 'static, { - let mut slate = PathToSlate((&args.input).into()).get_tx()?; + let (mut slate, was_bin) = PathToSlate((&args.input).into()).get_tx()?; let km = match keychain_mask.as_ref() { None => None, Some(&m) => Some(m.to_owned()), }; controller::foreign_single_use(owner_api.wallet_inst.clone(), km, |api| { - if let Err(e) = api.verify_slate_messages(&slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } - slate = api.receive_tx(&slate, Some(&g_args.account), args.message.clone())?; + slate = api.receive_tx(&slate, Some(&g_args.account))?; Ok(()) })?; - PathToSlate(format!("{}.response", args.input).into()).put_tx(&slate)?; + PathToSlate(format!("{}.response", args.input).into()).put_tx(&slate, was_bin)?; info!( "Response file {}.response generated, and can be sent back to the transaction originator.", args.input @@ -447,25 +498,18 @@ where C: NodeClient + 'static, K: keychain::Keychain + 'static, { - let mut slate = PathToSlate((&args.input).into()).get_tx()?; + let (mut slate, was_bin) = PathToSlate((&args.input).into()).get_tx()?; // Rather than duplicating the entire command, we'll just // try to determine what kind of finalization this is // based on the slate contents // for now, we can tell this is an invoice transaction // if the receipient (participant 1) hasn't completed sigs - let part_data = slate.participant_with_id(1); - let is_invoice = { - match part_data { - None => { - error!("Expected slate participant data missing"); - return Err(ErrorKind::ArgumentError( - "Expected Slate participant data missing".into(), - ))?; - } - Some(p) => !p.is_complete(), - } - }; + let mut is_invoice = false; + controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { + is_invoice = api.context_is_invoice(m, &slate)?; + Ok(()) + })?; if is_invoice { let km = match keychain_mask.as_ref() { @@ -473,19 +517,11 @@ where Some(&m) => Some(m.to_owned()), }; controller::foreign_single_use(owner_api.wallet_inst.clone(), km, |api| { - if let Err(e) = api.verify_slate_messages(&slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } slate = api.finalize_invoice_tx(&slate)?; Ok(()) })?; } else { controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { - if let Err(e) = api.verify_slate_messages(m, &slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } slate = api.finalize_tx(m, &slate)?; Ok(()) })?; @@ -493,7 +529,7 @@ where if !args.nopost { controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { - let result = api.post_tx(m, slate.tx_or_err()?, args.fluff); + let result = api.post_tx(m, &slate, args.fluff); match result { Ok(_) => { info!( @@ -510,7 +546,7 @@ where } if args.dest.is_some() { - PathToSlate((&args.dest.unwrap()).into()).put_tx(&slate)?; + PathToSlate((&args.dest.unwrap()).into()).put_tx(&slate, was_bin)?; } Ok(()) @@ -522,6 +558,11 @@ pub struct IssueInvoiceArgs { pub dest: String, /// issue invoice tx args pub issue_args: IssueInvoiceTxArgs, + /// whether to output as bin + pub bin: bool, + // TODO: Remove HF3 + /// whether to output a V4 slate + pub output_v4_slate: bool, } pub fn issue_invoice_tx( @@ -534,9 +575,23 @@ where C: NodeClient + 'static, K: keychain::Keychain + 'static, { + //TODO: Remove block HF3 + let args = { + let mut a = args; + let wallet_inst = owner_api.wallet_inst.clone(); + let cur_height = { + libwallet::wallet_lock!(wallet_inst, w); + w.w2n_client().get_chain_tip()?.0 + }; + // TODO: Floonet HF4 + if cur_height < 786240 && !a.output_v4_slate && !a.bin { + a.issue_args.target_slate_version = Some(3); + } + a + }; controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { let slate = api.issue_invoice_tx(m, args.issue_args)?; - PathToSlate((&args.dest).into()).put_tx(&slate)?; + PathToSlate((&args.dest).into()).put_tx(&slate, args.bin)?; Ok(()) })?; Ok(()) @@ -544,7 +599,6 @@ where /// Arguments for the process_invoice command pub struct ProcessInvoiceArgs { - pub message: Option, pub minimum_confirmations: u64, pub selection_strategy: String, pub method: String, @@ -568,7 +622,7 @@ where C: NodeClient + 'static, K: keychain::Keychain + 'static, { - let slate = PathToSlate((&args.input).into()).get_tx()?; + let (slate, _) = PathToSlate((&args.input).into()).get_tx()?; let wallet_inst = owner_api.wallet_inst.clone(); controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { if args.estimate_selection_strategies { @@ -598,15 +652,10 @@ where max_outputs: args.max_outputs as u32, num_change_outputs: 1u32, selection_strategy_is_use_all: args.selection_strategy == "all", - message: args.message.clone(), ttl_blocks: args.ttl_blocks, send_args: None, ..Default::default() }; - if let Err(e) = api.verify_slate_messages(m, &slate) { - error!("Error validating participant messages: {}", e); - return Err(e); - } let result = api.process_invoice_tx(m, &slate, init_args); let mut slate = match result { Ok(s) => { @@ -627,11 +676,16 @@ where match args.method.as_str() { "file" => { let slate_putter = PathToSlate((&args.dest).into()); - slate_putter.put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + slate_putter.put_tx(&slate, false)?; + api.tx_lock_outputs(m, &slate)?; + } + "filebin" => { + let slate_putter = PathToSlate((&args.dest).into()); + slate_putter.put_tx(&slate, true)?; + api.tx_lock_outputs(m, &slate)?; } "self" => { - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; let km = match keychain_mask.as_ref() { None => None, Some(&m) => Some(m.to_owned()), @@ -644,7 +698,7 @@ where method => { let sender = create_sender(method, &args.dest, tor_config)?; slate = sender.send_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; } } } @@ -769,7 +823,6 @@ where )?; // should only be one here, but just in case for tx in txs { - display::tx_messages(&tx, dark_scheme)?; display::payment_proof(&tx)?; } } @@ -795,10 +848,10 @@ where C: NodeClient + 'static, K: keychain::Keychain + 'static, { - let slate = PathToSlate((&args.input).into()).get_tx()?; + let slate = PathToSlate((&args.input).into()).get_tx()?.0; controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { - api.post_tx(m, slate.tx_or_err()?, args.fluff)?; + api.post_tx(m, &slate, args.fluff)?; info!("Posted transaction"); return Ok(()); })?; @@ -824,7 +877,7 @@ where { controller::owner_single_use(None, keychain_mask, Some(owner_api), |api, m| { let (_, txs) = api.retrieve_txs(m, true, Some(args.id), None)?; - let stored_tx = api.get_stored_tx(m, &txs[0])?; + let stored_tx = api.get_stored_tx(m, txs[0].tx_slate_id.unwrap())?; if stored_tx.is_none() { error!( "Transaction with id {} does not have transaction data. Not reposting.", @@ -841,7 +894,9 @@ where ); return Ok(()); } - api.post_tx(m, &stored_tx.unwrap(), args.fluff)?; + let mut slate = Slate::blank(2, false); + slate.tx = Some(stored_tx.unwrap()); + api.post_tx(m, &slate, args.fluff)?; info!("Reposted transaction at {}", args.id); return Ok(()); } diff --git a/controller/src/display.rs b/controller/src/display.rs index 15ecbda6d..ab8e61746 100644 --- a/controller/src/display.rs +++ b/controller/src/display.rs @@ -1,4 +1,4 @@ -// Copyright 2019 The Grin Developers +// Copyright 2020 The Grin Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ use crate::core::global; use crate::libwallet::{ AcctPathMapping, Error, OutputCommitMapping, OutputStatus, TxLogEntry, WalletInfo, }; -use crate::util::{static_secp_instance, ToHex}; +use crate::util::ToHex; use grin_wallet_util::OnionV3Address; use prettytable; use std::io::prelude::Write; @@ -448,81 +448,6 @@ pub fn accounts(acct_mappings: Vec) { println!(); } -/// Display transaction log messages -pub fn tx_messages(tx: &TxLogEntry, dark_background_color_scheme: bool) -> Result<(), Error> { - let title = format!("Transaction Messages - Transaction '{}'", tx.id,); - println!(); - if term::stdout().is_none() { - println!("Could not open terminal"); - return Ok(()); - } - let mut t = term::stdout().unwrap(); - t.fg(term::color::MAGENTA).unwrap(); - writeln!(t, "{}", title).unwrap(); - t.reset().unwrap(); - - let msgs = match tx.messages.clone() { - None => { - writeln!(t, "None").unwrap(); - t.reset().unwrap(); - return Ok(()); - } - Some(m) => m.clone(), - }; - - if msgs.messages.is_empty() { - writeln!(t, "None").unwrap(); - t.reset().unwrap(); - return Ok(()); - } - - let mut table = table!(); - - table.set_titles(row![ - bMG->"Participant Id", - bMG->"Message", - bMG->"Public Key", - bMG->"Signature", - ]); - - let secp = static_secp_instance(); - let secp_lock = secp.lock(); - - for m in msgs.messages { - let id = format!("{}", m.id); - let public_key = format!("{}", m.public_key.serialize_vec(&secp_lock, true).to_hex()); - let message = match m.message { - Some(m) => format!("{}", m), - None => "None".to_owned(), - }; - let message_sig = match m.message_sig { - Some(s) => format!("{}", s.serialize_der(&secp_lock).to_hex()), - None => "None".to_owned(), - }; - if dark_background_color_scheme { - table.add_row(row![ - bFC->id, - bFC->message, - bFC->public_key, - bFB->message_sig, - ]); - } else { - table.add_row(row![ - bFD->id, - bFb->message, - bFD->public_key, - bFB->message_sig, - ]); - } - } - - table.set_format(*prettytable::format::consts::FORMAT_NO_COLSEP); - table.printstd(); - println!(); - - Ok(()) -} - /// Display individual Payment Proof pub fn payment_proof(tx: &TxLogEntry) -> Result<(), Error> { let title = format!("Payment Proof - Transaction '{}'", tx.id,); diff --git a/controller/tests/accounts.rs b/controller/tests/accounts.rs index 8d7c5a7e2..fcee4bf49 100644 --- a/controller/tests/accounts.rs +++ b/controller/tests/accounts.rs @@ -200,9 +200,9 @@ fn accounts_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { }; let mut slate = api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; slate = api.finalize_tx(m, &slate)?; - api.post_tx(m, slate.tx_or_err()?, false)?; + api.post_tx(m, &slate, false)?; Ok(()) })?; diff --git a/controller/tests/check.rs b/controller/tests/check.rs index e37f922ae..347c3c747 100644 --- a/controller/tests/check.rs +++ b/controller/tests/check.rs @@ -190,8 +190,8 @@ fn scan_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { let slate = api.init_send_tx(m, args)?; // output tx file let send_file = format!("{}/part_tx_1.tx", test_dir); - PathToSlate(send_file.into()).put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + PathToSlate(send_file.into()).put_tx(&slate, false)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; diff --git a/controller/tests/file.rs b/controller/tests/file.rs index 1f6aa82e5..eea81cc02 100644 --- a/controller/tests/file.rs +++ b/controller/tests/file.rs @@ -19,6 +19,7 @@ extern crate grin_wallet_impls as impls; use grin_wallet_libwallet as libwallet; use grin_wallet_util::grin_core as core; +use grin_wallet_util::OnionV3Address; use impls::test_framework::{self, LocalWalletClient}; use impls::{PathToSlate, SlateGetter as _, SlatePutter as _}; @@ -26,16 +27,14 @@ use std::sync::atomic::Ordering; use std::thread; use std::time::Duration; -use grin_wallet_libwallet::InitTxArgs; - -use serde_json; +use grin_wallet_libwallet::{InitTxArgs, IssueInvoiceTxArgs, Slate}; #[macro_use] mod common; use common::{clean_output_dir, create_wallet_proxy, setup}; /// self send impl -fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { +fn file_exchange_test_impl(test_dir: &'static str, use_bin: bool) -> Result<(), libwallet::Error> { // Create a new proxy to simulate server and wallet responses let mut wallet_proxy = create_wallet_proxy(test_dir); let chain = wallet_proxy.chain.clone(); @@ -99,11 +98,18 @@ fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Erro let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), mask1, bh as usize, false); - let send_file = format!("{}/part_tx_1.tx", test_dir); - let receive_file = format!("{}/part_tx_2.tx", test_dir); - - // test optional message - let message = "sender test message, sender test message"; + let (send_file, receive_file, final_file) = match use_bin { + false => ( + format!("{}/standard_S1.tx", test_dir), + format!("{}/standard_S2.tx", test_dir), + format!("{}/standard_S3.tx", test_dir), + ), + true => ( + format!("{}/standard_S1.txbin", test_dir), + format!("{}/standard_S2.txbin", test_dir), + format!("{}/standard_S3.txbin", test_dir), + ), + }; // Should have 5 in account1 (5 spendable), 5 in account (2 spendable) wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { @@ -119,13 +125,12 @@ fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Erro max_outputs: 500, num_change_outputs: 1, selection_strategy_is_use_all: true, - message: Some(message.to_owned()), ..Default::default() }; let slate = api.init_send_tx(m, args)?; // output tx file - PathToSlate((&send_file).into()).put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + PathToSlate((&send_file).into()).put_tx(&slate, use_bin)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; @@ -135,32 +140,22 @@ fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Erro w.set_parent_key_id_by_name("account1")?; } - let mut slate = PathToSlate((&send_file).into()).get_tx()?; - let mut naughty_slate = slate.clone(); - naughty_slate.participant_data[0].message = Some("I changed the message".to_owned()); - - // verify messages on slate match - wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - api.verify_slate_messages(m, &slate)?; - assert!(api.verify_slate_messages(m, &naughty_slate).is_err()); - Ok(()) - })?; - - let sender2_message = "And this is sender 2's message".to_owned(); + let mut slate = PathToSlate((&send_file).into()).get_tx()?.0; // wallet 2 receives file, completes, sends file back wallet::controller::foreign_single_use(wallet2.clone(), mask2_i.clone(), |api| { - slate = api.receive_tx(&slate, None, Some(sender2_message.clone()))?; - PathToSlate((&receive_file).into()).put_tx(&slate)?; + slate = api.receive_tx(&slate, None)?; + PathToSlate((&receive_file).into()).put_tx(&slate, use_bin)?; Ok(()) })?; // wallet 1 finalises and posts wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - let mut slate = PathToSlate(receive_file.into()).get_tx()?; - api.verify_slate_messages(m, &slate)?; + let mut slate = PathToSlate(receive_file.into()).get_tx()?.0; slate = api.finalize_tx(m, &slate)?; - api.post_tx(m, slate.tx_or_err()?, false)?; + // Output final file for reference + PathToSlate((&final_file).into()).put_tx(&slate, use_bin)?; + api.post_tx(m, &slate, false)?; bh += 1; Ok(()) })?; @@ -186,33 +181,117 @@ fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Erro Ok(()) })?; - // Check messages, all participants should have both + // Now other types of exchange, for reference + // Invoice transaction + let (send_file, receive_file, final_file) = match use_bin { + false => ( + format!("{}/invoice_I1.tx", test_dir), + format!("{}/invoice_I2.tx", test_dir), + format!("{}/invoice_I3.tx", test_dir), + ), + true => ( + format!("{}/invoice_I1.txbin", test_dir), + format!("{}/invoice_I2.txbin", test_dir), + format!("{}/invoice_I3.txbin", test_dir), + ), + }; + + let mut slate = Slate::blank(2, true); + + wallet::controller::owner_single_use(Some(wallet2.clone()), mask2, None, |api, m| { + let args = IssueInvoiceTxArgs { + amount: 1000000000, + ..Default::default() + }; + slate = api.issue_invoice_tx(m, args)?; + PathToSlate((&send_file).into()).put_tx(&slate, use_bin)?; + Ok(()) + })?; + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - let (_, tx) = api.retrieve_txs(m, true, None, Some(slate.id))?; - assert_eq!( - tx[0].clone().messages.unwrap().messages[0].message, - Some(message.to_owned()) - ); - assert_eq!( - tx[0].clone().messages.unwrap().messages[1].message, - Some(sender2_message.to_owned()) - ); - - let msg_json = serde_json::to_string_pretty(&tx[0].clone().messages.unwrap()).unwrap(); - println!("{}", msg_json); + let args = InitTxArgs { + src_acct_name: None, + amount: slate.amount, + minimum_confirmations: 2, + max_outputs: 500, + num_change_outputs: 1, + selection_strategy_is_use_all: true, + ..Default::default() + }; + slate = PathToSlate((&send_file).into()).get_tx()?.0; + slate = api.process_invoice_tx(m, &slate, args)?; + api.tx_lock_outputs(m, &slate)?; + PathToSlate((&receive_file).into()).put_tx(&slate, use_bin)?; + Ok(()) + })?; + wallet::controller::foreign_single_use(wallet2.clone(), mask2_i.clone(), |api| { + // Wallet 2 receives the invoice transaction + slate = PathToSlate((&receive_file).into()).get_tx()?.0; + slate = api.finalize_invoice_tx(&slate)?; + PathToSlate((&final_file).into()).put_tx(&slate, use_bin)?; + Ok(()) + })?; + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { + api.post_tx(m, &slate, false)?; Ok(()) })?; + // Standard, with payment proof + let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), mask1, 3, false); + let (send_file, receive_file, final_file) = match use_bin { + false => ( + format!("{}/standard_pp_S1.tx", test_dir), + format!("{}/standard_pp_S2.tx", test_dir), + format!("{}/standard_pp_S3.tx", test_dir), + ), + true => ( + format!("{}/standard_pp_S1.txbin", test_dir), + format!("{}/standard_pp_S2.txbin", test_dir), + format!("{}/standard_pp_S3.txbin", test_dir), + ), + }; + let mut slate = Slate::blank(2, true); + let mut address = None; wallet::controller::owner_single_use(Some(wallet2.clone()), mask2, None, |api, m| { - let (_, tx) = api.retrieve_txs(m, true, None, Some(slate.id))?; - assert_eq!( - tx[0].clone().messages.unwrap().messages[0].message, - Some(message.to_owned()) - ); - assert_eq!( - tx[0].clone().messages.unwrap().messages[1].message, - Some(sender2_message) - ); + address = Some(api.get_public_proof_address(m, 0)?); + Ok(()) + })?; + + let address = OnionV3Address::from_bytes(address.as_ref().unwrap().to_bytes()); + + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { + // send to send + let args = InitTxArgs { + src_acct_name: Some("mining".to_owned()), + amount: reward, + minimum_confirmations: 2, + max_outputs: 500, + num_change_outputs: 1, + selection_strategy_is_use_all: true, + payment_proof_recipient_address: Some(address.clone()), + ..Default::default() + }; + let slate = api.init_send_tx(m, args)?; + PathToSlate((&send_file).into()).put_tx(&slate, use_bin)?; + api.tx_lock_outputs(m, &slate)?; + Ok(()) + })?; + + wallet::controller::foreign_single_use(wallet2.clone(), mask2_i.clone(), |api| { + slate = PathToSlate((&send_file).into()).get_tx()?.0; + slate = api.receive_tx(&slate, None)?; + PathToSlate((&receive_file).into()).put_tx(&slate, use_bin)?; + Ok(()) + })?; + + // wallet 1 finalises and posts + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { + slate = PathToSlate(receive_file.into()).get_tx()?.0; + slate = api.finalize_tx(m, &slate)?; + // Output final file for reference + PathToSlate((&final_file).into()).put_tx(&slate, use_bin)?; + api.post_tx(m, &slate, false)?; + bh += 1; Ok(()) })?; @@ -223,10 +302,21 @@ fn file_exchange_test_impl(test_dir: &'static str) -> Result<(), libwallet::Erro } #[test] -fn wallet_file_exchange() { - let test_dir = "test_output/file_exchange"; +fn wallet_file_exchange_json() { + let test_dir = "test_output/file_exchange_json"; + setup(test_dir); + // Json output + if let Err(e) = file_exchange_test_impl(test_dir, false) { + panic!("Libwallet Error: {} - {}", e, e.backtrace().unwrap()); + } + clean_output_dir(test_dir); +} + +#[test] +fn wallet_file_exchange_bin() { + let test_dir = "test_output/file_exchange_bin"; setup(test_dir); - if let Err(e) = file_exchange_test_impl(test_dir) { + if let Err(e) = file_exchange_test_impl(test_dir, true) { panic!("Libwallet Error: {} - {}", e, e.backtrace().unwrap()); } clean_output_dir(test_dir); diff --git a/controller/tests/invoice.rs b/controller/tests/invoice.rs index fb90c9bb4..973a3177c 100644 --- a/controller/tests/invoice.rs +++ b/controller/tests/invoice.rs @@ -21,7 +21,7 @@ use grin_wallet_libwallet as libwallet; use grin_wallet_util::grin_core as core; use impls::test_framework::{self, LocalWalletClient}; -use libwallet::{InitTxArgs, IssueInvoiceTxArgs, Slate}; +use libwallet::{InitTxArgs, IssueInvoiceTxArgs, Slate, SlateState}; use std::sync::atomic::Ordering; use std::thread; use std::time::Duration; @@ -95,7 +95,7 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { Ok(()) })?; - let mut slate = Slate::blank(2); + let mut slate = Slate::blank(2, true); wallet::controller::owner_single_use(Some(wallet2.clone()), mask2, None, |api, m| { // Wallet 2 inititates an invoice transaction, requesting payment @@ -106,6 +106,7 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { slate = api.issue_invoice_tx(m, args)?; Ok(()) })?; + assert_eq!(slate.state, SlateState::Invoice1); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { // Wallet 1 receives the invoice transaction @@ -119,9 +120,10 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { ..Default::default() }; slate = api.process_invoice_tx(m, &slate, args)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; + assert_eq!(slate.state, SlateState::Invoice2); // wallet 2 finalizes and posts wallet::controller::foreign_single_use(wallet2.clone(), mask2_i.clone(), |api| { @@ -129,10 +131,11 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { slate = api.finalize_invoice_tx(&slate)?; Ok(()) })?; + assert_eq!(slate.state, SlateState::Invoice3); // wallet 1 posts so wallet 2 doesn't get the mined amount wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - api.post_tx(m, slate.tx_or_err()?, false)?; + api.post_tx(m, &slate, false)?; Ok(()) })?; bh += 1; @@ -151,7 +154,6 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { wallet2_info.last_confirmed_height, bh ); assert!(refreshed); - assert_eq!(wallet2_info.amount_currently_spendable, slate.amount); Ok(()) })?; @@ -187,11 +189,14 @@ fn invoice_tx_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { selection_strategy_is_use_all: true, ..Default::default() }; + println!("Self invoice slate init: {}", slate); slate = api.process_invoice_tx(m, &slate, args)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; + println!("Self invoice slate after process: {}", slate); + // wallet 1 finalizes and posts wallet::controller::foreign_single_use(wallet1.clone(), mask1_i.clone(), |api| { // Wallet 2 receives the invoice transaction diff --git a/controller/tests/no_change.rs b/controller/tests/no_change.rs index 540135cd9..bd141289d 100644 --- a/controller/tests/no_change.rs +++ b/controller/tests/no_change.rs @@ -76,7 +76,8 @@ fn no_change_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { let fee = core::libtx::tx_fee(1, 1, 1, None); // send a single block's worth of transactions with minimal strategy - let mut slate = Slate::blank(2); + let mut slate = Slate::blank(2, false); + let mut stored_excess = None; wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { let args = InitTxArgs { src_acct_name: None, @@ -89,19 +90,42 @@ fn no_change_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { }; slate = api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; slate = api.finalize_tx(m, &slate)?; - api.post_tx(m, slate.tx_or_err()?, false)?; + println!("Posted Slate: {:?}", slate); + println!("Posted TX: {}", slate); + stored_excess = Some(slate.tx.as_ref().unwrap().body.kernels[0].excess); + api.post_tx(m, &slate, false)?; Ok(()) })?; + // ensure stored excess is correct in both wallets + // Wallet 1 calculated the excess with the full slate // Wallet 2 only had the excess provided by + // wallet 1 + // Refresh and check transaction log for wallet 1 - wallet::controller::owner_single_use(Some(wallet1.clone()), mask2, None, |api, m| { + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { + let (refreshed, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; + assert!(refreshed); + let tx = txs[0].clone(); + println!("SIMPLE SEND - SENDING WALLET"); + println!("{:?}", tx); + println!(); + assert!(tx.confirmed); + assert_eq!(stored_excess, tx.kernel_excess); + Ok(()) + })?; + + // Refresh and check transaction log for wallet 2 + wallet::controller::owner_single_use(Some(wallet2.clone()), mask2, None, |api, m| { let (refreshed, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; assert!(refreshed); let tx = txs[0].clone(); + println!("SIMPLE SEND - RECEIVING WALLET"); println!("{:?}", tx); + println!(); assert!(tx.confirmed); + assert_eq!(stored_excess, tx.kernel_excess); Ok(()) })?; @@ -128,7 +152,7 @@ fn no_change_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { ..Default::default() }; slate = api.process_invoice_tx(m, &slate, args)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; @@ -139,16 +163,34 @@ fn no_change_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { Ok(()) })?; wallet::controller::owner_single_use(Some(wallet2.clone()), mask1, None, |api, m| { - api.post_tx(m, slate.tx_or_err()?, false)?; + println!("Invoice Posted TX: {}", slate); + stored_excess = Some(slate.tx.as_ref().unwrap().body.kernels[0].excess); + api.post_tx(m, &slate, false)?; + Ok(()) + })?; + + // check wallet 2's version + wallet::controller::owner_single_use(Some(wallet2.clone()), mask2, None, |api, m| { + let (refreshed, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; + assert!(refreshed); + for tx in txs { + stored_excess = tx.kernel_excess; + println!("Wallet 2: {:?}", tx); + println!(); + assert!(tx.confirmed); + assert_eq!(stored_excess, tx.kernel_excess); + } Ok(()) })?; // Refresh and check transaction log for wallet 1 - wallet::controller::owner_single_use(Some(wallet1.clone()), mask2, None, |api, m| { + wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { let (refreshed, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; assert!(refreshed); for tx in txs { - println!("{:?}", tx); + println!("Wallet 1: {:?}", tx); + println!(); + assert_eq!(stored_excess, tx.kernel_excess); assert!(tx.confirmed); } Ok(()) diff --git a/controller/tests/payment_proofs.rs b/controller/tests/payment_proofs.rs index 9f0229de1..819b39bcb 100644 --- a/controller/tests/payment_proofs.rs +++ b/controller/tests/payment_proofs.rs @@ -87,7 +87,7 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err let address = OnionV3Address::from_bytes(address.as_ref().unwrap().to_bytes()); println!("Public address is: {:?}", address); let amount = 60_000_000_000; - let mut slate = Slate::blank(1); + let mut slate = Slate::blank(1, false); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { // note this will increment the block count as part of the transaction "Posting" let args = InitTxArgs { @@ -111,12 +111,12 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err slate_i.payment_proof.as_ref().unwrap().sender_address ); - // Check we are creating a tx with the expected lock_height of 0. + // Check we are creating a tx with kernel features 0 // We will check this produces a Plain kernel later. - assert_eq!(0, slate.lock_height); + assert_eq!(0, slate.kernel_features); slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + sender_api.tx_lock_outputs(m, &slate)?; // Ensure what's stored in TX log for payment proof is correct let (_, txs) = sender_api.retrieve_txs(m, true, None, Some(slate.id))?; @@ -135,7 +135,7 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err assert!(pp.is_err()); slate = sender_api.finalize_tx(m, &slate)?; - sender_api.post_tx(m, slate.tx_or_err()?, true)?; + sender_api.post_tx(m, &slate, true)?; Ok(()) })?; @@ -145,7 +145,7 @@ fn payment_proofs_test_impl(test_dir: &'static str) -> Result<(), libwallet::Err // Check payment proof here let mut pp = sender_api.retrieve_payment_proof(m, true, None, Some(slate.id))?; - println!("{:?}", pp); + println!("Payment proof: {:?}", pp); // verify, should be good let res = sender_api.verify_payment_proof(m, &pp)?; diff --git a/controller/tests/repost.rs b/controller/tests/repost.rs index fe8a7b906..0ea9d2c1a 100644 --- a/controller/tests/repost.rs +++ b/controller/tests/repost.rs @@ -99,7 +99,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> let send_file = format!("{}/part_tx_1.tx", test_dir); let receive_file = format!("{}/part_tx_2.tx", test_dir); - let mut slate = Slate::blank(2); + let mut slate = Slate::blank(2, false); // Should have 5 in account1 (5 spendable), 5 in account (2 spendable) wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { @@ -118,8 +118,8 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> ..Default::default() }; let slate = api.init_send_tx(m, args)?; - PathToSlate((&send_file).into()).put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + PathToSlate((&send_file).into()).put_tx(&slate, false)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) })?; @@ -133,9 +133,9 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> } wallet::controller::foreign_single_use(wallet1.clone(), mask1_i.clone(), |api| { - slate = PathToSlate((&send_file).into()).get_tx()?; - slate = api.receive_tx(&slate, None, None)?; - PathToSlate((&receive_file).into()).put_tx(&slate)?; + slate = PathToSlate((&send_file).into()).get_tx()?.0; + slate = api.receive_tx(&slate, None)?; + PathToSlate((&receive_file).into()).put_tx(&slate, false)?; Ok(()) })?; @@ -147,7 +147,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> // wallet 1 finalize wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - slate = PathToSlate((&receive_file).into()).get_tx()?; + slate = PathToSlate((&receive_file).into()).get_tx()?.0; slate = api.finalize_tx(m, &slate)?; Ok(()) })?; @@ -155,8 +155,10 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> // Now repost from cached wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { let (_, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; - let stored_tx = api.get_stored_tx(m, &txs[0])?; - api.post_tx(m, &stored_tx.unwrap(), false)?; + println!("TXS[0]: {:?}", txs[0]); + let stored_tx = api.get_stored_tx(m, txs[0].tx_slate_id.unwrap())?; + println!("Stored tx: {:?}", stored_tx); + api.post_tx(m, &slate, false)?; bh += 1; Ok(()) })?; @@ -196,7 +198,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> w.set_parent_key_id_by_name("account1")?; } - let mut slate = Slate::blank(2); + let mut slate = Slate::blank(2, false); let amount = 60_000_000_000; wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { @@ -212,7 +214,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> }; let slate_i = sender_api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + sender_api.tx_lock_outputs(m, &slate)?; slate = sender_api.finalize_tx(m, &slate)?; Ok(()) })?; @@ -223,8 +225,9 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> // Now repost from cached wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { let (_, txs) = api.retrieve_txs(m, true, None, Some(slate.id))?; - let stored_tx = api.get_stored_tx(m, &txs[0])?; - api.post_tx(m, &stored_tx.unwrap(), false)?; + let stored_tx = api.get_stored_tx(m, txs[0].tx_slate_id.unwrap())?; + slate.tx = stored_tx; + api.post_tx(m, &slate, false)?; bh += 1; Ok(()) })?; diff --git a/controller/tests/revert.rs b/controller/tests/revert.rs index 7191e617c..9237c98e7 100644 --- a/controller/tests/revert.rs +++ b/controller/tests/revert.rs @@ -169,8 +169,8 @@ fn revert( let slate = api.init_send_tx(m, args)?; // output tx file let send_file = format!("{}/part_tx_1.tx", test_dir); - PathToSlate(send_file.into()).put_tx(&slate)?; - api.tx_lock_outputs(m, &slate, 0)?; + PathToSlate(send_file.into()).put_tx(&slate, false)?; + api.tx_lock_outputs(m, &slate)?; let slate = client1.send_tx_slate_direct("wallet2", &slate)?; let slate = api.finalize_tx(m, &slate)?; tx = Some(slate.tx); diff --git a/controller/tests/self_send.rs b/controller/tests/self_send.rs index ce1024cfa..4d362db4f 100644 --- a/controller/tests/self_send.rs +++ b/controller/tests/self_send.rs @@ -94,14 +94,14 @@ fn self_send_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> { ..Default::default() }; let mut slate = api.init_send_tx(m, args)?; - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; // Send directly to self wallet::controller::foreign_single_use(wallet1.clone(), mask1_i.clone(), |api| { - slate = api.receive_tx(&slate, Some("listener"), None)?; + slate = api.receive_tx(&slate, Some("listener"))?; Ok(()) })?; slate = api.finalize_tx(m, &slate)?; - api.post_tx(m, slate.tx_or_err()?, false)?; // mines a block + api.post_tx(m, &slate, false)?; // mines a block bh += 1; Ok(()) })?; diff --git a/controller/tests/transaction.rs b/controller/tests/transaction.rs index 082878e75..4d79207b5 100644 --- a/controller/tests/transaction.rs +++ b/controller/tests/transaction.rs @@ -22,7 +22,7 @@ use grin_wallet_util::grin_core as core; use self::core::core::transaction; use self::core::global; -use self::libwallet::{InitTxArgs, OutputStatus, Slate}; +use self::libwallet::{InitTxArgs, OutputStatus, Slate, SlateState}; use impls::test_framework::{self, LocalWalletClient}; use std::sync::atomic::Ordering; use std::thread; @@ -97,7 +97,7 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error> // assert wallet contents // and a single use api for a send command let amount = 60_000_000_000; - let mut slate = Slate::blank(1); + let mut slate = Slate::blank(1, false); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { // note this will increment the block count as part of the transaction "Posting" let args = InitTxArgs { @@ -111,13 +111,17 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error> }; let slate_i = sender_api.init_send_tx(m, args)?; + assert_eq!(slate_i.state, SlateState::Standard1); + // Check we are creating a tx with the expected lock_height of 0. // We will check this produces a Plain kernel later. - assert_eq!(0, slate.lock_height); + assert_eq!(0, slate.kernel_features); slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + assert_eq!(slate.state, SlateState::Standard2); + sender_api.tx_lock_outputs(m, &slate)?; slate = sender_api.finalize_tx(m, &slate)?; + assert_eq!(slate.state, SlateState::Standard3); // Check we have a single kernel and that it is a Plain kernel (no lock_height). assert_eq!(slate.tx_or_err()?.kernels().len(), 1); @@ -175,7 +179,7 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error> // post transaction wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |api, m| { - api.post_tx(m, slate.tx_or_err()?, false)?; + api.post_tx(m, &slate, false)?; Ok(()) })?; @@ -299,7 +303,7 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error> }; let slate_i = sender_api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + sender_api.tx_lock_outputs(m, &slate)?; slate = sender_api.finalize_tx(m, &slate)?; Ok(()) })?; @@ -313,8 +317,9 @@ fn basic_transaction_api(test_dir: &'static str) -> Result<(), libwallet::Error> .iter() .find(|t| t.tx_slate_id == Some(slate.id)) .unwrap(); - let stored_tx = sender_api.get_stored_tx(m, &tx)?; - sender_api.post_tx(m, &stored_tx.unwrap(), false)?; + let stored_tx = sender_api.get_stored_tx(m, tx.tx_slate_id.unwrap())?; + slate.tx = stored_tx; + sender_api.post_tx(m, &slate, false)?; let (_, wallet1_info) = sender_api.retrieve_summary_info(m, true, 1)?; // should be mined now assert_eq!( @@ -395,7 +400,7 @@ fn tx_rollback(test_dir: &'static str) -> Result<(), libwallet::Error> { let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), mask1, 5, false); let amount = 30_000_000_000; - let mut slate = Slate::blank(1); + let mut slate = Slate::blank(1, false); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { // note this will increment the block count as part of the transaction "Posting" let args = InitTxArgs { @@ -410,7 +415,7 @@ fn tx_rollback(test_dir: &'static str) -> Result<(), libwallet::Error> { let slate_i = sender_api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + sender_api.tx_lock_outputs(m, &slate)?; slate = sender_api.finalize_tx(m, &slate)?; Ok(()) })?; diff --git a/controller/tests/ttl_cutoff.rs b/controller/tests/ttl_cutoff.rs index 4ee1cd929..0f501dddd 100644 --- a/controller/tests/ttl_cutoff.rs +++ b/controller/tests/ttl_cutoff.rs @@ -77,7 +77,7 @@ fn ttl_cutoff_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), mask1, bh as usize, false); let amount = 60_000_000_000; - let mut slate = Slate::blank(1); + let mut slate = Slate::blank(1, false); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { // note this will increment the block count as part of the transaction "Posting" let args = InitTxArgs { @@ -93,7 +93,7 @@ fn ttl_cutoff_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> let slate_i = sender_api.init_send_tx(m, args)?; slate = client1.send_tx_slate_direct("wallet2", &slate_i)?; - sender_api.tx_lock_outputs(m, &slate, 0)?; + sender_api.tx_lock_outputs(m, &slate)?; let (_, txs) = sender_api.retrieve_txs(m, true, None, Some(slate.id))?; let tx = txs[0].clone(); @@ -127,7 +127,7 @@ fn ttl_cutoff_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> })?; // try again, except try and send off the transaction for completion beyond the expiry - let mut slate = Slate::blank(1); + let mut slate = Slate::blank(1, false); wallet::controller::owner_single_use(Some(wallet1.clone()), mask1, None, |sender_api, m| { // note this will increment the block count as part of the transaction "Posting" let args = InitTxArgs { @@ -141,7 +141,7 @@ fn ttl_cutoff_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error> ..Default::default() }; let slate_i = sender_api.init_send_tx(m, args)?; - sender_api.tx_lock_outputs(m, &slate_i, 0)?; + sender_api.tx_lock_outputs(m, &slate_i)?; slate = slate_i; let (_, txs) = sender_api.retrieve_txs(m, true, None, Some(slate.id))?; diff --git a/impls/src/adapters/file.rs b/impls/src/adapters/file.rs index 0f49826d6..2fd914115 100644 --- a/impls/src/adapters/file.rs +++ b/impls/src/adapters/file.rs @@ -16,45 +16,114 @@ use std::fs::File; use std::io::{Read, Write}; -use crate::libwallet::{Error, ErrorKind, Slate, SlateVersion, VersionedSlate}; +use crate::client_utils::byte_ser; +use crate::libwallet::slate_versions::v3::SlateV3; +use crate::libwallet::slate_versions::v4::SlateV4; +use crate::libwallet::{ + Error, ErrorKind, Slate, SlateState, SlateVersion, VersionedBinSlate, VersionedSlate, +}; use crate::{SlateGetter, SlatePutter}; +use std::convert::TryFrom; use std::path::PathBuf; #[derive(Clone)] pub struct PathToSlate(pub PathBuf); impl SlatePutter for PathToSlate { - fn put_tx(&self, slate: &Slate) -> Result<(), Error> { + fn put_tx(&self, slate: &Slate, as_bin: bool) -> Result<(), Error> { + // For testing (output raw slate data for reference) + /*{ + let mut raw_path = self.0.clone(); + raw_path.set_extension("raw"); + let mut raw_slate = File::create(&raw_path)?; + raw_slate.write_all(&format!("{:?}", slate).as_bytes())?; + raw_slate.sync_all()?; + }*/ let mut pub_tx = File::create(&self.0)?; - let _r: crate::adapters::Reminder; + // TODO: let out_slate = { - // TODO: This will need to be filled with any incompatibilities in the V4 Slate - if false { - warn!("Transaction contains features that require grin-wallet 4.0.0 or later"); - warn!("Please ensure the other party is running grin-wallet v4.0.0 or later before sending"); - VersionedSlate::into_version(slate.clone(), SlateVersion::V4)? + // TODO: Remove post HF3 + if slate.version_info.version == 2 || slate.version_info.version == 3 { + // if the slate we read in in V3 or 2 (holdover from 3.0.0), output a slate V3, + // which can be read by v3.x wallets + let v4_slate = SlateV4::from(slate.clone()); + let mut v3_slate = SlateV3::try_from(&v4_slate)?; + // Fill in V3 participant IDs according to state + if slate.state == SlateState::Invoice1 { + for mut e in v3_slate.participant_data.iter_mut() { + if Some(e.public_blind_excess.clone()) == slate.participant_id { + e.id = 1; + } else { + e.id = 0; + } + } + } + if slate.state == SlateState::Invoice2 { + for mut e in v3_slate.participant_data.iter_mut() { + if Some(e.public_blind_excess.clone()) == slate.participant_id { + e.id = 0; + } else { + e.id = 1; + } + } + } + if slate.state == SlateState::Standard1 { + for mut e in v3_slate.participant_data.iter_mut() { + if Some(e.public_blind_excess.clone()) == slate.participant_id { + e.id = 0; + } else { + e.id = 1; + } + } + } + if slate.state == SlateState::Standard2 { + for mut e in v3_slate.participant_data.iter_mut() { + if Some(e.public_blind_excess.clone()) == slate.participant_id { + e.id = 1; + } else { + e.id = 0; + } + } + } + v3_slate.version_info.version = 3; + VersionedSlate::V3(v3_slate) } else { - let mut s = slate.clone(); - s.version_info.version = 3; - s.version_info.orig_version = 3; - VersionedSlate::into_version(s, SlateVersion::V3)? + VersionedSlate::into_version(slate.clone(), SlateVersion::V4)? } }; - pub_tx.write_all( - serde_json::to_string(&out_slate) - .map_err(|_| ErrorKind::SlateSer)? - .as_bytes(), - )?; + if as_bin { + let bin_slate = + VersionedBinSlate::try_from(out_slate).map_err(|_| ErrorKind::SlateSer)?; + pub_tx.write_all(&byte_ser::to_bytes(&bin_slate).map_err(|_| ErrorKind::SlateSer)?)?; + } else { + pub_tx.write_all( + serde_json::to_string_pretty(&out_slate) + .map_err(|_| ErrorKind::SlateSer)? + .as_bytes(), + )?; + } pub_tx.sync_all()?; Ok(()) } } impl SlateGetter for PathToSlate { - fn get_tx(&self) -> Result { + fn get_tx(&self) -> Result<(Slate, bool), Error> { + // try as bin first, then as json let mut pub_tx_f = File::open(&self.0)?; - let mut content = String::new(); - pub_tx_f.read_to_string(&mut content)?; - Ok(Slate::deserialize_upgrade(&content)?) + let mut data = Vec::new(); + pub_tx_f.read_to_end(&mut data)?; + let bin_res = byte_ser::from_bytes::(&data); + if let Err(e) = bin_res { + debug!("Not a valid binary slate: {} - Will try JSON", e); + } else { + if let Ok(s) = bin_res { + return Ok((Slate::upgrade(s.into())?, true)); + } + } + + // Otherwise try json + let content = String::from_utf8(data).map_err(|_| ErrorKind::SlateSer)?; + Ok((Slate::deserialize_upgrade(&content)?, false)) } } diff --git a/impls/src/adapters/http.rs b/impls/src/adapters/http.rs index 9bb1a42e2..d70e4e089 100644 --- a/impls/src/adapters/http.rs +++ b/impls/src/adapters/http.rs @@ -65,7 +65,7 @@ impl HttpSlateSender { } /// Check version of the listening wallet - fn check_other_version(&self, url: &str) -> Result { + pub fn check_other_version(&self, url: &str) -> Result { let req = json!({ "jsonrpc": "2.0", "method": "check_version", @@ -143,10 +143,6 @@ impl HttpSlateSender { } } -#[deprecated( - since = "3.0.0", - note = "Remember to handle SlateV4 incompatibilities here" -)] impl SlateSender for HttpSlateSender { fn send_tx(&self, slate: &Slate) -> Result { let trailing = match self.base_url.ends_with('/') { @@ -184,13 +180,14 @@ impl SlateSender for HttpSlateSender { SlateVersion::V4 => VersionedSlate::into_version(slate.clone(), SlateVersion::V4)?, SlateVersion::V3 => { let mut slate = slate.clone(); - let _r: crate::adapters::Reminder; //TODO: Fill out with Slate V4 incompatibilities + // * Will need to set particpant id to 1 manually if this is invoice + // * Set slate height manually + // * Reconcile unknown slate states from V3 if false { return Err(ErrorKind::ClientCallback("feature x requested, but other wallet does not support feature x. Please urge other user to upgrade, or re-send tx without feature x".into()).into()); } slate.version_info.version = 3; - slate.version_info.orig_version = 3; VersionedSlate::into_version(slate, SlateVersion::V3)? } }; @@ -208,7 +205,10 @@ impl SlateSender for HttpSlateSender { trace!("Sending receive_tx request: {}", req); let res: String = self.post(&url_str, None, req).map_err(|e| { - let report = format!("Posting transaction slate (is recipient listening?): {}", e); + let report = format!( + "Sending transaction slate to other wallet (is recipient listening?): {}", + e + ); error!("{}", report); ErrorKind::ClientCallback(report) })?; @@ -227,7 +227,10 @@ impl SlateSender for HttpSlateSender { let slate_value = res["result"]["Ok"].clone(); trace!("slate_value: {}", slate_value); let slate = Slate::deserialize_upgrade(&serde_json::to_string(&slate_value).unwrap()) - .map_err(|_| ErrorKind::SlateDeser)?; + .map_err(|e| { + error!("Error deserializing response slate: {}", e); + ErrorKind::SlateDeser + })?; Ok(slate) } diff --git a/impls/src/adapters/keybase.rs b/impls/src/adapters/keybase.rs index 498a55794..5dba044ef 100644 --- a/impls/src/adapters/keybase.rs +++ b/impls/src/adapters/keybase.rs @@ -395,17 +395,12 @@ impl SlateReceiver for KeybaseAllChannels { slate.amount as f64 / 1_000_000_000.0, tx_uuid, ); - if let Err(e) = slate.verify_messages() { - error!("Error validating participant messages: {}", e); - return Err(e); - } let res = { foreign::receive_tx( &mut **wallet_inst, Some(mask.as_ref().unwrap()), &slate, None, - None, false, ) }; diff --git a/impls/src/adapters/mod.rs b/impls/src/adapters/mod.rs index c6704552b..8ff0b3618 100644 --- a/impls/src/adapters/mod.rs +++ b/impls/src/adapters/mod.rs @@ -25,13 +25,6 @@ use crate::libwallet::{Error, ErrorKind, Slate}; use crate::tor::config::complete_tor_address; use crate::util::ZeroingString; -/// Little SlateV4 reminder warning helper -#[deprecated( - since = "3.0.0", - note = "Remember to handle SlateV4 incompatibilities here" -)] -pub struct Reminder; - /// Sends transactions to a corresponding SlateReceiver pub trait SlateSender { /// Send a transaction slate to another listening wallet and return result @@ -55,13 +48,14 @@ pub trait SlateReceiver { /// Posts slates to be read later by a corresponding getter pub trait SlatePutter { /// Send a transaction asynchronously - fn put_tx(&self, slate: &Slate) -> Result<(), Error>; + fn put_tx(&self, slate: &Slate, as_bin: bool) -> Result<(), Error>; } /// Checks for a transaction from a corresponding SlatePutter, returns the transaction if it exists pub trait SlateGetter { - /// Receive a transaction async. (Actually just read it from wherever and return the slate) - fn get_tx(&self) -> Result; + /// Receive a transaction async. (Actually just read it from wherever and return the slate). + /// Returns (Slate, whether it was in binary form) + fn get_tx(&self) -> Result<(Slate, bool), Error>; } /// select a SlateSender based on method and dest fields from, e.g., SendArgs diff --git a/impls/src/backends/lmdb.rs b/impls/src/backends/lmdb.rs index 0394a1b3a..91c888989 100644 --- a/impls/src/backends/lmdb.rs +++ b/impls/src/backends/lmdb.rs @@ -320,13 +320,8 @@ where &mut self, keychain_mask: Option<&SecretKey>, slate_id: &[u8], - participant_id: usize, ) -> Result { - let ctx_key = to_key_u64( - PRIVATE_TX_CONTEXT_PREFIX, - &mut slate_id.to_vec(), - participant_id as u64, - ); + let ctx_key = to_key_u64(PRIVATE_TX_CONTEXT_PREFIX, &mut slate_id.to_vec(), 0); let (blind_xor_key, nonce_xor_key) = private_ctx_xor_keys(&self.keychain(keychain_mask)?, slate_id)?; @@ -369,11 +364,8 @@ where Ok(()) } - fn get_stored_tx(&self, entry: &TxLogEntry) -> Result, Error> { - let filename = match entry.stored_tx.clone() { - Some(f) => f, - None => return Ok(None), - }; + fn get_stored_tx(&self, uuid: &str) -> Result, Error> { + let filename = format!("{}.grintx", uuid); let path = path::Path::new(&self.data_file_dir) .join(TX_SAVE_DIR) .join(filename); @@ -682,17 +674,8 @@ where self.save(out.clone()) } - fn save_private_context( - &mut self, - slate_id: &[u8], - participant_id: usize, - ctx: &Context, - ) -> Result<(), Error> { - let ctx_key = to_key_u64( - PRIVATE_TX_CONTEXT_PREFIX, - &mut slate_id.to_vec(), - participant_id as u64, - ); + fn save_private_context(&mut self, slate_id: &[u8], ctx: &Context) -> Result<(), Error> { + let ctx_key = to_key_u64(PRIVATE_TX_CONTEXT_PREFIX, &mut slate_id.to_vec(), 0); let (blind_xor_key, nonce_xor_key) = private_ctx_xor_keys(self.keychain(), slate_id)?; let mut s_ctx = ctx.clone(); @@ -709,16 +692,8 @@ where Ok(()) } - fn delete_private_context( - &mut self, - slate_id: &[u8], - participant_id: usize, - ) -> Result<(), Error> { - let ctx_key = to_key_u64( - PRIVATE_TX_CONTEXT_PREFIX, - &mut slate_id.to_vec(), - participant_id as u64, - ); + fn delete_private_context(&mut self, slate_id: &[u8]) -> Result<(), Error> { + let ctx_key = to_key_u64(PRIVATE_TX_CONTEXT_PREFIX, &mut slate_id.to_vec(), 0); self.db .borrow() .as_ref() diff --git a/impls/src/client_utils/byte_ser.rs b/impls/src/client_utils/byte_ser.rs new file mode 100644 index 000000000..d99e139f9 --- /dev/null +++ b/impls/src/client_utils/byte_ser.rs @@ -0,0 +1,383 @@ +// Copyright 2019 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Simple serde byte array serializer, assumes target already +// knows how to serialize itself into binary (because that all +// this serializer can do) +use serde::de::Visitor; +use serde::{de, ser, Deserialize, Serialize}; +use std; +use std::fmt::{self, Display}; + +pub type Result = std::result::Result; + +#[derive(Clone, Debug, PartialEq)] +pub enum Error { + Message(String), +} + +impl ser::Error for Error { + fn custom(msg: T) -> Self { + Error::Message(msg.to_string()) + } +} + +impl de::Error for Error { + fn custom(msg: T) -> Self { + Error::Message(msg.to_string()) + } +} + +impl Display for Error { + fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + match self { + Error::Message(msg) => formatter.write_str(msg), + } + } +} + +impl std::error::Error for Error {} + +pub struct ByteSerializer { + output: Vec, +} + +pub fn to_bytes(value: &T) -> Result> +where + T: Serialize, +{ + let mut serializer = ByteSerializer { output: vec![] }; + value.serialize(&mut serializer)?; + Ok(serializer.output) +} + +impl<'a> ser::Serializer for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + type SerializeSeq = Self; + type SerializeTuple = Self; + type SerializeTupleStruct = Self; + type SerializeTupleVariant = Self; + type SerializeMap = Self; + type SerializeStruct = Self; + type SerializeStructVariant = Self; + + fn serialize_bool(self, _: bool) -> Result<()> { + unimplemented!() + } + + fn serialize_i8(self, _: i8) -> Result<()> { + unimplemented!() + } + + fn serialize_i16(self, _: i16) -> Result<()> { + unimplemented!() + } + + fn serialize_i32(self, _: i32) -> Result<()> { + unimplemented!() + } + + fn serialize_i64(self, _: i64) -> Result<()> { + unimplemented!() + } + + fn serialize_u8(self, _: u8) -> Result<()> { + unimplemented!() + } + + fn serialize_u16(self, _: u16) -> Result<()> { + unimplemented!() + } + + fn serialize_u32(self, _: u32) -> Result<()> { + unimplemented!() + } + + fn serialize_u64(self, _: u64) -> Result<()> { + unimplemented!() + } + + fn serialize_f32(self, _: f32) -> Result<()> { + unimplemented!() + } + + fn serialize_f64(self, _: f64) -> Result<()> { + unimplemented!() + } + + fn serialize_char(self, _: char) -> Result<()> { + unimplemented!() + } + + fn serialize_str(self, _: &str) -> Result<()> { + unimplemented!() + } + + fn serialize_bytes(self, v: &[u8]) -> Result<()> { + for byte in v { + self.output.push(*byte) + } + Ok(()) + } + + fn serialize_none(self) -> Result<()> { + unimplemented!() + } + + fn serialize_some(self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn serialize_unit(self) -> Result<()> { + unimplemented!() + } + + fn serialize_unit_struct(self, _name: &'static str) -> Result<()> { + unimplemented!() + } + + fn serialize_unit_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + ) -> Result<()> { + unimplemented!() + } + + fn serialize_newtype_struct(self, _name: &'static str, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn serialize_newtype_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _value: &T, + ) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn serialize_seq(self, _len: Option) -> Result { + unimplemented!() + } + + fn serialize_tuple(self, _len: usize) -> Result { + unimplemented!() + } + + fn serialize_tuple_struct( + self, + _name: &'static str, + _len: usize, + ) -> Result { + unimplemented!() + } + + fn serialize_tuple_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _len: usize, + ) -> Result { + unimplemented!() + } + + fn serialize_map(self, _len: Option) -> Result { + unimplemented!() + } + + fn serialize_struct(self, _name: &'static str, _len: usize) -> Result { + unimplemented!() + } + + fn serialize_struct_variant( + self, + _name: &'static str, + _variant_index: u32, + _variant: &'static str, + _len: usize, + ) -> Result { + unimplemented!() + } +} + +impl<'a> ser::SerializeSeq for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_element(&mut self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeTuple for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_element(&mut self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeTupleStruct for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_field(&mut self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeTupleVariant for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_field(&mut self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeMap for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_key(&mut self, _key: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn serialize_value(&mut self, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeStruct for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_field(&mut self, _key: &'static str, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +impl<'a> ser::SerializeStructVariant for &'a mut ByteSerializer { + type Ok = (); + type Error = Error; + + fn serialize_field(&mut self, _key: &'static str, _value: &T) -> Result<()> + where + T: ?Sized + Serialize, + { + unimplemented!() + } + + fn end(self) -> Result<()> { + unimplemented!() + } +} + +// Simple Deserializer + +pub struct ByteDeserializer<'de> { + input: &'de [u8], +} + +impl<'de> ByteDeserializer<'de> { + pub fn from_bytes(input: &'de [u8]) -> Self { + ByteDeserializer { input } + } +} + +pub fn from_bytes<'a, T>(b: &'a [u8]) -> Result +where + T: Deserialize<'a>, +{ + let mut deserializer = ByteDeserializer::from_bytes(b); + let t = T::deserialize(&mut deserializer)?; + Ok(t) +} + +impl<'de, 'a> de::Deserializer<'de> for &'a mut ByteDeserializer<'de> { + type Error = Error; + + fn deserialize_any(self, visitor: V) -> Result + where + V: Visitor<'de>, + { + visitor.visit_bytes(self.input) + } + + serde::forward_to_deserialize_any! { + bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string + bytes byte_buf option unit unit_struct newtype_struct seq tuple + tuple_struct map struct enum identifier ignored_any + } +} diff --git a/impls/src/client_utils/json_rpc.rs b/impls/src/client_utils/json_rpc.rs index 3d9ef9ab0..fa8918d06 100644 --- a/impls/src/client_utils/json_rpc.rs +++ b/impls/src/client_utils/json_rpc.rs @@ -143,7 +143,7 @@ impl fmt::Display for Error { write!(f, "duplicate RPC batch response ID: {}", v) } Error::_WrongBatchResponseId(ref v) => write!(f, "wrong RPC batch response ID: {}", v), - _ => f.write_str(std::error::Error::description(self)), + ref e => f.write_str(&format!("{}", e)), } } } diff --git a/impls/src/client_utils/mod.rs b/impls/src/client_utils/mod.rs index e4a65b889..0e4ca1190 100644 --- a/impls/src/client_utils/mod.rs +++ b/impls/src/client_utils/mod.rs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +pub mod byte_ser; mod client; pub mod json_rpc; diff --git a/impls/src/test_framework/mod.rs b/impls/src/test_framework/mod.rs index 89c80e03d..dc0970222 100644 --- a/impls/src/test_framework/mod.rs +++ b/impls/src/test_framework/mod.rs @@ -254,7 +254,7 @@ where }; let slate_i = owner::init_send_tx(&mut **w, keychain_mask, args, test_mode)?; let slate = client.send_tx_slate_direct(dest, &slate_i)?; - owner::tx_lock_outputs(&mut **w, keychain_mask, &slate, 0)?; + owner::tx_lock_outputs(&mut **w, keychain_mask, &slate)?; owner::finalize_tx(&mut **w, keychain_mask, &slate)? }; let client = { diff --git a/impls/src/test_framework/testclient.rs b/impls/src/test_framework/testclient.rs index 93b311c50..c6a933b93 100644 --- a/impls/src/test_framework/testclient.rs +++ b/impls/src/test_framework/testclient.rs @@ -219,14 +219,8 @@ where let w = w_lock.lc_provider()?.wallet_inst()?; let mask = wallet.2.clone(); // receive tx - match foreign::receive_tx( - &mut **w, - (&mask).as_ref(), - &Slate::from(slate), - None, - None, - false, - ) { + match foreign::receive_tx(&mut **w, (&mask).as_ref(), &Slate::from(slate), None, false) + { Err(e) => { return Ok(WalletProxyMessage { sender_id: m.dest, diff --git a/libwallet/Cargo.toml b/libwallet/Cargo.toml index 42d6e0543..9df402b81 100644 --- a/libwallet/Cargo.toml +++ b/libwallet/Cargo.toml @@ -26,6 +26,7 @@ strum = "0.15" strum_macros = "0.15" ed25519-dalek = "1.0.0-pre.1" byteorder = "1" +base64 = "0.9" grin_wallet_util = { path = "../util", version = "4.0.0-alpha.1" } grin_wallet_config = { path = "../config", version = "4.0.0-alpha.1" } diff --git a/libwallet/src/api_impl/foreign.rs b/libwallet/src/api_impl/foreign.rs index ad8e8d2b1..e426477b9 100644 --- a/libwallet/src/api_impl/foreign.rs +++ b/libwallet/src/api_impl/foreign.rs @@ -16,17 +16,17 @@ use strum::IntoEnumIterator; use crate::api_impl::owner::check_ttl; +use crate::grin_core::core::transaction::Transaction; use crate::grin_keychain::Keychain; use crate::grin_util::secp::key::SecretKey; -use crate::internal::{tx, updater}; +use crate::internal::{selection, tx, updater}; use crate::slate_versions::SlateVersion; use crate::{ - address, BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, TxLogEntryType, VersionInfo, - WalletBackend, + address, BlockFees, CbData, Error, ErrorKind, NodeClient, Slate, SlateState, TxLogEntryType, + VersionInfo, WalletBackend, }; const FOREIGN_API_VERSION: u16 = 2; -const USER_MESSAGE_MAX_LEN: usize = 256; /// Return the version info pub fn check_version() -> VersionInfo { @@ -51,18 +51,12 @@ where updater::build_coinbase(&mut *w, keychain_mask, block_fees, test_mode) } -/// verify slate messages -pub fn verify_slate_messages(slate: &Slate) -> Result<(), Error> { - slate.verify_messages() -} - /// Receive a tx as recipient pub fn receive_tx<'a, T: ?Sized, C, K>( w: &mut T, keychain_mask: Option<&SecretKey>, slate: &Slate, dest_acct_name: Option<&str>, - message: Option, use_test_rng: bool, ) -> Result where @@ -96,28 +90,25 @@ where } } - let message = match message { - Some(mut m) => { - m.truncate(USER_MESSAGE_MAX_LEN); - Some(m) - } - None => None, - }; + // if this is compact mode, we need to create the transaction now + if ret_slate.is_compact() { + ret_slate.tx = Some(Transaction::empty()); + } - tx::add_output_to_slate( + let height = w.last_confirmed_height()?; + let keychain = w.keychain(keychain_mask)?; + + let context = tx::add_output_to_slate( &mut *w, keychain_mask, &mut ret_slate, + height, &parent_key_id, - 1, - message, false, use_test_rng, )?; - tx::update_message(&mut *w, keychain_mask, &ret_slate)?; - let keychain = w.keychain(keychain_mask)?; - let excess = ret_slate.calc_excess(&keychain)?; + let excess = ret_slate.calc_excess(keychain.secp())?; if let Some(ref mut p) = ret_slate.payment_proof { let sig = tx::create_payment_proof_signature( @@ -129,7 +120,15 @@ where p.receiver_signature = Some(sig); } + // Can remove amount and fee now + // as well as sender's sig data + if ret_slate.is_compact() { + ret_slate.amount = 0; + ret_slate.fee = 0; + ret_slate.remove_other_sigdata(&keychain, &context.sec_nonce, &context.sec_key)?; + } + ret_slate.state = SlateState::Standard2; Ok(ret_slate) } @@ -146,14 +145,23 @@ where { let mut sl = slate.clone(); check_ttl(w, &sl)?; - let context = w.get_private_context(keychain_mask, sl.id.as_bytes(), 1)?; - tx::complete_tx(&mut *w, keychain_mask, &mut sl, 1, &context)?; + let context = w.get_private_context(keychain_mask, sl.id.as_bytes())?; + if sl.is_compact() { + let mut temp_ctx = context.clone(); + temp_ctx.sec_key = context.initial_sec_key.clone(); + temp_ctx.sec_nonce = context.initial_sec_nonce.clone(); + selection::repopulate_tx(&mut *w, keychain_mask, &mut sl, &temp_ctx, false)?; + } + tx::complete_tx(&mut *w, keychain_mask, &mut sl, &context)?; tx::update_stored_tx(&mut *w, keychain_mask, &context, &mut sl, true)?; - tx::update_message(&mut *w, keychain_mask, &sl)?; { let mut batch = w.batch(keychain_mask)?; - batch.delete_private_context(sl.id.as_bytes(), 1)?; + batch.delete_private_context(sl.id.as_bytes())?; batch.commit()?; } + sl.state = SlateState::Invoice3; + if sl.is_compact() { + sl.amount = 0; + } Ok(sl) } diff --git a/libwallet/src/api_impl/owner.rs b/libwallet/src/api_impl/owner.rs index bbbe8cdd7..99e299e68 100644 --- a/libwallet/src/api_impl/owner.rs +++ b/libwallet/src/api_impl/owner.rs @@ -25,7 +25,7 @@ use crate::util::OnionV3Address; use crate::api_impl::owner_updater::StatusMessage; use crate::grin_keychain::{Identifier, Keychain}; use crate::internal::{keys, scan, selection, tx, updater}; -use crate::slate::{PaymentInfo, Slate}; +use crate::slate::{PaymentInfo, Slate, SlateState}; use crate::types::{AcctPathMapping, NodeClient, TxLogEntry, WalletBackend, WalletInfo}; use crate::{ address, wallet_lock, InitTxArgs, IssueInvoiceTxArgs, NodeHeightResult, OutputCommitMapping, @@ -38,8 +38,6 @@ use ed25519_dalek::SecretKey as DalekSecretKey; use std::sync::mpsc::Sender; use std::sync::Arc; -const USER_MESSAGE_MAX_LEN: usize = 256; - /// List of accounts pub fn accounts<'a, T: ?Sized, C, K>(w: &mut T) -> Result, Error> where @@ -318,15 +316,18 @@ where None => w.parent_key_id(), }; - let message = match args.message { - Some(mut m) => { - m.truncate(USER_MESSAGE_MAX_LEN); - Some(m) - } - None => None, - }; + let mut slate = tx::new_tx_slate( + &mut *w, + args.amount, + false, + 2, + use_test_rng, + args.ttl_blocks, + )?; - let mut slate = tx::new_tx_slate(&mut *w, args.amount, 2, use_test_rng, args.ttl_blocks)?; + if let Some(v) = args.target_slate_version { + slate.version_info.version = v; + }; // if we just want to estimate, don't save a context, just send the results // back @@ -346,17 +347,17 @@ where return Ok(slate); } + let height = w.w2n_client().get_chain_tip()?.0; let mut context = tx::add_inputs_to_slate( &mut *w, keychain_mask, &mut slate, + height, args.minimum_confirmations, args.max_outputs as usize, args.num_change_outputs as usize, args.selection_strategy_is_use_all, &parent_key_id, - 0, - message, true, use_test_rng, )?; @@ -385,11 +386,12 @@ where // recieve the transaction back { let mut batch = w.batch(keychain_mask)?; - batch.save_private_context(slate.id.as_bytes(), 0, &context)?; + batch.save_private_context(slate.id.as_bytes(), &context)?; batch.commit()?; } - if let Some(v) = args.target_slate_version { - slate.version_info.orig_version = v; + + if slate.is_compact() { + slate.compact()?; } Ok(slate) @@ -418,36 +420,32 @@ where None => w.parent_key_id(), }; - let message = match args.message { - Some(mut m) => { - m.truncate(USER_MESSAGE_MAX_LEN); - Some(m) - } - None => None, - }; - - let mut slate = tx::new_tx_slate(&mut *w, args.amount, 2, use_test_rng, None)?; + let mut slate = tx::new_tx_slate(&mut *w, args.amount, true, 2, use_test_rng, None)?; + let height = w.w2n_client().get_chain_tip()?.0; let context = tx::add_output_to_slate( &mut *w, keychain_mask, &mut slate, + height, &parent_key_id, - 1, - message, true, use_test_rng, )?; + if let Some(v) = args.target_slate_version { + slate.version_info.version = v; + }; + // Save the aggsig context in our DB for when we // recieve the transaction back { let mut batch = w.batch(keychain_mask)?; - batch.save_private_context(slate.id.as_bytes(), 1, &context)?; + batch.save_private_context(slate.id.as_bytes(), &context)?; batch.commit()?; } - if let Some(v) = args.target_slate_version { - slate.version_info.orig_version = v; + if slate.is_compact() { + slate.compact()?; } Ok(slate) @@ -493,49 +491,77 @@ where } } - let message = match args.message { - Some(mut m) => { - m.truncate(USER_MESSAGE_MAX_LEN); - Some(m) - } - None => None, - }; - - // update slate current height - ret_slate.height = w.w2n_client().get_chain_tip()?.0; + let height = w.w2n_client().get_chain_tip()?.0; // update ttl if desired if let Some(b) = args.ttl_blocks { - ret_slate.ttl_cutoff_height = Some(ret_slate.height + b); + ret_slate.ttl_cutoff_height = height + b; + } + + // if this is compact mode, we need to create the transaction now + if ret_slate.is_compact() { + ret_slate.tx = Some(Transaction::empty()); } - let context = tx::add_inputs_to_slate( + // if self sending, make sure to store 'initiator' keys + let context_res = w.get_private_context(keychain_mask, slate.id.as_bytes()); + + let mut context = tx::add_inputs_to_slate( &mut *w, keychain_mask, &mut ret_slate, + height, args.minimum_confirmations, args.max_outputs as usize, args.num_change_outputs as usize, args.selection_strategy_is_use_all, &parent_key_id, - 0, - message, false, use_test_rng, )?; + let keychain = w.keychain(keychain_mask)?; + // needs to be stored as we're removing sig data for return trip. this needs to be present + // when locking transaction context and updating tx log with excess later + context.calculated_excess = Some(ret_slate.calc_excess(keychain.secp())?); + + // if self-sending, merge contexts + if let Ok(c) = context_res { + context.initial_sec_key = c.initial_sec_key; + context.initial_sec_nonce = c.initial_sec_nonce; + context.is_invoice = c.is_invoice; + context.fee = c.fee; + context.amount = c.amount; + for o in c.output_ids.iter() { + context.output_ids.push(o.clone()); + } + for i in c.input_ids.iter() { + context.input_ids.push(i.clone()); + } + } + + // adjust offset with inputs, repopulate inputs (initiator needs them for now) + // TODO: Revisit post-HF3 + if ret_slate.is_compact() { + tx::sub_inputs_from_offset(&mut *w, keychain_mask, &context, &mut ret_slate)?; + selection::repopulate_tx(&mut *w, keychain_mask, &mut ret_slate, &context, false)?; + } + // Save the aggsig context in our DB for when we // recieve the transaction back { let mut batch = w.batch(keychain_mask)?; - batch.save_private_context(slate.id.as_bytes(), 0, &context)?; + batch.save_private_context(slate.id.as_bytes(), &context)?; batch.commit()?; } - if let Some(v) = args.target_slate_version { - ret_slate.version_info.orig_version = v; + // Can remove amount as well as other sig data now + if ret_slate.is_compact() { + ret_slate.amount = 0; + ret_slate.remove_other_sigdata(&keychain, &context.sec_nonce, &context.sec_key)?; } + ret_slate.state = SlateState::Invoice2; Ok(ret_slate) } @@ -544,15 +570,32 @@ pub fn tx_lock_outputs<'a, T: ?Sized, C, K>( w: &mut T, keychain_mask: Option<&SecretKey>, slate: &Slate, - participant_id: usize, ) -> Result<(), Error> where T: WalletBackend<'a, C, K>, C: NodeClient + 'a, K: Keychain + 'a, { - let context = w.get_private_context(keychain_mask, slate.id.as_bytes(), participant_id)?; - selection::lock_tx_context(&mut *w, keychain_mask, slate, &context) + let context = w.get_private_context(keychain_mask, slate.id.as_bytes())?; + let mut sl = slate.clone(); + let mut excess_override = None; + if sl.is_compact() && sl.tx == None { + // attempt to repopulate if we're the initiator + sl.tx = Some(Transaction::empty()); + selection::repopulate_tx(&mut *w, keychain_mask, &mut sl, &context, true)?; + } else if sl.participant_data.len() == 1 { + // purely for invoice workflow, payer needs the excess back temporarily for storage + excess_override = context.calculated_excess; + } + let height = w.w2n_client().get_chain_tip()?.0; + selection::lock_tx_context( + &mut *w, + keychain_mask, + &sl, + height, + &context, + excess_override, + ) } /// Finalize slate @@ -568,17 +611,32 @@ where { let mut sl = slate.clone(); check_ttl(w, &sl)?; - let context = w.get_private_context(keychain_mask, sl.id.as_bytes(), 0)?; + let context = w.get_private_context(keychain_mask, sl.id.as_bytes())?; let parent_key_id = w.parent_key_id(); - tx::complete_tx(&mut *w, keychain_mask, &mut sl, 0, &context)?; + + // since we're now actually inserting our inputs, pick an offset and adjust + // our contribution to the excess by offset amount + // TODO: Post HF3, this should allow for inputs to be picked at this stage + // as opposed to locking them prior to this stage, as the excess to this point + // will just be the change output + + if sl.is_compact() { + tx::sub_inputs_from_offset(&mut *w, keychain_mask, &context, &mut sl)?; + selection::repopulate_tx(&mut *w, keychain_mask, &mut sl, &context, true)?; + } + + tx::complete_tx(&mut *w, keychain_mask, &mut sl, &context)?; tx::verify_slate_payment_proof(&mut *w, keychain_mask, &parent_key_id, &context, &sl)?; tx::update_stored_tx(&mut *w, keychain_mask, &context, &sl, false)?; - tx::update_message(&mut *w, keychain_mask, &sl)?; { let mut batch = w.batch(keychain_mask)?; - batch.delete_private_context(sl.id.as_bytes(), 0)?; + batch.delete_private_context(sl.id.as_bytes())?; batch.commit()?; } + sl.state = SlateState::Standard3; + if sl.is_compact() { + sl.amount = 0; + } Ok(sl) } @@ -612,16 +670,13 @@ where } /// get stored tx -pub fn get_stored_tx<'a, T: ?Sized, C, K>( - w: &T, - entry: &TxLogEntry, -) -> Result, Error> +pub fn get_stored_tx<'a, T: ?Sized, C, K>(w: &T, id: &Uuid) -> Result, Error> where T: WalletBackend<'a, C, K>, C: NodeClient + 'a, K: Keychain + 'a, { - w.get_stored_tx(entry) + w.get_stored_tx(&format!("{}", id)) } /// Posts a transaction to the chain @@ -644,11 +699,6 @@ where } } -/// verify slate messages -pub fn verify_slate_messages(slate: &Slate) -> Result<(), Error> { - slate.verify_messages() -} - /// check repair /// Accepts a wallet inst instead of a raw wallet so it can /// lock as little as possible @@ -727,6 +777,26 @@ where } } } + +/// return whether slate was an invoice tx +pub fn context_is_invoice<'a, L, C, K>( + wallet_inst: Arc>>>, + keychain_mask: Option<&SecretKey>, + slate: &Slate, +) -> Result +where + L: WalletLCProvider<'a, C, K>, + C: NodeClient + 'a, + K: Keychain + 'a, +{ + let context = { + wallet_lock!(wallet_inst, w); + let context = w.get_private_context(keychain_mask, slate.id.as_bytes())?; + context + }; + Ok(context.is_invoice) +} + /// Experimental, wrap the entire definition of how a wallet's state is updated pub fn update_wallet_state<'a, L, C, K>( wallet_inst: Arc>>>, @@ -873,8 +943,8 @@ where { // Refuse if TTL is expired let last_confirmed_height = w.last_confirmed_height()?; - if let Some(e) = slate.ttl_cutoff_height { - if last_confirmed_height >= e { + if slate.ttl_cutoff_height != 0 { + if last_confirmed_height >= slate.ttl_cutoff_height { return Err(ErrorKind::TransactionExpired.into()); } } diff --git a/libwallet/src/api_impl/types.rs b/libwallet/src/api_impl/types.rs index 7a6fb5b65..1aa6e7ae9 100644 --- a/libwallet/src/api_impl/types.rs +++ b/libwallet/src/api_impl/types.rs @@ -24,31 +24,6 @@ use grin_wallet_util::OnionV3Address; use ed25519_dalek::Signature as DalekSignature; -/// Send TX API Args -// TODO: This is here to ensure the legacy V1 API remains intact -// remove this when v1 api is removed -#[derive(Clone, Serialize, Deserialize)] -pub struct SendTXArgs { - /// amount to send - pub amount: u64, - /// minimum confirmations - pub minimum_confirmations: u64, - /// payment method - pub method: String, - /// destination url - pub dest: String, - /// Max number of outputs - pub max_outputs: usize, - /// Number of change outputs to generate - pub num_change_outputs: usize, - /// whether to use all outputs (combine) - pub selection_strategy_is_use_all: bool, - /// Optional message, that will be signed - pub message: Option, - /// Optional slate version to target when sending - pub target_slate_version: Option, -} - /// V2 Init / Send TX API Args #[derive(Clone, Serialize, Deserialize)] pub struct InitTxArgs { @@ -80,12 +55,6 @@ pub struct InitTxArgs { /// as many outputs as are needed to meet the amount, (and no more) starting with the smallest /// value outputs. pub selection_strategy_is_use_all: bool, - /// An optional participant message to include alongside the sender's public - /// ParticipantData within the slate. This message will include a signature created with the - /// sender's private excess value, and will be publically verifiable. Note this message is for - /// the convenience of the participants during the exchange; it is not included in the final - /// transaction sent to the chain. The message will be truncated to 256 characters. - pub message: Option, /// Optionally set the output target slate version (acceptable /// down to the minimum slate version compatible with the current. If `None` the slate /// is generated with the latest version. @@ -133,7 +102,6 @@ impl Default for InitTxArgs { max_outputs: 500, num_change_outputs: 1, selection_strategy_is_use_all: true, - message: None, target_slate_version: None, ttl_blocks: None, estimate_only: Some(false), @@ -153,8 +121,6 @@ pub struct IssueInvoiceTxArgs { /// The invoice amount in nanogrins. (`1 G = 1_000_000_000nG`) #[serde(with = "secp_ser::string_or_u64")] pub amount: u64, - /// Optional message, that will be signed - pub message: Option, /// Optionally set the output target slate version (acceptable /// down to the minimum slate version compatible with the current. If `None` the slate /// is generated with the latest version. @@ -166,7 +132,6 @@ impl Default for IssueInvoiceTxArgs { IssueInvoiceTxArgs { dest_acct_name: None, amount: 0, - message: None, target_slate_version: None, } } diff --git a/libwallet/src/error.rs b/libwallet/src/error.rs index df154256f..244ab727d 100644 --- a/libwallet/src/error.rs +++ b/libwallet/src/error.rs @@ -186,6 +186,10 @@ pub enum ErrorKind { #[fail(display = "Committed Error")] Committed(committed::Error), + /// Error from summing commitments + #[fail(display = "Committed Error: {}", _0)] + Commit(String), + /// Can't parse slate version #[fail(display = "Can't parse slate version")] SlateVersionParse, @@ -258,6 +262,14 @@ pub enum ErrorKind { #[fail(display = "Transaction Expired")] TransactionExpired, + /// Kernel features args don't exist + #[fail(display = "Kernel Features Arg {} missing", _0)] + KernelFeaturesMissing(String), + + /// Unknown Kernel Feature + #[fail(display = "Unknown Kernel Feature: {}", _0)] + UnknownKernelFeatures(u8), + /// Other #[fail(display = "Generic error: {}", _0)] GenericError(String), diff --git a/libwallet/src/internal/selection.rs b/libwallet/src/internal/selection.rs index 22feabcd7..16564ade3 100644 --- a/libwallet/src/internal/selection.rs +++ b/libwallet/src/internal/selection.rs @@ -24,6 +24,7 @@ use crate::grin_core::libtx::{ }; use crate::grin_keychain::{Identifier, Keychain}; use crate::grin_util::secp::key::SecretKey; +use crate::grin_util::secp::pedersen; use crate::internal::keys; use crate::slate::Slate; use crate::types::*; @@ -40,11 +41,13 @@ pub fn build_send_tx<'a, T: ?Sized, C, K>( keychain: &K, keychain_mask: Option<&SecretKey>, slate: &mut Slate, + current_height: u64, minimum_confirmations: u64, max_outputs: usize, change_outputs: usize, selection_strategy_is_use_all: bool, parent_key_id: Identifier, + is_invoice: bool, use_test_nonce: bool, ) -> Result where @@ -52,16 +55,21 @@ where C: NodeClient + 'a, K: Keychain + 'a, { + //TODO: Revise HF3. If we're sending V4 slates, only include + // change outputs in excess sum + let include_inputs_in_sum = !slate.is_compact(); + let (elems, inputs, change_amounts_derivations, fee) = select_send_tx( wallet, keychain_mask, slate.amount, - slate.height, + current_height, minimum_confirmations, max_outputs, change_outputs, selection_strategy_is_use_all, &parent_key_id, + include_inputs_in_sum, )?; // Update the fee on the slate so we account for this when building the tx. @@ -75,10 +83,11 @@ where blinding.secret_key(&keychain.secp()).unwrap(), &parent_key_id, use_test_nonce, - 0, + is_invoice, ); context.fee = fee; + context.amount = slate.amount; // Store our private identifiers for each input for input in inputs { @@ -105,7 +114,9 @@ pub fn lock_tx_context<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, slate: &Slate, + current_height: u64, context: &Context, + excess_override: Option, ) -> Result<(), Error> where T: WalletBackend<'a, C, K>, @@ -132,9 +143,8 @@ where let tx_entry = { let lock_inputs = context.get_inputs(); - let messages = Some(slate.participant_messages()); let slate_id = slate.id; - let height = slate.height; + let height = current_height; let parent_key_id = context.parent_key_id.clone(); let mut batch = wallet.batch(keychain_mask)?; let log_id = batch.next_tx_log_id(&parent_key_id)?; @@ -142,13 +152,19 @@ where t.tx_slate_id = Some(slate_id); let filename = format!("{}.grintx", slate_id); t.stored_tx = Some(filename); - t.fee = Some(slate.fee); - t.ttl_cutoff_height = slate.ttl_cutoff_height; + t.fee = Some(context.fee); + t.ttl_cutoff_height = match slate.ttl_cutoff_height { + 0 => None, + n => Some(n), + }; - if let Ok(e) = slate.calc_excess(&keychain) { + if let Ok(e) = slate.calc_excess(keychain.secp()) { t.kernel_excess = Some(e) } - t.kernel_lookup_min_height = Some(slate.height); + if let Some(e) = excess_override { + t.kernel_excess = Some(e) + } + t.kernel_lookup_min_height = Some(current_height); let mut amount_debited = 0; t.num_inputs = lock_inputs.len(); @@ -160,7 +176,6 @@ where } t.amount_debited = amount_debited; - t.messages = messages; // store extra payment proof info, if required if let Some(ref p) = slate.payment_proof { @@ -225,9 +240,11 @@ pub fn build_recipient_output<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, slate: &mut Slate, + current_height: u64, parent_key_id: Identifier, + is_invoice: bool, use_test_rng: bool, -) -> Result<(Identifier, Context), Error> +) -> Result<(Identifier, Context, TxLogEntry), Error> where T: WalletBackend<'a, C, K>, C: NodeClient + 'a, @@ -238,7 +255,7 @@ where let keychain = wallet.keychain(keychain_mask)?; let key_id_inner = key_id.clone(); let amount = slate.amount; - let height = slate.height; + let height = current_height; let slate_id = slate.id; let blinding = slate.add_transaction_elements( @@ -255,11 +272,12 @@ where .unwrap(), &parent_key_id, use_test_rng, - 1, + is_invoice, ); context.add_output(&key_id, &None, amount); - let messages = Some(slate.participant_messages()); + context.amount = amount; + context.fee = slate.fee; let commit = wallet.calc_commit_for_cache(keychain_mask, amount, &key_id_inner)?; let mut batch = wallet.batch(keychain_mask)?; let log_id = batch.next_tx_log_id(&parent_key_id)?; @@ -267,13 +285,15 @@ where t.tx_slate_id = Some(slate_id); t.amount_credited = amount; t.num_outputs = 1; - t.messages = messages; - t.ttl_cutoff_height = slate.ttl_cutoff_height; + t.ttl_cutoff_height = match slate.ttl_cutoff_height { + 0 => None, + n => Some(n), + }; // when invoicing, this will be invalid - if let Ok(e) = slate.calc_excess(&keychain) { + if let Ok(e) = slate.calc_excess(keychain.secp()) { t.kernel_excess = Some(e) } - t.kernel_lookup_min_height = Some(slate.height); + t.kernel_lookup_min_height = Some(current_height); batch.save(OutputData { root_key_id: parent_key_id.clone(), key_id: key_id_inner.clone(), @@ -287,10 +307,10 @@ where is_coinbase: false, tx_log_entry: Some(log_id), })?; - batch.save_tx_log_entry(t, &parent_key_id)?; + batch.save_tx_log_entry(t.clone(), &parent_key_id)?; batch.commit()?; - Ok((key_id, context)) + Ok((key_id, context, t)) } /// Builds a transaction to send to someone from the HD seed associated with the @@ -306,6 +326,7 @@ pub fn select_send_tx<'a, T: ?Sized, C, K, B>( change_outputs: usize, selection_strategy_is_use_all: bool, parent_key_id: &Identifier, + include_inputs_in_sum: bool, ) -> Result< ( Vec>>, @@ -333,8 +354,15 @@ where )?; // build transaction skeleton with inputs and change - let (parts, change_amounts_derivations) = - inputs_and_change(&coins, wallet, keychain_mask, amount, fee, change_outputs)?; + let (parts, change_amounts_derivations) = inputs_and_change( + &coins, + wallet, + keychain_mask, + amount, + fee, + change_outputs, + include_inputs_in_sum, + )?; Ok((parts, coins, change_amounts_derivations, fee)) } @@ -455,6 +483,7 @@ pub fn inputs_and_change<'a, T: ?Sized, C, K, B>( amount: u64, fee: u64, num_change_outputs: usize, + include_inputs_in_sum: bool, ) -> Result< ( Vec>>, @@ -479,11 +508,13 @@ where let change = total - amount - fee; // build inputs using the appropriate derived key_ids - for coin in coins { - if coin.is_coinbase { - parts.push(build::coinbase_input(coin.value, coin.key_id.clone())); - } else { - parts.push(build::input(coin.value, coin.key_id.clone())); + if include_inputs_in_sum { + for coin in coins { + if coin.is_coinbase { + parts.push(build::coinbase_input(coin.value, coin.key_id.clone())); + } else { + parts.push(build::input(coin.value, coin.key_id.clone())); + } } } @@ -616,3 +647,53 @@ fn select_from(amount: u64, select_all: bool, outputs: Vec) -> Optio None } } + +/// Repopulates output in the slate's tranacstion +/// with outputs from the stored context +/// change outputs and tx log entry +/// Remove the explicitly stored excess +pub fn repopulate_tx<'a, T: ?Sized, C, K>( + wallet: &mut T, + keychain_mask: Option<&SecretKey>, + slate: &mut Slate, + context: &Context, + update_fee: bool, +) -> Result<(), Error> +where + T: WalletBackend<'a, C, K>, + C: NodeClient + 'a, + K: Keychain + 'a, +{ + // restore the original amount, fee + slate.amount = context.amount; + if update_fee { + slate.fee = context.fee; + } + + let keychain = wallet.keychain(keychain_mask)?; + + // restore my signature data + slate.add_participant_info(&keychain, &context.sec_key, &context.sec_nonce, None)?; + + let mut parts = vec![]; + for (id, _, value) in &context.get_inputs() { + let input = wallet.iter().find(|out| out.key_id == *id); + if let Some(i) = input { + if i.is_coinbase { + parts.push(build::coinbase_input(*value, i.key_id.clone())); + } else { + parts.push(build::input(*value, i.key_id.clone())); + } + } + } + for (id, _, value) in &context.get_outputs() { + let output = wallet.iter().find(|out| out.key_id == *id); + if let Some(i) = output { + parts.push(build::output(*value, i.key_id.clone())); + } + } + let _ = slate.add_transaction_elements(&keychain, &ProofBuilder::new(&keychain), parts)?; + // restore the original offset + slate.tx_or_err_mut()?.offset = slate.offset.clone(); + Ok(()) +} diff --git a/libwallet/src/internal/tx.rs b/libwallet/src/internal/tx.rs index 2a6407c4a..4b53f632c 100644 --- a/libwallet/src/internal/tx.rs +++ b/libwallet/src/internal/tx.rs @@ -20,7 +20,7 @@ use uuid::Uuid; use crate::grin_core::consensus::valid_header_version; use crate::grin_core::core::HeaderVersion; -use crate::grin_keychain::{Identifier, Keychain}; +use crate::grin_keychain::{BlindSum, BlindingFactor, Identifier, Keychain, SwitchCommitmentType}; use crate::grin_util::secp::key::SecretKey; use crate::grin_util::secp::pedersen; use crate::grin_util::Mutex; @@ -44,7 +44,8 @@ lazy_static! { pub fn new_tx_slate<'a, T: ?Sized, C, K>( wallet: &mut T, amount: u64, - num_participants: usize, + is_invoice: bool, + num_participants: u8, use_test_rng: bool, ttl_blocks: Option, ) -> Result @@ -54,9 +55,9 @@ where K: Keychain + 'a, { let current_height = wallet.w2n_client().get_chain_tip()?.0; - let mut slate = Slate::blank(num_participants); + let mut slate = Slate::blank(num_participants, is_invoice); if let Some(b) = ttl_blocks { - slate.ttl_cutoff_height = Some(current_height + b); + slate.ttl_cutoff_height = current_height + b; } if use_test_rng { { @@ -67,7 +68,6 @@ where *SLATE_COUNTER.lock() += 1; } slate.amount = amount; - slate.height = current_height; if valid_header_version(current_height, HeaderVersion(1)) { slate.version_info.block_header_version = 1; @@ -81,9 +81,9 @@ where slate.version_info.block_header_version = 3; } - // Set the lock_height explicitly to 0 here. + // Set the features explicitly to 0 here. // This will generate a Plain kernel (rather than a HeightLocked kernel). - slate.lock_height = 0; + slate.kernel_features = 0; Ok(slate) } @@ -140,14 +140,13 @@ pub fn add_inputs_to_slate<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, slate: &mut Slate, + current_height: u64, minimum_confirmations: u64, max_outputs: usize, num_change_outputs: usize, selection_strategy_is_use_all: bool, parent_key_id: &Identifier, - participant_id: usize, - message: Option, - is_initator: bool, + is_initiator: bool, use_test_rng: bool, ) -> Result where @@ -170,11 +169,13 @@ where &wallet.keychain(keychain_mask)?, keychain_mask, slate, + current_height, minimum_confirmations, max_outputs, num_change_outputs, selection_strategy_is_use_all, parent_key_id.clone(), + !is_initiator, use_test_rng, )?; @@ -185,18 +186,17 @@ where &wallet.keychain(keychain_mask)?, &mut context.sec_key, &context.sec_nonce, - participant_id, - message, use_test_rng, )?; - if !is_initator { + context.initial_sec_key = context.sec_key.clone(); + + if !is_initiator { // perform partial sig slate.fill_round_2( &wallet.keychain(keychain_mask)?, &context.sec_key, &context.sec_nonce, - participant_id, )?; } @@ -208,9 +208,8 @@ pub fn add_output_to_slate<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, slate: &mut Slate, + current_height: u64, parent_key_id: &Identifier, - participant_id: usize, - message: Option, is_initiator: bool, use_test_rng: bool, ) -> Result @@ -219,33 +218,36 @@ where C: NodeClient + 'a, K: Keychain + 'a, { + let keychain = wallet.keychain(keychain_mask)?; // create an output using the amount in the slate - let (_, mut context) = selection::build_recipient_output( + let (_, mut context, mut tx) = selection::build_recipient_output( wallet, keychain_mask, slate, + current_height, parent_key_id.clone(), + is_initiator, use_test_rng, )?; // fill public keys slate.fill_round_1( - &wallet.keychain(keychain_mask)?, + &keychain, &mut context.sec_key, &context.sec_nonce, - 1, - message, use_test_rng, )?; + context.initial_sec_key = context.sec_key.clone(); + if !is_initiator { // perform partial sig - slate.fill_round_2( - &wallet.keychain(keychain_mask)?, - &context.sec_key, - &context.sec_nonce, - participant_id, - )?; + slate.fill_round_2(&keychain, &context.sec_key, &context.sec_nonce)?; + // update excess in stored transaction + let mut batch = wallet.batch(keychain_mask)?; + tx.kernel_excess = Some(slate.calc_excess(keychain.secp())?); + batch.save_tx_log_entry(tx.clone(), &parent_key_id)?; + batch.commit()?; } Ok(context) @@ -256,7 +258,6 @@ pub fn complete_tx<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, slate: &mut Slate, - participant_id: usize, context: &Context, ) -> Result<(), Error> where @@ -264,14 +265,23 @@ where C: NodeClient + 'a, K: Keychain + 'a, { - slate.fill_round_2( - &wallet.keychain(keychain_mask)?, - &context.sec_key, - &context.sec_nonce, - participant_id, - )?; + // when self sending invoice tx, use initiator nonce to finalize + let (sec_key, sec_nonce) = { + if context.initial_sec_key != context.sec_key + && context.initial_sec_nonce != context.sec_nonce + { + ( + context.initial_sec_key.clone(), + context.initial_sec_nonce.clone(), + ) + } else { + (context.sec_key.clone(), context.sec_nonce.clone()) + } + }; + slate.fill_round_2(&wallet.keychain(keychain_mask)?, &sec_key, &sec_nonce)?; // Final transaction can be built by anyone at this stage + trace!("Slate to finalize is: {}", slate); slate.finalize(&wallet.keychain(keychain_mask)?)?; Ok(()) } @@ -351,9 +361,11 @@ where Some(t) => t, None => return Err(ErrorKind::TransactionDoesntExist(slate.id.to_string()).into()), }; - wallet.store_tx(&format!("{}", tx.tx_slate_id.unwrap()), slate.tx_or_err()?)?; let parent_key = tx.parent_key_id.clone(); - tx.kernel_excess = Some(slate.tx_or_err()?.body.kernels[0].excess); + { + let keychain = wallet.keychain(keychain_mask)?; + tx.kernel_excess = Some(slate.calc_excess(keychain.secp())?); + } if let Some(ref p) = slate.clone().payment_proof { let derivation_index = match context.payment_proof_derivation_index { @@ -362,7 +374,7 @@ where }; let keychain = wallet.keychain(keychain_mask)?; let parent_key_id = wallet.parent_key_id(); - let excess = slate.calc_excess(&keychain)?; + let excess = slate.calc_excess(keychain.secp())?; let sender_key = address::address_from_derivation_path(&keychain, &parent_key_id, derivation_index)?; let sender_address = OnionV3Address::from_private(&sender_key.0)?; @@ -377,34 +389,52 @@ where }) } + wallet.store_tx(&format!("{}", tx.tx_slate_id.unwrap()), slate.tx_or_err()?)?; + let mut batch = wallet.batch(keychain_mask)?; batch.save_tx_log_entry(tx, &parent_key)?; batch.commit()?; Ok(()) } -/// Update the transaction participant messages -pub fn update_message<'a, T: ?Sized, C, K>( +/// Update the transaction's offset by subtracting the inputs +/// stored in the context +pub fn sub_inputs_from_offset<'a, T: ?Sized, C, K>( wallet: &mut T, keychain_mask: Option<&SecretKey>, - slate: &Slate, + context: &Context, + slate: &mut Slate, ) -> Result<(), Error> where T: WalletBackend<'a, C, K>, C: NodeClient + 'a, K: Keychain + 'a, { - let tx_vec = updater::retrieve_txs(wallet, None, Some(slate.id), None, false)?; - if tx_vec.is_empty() { - return Err(ErrorKind::TransactionDoesntExist(slate.id.to_string()).into()); - } - let mut batch = wallet.batch(keychain_mask)?; - for mut tx in tx_vec.into_iter() { - tx.messages = Some(slate.participant_messages()); - let parent_key = tx.parent_key_id.clone(); - batch.save_tx_log_entry(tx, &parent_key)?; - } - batch.commit()?; + let k = wallet.keychain(keychain_mask)?; + // Offset has been created and adjusted + // Now subtract sum total of all my inputs from the offset + let new_offset = k.blind_sum( + &context + .get_inputs() + .iter() + .map( + |i| match k.derive_key(i.2, &i.0, SwitchCommitmentType::Regular) { + Ok(k) => BlindingFactor::from_secret_key(k), + Err(e) => { + error!("Error deriving key for offset: {}", e); + BlindingFactor::zero() + } + }, + ) + .fold( + BlindSum::new().add_blinding_factor(slate.offset.clone()), + |acc, x| acc.sub_blinding_factor(x.clone()), + ), + )?; + + slate.offset = new_offset.clone(); + slate.tx_or_err_mut()?.offset = new_offset; + Ok(()) } @@ -531,7 +561,7 @@ where } let msg = payment_proof_message( slate.amount, - &slate.calc_excess(&keychain)?, + &slate.calc_excess(&keychain.secp())?, orig_sender_address.to_ed25519()?, )?; let sig = match p.receiver_signature { diff --git a/libwallet/src/lib.rs b/libwallet/src/lib.rs index 2b6666da8..6679961ef 100644 --- a/libwallet/src/lib.rs +++ b/libwallet/src/lib.rs @@ -55,15 +55,15 @@ pub mod slate_versions; mod types; pub use crate::error::{Error, ErrorKind}; -pub use crate::slate::{ParticipantData, ParticipantMessageData, Slate}; +pub use crate::slate::{ParticipantData, Slate, SlateState}; pub use crate::slate_versions::{ - SlateVersion, VersionedCoinbase, VersionedSlate, CURRENT_SLATE_VERSION, + SlateVersion, VersionedBinSlate, VersionedCoinbase, VersionedSlate, CURRENT_SLATE_VERSION, GRIN_BLOCK_HEADER_VERSION, }; pub use api_impl::owner_updater::StatusMessage; pub use api_impl::types::{ BlockFees, InitTxArgs, InitTxSendArgs, IssueInvoiceTxArgs, NodeHeightResult, - OutputCommitMapping, PaymentProof, SendTXArgs, VersionInfo, + OutputCommitMapping, PaymentProof, VersionInfo, }; pub use internal::scan::scan; pub use slate_versions::ser as dalek_ser; diff --git a/libwallet/src/slate.rs b/libwallet/src/slate.rs index c68a92bc4..f4f15d9e1 100644 --- a/libwallet/src/slate.rs +++ b/libwallet/src/slate.rs @@ -15,73 +15,58 @@ //! Functions for building partial transactions to be passed //! around during an interactive wallet exchange -use crate::blake2::blake2b::blake2b; use crate::error::{Error, ErrorKind}; use crate::grin_core::core::amount_to_hr_string; -use crate::grin_core::core::committed::Committed; use crate::grin_core::core::transaction::{ - Input, KernelFeatures, Output, Transaction, TransactionBody, TxKernel, Weighting, + Input, KernelFeatures, Output, OutputFeatures, Transaction, TransactionBody, TxKernel, + Weighting, }; use crate::grin_core::core::verifier_cache::LruVerifierCache; -use crate::grin_core::libtx::{aggsig, build, proof::ProofBuild, secp_ser, tx_fee}; +use crate::grin_core::libtx::{aggsig, build, proof::ProofBuild, tx_fee}; use crate::grin_core::map_vec; use crate::grin_keychain::{BlindSum, BlindingFactor, Keychain}; use crate::grin_util::secp::key::{PublicKey, SecretKey}; use crate::grin_util::secp::pedersen::Commitment; use crate::grin_util::secp::Signature; -use crate::grin_util::ToHex; -use crate::grin_util::{self, secp, RwLock}; -use crate::slate_versions::ser as dalek_ser; +use crate::grin_util::{secp, static_secp_instance, RwLock}; use ed25519_dalek::PublicKey as DalekPublicKey; use ed25519_dalek::Signature as DalekSignature; -use failure::ResultExt; use rand::rngs::mock::StepRng; use rand::thread_rng; use serde::ser::{Serialize, Serializer}; use serde_json; -use std::convert::TryFrom; use std::fmt; use std::sync::Arc; use uuid::Uuid; -use crate::slate_versions::v3::SlateV3; use crate::slate_versions::v4::{ - CoinbaseV4, InputV4, OutputV4, ParticipantDataV4, PaymentInfoV4, SlateV4, TransactionBodyV4, - TransactionV4, TxKernelV4, VersionCompatInfoV4, + CoinbaseV4, CommitsV4, InputV4, KernelFeaturesArgsV4, OutputFeaturesV4, OutputV4, + ParticipantDataV4, PaymentInfoV4, SlateStateV4, SlateV4, TransactionBodyV4, TransactionV4, + TxKernelV4, VersionCompatInfoV4, }; +use crate::slate_versions::VersionedSlate; use crate::slate_versions::{CURRENT_SLATE_VERSION, GRIN_BLOCK_HEADER_VERSION}; use crate::types::CbData; -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Debug, Clone)] pub struct PaymentInfo { - #[serde(with = "dalek_ser::dalek_pubkey_serde")] + /// Sender address pub sender_address: DalekPublicKey, - #[serde(with = "dalek_ser::dalek_pubkey_serde")] + /// Receiver address pub receiver_address: DalekPublicKey, - #[serde(with = "dalek_ser::option_dalek_sig_serde")] + /// Receiver signature pub receiver_signature: Option, } /// Public data for each participant in the slate -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Debug, Clone)] pub struct ParticipantData { - /// Id of participant in the transaction. (For now, 0=sender, 1=rec) - #[serde(with = "secp_ser::string_or_u64")] - pub id: u64, /// Public key corresponding to private blinding factor - #[serde(with = "secp_ser::pubkey_serde")] pub public_blind_excess: PublicKey, /// Public key corresponding to private nonce - #[serde(with = "secp_ser::pubkey_serde")] pub public_nonce: PublicKey, /// Public partial signature - #[serde(with = "secp_ser::option_sig_serde")] pub part_sig: Option, - /// A message for other participants - pub message: Option, - /// Signature, created with private key corresponding to 'public_blind_excess' - #[serde(with = "secp_ser::option_sig_serde")] - pub message_sig: Option, } impl ParticipantData { @@ -101,129 +86,99 @@ impl ParticipantData { } } -/// Public message data (for serialising and storage) -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ParticipantMessageData { - /// id of the particpant in the tx - #[serde(with = "secp_ser::string_or_u64")] - pub id: u64, - /// Public key - #[serde(with = "secp_ser::pubkey_serde")] - pub public_key: PublicKey, - /// Message, - pub message: Option, - /// Signature - #[serde(with = "secp_ser::option_sig_serde")] - pub message_sig: Option, -} - -impl ParticipantMessageData { - /// extract relevant message data from participant data - pub fn from_participant_data(p: &ParticipantData) -> ParticipantMessageData { - ParticipantMessageData { - id: p.id, - public_key: p.public_blind_excess, - message: p.message.clone(), - message_sig: p.message_sig, - } - } -} - -impl fmt::Display for ParticipantMessageData { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - writeln!(f)?; - write!(f, "Participant ID {} ", self.id)?; - if self.id == 0 { - writeln!(f, "(Sender)")?; - } else { - writeln!(f, "(Recipient)")?; - } - writeln!(f, "---------------------")?; - let static_secp = grin_util::static_secp_instance(); - let static_secp = static_secp.lock(); - writeln!( - f, - "Public Key: {}", - &self.public_key.serialize_vec(&static_secp, true).to_hex() - )?; - let message = match self.message.clone() { - None => "None".to_owned(), - Some(m) => m, - }; - writeln!(f, "Message: {}", message)?; - let message_sig = match self.message_sig { - None => "None".to_owned(), - Some(m) => m.to_raw_data().as_ref().to_hex(), - }; - writeln!(f, "Message Signature: {}", message_sig) - } -} - /// A 'Slate' is passed around to all parties to build up all of the public /// transaction data needed to create a finalized transaction. Callers can pass /// the slate around by whatever means they choose, (but we can provide some /// binary or JSON serialization helpers here). -#[derive(Deserialize, Debug, Clone)] +#[derive(Debug, Clone)] pub struct Slate { /// Versioning info pub version_info: VersionCompatInfo, /// The number of participants intended to take part in this transaction - pub num_participants: usize, + pub num_participants: u8, /// Unique transaction ID, selected by sender pub id: Uuid, + /// Slate state + pub state: SlateState, /// The core transaction data: /// inputs, outputs, kernels, kernel offset /// Optional as of V4 to allow for a compact /// transaction initiation pub tx: Option, /// base amount (excluding fee) - #[serde(with = "secp_ser::string_or_u64")] pub amount: u64, /// fee amount - #[serde(with = "secp_ser::string_or_u64")] pub fee: u64, - /// Block height for the transaction - #[serde(with = "secp_ser::string_or_u64")] - pub height: u64, - /// Lock height - #[serde(with = "secp_ser::string_or_u64")] - pub lock_height: u64, /// TTL, the block height at which wallets /// should refuse to process the transaction and unlock all /// associated outputs - #[serde(with = "secp_ser::opt_string_or_u64")] - pub ttl_cutoff_height: Option, + pub ttl_cutoff_height: u64, + /// Kernel Features flag, if any + pub kernel_features: u8, + /// Offset, needed when posting of tranasction is deferred + pub offset: BlindingFactor, /// Participant data, each participant in the transaction will /// insert their public data here. For now, 0 is sender and 1 /// is receiver, though this will change for multi-party pub participant_data: Vec, /// Payment Proof - #[serde(default = "default_payment_none")] pub payment_proof: Option, + /// Kernel features arguments + pub kernel_features_args: Option, + //TODO: Remove post HF3 + /// participant ID, only stored for compatibility with V3 slates + /// not serialized anywhere + pub participant_id: Option, +} + +impl fmt::Display for Slate { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", serde_json::to_string_pretty(&self).unwrap()) + } +} + +/// Slate state definition +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum SlateState { + /// Unknown, coming from earlier slate versions + Unknown, + /// Standard flow, freshly init + Standard1, + /// Standard flow, return journey + Standard2, + /// Standard flow, ready for transaction posting + Standard3, + /// Invoice flow, freshly init + Invoice1, + ///Invoice flow, return journey + Invoice2, + /// Invoice flow, ready for tranasction posting + Invoice3, } -fn default_payment_none() -> Option { - None +#[derive(Debug, Clone, PartialEq, Eq)] +/// Kernel features arguments definition +pub struct KernelFeaturesArgs { + /// Lock height, for HeightLocked + pub lock_height: u64, +} + +impl Default for KernelFeaturesArgs { + fn default() -> KernelFeaturesArgs { + KernelFeaturesArgs { lock_height: 0 } + } } + /// Versioning and compatibility info about this slate -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Debug, Clone)] pub struct VersionCompatInfo { /// The current version of the slate format pub version: u16, - /// Original version this slate was converted from - pub orig_version: u16, /// The grin block header version this slate is intended for pub block_header_version: u16, } -/// Helper just to facilitate serialization -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ParticipantMessages { - /// included messages - pub messages: Vec, -} - impl Slate { /// Return the transaction, throwing an error if it doesn't exist /// to be used at points in the code where the existence of a transaction @@ -242,48 +197,95 @@ impl Slate { None => Err(ErrorKind::SlateTransactionRequired.into()), } } - /// Attempt to find slate version - pub fn parse_slate_version(slate_json: &str) -> Result { - let probe: SlateVersionProbe = - serde_json::from_str(slate_json).map_err(|_| ErrorKind::SlateVersionParse)?; - Ok(probe.version()) + /// Whether the slate started life as a compact slate + pub fn is_compact(&self) -> bool { + self.version_info.version >= 4 + } + + /// number of participants + pub fn num_participants(&self) -> u8 { + match self.num_participants { + 0 => 2, + n => n, + } + } + + /// Compact the slate for initial sending, storing the excess + offset explicit + /// and removing my input/output data + /// This info must be stored in the context for repopulation later + pub fn compact(&mut self) -> Result<(), Error> { + self.tx = None; + Ok(()) } /// Recieve a slate, upgrade it to the latest version internally + /// Throw error if this can't be done pub fn deserialize_upgrade(slate_json: &str) -> Result { - let version = Slate::parse_slate_version(slate_json)?; - let v4: SlateV4 = match version { - 4 => serde_json::from_str(slate_json).context(ErrorKind::SlateDeser)?, - 3 => { - let v3: SlateV3 = - serde_json::from_str(slate_json).context(ErrorKind::SlateDeser)?; - SlateV4::from(v3) - } - _ => return Err(ErrorKind::SlateVersion(version).into()), + let v_slate: VersionedSlate = + serde_json::from_str(slate_json).map_err(|_| ErrorKind::SlateVersionParse)?; + Slate::upgrade(v_slate) + } + + /// Upgrade a versioned slate + pub fn upgrade(v_slate: VersionedSlate) -> Result { + let v4: SlateV4 = match v_slate { + VersionedSlate::V4(s) => s, + VersionedSlate::V3(s) => SlateV4::from(s), }; Ok(v4.into()) } /// Create a new slate - pub fn blank(num_participants: usize) -> Slate { + pub fn blank(num_participants: u8, is_invoice: bool) -> Slate { + let np = match num_participants { + 0 => 2, + n => n, + }; + let state = match is_invoice { + true => SlateState::Invoice1, + false => SlateState::Standard1, + }; Slate { - num_participants: num_participants, + num_participants: np, // assume 2 if not present id: Uuid::new_v4(), + state, tx: Some(Transaction::empty()), amount: 0, fee: 0, - height: 0, - lock_height: 0, - ttl_cutoff_height: None, + ttl_cutoff_height: 0, + kernel_features: 0, + offset: BlindingFactor::zero(), participant_data: vec![], version_info: VersionCompatInfo { version: CURRENT_SLATE_VERSION, - orig_version: CURRENT_SLATE_VERSION, block_header_version: GRIN_BLOCK_HEADER_VERSION, }, payment_proof: None, + participant_id: None, + kernel_features_args: None, } } + /// Removes any signature data that isn't mine, for compacting + /// slates for a return journey + pub fn remove_other_sigdata( + &mut self, + keychain: &K, + sec_nonce: &SecretKey, + sec_key: &SecretKey, + ) -> Result<(), Error> + where + K: Keychain, + { + let pub_nonce = PublicKey::from_secret_key(keychain.secp(), &sec_nonce)?; + let pub_key = PublicKey::from_secret_key(keychain.secp(), &sec_key)?; + self.participant_data = self + .participant_data + .clone() + .into_iter() + .filter(|v| v.public_nonce == pub_nonce && v.public_blind_excess == pub_key) + .collect(); + Ok(()) + } /// Adds selected inputs and outputs to the slate's transaction /// Returns blinding factor @@ -298,6 +300,9 @@ impl Slate { B: ProofBuild, { self.update_kernel()?; + if elems.is_empty() { + return Ok(BlindingFactor::zero()); + } let (tx, blind) = build::partial_transaction(self.tx_or_err()?.clone(), elems, keychain, builder)?; self.tx = Some(tx); @@ -311,7 +316,7 @@ impl Slate { self.tx = Some( self.tx_or_err()? .clone() - .replace_kernel(TxKernel::with_features(self.kernel_features())), + .replace_kernel(TxKernel::with_features(self.kernel_features()?)), ); Ok(()) } @@ -323,45 +328,45 @@ impl Slate { keychain: &K, sec_key: &mut SecretKey, sec_nonce: &SecretKey, - participant_id: usize, - message: Option, use_test_rng: bool, ) -> Result<(), Error> where K: Keychain, { // Whoever does this first generates the offset - if self.tx_or_err()?.offset == BlindingFactor::zero() { + // TODO: Remove HF3 + if self.participant_data.is_empty() && !self.is_compact() { self.generate_offset(keychain, sec_key, use_test_rng)?; } - self.add_participant_info( - keychain, - &sec_key, - &sec_nonce, - participant_id, - None, - message, - use_test_rng, - )?; + // Always choose my part of the offset, and subtract from my excess + if self.is_compact() { + self.generate_offset(keychain, sec_key, use_test_rng)?; + } + self.add_participant_info(keychain, &sec_key, &sec_nonce, None)?; Ok(()) } // Construct the appropriate kernel features based on our fee and lock_height. // If lock_height is 0 then its a plain kernel, otherwise its a height locked kernel. - fn kernel_features(&self) -> KernelFeatures { - match self.lock_height { - 0 => KernelFeatures::Plain { fee: self.fee }, - _ => KernelFeatures::HeightLocked { + fn kernel_features(&self) -> Result { + match self.kernel_features { + 0 => Ok(KernelFeatures::Plain { fee: self.fee }), + 1 => Ok(KernelFeatures::HeightLocked { fee: self.fee, - lock_height: self.lock_height, - }, + lock_height: match &self.kernel_features_args { + Some(a) => a.lock_height, + None => { + return Err(ErrorKind::KernelFeaturesMissing(format!("lock_height")).into()) + } + }, + }), + n => return Err(ErrorKind::UnknownKernelFeatures(n).into()), } } // This is the msg that we will sign as part of the tx kernel. - // If lock_height is 0 then build a plain kernel, otherwise build a height locked kernel. fn msg_to_sign(&self) -> Result { - let msg = self.kernel_features().kernel_sig_msg()?; + let msg = self.kernel_features()?.kernel_sig_msg()?; Ok(msg) } @@ -371,12 +376,14 @@ impl Slate { keychain: &K, sec_key: &SecretKey, sec_nonce: &SecretKey, - participant_id: usize, ) -> Result<(), Error> where K: Keychain, { - self.check_fees()?; + // TODO: Note we're unable to verify fees in this instance + if !self.is_compact() { + self.check_fees()?; + } self.verify_part_sigs(keychain.secp())?; let sig_part = aggsig::calculate_partial_sig( @@ -387,8 +394,13 @@ impl Slate { Some(&self.pub_blind_sum(keychain.secp())?), &self.msg_to_sign()?, )?; - for i in 0..self.num_participants { - if self.participant_data[i].id == participant_id as u64 { + let pub_excess = PublicKey::from_secret_key(keychain.secp(), &sec_key)?; + let pub_nonce = PublicKey::from_secret_key(keychain.secp(), &sec_nonce)?; + for i in 0..self.num_participants() as usize { + // find my entry + if self.participant_data[i].public_blind_excess == pub_excess + && self.participant_data[i].public_nonce == pub_nonce + { self.participant_data[i].part_sig = Some(sig_part); break; } @@ -402,27 +414,20 @@ impl Slate { where K: Keychain, { - let final_sig = self.finalize_signature(keychain)?; + let final_sig = self.finalize_signature(keychain.secp())?; self.finalize_transaction(keychain, &final_sig) } - /// Return the participant with the given id - pub fn participant_with_id(&self, id: usize) -> Option { - for p in self.participant_data.iter() { - if p.id as usize == id { - return Some(p.clone()); - } - } - None - } - /// Return the sum of public nonces fn pub_nonce_sum(&self, secp: &secp::Secp256k1) -> Result { - let pub_nonces = self + let pub_nonces: Vec<&PublicKey> = self .participant_data .iter() .map(|p| &p.public_nonce) .collect(); + if pub_nonces.len() == 0 { + return Err(ErrorKind::Commit(format!("Participant nonces cannot be empty")).into()); + } match PublicKey::from_combination(secp, pub_nonces) { Ok(k) => Ok(k), Err(e) => Err(ErrorKind::Secp(e).into()), @@ -431,11 +436,16 @@ impl Slate { /// Return the sum of public blinding factors fn pub_blind_sum(&self, secp: &secp::Secp256k1) -> Result { - let pub_blinds = self + let pub_blinds: Vec<&PublicKey> = self .participant_data .iter() .map(|p| &p.public_blind_excess) .collect(); + if pub_blinds.len() == 0 { + return Err( + ErrorKind::Commit(format!("Participant Blind sums cannot be empty")).into(), + ); + } match PublicKey::from_combination(secp, pub_blinds) { Ok(k) => Ok(k), Err(e) => Err(ErrorKind::Secp(e).into()), @@ -446,6 +456,7 @@ impl Slate { fn part_sigs(&self) -> Vec<&Signature> { self.participant_data .iter() + .filter(|p| p.part_sig.is_some()) .map(|p| p.part_sig.as_ref().unwrap()) .collect() } @@ -454,15 +465,12 @@ impl Slate { /// and saves participant's transaction context /// sec_key can be overridden to replace the blinding /// factor (by whoever split the offset) - fn add_participant_info( + pub fn add_participant_info( &mut self, keychain: &K, sec_key: &SecretKey, sec_nonce: &SecretKey, - id: usize, part_sig: Option, - message: Option, - use_test_rng: bool, ) -> Result<(), Error> where K: Keychain, @@ -470,56 +478,38 @@ impl Slate { // Add our public key and nonce to the slate let pub_key = PublicKey::from_secret_key(keychain.secp(), &sec_key)?; let pub_nonce = PublicKey::from_secret_key(keychain.secp(), &sec_nonce)?; + let mut part_sig = part_sig; - let test_message_nonce = SecretKey::from_slice(&keychain.secp(), &[1; 32]).unwrap(); - let message_nonce = match use_test_rng { - false => None, - true => Some(&test_message_nonce), - }; + // Remove if already here and replace + self.participant_data = self + .participant_data + .clone() + .into_iter() + .filter(|v| { + if v.public_nonce == pub_nonce + && v.public_blind_excess == pub_key + && part_sig == None + { + part_sig = v.part_sig + } + v.public_nonce != pub_nonce || v.public_blind_excess != pub_key + }) + .collect(); - // Sign the provided message - let message_sig = { - if let Some(m) = message.clone() { - let hashed = blake2b(secp::constants::MESSAGE_SIZE, &[], &m.as_bytes()[..]); - let m = secp::Message::from_slice(&hashed.as_bytes())?; - let res = aggsig::sign_single( - &keychain.secp(), - &m, - &sec_key, - message_nonce, - Some(&pub_key), - )?; - Some(res) - } else { - None - } - }; self.participant_data.push(ParticipantData { - id: id as u64, public_blind_excess: pub_key, public_nonce: pub_nonce, part_sig: part_sig, - message: message, - message_sig: message_sig, }); + self.participant_id = Some(pub_key); Ok(()) } - /// helper to return all participant messages - pub fn participant_messages(&self) -> ParticipantMessages { - let mut ret = ParticipantMessages { messages: vec![] }; - for ref m in self.participant_data.iter() { - ret.messages - .push(ParticipantMessageData::from_participant_data(m)); - } - ret - } - /// Somebody involved needs to generate an offset with their private key /// For now, we'll have the transaction initiator be responsible for it /// Return offset private key for the participant to use later in the /// transaction - fn generate_offset( + pub fn generate_offset( &mut self, keychain: &K, sec_key: &mut SecretKey, @@ -531,7 +521,7 @@ impl Slate { // Generate a random kernel offset here // and subtract it from the blind_sum so we create // the aggsig context with the "split" key - self.tx_or_err_mut()?.offset = match use_test_rng { + let my_offset = match use_test_rng { false => { BlindingFactor::from_secret_key(SecretKey::new(&keychain.secp(), &mut thread_rng())) } @@ -542,12 +532,26 @@ impl Slate { } }; - let blind_offset = keychain.blind_sum( + if self.is_compact() { + let total_offset = keychain.blind_sum( + &BlindSum::new() + .add_blinding_factor(self.offset.clone()) + .add_blinding_factor(my_offset.clone()), + )?; + self.offset = total_offset; + } else { + //TODO: Remove HF3 + self.tx_or_err_mut()?.offset = my_offset.clone(); + self.offset = my_offset.clone(); + }; + + let adjusted_offset = keychain.blind_sum( &BlindSum::new() .add_blinding_factor(BlindingFactor::from_secret_key(sec_key.clone())) - .sub_blinding_factor(self.tx_or_err()?.offset.clone()), + .sub_blinding_factor(my_offset), )?; - *sec_key = blind_offset.secret_key(&keychain.secp())?; + *sec_key = adjusted_offset.secret_key(&keychain.secp())?; + Ok(()) } @@ -601,50 +605,6 @@ impl Slate { Ok(()) } - /// Verifies any messages in the slate's participant data match their signatures - pub fn verify_messages(&self) -> Result<(), Error> { - let secp = secp::Secp256k1::with_caps(secp::ContextFlag::VerifyOnly); - for p in self.participant_data.iter() { - if let Some(msg) = &p.message { - let hashed = blake2b(secp::constants::MESSAGE_SIZE, &[], &msg.as_bytes()[..]); - let m = secp::Message::from_slice(&hashed.as_bytes())?; - let signature = match p.message_sig { - None => { - error!("verify_messages - participant message doesn't have signature. Message: \"{}\"", - String::from_utf8_lossy(&msg.as_bytes()[..])); - return Err(ErrorKind::Signature( - "Optional participant messages doesn't have signature".to_owned(), - ) - .into()); - } - Some(s) => s, - }; - if !aggsig::verify_single( - &secp, - &signature, - &m, - None, - &p.public_blind_excess, - Some(&p.public_blind_excess), - false, - ) { - error!("verify_messages - participant message doesn't match signature. Message: \"{}\"", - String::from_utf8_lossy(&msg.as_bytes()[..])); - return Err(ErrorKind::Signature( - "Optional participant messages do not match signatures".to_owned(), - ) - .into()); - } else { - info!( - "verify_messages - signature verified ok. Participant message: \"{}\"", - String::from_utf8_lossy(&msg.as_bytes()[..]) - ); - } - } - } - Ok(()) - } - /// This should be callable by either the sender or receiver /// once phase 3 is done /// @@ -662,23 +622,20 @@ impl Slate { /// /// Returns completed transaction ready for posting to the chain - fn finalize_signature(&mut self, keychain: &K) -> Result - where - K: Keychain, - { - self.verify_part_sigs(keychain.secp())?; + fn finalize_signature(&mut self, secp: &secp::Secp256k1) -> Result { + self.verify_part_sigs(secp)?; let part_sigs = self.part_sigs(); - let pub_nonce_sum = self.pub_nonce_sum(keychain.secp())?; - let final_pubkey = self.pub_blind_sum(keychain.secp())?; + let pub_nonce_sum = self.pub_nonce_sum(secp)?; + let final_pubkey = self.pub_blind_sum(secp)?; // get the final signature - let final_sig = aggsig::add_signatures(&keychain.secp(), part_sigs, &pub_nonce_sum)?; + let final_sig = aggsig::add_signatures(secp, part_sigs, &pub_nonce_sum)?; // Calculate the final public key (for our own sanity check) // Check our final sig verifies aggsig::verify_completed_sig( - &keychain.secp(), + secp, &final_sig, &final_pubkey, Some(&final_pubkey), @@ -688,23 +645,10 @@ impl Slate { Ok(final_sig) } - /// return the final excess - pub fn calc_excess(&self, keychain: &K) -> Result - where - K: Keychain, - { - let tx = self.tx_or_err()?.clone(); - let kernel_offset = tx.offset.clone(); - let overage = tx.fee() as i64; - let tx_excess = tx.sum_commitments(overage)?; - - // subtract the kernel_excess (built from kernel_offset) - let offset_excess = keychain - .secp() - .commit(0, kernel_offset.secret_key(&keychain.secp())?)?; - Ok(keychain - .secp() - .commit_sum(vec![tx_excess], vec![offset_excess])?) + /// Calculate the excess + pub fn calc_excess(&self, secp: &secp::Secp256k1) -> Result { + let sum = self.pub_blind_sum(secp)?; + Ok(Commitment::from_pubkey(secp, &sum)?) } /// builds a final transaction after the aggregated sig exchange @@ -718,7 +662,7 @@ impl Slate { { self.check_fees()?; // build the final excess based on final tx and offset - let final_excess = self.calc_excess(keychain)?; + let final_excess = self.calc_excess(keychain.secp())?; debug!("Final Tx excess: {:?}", final_excess); @@ -731,14 +675,21 @@ impl Slate { // confirm the kernel verifies successfully before proceeding debug!("Validating final transaction"); + trace!( + "Final tx: {}", + serde_json::to_string_pretty(final_tx).unwrap() + ); final_tx.kernels()[0].verify()?; // confirm the overall transaction is valid (including the updated kernel) // accounting for tx weight limits let verifier_cache = Arc::new(RwLock::new(LruVerifierCache::new())); - final_tx.validate(Weighting::AsTransaction, verifier_cache)?; - - Ok(()) + if let Err(e) = final_tx.validate(Weighting::AsTransaction, verifier_cache) { + error!("Error with final tx validation: {}", e); + Err(e.into()) + } else { + Ok(()) + } } } @@ -747,41 +698,8 @@ impl Serialize for Slate { where S: Serializer, { - use serde::ser::Error; - let v4 = SlateV4::from(self); - match self.version_info.orig_version { - 4 => v4.serialize(serializer), - // left as a reminder - 3 => { - let v3 = match SlateV3::try_from(&v4) { - Ok(s) => s, - Err(e) => return Err(S::Error::custom(format!("{}", e))), - }; - v3.serialize(serializer) - } - v => Err(S::Error::custom(format!("Unknown slate version {}", v))), - } - } -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SlateVersionProbe { - #[serde(default)] - version: Option, - #[serde(default)] - version_info: Option, -} - -impl SlateVersionProbe { - pub fn version(&self) -> u16 { - match &self.version_info { - Some(v) => v.version, - None => match self.version { - Some(_) => 1, - None => 0, - }, - } + v4.serialize(serializer) } } @@ -802,40 +720,46 @@ impl From for CoinbaseV4 { impl From for SlateV4 { fn from(slate: Slate) -> SlateV4 { let Slate { - num_participants, + num_participants: num_parts, id, - tx, + state, + tx: _, amount, fee, - height, - lock_height, - ttl_cutoff_height, + kernel_features, + ttl_cutoff_height: ttl, + offset: off, participant_data, version_info, payment_proof, - } = slate; + participant_id: _participant_id, + kernel_features_args, + } = slate.clone(); let participant_data = map_vec!(participant_data, |data| ParticipantDataV4::from(data)); - let version_info = VersionCompatInfoV4::from(&version_info); + let ver = VersionCompatInfoV4::from(&version_info); let payment_proof = match payment_proof { Some(p) => Some(PaymentInfoV4::from(&p)), None => None, }; - let tx = match tx { - Some(t) => Some(TransactionV4::from(t)), + let feat_args = match kernel_features_args { + Some(a) => Some(KernelFeaturesArgsV4::from(&a)), None => None, }; + let sta = SlateStateV4::from(&state); SlateV4 { - num_participants, + num_parts, id, - tx: tx, - amount, + sta, + coms: (&slate).into(), + amt: amount, fee, - height, - lock_height, - ttl_cutoff_height, - participant_data, - version_info, - payment_proof, + feat: kernel_features, + ttl, + off, + sigs: participant_data, + ver, + proof: payment_proof, + feat_args, } } } @@ -843,91 +767,133 @@ impl From for SlateV4 { impl From<&Slate> for SlateV4 { fn from(slate: &Slate) -> SlateV4 { let Slate { - num_participants, + num_participants: num_parts, id, - tx, + state, + tx: _, amount, fee, - height, - lock_height, - ttl_cutoff_height, + kernel_features, + ttl_cutoff_height: ttl, + offset, participant_data, version_info, payment_proof, + participant_id: _participant_id, + kernel_features_args, } = slate; - let num_participants = *num_participants; + let num_parts = *num_parts; let id = *id; let amount = *amount; let fee = *fee; - let height = *height; - let lock_height = *lock_height; - let ttl_cutoff_height = *ttl_cutoff_height; + let feat = *kernel_features; + let ttl = *ttl; + let off = offset.clone(); let participant_data = map_vec!(participant_data, |data| ParticipantDataV4::from(data)); - let version_info = VersionCompatInfoV4::from(version_info); + let ver = VersionCompatInfoV4::from(version_info); let payment_proof = match payment_proof { Some(p) => Some(PaymentInfoV4::from(p)), None => None, }; - let tx = match tx { - Some(t) => Some(TransactionV4::from(t)), + let sta = SlateStateV4::from(state); + let feat_args = match kernel_features_args { + Some(a) => Some(KernelFeaturesArgsV4::from(a)), None => None, }; SlateV4 { - num_participants, + num_parts, id, - tx, - amount, + sta, + coms: slate.into(), + amt: amount, fee, - height, - lock_height, - ttl_cutoff_height, - participant_data, - version_info, - payment_proof, + feat, + ttl, + off, + sigs: participant_data, + ver, + proof: payment_proof, + feat_args, + } + } +} + +// Node's Transaction object and lock height to SlateV4 `coms` +impl From<&Slate> for Option> { + fn from(slate: &Slate) -> Option> { + let mut ret_vec = vec![]; + let (ins, outs) = match slate.tx.as_ref() { + Some(t) => (t.body.inputs.clone(), t.body.outputs.clone()), + None => return None, + }; + for i in ins.iter() { + ret_vec.push(CommitsV4 { + f: i.features.into(), + c: i.commit, + p: None, + }); + } + for o in outs.iter() { + ret_vec.push(CommitsV4 { + f: o.features.into(), + c: o.commit, + p: Some(o.proof), + }); } + Some(ret_vec) } } impl From<&ParticipantData> for ParticipantDataV4 { fn from(data: &ParticipantData) -> ParticipantDataV4 { let ParticipantData { - id, public_blind_excess, public_nonce, part_sig, - message, - message_sig, } = data; - let id = *id; let public_blind_excess = *public_blind_excess; let public_nonce = *public_nonce; let part_sig = *part_sig; - let message: Option = message.as_ref().map(|t| String::from(&**t)); - let message_sig = *message_sig; ParticipantDataV4 { - id, - public_blind_excess, - public_nonce, - part_sig, - message, - message_sig, + xs: public_blind_excess, + nonce: public_nonce, + part: part_sig, + } + } +} + +impl From<&SlateState> for SlateStateV4 { + fn from(data: &SlateState) -> SlateStateV4 { + match data { + SlateState::Unknown => SlateStateV4::Unknown, + SlateState::Standard1 => SlateStateV4::Standard1, + SlateState::Standard2 => SlateStateV4::Standard2, + SlateState::Standard3 => SlateStateV4::Standard3, + SlateState::Invoice1 => SlateStateV4::Invoice1, + SlateState::Invoice2 => SlateStateV4::Invoice2, + SlateState::Invoice3 => SlateStateV4::Invoice3, } } } +impl From<&KernelFeaturesArgs> for KernelFeaturesArgsV4 { + fn from(data: &KernelFeaturesArgs) -> KernelFeaturesArgsV4 { + let KernelFeaturesArgs { lock_height } = data; + let lock_hgt = *lock_height; + KernelFeaturesArgsV4 { lock_hgt } + } +} + impl From<&VersionCompatInfo> for VersionCompatInfoV4 { fn from(data: &VersionCompatInfo) -> VersionCompatInfoV4 { let VersionCompatInfo { version, - orig_version, block_header_version, } = data; let version = *version; - let orig_version = *orig_version; let block_header_version = *block_header_version; VersionCompatInfoV4 { version, - orig_version, block_header_version, } } @@ -944,13 +910,23 @@ impl From<&PaymentInfo> for PaymentInfoV4 { let receiver_address = *receiver_address; let receiver_signature = *receiver_signature; PaymentInfoV4 { - sender_address, - receiver_address, - receiver_signature, + saddr: sender_address, + raddr: receiver_address, + rsig: receiver_signature, } } } +impl From for OutputFeaturesV4 { + fn from(of: OutputFeatures) -> OutputFeaturesV4 { + let index = match of { + OutputFeatures::Plain => 0, + OutputFeatures::Coinbase => 1, + }; + OutputFeaturesV4(index) + } +} + impl From for TransactionV4 { fn from(tx: Transaction) -> TransactionV4 { let Transaction { offset, body } = tx; @@ -980,9 +956,9 @@ impl From<&TransactionBody> for TransactionBodyV4 { let outputs = map_vec!(outputs, |out| OutputV4::from(out)); let kernels = map_vec!(kernels, |kern| TxKernelV4::from(kern)); TransactionBodyV4 { - inputs, - outputs, - kernels, + ins: inputs, + outs: outputs, + kers: kernels, } } } @@ -990,7 +966,10 @@ impl From<&TransactionBody> for TransactionBodyV4 { impl From<&Input> for InputV4 { fn from(input: &Input) -> InputV4 { let Input { features, commit } = *input; - InputV4 { features, commit } + InputV4 { + features: features.into(), + commit, + } } } @@ -1002,9 +981,9 @@ impl From<&Output> for OutputV4 { proof, } = *output; OutputV4 { - features, - commit, - proof, + features: features.into(), + com: commit, + prf: proof, } } } @@ -1032,67 +1011,151 @@ impl From<&TxKernel> for TxKernelV4 { impl From for Slate { fn from(slate: SlateV4) -> Slate { let SlateV4 { - num_participants, + num_parts: num_participants, id, - tx, - amount, + sta, + coms: _, + amt: amount, fee, - height, - lock_height, - ttl_cutoff_height, - participant_data, - version_info, - payment_proof, - } = slate; + feat: kernel_features, + ttl: ttl_cutoff_height, + off: offset, + sigs: participant_data, + ver, + proof: payment_proof, + feat_args, + } = slate.clone(); let participant_data = map_vec!(participant_data, |data| ParticipantData::from(data)); - let version_info = VersionCompatInfo::from(&version_info); - let payment_proof = match payment_proof { - Some(p) => Some(PaymentInfo::from(&p)), + let version_info = VersionCompatInfo::from(&ver); + let payment_proof = match &payment_proof { + Some(p) => Some(PaymentInfo::from(p)), None => None, }; - let tx = match tx { - Some(t) => Some(Transaction::from(t)), + let kernel_features_args = match &feat_args { + Some(a) => Some(KernelFeaturesArgs::from(a)), None => None, }; + let state = SlateState::from(&sta); Slate { num_participants, id, - tx, + state, + tx: (&slate).into(), amount, fee, - height, - lock_height, + kernel_features, ttl_cutoff_height, + offset, participant_data, version_info, payment_proof, + participant_id: None, + kernel_features_args, + } + } +} + +pub fn tx_from_slate_v4(slate: &SlateV4) -> Option { + let coms = match slate.coms.as_ref() { + Some(c) => c, + None => return None, + }; + let secp = static_secp_instance(); + let secp = secp.lock(); + let mut calc_slate = Slate::blank(2, false); + calc_slate.fee = slate.fee; + for d in slate.sigs.iter() { + calc_slate.participant_data.push(ParticipantData { + public_blind_excess: d.xs, + public_nonce: d.nonce, + part_sig: d.part, + }); + } + let excess = match calc_slate.calc_excess(&secp) { + Ok(e) => e, + Err(_) => Commitment::from_vec(vec![0]), + }; + let excess_sig = match calc_slate.finalize_signature(&secp) { + Ok(s) => s, + Err(_) => Signature::from_raw_data(&[0; 64]).unwrap(), + }; + let kernel = TxKernel { + features: match slate.feat { + 0 => KernelFeatures::Plain { fee: slate.fee }, + 1 => KernelFeatures::HeightLocked { + fee: slate.fee, + lock_height: match slate.feat_args.as_ref() { + Some(a) => a.lock_hgt, + None => 0, + }, + }, + _ => KernelFeatures::Plain { fee: slate.fee }, + }, + excess, + excess_sig, + }; + let mut tx = Transaction::empty(); + tx.body.kernels.push(kernel); + for c in coms.iter() { + match &c.p { + Some(p) => tx.body.outputs.push(Output { + features: c.f.into(), + commit: c.c, + proof: p.clone(), + }), + None => tx.body.inputs.push(Input { + features: c.f.into(), + commit: c.c, + }), } } + tx.offset = slate.off.clone(); + Some(tx) +} + +// Node's Transaction object and lock height to SlateV4 `coms` +impl From<&SlateV4> for Option { + fn from(slate: &SlateV4) -> Option { + tx_from_slate_v4(slate) + } } impl From<&ParticipantDataV4> for ParticipantData { fn from(data: &ParticipantDataV4) -> ParticipantData { let ParticipantDataV4 { - id, - public_blind_excess, - public_nonce, - part_sig, - message, - message_sig, + xs: public_blind_excess, + nonce: public_nonce, + part: part_sig, } = data; - let id = *id; let public_blind_excess = *public_blind_excess; let public_nonce = *public_nonce; let part_sig = *part_sig; - let message: Option = message.as_ref().map(|t| String::from(&**t)); - let message_sig = *message_sig; ParticipantData { - id, public_blind_excess, public_nonce, part_sig, - message, - message_sig, + } + } +} + +impl From<&KernelFeaturesArgsV4> for KernelFeaturesArgs { + fn from(data: &KernelFeaturesArgsV4) -> KernelFeaturesArgs { + let KernelFeaturesArgsV4 { lock_hgt } = data; + let lock_height = *lock_hgt; + KernelFeaturesArgs { lock_height } + } +} + +impl From<&SlateStateV4> for SlateState { + fn from(data: &SlateStateV4) -> SlateState { + match data { + SlateStateV4::Unknown => SlateState::Unknown, + SlateStateV4::Standard1 => SlateState::Standard1, + SlateStateV4::Standard2 => SlateState::Standard2, + SlateStateV4::Standard3 => SlateState::Standard3, + SlateStateV4::Invoice1 => SlateState::Invoice1, + SlateStateV4::Invoice2 => SlateState::Invoice2, + SlateStateV4::Invoice3 => SlateState::Invoice3, } } } @@ -1101,15 +1164,12 @@ impl From<&VersionCompatInfoV4> for VersionCompatInfo { fn from(data: &VersionCompatInfoV4) -> VersionCompatInfo { let VersionCompatInfoV4 { version, - orig_version, block_header_version, } = data; let version = *version; - let orig_version = *orig_version; let block_header_version = *block_header_version; VersionCompatInfo { version, - orig_version, block_header_version, } } @@ -1118,9 +1178,9 @@ impl From<&VersionCompatInfoV4> for VersionCompatInfo { impl From<&PaymentInfoV4> for PaymentInfo { fn from(data: &PaymentInfoV4) -> PaymentInfo { let PaymentInfoV4 { - sender_address, - receiver_address, - receiver_signature, + saddr: sender_address, + raddr: receiver_address, + rsig: receiver_signature, } = data; let sender_address = *sender_address; let receiver_address = *receiver_address; @@ -1133,6 +1193,15 @@ impl From<&PaymentInfoV4> for PaymentInfo { } } +impl From for OutputFeatures { + fn from(of: OutputFeaturesV4) -> OutputFeatures { + match of.0 { + 1 => OutputFeatures::Coinbase, + 0 | _ => OutputFeatures::Plain, + } + } +} + impl From for Transaction { fn from(tx: TransactionV4) -> Transaction { let TransactionV4 { offset, body } = tx; @@ -1143,15 +1212,11 @@ impl From for Transaction { impl From<&TransactionBodyV4> for TransactionBody { fn from(body: &TransactionBodyV4) -> TransactionBody { - let TransactionBodyV4 { - inputs, - outputs, - kernels, - } = body; + let TransactionBodyV4 { ins, outs, kers } = body; - let inputs = map_vec!(inputs, |inp| Input::from(inp)); - let outputs = map_vec!(outputs, |out| Output::from(out)); - let kernels = map_vec!(kernels, |kern| TxKernel::from(kern)); + let inputs = map_vec!(ins, |inp| Input::from(inp)); + let outputs = map_vec!(outs, |out| Output::from(out)); + let kernels = map_vec!(kers, |kern| TxKernel::from(kern)); TransactionBody { inputs, outputs, @@ -1163,7 +1228,10 @@ impl From<&TransactionBodyV4> for TransactionBody { impl From<&InputV4> for Input { fn from(input: &InputV4) -> Input { let InputV4 { features, commit } = *input; - Input { features, commit } + Input { + features: features.into(), + commit, + } } } @@ -1171,11 +1239,11 @@ impl From<&OutputV4> for Output { fn from(output: &OutputV4) -> Output { let OutputV4 { features, - commit, - proof, + com: commit, + prf: proof, } = *output; Output { - features, + features: features.into(), commit, proof, } diff --git a/libwallet/src/slate_versions/mod.rs b/libwallet/src/slate_versions/mod.rs index 3d58e5690..757c609ee 100644 --- a/libwallet/src/slate_versions/mod.rs +++ b/libwallet/src/slate_versions/mod.rs @@ -20,8 +20,9 @@ use crate::slate::Slate; use crate::slate_versions::v3::{CoinbaseV3, SlateV3}; use crate::slate_versions::v4::{CoinbaseV4, SlateV4}; +use crate::slate_versions::v4_bin::SlateV4Bin; use crate::types::CbData; -use crate::Error; +use crate::{Error, ErrorKind}; use std::convert::TryFrom; pub mod ser; @@ -30,6 +31,8 @@ pub mod ser; pub mod v3; #[allow(missing_docs)] pub mod v4; +#[allow(missing_docs)] +pub mod v4_bin; /// The most recent version of the slate pub const CURRENT_SLATE_VERSION: u16 = 4; @@ -91,6 +94,37 @@ impl From for Slate { } } +#[derive(Deserialize, Serialize)] +#[serde(untagged)] +/// Binary versions, can only be parsed 1:1 into the appropriate +/// version, and VersionedSlate can up/downgrade from there +pub enum VersionedBinSlate { + /// Version 4, binary + V4(SlateV4Bin), +} + +impl TryFrom for VersionedBinSlate { + type Error = Error; + fn try_from(slate: VersionedSlate) -> Result { + match slate { + VersionedSlate::V4(s) => Ok(VersionedBinSlate::V4(SlateV4Bin(s))), + VersionedSlate::V3(_) => { + return Err( + ErrorKind::Compatibility("V3 Slate does not support binary".to_owned()).into(), + ) + } + } + } +} + +impl From for VersionedSlate { + fn from(slate: VersionedBinSlate) -> VersionedSlate { + match slate { + VersionedBinSlate::V4(s) => VersionedSlate::V4(s.0), + } + } +} + #[derive(Deserialize, Serialize)] #[serde(untagged)] /// Versions are ordered newest to oldest so serde attempts to diff --git a/libwallet/src/slate_versions/ser.rs b/libwallet/src/slate_versions/ser.rs index 67c065f12..9d1a3da8e 100644 --- a/libwallet/src/slate_versions/ser.rs +++ b/libwallet/src/slate_versions/ser.rs @@ -13,6 +13,183 @@ // limitations under the License. //! Sane serialization & deserialization of cryptographic structs into hex +use crate::grin_keychain::BlindingFactor; +use crate::grin_util::secp::pedersen::{Commitment, RangeProof}; +use crate::grin_util::secp::PublicKey; +use base64; +use serde::{Deserialize, Deserializer, Serializer}; + +/// Seralizes a byte string into base64 +pub fn as_base64(bytes: T, serializer: S) -> Result +where + T: AsRef<[u8]>, + S: Serializer, +{ + serializer.serialize_str(&base64::encode(&bytes)) +} + +/// Creates a BlindingFactor from a base64 string +pub fn blindingfactor_from_base64<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + use serde::de::Error; + + let val = String::deserialize(deserializer) + .and_then(|string| base64::decode(&string).map_err(|err| Error::custom(err.to_string())))?; + Ok(BlindingFactor::from_slice(&val)) +} + +/// Creates a RangeProof from a base64 string +pub fn rangeproof_from_base64<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + use serde::de::{Error, IntoDeserializer}; + + let val = String::deserialize(deserializer) + .and_then(|string| base64::decode(&string).map_err(|err| Error::custom(err.to_string())))?; + RangeProof::deserialize(val.into_deserializer()) +} + +/// Creates a RangeProof from a hex string +pub fn commitment_from_base64<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + use serde::de::{Error, IntoDeserializer}; + + let val = String::deserialize(deserializer) + .and_then(|string| base64::decode(&string).map_err(|err| Error::custom(err.to_string())))?; + Commitment::deserialize(val.into_deserializer()) +} + +/// Creates a PublicKey from a hex string +pub fn pubkey_from_base64<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + use serde::de::{Error, IntoDeserializer}; + + let val = String::deserialize(deserializer) + .and_then(|string| base64::decode(&string).map_err(|err| Error::custom(err.to_string())))?; + PublicKey::deserialize(val.into_deserializer()) +} + +/// Serializes an secp256k1 pubkey to base64 +pub mod pubkey_base64 { + use crate::grin_util::secp::PublicKey; + use crate::grin_util::static_secp_instance; + use base64; + use serde::{Deserialize, Deserializer, Serializer}; + + /// + pub fn serialize(key: &PublicKey, serializer: S) -> Result + where + S: Serializer, + { + let static_secp = static_secp_instance(); + let static_secp = static_secp.lock(); + serializer.serialize_str(&base64::encode( + &key.serialize_vec(&static_secp, true).to_vec(), + )) + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + use serde::de::Error; + let static_secp = static_secp_instance(); + let static_secp = static_secp.lock(); + String::deserialize(deserializer) + .and_then(|string| { + base64::decode(&string).map_err(|err| Error::custom(err.to_string())) + }) + .and_then(|bytes: Vec| { + PublicKey::from_slice(&static_secp, &bytes) + .map_err(|err| Error::custom(err.to_string())) + }) + } +} + +/// Serializes an Option to and from hex +pub mod option_sig_base64 { + use crate::grin_util::{secp, static_secp_instance}; + use base64; + use serde::de::Error; + use serde::{Deserialize, Deserializer, Serializer}; + + /// + pub fn serialize(sig: &Option, serializer: S) -> Result + where + S: Serializer, + { + let static_secp = static_secp_instance(); + let static_secp = static_secp.lock(); + match sig { + Some(sig) => serializer.serialize_str(&base64::encode( + &sig.serialize_compact(&static_secp).to_vec(), + )), + None => serializer.serialize_none(), + } + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + let static_secp = static_secp_instance(); + let static_secp = static_secp.lock(); + Option::::deserialize(deserializer).and_then(|res| match res { + Some(string) => base64::decode(&string) + .map_err(|err| Error::custom(err.to_string())) + .and_then(|bytes: Vec| { + let mut b = [0u8; 64]; + b.copy_from_slice(&bytes[0..64]); + secp::Signature::from_compact(&static_secp, &b) + .map(Some) + .map_err(|err| Error::custom(err.to_string())) + }), + None => Ok(None), + }) + } +} + +/// Serializes an Option to and from hex +pub mod option_rangeproof_base64 { + use crate::grin_util::secp::pedersen::RangeProof; + use base64; + use serde::de::{Error, IntoDeserializer}; + use serde::{Deserialize, Deserializer, Serializer}; + + /// + pub fn serialize(proof: &Option, serializer: S) -> Result + where + S: Serializer, + { + match proof { + Some(p) => serializer.serialize_str(&base64::encode(&p)), + None => serializer.serialize_none(), + } + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + Option::::deserialize(deserializer).and_then(|res| match res { + Some(string) => base64::decode(&string) + .map_err(|err| Error::custom(err.to_string())) + .and_then(|val| Ok(Some(RangeProof::deserialize(val.into_deserializer())?))), + None => Ok(None), + }) + } +} + /// Serializes an OnionV3Address to and from hex pub mod option_ov3_serde { use serde::de::Error; @@ -103,6 +280,36 @@ pub mod dalek_pubkey_serde { } } +/// Serializes an ed25519 PublicKey to and from base64 +pub mod dalek_pubkey_base64 { + use base64; + use ed25519_dalek::PublicKey as DalekPublicKey; + use serde::{Deserialize, Deserializer, Serializer}; + + /// + pub fn serialize(key: &DalekPublicKey, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&base64::encode(&key.to_bytes())) + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + use serde::de::Error; + String::deserialize(deserializer) + .and_then(|string| { + base64::decode(&string).map_err(|err| Error::custom(err.to_string())) + }) + .and_then(|bytes: Vec| { + DalekPublicKey::from_bytes(&bytes).map_err(|err| Error::custom(err.to_string())) + }) + } +} + /// Serializes an Option to and from hex pub mod option_dalek_pubkey_serde { use ed25519_dalek::PublicKey as DalekPublicKey; @@ -212,6 +419,162 @@ pub mod option_dalek_sig_serde { } } +/// Serializes an Option to and from base64 +pub mod option_dalek_sig_base64 { + use base64; + use ed25519_dalek::Signature as DalekSignature; + use serde::de::Error; + use serde::{Deserialize, Deserializer, Serializer}; + + /// + pub fn serialize(sig: &Option, serializer: S) -> Result + where + S: Serializer, + { + match sig { + Some(s) => serializer.serialize_str(&base64::encode(&s.to_bytes().to_vec())), + None => serializer.serialize_none(), + } + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + Option::::deserialize(deserializer).and_then(|res| match res { + Some(string) => base64::decode(&string) + .map_err(|err| Error::custom(err.to_string())) + .and_then(|bytes: Vec| { + let mut b = [0u8; 64]; + b.copy_from_slice(&bytes[0..64]); + DalekSignature::from_bytes(&b) + .map(Some) + .map_err(|err| Error::custom(err.to_string())) + }), + None => Ok(None), + }) + } +} + +/// Serializes slates 'version_info' field +pub mod version_info_v4 { + use serde::de::Error; + use serde::{Deserialize, Deserializer, Serializer}; + + use crate::slate_versions::v4::VersionCompatInfoV4; + + /// + pub fn serialize(v: &VersionCompatInfoV4, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&format!("{}:{}", v.version, v.block_header_version)) + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + String::deserialize(deserializer).and_then(|s| { + let mut retval = VersionCompatInfoV4 { + version: 0, + block_header_version: 0, + }; + let v: Vec<&str> = s.split(':').collect(); + if v.len() != 2 { + return Err(Error::custom("Cannot parse version")); + } + match u16::from_str_radix(v[0], 10) { + Ok(u) => retval.version = u, + Err(e) => return Err(Error::custom(format!("Cannot parse version: {}", e))), + } + match u16::from_str_radix(v[1], 10) { + Ok(u) => retval.block_header_version = u, + Err(e) => return Err(Error::custom(format!("Cannot parse version: {}", e))), + } + Ok(retval) + }) + } +} + +/// Serializes slates 'state' field +pub mod slate_state_v4 { + use serde::de::Error; + use serde::{Deserialize, Deserializer, Serializer}; + + use crate::slate_versions::v4::SlateStateV4; + + /// + pub fn serialize(st: &SlateStateV4, serializer: S) -> Result + where + S: Serializer, + { + let label = match st { + SlateStateV4::Unknown => "NA", + SlateStateV4::Standard1 => "S1", + SlateStateV4::Standard2 => "S2", + SlateStateV4::Standard3 => "S3", + SlateStateV4::Invoice1 => "I1", + SlateStateV4::Invoice2 => "I2", + SlateStateV4::Invoice3 => "I3", + }; + serializer.serialize_str(label) + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + String::deserialize(deserializer).and_then(|s| { + let retval = match s.as_str() { + "NA" => SlateStateV4::Unknown, + "S1" => SlateStateV4::Standard1, + "S2" => SlateStateV4::Standard2, + "S3" => SlateStateV4::Standard3, + "I1" => SlateStateV4::Invoice1, + "I2" => SlateStateV4::Invoice2, + "I3" => SlateStateV4::Invoice3, + _ => return Err(Error::custom("Invalid Slate state")), + }; + Ok(retval) + }) + } +} + +/// Serializes an secp256k1 pubkey to base64 +pub mod uuid_base64 { + use base64; + use serde::{Deserialize, Deserializer, Serializer}; + use uuid::Uuid; + + /// + pub fn serialize(id: &Uuid, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&base64::encode(&id.as_bytes())) + } + + /// + pub fn deserialize<'de, D>(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + use serde::de::Error; + String::deserialize(deserializer) + .and_then(|string| { + base64::decode(&string).map_err(|err| Error::custom(err.to_string())) + }) + .and_then(|bytes: Vec| { + let mut b = [0u8; 16]; + b.copy_from_slice(&bytes[0..16]); + Ok(Uuid::from_bytes(b)) + }) + } +} // Test serialization methods of components that are being used #[cfg(test)] mod test { diff --git a/libwallet/src/slate_versions/v3.rs b/libwallet/src/slate_versions/v3.rs index b8125ae5e..1b79b9172 100644 --- a/libwallet/src/slate_versions/v3.rs +++ b/libwallet/src/slate_versions/v3.rs @@ -58,6 +58,7 @@ pub struct SlateV3 { /// TTL, the block height at which wallets /// should refuse to process the transaction and unlock all /// associated outputs + #[serde(default = "default_ttl_none")] #[serde(with = "secp_ser::opt_string_or_u64")] pub ttl_cutoff_height: Option, /// Participant data, each participant in the transaction will @@ -73,6 +74,10 @@ fn default_payment_none() -> Option { None } +fn default_ttl_none() -> Option { + None +} + #[derive(Serialize, Deserialize, Debug, Clone)] pub struct VersionCompatInfoV3 { /// The current version of the slate format diff --git a/libwallet/src/slate_versions/v4.rs b/libwallet/src/slate_versions/v4.rs index 9d2ac0bf5..07fde173c 100644 --- a/libwallet/src/slate_versions/v4.rs +++ b/libwallet/src/slate_versions/v4.rs @@ -14,9 +14,53 @@ //! Contains V4 of the slate (grin-wallet 4.0.0) //! Changes from V3: -//! * TBD - -use crate::grin_core::core::transaction::OutputFeatures; +//! /#### Top-Level Slate Struct + +//! * The `version_info` struct is removed, and is replaced with `ver`, which has the format "[version]:[block header version]" +//! * `id` becomes a short-form base-64 encoding of the UUID binary +//! * `sta` is added, with possible values S1|S2|S3|I1|I2|I3|NA +//! * `num_participants` is renamed to `num_parts` +//! * `num_parts` may be omitted from the slate. If omitted its value is assumed to be 2. +//! * `amount` is renamed to `amt` +//! * `amt` may be removed from the slate on the S2 phase of a transaction. +//! * `fee` may be removed from the slate on the S2 phase of a transaction. It may also be ommited when intiating an I1 transaction, and added during the I2 phase. +//! * `lock_height` is removed +//! * `feat` is added to the slate denoting the Kernel feature set. May be omitted from the slate if kernel is plain (0) +//! * `ttl_cutoff_height` is renamed to `ttl` +//! * `ttl` may be omitted from the slate. If omitted its value is assumed to be 0 (no TTL). +//! * The `participant_data` struct is renamed to `sigs` +//! * `tx` is removed +//! * The `coms` (commitments) array is added, from which the final transaction object can be reconstructed +//! * The `payment_proof` struct is renamed to `proof` +//! * The feat_args struct is added, which may be populated for non-Plain kernels +//! * `proof` may be omitted from the slate if it is None (null), +//! * `off` (offset) is added, and will be modified by every participant in the transaction with a random +//! value - the value of their inputs' blinding factors +//! +//! #### Participant Data (`sigs`) +//! +//! * `public_blind_excess` is renamed to `xs` +//! * `public_nonce` is renamed to `nonce` +//! * `part_sig` is renamed to `part` +//! * `part` may be omitted if it has not yet been filled out +//! * `xs` becomes Base64 encoded instead of a hex string +//! * `nonce` becomes Base64 encoded instead of a hex string +//! * `part` becomes Base64 encoded instead of a hex string +//! * `message` is removed +//! * `message_sig` is removed +//! * `id` is removed. Parties can identify themselves via the keys stored in their transaction context +//! +//! #### Payment Proof Data (`proof`) +//! +//! * The `sender_address` field is renamed to `saddr` +//! * The `receiver_address` field is renamed to `raddr` +//! * The `receiver_signature` field is renamed to `rsig` +//! * `saddr` is Base64 encoded instead of a hex string +//! * `raddr` is Base64 encoded instead of a hex string +//! * `rsig` is Base64 encoded instead of a hex string +//! * `rsig` may be omitted if it has not yet been filled out + +use crate::grin_core::core::transaction::KernelFeatures; use crate::grin_core::libtx::secp_ser; use crate::grin_core::map_vec; use crate::grin_keychain::{BlindingFactor, Identifier}; @@ -25,7 +69,7 @@ use crate::grin_util::secp::key::PublicKey; use crate::grin_util::secp::pedersen::{Commitment, RangeProof}; use crate::grin_util::secp::Signature; use crate::slate::CompatKernelFeatures; -use crate::slate_versions::ser as dalek_ser; +use crate::slate_versions::ser; use crate::{Error, ErrorKind}; use ed25519_dalek::PublicKey as DalekPublicKey; use ed25519_dalek::Signature as DalekSignature; @@ -39,88 +83,194 @@ use crate::slate_versions::v3::{ #[derive(Serialize, Deserialize, Debug, Clone)] pub struct SlateV4 { + // Required Fields /// Versioning info - pub version_info: VersionCompatInfoV4, - /// The number of participants intended to take part in this transaction - pub num_participants: usize, + #[serde(with = "ser::version_info_v4")] + pub ver: VersionCompatInfoV4, /// Unique transaction ID, selected by sender pub id: Uuid, - /// The core transaction data: - /// inputs, outputs, kernels, kernel offset - /// Optional as of V4 to allow for a compact - /// transaction initiation - pub tx: Option, + /// Slate state + #[serde(with = "ser::slate_state_v4")] + pub sta: SlateStateV4, + /// Offset, modified by each participant inserting inputs + /// as the transaction progresses + #[serde( + serialize_with = "ser::as_base64", + deserialize_with = "ser::blindingfactor_from_base64" + )] + #[serde(default = "default_offset_zero")] + #[serde(skip_serializing_if = "offset_is_zero")] + pub off: BlindingFactor, + // Optional fields depending on state + /// The number of participants intended to take part in this transaction + #[serde(default = "default_num_participants_2")] + #[serde(skip_serializing_if = "num_parts_is_2")] + pub num_parts: u8, /// base amount (excluding fee) #[serde(with = "secp_ser::string_or_u64")] - pub amount: u64, + #[serde(skip_serializing_if = "u64_is_blank")] + #[serde(default = "default_u64_0")] + pub amt: u64, /// fee amount #[serde(with = "secp_ser::string_or_u64")] + #[serde(default = "default_u64")] + #[serde(skip_serializing_if = "u64_is_blank")] pub fee: u64, - /// Block height for the transaction - #[serde(with = "secp_ser::string_or_u64")] - pub height: u64, - /// Lock height - #[serde(with = "secp_ser::string_or_u64")] - pub lock_height: u64, + /// kernel features, if any + #[serde(skip_serializing_if = "u8_is_blank")] + #[serde(default = "default_u8_0")] + pub feat: u8, /// TTL, the block height at which wallets /// should refuse to process the transaction and unlock all - /// associated outputs - #[serde(with = "secp_ser::opt_string_or_u64")] - pub ttl_cutoff_height: Option, + #[serde(with = "secp_ser::string_or_u64")] + #[serde(skip_serializing_if = "u64_is_blank")] + #[serde(default = "default_u64_0")] + pub ttl: u64, + // Structs always required /// Participant data, each participant in the transaction will /// insert their public data here. For now, 0 is sender and 1 /// is receiver, though this will change for multi-party - pub participant_data: Vec, + pub sigs: Vec, + // Situational, but required at some point in the tx + /// Inputs/Output commits added to slate + #[serde(default = "default_coms_none")] + #[serde(skip_serializing_if = "Option::is_none")] + pub coms: Option>, + // Optional Structs /// Payment Proof #[serde(default = "default_payment_none")] - pub payment_proof: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub proof: Option, + /// Kernel features arguments + #[serde(default = "default_kernel_features_none")] + #[serde(skip_serializing_if = "Option::is_none")] + pub feat_args: Option, } fn default_payment_none() -> Option { None } +fn default_offset_zero() -> BlindingFactor { + BlindingFactor::zero() +} + +fn offset_is_zero(o: &BlindingFactor) -> bool { + *o == BlindingFactor::zero() +} + +fn default_coms_none() -> Option> { + None +} + +fn default_u64_0() -> u64 { + 0 +} + +fn num_parts_is_2(n: &u8) -> bool { + *n == 2 +} + +fn default_num_participants_2() -> u8 { + 2 +} + +fn default_kernel_features_none() -> Option { + None +} + +/// Slate state definition #[derive(Serialize, Deserialize, Debug, Clone)] +pub enum SlateStateV4 { + /// Unknown, coming from earlier versions of the slate + Unknown, + /// Standard flow, freshly init + Standard1, + /// Standard flow, return journey + Standard2, + /// Standard flow, ready for transaction posting + Standard3, + /// Invoice flow, freshly init + Invoice1, + ///Invoice flow, return journey + Invoice2, + /// Invoice flow, ready for tranasction posting + Invoice3, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] +/// Kernel features arguments definition +pub struct KernelFeaturesArgsV4 { + /// Lock height, for HeightLocked + pub lock_hgt: u64, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub struct VersionCompatInfoV4 { /// The current version of the slate format pub version: u16, - /// Original version this slate was converted from - pub orig_version: u16, /// Version of grin block header this slate is compatible with pub block_header_version: u16, } -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub struct ParticipantDataV4 { - /// Id of participant in the transaction. (For now, 0=sender, 1=rec) - #[serde(with = "secp_ser::string_or_u64")] - pub id: u64, /// Public key corresponding to private blinding factor - #[serde(with = "secp_ser::pubkey_serde")] - pub public_blind_excess: PublicKey, + #[serde(with = "ser::pubkey_base64")] + pub xs: PublicKey, /// Public key corresponding to private nonce - #[serde(with = "secp_ser::pubkey_serde")] - pub public_nonce: PublicKey, + #[serde(with = "ser::pubkey_base64")] + pub nonce: PublicKey, /// Public partial signature - #[serde(with = "secp_ser::option_sig_serde")] - pub part_sig: Option, - /// A message for other participants - pub message: Option, - /// Signature, created with private key corresponding to 'public_blind_excess' - #[serde(with = "secp_ser::option_sig_serde")] - pub message_sig: Option, + #[serde(default = "default_part_sig_none")] + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(with = "ser::option_sig_base64")] + pub part: Option, } -#[derive(Serialize, Deserialize, Debug, Clone)] +fn default_part_sig_none() -> Option { + None +} + +#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)] pub struct PaymentInfoV4 { - #[serde(with = "dalek_ser::dalek_pubkey_serde")] - pub sender_address: DalekPublicKey, - #[serde(with = "dalek_ser::dalek_pubkey_serde")] - pub receiver_address: DalekPublicKey, - #[serde(with = "dalek_ser::option_dalek_sig_serde")] - pub receiver_signature: Option, + #[serde(with = "ser::dalek_pubkey_base64")] + pub saddr: DalekPublicKey, + #[serde(with = "ser::dalek_pubkey_base64")] + pub raddr: DalekPublicKey, + #[serde(default = "default_receiver_signature_none")] + #[serde(with = "ser::option_dalek_sig_base64")] + #[serde(skip_serializing_if = "Option::is_none")] + pub rsig: Option, +} + +fn default_receiver_signature_none() -> Option { + None } +#[derive(Debug, Copy, Clone, Serialize, Deserialize)] +pub struct CommitsV4 { + /// Options for an output's structure or use + #[serde(default = "default_output_feature")] + #[serde(skip_serializing_if = "output_feature_is_plain")] + pub f: OutputFeaturesV4, + /// The homomorphic commitment representing the output amount + #[serde( + serialize_with = "ser::as_base64", + deserialize_with = "ser::commitment_from_base64" + )] + pub c: Commitment, + /// A proof that the commitment is in the right range + /// Only applies for transaction outputs + #[serde(with = "ser::option_rangeproof_base64")] + #[serde(default = "default_range_proof")] + #[serde(skip_serializing_if = "Option::is_none")] + pub p: Option, +} + +#[derive(Serialize, Deserialize, Copy, Debug, Clone, PartialEq, Eq)] +pub struct OutputFeaturesV4(pub u8); + /// A transaction #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TransactionV4 { @@ -130,26 +280,63 @@ pub struct TransactionV4 { serialize_with = "secp_ser::as_hex", deserialize_with = "secp_ser::blind_from_hex" )] + #[serde(default = "default_blinding_factor")] + #[serde(skip_serializing_if = "blinding_factor_is_zero")] pub offset: BlindingFactor, /// The transaction body - inputs/outputs/kernels pub body: TransactionBodyV4, } +fn default_blinding_factor() -> BlindingFactor { + BlindingFactor::zero() +} + +fn blinding_factor_is_zero(bf: &BlindingFactor) -> bool { + *bf == BlindingFactor::zero() +} + /// TransactionBody is a common abstraction for transaction and block #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TransactionBodyV4 { /// List of inputs spent by the transaction. - pub inputs: Vec, + #[serde(default = "default_inputs")] + #[serde(skip_serializing_if = "inputs_are_empty")] + pub ins: Vec, /// List of outputs the transaction produces. - pub outputs: Vec, + #[serde(default = "default_outputs")] + #[serde(skip_serializing_if = "outputs_are_empty")] + pub outs: Vec, /// List of kernels that make up this transaction (usually a single kernel). - pub kernels: Vec, + pub kers: Vec, } + +fn inputs_are_empty(v: &Vec) -> bool { + v.len() == 0 +} + +fn default_inputs() -> Vec { + vec![] +} + +fn outputs_are_empty(v: &Vec) -> bool { + v.len() == 0 +} + +fn default_outputs() -> Vec { + vec![] +} + +fn default_range_proof() -> Option { + None +} + #[derive(Serialize, Deserialize, Debug, Clone)] pub struct InputV4 { /// The features of the output being spent. /// We will check maturity for coinbase output. - pub features: OutputFeatures, + #[serde(default = "default_output_feature")] + #[serde(skip_serializing_if = "output_feature_is_plain")] + pub features: OutputFeaturesV4, /// The commit referencing the output being spent. #[serde( serialize_with = "secp_ser::as_hex", @@ -161,31 +348,47 @@ pub struct InputV4 { #[derive(Debug, Copy, Clone, Serialize, Deserialize)] pub struct OutputV4 { /// Options for an output's structure or use - pub features: OutputFeatures, + #[serde(default = "default_output_feature")] + #[serde(skip_serializing_if = "output_feature_is_plain")] + pub features: OutputFeaturesV4, /// The homomorphic commitment representing the output amount #[serde( - serialize_with = "secp_ser::as_hex", - deserialize_with = "secp_ser::commitment_from_hex" + serialize_with = "ser::as_base64", + deserialize_with = "ser::commitment_from_base64" )] - pub commit: Commitment, + pub com: Commitment, /// A proof that the commitment is in the right range #[serde( - serialize_with = "secp_ser::as_hex", - deserialize_with = "secp_ser::rangeproof_from_hex" + serialize_with = "ser::as_base64", + deserialize_with = "ser::rangeproof_from_base64" )] - pub proof: RangeProof, + pub prf: RangeProof, +} + +fn default_output_feature() -> OutputFeaturesV4 { + OutputFeaturesV4(0) +} + +fn output_feature_is_plain(o: &OutputFeaturesV4) -> bool { + o.0 == 0 } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TxKernelV4 { /// Options for a kernel's structure or use + #[serde(default = "default_kernel_feature")] + #[serde(skip_serializing_if = "kernel_feature_is_plain")] pub features: CompatKernelFeatures, /// Fee originally included in the transaction this proof is for. #[serde(with = "secp_ser::string_or_u64")] + #[serde(default = "default_u64")] + #[serde(skip_serializing_if = "u64_is_blank")] pub fee: u64, /// This kernel is not valid earlier than lock_height blocks /// The max lock_height of all *inputs* to this transaction #[serde(with = "secp_ser::string_or_u64")] + #[serde(default = "default_u64")] + #[serde(skip_serializing_if = "u64_is_blank")] pub lock_height: u64, /// Remainder of the sum of all transaction commitments. If the transaction /// is well formed, amounts components should sum to zero and the excess @@ -194,13 +397,69 @@ pub struct TxKernelV4 { serialize_with = "secp_ser::as_hex", deserialize_with = "secp_ser::commitment_from_hex" )] + #[serde(default = "default_commitment")] + #[serde(skip_serializing_if = "commitment_is_blank")] pub excess: Commitment, /// The signature proving the excess is a valid public key, which signs /// the transaction fee. #[serde(with = "secp_ser::sig_serde")] + #[serde(default = "default_sig")] + #[serde(skip_serializing_if = "sig_is_blank")] pub excess_sig: secp::Signature, } +fn default_kernel_feature() -> CompatKernelFeatures { + CompatKernelFeatures::Plain +} + +fn kernel_feature_is_plain(k: &CompatKernelFeatures) -> bool { + match k { + CompatKernelFeatures::Plain => true, + _ => false, + } +} + +fn default_commitment() -> Commitment { + Commitment::from_vec([0u8; 1].to_vec()) +} + +fn commitment_is_blank(c: &Commitment) -> bool { + for b in c.0.iter() { + if *b != 0 { + return false; + } + } + true +} + +fn default_sig() -> secp::Signature { + Signature::from_raw_data(&[0; 64]).unwrap() +} + +fn sig_is_blank(s: &secp::Signature) -> bool { + for b in s.to_raw_data().iter() { + if *b != 0 { + return false; + } + } + true +} + +fn default_u64() -> u64 { + 0 +} + +fn u64_is_blank(u: &u64) -> bool { + *u == 0 +} + +fn default_u8_0() -> u8 { + 0 +} + +fn u8_is_blank(u: &u8) -> bool { + *u == 0 +} /// A mining node requests new coinbase via the foreign api every time a new candidate block is built. #[derive(Serialize, Deserialize, Debug, Clone)] pub struct CoinbaseV4 { @@ -222,36 +481,66 @@ impl From for SlateV4 { tx, amount, fee, - height, + height: _, lock_height, ttl_cutoff_height, participant_data, payment_proof, - } = slate; + } = slate.clone(); let participant_data = map_vec!(participant_data, |data| ParticipantDataV4::from(data)); - let version_info = VersionCompatInfoV4::from(&version_info); + let ver = VersionCompatInfoV4::from(&version_info); let payment_proof = match payment_proof { Some(p) => Some(PaymentInfoV4::from(&p)), None => None, }; - let tx = TransactionV4::from(tx); + let ttl_cutoff_height = match ttl_cutoff_height { + None => 0, + Some(n) => n, + }; + let (feat, feat_args) = match lock_height { + 0 => (0, None), + n => (1, Some(KernelFeaturesArgsV4 { lock_hgt: n })), + }; SlateV4 { - version_info, - num_participants, + ver, + num_parts: num_participants as u8, id, - tx: Some(tx), - amount, + sta: SlateStateV4::Unknown, + coms: (&slate).into(), + amt: amount, fee, - height, - lock_height, - ttl_cutoff_height, - participant_data, - payment_proof, + feat, + ttl: ttl_cutoff_height, + off: tx.offset, + sigs: participant_data, + proof: payment_proof, + feat_args, } } } +impl From<&SlateV3> for Option> { + fn from(slate: &SlateV3) -> Option> { + let mut ret_vec = vec![]; + for i in slate.tx.body.inputs.iter() { + ret_vec.push(CommitsV4 { + f: i.features.into(), + c: i.commit, + p: None, + }); + } + for o in slate.tx.body.outputs.iter() { + ret_vec.push(CommitsV4 { + f: o.features.into(), + c: o.commit, + p: Some(o.proof), + }); + } + Some(ret_vec) + } +} + impl From<&ParticipantDataV3> for ParticipantDataV4 { fn from(data: &ParticipantDataV3) -> ParticipantDataV4 { let ParticipantDataV3 { @@ -262,19 +551,16 @@ impl From<&ParticipantDataV3> for ParticipantDataV4 { message, message_sig, } = data; - let id = *id; + let _id = *id; let public_blind_excess = *public_blind_excess; let public_nonce = *public_nonce; let part_sig = *part_sig; - let message: Option = message.as_ref().map(|t| String::from(&**t)); - let message_sig = *message_sig; + let _message: Option = message.as_ref().map(|t| String::from(&**t)); + let _message_sig = *message_sig; ParticipantDataV4 { - id, - public_blind_excess, - public_nonce, - part_sig, - message, - message_sig, + xs: public_blind_excess, + nonce: public_nonce, + part: part_sig, } } } @@ -287,11 +573,10 @@ impl From<&VersionCompatInfoV3> for VersionCompatInfoV4 { block_header_version, } = data; let version = *version; - let orig_version = *orig_version; + let _orig_version = *orig_version; let block_header_version = *block_header_version; VersionCompatInfoV4 { version, - orig_version, block_header_version, } } @@ -317,9 +602,9 @@ impl From<&TransactionBodyV3> for TransactionBodyV4 { let outputs = map_vec!(outputs, |out| OutputV4::from(out)); let kernels = map_vec!(kernels, |kern| TxKernelV4::from(kern)); TransactionBodyV4 { - inputs, - outputs, - kernels, + ins: inputs, + outs: outputs, + kers: kernels, } } } @@ -327,7 +612,10 @@ impl From<&TransactionBodyV3> for TransactionBodyV4 { impl From<&InputV3> for InputV4 { fn from(input: &InputV3) -> InputV4 { let InputV3 { features, commit } = *input; - InputV4 { features, commit } + InputV4 { + features: features.into(), + commit, + } } } @@ -339,9 +627,9 @@ impl From<&OutputV3> for OutputV4 { proof, } = *output; OutputV4 { - features, - commit, - proof, + features: features.into(), + com: commit, + prf: proof, } } } @@ -367,9 +655,9 @@ impl From<&PaymentInfoV3> for PaymentInfoV4 { receiver_signature, } = *input; PaymentInfoV4 { - sender_address, - receiver_address, - receiver_signature, + saddr: sender_address, + raddr: receiver_address, + rsig: receiver_signature, } } } @@ -380,30 +668,42 @@ impl TryFrom<&SlateV4> for SlateV3 { type Error = Error; fn try_from(slate: &SlateV4) -> Result { let SlateV4 { - num_participants, + num_parts: num_participants, id, - tx, - amount, + sta: _, + coms, + amt: amount, fee, - height, - lock_height, - ttl_cutoff_height, - participant_data, - version_info, - payment_proof, + feat, + ttl: ttl_cutoff_height, + off: offset, + sigs: participant_data, + ver, + proof: payment_proof, + feat_args, } = slate; - let num_participants = *num_participants; + let num_participants = match *num_participants { + 0 => 2, + n => n, + }; let id = *id; let amount = *amount; let fee = *fee; - let height = *height; - let lock_height = *lock_height; + let lock_height = match feat { + 0 => 0, + 1 => match feat_args { + None => return Err(ErrorKind::KernelFeaturesMissing("lock_hgt".to_owned()).into()), + Some(h) => h.lock_hgt, + }, + n => return Err(ErrorKind::UnknownKernelFeatures(*n).into()), + }; let participant_data = map_vec!(participant_data, |data| ParticipantDataV3::from(data)); - let version_info = VersionCompatInfoV3::from(version_info); + let version_info = VersionCompatInfoV3::from(ver); let payment_proof = match payment_proof { Some(p) => Some(PaymentInfoV3::from(p)), None => None, }; + let tx: Option = slate.into(); let tx = match tx { Some(t) => TransactionV3::from(t), None => { @@ -414,14 +714,18 @@ impl TryFrom<&SlateV4> for SlateV3 { } }; - let ttl_cutoff_height = *ttl_cutoff_height; + let ttl_cutoff_height = match *ttl_cutoff_height { + 0 => None, + n => Some(n), + }; + Ok(SlateV3 { - num_participants, + num_participants: num_participants as usize, id, tx, amount, fee, - height, + height: 0, lock_height, ttl_cutoff_height, participant_data, @@ -431,29 +735,84 @@ impl TryFrom<&SlateV4> for SlateV3 { } } +// Node's Transaction object and lock height to SlateV4 `coms` +impl From<&SlateV4> for Option { + fn from(slate: &SlateV4) -> Option { + let res = crate::slate::tx_from_slate_v4(slate); + let tx = match res { + Some(tx) => tx, + None => return None, + }; + let mut out_fee = 0; + let mut out_lock_height = 0; + let txv3 = TransactionV3 { + offset: tx.offset, + body: TransactionBodyV3 { + inputs: tx + .body + .inputs + .iter() + .map(|i| InputV3 { + features: i.features, + commit: i.commit, + }) + .collect(), + outputs: tx + .body + .outputs + .iter() + .map(|o| OutputV3 { + features: o.features, + commit: o.commit, + proof: o.proof, + }) + .collect(), + kernels: tx + .body + .kernels + .iter() + .map(|k| TxKernelV3 { + features: match k.features { + KernelFeatures::Plain { fee } => { + out_fee = fee; + CompatKernelFeatures::Plain + } + KernelFeatures::Coinbase => CompatKernelFeatures::Coinbase, + KernelFeatures::HeightLocked { fee, lock_height } => { + out_fee = fee; + out_lock_height = lock_height; + CompatKernelFeatures::HeightLocked + } + }, + fee: out_fee, + lock_height: out_lock_height, + excess: k.excess, + excess_sig: k.excess_sig, + }) + .collect(), + }, + }; + Some(txv3) + } +} + impl From<&ParticipantDataV4> for ParticipantDataV3 { fn from(data: &ParticipantDataV4) -> ParticipantDataV3 { let ParticipantDataV4 { - id, - public_blind_excess, - public_nonce, - part_sig, - message, - message_sig, + xs: public_blind_excess, + nonce: public_nonce, + part: part_sig, } = data; - let id = *id; let public_blind_excess = *public_blind_excess; let public_nonce = *public_nonce; let part_sig = *part_sig; - let message: Option = message.as_ref().map(|t| String::from(&**t)); - let message_sig = *message_sig; ParticipantDataV3 { - id, + id: 0, public_blind_excess, public_nonce, part_sig, - message, - message_sig, + message: None, + message_sig: None, } } } @@ -462,11 +821,10 @@ impl From<&VersionCompatInfoV4> for VersionCompatInfoV3 { fn from(data: &VersionCompatInfoV4) -> VersionCompatInfoV3 { let VersionCompatInfoV4 { version, - orig_version, block_header_version, } = data; let version = *version; - let orig_version = *orig_version; + let orig_version = version; let block_header_version = *block_header_version; VersionCompatInfoV3 { version, @@ -495,15 +853,11 @@ impl From<&TransactionV4> for TransactionV3 { impl From<&TransactionBodyV4> for TransactionBodyV3 { fn from(body: &TransactionBodyV4) -> TransactionBodyV3 { - let TransactionBodyV4 { - inputs, - outputs, - kernels, - } = body; + let TransactionBodyV4 { ins, outs, kers } = body; - let inputs = map_vec!(inputs, |inp| InputV3::from(inp)); - let outputs = map_vec!(outputs, |out| OutputV3::from(out)); - let kernels = map_vec!(kernels, |kern| TxKernelV3::from(kern)); + let inputs = map_vec!(ins, |inp| InputV3::from(inp)); + let outputs = map_vec!(outs, |out| OutputV3::from(out)); + let kernels = map_vec!(kers, |kern| TxKernelV3::from(kern)); TransactionBodyV3 { inputs, outputs, @@ -515,7 +869,10 @@ impl From<&TransactionBodyV4> for TransactionBodyV3 { impl From<&InputV4> for InputV3 { fn from(input: &InputV4) -> InputV3 { let InputV4 { features, commit } = *input; - InputV3 { features, commit } + InputV3 { + features: features.into(), + commit, + } } } @@ -523,11 +880,11 @@ impl From<&OutputV4> for OutputV3 { fn from(output: &OutputV4) -> OutputV3 { let OutputV4 { features, - commit, - proof, + com: commit, + prf: proof, } = *output; OutputV3 { - features, + features: features.into(), commit, proof, } @@ -549,9 +906,9 @@ impl From<&TxKernelV4> for TxKernelV3 { impl From<&PaymentInfoV4> for PaymentInfoV3 { fn from(input: &PaymentInfoV4) -> PaymentInfoV3 { let PaymentInfoV4 { - sender_address, - receiver_address, - receiver_signature, + saddr: sender_address, + raddr: receiver_address, + rsig: receiver_signature, } = *input; PaymentInfoV3 { sender_address, diff --git a/libwallet/src/slate_versions/v4_bin.rs b/libwallet/src/slate_versions/v4_bin.rs new file mode 100644 index 000000000..5e042848e --- /dev/null +++ b/libwallet/src/slate_versions/v4_bin.rs @@ -0,0 +1,584 @@ +// Copyright 2020 The Grin Developers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Wraps a V4 Slate into a V4 Binary slate + +use crate::grin_core::core::transaction::OutputFeatures; +use crate::grin_core::ser as grin_ser; +use crate::grin_core::ser::{Readable, Reader, Writeable, Writer}; +use crate::grin_keychain::BlindingFactor; +use crate::grin_util::secp::key::PublicKey; +use crate::grin_util::secp::pedersen::{Commitment, RangeProof}; +use crate::grin_util::secp::Signature; +use ed25519_dalek::PublicKey as DalekPublicKey; +use ed25519_dalek::Signature as DalekSignature; +use uuid::Uuid; + +use crate::slate_versions::v4::{ + CommitsV4, KernelFeaturesArgsV4, ParticipantDataV4, PaymentInfoV4, SlateStateV4, SlateV4, + VersionCompatInfoV4, +}; + +impl Writeable for SlateStateV4 { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + let b = match self { + SlateStateV4::Unknown => 0, + SlateStateV4::Standard1 => 1, + SlateStateV4::Standard2 => 2, + SlateStateV4::Standard3 => 3, + SlateStateV4::Invoice1 => 4, + SlateStateV4::Invoice2 => 5, + SlateStateV4::Invoice3 => 6, + }; + writer.write_u8(b) + } +} + +impl Readable for SlateStateV4 { + fn read(reader: &mut R) -> Result { + let b = reader.read_u8()?; + let sta = match b { + 0 => SlateStateV4::Unknown, + 1 => SlateStateV4::Standard1, + 2 => SlateStateV4::Standard2, + 3 => SlateStateV4::Standard3, + 4 => SlateStateV4::Invoice1, + 5 => SlateStateV4::Invoice2, + 6 => SlateStateV4::Invoice3, + _ => SlateStateV4::Unknown, + }; + Ok(sta) + } +} + +/// Allow serializing of Uuids not defined in crate +struct UuidWrap(Uuid); + +impl Writeable for UuidWrap { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + writer.write_fixed_bytes(&self.0.as_bytes()) + } +} + +impl Readable for UuidWrap { + fn read(reader: &mut R) -> Result { + let bytes = reader.read_fixed_bytes(16)?; + let mut b = [0u8; 16]; + b.copy_from_slice(&bytes[0..16]); + Ok(UuidWrap(Uuid::from_bytes(b))) + } +} + +/// Helper struct to serialize optional fields efficiently +struct SlateOptFields { + /// num parts, default 2 + pub num_parts: u8, + /// amt, default 0 + pub amt: u64, + /// fee, default 0 + pub fee: u64, + /// kernel features, default 0 + pub feat: u8, + /// ttl, default 0 + pub ttl: u64, +} + +impl Writeable for SlateOptFields { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + // Status byte, bits determing which optional fields are serialized + // 0 0 0 1 1 1 1 1 + // t f f a n + let mut status = 0u8; + if self.num_parts != 2 { + status |= 0x01; + } + if self.amt > 0 { + status |= 0x02; + } + if self.fee > 0 { + status |= 0x04; + } + if self.feat > 0 { + status |= 0x08; + } + if self.ttl > 0 { + status |= 0x10; + } + writer.write_u8(status)?; + if status & 0x01 > 0 { + writer.write_u8(self.num_parts)?; + } + if status & 0x02 > 0 { + writer.write_u64(self.amt)?; + } + if status & 0x04 > 0 { + writer.write_u64(self.fee)?; + } + if status & 0x08 > 0 { + writer.write_u8(self.feat)?; + } + if status & 0x10 > 0 { + writer.write_u64(self.ttl)?; + } + Ok(()) + } +} + +impl Readable for SlateOptFields { + fn read(reader: &mut R) -> Result { + let status = reader.read_u8()?; + let num_parts = if status & 0x01 > 0 { + reader.read_u8()? + } else { + 2 + }; + let amt = if status & 0x02 > 0 { + reader.read_u64()? + } else { + 0 + }; + let fee = if status & 0x04 > 0 { + reader.read_u64()? + } else { + 0 + }; + let feat = if status & 0x08 > 0 { + reader.read_u8()? + } else { + 0 + }; + let ttl = if status & 0x10 > 0 { + reader.read_u64()? + } else { + 0 + }; + Ok(SlateOptFields { + num_parts, + amt, + fee, + feat, + ttl, + }) + } +} + +struct SigsWrap(Vec); +struct SigsWrapRef<'a>(&'a Vec); + +impl<'a> Writeable for SigsWrapRef<'a> { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + writer.write_u8(self.0.len() as u8)?; + for s in self.0.iter() { + //0 means part sig is not yet included + //1 means part sig included + if s.part.is_some() { + writer.write_u8(1)?; + } else { + writer.write_u8(0)?; + } + s.xs.write(writer)?; + s.nonce.write(writer)?; + if let Some(s) = s.part.clone() { + s.write(writer)?; + } + } + Ok(()) + } +} + +impl Readable for SigsWrap { + fn read(reader: &mut R) -> Result { + let sigs_len = reader.read_u8()?; + let sigs = { + let mut ret = vec![]; + for _ in 0..sigs_len as usize { + let has_partial = reader.read_u8()?; + let c = ParticipantDataV4 { + xs: PublicKey::read(reader)?, + nonce: PublicKey::read(reader)?, + part: match has_partial { + 1 => Some(Signature::read(reader)?), + 0 | _ => None, + }, + }; + ret.push(c); + } + ret + }; + Ok(SigsWrap(sigs)) + } +} + +/// Serialization of optional structs +struct SlateOptStructsRef<'a> { + /// coms, default none + pub coms: &'a Option>, + ///// proof, default none + pub proof: &'a Option, +} + +/// Serialization of optional structs +struct SlateOptStructs { + /// coms, default none + pub coms: Option>, + /// proof, default none + pub proof: Option, +} + +impl<'a> Writeable for SlateOptStructsRef<'a> { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + // Status byte, bits determing which optional structs are serialized + // 0 0 0 0 0 0 1 1 + // p c + let mut status = 0u8; + if self.coms.is_some() { + status |= 0x01 + }; + if self.proof.is_some() { + status |= 0x02 + }; + writer.write_u8(status)?; + if let Some(c) = self.coms { + ComsWrapRef(&c).write(writer)?; + } + if let Some(p) = self.proof { + ProofWrapRef(&p).write(writer)?; + } + Ok(()) + } +} + +impl Readable for SlateOptStructs { + fn read(reader: &mut R) -> Result { + let status = reader.read_u8()?; + let coms = if status & 0x01 > 0 { + Some(ComsWrap::read(reader)?.0) + } else { + None + }; + let proof = if status & 0x02 > 0 { + Some(ProofWrap::read(reader)?.0) + } else { + None + }; + Ok(SlateOptStructs { coms, proof }) + } +} + +struct ComsWrap(Vec); +struct ComsWrapRef<'a>(&'a Vec); + +impl<'a> Writeable for ComsWrapRef<'a> { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + writer.write_u16(self.0.len() as u16)?; + for o in self.0.iter() { + //0 means input + //1 means output with proof + if o.p.is_some() { + writer.write_u8(1)?; + } else { + writer.write_u8(0)?; + } + OutputFeatures::from(o.f).write(writer)?; + o.c.write(writer)?; + if let Some(p) = o.p.clone() { + p.write(writer)?; + } + } + Ok(()) + } +} + +impl Readable for ComsWrap { + fn read(reader: &mut R) -> Result { + let coms_len = reader.read_u16()?; + let coms = { + let mut ret = vec![]; + for _ in 0..coms_len as usize { + let is_output = reader.read_u8()?; + let c = CommitsV4 { + f: OutputFeatures::read(reader)?.into(), + c: Commitment::read(reader)?, + p: match is_output { + 1 => Some(RangeProof::read(reader)?), + 0 | _ => None, + }, + }; + ret.push(c); + } + ret + }; + Ok(ComsWrap(coms)) + } +} + +struct ProofWrap(PaymentInfoV4); +struct ProofWrapRef<'a>(&'a PaymentInfoV4); + +impl<'a> Writeable for ProofWrapRef<'a> { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + writer.write_fixed_bytes(self.0.saddr.to_bytes())?; + writer.write_fixed_bytes(self.0.raddr.to_bytes())?; + match self.0.rsig { + Some(s) => { + writer.write_u8(1)?; + writer.write_fixed_bytes(&s.to_bytes().to_vec())?; + } + None => writer.write_u8(0)?, + } + Ok(()) + } +} + +impl Readable for ProofWrap { + fn read(reader: &mut R) -> Result { + let saddr = DalekPublicKey::from_bytes(&reader.read_fixed_bytes(32)?).unwrap(); + let raddr = DalekPublicKey::from_bytes(&reader.read_fixed_bytes(32)?).unwrap(); + let rsig = match reader.read_u8()? { + 0 => None, + 1 | _ => Some(DalekSignature::from_bytes(&reader.read_fixed_bytes(64)?).unwrap()), + }; + Ok(ProofWrap(PaymentInfoV4 { saddr, raddr, rsig })) + } +} + +#[derive(Debug, Clone)] +pub struct SlateV4Bin(pub SlateV4); + +impl From for SlateV4Bin { + fn from(slate: SlateV4) -> SlateV4Bin { + SlateV4Bin(slate) + } +} + +impl From for SlateV4 { + fn from(slate: SlateV4Bin) -> SlateV4 { + slate.0 + } +} + +impl serde::Serialize for SlateV4Bin { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let mut vec = vec![]; + grin_ser::serialize(&mut vec, grin_ser::ProtocolVersion(4), self) + .map_err(|err| serde::ser::Error::custom(err.to_string()))?; + serializer.serialize_bytes(&vec) + } +} + +impl<'de> serde::Deserialize<'de> for SlateV4Bin { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + struct SlateV4BinVisitor; + + impl<'de> serde::de::Visitor<'de> for SlateV4BinVisitor { + type Value = SlateV4Bin; + + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(formatter, "a serialised binary V4 slate") + } + + fn visit_bytes(self, value: &[u8]) -> Result + where + E: serde::de::Error, + { + let mut reader = std::io::Cursor::new(value.to_vec()); + let s = grin_ser::deserialize(&mut reader, grin_ser::ProtocolVersion(4)) + .map_err(|err| serde::de::Error::custom(err.to_string()))?; + Ok(s) + } + } + deserializer.deserialize_bytes(SlateV4BinVisitor) + } +} + +impl Writeable for SlateV4Bin { + fn write(&self, writer: &mut W) -> Result<(), grin_ser::Error> { + let v4 = &self.0; + writer.write_u16(v4.ver.version)?; + writer.write_u16(v4.ver.block_header_version)?; + (UuidWrap(v4.id)).write(writer)?; + v4.sta.write(writer)?; + v4.off.write(writer)?; + SlateOptFields { + num_parts: v4.num_parts, + amt: v4.amt, + fee: v4.fee, + feat: v4.feat, + ttl: v4.ttl, + } + .write(writer)?; + (SigsWrapRef(&v4.sigs)).write(writer)?; + SlateOptStructsRef { + coms: &v4.coms, + proof: &v4.proof, + } + .write(writer)?; + // Write lock height for height locked kernels + if v4.feat == 1 { + let lock_hgt = match &v4.feat_args { + Some(l) => l.lock_hgt, + None => 0, + }; + writer.write_u64(lock_hgt)?; + } + Ok(()) + } +} + +impl Readable for SlateV4Bin { + fn read(reader: &mut R) -> Result { + let ver = VersionCompatInfoV4 { + version: reader.read_u16()?, + block_header_version: reader.read_u16()?, + }; + let id = UuidWrap::read(reader)?.0; + let sta = SlateStateV4::read(reader)?; + let off = BlindingFactor::read(reader)?; + + let opts = SlateOptFields::read(reader)?; + let sigs = SigsWrap::read(reader)?.0; + let opt_structs = SlateOptStructs::read(reader)?; + + let feat_args = if opts.feat == 1 { + Some(KernelFeaturesArgsV4 { + lock_hgt: reader.read_u64()?, + }) + } else { + None + }; + + Ok(SlateV4Bin(SlateV4 { + ver, + id, + sta, + off, + num_parts: opts.num_parts, + amt: opts.amt, + fee: opts.fee, + feat: opts.feat, + ttl: opts.ttl, + sigs, + coms: opt_structs.coms, + proof: opt_structs.proof, + feat_args, + })) + } +} + +#[test] +fn slate_v4_serialize_deserialize() { + use crate::grin_util::from_hex; + use crate::grin_util::secp::key::PublicKey; + use crate::Slate; + use grin_wallet_util::grin_keychain::{ExtKeychain, Keychain, SwitchCommitmentType}; + let slate = Slate::blank(1, false); + let mut v4 = SlateV4::from(slate); + + let keychain = ExtKeychain::from_random_seed(true).unwrap(); + let switch = SwitchCommitmentType::Regular; + // add some sig data + let id1 = ExtKeychain::derive_key_id(1, 1, 0, 0, 0); + let id2 = ExtKeychain::derive_key_id(1, 1, 1, 0, 0); + let skey1 = keychain.derive_key(0, &id1, switch).unwrap(); + let skey2 = keychain.derive_key(0, &id2, switch).unwrap(); + let xs = PublicKey::from_secret_key(keychain.secp(), &skey1).unwrap(); + let nonce = PublicKey::from_secret_key(keychain.secp(), &skey2).unwrap(); + let part = ParticipantDataV4 { + xs, + nonce, + part: None, + }; + let part2 = ParticipantDataV4 { + xs, + nonce, + part: Some(Signature::from_raw_data(&[11; 64]).unwrap()), + }; + v4.sigs.push(part.clone()); + v4.sigs.push(part2); + v4.sigs.push(part); + + // add some random commit data + let com1 = CommitsV4 { + f: OutputFeatures::Plain.into(), + c: Commitment::from_vec([3u8; 1].to_vec()), + p: None, + }; + let com2 = CommitsV4 { + f: OutputFeatures::Plain.into(), + c: Commitment::from_vec([4u8; 1].to_vec()), + p: Some(RangeProof::zero()), + }; + let mut coms = vec![]; + coms.push(com1.clone()); + coms.push(com1.clone()); + coms.push(com1.clone()); + coms.push(com2); + + v4.coms = Some(coms); + v4.amt = 234324899824; + v4.feat = 1; + v4.num_parts = 2; + v4.feat_args = Some(KernelFeaturesArgsV4 { lock_hgt: 23092039 }); + let v4_1 = v4.clone(); + let v4_1_copy = v4.clone(); + + let v4_bin = SlateV4Bin(v4); + let mut vec = Vec::new(); + let _ = grin_ser::serialize_default(&mut vec, &v4_bin).expect("serialization failed"); + let b4_bin_2: SlateV4Bin = grin_ser::deserialize_default(&mut &vec[..]).unwrap(); + let v4_2 = b4_bin_2.0.clone(); + assert_eq!(v4_1.ver, v4_2.ver); + assert_eq!(v4_1.id, v4_2.id); + assert_eq!(v4_1.amt, v4_2.amt); + assert_eq!(v4_1.fee, v4_2.fee); + let v4_2_coms = v4_2.coms.as_ref().unwrap().clone(); + for (i, c) in v4_1.coms.unwrap().iter().enumerate() { + assert_eq!(c.f, v4_2_coms[i].f); + assert_eq!(c.c, v4_2_coms[i].c); + assert_eq!(c.p, v4_2_coms[i].p); + } + assert_eq!(v4_1.sigs, v4_2.sigs); + assert_eq!(v4_1.proof, v4_2.proof); + + // Include Payment proof, remove coms to mix it up a bit + let mut v4 = v4_1_copy; + let raw_pubkey_str = "d03c09e9c19bb74aa9ea44e0fe5ae237a9bf40bddf0941064a80913a4459c8bb"; + let b = from_hex(raw_pubkey_str).unwrap(); + let d_pkey = DalekPublicKey::from_bytes(&b).unwrap(); + v4.proof = Some(PaymentInfoV4 { + raddr: d_pkey.clone(), + saddr: d_pkey.clone(), + rsig: None, + }); + v4.coms = None; + let v4_1 = v4.clone(); + let v4_bin = SlateV4Bin(v4); + let mut vec = Vec::new(); + let _ = grin_ser::serialize_default(&mut vec, &v4_bin).expect("serialization failed"); + let b4_bin_2: SlateV4Bin = grin_ser::deserialize_default(&mut &vec[..]).unwrap(); + let v4_2 = b4_bin_2.0.clone(); + assert_eq!(v4_1.ver, v4_2.ver); + assert_eq!(v4_1.id, v4_2.id); + assert_eq!(v4_1.amt, v4_2.amt); + assert_eq!(v4_1.fee, v4_2.fee); + assert!(v4_1.coms.is_none()); + assert_eq!(v4_1.sigs, v4_2.sigs); + assert_eq!(v4_1.proof, v4_2.proof); +} diff --git a/libwallet/src/types.rs b/libwallet/src/types.rs index 609a3671f..cdbb9f546 100644 --- a/libwallet/src/types.rs +++ b/libwallet/src/types.rs @@ -26,7 +26,6 @@ use crate::grin_util::logger::LoggingConfig; use crate::grin_util::secp::key::{PublicKey, SecretKey}; use crate::grin_util::secp::{self, pedersen, Secp256k1}; use crate::grin_util::{ToHex, ZeroingString}; -use crate::slate::ParticipantMessages; use crate::slate_versions::ser as dalek_ser; use chrono::prelude::*; use ed25519_dalek::PublicKey as DalekPublicKey; @@ -194,7 +193,6 @@ where &mut self, keychain_mask: Option<&SecretKey>, slate_id: &[u8], - participant_id: usize, ) -> Result; /// Iterate over all output data stored by the backend @@ -210,7 +208,7 @@ where fn store_tx(&self, uuid: &str, tx: &Transaction) -> Result<(), Error>; /// Retrieves a stored transaction from a TxLogEntry - fn get_stored_tx(&self, entry: &TxLogEntry) -> Result, Error>; + fn get_stored_tx(&self, uuid: &str) -> Result, Error>; /// Create a new write batch to update or remove output data fn batch<'a>( @@ -296,19 +294,10 @@ where fn lock_output(&mut self, out: &mut OutputData) -> Result<(), Error>; /// Saves the private context associated with a slate id - fn save_private_context( - &mut self, - slate_id: &[u8], - participant_id: usize, - ctx: &Context, - ) -> Result<(), Error>; + fn save_private_context(&mut self, slate_id: &[u8], ctx: &Context) -> Result<(), Error>; /// Delete the private context associated with the slate id - fn delete_private_context( - &mut self, - slate_id: &[u8], - participant_id: usize, - ) -> Result<(), Error>; + fn delete_private_context(&mut self, slate_id: &[u8]) -> Result<(), Error>; /// Write the wallet data to backend file fn commit(&self) -> Result<(), Error>; @@ -548,18 +537,28 @@ pub struct Context { /// Secret nonce (of which public is shared) /// (basically a SecretKey) pub sec_nonce: SecretKey, + /// only used if self-sending an invoice + pub initial_sec_key: SecretKey, + /// as above + pub initial_sec_nonce: SecretKey, /// store my outputs + amounts between invocations /// Id, mmr_index (if known), amount pub output_ids: Vec<(Identifier, Option, u64)>, /// store my inputs /// Id, mmr_index (if known), amount pub input_ids: Vec<(Identifier, Option, u64)>, + /// store amount, so we can remove from slate if not + /// needed by the other party + pub amount: u64, /// store the calculated fee pub fee: u64, - /// keep track of the participant id - pub participant_id: usize, /// Payment proof sender address derivation path, if needed pub payment_proof_derivation_index: Option, + /// whether this was an invoice transaction + pub is_invoice: bool, + /// for invoice I2 Only, store the tx excess so we can + /// remove it from the slate on return + pub calculated_excess: Option, } impl Context { @@ -569,7 +568,7 @@ impl Context { sec_key: SecretKey, parent_key_id: &Identifier, use_test_rng: bool, - participant_id: usize, + is_invoice: bool, ) -> Context { let sec_nonce = match use_test_rng { false => aggsig::create_secnonce(secp).unwrap(), @@ -577,13 +576,17 @@ impl Context { }; Context { parent_key_id: parent_key_id.clone(), - sec_key: sec_key, - sec_nonce, + sec_key: sec_key.clone(), + sec_nonce: sec_nonce.clone(), + initial_sec_key: sec_key.clone(), + initial_sec_nonce: sec_nonce.clone(), input_ids: vec![], output_ids: vec![], + amount: 0, fee: 0, - participant_id: participant_id, payment_proof_derivation_index: None, + is_invoice, + calculated_excess: None, } } } @@ -796,8 +799,6 @@ pub struct TxLogEntry { #[serde(with = "secp_ser::opt_string_or_u64")] #[serde(default)] pub ttl_cutoff_height: Option, - /// Message data, stored as json - pub messages: Option, /// Location of the store transaction, (reference or resending) pub stored_tx: Option, /// Associated kernel excess, for later lookup if necessary @@ -846,7 +847,6 @@ impl TxLogEntry { num_outputs: 0, fee: None, ttl_cutoff_height: None, - messages: None, stored_tx: None, kernel_excess: None, kernel_lookup_min_height: None, diff --git a/libwallet/tests/libwallet.rs b/libwallet/tests/libwallet.rs index 3bb3a6ff4..ceecd8f00 100644 --- a/libwallet/tests/libwallet.rs +++ b/libwallet/tests/libwallet.rs @@ -74,7 +74,7 @@ fn aggsig_sender_receiver_interaction() { let blind = blinding_factor.secret_key(&keychain.secp()).unwrap(); - s_cx = Context::new(&keychain.secp(), blind, &parent, false, 0); + s_cx = Context::new(&keychain.secp(), blind, &parent, false, false); s_cx.get_public_keys(&keychain.secp()) }; @@ -88,7 +88,7 @@ fn aggsig_sender_receiver_interaction() { // let blind = blind_sum.secret_key(&keychain.secp())?; let blind = keychain.derive_key(0, &key_id, switch).unwrap(); - rx_cx = Context::new(&keychain.secp(), blind, &parent, false, 1); + rx_cx = Context::new(&keychain.secp(), blind, &parent, false, false); let (pub_excess, pub_nonce) = rx_cx.get_public_keys(&keychain.secp()); rx_cx.add_output(&key_id, &None, 0); @@ -293,7 +293,7 @@ fn aggsig_sender_receiver_interaction_offset() { let blind = blinding_factor.secret_key(&keychain.secp()).unwrap(); - s_cx = Context::new(&keychain.secp(), blind, &parent, false, 0); + s_cx = Context::new(&keychain.secp(), blind, &parent, false, false); s_cx.get_public_keys(&keychain.secp()) }; @@ -306,7 +306,7 @@ fn aggsig_sender_receiver_interaction_offset() { let blind = keychain.derive_key(0, &key_id, switch).unwrap(); - rx_cx = Context::new(&keychain.secp(), blind, &parent, false, 1); + rx_cx = Context::new(&keychain.secp(), blind, &parent, false, false); let (pub_excess, pub_nonce) = rx_cx.get_public_keys(&keychain.secp()); rx_cx.add_output(&key_id, &None, 0); diff --git a/src/bin/grin-wallet.yml b/src/bin/grin-wallet.yml index 8b5b1b436..36fc1a36f 100644 --- a/src/bin/grin-wallet.yml +++ b/src/bin/grin-wallet.yml @@ -125,6 +125,7 @@ subcommands: possible_values: - http - file + - binfile - self - keybase default_value: http @@ -147,11 +148,6 @@ subcommands: help: Fluff the transaction (ignore Dandelion relay protocol) short: f long: fluff - - message: - help: Optional participant message to include - short: g - long: message - takes_value: true - stored_tx: help: If present, use the previously stored Unconfirmed transaction with given id short: t @@ -162,14 +158,14 @@ subcommands: short: b long: ttl_blocks takes_value: true + #TODO: Remove HF3 + - v4: + help: Output a V4 slate prior to HF3 block + long: v4 + takes_value: false - receive: about: Processes a transaction file to accept a transfer from a sender args: - - message: - help: Optional participant message to include - short: g - long: message - takes_value: true - input: help: Partial transaction to process, expects the sender's transaction file. short: i @@ -202,16 +198,20 @@ subcommands: - amount: help: Number of coins to invoice with optional fraction, e.g. 12.423 index: 1 - - message: - help: Optional participant message to include - short: g - long: message - takes_value: true - dest: help: Name of destination slate output file short: d long: dest takes_value: true + - bin: + help: Whether to output file as binary + short: b + long: bin + #TODO: Remove HF3 + - v4: + help: Output a V4 slate prior to HF3 block + long: v4 + takes_value: false - pay: about: Spend coins to pay the provided invoice transaction args: @@ -239,6 +239,7 @@ subcommands: short: m long: method possible_values: + - filebin - file - http - self @@ -249,11 +250,6 @@ subcommands: short: d long: dest takes_value: true - - message: - help: Optional participant message to include - short: g - long: message - takes_value: true - input: help: Partial transaction to process, expects the invoicer's transaction file. short: i diff --git a/src/cmd/wallet_args.rs b/src/cmd/wallet_args.rs index 946fccbda..6913a1c1e 100644 --- a/src/cmd/wallet_args.rs +++ b/src/cmd/wallet_args.rs @@ -161,10 +161,6 @@ fn prompt_pay_invoice(slate: &Slate, method: &str, dest: &str) -> Result Result Some(args.value_of("message").unwrap().to_owned()), - false => None, - }; - // minimum_confirmations let min_c = parse_required(args, "minimum_confirmations")?; let min_c = parse_u64(min_c, "minimum_confirmations")?; @@ -469,6 +459,9 @@ pub fn parse_send_args(args: &ArgMatches) -> Result Result Result Result { - // message - let message = match receive_args.is_present("message") { - true => Some(receive_args.value_of("message").unwrap().to_owned()), - false => None, - }; - // input let tx_file = parse_required(receive_args, "input")?; @@ -538,7 +525,6 @@ pub fn parse_receive_args(receive_args: &ArgMatches) -> Result Some(args.value_of("message").unwrap().to_owned()), - false => None, - }; + let bin = args.is_present("bin"); + + // TODO: Remove HF3 + let output_v4_slate = args.is_present("v4"); + // target slate version to create let target_slate_version = { match args.is_present("slate_version") { @@ -599,10 +585,11 @@ pub fn parse_issue_invoice_args( let dest = parse_required(args, "dest")?; Ok(command::IssueInvoiceArgs { dest: dest.into(), + bin, + output_v4_slate, issue_args: IssueInvoiceTxArgs { dest_acct_name: None, amount, - message, target_slate_version, }, }) @@ -612,13 +599,6 @@ pub fn parse_process_invoice_args( args: &ArgMatches, prompt: bool, ) -> Result { - // TODO: display and prompt for confirmation of what we're doing - // message - let message = match args.is_present("message") { - true => Some(args.value_of("message").unwrap().to_owned()), - false => None, - }; - // minimum_confirmations let min_c = parse_required(args, "minimum_confirmations")?; let min_c = parse_u64(min_c, "minimum_confirmations")?; @@ -673,7 +653,7 @@ pub fn parse_process_invoice_args( // which requires reading the slate let slate = match PathToSlate((&tx_file).into()).get_tx() { - Ok(s) => s, + Ok(s) => s.0, Err(e) => return Err(ParseError::ArgumentError(format!("{}", e))), }; @@ -681,7 +661,6 @@ pub fn parse_process_invoice_args( } Ok(command::ProcessInvoiceArgs { - message: message, minimum_confirmations: min_c, selection_strategy: selection_strategy.to_owned(), estimate_selection_strategies, diff --git a/tests/cmd_line_basic.rs b/tests/cmd_line_basic.rs index 94c85b65c..74694f307 100644 --- a/tests/cmd_line_basic.rs +++ b/tests/cmd_line_basic.rs @@ -165,16 +165,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: let _ = test_framework::award_blocks_to_wallet(&chain, wallet1.clone(), mask1, bh as usize, false); - let very_long_message = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef\ - This part should all be truncated"; - // Update info and check let arg_vec = vec!["grin-wallet", "-p", "password", "-a", "mining", "info"]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?; @@ -193,8 +183,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "file", "-d", &file_name, - "-g", - very_long_message, "10", ]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?; @@ -208,8 +196,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "receive", "-i", &file_name, - "-g", - "Thanks, Yeast!", ]; execute_command(&app, test_dir, "wallet2", &client2, arg_vec.clone())?; @@ -300,8 +286,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "file", "-d", &file_name, - "-g", - "Love, Yeast, Smallest", "-s", "smallest", "10", @@ -317,8 +301,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "receive", "-i", &file_name, - "-g", - "Thanks, Yeast!", ]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec.clone())?; @@ -370,8 +352,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "self", "-d", "mining", - "-g", - "Self love", "-o", "3", "-s", @@ -416,8 +396,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "file", "-d", &file_name, - "-g", - "Ain't sending", "10", ]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?; @@ -437,8 +415,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "file", "-d", &file_name, - "-g", - "Ain't sending 2", "10", ]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?; @@ -464,8 +440,7 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: "invoice", "-d", &file_name, - "-g", - "Please give me your precious grins. Love, Yeast", + "-b", "65", ]; execute_command(&app, test_dir, "wallet2", &client2, arg_vec)?; @@ -483,8 +458,6 @@ fn command_line_test_impl(test_dir: &str) -> Result<(), grin_wallet_controller:: &file_name, "-d", &output_file_name, - "-g", - "Here you go", ]; execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?; diff --git a/tests/owner_v3_lifecycle.rs b/tests/owner_v3_lifecycle.rs index 15b1773f2..b42b9c576 100644 --- a/tests/owner_v3_lifecycle.rs +++ b/tests/owner_v3_lifecycle.rs @@ -396,7 +396,7 @@ fn owner_v3_lifecycle() -> Result<(), grin_wallet_controller::Error> { let res = api.process_invoice_tx(m, &slate, args); assert!(res.is_ok()); slate = res.unwrap(); - api.tx_lock_outputs(m, &slate, 0)?; + api.tx_lock_outputs(m, &slate)?; Ok(()) }, diff --git a/util/Cargo.toml b/util/Cargo.toml index 5167cd0e0..51da53743 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -43,12 +43,12 @@ grin_api = { git = "https://github.com/mimblewimble/grin", branch = "master" } grin_store = { git = "https://github.com/mimblewimble/grin", branch = "master" } # For local testing -# grin_core = { path = "../../grin/core"} -# grin_keychain = { path = "../../grin/keychain"} -# grin_chain = { path = "../../grin/chain"} -# grin_util = { path = "../../grin/util"} -# grin_api = { path = "../../grin/api"} -# grin_store = { path = "../../grin/store"} +#grin_core = { path = "../../grin/core"} +#grin_keychain = { path = "../../grin/keychain"} +#grin_chain = { path = "../../grin/chain"} +#grin_util = { path = "../../grin/util"} +#grin_api = { path = "../../grin/api"} +#grin_store = { path = "../../grin/store"} [dev-dependencies] pretty_assertions = "0.5.1"