Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Implement Ledger Support #1513

Draft
wants to merge 21 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
55d5fbd
Add "ledger-support" feature to `zingolib` crate
pacu Nov 14, 2024
768587e
Always build all features in the IDE
pacu Nov 14, 2024
e1d582b
Add a feature-gated `ledger` field in `WalletCapability`
pacu Nov 14, 2024
f2665ba
Ledger WalletBase, KeyError, WalletCapability::new_with_ledger
pacu Nov 14, 2024
833a13e
Create `InternalCapability` capability trait
pacu Nov 14, 2024
ffcbf7d
Implement `InternalCapability` trait for `InMemory` keys.
pacu Nov 19, 2024
dd2c8ee
Move to InternalCapability's `get_ua_from_contained_transparent_recei…
pacu Nov 19, 2024
b259c42
move WalletCapability `addresses()` to delegate to InternalCapability
pacu Nov 19, 2024
af319c3
Move `transparent_child_addresses` to `InternalWalletCapability`
pacu Nov 19, 2024
c5a3077
Move `new_address` to InternalCapability implementation
pacu Nov 19, 2024
7377e12
Move `generate_transparent_receiver` to `InternalCapability` impl
pacu Nov 19, 2024
18b2388
Move `get_taddr_to_secretkey_map` to `InternalCapability` impl
pacu Nov 19, 2024
d97c22c
Move `get_external_taddrs` to `InternalCapability` implementation
pacu Nov 19, 2024
d8d961a
remove `get_trees_witness_trees` function from `InternalCapability`
pacu Nov 19, 2024
8667db8
Scaffolding for introducing a LedgerCapability
pacu Nov 19, 2024
10c41b0
fix feature compile errors
pacu Nov 19, 2024
f2a59b3
move `can_view` to `InternalCapability` Implementation
pacu Nov 19, 2024
1ed8389
Add ledger-support feature to ZingoCli interface
pacu Nov 21, 2024
eae49fb
add "ledger-support" feature to libtonode-tests
pacu Nov 21, 2024
0a8c412
add ledger repos
pacu Dec 12, 2024
b8291f8
Fix compile errors and dependency issues
pacu Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rust-analyzer.diagnostics.disabled": [
"unresolved-macro-call"
]
],
"rust-analyzer.cargo.features": "all"
}
180 changes: 172 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
resolver = "2"

[workspace.dependencies]
bip0039 = "0.11"
bip0039 = "0.12"
incrementalmerkletree = "0.7"
orchard = "0.10"
sapling-crypto = "0.3"
Expand Down
1 change: 1 addition & 0 deletions libtonode-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2021"
[features]
chain_generic_tests = []
ci = ["zingolib/ci"]
ledger-support = []

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions libtonode-tests/tests/concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,8 @@ mod slow {
Some(client_builder.zingo_datadir),
ChainType::Regtest(regtest_network),
true,
#[cfg(feature = "ledger-support")]
false,
)
.unwrap();

Expand Down
2 changes: 2 additions & 0 deletions libtonode-tests/tests/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ async fn sync_mainnet_test() {
Some(temp_path),
zingolib::config::ChainType::Mainnet,
true,
#[cfg(feature = "ledger-support")]
false,
)
.unwrap();
let mut lightclient = LightClient::create_from_wallet_base_async(
Expand Down
3 changes: 3 additions & 0 deletions zingocli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ rustyline = { workspace = true }
shellwords = { workspace = true }

rustls.workspace = true

[features]
ledger-support = []
Loading