Create cargo vanadium app

+10
.cargo/config.toml
···
+
[build]
+
target = "x86_64-unknown-linux-gnu"
+
+
+
[target.riscv32imc-unknown-none-elf]
+
rustflags = [
+
# The VM expects ELF binaries with 2 segments (rx and rw). Don't put
+
# read-only non-executable sections in their own segment.
+
"-Clink-arg=--no-rosegment",
+
]
+1
.gitignore
···
+
target/
+1773
Cargo.lock
···
+
# This file is automatically @generated by Cargo.
+
# It is not intended for manual editing.
+
version = 4
+
+
[[package]]
+
name = "addr2line"
+
version = "0.24.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+
dependencies = [
+
"gimli",
+
]
+
+
[[package]]
+
name = "adler2"
+
version = "2.0.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+
[[package]]
+
name = "aho-corasick"
+
version = "1.1.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+
dependencies = [
+
"memchr",
+
]
+
+
[[package]]
+
name = "anstream"
+
version = "0.6.19"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933"
+
dependencies = [
+
"anstyle",
+
"anstyle-parse",
+
"anstyle-query",
+
"anstyle-wincon",
+
"colorchoice",
+
"is_terminal_polyfill",
+
"utf8parse",
+
]
+
+
[[package]]
+
name = "anstyle"
+
version = "1.0.11"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
+
+
[[package]]
+
name = "anstyle-parse"
+
version = "0.2.7"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
+
dependencies = [
+
"utf8parse",
+
]
+
+
[[package]]
+
name = "anstyle-query"
+
version = "1.1.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9"
+
dependencies = [
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "anstyle-wincon"
+
version = "3.0.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882"
+
dependencies = [
+
"anstyle",
+
"once_cell_polyfill",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "arrayref"
+
version = "0.3.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+
[[package]]
+
name = "async-trait"
+
version = "0.1.88"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "autocfg"
+
version = "1.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+
[[package]]
+
name = "backtrace"
+
version = "0.3.75"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"
+
dependencies = [
+
"addr2line",
+
"cfg-if",
+
"libc",
+
"miniz_oxide",
+
"object",
+
"rustc-demangle",
+
"windows-targets 0.52.6",
+
]
+
+
[[package]]
+
name = "base-x"
+
version = "0.2.11"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270"
+
+
[[package]]
+
name = "base16ct"
+
version = "0.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+
+
[[package]]
+
name = "base58"
+
version = "0.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581"
+
+
[[package]]
+
name = "base64ct"
+
version = "1.8.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba"
+
+
[[package]]
+
name = "bip32"
+
version = "0.5.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "db40d3dfbeab4e031d78c844642fa0caa0b0db11ce1607ac9d2986dff1405c69"
+
dependencies = [
+
"bs58",
+
"hmac",
+
"k256",
+
"once_cell",
+
"pbkdf2",
+
"rand_core 0.6.4",
+
"ripemd",
+
"secp256k1",
+
"sha2",
+
"subtle",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "bitflags"
+
version = "2.9.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
+
+
[[package]]
+
name = "block-buffer"
+
version = "0.10.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+
dependencies = [
+
"generic-array",
+
]
+
+
[[package]]
+
name = "bs58"
+
version = "0.5.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
+
dependencies = [
+
"sha2",
+
]
+
+
[[package]]
+
name = "byteorder"
+
version = "1.5.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+
[[package]]
+
name = "bytes"
+
version = "1.10.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
+
+
[[package]]
+
name = "cargo_toml"
+
version = "0.22.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
+
dependencies = [
+
"serde",
+
"toml",
+
]
+
+
[[package]]
+
name = "cbor4ii"
+
version = "0.2.14"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b544cf8c89359205f4f990d0e6f3828db42df85b5dac95d09157a250eb0749c4"
+
+
[[package]]
+
name = "cc"
+
version = "1.2.26"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac"
+
dependencies = [
+
"shlex",
+
]
+
+
[[package]]
+
name = "cfg-if"
+
version = "1.0.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+
[[package]]
+
name = "cfg_aliases"
+
version = "0.2.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
+
[[package]]
+
name = "cid"
+
version = "0.11.1"
+
source = "git+https://github.com/edouardparis/rust-cid?branch=fix-dep-serde_bytes-features#d8aeda78e2dd4784dbea3086a6ca85fa88782d2d"
+
dependencies = [
+
"core2",
+
"multibase",
+
"multihash",
+
"serde",
+
"serde_bytes",
+
"unsigned-varint",
+
]
+
+
[[package]]
+
name = "clap"
+
version = "4.5.39"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f"
+
dependencies = [
+
"clap_builder",
+
"clap_derive",
+
]
+
+
[[package]]
+
name = "clap_builder"
+
version = "4.5.39"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51"
+
dependencies = [
+
"anstream",
+
"anstyle",
+
"clap_lex",
+
"strsim",
+
]
+
+
[[package]]
+
name = "clap_derive"
+
version = "4.5.32"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
+
dependencies = [
+
"heck",
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "clap_lex"
+
version = "0.7.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+
+
[[package]]
+
name = "clipboard-win"
+
version = "5.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892"
+
dependencies = [
+
"error-code",
+
]
+
+
[[package]]
+
name = "cobs"
+
version = "0.2.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
+
+
[[package]]
+
name = "colorchoice"
+
version = "1.0.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+
+
[[package]]
+
name = "common"
+
version = "0.1.0"
+
source = "git+https://github.com/LedgerHQ/vanadium#547d41b86a37827c01be47e928487611cd985ef2"
+
dependencies = [
+
"serde",
+
"serde_json",
+
"vanadium_macros",
+
]
+
+
[[package]]
+
name = "const-oid"
+
version = "0.9.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+
+
[[package]]
+
name = "core2"
+
version = "0.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505"
+
dependencies = [
+
"memchr",
+
]
+
+
[[package]]
+
name = "cpufeatures"
+
version = "0.2.17"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+
dependencies = [
+
"libc",
+
]
+
+
[[package]]
+
name = "critical-section"
+
version = "1.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
+
+
[[package]]
+
name = "crypto-bigint"
+
version = "0.5.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
+
dependencies = [
+
"generic-array",
+
"rand_core 0.6.4",
+
"subtle",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "crypto-common"
+
version = "0.1.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+
dependencies = [
+
"generic-array",
+
"typenum",
+
]
+
+
[[package]]
+
name = "data-encoding"
+
version = "2.9.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
+
+
[[package]]
+
name = "data-encoding-macro"
+
version = "0.1.18"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "47ce6c96ea0102f01122a185683611bd5ac8d99e62bc59dd12e6bda344ee673d"
+
dependencies = [
+
"data-encoding",
+
"data-encoding-macro-internal",
+
]
+
+
[[package]]
+
name = "data-encoding-macro-internal"
+
version = "0.1.16"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976"
+
dependencies = [
+
"data-encoding",
+
"syn",
+
]
+
+
[[package]]
+
name = "der"
+
version = "0.7.10"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
+
dependencies = [
+
"const-oid",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "digest"
+
version = "0.10.7"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+
dependencies = [
+
"block-buffer",
+
"const-oid",
+
"crypto-common",
+
"subtle",
+
]
+
+
[[package]]
+
name = "ecdsa"
+
version = "0.16.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
+
dependencies = [
+
"der",
+
"digest",
+
"elliptic-curve",
+
"rfc6979",
+
"signature",
+
"spki",
+
]
+
+
[[package]]
+
name = "elliptic-curve"
+
version = "0.13.8"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
+
dependencies = [
+
"base16ct",
+
"crypto-bigint",
+
"digest",
+
"ff",
+
"generic-array",
+
"group",
+
"pkcs8",
+
"rand_core 0.6.4",
+
"sec1",
+
"subtle",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "embedded-alloc"
+
version = "0.5.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ddae17915accbac2cfbc64ea0ae6e3b330e6ea124ba108dada63646fd3c6f815"
+
dependencies = [
+
"critical-section",
+
"linked_list_allocator",
+
]
+
+
[[package]]
+
name = "embedded-io"
+
version = "0.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
+
+
[[package]]
+
name = "embedded-io"
+
version = "0.6.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
+
+
[[package]]
+
name = "endian-type"
+
version = "0.1.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
+
+
[[package]]
+
name = "equivalent"
+
version = "1.0.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+
[[package]]
+
name = "errno"
+
version = "0.3.12"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18"
+
dependencies = [
+
"libc",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "error-code"
+
version = "3.3.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"
+
+
[[package]]
+
name = "fd-lock"
+
version = "4.0.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78"
+
dependencies = [
+
"cfg-if",
+
"rustix",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "ff"
+
version = "0.13.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
+
dependencies = [
+
"rand_core 0.6.4",
+
"subtle",
+
]
+
+
[[package]]
+
name = "generic-array"
+
version = "0.14.7"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+
dependencies = [
+
"typenum",
+
"version_check",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "getrandom"
+
version = "0.3.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
+
dependencies = [
+
"cfg-if",
+
"libc",
+
"r-efi",
+
"wasi 0.14.2+wasi-0.2.4",
+
]
+
+
[[package]]
+
name = "gimli"
+
version = "0.31.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+
[[package]]
+
name = "goblin"
+
version = "0.8.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47"
+
dependencies = [
+
"log",
+
"plain",
+
"scroll",
+
]
+
+
[[package]]
+
name = "group"
+
version = "0.13.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
+
dependencies = [
+
"ff",
+
"rand_core 0.6.4",
+
"subtle",
+
]
+
+
[[package]]
+
name = "hashbrown"
+
version = "0.15.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
+
+
[[package]]
+
name = "heck"
+
version = "0.5.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+
[[package]]
+
name = "hex"
+
version = "0.4.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+
[[package]]
+
name = "hex-literal"
+
version = "0.4.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
+
+
[[package]]
+
name = "hidapi"
+
version = "2.6.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "03b876ecf37e86b359573c16c8366bc3eba52b689884a0fc42ba3f67203d2a8b"
+
dependencies = [
+
"cc",
+
"cfg-if",
+
"libc",
+
"pkg-config",
+
"windows-sys 0.48.0",
+
]
+
+
[[package]]
+
name = "hmac"
+
version = "0.12.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+
dependencies = [
+
"digest",
+
]
+
+
[[package]]
+
name = "home"
+
version = "0.5.11"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
+
dependencies = [
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "indexmap"
+
version = "2.9.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
+
dependencies = [
+
"equivalent",
+
"hashbrown",
+
]
+
+
[[package]]
+
name = "ipld-core"
+
version = "0.4.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "104718b1cc124d92a6d01ca9c9258a7df311405debb3408c445a36452f9bf8db"
+
dependencies = [
+
"cid",
+
"serde",
+
"serde_bytes",
+
]
+
+
[[package]]
+
name = "is_terminal_polyfill"
+
version = "1.70.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+
[[package]]
+
name = "itoa"
+
version = "1.0.15"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+
+
[[package]]
+
name = "k256"
+
version = "0.13.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b"
+
dependencies = [
+
"cfg-if",
+
"ecdsa",
+
"elliptic-curve",
+
"sha2",
+
"signature",
+
]
+
+
[[package]]
+
name = "lazy_static"
+
version = "1.5.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+
[[package]]
+
name = "ledger-apdu"
+
version = "0.11.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c21ffd28d97c9252671ab2ebe7078c9fa860ff3c5a125039e174d25ec6872169"
+
dependencies = [
+
"arrayref",
+
"no-std-compat",
+
"snafu",
+
]
+
+
[[package]]
+
name = "ledger-transport"
+
version = "0.11.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c2f18de77d956a030dbc5869ced47d404bbd641216ef2f9dce7ca90833ca64ff"
+
dependencies = [
+
"async-trait",
+
"ledger-apdu",
+
]
+
+
[[package]]
+
name = "ledger-transport-hid"
+
version = "0.11.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a4e34341e2708fbf805a9ada44ef6182170c6464c4fc068ab801abb7562fd5e8"
+
dependencies = [
+
"byteorder",
+
"cfg-if",
+
"hex",
+
"hidapi",
+
"ledger-transport",
+
"libc",
+
"log",
+
"thiserror",
+
]
+
+
[[package]]
+
name = "libc"
+
version = "0.2.172"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
+
+
[[package]]
+
name = "linked_list_allocator"
+
version = "0.10.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9afa463f5405ee81cdb9cc2baf37e08ec7e4c8209442b5d72c04cfb2cd6e6286"
+
+
[[package]]
+
name = "linux-raw-sys"
+
version = "0.9.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+
+
[[package]]
+
name = "log"
+
version = "0.4.27"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+
+
[[package]]
+
name = "memchr"
+
version = "2.7.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+
[[package]]
+
name = "miniz_oxide"
+
version = "0.8.8"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a"
+
dependencies = [
+
"adler2",
+
]
+
+
[[package]]
+
name = "mio"
+
version = "1.0.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
+
dependencies = [
+
"libc",
+
"wasi 0.11.0+wasi-snapshot-preview1",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "multibase"
+
version = "0.9.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404"
+
dependencies = [
+
"base-x",
+
"data-encoding",
+
"data-encoding-macro",
+
]
+
+
[[package]]
+
name = "multihash"
+
version = "0.19.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d"
+
dependencies = [
+
"core2",
+
"serde",
+
"unsigned-varint",
+
]
+
+
[[package]]
+
name = "nibble_vec"
+
version = "0.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
+
dependencies = [
+
"smallvec",
+
]
+
+
[[package]]
+
name = "nix"
+
version = "0.29.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
+
dependencies = [
+
"bitflags",
+
"cfg-if",
+
"cfg_aliases",
+
"libc",
+
]
+
+
[[package]]
+
name = "no-std-compat"
+
version = "0.4.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c"
+
+
[[package]]
+
name = "num-bigint"
+
version = "0.4.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
+
dependencies = [
+
"num-integer",
+
"num-traits",
+
]
+
+
[[package]]
+
name = "num-integer"
+
version = "0.1.46"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
+
dependencies = [
+
"num-traits",
+
]
+
+
[[package]]
+
name = "num-traits"
+
version = "0.2.19"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+
dependencies = [
+
"autocfg",
+
]
+
+
[[package]]
+
name = "object"
+
version = "0.36.7"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
+
dependencies = [
+
"memchr",
+
]
+
+
[[package]]
+
name = "once_cell"
+
version = "1.21.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+
[[package]]
+
name = "once_cell_polyfill"
+
version = "1.70.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
+
+
[[package]]
+
name = "pbkdf2"
+
version = "0.12.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+
dependencies = [
+
"digest",
+
"hmac",
+
]
+
+
[[package]]
+
name = "pin-project-lite"
+
version = "0.2.16"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
+
+
[[package]]
+
name = "pkcs8"
+
version = "0.10.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
+
dependencies = [
+
"der",
+
"spki",
+
]
+
+
[[package]]
+
name = "pkg-config"
+
version = "0.3.32"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
+
+
[[package]]
+
name = "plain"
+
version = "0.2.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+
[[package]]
+
name = "postcard"
+
version = "1.1.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8"
+
dependencies = [
+
"cobs",
+
"embedded-io 0.4.0",
+
"embedded-io 0.6.1",
+
"serde",
+
]
+
+
[[package]]
+
name = "ppv-lite86"
+
version = "0.2.21"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
+
dependencies = [
+
"zerocopy",
+
]
+
+
[[package]]
+
name = "proc-macro-error-attr2"
+
version = "2.0.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
]
+
+
[[package]]
+
name = "proc-macro-error2"
+
version = "2.0.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
+
dependencies = [
+
"proc-macro-error-attr2",
+
"proc-macro2",
+
"quote",
+
]
+
+
[[package]]
+
name = "proc-macro2"
+
version = "1.0.95"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+
dependencies = [
+
"unicode-ident",
+
]
+
+
[[package]]
+
name = "quote"
+
version = "1.0.40"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+
dependencies = [
+
"proc-macro2",
+
]
+
+
[[package]]
+
name = "r-efi"
+
version = "5.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
+
+
[[package]]
+
name = "radix_trie"
+
version = "0.2.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
+
dependencies = [
+
"endian-type",
+
"nibble_vec",
+
]
+
+
[[package]]
+
name = "rand"
+
version = "0.9.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
+
dependencies = [
+
"rand_chacha",
+
"rand_core 0.9.3",
+
]
+
+
[[package]]
+
name = "rand_chacha"
+
version = "0.9.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+
dependencies = [
+
"ppv-lite86",
+
"rand_core 0.9.3",
+
]
+
+
[[package]]
+
name = "rand_core"
+
version = "0.6.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+
+
[[package]]
+
name = "rand_core"
+
version = "0.9.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
+
dependencies = [
+
"getrandom",
+
]
+
+
[[package]]
+
name = "regex"
+
version = "1.11.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+
dependencies = [
+
"aho-corasick",
+
"memchr",
+
"regex-automata",
+
"regex-syntax",
+
]
+
+
[[package]]
+
name = "regex-automata"
+
version = "0.4.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+
dependencies = [
+
"aho-corasick",
+
"memchr",
+
"regex-syntax",
+
]
+
+
[[package]]
+
name = "regex-syntax"
+
version = "0.8.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+
[[package]]
+
name = "rfc6979"
+
version = "0.4.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
+
dependencies = [
+
"hmac",
+
"subtle",
+
]
+
+
[[package]]
+
name = "ripemd"
+
version = "0.1.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f"
+
dependencies = [
+
"digest",
+
]
+
+
[[package]]
+
name = "rustc-demangle"
+
version = "0.1.24"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+
[[package]]
+
name = "rustix"
+
version = "1.0.7"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
+
dependencies = [
+
"bitflags",
+
"errno",
+
"libc",
+
"linux-raw-sys",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "rustyline"
+
version = "15.0.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2ee1e066dc922e513bda599c6ccb5f3bb2b0ea5870a579448f2622993f0a9a2f"
+
dependencies = [
+
"bitflags",
+
"cfg-if",
+
"clipboard-win",
+
"fd-lock",
+
"home",
+
"libc",
+
"log",
+
"memchr",
+
"nix",
+
"radix_trie",
+
"unicode-segmentation",
+
"unicode-width",
+
"utf8parse",
+
"windows-sys 0.59.0",
+
]
+
+
[[package]]
+
name = "ryu"
+
version = "1.0.20"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+
+
[[package]]
+
name = "scopeguard"
+
version = "1.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+
[[package]]
+
name = "scroll"
+
version = "0.12.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6"
+
dependencies = [
+
"scroll_derive",
+
]
+
+
[[package]]
+
name = "scroll_derive"
+
version = "0.12.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "sec1"
+
version = "0.7.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
+
dependencies = [
+
"base16ct",
+
"der",
+
"generic-array",
+
"pkcs8",
+
"subtle",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "secp256k1"
+
version = "0.27.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f"
+
dependencies = [
+
"secp256k1-sys",
+
]
+
+
[[package]]
+
name = "secp256k1-sys"
+
version = "0.8.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e"
+
dependencies = [
+
"cc",
+
]
+
+
[[package]]
+
name = "serde"
+
version = "1.0.219"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+
dependencies = [
+
"serde_derive",
+
]
+
+
[[package]]
+
name = "serde_bytes"
+
version = "0.11.17"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"
+
dependencies = [
+
"serde",
+
]
+
+
[[package]]
+
name = "serde_derive"
+
version = "1.0.219"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "serde_ipld_dagcbor"
+
version = "0.6.3"
+
source = "git+http://github.com/edouardparis/serde_ipld_dagcbor?branch=scopeguard-no-default-features#82eca93ee126750ad80feedbfe9cee0bf162c587"
+
dependencies = [
+
"cbor4ii",
+
"ipld-core",
+
"scopeguard",
+
"serde",
+
]
+
+
[[package]]
+
name = "serde_json"
+
version = "1.0.140"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+
dependencies = [
+
"itoa",
+
"memchr",
+
"ryu",
+
"serde",
+
]
+
+
[[package]]
+
name = "serde_spanned"
+
version = "0.6.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
+
dependencies = [
+
"serde",
+
]
+
+
[[package]]
+
name = "sha2"
+
version = "0.10.9"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+
dependencies = [
+
"cfg-if",
+
"cpufeatures",
+
"digest",
+
]
+
+
[[package]]
+
name = "shellwords"
+
version = "1.1.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "89e515aa4699a88148ed5ef96413ceef0048ce95b43fbc955a33bde0a70fcae6"
+
dependencies = [
+
"lazy_static",
+
"regex",
+
]
+
+
[[package]]
+
name = "shlex"
+
version = "1.3.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+
[[package]]
+
name = "signal-hook-registry"
+
version = "1.4.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410"
+
dependencies = [
+
"libc",
+
]
+
+
[[package]]
+
name = "signature"
+
version = "2.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+
dependencies = [
+
"digest",
+
"rand_core 0.6.4",
+
]
+
+
[[package]]
+
name = "smallvec"
+
version = "1.15.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
+
+
[[package]]
+
name = "snafu"
+
version = "0.8.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "320b01e011bf8d5d7a4a4a4be966d9160968935849c83b918827f6a435e7f627"
+
dependencies = [
+
"snafu-derive",
+
]
+
+
[[package]]
+
name = "snafu-derive"
+
version = "0.8.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1961e2ef424c1424204d3a5d6975f934f56b6d50ff5732382d84ebf460e147f7"
+
dependencies = [
+
"heck",
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "socket2"
+
version = "0.5.10"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
+
dependencies = [
+
"libc",
+
"windows-sys 0.52.0",
+
]
+
+
[[package]]
+
name = "spki"
+
version = "0.7.3"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
+
dependencies = [
+
"base64ct",
+
"der",
+
]
+
+
[[package]]
+
name = "strsim"
+
version = "0.11.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+
[[package]]
+
name = "subtle"
+
version = "2.6.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
+
[[package]]
+
name = "syn"
+
version = "2.0.101"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"unicode-ident",
+
]
+
+
[[package]]
+
name = "thiserror"
+
version = "1.0.69"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+
dependencies = [
+
"thiserror-impl",
+
]
+
+
[[package]]
+
name = "thiserror-impl"
+
version = "1.0.69"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "tokio"
+
version = "1.45.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
+
dependencies = [
+
"backtrace",
+
"bytes",
+
"libc",
+
"mio",
+
"pin-project-lite",
+
"signal-hook-registry",
+
"socket2",
+
"tokio-macros",
+
"windows-sys 0.52.0",
+
]
+
+
[[package]]
+
name = "tokio-macros"
+
version = "2.5.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "toml"
+
version = "0.8.23"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
+
dependencies = [
+
"serde",
+
"serde_spanned",
+
"toml_datetime",
+
"toml_edit",
+
]
+
+
[[package]]
+
name = "toml_datetime"
+
version = "0.6.11"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
+
dependencies = [
+
"serde",
+
]
+
+
[[package]]
+
name = "toml_edit"
+
version = "0.22.27"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
+
dependencies = [
+
"indexmap",
+
"serde",
+
"serde_spanned",
+
"toml_datetime",
+
"toml_write",
+
"winnow",
+
]
+
+
[[package]]
+
name = "toml_write"
+
version = "0.1.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
+
+
[[package]]
+
name = "typenum"
+
version = "1.18.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
+
+
[[package]]
+
name = "unicode-ident"
+
version = "1.0.18"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+
+
[[package]]
+
name = "unicode-segmentation"
+
version = "1.12.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
+
+
[[package]]
+
name = "unicode-width"
+
version = "0.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
+
+
[[package]]
+
name = "unsigned-varint"
+
version = "0.8.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06"
+
+
[[package]]
+
name = "utf8parse"
+
version = "0.2.2"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+
[[package]]
+
name = "vanadium-app-sdk"
+
version = "0.1.0"
+
source = "git+https://github.com/LedgerHQ/vanadium#547d41b86a37827c01be47e928487611cd985ef2"
+
dependencies = [
+
"bip32",
+
"common",
+
"critical-section",
+
"embedded-alloc",
+
"hex",
+
"hex-literal",
+
"k256",
+
"lazy_static",
+
"num-bigint",
+
"num-traits",
+
"rand",
+
"ripemd",
+
"sha2",
+
"subtle",
+
"zeroize",
+
]
+
+
[[package]]
+
name = "vanadium-client-sdk"
+
version = "0.1.0"
+
source = "git+https://github.com/LedgerHQ/vanadium#547d41b86a37827c01be47e928487611cd985ef2"
+
dependencies = [
+
"async-trait",
+
"cargo_toml",
+
"common",
+
"goblin",
+
"hex",
+
"hidapi",
+
"ledger-apdu",
+
"ledger-transport-hid",
+
"postcard",
+
"sha2",
+
"tokio",
+
]
+
+
[[package]]
+
name = "vanadium_macros"
+
version = "0.1.0"
+
source = "git+https://github.com/LedgerHQ/vanadium#547d41b86a37827c01be47e928487611cd985ef2"
+
dependencies = [
+
"proc-macro-error2",
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "version_check"
+
version = "0.9.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+
[[package]]
+
name = "vnd-atproto"
+
version = "0.0.1"
+
dependencies = [
+
"base58",
+
"hex-literal",
+
"serde",
+
"serde_ipld_dagcbor",
+
"vanadium-app-sdk",
+
"vnd-atproto-common",
+
]
+
+
[[package]]
+
name = "vnd-atproto-cli"
+
version = "0.0.1"
+
dependencies = [
+
"base58",
+
"clap",
+
"hidapi",
+
"ledger-transport-hid",
+
"rustyline",
+
"serde",
+
"shellwords",
+
"tokio",
+
"vnd-atproto-client",
+
]
+
+
[[package]]
+
name = "vnd-atproto-client"
+
version = "0.0.1"
+
dependencies = [
+
"serde_ipld_dagcbor",
+
"vanadium-client-sdk",
+
"vnd-atproto-common",
+
]
+
+
[[package]]
+
name = "vnd-atproto-common"
+
version = "0.0.1"
+
dependencies = [
+
"serde",
+
]
+
+
[[package]]
+
name = "wasi"
+
version = "0.11.0+wasi-snapshot-preview1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+
[[package]]
+
name = "wasi"
+
version = "0.14.2+wasi-0.2.4"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
+
dependencies = [
+
"wit-bindgen-rt",
+
]
+
+
[[package]]
+
name = "windows-sys"
+
version = "0.48.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+
dependencies = [
+
"windows-targets 0.48.5",
+
]
+
+
[[package]]
+
name = "windows-sys"
+
version = "0.52.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+
dependencies = [
+
"windows-targets 0.52.6",
+
]
+
+
[[package]]
+
name = "windows-sys"
+
version = "0.59.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+
dependencies = [
+
"windows-targets 0.52.6",
+
]
+
+
[[package]]
+
name = "windows-targets"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+
dependencies = [
+
"windows_aarch64_gnullvm 0.48.5",
+
"windows_aarch64_msvc 0.48.5",
+
"windows_i686_gnu 0.48.5",
+
"windows_i686_msvc 0.48.5",
+
"windows_x86_64_gnu 0.48.5",
+
"windows_x86_64_gnullvm 0.48.5",
+
"windows_x86_64_msvc 0.48.5",
+
]
+
+
[[package]]
+
name = "windows-targets"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+
dependencies = [
+
"windows_aarch64_gnullvm 0.52.6",
+
"windows_aarch64_msvc 0.52.6",
+
"windows_i686_gnu 0.52.6",
+
"windows_i686_gnullvm",
+
"windows_i686_msvc 0.52.6",
+
"windows_x86_64_gnu 0.52.6",
+
"windows_x86_64_gnullvm 0.52.6",
+
"windows_x86_64_msvc 0.52.6",
+
]
+
+
[[package]]
+
name = "windows_aarch64_gnullvm"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+
[[package]]
+
name = "windows_aarch64_gnullvm"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+
[[package]]
+
name = "windows_aarch64_msvc"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+
[[package]]
+
name = "windows_aarch64_msvc"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+
[[package]]
+
name = "windows_i686_gnu"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+
[[package]]
+
name = "windows_i686_gnu"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+
[[package]]
+
name = "windows_i686_gnullvm"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+
[[package]]
+
name = "windows_i686_msvc"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+
[[package]]
+
name = "windows_i686_msvc"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+
[[package]]
+
name = "windows_x86_64_gnu"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+
[[package]]
+
name = "windows_x86_64_gnu"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+
[[package]]
+
name = "windows_x86_64_gnullvm"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+
[[package]]
+
name = "windows_x86_64_gnullvm"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+
[[package]]
+
name = "windows_x86_64_msvc"
+
version = "0.48.5"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+
[[package]]
+
name = "windows_x86_64_msvc"
+
version = "0.52.6"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+
[[package]]
+
name = "winnow"
+
version = "0.7.10"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec"
+
dependencies = [
+
"memchr",
+
]
+
+
[[package]]
+
name = "wit-bindgen-rt"
+
version = "0.39.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
+
dependencies = [
+
"bitflags",
+
]
+
+
[[package]]
+
name = "zerocopy"
+
version = "0.8.25"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
+
dependencies = [
+
"zerocopy-derive",
+
]
+
+
[[package]]
+
name = "zerocopy-derive"
+
version = "0.8.25"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
+
dependencies = [
+
"proc-macro2",
+
"quote",
+
"syn",
+
]
+
+
[[package]]
+
name = "zeroize"
+
version = "1.8.1"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+32
Cargo.toml
···
+
[package]
+
name = "vnd-atproto"
+
version = "0.0.1"
+
authors = ["Edouard Paris <m@edouard.paris>"]
+
edition = "2024"
+
description = "Vanadium app for atproto plc"
+
+
[package.metadata.vapp]
+
name = "Atproto"
+
stack_size = 65536
+
+
[dependencies]
+
serde_ipld_dagcbor = { git = "http://github.com/edouardparis/serde_ipld_dagcbor", branch = "scopeguard-no-default-features", default-features = false }
+
sdk = { package = "vanadium-app-sdk", git = "https://github.com/LedgerHQ/vanadium"}
+
common = { package = "vnd-atproto-common", path = "common" }
+
base58 = "0.2.0"
+
serde = { version = "1.0", default-features = false, features = ["alloc"] }
+
+
[patch.crates-io]
+
cid = { git = "https://github.com/edouardparis/rust-cid", branch = "fix-dep-serde_bytes-features" }
+
+
[dev-dependencies]
+
hex-literal = "0.4.1"
+
+
[workspace]
+
resolver = "2"
+
members = [
+
".",
+
"common",
+
"client",
+
"cli",
+
]
+4
README.md
···
+
# Vanadium application for Atproto
+
+
+
cargo install --git https://github.com/LedgerHQ/vanadium cargo-vnd
+16
cli/Cargo.toml
···
+
[package]
+
name = "vnd-atproto-cli"
+
version = "0.0.1"
+
edition = "2021"
+
+
[dependencies]
+
base58 = "0.2.0"
+
client = { package = "vnd-atproto-client", path = "../client"}
+
clap = { version = "4.5.31", features = ["derive"] }
+
rustyline = "15.0.0"
+
shellwords = "1.1.0"
+
hidapi = "2.6.3"
+
ledger-transport-hid = "0.11.0"
+
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
+
tokio = { version = "1.38.1", features = ["io-util", "macros", "net", "rt", "rt-multi-thread", "sync"] }
+
+11
cli/history.txt
···
+
#V2
+
help
+
get_did_key key_index=0 display=true
+
get_did_key
+
get_did_key --key_index 0
+
get_did_key key_index=0
+
get_key_index
+
get_did_key
+
exit
+
get_key_index
+
get_did_key
+287
cli/src/main.rs
···
+
use base58::ToBase58;
+
use clap::{CommandFactory, Parser, Subcommand};
+
use rustyline::completion::{Completer, Pair};
+
use rustyline::error::ReadlineError;
+
use rustyline::highlight::{CmdKind, Highlighter};
+
use rustyline::hint::Hinter;
+
use rustyline::validate::{ValidationContext, ValidationResult, Validator};
+
use rustyline::{Context, Editor, Helper};
+
+
use hidapi::HidApi;
+
use ledger_transport_hid::TransportNativeHID;
+
+
use client::{
+
transport::{Transport, TransportHID, TransportTcp, TransportWrapper},
+
vanadium_client::{NativeAppClient, VanadiumAppClient},
+
AtprotoAppClient,
+
};
+
+
use std::borrow::Cow;
+
use std::sync::Arc;
+
+
#[derive(Parser, Debug)]
+
#[command(name = "vnd-bitcoin-cli")]
+
struct Cli {
+
#[clap(subcommand)]
+
command: CliCommand,
+
}
+
+
#[derive(Subcommand, Debug)]
+
#[clap(rename_all = "snake_case")]
+
enum CliCommand {
+
GetDidKey {
+
#[clap(long)]
+
key_index: Option<u32>,
+
#[clap(long, default_missing_value = "true", num_args = 0..=1)]
+
display: bool,
+
},
+
Exit,
+
}
+
+
// Command completer
+
struct CommandCompleter;
+
+
impl CommandCompleter {
+
fn get_current_word<'a>(&self, line: &'a str, pos: usize) -> (usize, &'a str) {
+
let before = &line[..pos];
+
// Find the last space before the cursor; if none, start at 0
+
let start = before.rfind(' ').map_or(0, |i| i + 1);
+
let word = &line[start..pos];
+
(start, word)
+
}
+
}
+
+
fn make_pair(s: &str) -> Pair {
+
Pair {
+
display: s.to_string(),
+
replacement: s.to_string(),
+
}
+
}
+
+
impl Completer for CommandCompleter {
+
type Candidate = Pair;
+
+
fn complete(
+
&self,
+
line: &str,
+
pos: usize,
+
_ctx: &Context<'_>,
+
) -> rustyline::Result<(usize, Vec<Pair>)> {
+
let prefix = line[..pos].trim_start();
+
+
// Case 1: Empty input, suggest all subcommands
+
if prefix.is_empty() || !prefix.contains(' ') {
+
let suggestions = Cli::command()
+
.get_subcommands()
+
.filter(|cmd| cmd.get_name().starts_with(prefix))
+
.map(|cmd| make_pair(cmd.get_name()))
+
.collect();
+
return Ok((0, suggestions));
+
}
+
+
// Case 3: Subcommand present; suggest possible arguments to complete the command
+
let subcmd_name = prefix.split_whitespace().next().unwrap();
+
if let Some(subcmd) = Cli::command().find_subcommand(subcmd_name) {
+
let (start, _) = self.get_current_word(line, pos);
+
+
// Collect arguments already present in the line before the cursor
+
let Ok(present_args) = shellwords::split(&line[..start].trim_end()) else {
+
return Ok((0, vec![])); // no suggestions if we can't parse the line
+
};
+
+
// replace `argument=some_value` with just `argument` for each of present_args
+
let present_args: Vec<String> = present_args
+
.into_iter()
+
.map(|arg| arg.split('=').next().unwrap().to_string())
+
.collect();
+
+
// Get all argument continuations
+
let suggestions = subcmd
+
.get_arguments()
+
.filter_map(|arg| arg.get_long().map(|l| l.to_string()))
+
.filter(|arg| !present_args.contains(arg))
+
.map(|arg| Pair {
+
display: arg.clone(),
+
replacement: arg,
+
})
+
.collect();
+
return Ok((start, suggestions));
+
}
+
+
// Default case: no suggestions
+
Ok((0, vec![]))
+
}
+
}
+
+
impl Validator for CommandCompleter {
+
fn validate(
+
&self,
+
_ctx: &mut ValidationContext<'_>,
+
) -> Result<ValidationResult, ReadlineError> {
+
Ok(ValidationResult::Valid(None))
+
}
+
}
+
+
impl Highlighter for CommandCompleter {
+
fn highlight<'l>(&self, line: &'l str, _pos: usize) -> Cow<'l, str> {
+
Cow::Borrowed(line)
+
}
+
+
fn highlight_char(&self, _line: &str, _pos: usize, _cmd_kind: CmdKind) -> bool {
+
false
+
}
+
}
+
+
impl Hinter for CommandCompleter {
+
type Hint = String;
+
+
fn hint(&self, _line: &str, _pos: usize, _ctx: &Context<'_>) -> Option<String> {
+
None
+
}
+
}
+
+
impl Helper for CommandCompleter {}
+
+
#[derive(Parser)]
+
#[command(name = "Vanadium", about = "Run a V-App on Vanadium")]
+
struct Args {
+
/// Path to the ELF file of the V-App (if not the default one)
+
app: Option<String>,
+
+
/// Use the HID interface for a real device, instead of Speculos
+
#[arg(long, group = "interface")]
+
hid: bool,
+
+
/// Use the native interface
+
#[arg(long, group = "interface")]
+
native: bool,
+
}
+
+
// a bit of a hack: we convert the prompt in a format that clap can parse
+
// (adding a dummy command, and replacing each 'argument' with '--argument')
+
fn prepare_prompt_for_clap(line: &str) -> Result<Vec<String>, String> {
+
let args = shellwords::split(line).map_err(|e| format!("Failed to parse input: {}", e))?;
+
if args.is_empty() {
+
return Err("Empty input".to_string());
+
}
+
+
// dummy command, and first command unchanged
+
let mut clap_args = vec!["dummy".to_string(), args[0].clone()];
+
+
// prepend `--` to each subsequent argument
+
for arg in &args[1..] {
+
clap_args.push(format!("--{}", arg));
+
}
+
Ok(clap_args)
+
}
+
+
async fn handle_cli_command(
+
app_client: &mut AtprotoAppClient,
+
cli: &Cli,
+
) -> Result<(), Box<dyn std::error::Error>> {
+
match &cli.command {
+
CliCommand::GetDidKey { key_index, display } => {
+
let key = app_client
+
.get_did_key(key_index.unwrap_or(0), *display)
+
.await?;
+
println!("did:key:z{}", key.to_base58());
+
}
+
CliCommand::Exit => {
+
return Err("Exiting".into());
+
}
+
}
+
Ok(())
+
}
+
+
#[tokio::main(flavor = "multi_thread")]
+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
+
let args = Args::parse();
+
+
let default_app_path = if args.native {
+
"../target/x86_64-unknown-linux-gnu/release/vnd-atproto-app"
+
} else {
+
"../target/riscv32imc-unknown-none-elf/release/vnd-atproto-app"
+
};
+
+
let app_path_str = args.app.unwrap_or(default_app_path.to_string());
+
+
let mut app_client = if args.native {
+
AtprotoAppClient::new(Box::new(
+
NativeAppClient::new(&app_path_str)
+
.await
+
.map_err(|_| "Failed to create client")?,
+
))
+
} else {
+
let transport_raw: Arc<
+
dyn Transport<Error = Box<dyn std::error::Error + Send + Sync>> + Send + Sync,
+
> = if args.hid {
+
Arc::new(TransportHID::new(
+
TransportNativeHID::new(
+
&HidApi::new().expect("Unable to get connect to the device"),
+
)
+
.unwrap(),
+
))
+
} else {
+
Arc::new(
+
TransportTcp::new()
+
.await
+
.expect("Unable to get TCP transport. Is speculos running?"),
+
)
+
};
+
let transport = TransportWrapper::new(transport_raw.clone());
+
+
let (client, _) = VanadiumAppClient::new(&app_path_str, Arc::new(transport), None)
+
.await
+
.map_err(|e| format!("Failed to create client: {}", e))?;
+
+
AtprotoAppClient::new(Box::new(client))
+
};
+
+
let mut rl = Editor::<CommandCompleter, rustyline::history::DefaultHistory>::new()?;
+
rl.set_helper(Some(CommandCompleter));
+
+
let _ = rl.load_history("history.txt");
+
+
loop {
+
match rl.readline("> ") {
+
Ok(line) => {
+
if line.trim().is_empty() {
+
continue;
+
}
+
rl.add_history_entry(line.as_str())?;
+
+
let clap_args = match prepare_prompt_for_clap(&line) {
+
Ok(args) => args,
+
Err(e) => {
+
println!("Error: {}", e);
+
continue;
+
}
+
};
+
+
match Cli::try_parse_from(clap_args) {
+
Ok(cli) => {
+
if let Err(e) = handle_cli_command(&mut app_client, &cli).await {
+
println!("Error: {}", e);
+
}
+
}
+
Err(e) => println!("Invalid command: {}", e),
+
}
+
}
+
Err(ReadlineError::Interrupted) => println!("Interrupted"),
+
Err(ReadlineError::Eof) => {
+
println!("Exiting");
+
break;
+
}
+
Err(err) => {
+
println!("Error: {:?}", err);
+
break;
+
}
+
}
+
}
+
+
rl.save_history("history.txt")?;
+
+
app_client.exit().await?;
+
+
Ok(())
+
}
+9
client/Cargo.toml
···
+
[package]
+
name = "vnd-atproto-client"
+
version = "0.0.1"
+
edition = "2021"
+
+
[dependencies]
+
common = { package = "vnd-atproto-common", path = "../common"}
+
sdk = { package = "vanadium-client-sdk", git = "https://github.com/LedgerHQ/vanadium"}
+
serde_ipld_dagcbor = { git = "http://github.com/edouardparis/serde_ipld_dagcbor", branch = "scopeguard-no-default-features", default-features = false }
+114
client/src/lib.rs
···
+
use common::message::{Request, Response};
+
use sdk::vanadium_client::{VAppClient, VAppExecutionError};
+
+
use sdk::comm::SendMessageError;
+
+
pub use sdk::{transport, vanadium_client};
+
+
#[derive(Debug)]
+
pub enum AtprotoAppClientError {
+
VAppExecutionError(VAppExecutionError),
+
SendMessageError(SendMessageError),
+
InvalidResponse(&'static str),
+
GenericError(&'static str),
+
}
+
+
impl From<VAppExecutionError> for AtprotoAppClientError {
+
fn from(e: VAppExecutionError) -> Self {
+
Self::VAppExecutionError(e)
+
}
+
}
+
+
impl From<SendMessageError> for AtprotoAppClientError {
+
fn from(e: SendMessageError) -> Self {
+
Self::SendMessageError(e)
+
}
+
}
+
+
impl From<&'static str> for AtprotoAppClientError {
+
fn from(e: &'static str) -> Self {
+
Self::GenericError(e)
+
}
+
}
+
+
impl std::fmt::Display for AtprotoAppClientError {
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+
match self {
+
AtprotoAppClientError::VAppExecutionError(e) => write!(f, "VAppExecutionError: {}", e),
+
AtprotoAppClientError::SendMessageError(e) => write!(f, "SendMessageError: {}", e),
+
AtprotoAppClientError::InvalidResponse(e) => write!(f, "InvalidResponse: {}", e),
+
AtprotoAppClientError::GenericError(e) => write!(f, "GenericError: {}", e),
+
}
+
}
+
}
+
+
impl std::error::Error for AtprotoAppClientError {
+
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
+
match self {
+
AtprotoAppClientError::VAppExecutionError(e) => Some(e),
+
AtprotoAppClientError::SendMessageError(e) => Some(e),
+
AtprotoAppClientError::InvalidResponse(_) => None,
+
AtprotoAppClientError::GenericError(_) => None,
+
}
+
}
+
}
+
+
pub struct AtprotoAppClient {
+
app_client: Box<dyn VAppClient + Send + Sync>,
+
}
+
+
impl<'a> AtprotoAppClient {
+
pub fn new(app_client: Box<dyn VAppClient + Send + Sync>) -> Self {
+
Self { app_client }
+
}
+
+
async fn send_message(&mut self, out: &[u8]) -> Result<Vec<u8>, AtprotoAppClientError> {
+
sdk::comm::send_message(&mut self.app_client, out)
+
.await
+
.map_err(AtprotoAppClientError::from)
+
}
+
+
async fn parse_response(response_raw: &'a [u8]) -> Result<Response, AtprotoAppClientError> {
+
let resp: Response = serde_ipld_dagcbor::from_slice(response_raw)
+
.map_err(|_| AtprotoAppClientError::GenericError("Failed to parse response"))?;
+
Ok(resp)
+
}
+
+
pub async fn get_did_key(
+
&mut self,
+
index: u32,
+
display: bool,
+
) -> Result<Vec<u8>, AtprotoAppClientError> {
+
let msg = serde_ipld_dagcbor::to_vec(&Request::GetDidKey { index, display })
+
.map_err(|_| AtprotoAppClientError::GenericError("Failed to serialize Exit request"))?;
+
+
let response_raw = self.send_message(&msg).await?;
+
match Self::parse_response(&response_raw).await? {
+
Response::DidKey(key) => Ok(key),
+
_ => Err(AtprotoAppClientError::InvalidResponse("Invalid response")),
+
}
+
}
+
+
pub async fn exit(&mut self) -> Result<i32, AtprotoAppClientError> {
+
let msg = serde_ipld_dagcbor::to_vec(&Request::Exit)
+
.map_err(|_| AtprotoAppClientError::GenericError("Failed to serialize Exit request"))?;
+
let response_raw = self.send_message(&msg).await?;
+
+
match Self::parse_response(&response_raw).await {
+
Ok(_) => Err(AtprotoAppClientError::InvalidResponse(
+
"Exit message shouldn't return!",
+
)),
+
Err(e) => match e {
+
AtprotoAppClientError::VAppExecutionError(VAppExecutionError::AppExited(
+
status,
+
)) => Ok(status),
+
e => {
+
println!("Unexpected error on exit: {:?}", e);
+
Err(AtprotoAppClientError::InvalidResponse(
+
"Unexpected error on exit",
+
))
+
}
+
},
+
}
+
}
+
}
+9
common/Cargo.toml
···
+
[package]
+
name = "vnd-atproto-common"
+
version = "0.0.1"
+
authors = ["Edouard Paris <m@edouard.paris>"]
+
edition = "2018"
+
description = "Vanadium app for atproto plc"
+
+
[dependencies]
+
serde = { version = "1.0", default-features = false, features = ["alloc"] }
+29
common/src/lib.rs
···
+
#![cfg_attr(not(test), no_std)]
+
+
extern crate alloc;
+
+
pub mod message {
+
use alloc::{string::String, vec::Vec};
+
use serde::{Deserialize, Serialize};
+
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+
pub enum Request {
+
Exit,
+
GetDidKey { index: u32, display: bool },
+
// SignPlcOperation {
+
// key_index: u32,
+
// previous: Option<PlcOperation>,
+
// operation: PlcOperation,
+
// },
+
}
+
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+
pub enum PlcOperation {}
+
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+
pub enum Response {
+
DidKey(Vec<u8>),
+
// Signature(Vec<u8>),
+
Error(String),
+
}
+
}
+75
src/main.rs
···
+
#![cfg_attr(target_arch = "riscv32", no_std, no_main)]
+
+
extern crate alloc;
+
+
use alloc::{string::ToString, vec::Vec};
+
use common::message::{Request, Response};
+
use sdk::{
+
App,
+
curve::{Curve, EcfpPrivateKey, Secp256k1, ToPublicKey},
+
};
+
+
sdk::bootstrap!();
+
+
#[cfg(not(test))]
+
fn display_key(pubkey: &[u8], index: u32) -> bool {
+
use alloc::string::ToString;
+
use base58::ToBase58;
+
use sdk::ux::TagValue;
+
+
let did_key = alloc::format!("did:key:z{}", pubkey.to_base58());
+
+
sdk::ux::review_pairs(
+
"Verify Atproto DID key",
+
"",
+
&[TagValue {
+
tag: "Index".into(),
+
value: index.to_string(),
+
}],
+
&did_key,
+
"Confirm",
+
false,
+
)
+
}
+
+
#[cfg(test)]
+
fn display_key(pubkey: &[u8], index: u32) -> bool {
+
true
+
}
+
+
pub fn get_did_key(index: u32, display: bool) -> Result<Response, &'static str> {
+
if index > 256 {
+
return Err("Derivation path is too long");
+
}
+
+
let hd_node = sdk::curve::Secp256k1::derive_hd_node(&[index])?;
+
let privkey: EcfpPrivateKey<Secp256k1, 32> = EcfpPrivateKey::new(*hd_node.privkey);
+
let pubkey = privkey.to_public_key();
+
let uncompressed_pubkey = pubkey.as_ref().to_bytes();
+
+
let mut key = Vec::with_capacity(34);
+
key.push(0xE7);
+
key.push(uncompressed_pubkey[64] % 2 + 0x02);
+
key.extend_from_slice(&uncompressed_pubkey[1..33]);
+
+
if display && !display_key(&key, index) {
+
return Err("Rejected by the user");
+
}
+
+
Ok(Response::DidKey(key))
+
}
+
+
fn process(_app: &mut App, request: &[u8]) -> Vec<u8> {
+
let request: Request = serde_ipld_dagcbor::from_slice(request).unwrap();
+
let response = match request {
+
Request::Exit => sdk::exit(0),
+
Request::GetDidKey { index, display } => get_did_key(index, display)
+
.map_err(|e| Response::Error(e.to_string()))
+
.unwrap(),
+
};
+
serde_ipld_dagcbor::to_vec(&response).unwrap()
+
}
+
+
pub fn main() {
+
App::new(process).run()
+
}