diff --git a/solana/modules/token_bridge/Cargo.lock b/solana/modules/token_bridge/Cargo.lock new file mode 100644 index 00000000..1d75b498 --- /dev/null +++ b/solana/modules/token_bridge/Cargo.lock @@ -0,0 +1,4131 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-bridge-client" +version = "0.1.0" +dependencies = [ + "anyhow", + "borsh", + "bridge", + "clap 3.0.0-beta.2", + "rand 0.7.3", + "shellexpand", + "solana-client", + "solana-program", + "solana-sdk", + "solitaire", + "solitaire-client", + "spl-token", + "token-bridge", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "anyhow" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "backtrace" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base32" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake3" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac 0.8.0", + "digest 0.9.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", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding 0.2.1", + "generic-array 0.14.4", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74" +dependencies = [ + "borsh-derive", + "hashbrown", +] + +[[package]] +name = "borsh-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate", + "proc-macro2 1.0.27", + "syn 1.0.73", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "bridge" +version = "0.1.0" +dependencies = [ + "borsh", + "byteorder", + "primitive-types", + "sha3", + "solana-program", + "solitaire", + "solitaire-client", +] + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" + +[[package]] +name = "bumpalo" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[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.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "either", + "iovec", +] + +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" + +[[package]] +name = "bzip2" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cc" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "serde", + "time", + "winapi 0.3.9", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap 0.12.1", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap_derive" +version = "3.0.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "console" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "termios", + "unicode-width", + "winapi 0.3.9", + "winapi-util", +] + +[[package]] +name = "console" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi 0.3.9", +] + +[[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.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + +[[package]] +name = "cpufeatures" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +dependencies = [ + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.5", +] + +[[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", + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.5", + "crossbeam-utils 0.8.5", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +dependencies = [ + "autocfg", + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "lazy_static", + "maybe-uninit", + "memoffset 0.5.6", + "scopeguard", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.5", + "lazy_static", + "memoffset 0.6.4", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +dependencies = [ + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg", + "cfg-if 0.1.10", + "lazy_static", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +dependencies = [ + "cfg-if 1.0.0", + "lazy_static", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.0", +] + +[[package]] +name = "crypto-mac" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.0", +] + +[[package]] +name = "crypto-mac" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.0", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.0", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle 2.4.0", + "zeroize", +] + +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if 1.0.0", + "num_cpus", + "rayon", +] + +[[package]] +name = "derivation-path" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193388a8c8c75a490b604ff61775e236541b8975e98e5ca1f6ea97d122b7e2db" +dependencies = [ + "failure", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "dialoguer" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" +dependencies = [ + "console 0.11.3", + "lazy_static", + "tempfile", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "dir-diff" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" +dependencies = [ + "walkdir", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + +[[package]] +name = "dtoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" + +[[package]] +name = "ed25519" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d0860415b12243916284c67a9be413e044ee6668247b99ba26d94b2bc06c8f6" +dependencies = [ + "serde", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.1.0", + "ed25519", + "rand 0.7.3", + "serde", + "serde_bytes", + "sha2 0.9.5", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057f328f31294b5ab432e6c39642f54afd1531677d6d4ba2905932844cc242f3" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "failure", + "hmac 0.9.0", + "sha2 0.9.5", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "synstructure", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "filetime" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.9", + "winapi 0.3.9", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "flate2" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +dependencies = [ + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "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 = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "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.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + +[[package]] +name = "futures" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" + +[[package]] +name = "futures-executor" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" + +[[package]] +name = "futures-macro" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" +dependencies = [ + "autocfg", + "proc-macro-hack", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "futures-sink" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" + +[[package]] +name = "futures-task" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" + +[[package]] +name = "futures-util" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" +dependencies = [ + "autocfg", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "h2" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" +dependencies = [ + "bytes 1.0.1", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.7.1", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +dependencies = [ + "libc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hidapi" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e07da7e8614133e88b3a93b7352eb3729e3ccd82d5ab661adf23bef1761bf8" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac 0.7.0", + "digest 0.8.1", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" +dependencies = [ + "crypto-mac 0.9.1", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.0", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac 0.7.1", +] + +[[package]] +name = "http" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +dependencies = [ + "bytes 1.0.1", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" +dependencies = [ + "bytes 1.0.1", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68" + +[[package]] +name = "httpdate" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07d6baa1b441335f3ce5098ac421fb6547c46dda735ca1bc6d0153c838f9dd83" +dependencies = [ + "bytes 1.0.1", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.0", + "tokio 1.7.1", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "futures-util", + "hyper", + "log", + "rustls", + "tokio 1.7.1", + "tokio-rustls", + "webpki", +] + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "indicatif" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +dependencies = [ + "console 0.14.1", + "lazy_static", + "number_prefix", + "regex", +] + +[[package]] +name = "input_buffer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +dependencies = [ + "bytes 0.5.6", +] + +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "ipnet" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "jobserver" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e" +dependencies = [ + "futures 0.3.15", + "futures-executor", + "futures-util", + "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", + "winapi-build", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" + +[[package]] +name = "libloading" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.0", + "typenum", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "lock_api" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[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 = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" + +[[package]] +name = "memmap2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow 0.2.2", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +dependencies = [ + "libc", + "log", + "miow 0.3.7", + "ntapi", + "winapi 0.3.9", +] + +[[package]] +name = "mio-uds" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +dependencies = [ + "iovec", + "libc", + "mio 0.6.23", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "native-tls" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "net2" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "nix" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" +dependencies = [ + "bitflags", + "cc", + "cfg-if 1.0.0", + "libc", +] + +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "number_prefix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" + +[[package]] +name = "object" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +dependencies = [ + "parking_lot 0.11.1", +] + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-sys", +] + +[[package]] +name = "openssl-probe" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" + +[[package]] +name = "openssl-sys" +version = "0.9.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "209efc2fe0e980c8849efacdb567f975a1c80245c4f6980d6f012733bfa851af" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_str_bytes" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" + +[[package]] +name = "ouroboros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc04551635026d3ac7bc646698ea1836a85ed2a26b7094fe1d15d8b14854c4a2" +dependencies = [ + "ouroboros_macro", + "stable_deref_trait", +] + +[[package]] +name = "ouroboros_macro" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cec33dfceabec83cd0e95a5ce9d20e76ab3a5cbfef59659b8c927f69b93ed8ae" +dependencies = [ + "Inflector", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.6.2", + "rustc_version", +] + +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.7.2", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api 0.4.4", + "parking_lot_core 0.8.3", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version", + "smallvec 0.6.14", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec 1.6.1", + "winapi 0.3.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.9", + "smallvec 1.6.1", + "winapi 0.3.9", +] + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac 0.8.0", +] + +[[package]] +name = "pbkdf2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" +dependencies = [ + "crypto-mac 0.10.0", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "primitive-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" +dependencies = [ + "fixed-hash", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + +[[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", +] + +[[package]] +name = "proc-macro2" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +dependencies = [ + "unicode-xid 0.2.2", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[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", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2 1.0.27", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 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", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", +] + +[[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", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", +] + +[[package]] +name = "rayon" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +dependencies = [ + "autocfg", + "crossbeam-deque 0.8.0", + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +dependencies = [ + "crossbeam-channel 0.5.1", + "crossbeam-deque 0.8.0", + "crossbeam-utils 0.8.5", + "lazy_static", + "num_cpus", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +dependencies = [ + "getrandom 0.2.3", + "redox_syscall 0.2.9", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "reqwest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2296f2fac53979e8ccbc4a1136b25dcefd37be9ed7e4a1f6b05a6029c84ff124" +dependencies = [ + "base64 0.13.0", + "bytes 1.0.1", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "percent-encoding", + "pin-project-lite", + "rustls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 1.7.1", + "tokio-rustls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "rocksalt" +version = "0.1.0" +dependencies = [ + "byteorder", + "proc-macro2 1.0.27", + "quote 1.0.9", + "sha3", + "solana-program", + "syn 1.0.73", +] + +[[package]] +name = "rpassword" +version = "4.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[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", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.0", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustversion" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +dependencies = [ + "lazy_static", + "winapi 0.3.9", +] + +[[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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[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", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23" +dependencies = [ + "dtoa", + "linked-hash-map", + "serde", + "yaml-rust", +] + +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +dependencies = [ + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug 0.3.0", +] + +[[package]] +name = "shellexpand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83bdb7831b2d85ddf4a7b148aa19d0587eddbe8671a436b7bd1182eaad0f2829" +dependencies = [ + "dirs-next", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" + +[[package]] +name = "slab" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" + +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "socket2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "socket2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "solana-account-decoder" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a72a059536988504c15627626f78a24e9cab1468978d3bddd7f9652f6b87a2f" +dependencies = [ + "Inflector", + "base64 0.12.3", + "bincode", + "bs58", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-config-program", + "solana-sdk", + "solana-stake-program", + "solana-vote-program", + "spl-token", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-clap-utils" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "484288242b2b175bf2b7554497318e39b23ee921989f976387dbe48e60b2f256" +dependencies = [ + "chrono", + "clap 2.33.3", + "rpassword", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23b9dc8f85fa5277c50dd00a81ee9844ecd9661ec9e66523207a477b5e755a4" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "url", +] + +[[package]] +name = "solana-client" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774623776704dd9a58061eb99977b2e9552e8d6de3a92b344d1226104a888b83" +dependencies = [ + "base64 0.13.0", + "bincode", + "bs58", + "clap 2.33.3", + "indicatif", + "jsonrpc-core", + "log", + "net2", + "rayon", + "reqwest", + "semver 0.11.0", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-faucet", + "solana-net-utils", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "thiserror", + "tokio 1.7.1", + "tungstenite", + "url", +] + +[[package]] +name = "solana-config-program" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cac22db3f711eae4b1c3259af5163370f776cd7670f3736a6c13ef558245fc" +dependencies = [ + "bincode", + "chrono", + "log", + "rand_core 0.6.3", + "serde", + "serde_derive", + "solana-sdk", +] + +[[package]] +name = "solana-crate-features" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a634335bdea4898e20db749753dd4537eb343996cf1c7a132e331d84c5590d" +dependencies = [ + "backtrace", + "bytes 0.4.12", + "cc", + "curve25519-dalek 2.1.2", + "ed25519-dalek", + "either", + "lazy_static", + "libc", + "rand_chacha 0.2.2", + "regex-syntax", + "reqwest", + "ring", + "serde", + "syn 0.15.44", + "syn 1.0.73", + "tokio 0.1.22", + "winapi 0.3.9", +] + +[[package]] +name = "solana-faucet" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5e6adf551ca4e761c3395bb684ba5d907a051007a6dbf2d57cb99d2691e031" +dependencies = [ + "bincode", + "byteorder", + "clap 2.33.3", + "log", + "serde", + "serde_derive", + "solana-clap-utils", + "solana-cli-config", + "solana-logger", + "solana-metrics", + "solana-sdk", + "solana-version", + "spl-memo", + "thiserror", + "tokio 1.7.1", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b81e60d88b1fe0322bba6f3fe6b0d7299df2f2ededa8d95ec77b934fabb967b" +dependencies = [ + "bs58", + "bv", + "generic-array 0.14.4", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_derive", + "sha2 0.9.5", + "solana-frozen-abi-macro", + "solana-logger", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f617daa0187bcc4665d63fcf9454c998e9cdad6a33181f6214558d738230bfe2" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "rustc_version", + "syn 1.0.73", +] + +[[package]] +name = "solana-logger" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b3e2b14bdcbb7b41de9ef5a541ac501ba3fbd07999cbcf7ea9006b3ae28b67b" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5ad0bf2fb48761c23cb80089aba5676deaafb4a4ff0a3e2996ab39cbcbf96b4" +dependencies = [ + "log", + "solana-metrics", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6880a7b453b1f6a1042fda9316ef1bca723002ab37f48a506f6f1b0448d462e8" +dependencies = [ + "env_logger", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68e25fb6452b85733cf5c301988b56fd2d5d5a8e93c75cf38cbec06efc2eae" +dependencies = [ + "bincode", + "clap 2.33.3", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.3.19", + "solana-clap-utils", + "solana-logger", + "solana-version", + "tokio 1.7.1", + "url", +] + +[[package]] +name = "solana-program" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c5d59f9d358c09db6461fae1fde6075a456685d856c004ef21af092a830e4e7" +dependencies = [ + "bincode", + "blake3", + "borsh", + "borsh-derive", + "bs58", + "bv", + "curve25519-dalek 2.1.2", + "hex", + "itertools", + "lazy_static", + "log", + "num-derive", + "num-traits", + "rand 0.7.3", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.9.5", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-sdk-macro", + "thiserror", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447a0206282910fc21864bcb58b80aedbf1e7c712c4eab875c5458d3bf6faf1" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4d1346f89c41dc1cb9037ad427422cf3ab0b7f41915c7426f3a737094e9b2ec" +dependencies = [ + "base32", + "console 0.14.1", + "dialoguer", + "hidapi", + "log", + "num-derive", + "num-traits", + "parking_lot 0.10.2", + "qstring", + "semver 0.9.0", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-runtime" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d917b1b3849e01a41ea65af89ccbd58827c8f551219769c28011a2cfd4cdd01c" +dependencies = [ + "arrayref", + "bincode", + "blake3", + "bv", + "byteorder", + "bzip2", + "crossbeam-channel 0.4.4", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "itertools", + "lazy_static", + "libc", + "libloading", + "log", + "memmap2", + "num-derive", + "num-traits", + "num_cpus", + "ouroboros", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-measure", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-secp256k1-program", + "solana-stake-program", + "solana-vote-program", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4223659889495ec33debeb486f424f5543b87b8f6b5548edc3b6147b4c3b9312" +dependencies = [ + "assert_matches", + "bincode", + "bs58", + "bv", + "byteorder", + "chrono", + "derivation-path", + "digest 0.9.0", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array 0.14.4", + "hex", + "hmac 0.10.1", + "itertools", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "pbkdf2 0.6.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rand_core 0.6.3", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.9.5", + "sha3", + "solana-crate-features", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27426b2a09676929c5e49df96967bbcffff003183c11a3c3ef11d78bac4aaaa" +dependencies = [ + "bs58", + "proc-macro2 1.0.27", + "quote 1.0.9", + "rustversion", + "syn 1.0.73", +] + +[[package]] +name = "solana-secp256k1-program" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22f308716c2860e126bac5370f9580c4252c3cc91a58f461400267171471ea" +dependencies = [ + "bincode", + "digest 0.9.0", + "libsecp256k1", + "rand 0.7.3", + "sha3", + "solana-logger", + "solana-sdk", +] + +[[package]] +name = "solana-stake-program" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152fdc283d9410175a0b8eff9f17c5627e9c913fd88e183e1a1c1b1c0e190681" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-sdk", + "solana-vote-program", + "thiserror", +] + +[[package]] +name = "solana-transaction-status" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dba81cb7f40b2ebf330591fab6756fa73b180729f3ef332c70f0809f70d34b3" +dependencies = [ + "Inflector", + "base64 0.12.3", + "bincode", + "bs58", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-runtime", + "solana-sdk", + "solana-stake-program", + "solana-vote-program", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "thiserror", +] + +[[package]] +name = "solana-version" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df56fd1b1d2d13b387fec43c3f9e76b2c07d983535e732d5770002fdb5ee3c1f" +dependencies = [ + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d38c4ac44f51db1fa751cb9ff077f474157eb6137b10355d1090c2bb0072bf" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-metrics", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solitaire" +version = "0.1.0" +dependencies = [ + "borsh", + "byteorder", + "rocksalt", + "sha3", + "solana-program", +] + +[[package]] +name = "solitaire-client" +version = "0.1.0" +dependencies = [ + "borsh", + "solana-program", + "solana-sdk", + "solitaire", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spl-associated-token-account" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adc47eebe5d2b662cbaaba1843719c28a67e5ec5d0460bc3ca60900a51f74e2" +dependencies = [ + "solana-program", + "spl-token", +] + +[[package]] +name = "spl-memo" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-token" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b795e50d15dfd35aa5460b80a16414503a322be115a417a43db987c5824c6798" +dependencies = [ + "arrayref", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + +[[package]] +name = "subtle" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[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", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "unicode-xid 0.2.2", +] + +[[package]] +name = "synstructure" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "unicode-xid 0.2.2", +] + +[[package]] +name = "tar" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d779dc6aeff029314570f666ec83f19df7280bb36ef338442cfa8c604021b80" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "rand 0.8.4", + "redox_syscall 0.2.9", + "remove_dir_all", + "winapi 0.3.9", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "time" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.5", + "thiserror", + "unicode-normalization", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "token-bridge" +version = "0.1.0" +dependencies = [ + "borsh", + "bridge", + "byteorder", + "primitive-types", + "rocksalt", + "sha3", + "solana-program", + "solitaire", + "solitaire-client", + "spl-token", +] + +[[package]] +name = "tokio" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "mio 0.6.23", + "num_cpus", + "tokio-codec", + "tokio-current-thread", + "tokio-executor", + "tokio-fs", + "tokio-io", + "tokio-reactor", + "tokio-sync", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "tokio-udp", + "tokio-uds", +] + +[[package]] +name = "tokio" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb2ed024293bb19f7a5dc54fe83bf86532a44c12a2bb8ba40d64a4509395ca2" +dependencies = [ + "autocfg", + "bytes 1.0.1", + "libc", + "memchr", + "mio 0.7.13", + "num_cpus", + "once_cell", + "parking_lot 0.11.1", + "pin-project-lite", + "signal-hook-registry", + "tokio-macros", + "winapi 0.3.9", +] + +[[package]] +name = "tokio-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "tokio-io", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +dependencies = [ + "futures 0.1.31", + "tokio-executor", +] + +[[package]] +name = "tokio-executor" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", +] + +[[package]] +name = "tokio-fs" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +dependencies = [ + "futures 0.1.31", + "tokio-io", + "tokio-threadpool", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "log", +] + +[[package]] +name = "tokio-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "lazy_static", + "log", + "mio 0.6.23", + "num_cpus", + "parking_lot 0.9.0", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio 1.7.1", + "webpki", +] + +[[package]] +name = "tokio-sync" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +dependencies = [ + "fnv", + "futures 0.1.31", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "iovec", + "mio 0.6.23", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +dependencies = [ + "crossbeam-deque 0.7.3", + "crossbeam-queue", + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor", +] + +[[package]] +name = "tokio-timer" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "slab", + "tokio-executor", +] + +[[package]] +name = "tokio-udp" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "log", + "mio 0.6.23", + "tokio-codec", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-uds" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "iovec", + "libc", + "log", + "mio 0.6.23", + "mio-uds", + "tokio-codec", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-util" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" +dependencies = [ + "bytes 1.0.1", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio 1.7.1", +] + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "tower-service" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" + +[[package]] +name = "tracing" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +dependencies = [ + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "tungstenite" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" +dependencies = [ + "base64 0.11.0", + "byteorder", + "bytes 0.5.6", + "http", + "httparse", + "input_buffer", + "log", + "native-tls", + "rand 0.7.3", + "sha-1", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" + +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + +[[package]] +name = "uint" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" +dependencies = [ + "matches", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "uriparse" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e515b1ada404168e145ac55afba3c42f04cf972201a8552d42e2abb17c1b7221" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "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 = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasm-bindgen" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +dependencies = [ + "cfg-if 1.0.0", + "serde", + "serde_json", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +dependencies = [ + "quote 1.0.9", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" + +[[package]] +name = "web-sys" +version = "0.3.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi 0.3.9", +] + +[[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 = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +dependencies = [ + "winapi 0.3.9", +] + +[[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", + "winapi-build", +] + +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +dependencies = [ + "proc-macro2 1.0.27", + "quote 1.0.9", + "syn 1.0.73", + "synstructure", +] + +[[package]] +name = "zstd" +version = "0.5.4+zstd.1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "2.0.6+zstd.1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.4.18+zstd.1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" +dependencies = [ + "cc", + "glob", + "itertools", + "libc", +] diff --git a/solana/modules/token_bridge/Cargo.toml b/solana/modules/token_bridge/Cargo.toml new file mode 100644 index 00000000..d0725b06 --- /dev/null +++ b/solana/modules/token_bridge/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["program", "client"] \ No newline at end of file diff --git a/solana/modules/token_bridge/client/Cargo.toml b/solana/modules/token_bridge/client/Cargo.toml new file mode 100644 index 00000000..c82dd936 --- /dev/null +++ b/solana/modules/token_bridge/client/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "anchor-bridge-client" +version = "0.1.0" +authors = ["Stan Drozd "] +edition = "2018" + +[dependencies] +anyhow = "1.0.40" +borsh = "0.8.1" +bridge = { path = "../../../bridge/program", features = ["no-idl", "no-entrypoint", "client"] } +clap = "3.0.0-beta.2" +rand = "0.7.3" +shellexpand = "2.1.0" +solana-client = "=1.7.0" +solana-program = "=1.7.0" +solana-sdk = "=1.7.0" +spl-token = { version = "=3.1.0", features = ["no-entrypoint"] } +solitaire = { path = "../../../solitaire/program" } +solitaire-client = { path = "../../../solitaire/client" } +token-bridge = { path = "../program", features = ["no-idl", "no-entrypoint", "client"] } \ No newline at end of file diff --git a/solana/modules/token_bridge/client/src/main.rs b/solana/modules/token_bridge/client/src/main.rs new file mode 100644 index 00000000..16aaedcc --- /dev/null +++ b/solana/modules/token_bridge/client/src/main.rs @@ -0,0 +1,177 @@ +use borsh::BorshSerialize; +use bridge::{ + api, + types, +}; +use clap::Clap; +use solana_client::{ + rpc_client::RpcClient, + rpc_config::RpcSendTransactionConfig, +}; +use solana_program::pubkey::Pubkey; +use solana_sdk::{ + commitment_config::CommitmentConfig, + signature::{ + read_keypair_file, + Signer as SolSigner, + }, + transaction::Transaction, +}; +use solitaire_client::{ + AccEntry, + ToInstruction, +}; + +use bridge::accounts::{ + GuardianSet, + GuardianSetDerivationData, +}; +use solitaire::{ + processors::seeded::Seeded, + AccountState, +}; +use std::error; +use solana_sdk::instruction::Instruction; +use solana_sdk::signature::Keypair; +use solana_sdk::client::Client; +use solana_client::rpc_request::RpcError; +use solana_client::client_error::{ClientError, ClientErrorKind}; +use solana_sdk::program_pack::Pack; +use solana_sdk::rent::Rent; +use token_bridge::api::{AttestTokenData, TransferNativeData}; +use spl_token::instruction::TokenInstruction::Transfer; +use spl_token::state::Mint; +use solitaire_client::solana_sdk::account::ReadableAccount; + + +#[derive(Clap)] +pub struct Opts { + #[clap(long)] + bridge_address: Pubkey, + #[clap(long)] + token_address: Pubkey, +} + +pub type ErrBox = Box; + +pub const DEFAULT_MESSAGE_FEE: u64 = 42; +pub const DEFAULT_GUARDIAN_SET_EXPIRATION_TIME: u32 = 42; + +fn main() -> Result<(), ErrBox> { + let opts = Opts::parse(); + + let payer = read_keypair_file(&*shellexpand::tilde("~/.config/solana/id.json")) + .expect("Example requires a keypair file"); + + // Keypair is not Clone + let url = "http://localhost:8899".to_owned(); + + let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed()); + + let program_id = opts.bridge_address; + + use AccEntry::*; + let init = api::InitializeAccounts { + bridge: Derived(program_id.clone()), + guardian_set: Unprivileged(>::key( + &GuardianSetDerivationData { index: 0 }, + &program_id, + )), + payer: Signer(payer), + }; + + let init_args = bridge::instruction::Instruction::Initialize(types::BridgeConfig { + guardian_set_expiration_time: DEFAULT_GUARDIAN_SET_EXPIRATION_TIME, + fee: DEFAULT_MESSAGE_FEE, + }); + + let ix_data = init_args.try_to_vec()?; + + let payer = read_keypair_file(&*shellexpand::tilde("~/.config/solana/id.json")) + .expect("Example requires a keypair file"); + let (ix, signers) = init.to_ix(program_id, ix_data.as_slice())?; + send_ix_in_tx(&client, ix, &payer, signers.iter().collect())?; + + let payer = read_keypair_file(&*shellexpand::tilde("~/.config/solana/id.json")) + .expect("Example requires a keypair file"); + let token_program_id = opts.token_address; + let init_token = token_bridge::instructions::initialize(token_program_id, payer.pubkey(), program_id).unwrap(); + send_ix_in_tx(&client, init_token, &payer, vec![&payer])?; + + // Create a token + let mint_authority = Keypair::new(); + let mint = Keypair::new(); + let init_mint_account = solana_sdk::system_instruction::create_account(&payer.pubkey(), &mint.pubkey(), Rent::default().minimum_balance(spl_token::state::Mint::LEN), spl_token::state::Mint::LEN as u64, &spl_token::id()); + let init_mint = spl_token::instruction::initialize_mint(&spl_token::id(), &mint.pubkey(), &mint_authority.pubkey(), None, 8)?; + send_ix_in_tx(&client, init_mint_account, &payer, vec![&payer, &mint])?; + send_ix_in_tx(&client, init_mint, &payer, vec![&payer])?; + + // Attest a token + let rando = Keypair::new(); + let mint_data = get_mint(&client, &mint.pubkey())?; + let attest_token = token_bridge::instructions::attest(token_program_id, program_id, payer.pubkey(), mint.pubkey(), mint_data, rando.pubkey(), 0).unwrap(); + send_ix_in_tx(&client, attest_token, &payer, vec![&payer])?; + + // Create a token account + let token_authority = Keypair::new(); + let token_acc = Keypair::new(); + let init_token_sys = solana_sdk::system_instruction::create_account(&payer.pubkey(), &token_acc.pubkey(), Rent::default().minimum_balance(spl_token::state::Account::LEN), spl_token::state::Account::LEN as u64, &spl_token::id()); + let init_token_account = spl_token::instruction::initialize_account(&spl_token::id(), &token_acc.pubkey(), &mint.pubkey(), &token_authority.pubkey())?; + send_ix_in_tx(&client, init_token_sys, &payer, vec![&payer, &token_acc])?; + send_ix_in_tx(&client, init_token_account, &payer, vec![&payer])?; + + // Mint tokens + let mint_ix = spl_token::instruction::mint_to(&spl_token::id(), &mint.pubkey(), &token_acc.pubkey(), &mint_authority.pubkey(), &[], 1000)?; + send_ix_in_tx(&client, mint_ix, &payer, vec![&payer, &mint_authority])?; + + // Give allowance + let bridge_token_authority = token_bridge::accounts::AuthoritySigner::key(None, &token_program_id); + let allowance_ix = spl_token::instruction::approve(&spl_token::id(), &token_acc.pubkey(), &bridge_token_authority, &token_authority.pubkey(), &[], 1000)?; + send_ix_in_tx(&client, allowance_ix, &payer, vec![&payer, &token_authority])?; + + // Transfer to ETH + let transfer_eth = token_bridge::instructions::transfer_native(token_program_id, program_id, payer.pubkey(), token_acc.pubkey(), mint.pubkey(), TransferNativeData { + nonce: 1, + amount: 500, + fee: 0, + target_address: [2; 32], + target_chain: 2, + }).unwrap(); + send_ix_in_tx(&client, transfer_eth, &payer, vec![&payer])?; + let transfer_eth = token_bridge::instructions::transfer_native(token_program_id, program_id, payer.pubkey(), token_acc.pubkey(), mint.pubkey(), TransferNativeData { + nonce: 2, + amount: 500, + fee: 0, + target_address: [2; 32], + target_chain: 2, + }).unwrap(); + send_ix_in_tx(&client, transfer_eth, &payer, vec![&payer])?; + + Ok(()) +} + +fn send_ix_in_tx(client: &RpcClient, ix: Instruction, payer: &Keypair, signers: Vec<&Keypair>) -> Result<(), ClientError> { + let mut tx = Transaction::new_with_payer(&[ix], Some(&payer.pubkey())); + + let (recent_blockhash, _) = client.get_recent_blockhash()?; + tx.try_sign(&signers, recent_blockhash)?; + println!("Transaction signed."); + + let signature = client.send_and_confirm_transaction_with_spinner_and_config( + &tx, + CommitmentConfig::processed(), + RpcSendTransactionConfig { + skip_preflight: true, + preflight_commitment: None, + encoding: None, + }, + )?; + println!("Signature: {}", signature); + + Ok(()) +} + +fn get_mint(client: &RpcClient, mint: &Pubkey) -> Result { + let acc = client.get_account(mint)?; + Mint::unpack(acc.data()).map_err(|e| ClientError { request: None, kind: ClientErrorKind::Custom(String::from("Could not deserialize mint")) }) +} \ No newline at end of file diff --git a/solana/modules/token_bridge/program/Cargo.toml b/solana/modules/token_bridge/program/Cargo.toml new file mode 100644 index 00000000..8df3d5ef --- /dev/null +++ b/solana/modules/token_bridge/program/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "token-bridge" +version = "0.1.0" +description = "Created with Rocksalt" +edition = "2018" + +[lib] +crate-type = ["cdylib", "lib"] +name = "token_bridge" + +[features] +no-entrypoint = ["solitaire/no-entrypoint"] +client = ["solitaire-client"] +no-idl = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +bridge = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] } +borsh = "0.8.1" +byteorder = "1.4.3" +rocksalt = { path = "../../../solitaire/rocksalt" } +solitaire = { path = "../../../solitaire/program" } +sha3 = "0.9.1" +solana-program = "*" +spl-token = { version = "=3.1.0", features = ["no-entrypoint"] } +primitive-types = { version = "0.9.0", default-features = false } +solitaire-client = { path = "../../../solitaire/client", optional = true } diff --git a/solana/modules/token_bridge/program/Xargo.toml b/solana/modules/token_bridge/program/Xargo.toml new file mode 100644 index 00000000..1744f098 --- /dev/null +++ b/solana/modules/token_bridge/program/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] \ No newline at end of file diff --git a/solana/modules/token_bridge/program/src/accounts.rs b/solana/modules/token_bridge/program/src/accounts.rs new file mode 100644 index 00000000..8d95c622 --- /dev/null +++ b/solana/modules/token_bridge/program/src/accounts.rs @@ -0,0 +1,85 @@ +use crate::types::*; +use bridge::{ + api::ForeignAddress, + vaa::{ + DeserializePayload, + PayloadMessage, + }, +}; +use solana_program::pubkey::Pubkey; +use solitaire::{ + processors::seeded::Seeded, + *, +}; + +pub type AuthoritySigner<'b> = Derive, "authority_signer">; +pub type CustodySigner<'b> = Derive, "custody_signer">; +pub type MintSigner<'b> = Derive, "mint_signer">; + +pub type EmitterAccount<'b> = Derive, "emitter">; + +pub type ConfigAccount<'b, const State: AccountState> = + Derive, "config">; + +pub type CustodyAccount<'b, const State: AccountState> = Data<'b, SplAccount, { State }>; + +pub struct CustodyAccountDerivationData { + pub mint: Pubkey, +} + +impl<'b, const State: AccountState> Seeded<&CustodyAccountDerivationData> + for CustodyAccount<'b, { State }> +{ + fn seeds(accs: &CustodyAccountDerivationData) -> Vec> { + vec![accs.mint.to_bytes().to_vec()] + } +} + +pub type WrappedMint<'b, const State: AccountState> = Data<'b, SplMint, { State }>; + +pub struct WrappedDerivationData { + pub token_chain: ChainID, + pub token_address: ForeignAddress, +} + +impl<'b, const State: AccountState> Seeded<&WrappedDerivationData> for WrappedMint<'b, { State }> { + fn seeds(data: &WrappedDerivationData) -> Vec> { + vec![ + String::from("wrapped").as_bytes().to_vec(), + data.token_chain.to_be_bytes().to_vec(), + data.token_address.to_vec(), + ] + } +} + +pub type WrappedTokenMeta<'b, const State: AccountState> = Data<'b, WrappedMeta, { State }>; + +impl<'b, const State: AccountState> Seeded<&WrappedDerivationData> + for WrappedTokenMeta<'b, { State }> +{ + fn seeds(data: &WrappedDerivationData) -> Vec> { + vec![ + String::from("meta").as_bytes().to_vec(), + data.token_chain.to_be_bytes().to_vec(), + data.token_address.to_vec(), + ] + } +} + +/// Registered chain endpoint +pub type Endpoint<'b, const State: AccountState> = Data<'b, EndpointRegistration, { State }>; + +pub struct EndpointDerivationData { + pub emitter_chain: u16, + pub emitter_address: ForeignAddress, +} + +/// Seeded implementation based on an incoming VAA +impl<'b, const State: AccountState> Seeded<&EndpointDerivationData> for Endpoint<'b, { State }> { + fn seeds(data: &EndpointDerivationData) -> Vec> { + vec![ + data.emitter_chain.to_be_bytes().to_vec(), + data.emitter_address.to_vec(), + ] + } +} diff --git a/solana/modules/token_bridge/program/src/api.rs b/solana/modules/token_bridge/program/src/api.rs new file mode 100644 index 00000000..2b1a97a0 --- /dev/null +++ b/solana/modules/token_bridge/program/src/api.rs @@ -0,0 +1,13 @@ +pub mod attest; +pub mod complete_transfer; +pub mod create_wrapped; +pub mod initialize; +pub mod register_chain; +pub mod transfer; + +pub use attest::*; +pub use complete_transfer::*; +pub use create_wrapped::*; +pub use initialize::*; +pub use register_chain::*; +pub use transfer::*; diff --git a/solana/modules/token_bridge/program/src/api/attest.rs b/solana/modules/token_bridge/program/src/api/attest.rs new file mode 100644 index 00000000..3f505c0a --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/attest.rs @@ -0,0 +1,134 @@ +use crate::{ + accounts::{ + ConfigAccount, + EmitterAccount, + }, + messages::{ + PayloadAssetMeta, + PayloadTransfer, + }, + types::*, +}; +use bridge::{ + api::{ + PostMessage, + PostMessageData, + }, + vaa::SerializePayload, +}; +use primitive_types::U256; +use solana_program::{ + account_info::AccountInfo, + instruction::{ + AccountMeta, + Instruction, + }, + program::{ + invoke, + invoke_signed, + }, + program_error::ProgramError, + pubkey::Pubkey, + sysvar::clock::Clock, +}; +use solitaire::{ + CreationLamports::Exempt, + *, +}; +use spl_token::{ + error::TokenError::OwnerMismatch, + state::{ + Account, + Mint, + }, +}; +use std::ops::{ + Deref, + DerefMut, +}; +use solitaire::processors::seeded::invoke_seeded; + +#[derive(FromAccounts)] +pub struct AttestToken<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + /// Mint to attest + pub mint: Data<'b, SplMint, { AccountState::Initialized }>, + pub mint_meta: Data<'b, SplMint, { AccountState::MaybeInitialized }>, + + /// CPI Context + pub bridge: Info<'b>, + + /// Account to store the posted message + pub message: Info<'b>, + + /// Emitter of the VAA + pub emitter: EmitterAccount<'b>, + + /// Tracker for the emitter sequence + pub sequence: Info<'b>, + + /// Account to collect tx fee + pub fee_collector: Info<'b>, + + pub clock: Sysvar<'b, Clock>, +} + +impl<'b> InstructionContext<'b> for AttestToken<'b> { + fn verify(&self, _: &Pubkey) -> Result<()> { + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct AttestTokenData { + pub nonce: u32, +} + +pub fn attest_token( + ctx: &ExecutionContext, + accs: &mut AttestToken, + data: AttestTokenData, +) -> Result<()> { + // Pay fee + let transfer_ix = + solana_program::system_instruction::transfer(accs.payer.key, accs.fee_collector.key, 1000); + invoke(&transfer_ix, ctx.accounts)?; + + let payload = PayloadAssetMeta { + token_address: accs.mint.info().key.to_bytes(), + token_chain: 1, + decimals: U256::from(accs.mint.decimals), + symbol: "".to_string(), // TODO metadata + name: "".to_string(), + }; + + if accs.mint_meta.is_initialized() { + // Populate fields + } + + let params = bridge::instruction::Instruction::PostMessage(PostMessageData { + nonce: data.nonce, + payload: payload.try_to_vec()?, + }); + + let ix = Instruction::new_with_bytes( + accs.config.wormhole_bridge, + params.try_to_vec()?.as_slice(), + vec![ + AccountMeta::new_readonly(*accs.bridge.key, false), + AccountMeta::new(*accs.message.key, false), + AccountMeta::new_readonly(*accs.emitter.key, true), + AccountMeta::new(*accs.sequence.key, false), + AccountMeta::new(*accs.payer.key, true), + AccountMeta::new(*accs.fee_collector.key, false), + AccountMeta::new_readonly(*accs.clock.info().key, false), + AccountMeta::new_readonly(solana_program::system_program::id(), false), + AccountMeta::new_readonly(solana_program::sysvar::rent::ID, false), + ], + ); + invoke_seeded(&ix, ctx, &accs.emitter, None)?; + + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/api/complete_transfer.rs b/solana/modules/token_bridge/program/src/api/complete_transfer.rs new file mode 100644 index 00000000..209330b7 --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/complete_transfer.rs @@ -0,0 +1,207 @@ +use crate::{ + accounts::{ + ConfigAccount, + CustodyAccount, + CustodyAccountDerivationData, + CustodySigner, + Endpoint, + EndpointDerivationData, + MintSigner, + WrappedDerivationData, + WrappedMint, + }, + messages::PayloadTransfer, + types::*, + TokenBridgeError::*, +}; +use bridge::vaa::ClaimableVAA; +use solana_program::{ + account_info::AccountInfo, + program::invoke_signed, + program_error::ProgramError, + pubkey::Pubkey, +}; +use solitaire::{ + processors::seeded::{ + invoke_seeded, + Seeded, + }, + CreationLamports::Exempt, + *, +}; +use spl_token::state::{ + Account, + Mint, +}; +use std::ops::{ + Deref, + DerefMut, +}; + +#[derive(FromAccounts)] +pub struct CompleteNative<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + pub vaa: ClaimableVAA<'b, PayloadTransfer>, + pub chain_registration: Endpoint<'b, { AccountState::Initialized }>, + + pub to: Data<'b, SplAccount, { AccountState::Initialized }>, + pub custody: CustodyAccount<'b, { AccountState::Initialized }>, + pub mint: Data<'b, SplMint, { AccountState::Initialized }>, + + pub custody_signer: CustodySigner<'b>, +} + +impl<'a> From<&CompleteNative<'a>> for EndpointDerivationData { + fn from(accs: &CompleteNative<'a>) -> Self { + EndpointDerivationData { + emitter_chain: accs.vaa.meta().emitter_chain, + emitter_address: accs.vaa.meta().emitter_address, + } + } +} + +impl<'a> From<&CompleteNative<'a>> for CustodyAccountDerivationData { + fn from(accs: &CompleteNative<'a>) -> Self { + CustodyAccountDerivationData { + mint: *accs.mint.info().key, + } + } +} + +impl<'b> InstructionContext<'b> for CompleteNative<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + // Verify the chain registration + self.chain_registration + .verify_derivation(program_id, &(self.into()))?; + + // Verify that the custody account is derived correctly + self.custody.verify_derivation(program_id, &(self.into()))?; + + // Verify mints + if self.mint.info().key != self.to.info().key { + return Err(InvalidMint.into()); + } + if self.mint.info().key != self.custody.info().key { + return Err(InvalidMint.into()); + } + if &self.custody.owner != self.custody_signer.key { + return Err(InvalidMint.into()); + } + + // Verify VAA + if self.vaa.token_address != self.mint.info().key.to_bytes() { + return Err(InvalidMint.into()); + } + if self.vaa.token_chain != 1 { + return Err(InvalidChain.into()); + } + + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct CompleteNativeData {} + +pub fn complete_native( + ctx: &ExecutionContext, + accs: &mut CompleteNative, + data: CompleteNativeData, +) -> Result<()> { + // Prevent vaa double signing + accs.vaa.claim(ctx, accs.payer.key)?; + + // Transfer tokens + let transfer_ix = spl_token::instruction::transfer( + &spl_token::id(), + accs.custody.info().key, + accs.to.info().key, + accs.custody_signer.key, + &[], + accs.vaa.amount.as_u64(), + )?; + invoke_seeded(&transfer_ix, ctx, &accs.custody_signer, None)?; + + // TODO fee + + Ok(()) +} + +#[derive(FromAccounts)] +pub struct CompleteWrapped<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + // Signed message for the transfer + pub vaa: ClaimableVAA<'b, PayloadTransfer>, + + pub chain_registration: Endpoint<'b, { AccountState::Initialized }>, + + pub to: Data<'b, SplAccount, { AccountState::Initialized }>, + pub mint: WrappedMint<'b, { AccountState::Initialized }>, + + pub mint_authority: MintSigner<'b>, +} + +impl<'a> From<&CompleteWrapped<'a>> for EndpointDerivationData { + fn from(accs: &CompleteWrapped<'a>) -> Self { + EndpointDerivationData { + emitter_chain: accs.vaa.meta().emitter_chain, + emitter_address: accs.vaa.meta().emitter_address, + } + } +} + +impl<'a> From<&CompleteWrapped<'a>> for WrappedDerivationData { + fn from(accs: &CompleteWrapped<'a>) -> Self { + WrappedDerivationData { + token_chain: accs.vaa.token_chain, + token_address: accs.vaa.token_address, + } + } +} + +impl<'b> InstructionContext<'b> for CompleteWrapped<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + // Verify the chain registration + self.chain_registration + .verify_derivation(program_id, &(self.into()))?; + + // Verify mint + self.mint.verify_derivation(program_id, &(self.into()))?; + + // Verify mints + if self.mint.info().key != self.to.info().key { + return Err(InvalidMint.into()); + } + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct CompleteWrappedData {} + +pub fn complete_wrapped( + ctx: &ExecutionContext, + accs: &mut CompleteWrapped, + data: CompleteWrappedData, +) -> Result<()> { + accs.vaa.claim(ctx, accs.payer.key)?; + + // Mint tokens + let mint_ix = spl_token::instruction::mint_to( + &spl_token::id(), + accs.mint.info().key, + accs.to.info().key, + accs.mint_authority.key, + &[], + accs.vaa.amount.as_u64(), + )?; + invoke_seeded(&mint_ix, ctx, &accs.mint_authority, None)?; + + // TODO fee + + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/api/create_wrapped.rs b/solana/modules/token_bridge/program/src/api/create_wrapped.rs new file mode 100644 index 00000000..bc5f4af9 --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/create_wrapped.rs @@ -0,0 +1,115 @@ +use crate::{ + accounts::{ + ConfigAccount, + Endpoint, + EndpointDerivationData, + MintSigner, + WrappedDerivationData, + WrappedMint, + WrappedTokenMeta, + }, + messages::PayloadAssetMeta, + types::*, +}; +use bridge::vaa::ClaimableVAA; +use solana_program::{ + account_info::AccountInfo, + program::invoke_signed, + program_error::ProgramError, + pubkey::Pubkey, +}; +use solitaire::{ + processors::seeded::Seeded, + CreationLamports::Exempt, + *, +}; +use spl_token::{ + error::TokenError::OwnerMismatch, + state::{ + Account, + Mint, + }, +}; +use std::ops::{ + Deref, + DerefMut, +}; + +#[derive(FromAccounts)] +pub struct CreateWrapped<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + pub chain_registration: Endpoint<'b, { AccountState::Initialized }>, + pub vaa: ClaimableVAA<'b, PayloadAssetMeta>, + + // New Wrapped + pub mint: WrappedMint<'b, { AccountState::Uninitialized }>, + pub meta: WrappedTokenMeta<'b, { AccountState::Uninitialized }>, + + pub mint_authority: MintSigner<'b>, +} + +impl<'a> From<&CreateWrapped<'a>> for EndpointDerivationData { + fn from(accs: &CreateWrapped<'a>) -> Self { + EndpointDerivationData { + emitter_chain: accs.vaa.meta().emitter_chain, + emitter_address: accs.vaa.meta().emitter_address, + } + } +} + +impl<'a> From<&CreateWrapped<'a>> for WrappedDerivationData { + fn from(accs: &CreateWrapped<'a>) -> Self { + WrappedDerivationData { + token_chain: accs.vaa.token_chain, + token_address: accs.vaa.token_address, + } + } +} + +impl<'b> InstructionContext<'b> for CreateWrapped<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + self.mint.verify_derivation(program_id, &(self.into()))?; + self.meta.verify_derivation(program_id, &(self.into()))?; + self.chain_registration + .verify_derivation(program_id, &(self.into()))?; + + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct CreateWrappedData {} + +pub fn create_wrapped( + ctx: &ExecutionContext, + accs: &mut CreateWrapped, + data: CreateWrappedData, +) -> Result<()> { + accs.vaa.claim(ctx, accs.payer.key)?; + + // Create mint account + accs.mint + .create(&((&*accs).into()), ctx, accs.payer.key, Exempt); + + // Initialize mint + let init_ix = spl_token::instruction::initialize_mint( + &spl_token::id(), + accs.mint.info().key, + accs.mint_authority.key, + None, + 8, + )?; + invoke_signed(&init_ix, ctx.accounts, &[])?; + + // Create meta account + accs.meta + .create(&((&*accs).into()), ctx, accs.payer.key, Exempt); + + // Populate meta account + accs.meta.chain = accs.vaa.token_chain; + accs.meta.token_address = accs.vaa.token_address; + + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/api/initialize.rs b/solana/modules/token_bridge/program/src/api/initialize.rs new file mode 100644 index 00000000..8646c04e --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/initialize.rs @@ -0,0 +1,37 @@ +use crate::{ + accounts::ConfigAccount, + types::*, +}; +use solana_program::{ + account_info::AccountInfo, + program_error::ProgramError, + pubkey::Pubkey, +}; +use solitaire::{ + CreationLamports::Exempt, + *, +}; +use std::ops::{ + Deref, + DerefMut, +}; + +#[derive(FromAccounts)] +pub struct Initialize<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Uninitialized }>, +} + +impl<'b> InstructionContext<'b> for Initialize<'b> { +} + +pub fn initialize( + ctx: &ExecutionContext, + accs: &mut Initialize, + wormhole_bridge: Pubkey, +) -> Result<()> { + // Create the config account + accs.config.create(ctx, accs.payer.key, Exempt)?; + accs.config.wormhole_bridge = wormhole_bridge; + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/api/register_chain.rs b/solana/modules/token_bridge/program/src/api/register_chain.rs new file mode 100644 index 00000000..229bb257 --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/register_chain.rs @@ -0,0 +1,75 @@ +use crate::{ + accounts::{ + ConfigAccount, + Endpoint, + EndpointDerivationData, + }, + messages::PayloadGovernanceRegisterChain, + types::*, +}; +use bridge::vaa::{ + ClaimableVAA, + DeserializePayload, + PayloadMessage, +}; +use solana_program::{ + account_info::AccountInfo, + program_error::ProgramError, + pubkey::Pubkey, +}; +use solitaire::{ + processors::seeded::Seeded, + CreationLamports::Exempt, + *, +}; +use std::ops::{ + Deref, + DerefMut, +}; + +#[derive(FromAccounts)] +pub struct RegisterChain<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + pub endpoint: Endpoint<'b, { AccountState::Uninitialized }>, + + pub vaa: ClaimableVAA<'b, PayloadGovernanceRegisterChain>, +} + +impl<'a> From<&RegisterChain<'a>> for EndpointDerivationData { + fn from(accs: &RegisterChain<'a>) -> Self { + EndpointDerivationData { + emitter_chain: accs.vaa.meta().emitter_chain, + emitter_address: accs.vaa.meta().emitter_address, + } + } +} + +impl<'b> InstructionContext<'b> for RegisterChain<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + self.endpoint.verify_derivation(program_id, &self.into())?; + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct RegisterChainData {} + +pub fn register_chain( + ctx: &ExecutionContext, + accs: &mut RegisterChain, + data: RegisterChainData, +) -> Result<()> { + // Claim VAA + accs.vaa.claim(ctx, accs.payer.key)?; + + // Create endpoint + accs.endpoint + .create(&((&*accs).into()), ctx, accs.payer.key, Exempt); + + accs.endpoint.chain = accs.vaa.chain; + accs.endpoint.contract = accs.vaa.endpoint_address; + + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/api/transfer.rs b/solana/modules/token_bridge/program/src/api/transfer.rs new file mode 100644 index 00000000..552e6be6 --- /dev/null +++ b/solana/modules/token_bridge/program/src/api/transfer.rs @@ -0,0 +1,322 @@ +use crate::{ + accounts::{ + AuthoritySigner, + ConfigAccount, + CustodyAccount, + CustodyAccountDerivationData, + CustodySigner, + EmitterAccount, + MintSigner, + WrappedDerivationData, + WrappedMint, + WrappedTokenMeta, + }, + messages::PayloadTransfer, + types::*, + TokenBridgeError, + TokenBridgeError::WrongAccountOwner, +}; +use bridge::{ + api::{ + PostMessage, + PostMessageData, + }, + vaa::SerializePayload, +}; +use primitive_types::U256; +use solana_program::{ + account_info::AccountInfo, + instruction::{ + AccountMeta, + Instruction, + }, + program::{ + invoke, + invoke_signed, + }, + program_error::ProgramError, + program_option::COption, + pubkey::Pubkey, + sysvar::clock::Clock, +}; +use solitaire::{ + processors::seeded::{ + invoke_seeded, + Seeded, + }, + CreationLamports::Exempt, + *, +}; +use spl_token::{ + error::TokenError::OwnerMismatch, + state::{ + Account, + Mint, + }, +}; +use std::ops::{ + Deref, + DerefMut, +}; + +#[derive(FromAccounts)] +pub struct TransferNative<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + pub from: Data<'b, SplAccount, { AccountState::Initialized }>, + pub mint: Data<'b, SplMint, { AccountState::Initialized }>, + + pub custody: CustodyAccount<'b, { AccountState::MaybeInitialized }>, + + // This could allow someone to race someone else's tx if they do the approval in a separate tx. + // Therefore the approval must be set in the same tx + pub authority_signer: AuthoritySigner<'b>, + pub custody_signer: CustodySigner<'b>, + + /// CPI Context + pub bridge: Info<'b>, + + /// Account to store the posted message + pub message: Info<'b>, + + /// Emitter of the VAA + pub emitter: EmitterAccount<'b>, + + /// Tracker for the emitter sequence + pub sequence: Info<'b>, + + /// Account to collect tx fee + pub fee_collector: Info<'b>, + + pub clock: Sysvar<'b, Clock>, +} + +impl<'a> From<&TransferNative<'a>> for CustodyAccountDerivationData { + fn from(accs: &TransferNative<'a>) -> Self { + CustodyAccountDerivationData { + mint: *accs.mint.info().key, + } + } +} + +impl<'b> InstructionContext<'b> for TransferNative<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + // Verify that the custody account is derived correctly + self.custody.verify_derivation(program_id, &self.into())?; + + // Verify mints + if self.mint.info().key != self.from.info().key { + return Err(TokenBridgeError::InvalidMint.into()); + } + + // Verify that the token is not a wrapped token + if let COption::Some(mint_authority) = self.mint.mint_authority { + if mint_authority == MintSigner::key(None, program_id) { + return Err(TokenBridgeError::TokenNotNative.into()); + } + } + + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct TransferNativeData { + pub nonce: u32, + pub amount: u64, + pub fee: u64, + pub target_address: Address, + pub target_chain: ChainID, +} + +pub fn transfer_native( + ctx: &ExecutionContext, + accs: &mut TransferNative, + data: TransferNativeData, +) -> Result<()> { + if !accs.custody.is_initialized() { + accs.custody + .create(&(&*accs).into(), ctx, accs.payer.key, Exempt)?; + + let init_ix = spl_token::instruction::initialize_account( + &spl_token::id(), + accs.custody.info().key, + accs.mint.info().key, + accs.custody_signer.key, + )?; + invoke_signed(&init_ix, ctx.accounts, &[])?; + } + + // Transfer tokens + let transfer_ix = spl_token::instruction::transfer( + &spl_token::id(), + accs.from.info().key, + accs.custody.info().key, + accs.authority_signer.key, + &[], + data.amount, + )?; + invoke_seeded(&transfer_ix, ctx, &accs.authority_signer, None)?; + + // Pay fee + let transfer_ix = + solana_program::system_instruction::transfer(accs.payer.key, accs.fee_collector.key, 1000); + invoke(&transfer_ix, ctx.accounts)?; + + // Post message + let payload = PayloadTransfer { + amount: U256::from(data.amount), + token_address: accs.mint.info().key.to_bytes(), + token_chain: 1, + to: data.target_address, + to_chain: data.target_chain, + fee: U256::from(data.fee), + }; + let params = bridge::instruction::Instruction::PostMessage(PostMessageData { + nonce: data.nonce, + payload: payload.try_to_vec()?, + }); + + let ix = Instruction::new_with_bytes( + accs.config.wormhole_bridge, + params.try_to_vec()?.as_slice(), + vec![ + AccountMeta::new_readonly(*accs.bridge.key, false), + AccountMeta::new(*accs.message.key, false), + AccountMeta::new_readonly(*accs.emitter.key, true), + AccountMeta::new(*accs.sequence.key, false), + AccountMeta::new(*accs.payer.key, true), + AccountMeta::new(*accs.fee_collector.key, false), + AccountMeta::new_readonly(*accs.clock.info().key, false), + AccountMeta::new_readonly(solana_program::system_program::id(), false), + AccountMeta::new_readonly(solana_program::sysvar::rent::ID, false), + ], + ); + invoke_seeded(&ix, ctx, &accs.emitter, None)?; + + Ok(()) +} + +#[derive(FromAccounts)] +pub struct TransferWrapped<'b> { + pub payer: Signer>, + pub config: ConfigAccount<'b, { AccountState::Initialized }>, + + pub from: Data<'b, SplAccount, { AccountState::Initialized }>, + pub from_owner: Signer>, + pub mint: WrappedMint<'b, { AccountState::Initialized }>, + pub wrapped_meta: WrappedTokenMeta<'b, { AccountState::Initialized }>, + + pub mint_authority: MintSigner<'b>, + + /// CPI Context + pub bridge: Info<'b>, + + /// Account to store the posted message + pub message: Info<'b>, + + /// Emitter of the VAA + pub emitter: EmitterAccount<'b>, + + /// Tracker for the emitter sequence + pub sequence: Info<'b>, + + /// Account to collect tx fee + pub fee_collector: Info<'b>, + + pub clock: Sysvar<'b, Clock>, +} + +impl<'a> From<&TransferWrapped<'a>> for WrappedDerivationData { + fn from(accs: &TransferWrapped<'a>) -> Self { + WrappedDerivationData { + token_chain: 1, + token_address: accs.mint.info().key.to_bytes(), + } + } +} + +impl<'b> InstructionContext<'b> for TransferWrapped<'b> { + fn verify(&self, program_id: &Pubkey) -> Result<()> { + // Verify that the from account is owned by the from_owner + if &self.from.owner != self.from_owner.key { + return Err(WrongAccountOwner.into()); + } + + // Verify mints + if self.mint.info().key != &self.from.mint { + return Err(TokenBridgeError::InvalidMint.into()); + } + + // Verify that meta is correct + self.wrapped_meta + .verify_derivation(program_id, &self.into())?; + + Ok(()) + } +} + +#[derive(BorshDeserialize, BorshSerialize, Default)] +pub struct TransferWrappedData { + pub nonce: u32, + pub amount: u64, + pub fee: u64, + pub target_address: Address, + pub target_chain: ChainID, +} + +pub fn transfer_wrapped( + ctx: &ExecutionContext, + accs: &mut TransferWrapped, + data: TransferWrappedData, +) -> Result<()> { + // Burn tokens + let burn_ix = spl_token::instruction::burn( + &spl_token::id(), + accs.from.info().key, + accs.mint.info().key, + accs.mint_authority.key, + &[], + data.amount, + )?; + invoke_seeded(&burn_ix, ctx, &accs.mint_authority, None)?; + + // Pay fee + let transfer_ix = + solana_program::system_instruction::transfer(accs.payer.key, accs.fee_collector.key, 1000); + invoke(&transfer_ix, ctx.accounts)?; + + // Post message + let payload = PayloadTransfer { + amount: U256::from(data.amount), + token_address: accs.wrapped_meta.token_address, + token_chain: accs.wrapped_meta.chain, + to: data.target_address, + to_chain: data.target_chain, + fee: U256::from(data.fee), + }; + let params = bridge::instruction::Instruction::PostMessage(PostMessageData { + nonce: data.nonce, + payload: payload.try_to_vec()?, + }); + + let ix = Instruction::new_with_bytes( + accs.config.wormhole_bridge, + params.try_to_vec()?.as_slice(), + vec![ + AccountMeta::new_readonly(*accs.bridge.key, false), + AccountMeta::new(*accs.message.key, false), + AccountMeta::new_readonly(*accs.emitter.key, true), + AccountMeta::new(*accs.sequence.key, false), + AccountMeta::new(*accs.payer.key, true), + AccountMeta::new(*accs.fee_collector.key, false), + AccountMeta::new_readonly(*accs.clock.info().key, false), + AccountMeta::new_readonly(solana_program::system_program::id(), false), + AccountMeta::new_readonly(solana_program::sysvar::rent::ID, false), + ], + ); + invoke_seeded(&ix, ctx, &accs.emitter, None)?; + + Ok(()) +} diff --git a/solana/modules/token_bridge/program/src/instructions/mod.rs b/solana/modules/token_bridge/program/src/instructions/mod.rs new file mode 100644 index 00000000..5c21bb88 --- /dev/null +++ b/solana/modules/token_bridge/program/src/instructions/mod.rs @@ -0,0 +1,513 @@ +use crate::{ + accounts::{ + AuthoritySigner, + ConfigAccount, + CustodyAccount, + CustodyAccountDerivationData, + CustodySigner, + EmitterAccount, + Endpoint, + EndpointDerivationData, + MintSigner, + WrappedDerivationData, + WrappedMint, + WrappedTokenMeta, + }, + api::{ + complete_transfer::{ + CompleteNativeData, + CompleteWrappedData, + }, + AttestTokenData, + CreateWrappedData, + RegisterChainData, + TransferNativeData, + TransferWrappedData, + }, + messages::{ + PayloadAssetMeta, + PayloadGovernanceRegisterChain, + PayloadTransfer, + }, +}; +use borsh::BorshSerialize; +use bridge::{ + accounts::{ + Bridge, + Claim, + ClaimDerivationData, + FeeCollector, + Message, + MessageDerivationData, + Sequence, + SequenceDerivationData, + }, + api::ForeignAddress, + types::{ + BridgeConfig, + PostedMessage, + }, + vaa::{ + ClaimableVAA, + PayloadMessage, + }, +}; +use solana_program::instruction::Instruction; +use solitaire::{ + processors::seeded::Seeded, + AccountState, +}; +use solitaire_client::{ + AccountMeta, + Keypair, + Pubkey, +}; +use bridge::vaa::SerializePayload; +use primitive_types::U256; +use spl_token::state::Mint; + +pub fn initialize( + program_id: Pubkey, + payer: Pubkey, + bridge: Pubkey, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + ], + data: crate::instruction::Instruction::Initialize(bridge).try_to_vec()?, + }) +} + +pub fn complete_native( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + message_key: Pubkey, + message: PostedMessage, + to: Pubkey, + mint: Pubkey, + data: CompleteNativeData, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let (message_acc, claim_acc) = claimable_vaa(bridge_id, message_key, message.clone()); + let endpoint = Endpoint::<'_, { AccountState::Initialized }>::key( + &EndpointDerivationData { + emitter_chain: message.emitter_chain, + emitter_address: message.emitter_address, + }, + &program_id, + ); + let custody_key = CustodyAccount::<'_, { AccountState::Initialized }>::key( + &CustodyAccountDerivationData { mint }, + &program_id, + ); + let custody_signer_key = CustodySigner::key(None, &program_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + message_acc, + claim_acc, + AccountMeta::new_readonly(endpoint, false), + AccountMeta::new(to, false), + AccountMeta::new(custody_key, false), + AccountMeta::new_readonly(mint, false), + AccountMeta::new_readonly(custody_signer_key, false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + ], + data: crate::instruction::Instruction::CompleteNative(data).try_to_vec()?, + }) +} + +pub fn complete_wrapped( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + message_key: Pubkey, + message: PostedMessage, + payload: PayloadTransfer, + to: Pubkey, + data: CompleteWrappedData, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let (message_acc, claim_acc) = claimable_vaa(bridge_id, message_key, message.clone()); + let endpoint = Endpoint::<'_, { AccountState::Initialized }>::key( + &EndpointDerivationData { + emitter_chain: message.emitter_chain, + emitter_address: message.emitter_address, + }, + &bridge_id, + ); + let mint_key = WrappedMint::<'_, { AccountState::Uninitialized }>::key( + &WrappedDerivationData { + token_chain: payload.token_chain, + token_address: payload.token_address, + }, + &program_id, + ); + let mint_authority_key = MintSigner::key(None, &program_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + message_acc, + claim_acc, + AccountMeta::new_readonly(endpoint, false), + AccountMeta::new(to, false), + AccountMeta::new_readonly(mint_key, false), + AccountMeta::new_readonly(mint_authority_key, false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + ], + data: crate::instruction::Instruction::CompleteWrapped(data).try_to_vec()?, + }) +} + +pub fn create_wrapped( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + message_key: Pubkey, + message: PostedMessage, + payload: PayloadAssetMeta, + data: CreateWrappedData, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let (message_acc, claim_acc) = claimable_vaa(bridge_id, message_key, message.clone()); + let endpoint = Endpoint::<'_, { AccountState::Initialized }>::key( + &EndpointDerivationData { + emitter_chain: message.emitter_chain, + emitter_address: message.emitter_address, + }, + &bridge_id, + ); + let mint_key = WrappedMint::<'_, { AccountState::Uninitialized }>::key( + &WrappedDerivationData { + token_chain: payload.token_chain, + token_address: payload.token_address, + }, + &program_id, + ); + let mint_meta_key = WrappedTokenMeta::<'_, { AccountState::Uninitialized }>::key( + &WrappedDerivationData { + token_chain: payload.token_chain, + token_address: payload.token_address, + }, + &program_id, + ); + let mint_authority_key = MintSigner::key(None, &program_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + AccountMeta::new_readonly(endpoint, false), + message_acc, + claim_acc, + AccountMeta::new(mint_key, false), + AccountMeta::new(mint_meta_key, false), + AccountMeta::new_readonly(mint_authority_key, false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + ], + data: crate::instruction::Instruction::CreateWrapped(data).try_to_vec()?, + }) +} + +pub fn register_chain( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + message_key: Pubkey, + message: PostedMessage, + payload: PayloadGovernanceRegisterChain, + data: RegisterChainData, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let (message_acc, claim_acc) = claimable_vaa(bridge_id, message_key, message.clone()); + let endpoint = Endpoint::<'_, { AccountState::Initialized }>::key( + &EndpointDerivationData { + emitter_chain: message.emitter_chain, + emitter_address: message.emitter_address, + }, + &bridge_id, + ); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + AccountMeta::new_readonly(endpoint, false), + message_acc, + claim_acc, + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + ], + data: crate::instruction::Instruction::RegisterChain(data).try_to_vec()?, + }) +} + +fn claimable_vaa( + bridge_id: Pubkey, + message_key: Pubkey, + message: PostedMessage, +) -> (AccountMeta, AccountMeta) { + let claim_key = Claim::<'_, { AccountState::Initialized }>::key( + &ClaimDerivationData { + emitter_address: message.emitter_address, + emitter_chain: message.emitter_chain, + sequence: message.sequence, + }, + &bridge_id, + ); + + ( + AccountMeta::new_readonly(message_key, false), + AccountMeta::new(claim_key, false), + ) +} + +pub fn transfer_native( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + from: Pubkey, + mint: Pubkey, + data: TransferNativeData, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let custody_key = CustodyAccount::<'_, { AccountState::Initialized }>::key( + &CustodyAccountDerivationData { mint }, + &program_id, + ); + + let authority_signer_key = AuthoritySigner::key(None, &program_id); + let custody_signer_key = CustodySigner::key(None, &program_id); + let emitter_key = EmitterAccount::key(None, &program_id); + + // Bridge keys + let bridge_config = Bridge::<'_, { AccountState::Uninitialized }>::key(None, &bridge_id); + let payload = PayloadTransfer { + amount: U256::from(data.amount), + token_address: mint.to_bytes(), + token_chain: 1, + to: data.target_address, + to_chain: data.target_chain, + fee: U256::from(data.fee), + }; + let message_key = Message::<'_, { AccountState::Uninitialized }>::key( + &MessageDerivationData { + emitter_key: emitter_key.to_bytes(), + emitter_chain: 1, + nonce: data.nonce, + payload: payload.try_to_vec().unwrap(), + }, + &bridge_id, + ); + let sequence_key = Sequence::key( + &SequenceDerivationData { + emitter_key: &emitter_key, + }, + &bridge_id, + ); + let fee_collector_key = FeeCollector::key(None, &bridge_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + AccountMeta::new(from, false), + AccountMeta::new(mint, false), + AccountMeta::new(custody_key, false), + AccountMeta::new_readonly(authority_signer_key, false), + AccountMeta::new_readonly(custody_signer_key, false), + AccountMeta::new_readonly(bridge_config, false), + AccountMeta::new(message_key, false), + AccountMeta::new_readonly(emitter_key, false), + AccountMeta::new(sequence_key, false), + AccountMeta::new(fee_collector_key, false), + AccountMeta::new(solana_program::sysvar::clock::id(), false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + AccountMeta::new_readonly(spl_token::id(), false), + ], + data: crate::instruction::Instruction::TransferNative(data).try_to_vec()?, + }) +} + +pub fn transfer_wrapped( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + from: Pubkey, + from_owner: Pubkey, + token_chain: u16, + token_address: ForeignAddress, + data: TransferWrappedData, + sequence: u64, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + + let wrapped_mint_key = WrappedMint::<'_, { AccountState::Uninitialized }>::key( + &WrappedDerivationData { + token_chain, + token_address, + }, + &program_id, + ); + let wrapped_meta_key = WrappedTokenMeta::<'_, { AccountState::Uninitialized }>::key( + &WrappedDerivationData { + token_chain, + token_address, + }, + &program_id, + ); + + let mint_authority_key = MintSigner::key(None, &program_id); + let emitter_key = EmitterAccount::key(None, &program_id); + + // Bridge keys + let bridge_config = Bridge::<'_, { AccountState::Uninitialized }>::key(None, &bridge_id); + let payload = PayloadTransfer { + amount: U256::from(data.amount), + token_address, + token_chain, + to: data.target_address, + to_chain: data.target_chain, + fee: U256::from(data.fee), + }; + let message_key = Message::<'_, { AccountState::Uninitialized }>::key( + &MessageDerivationData { + emitter_key: emitter_key.to_bytes(), + emitter_chain: 1, + nonce: data.nonce, + payload: payload.try_to_vec().unwrap(), + }, + &bridge_id, + ); + let sequence_key = Sequence::key( + &SequenceDerivationData { + emitter_key: &emitter_key, + }, + &bridge_id, + ); + let fee_collector_key = FeeCollector::key(None, &bridge_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + AccountMeta::new(from, false), + AccountMeta::new(from_owner, true), + AccountMeta::new_readonly(wrapped_mint_key, false), + AccountMeta::new_readonly(wrapped_meta_key, false), + AccountMeta::new_readonly(mint_authority_key, false), + AccountMeta::new_readonly(bridge_config, false), + AccountMeta::new(message_key, false), + AccountMeta::new_readonly(emitter_key, false), + AccountMeta::new(sequence_key, false), + AccountMeta::new(fee_collector_key, false), + AccountMeta::new_readonly(solana_program::sysvar::clock::id(), false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + AccountMeta::new_readonly(spl_token::id(), false), + ], + data: crate::instruction::Instruction::TransferWrapped(data).try_to_vec()?, + }) +} + +pub fn attest( + program_id: Pubkey, + bridge_id: Pubkey, + payer: Pubkey, + mint: Pubkey, + mint_data: Mint, + mint_meta: Pubkey, + nonce: u32, +) -> solitaire::Result { + let config_key = ConfigAccount::<'_, { AccountState::Uninitialized }>::key(None, &program_id); + let emitter_key = EmitterAccount::key(None, &program_id); + + // Bridge keys + let bridge_config = Bridge::<'_, { AccountState::Uninitialized }>::key(None, &bridge_id); + let payload = PayloadAssetMeta { + token_address: mint.to_bytes(), + token_chain: 1, + decimals: U256::from(mint_data.decimals), + symbol: "".to_string(), // TODO metadata + name: "".to_string(), + }; + let message_key = Message::<'_, { AccountState::Uninitialized }>::key( + &MessageDerivationData { + emitter_key: emitter_key.to_bytes(), + emitter_chain: 1, + nonce, + payload: payload.try_to_vec().unwrap(), + }, + &bridge_id, + ); + let sequence_key = Sequence::key( + &SequenceDerivationData { + emitter_key: &emitter_key, + }, + &bridge_id, + ); + let fee_collector_key = FeeCollector::key(None, &bridge_id); + + Ok(Instruction { + program_id, + accounts: vec![ + AccountMeta::new(payer, true), + AccountMeta::new(config_key, false), + AccountMeta::new_readonly(mint, false), + AccountMeta::new_readonly(mint_meta, false), + // Bridge accounts + AccountMeta::new_readonly(bridge_config, false), + AccountMeta::new(message_key, false), + AccountMeta::new_readonly(emitter_key, false), + AccountMeta::new(sequence_key, false), + AccountMeta::new(fee_collector_key, false), + AccountMeta::new_readonly(solana_program::sysvar::clock::id(), false), + // Dependencies + AccountMeta::new(solana_program::sysvar::rent::id(), false), + AccountMeta::new(solana_program::system_program::id(), false), + // Program + AccountMeta::new_readonly(bridge_id, false), + ], + data: crate::instruction::Instruction::AttestToken(AttestTokenData { nonce }).try_to_vec()?, + }) +} diff --git a/solana/modules/token_bridge/program/src/lib.rs b/solana/modules/token_bridge/program/src/lib.rs new file mode 100644 index 00000000..fe6e7b3e --- /dev/null +++ b/solana/modules/token_bridge/program/src/lib.rs @@ -0,0 +1,76 @@ +#![feature(const_generics)] +#![feature(const_generics_defaults)] +#![allow(warnings)] + +// #![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))] + +#[cfg(feature = "no-entrypoint")] +pub mod instructions; + +pub mod accounts; +pub mod api; +pub mod messages; +pub mod types; + +use api::{ + attest_token, + complete_native, + complete_wrapped, + create_wrapped, + initialize, + register_chain, + transfer_native, + transfer_wrapped, + AttestToken, + AttestTokenData, + CompleteNative, + CompleteNativeData, + CompleteWrapped, + CompleteWrappedData, + CreateWrapped, + CreateWrappedData, + Initialize, + RegisterChain, + RegisterChainData, + TransferNative, + TransferNativeData, + TransferWrapped, + TransferWrappedData, +}; + +use solitaire::*; +use std::error::Error; + +pub enum TokenBridgeError { + InvalidPayload, + Unknown(String), + InvalidMint, + WrongAccountOwner, + InvalidUTF8String, + AlreadyExecuted, + InvalidChain, + TokenNotNative, +} + +impl From for TokenBridgeError { + fn from(t: T) -> Self { + return TokenBridgeError::Unknown(t.to_string()); + } +} + +impl Into for TokenBridgeError { + fn into(self) -> SolitaireError { + SolitaireError::Custom(0) + } +} + +solitaire! { + Initialize(Pubkey) => initialize, + AttestToken(AttestTokenData) => attest_token, + CompleteNative(CompleteNativeData) => complete_native, + CompleteWrapped(CompleteWrappedData) => complete_wrapped, + TransferWrapped(TransferWrappedData) => transfer_wrapped, + TransferNative(TransferNativeData) => transfer_native, + RegisterChain(RegisterChainData) => register_chain, + CreateWrapped(CreateWrappedData) => create_wrapped, +} diff --git a/solana/modules/token_bridge/program/src/messages.rs b/solana/modules/token_bridge/program/src/messages.rs new file mode 100644 index 00000000..990b6d25 --- /dev/null +++ b/solana/modules/token_bridge/program/src/messages.rs @@ -0,0 +1,218 @@ +use crate::{ + types::{ + Address, + ChainID, + }, + TokenBridgeError, +}; +use borsh::{ + BorshDeserialize, + BorshSerialize, +}; +use bridge::vaa::{ + DeserializePayload, + SerializePayload, +}; +use byteorder::{ + BigEndian, + ReadBytesExt, + WriteBytesExt, +}; +use primitive_types::U256; +use solana_program::{ + native_token::Sol, + program_error::ProgramError, +}; +use solitaire::SolitaireError; +use std::{ + error::Error, + io::{ + Cursor, + Read, + Write, + }, + str::Utf8Error, + string::FromUtf8Error, +}; + +pub struct PayloadTransfer { + // Amount being transferred (big-endian uint256) + pub amount: U256, + // Address of the token. Left-zero-padded if shorter than 32 bytes + pub token_address: Address, + // Chain ID of the token + pub token_chain: ChainID, + // Address of the recipient. Left-zero-padded if shorter than 32 bytes + pub to: Address, + // Chain ID of the recipient + pub to_chain: ChainID, + // Amount of tokens (big-endian uint256) that the user is willing to pay as relayer fee. Must be <= Amount. + pub fee: U256, +} + +impl DeserializePayload for PayloadTransfer { + fn deserialize(buf: &mut &[u8]) -> Result { + let mut v = Cursor::new(buf); + + if v.read_u8()? != 1 { + return Err(SolitaireError::Custom(0)); + }; + + let mut am_data: [u8; 32] = [0; 32]; + v.read_exact(&mut am_data)?; + let amount = U256::from_big_endian(&am_data); + + let mut token_address = Address::default(); + v.read_exact(&mut token_address)?; + + let token_chain = v.read_u16::()?; + + let mut to = Address::default(); + v.read_exact(&mut to)?; + + let to_chain = v.read_u16::()?; + + let mut fee_data: [u8; 32] = [0; 32]; + v.read_exact(&mut fee_data)?; + let fee = U256::from_big_endian(&fee_data); + + Ok(PayloadTransfer { + amount, + token_address, + token_chain, + to, + to_chain, + fee, + }) + } +} + +impl SerializePayload for PayloadTransfer { + fn serialize(&self, writer: &mut W) -> Result<(), SolitaireError> { + // Payload ID + writer.write_u8(1)?; + + let mut am_data: [u8; 32] = [0; 32]; + self.amount.to_big_endian(&mut am_data); + writer.write(&am_data)?; + + writer.write(&self.token_address)?; + writer.write_u16::(self.token_chain)?; + writer.write(&self.to)?; + writer.write_u16::(self.to_chain)?; + + let mut fee_data: [u8; 32] = [0; 32]; + self.fee.to_big_endian(&mut fee_data); + writer.write(&fee_data)?; + + Ok(()) + } +} + +pub struct PayloadAssetMeta { + // Address of the token. Left-zero-padded if shorter than 32 bytes + pub token_address: Address, + // Chain ID of the token + pub token_chain: ChainID, + // Number of decimals of the token (big-endian uint256) + pub decimals: U256, + // Symbol of the token + pub symbol: String, + // Name of the token + pub name: String, +} + +impl DeserializePayload for PayloadAssetMeta { + fn deserialize(buf: &mut &[u8]) -> Result { + let mut v = Cursor::new(buf); + + if v.read_u8()? != 2 { + return Err(SolitaireError::Custom(0)); + }; + + let mut token_address = Address::default(); + v.read_exact(&mut token_address)?; + + let token_chain = v.read_u16::()?; + + let mut decimals_data: [u8; 32] = [0; 32]; + v.read_exact(&mut decimals_data)?; + let decimals = U256::from_big_endian(&decimals_data); + + let mut symbol_data: [u8; 32] = [0; 32]; + v.read_exact(&mut symbol_data)?; + let symbol = String::from_utf8(symbol_data.to_vec()) + .map_err::(|_| TokenBridgeError::InvalidUTF8String.into())?; + + let mut name_data: [u8; 32] = [0; 32]; + v.read_exact(&mut name_data)?; + let name = String::from_utf8(name_data.to_vec()) + .map_err::(|_| TokenBridgeError::InvalidUTF8String.into())?; + + Ok(PayloadAssetMeta { + token_address, + token_chain, + decimals, + symbol, + name, + }) + } +} + +impl SerializePayload for PayloadAssetMeta { + fn serialize(&self, writer: &mut W) -> Result<(), SolitaireError> { + // Payload ID + writer.write_u8(2)?; + + writer.write(&self.token_address)?; + writer.write_u16::(self.token_chain)?; + + let mut decimal_data: [u8; 32] = [0; 32]; + self.decimals.to_big_endian(&mut decimal_data); + writer.write(&decimal_data)?; + + let mut symbol: [u8; 32] = [0; 32]; + for i in 0..self.symbol.len() { + symbol[(32 - self.symbol.len()) + i] = self.symbol.as_bytes()[i]; + } + writer.write(&symbol); + + let mut name: [u8; 32] = [0; 32]; + for i in 0..self.name.len() { + name[(32 - self.name.len()) + i] = self.name.as_bytes()[i]; + } + writer.write(&name); + + Ok(()) + } +} + +pub struct PayloadGovernanceRegisterChain { + // Chain ID of the chain to be registered + pub chain: ChainID, + // Address of the endpoint on the chain + pub endpoint_address: Address, +} + +impl DeserializePayload for PayloadGovernanceRegisterChain { + fn deserialize(buf: &mut &[u8]) -> Result { + let mut v = Cursor::new(buf); + + if v.read_u8()? != 2 { + return Err(SolitaireError::Custom(0)); + }; + Ok(PayloadGovernanceRegisterChain { + chain: 0, + endpoint_address: [0u8; 32], + }) + } +} + +impl SerializePayload for PayloadGovernanceRegisterChain { + fn serialize(&self, writer: &mut W) -> Result<(), SolitaireError> { + // Payload ID + writer.write_u8(2)?; + + Ok(()) + } +} diff --git a/solana/modules/token_bridge/program/src/types.rs b/solana/modules/token_bridge/program/src/types.rs new file mode 100644 index 00000000..f66db917 --- /dev/null +++ b/solana/modules/token_bridge/program/src/types.rs @@ -0,0 +1,70 @@ +use borsh::{ + BorshDeserialize, + BorshSerialize, +}; +use solana_program::pubkey::Pubkey; +use solitaire::{ + pack_type, + processors::seeded::{ + AccountOwner, + Owned, + }, +}; +use spl_token::state::{ + Account, + Mint, +}; + +pub type Address = [u8; 32]; +pub type ChainID = u16; + +#[derive(Default, Clone, Copy, BorshDeserialize, BorshSerialize)] +pub struct Config { + pub wormhole_bridge: Pubkey, + pub fees: FeeStructure, +} + +impl Owned for Config { + fn owner(&self) -> AccountOwner { + AccountOwner::This + } +} + +#[derive(Default, Clone, Copy, BorshDeserialize, BorshSerialize)] +pub struct FeeStructure { + pub usd_ephemeral: u64, + pub usd_persistent: u64, +} + +impl Owned for FeeStructure { + fn owner(&self) -> AccountOwner { + AccountOwner::This + } +} + +#[derive(Default, Clone, Copy, BorshDeserialize, BorshSerialize)] +pub struct EndpointRegistration { + pub chain: ChainID, + pub contract: Address, +} + +impl Owned for EndpointRegistration { + fn owner(&self) -> AccountOwner { + AccountOwner::This + } +} + +#[derive(Default, Clone, Copy, BorshDeserialize, BorshSerialize)] +pub struct WrappedMeta { + pub chain: ChainID, + pub token_address: Address, +} + +impl Owned for WrappedMeta { + fn owner(&self) -> AccountOwner { + AccountOwner::This + } +} + +pack_type!(SplMint, Mint, AccountOwner::Other(spl_token::id())); +pack_type!(SplAccount, Account, AccountOwner::Other(spl_token::id()));