From d85a9e2fae3ceb2229f24f7f5a5da21355c98b25 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 9 Jun 2024 14:56:37 -0400 Subject: [PATCH] refactor: improve workspace layout --- Cargo.toml | 51 +++++++++++++++++-- bip32/Cargo.toml | 27 ---------- core/Cargo.toml | 24 --------- crates/bip32/Cargo.toml | 30 +++++++++++ {bip32 => crates/bip32}/README.md | 0 {bip32 => crates/bip32}/src/defaults.rs | 0 {bip32 => crates/bip32}/src/derived.rs | 0 {bip32 => crates/bip32}/src/enc.rs | 0 {bip32 => crates/bip32}/src/lib.rs | 0 {bip32 => crates/bip32}/src/macros.rs | 0 {bip32 => crates/bip32}/src/path.rs | 0 {bip32 => crates/bip32}/src/prelude.rs | 0 {bip32 => crates/bip32}/src/primitives.rs | 0 {bip32 => crates/bip32}/src/xkeys.rs | 0 {bip39 => crates/bip39}/Cargo.toml | 19 +++---- {bip39 => crates/bip39}/README.md | 0 {bip39 => crates/bip39}/src/lib.rs | 0 {bip39 => crates/bip39}/src/mnemonic.rs | 0 .../bip39}/src/wordlist/chinese_simplified.rs | 0 .../src/wordlist/chinese_traditional.rs | 0 {bip39 => crates/bip39}/src/wordlist/czech.rs | 0 .../bip39}/src/wordlist/english.rs | 0 .../bip39}/src/wordlist/french.rs | 0 .../bip39}/src/wordlist/italian.rs | 0 .../bip39}/src/wordlist/japanese.rs | 0 .../bip39}/src/wordlist/korean.rs | 0 {bip39 => crates/bip39}/src/wordlist/mod.rs | 0 .../bip39}/src/wordlist/portuguese.rs | 0 .../bip39}/src/wordlist/spanish.rs | 0 .../src/wordlist/words/chinese_simplified.txt | 0 .../wordlist/words/chinese_traditional.txt | 0 .../bip39}/src/wordlist/words/czech.txt | 0 .../bip39}/src/wordlist/words/english.txt | 0 .../bip39}/src/wordlist/words/french.txt | 0 .../bip39}/src/wordlist/words/italian.txt | 0 .../bip39}/src/wordlist/words/japanese.txt | 0 .../bip39}/src/wordlist/words/korean.txt | 0 .../bip39}/src/wordlist/words/portuguese.txt | 0 .../bip39}/src/wordlist/words/spanish.txt | 0 crates/core/Cargo.toml | 21 ++++++++ {core => crates/core}/README.md | 0 {core => crates/core}/src/enc.rs | 0 {core => crates/core}/src/hashes.rs | 0 {core => crates/core}/src/lib.rs | 0 {core => crates/core}/src/macros.rs | 0 {core => crates/core}/src/prelude.rs | 0 {core => crates/core}/src/ser.rs | 0 {ledger => crates/ledger}/Cargo.toml | 22 ++++---- {ledger => crates/ledger}/README.md | 0 .../ledger}/node_tests/package-lock.json | 0 .../ledger}/node_tests/package.json | 0 {ledger => crates/ledger}/node_tests/test.js | 0 {ledger => crates/ledger}/src/common.rs | 0 {ledger => crates/ledger}/src/errors.rs | 0 {ledger => crates/ledger}/src/lib.rs | 0 {ledger => crates/ledger}/src/protocol.rs | 0 .../ledger}/src/transports/mod.rs | 0 .../ledger}/src/transports/native/error.rs | 0 .../ledger}/src/transports/native/hid.rs | 0 .../ledger}/src/transports/native/mod.rs | 0 .../ledger}/src/transports/wasm.rs | 0 {ledger => crates/ledger}/test.sh | 0 .../ledger}/tests/integration.rs | 0 63 files changed, 120 insertions(+), 74 deletions(-) delete mode 100644 bip32/Cargo.toml delete mode 100644 core/Cargo.toml create mode 100644 crates/bip32/Cargo.toml rename {bip32 => crates/bip32}/README.md (100%) rename {bip32 => crates/bip32}/src/defaults.rs (100%) rename {bip32 => crates/bip32}/src/derived.rs (100%) rename {bip32 => crates/bip32}/src/enc.rs (100%) rename {bip32 => crates/bip32}/src/lib.rs (100%) rename {bip32 => crates/bip32}/src/macros.rs (100%) rename {bip32 => crates/bip32}/src/path.rs (100%) rename {bip32 => crates/bip32}/src/prelude.rs (100%) rename {bip32 => crates/bip32}/src/primitives.rs (100%) rename {bip32 => crates/bip32}/src/xkeys.rs (100%) rename {bip39 => crates/bip39}/Cargo.toml (76%) rename {bip39 => crates/bip39}/README.md (100%) rename {bip39 => crates/bip39}/src/lib.rs (100%) rename {bip39 => crates/bip39}/src/mnemonic.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/chinese_simplified.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/chinese_traditional.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/czech.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/english.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/french.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/italian.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/japanese.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/korean.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/mod.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/portuguese.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/spanish.rs (100%) rename {bip39 => crates/bip39}/src/wordlist/words/chinese_simplified.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/chinese_traditional.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/czech.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/english.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/french.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/italian.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/japanese.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/korean.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/portuguese.txt (100%) rename {bip39 => crates/bip39}/src/wordlist/words/spanish.txt (100%) create mode 100644 crates/core/Cargo.toml rename {core => crates/core}/README.md (100%) rename {core => crates/core}/src/enc.rs (100%) rename {core => crates/core}/src/hashes.rs (100%) rename {core => crates/core}/src/lib.rs (100%) rename {core => crates/core}/src/macros.rs (100%) rename {core => crates/core}/src/prelude.rs (100%) rename {core => crates/core}/src/ser.rs (100%) rename {ledger => crates/ledger}/Cargo.toml (77%) rename {ledger => crates/ledger}/README.md (100%) rename {ledger => crates/ledger}/node_tests/package-lock.json (100%) rename {ledger => crates/ledger}/node_tests/package.json (100%) rename {ledger => crates/ledger}/node_tests/test.js (100%) rename {ledger => crates/ledger}/src/common.rs (100%) rename {ledger => crates/ledger}/src/errors.rs (100%) rename {ledger => crates/ledger}/src/lib.rs (100%) rename {ledger => crates/ledger}/src/protocol.rs (100%) rename {ledger => crates/ledger}/src/transports/mod.rs (100%) rename {ledger => crates/ledger}/src/transports/native/error.rs (100%) rename {ledger => crates/ledger}/src/transports/native/hid.rs (100%) rename {ledger => crates/ledger}/src/transports/native/mod.rs (100%) rename {ledger => crates/ledger}/src/transports/wasm.rs (100%) rename {ledger => crates/ledger}/test.sh (100%) rename {ledger => crates/ledger}/tests/integration.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 6a682854..340221e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,50 @@ [workspace] members = [ - "core", - "bip32", - "bip39", - "ledger", + "crates/*" ] +resolver = "2" + +[workspace.package] +version = "0.11.0" +authors = [ + "Summa ", + "James Prestwich ", +] +edition = "2021" +repository = "https://github.com/summa-tx/coins" +license = "MIT OR Apache-2.0" +rust-version = "1.65" + +[workspace.dependencies] +coins-bip32 = { path = "crates/bip32" } +coins-bip39 = { path = "crates/bip39" } +coins-core = { path = "crates/core" } +coins-ledger = { path = "crates/ledger" } + +# core +base64 = "0.21" +bech32 = "0.9" +bs58 = "0.5.1" +digest = "0.10.7" +generic-array = "0.14.7" +hex = { package = "const-hex", version = "1.12.0" } +ripemd = "0.1.3" +serde = "1.0.203" +sha3 = "0.10.8" + +# bip32 +hmac = "0.12.1" +k256 = { version = "0.13.3", features = ["std", "arithmetic"] } +sha2 = "0.10.8" +thiserror = "1.0.61" + +# bip39 +bitvec = "1.0.1" +pbkdf2 = "0.12.2" +rand = "0.8.5" +once_cell = "1.19.0" + +# ledger +async-trait = "0.1.80" +cfg-if = "1.0.0" + diff --git a/bip32/Cargo.toml b/bip32/Cargo.toml deleted file mode 100644 index cc5dbc5a..00000000 --- a/bip32/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "coins-bip32" -version = "0.8.7" -authors = ["James Prestwich "] -edition = "2018" -description = "Bip32 in Rust" -repository = "https://github.com/summa-tx/bitcoins-rs" -license = "MIT OR Apache-2.0" - -[dependencies] -coins-core = { version = "0.8.3", path = "../core" } - -bs58 = "0.5" -digest = "0.10" -hmac = "0.12" -k256 = { version = "0.13", features = ["std", "arithmetic"] } -serde = "1.0" -sha2 = "0.10" -thiserror = "1.0" - -[dev-dependencies] -hex = "0.4" - -[features] -default = ["mainnet"] -mainnet = [] -testnet = [] diff --git a/core/Cargo.toml b/core/Cargo.toml deleted file mode 100644 index b4d023c4..00000000 --- a/core/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "coins-core" -version = "0.8.7" -authors = ["James Prestwich "] -edition = "2018" -description = "Core library for coins-bip32 and coins-bip39" -repository = "https://github.com/summa-tx/coins" -license = "MIT OR Apache-2.0" - -[dependencies] -base64 = "0.21" -bech32 = "0.9" -bs58 = { version = "0.5", features = ["check"] } -hex = "0.4" -serde = { version = "1.0", features = ["derive"] } -serde_derive = "1.0" -thiserror = "1.0" - -# update in parallel -digest = "0.10" -generic-array = "0.14" -ripemd = "0.1" -sha2 = "0.10" -sha3 = "0.10" diff --git a/crates/bip32/Cargo.toml b/crates/bip32/Cargo.toml new file mode 100644 index 00000000..6e6b6b77 --- /dev/null +++ b/crates/bip32/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "coins-bip32" +version.workspace = true +authors.workspace = true +edition.workspace = true +repository.workspace = true +license.workspace = true + +categories = ["cryptography"] +keywords = ["bip32", "bitcoin", "cryptocurrency", "blockchain"] +description = "Bip32 in Rust" + +[dependencies] +coins-core.workspace = true + +bs58.workspace = true +digest.workspace = true +hmac.workspace = true +k256.workspace = true +serde.workspace = true +sha2.workspace = true +thiserror.workspace = true + +[dev-dependencies] +hex = "0.4" + +[features] +default = ["mainnet"] +mainnet = [] +testnet = [] diff --git a/bip32/README.md b/crates/bip32/README.md similarity index 100% rename from bip32/README.md rename to crates/bip32/README.md diff --git a/bip32/src/defaults.rs b/crates/bip32/src/defaults.rs similarity index 100% rename from bip32/src/defaults.rs rename to crates/bip32/src/defaults.rs diff --git a/bip32/src/derived.rs b/crates/bip32/src/derived.rs similarity index 100% rename from bip32/src/derived.rs rename to crates/bip32/src/derived.rs diff --git a/bip32/src/enc.rs b/crates/bip32/src/enc.rs similarity index 100% rename from bip32/src/enc.rs rename to crates/bip32/src/enc.rs diff --git a/bip32/src/lib.rs b/crates/bip32/src/lib.rs similarity index 100% rename from bip32/src/lib.rs rename to crates/bip32/src/lib.rs diff --git a/bip32/src/macros.rs b/crates/bip32/src/macros.rs similarity index 100% rename from bip32/src/macros.rs rename to crates/bip32/src/macros.rs diff --git a/bip32/src/path.rs b/crates/bip32/src/path.rs similarity index 100% rename from bip32/src/path.rs rename to crates/bip32/src/path.rs diff --git a/bip32/src/prelude.rs b/crates/bip32/src/prelude.rs similarity index 100% rename from bip32/src/prelude.rs rename to crates/bip32/src/prelude.rs diff --git a/bip32/src/primitives.rs b/crates/bip32/src/primitives.rs similarity index 100% rename from bip32/src/primitives.rs rename to crates/bip32/src/primitives.rs diff --git a/bip32/src/xkeys.rs b/crates/bip32/src/xkeys.rs similarity index 100% rename from bip32/src/xkeys.rs rename to crates/bip32/src/xkeys.rs diff --git a/bip39/Cargo.toml b/crates/bip39/Cargo.toml similarity index 76% rename from bip39/Cargo.toml rename to crates/bip39/Cargo.toml index 91858a5e..807a9226 100644 --- a/bip39/Cargo.toml +++ b/crates/bip39/Cargo.toml @@ -12,22 +12,23 @@ repository = "https://github.com/summa-tx/coins" license = "MIT OR Apache-2.0" [dependencies] -coins-bip32 = { version = "0.8.3", path = "../bip32" } +coins-bip32.workspace = true -bitvec = "1.0" -hmac = "0.12" -pbkdf2 = "0.12" -rand = "0.8" -sha2 = "0.10" -thiserror = "1.0" +hmac.workspace = true +bitvec.workspace = true +pbkdf2.workspace = true +rand.workspace = true +sha2.workspace = true +thiserror.workspace = true # used by all wordlists -once_cell = { version = "1.18", optional = true } +once_cell = { workspace = true, optional = true } [dev-dependencies] -hex = "0.4" +hex.workspace = true [features] +once_cell = ["dep:once_cell"] default = ["all-langs"] all-langs = [ "chinese-simplified", diff --git a/bip39/README.md b/crates/bip39/README.md similarity index 100% rename from bip39/README.md rename to crates/bip39/README.md diff --git a/bip39/src/lib.rs b/crates/bip39/src/lib.rs similarity index 100% rename from bip39/src/lib.rs rename to crates/bip39/src/lib.rs diff --git a/bip39/src/mnemonic.rs b/crates/bip39/src/mnemonic.rs similarity index 100% rename from bip39/src/mnemonic.rs rename to crates/bip39/src/mnemonic.rs diff --git a/bip39/src/wordlist/chinese_simplified.rs b/crates/bip39/src/wordlist/chinese_simplified.rs similarity index 100% rename from bip39/src/wordlist/chinese_simplified.rs rename to crates/bip39/src/wordlist/chinese_simplified.rs diff --git a/bip39/src/wordlist/chinese_traditional.rs b/crates/bip39/src/wordlist/chinese_traditional.rs similarity index 100% rename from bip39/src/wordlist/chinese_traditional.rs rename to crates/bip39/src/wordlist/chinese_traditional.rs diff --git a/bip39/src/wordlist/czech.rs b/crates/bip39/src/wordlist/czech.rs similarity index 100% rename from bip39/src/wordlist/czech.rs rename to crates/bip39/src/wordlist/czech.rs diff --git a/bip39/src/wordlist/english.rs b/crates/bip39/src/wordlist/english.rs similarity index 100% rename from bip39/src/wordlist/english.rs rename to crates/bip39/src/wordlist/english.rs diff --git a/bip39/src/wordlist/french.rs b/crates/bip39/src/wordlist/french.rs similarity index 100% rename from bip39/src/wordlist/french.rs rename to crates/bip39/src/wordlist/french.rs diff --git a/bip39/src/wordlist/italian.rs b/crates/bip39/src/wordlist/italian.rs similarity index 100% rename from bip39/src/wordlist/italian.rs rename to crates/bip39/src/wordlist/italian.rs diff --git a/bip39/src/wordlist/japanese.rs b/crates/bip39/src/wordlist/japanese.rs similarity index 100% rename from bip39/src/wordlist/japanese.rs rename to crates/bip39/src/wordlist/japanese.rs diff --git a/bip39/src/wordlist/korean.rs b/crates/bip39/src/wordlist/korean.rs similarity index 100% rename from bip39/src/wordlist/korean.rs rename to crates/bip39/src/wordlist/korean.rs diff --git a/bip39/src/wordlist/mod.rs b/crates/bip39/src/wordlist/mod.rs similarity index 100% rename from bip39/src/wordlist/mod.rs rename to crates/bip39/src/wordlist/mod.rs diff --git a/bip39/src/wordlist/portuguese.rs b/crates/bip39/src/wordlist/portuguese.rs similarity index 100% rename from bip39/src/wordlist/portuguese.rs rename to crates/bip39/src/wordlist/portuguese.rs diff --git a/bip39/src/wordlist/spanish.rs b/crates/bip39/src/wordlist/spanish.rs similarity index 100% rename from bip39/src/wordlist/spanish.rs rename to crates/bip39/src/wordlist/spanish.rs diff --git a/bip39/src/wordlist/words/chinese_simplified.txt b/crates/bip39/src/wordlist/words/chinese_simplified.txt similarity index 100% rename from bip39/src/wordlist/words/chinese_simplified.txt rename to crates/bip39/src/wordlist/words/chinese_simplified.txt diff --git a/bip39/src/wordlist/words/chinese_traditional.txt b/crates/bip39/src/wordlist/words/chinese_traditional.txt similarity index 100% rename from bip39/src/wordlist/words/chinese_traditional.txt rename to crates/bip39/src/wordlist/words/chinese_traditional.txt diff --git a/bip39/src/wordlist/words/czech.txt b/crates/bip39/src/wordlist/words/czech.txt similarity index 100% rename from bip39/src/wordlist/words/czech.txt rename to crates/bip39/src/wordlist/words/czech.txt diff --git a/bip39/src/wordlist/words/english.txt b/crates/bip39/src/wordlist/words/english.txt similarity index 100% rename from bip39/src/wordlist/words/english.txt rename to crates/bip39/src/wordlist/words/english.txt diff --git a/bip39/src/wordlist/words/french.txt b/crates/bip39/src/wordlist/words/french.txt similarity index 100% rename from bip39/src/wordlist/words/french.txt rename to crates/bip39/src/wordlist/words/french.txt diff --git a/bip39/src/wordlist/words/italian.txt b/crates/bip39/src/wordlist/words/italian.txt similarity index 100% rename from bip39/src/wordlist/words/italian.txt rename to crates/bip39/src/wordlist/words/italian.txt diff --git a/bip39/src/wordlist/words/japanese.txt b/crates/bip39/src/wordlist/words/japanese.txt similarity index 100% rename from bip39/src/wordlist/words/japanese.txt rename to crates/bip39/src/wordlist/words/japanese.txt diff --git a/bip39/src/wordlist/words/korean.txt b/crates/bip39/src/wordlist/words/korean.txt similarity index 100% rename from bip39/src/wordlist/words/korean.txt rename to crates/bip39/src/wordlist/words/korean.txt diff --git a/bip39/src/wordlist/words/portuguese.txt b/crates/bip39/src/wordlist/words/portuguese.txt similarity index 100% rename from bip39/src/wordlist/words/portuguese.txt rename to crates/bip39/src/wordlist/words/portuguese.txt diff --git a/bip39/src/wordlist/words/spanish.txt b/crates/bip39/src/wordlist/words/spanish.txt similarity index 100% rename from bip39/src/wordlist/words/spanish.txt rename to crates/bip39/src/wordlist/words/spanish.txt diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml new file mode 100644 index 00000000..d216647f --- /dev/null +++ b/crates/core/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "coins-core" +version = "0.8.7" +authors = ["James Prestwich "] +edition = "2018" +description = "Core library for coins-bip32 and coins-bip39" +repository = "https://github.com/summa-tx/coins" +license = "MIT OR Apache-2.0" + +[dependencies] +base64.workspace = true +bech32.workspace = true +bs58 = { workspace = true, features = ["check"] } +digest.workspace = true +generic-array.workspace = true +hex.workspace = true +ripemd.workspace = true +serde = { workspace = true, features = ["derive"] } +sha2.workspace = true +sha3.workspace = true +thiserror.workspace = true \ No newline at end of file diff --git a/core/README.md b/crates/core/README.md similarity index 100% rename from core/README.md rename to crates/core/README.md diff --git a/core/src/enc.rs b/crates/core/src/enc.rs similarity index 100% rename from core/src/enc.rs rename to crates/core/src/enc.rs diff --git a/core/src/hashes.rs b/crates/core/src/hashes.rs similarity index 100% rename from core/src/hashes.rs rename to crates/core/src/hashes.rs diff --git a/core/src/lib.rs b/crates/core/src/lib.rs similarity index 100% rename from core/src/lib.rs rename to crates/core/src/lib.rs diff --git a/core/src/macros.rs b/crates/core/src/macros.rs similarity index 100% rename from core/src/macros.rs rename to crates/core/src/macros.rs diff --git a/core/src/prelude.rs b/crates/core/src/prelude.rs similarity index 100% rename from core/src/prelude.rs rename to crates/core/src/prelude.rs diff --git a/core/src/ser.rs b/crates/core/src/ser.rs similarity index 100% rename from core/src/ser.rs rename to crates/core/src/ser.rs diff --git a/ledger/Cargo.toml b/crates/ledger/Cargo.toml similarity index 77% rename from ledger/Cargo.toml rename to crates/ledger/Cargo.toml index 8f077726..99ae3e14 100644 --- a/ledger/Cargo.toml +++ b/crates/ledger/Cargo.toml @@ -1,30 +1,32 @@ [package] name = "coins-ledger" -version = "0.10.1" + +version.workspace = true +edition.workspace = true +repository.workspace = true +license.workspace = true + authors = [ "Summa ", - "James Prestwich ", + "James Prestwich ", "Zondax GmbH ", ] -edition = "2018" categories = ["authentication", "cryptography"] keywords = ["ledger", "apdu", "cryptocurrency"] -repository = "https://github.com/summa-tx/coins" -license = "MIT OR Apache-2.0" description = "Ledger Nano X/S connection and communication management library" [lib] crate-type = ["cdylib", "rlib"] [dependencies] -async-trait = "0.1" -cfg-if = "1.0" -hex = "0.4" -thiserror = "1.0" +async-trait.workspace = true +cfg-if.workspace = true +hex.workspace = true +thiserror.workspace = true # native [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -once_cell = "1.18.0" +once_cell.workspace = true byteorder = "1.5" tracing = "0.1" hidapi-rusb = "1.3" diff --git a/ledger/README.md b/crates/ledger/README.md similarity index 100% rename from ledger/README.md rename to crates/ledger/README.md diff --git a/ledger/node_tests/package-lock.json b/crates/ledger/node_tests/package-lock.json similarity index 100% rename from ledger/node_tests/package-lock.json rename to crates/ledger/node_tests/package-lock.json diff --git a/ledger/node_tests/package.json b/crates/ledger/node_tests/package.json similarity index 100% rename from ledger/node_tests/package.json rename to crates/ledger/node_tests/package.json diff --git a/ledger/node_tests/test.js b/crates/ledger/node_tests/test.js similarity index 100% rename from ledger/node_tests/test.js rename to crates/ledger/node_tests/test.js diff --git a/ledger/src/common.rs b/crates/ledger/src/common.rs similarity index 100% rename from ledger/src/common.rs rename to crates/ledger/src/common.rs diff --git a/ledger/src/errors.rs b/crates/ledger/src/errors.rs similarity index 100% rename from ledger/src/errors.rs rename to crates/ledger/src/errors.rs diff --git a/ledger/src/lib.rs b/crates/ledger/src/lib.rs similarity index 100% rename from ledger/src/lib.rs rename to crates/ledger/src/lib.rs diff --git a/ledger/src/protocol.rs b/crates/ledger/src/protocol.rs similarity index 100% rename from ledger/src/protocol.rs rename to crates/ledger/src/protocol.rs diff --git a/ledger/src/transports/mod.rs b/crates/ledger/src/transports/mod.rs similarity index 100% rename from ledger/src/transports/mod.rs rename to crates/ledger/src/transports/mod.rs diff --git a/ledger/src/transports/native/error.rs b/crates/ledger/src/transports/native/error.rs similarity index 100% rename from ledger/src/transports/native/error.rs rename to crates/ledger/src/transports/native/error.rs diff --git a/ledger/src/transports/native/hid.rs b/crates/ledger/src/transports/native/hid.rs similarity index 100% rename from ledger/src/transports/native/hid.rs rename to crates/ledger/src/transports/native/hid.rs diff --git a/ledger/src/transports/native/mod.rs b/crates/ledger/src/transports/native/mod.rs similarity index 100% rename from ledger/src/transports/native/mod.rs rename to crates/ledger/src/transports/native/mod.rs diff --git a/ledger/src/transports/wasm.rs b/crates/ledger/src/transports/wasm.rs similarity index 100% rename from ledger/src/transports/wasm.rs rename to crates/ledger/src/transports/wasm.rs diff --git a/ledger/test.sh b/crates/ledger/test.sh similarity index 100% rename from ledger/test.sh rename to crates/ledger/test.sh diff --git a/ledger/tests/integration.rs b/crates/ledger/tests/integration.rs similarity index 100% rename from ledger/tests/integration.rs rename to crates/ledger/tests/integration.rs