{"id":26130588,"url":"https://github.com/emeraldpay/emerald-hwkey","last_synced_at":"2025-06-15T19:36:21.271Z","repository":{"id":56654034,"uuid":"305006501","full_name":"emeraldpay/emerald-hwkey","owner":"emeraldpay","description":"Emerald HWKey - lib to access Hardware Cryptocurrency Keys","archived":false,"fork":false,"pushed_at":"2025-03-20T21:06:59.000Z","size":914,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T10:13:01.660Z","etag":null,"topics":["blockchain","ledger","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emeraldpay.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-18T02:22:46.000Z","updated_at":"2025-03-21T10:51:24.000Z","dependencies_parsed_at":"2025-03-10T20:52:02.054Z","dependency_job_id":"a880c805-6c88-48ad-bdcf-6150ef81b59d","html_url":"https://github.com/emeraldpay/emerald-hwkey","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-hwkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-hwkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-hwkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldpay%2Femerald-hwkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emeraldpay","download_url":"https://codeload.github.com/emeraldpay/emerald-hwkey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768258,"owners_count":21158607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","ledger","rust"],"created_at":"2025-03-10T20:51:54.989Z","updated_at":"2025-04-13T19:33:55.764Z","avatar_url":"https://github.com/emeraldpay.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Emerald HWKey\n\nimage:https://github.com/emeraldpay/emerald-hwkey/workflows/Test/badge.svg[\"Test\"]\nimage:https://coveralls.io/repos/github/emeraldpay/emerald-hwkey/badge.svg[\"Coveralls\"]\nimage:https://codecov.io/gh/emeraldpay/emerald-hwkey/branch/master/graph/badge.svg[Codecov,link=https://codecov.io/gh/emeraldpay/emerald-hwkey]\nimage:https://img.shields.io/crates/v/emerald-hwkey.svg?style=flat-square[\"Crates\",link=\"https://crates.io/crates/emerald-hwkey\"]\nimage:https://img.shields.io/badge/License-Apache%202.0-blue.svg[\"License\"]\n\nRust library to access Hardware Keys for Cryptocurrency.\n\n.Supports:\n- Ledger Nano S\n- Ledger Nano X\n\n== Development\n\n=== Integration Testing with Speculos app\n\nGet App Ledger App emulator from: https://github.com/LedgerHQ/speculos\n\n.For Docker:\n----\ndocker pull ghcr.io/ledgerhq/speculos\ndocker image tag ghcr.io/ledgerhq/speculos speculos\n----\n\nThe Speculos app is initialized with the following seed by default:\n----\nglory   promote mansion idle        axis    finger   extra   february\nuncover one     trip    resource    lawn    turtle  enact   monster\nseven   myth    punch   hobby       comfort wild    raise   skin\n----\n\n=== Test against a Bitcoin App\n\n.Run it in docker as:\n----\ndocker run --rm -it -p 8080:5000  speculos --display headless apps/btc.elf\n----\n\n.Run tests:\n----\nEMRLD_HWKEY_TEST=bitcoin cargo test --test speculos_bitcoin --features \"speculos\" -- --test-threads=1\n----\n\n=== Test against an Ethereum App\n\n.Run Speculos Docker with NanoX app:\n----\ndocker run --rm -it -v $(pwd)/testdata/ledger-elf:/speculos/apps -p 8080:5000  speculos --model nanox --display headless apps/ethereum-nanox-2.0.2-1.9.18.elf\n----\n\n.Run tests:\n----\nEMRLD_HWKEY_TEST=ethereum cargo test --test speculos_ethereum --features \"speculos\" -- --test-threads=1\n----\n\n=== Integration Testing with Real Hardware\n\nFor all the test the following Mnemonic Phrase is used:\n\n----\nblanket large   trumpet mandate call  great unhappy skull\nspecial assist  draw    right   quote stone under   legend\ninvite  morning hub     believe pulp  piano tuition fruit\n----\n\nYou can also verify addresses and get the actual Private Key by using https://iancoleman.io/bip39/#english with that\nMnemonic.\nAt least for the Ledger Nano products.\n\nWARNING: Never transfer real money to the Test Ledger or any wallet created from the Mnemonic Phrase above.\n         Since the Phrase is public all the money would be stolen immediately.\n\n\n==== Ledger + No App\n\n*No App* must be open on Ledger\n\n----\nEMRLD_HWKEY_TEST=noapp cargo test --test ledger_noapp -- --test-threads=1\n----\n\n==== Ledger + Bitcoin App\n\n*Bitcoin App* must be open on Ledger\n\n----\nEMRLD_HWKEY_TEST=bitcoin cargo test --test ledger_bitcoin -- --test-threads=1\n----\n\n\n==== Ledger + Bitcoin Test App\n\n*Bitcoin Test App* must be open on Ledger\n\n----\nEMRLD_HWKEY_TEST=bitcoin_testnet cargo test --test ledger_bitcoin -- --test-threads=1\n----\n\n\n==== Ledger + Ethereum App\n\n*Ethereum App* must be open on Ledger\n\n----\nEMRLD_HWKEY_TEST=ethereum cargo test --test ledger_ethereum -- --test-threads=1\n----\n\n==== Ledger + Ethereum Classic App\n\n*Ethereum Classic App* must be open on Ledger\n\n----\nEMRLD_HWKEY_TEST=ethereum_classic cargo test --test ledger_ethereum -- --test-threads=1\n----\n\n== Test Configuration\n\nTo run integration tests, like above, you cannot run them without connecting Ledger and opening right app on it before running the tess.\nWhich also means you cannot run them all at the same time, or from CI, etc.\nTo enable a particular test you set the environment variable `EMRLD_HWKEY_TEST` to the name of the test you want to run, which is handled by `build.rs` script to set the corresponding `cfg(...)` option.\n\nThe following tests are available (note `test_` prefix is optional in environment variable):\n- `integration_test`\n- `test_noapp`\n- `test_ethereum`\n- `test_ethereum_classic`\n- `test_bitcoin`\n- `test_bitcoin_testnet`\n\nAnd on top of them there is `integration_test`.\n\nBy default, it uses a single instance of HID connection shared between different threads (because re-opening it right after closing is prone to panics), but it can be reset by adding `hid` to that environment variable, which enabled direct HID connection in tests.\n\n== License\n\nCopyright 2025 EmeraldPay\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldpay%2Femerald-hwkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femeraldpay%2Femerald-hwkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldpay%2Femerald-hwkey/lists"}