-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christian
committed
Apr 28, 2019
1 parent
a7911dd
commit a2b9d59
Showing
3 changed files
with
80 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Contribution | ||
|
||
I welcome feedback, and pull requests. If there's something that you need to change in the library, please log an issue, and explain the problem. If you have a proposed solution, please write it up and explain why you think it is the answer to the problem. The best way to highlight a bug is to submit a pull request with a unit test that fails so I can clearly see what the problem is in the first place. | ||
|
||
## Pull Requests | ||
|
||
Please break pull requests up in to their smallest possible parts. If you have a small feature or refactor that other code depends on, try submitting that first. Please try to reference an issue so that I understand the context of the pull request. If there is no issue, I don't know what the code is about. | ||
|
||
- Log an issue for why you are making the change | ||
- Fork the repo | ||
- Make your changes in the develop branch | ||
- Test thoroughly and put a unit/integration test around your work | ||
- Submit a pull request and reference the issue so I know why the pull request has been submitted. | ||
|
||
If you need help, please jump on Join us on [Slack](https://join.slack.com/t/hardwarewallets/shared_invite/enQtNjA5MDgxMzE2Nzg2LWUyODIzY2U0ODE5OTFlMmI3MGYzY2VkZGJjNTc0OTUwNDliMTg2MzRiNTU1MTVjZjI0YWVhNjQzNjUwMjEyNzQ) | ||
|
||
**Please submit pull requests to the develop branch. Please do not submit to the master branch** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,74 @@ | ||
# KeepKey.Net | ||
Cross Platform C# Library for the KeepKey Cryptocurrency Hardwarewallet | ||
|
||
Join us on Slack: | ||
https://hardwarewallets.slack.com | ||
|
||
Twitter: | ||
https://twitter.com/HardfolioApp | ||
|
||
Blog: | ||
https://christianfindlay.wordpress.com | ||
|
||
Currently supports: | ||
* .NET Framework | ||
* .NET Core | ||
* Android | ||
* UWP | ||
|
||
## Quick Start | ||
|
||
- Clone the repo and open the solution | ||
- There is a sample/unit test app there called KeepKey.Net.Sample | ||
- This sample is a .NET Core console app and shows you how to get addresses | ||
|
||
Note: not all messages have a public method, but all messages exist. If you want to send a message to the KeepKey you need to construct the message object and send it to the KeepKey with the SendMessageAsync method. This requires that you know the result type before calling. | ||
|
||
## NuGet | ||
|
||
Install-Package KeepKey.Net | ||
|
||
## [Hardwarewallets.Net](https://github.com/MelbourneDeveloper/Hardwarewallets.Net) | ||
|
||
This library is part of the Hardwarewallets.Net suite of libraries. It is an ambitious project aimed toward putting a set of common C# interfaces across all hardwarewallets | ||
|
||
## Contribution | ||
|
||
I welcome feedback, and pull requests. If there's something that you need to change in the library, please log an issue, and explain the problem. If you have a proposed solution, please write it up and explain why you think it is the answer to the problem. The best way to highlight a bug is to submit a pull request with a unit test that fails so I can clearly see what the problem is in the first place. | ||
|
||
### Pull Requests | ||
|
||
Please break pull requests up in to their smallest possible parts. If you have a small feature of refactor that other code depends on, try submitting that first. Please try to reference an issue so that I understand the context of the pull request. If there is no issue, I don't know what the code is about. If you need help, please jump on Slack here: https://hardwarewallets.slack.com | ||
- There is a console sample, Xamarin Forms sample and unit tests | ||
- Compile one of the unit test apps, run the UWP/Android Xamarin Forms apps or, | ||
- Go to Test->Windows->Text Explorer in Visual Studio | ||
- Run one of the unit tests in the pane. | ||
|
||
All KeepKey messages are in the KeepKey.Net.Contracts namespace. To implement them, you need to call SendMessageAsync | ||
|
||
NuGet: Install-Package KeepKey.Net | ||
|
||
[Example](https://github.com/MelbourneDeveloper/KeepKey.Net/blob/a7911dd0f6f37dd4eb008a7320a0c786c90dfb37/src/KeepKey.Net.UnitTest/UnitTest.cs#L39): | ||
````cs | ||
private static async Task<string> GetAddressAsync(uint coinNumber, bool isChange, uint index, bool display, bool isPublicKey = false, bool isLegacy = true) | ||
{ | ||
WindowsUsbDeviceFactory.Register(); | ||
WindowsHidDeviceFactory.Register(); | ||
var keepKeyManagerBroker = new KeepKeyManagerBroker(GetPin, GetPassphrase, 2000); | ||
var keepKeyManager = await keepKeyManagerBroker.WaitForFirstTrezorAsync(); | ||
await keepKeyManager.InitializeAsync(); | ||
var coinTable = await keepKeyManager.GetCoinTable(); | ||
keepKeyManager.CoinUtility = new KeepKeyCoinUtility(coinTable); | ||
var coinInfo = KeepKeyManager.CoinUtility.GetCoinInfo(coinNumber); | ||
var addressPath = new BIP44AddressPath(!isLegacy && coinInfo.IsSegwit, coinNumber, 0, isChange, index); | ||
var address = await KeepKeyManager.GetAddressAsync(addressPath, isPublicKey, display); | ||
return address; | ||
} | ||
```` | ||
## Contact | ||
|
||
- Join us on [Slack](https://join.slack.com/t/hardwarewallets/shared_invite/enQtNjA5MDgxMzE2Nzg2LWUyODIzY2U0ODE5OTFlMmI3MGYzY2VkZGJjNTc0OTUwNDliMTg2MzRiNTU1MTVjZjI0YWVhNjQzNjUwMjEyNzQ) | ||
- PM me on [Twitter](https://twitter.com/cfdevelop) | ||
- Blog: https://christianfindlay.com/ | ||
|
||
## [Contribution](https://github.com/MelbourneDeveloper/KeepKey.Net/blob/master/CONTRIBUTING.md) | ||
|
||
The community needs your help! Unit tests, integration tests, more app integrations and bug fixes please! Check out the Issues section. | ||
|
||
## Donate | ||
|
||
All Hardwarewallets.Net libraries are open source and free. Your donations will contribute to making sure that these libraries keep up with the latest hardwarewallet firmware, functions are implemented, and the quality is maintained. | ||
|
||
Bitcoin: 33LrG1p81kdzNUHoCnsYGj6EHRprTKWu3U | ||
|
||
Ethereum: 0x7ba0ea9975ac0efb5319886a287dcf5eecd3038e | ||
All my libraries are open source and free. Your donations will contribute to making sure that these libraries keep up with the latest firmware, functions are implemented, and the quality is maintained. | ||
|
||
Litecoin: MVAbLaNPq7meGXvZMU4TwypUsDEuU6stpY | ||
| Coin | Address | | ||
| ------------- |:-------------:| | ||
| Bitcoin | [33LrG1p81kdzNUHoCnsYGj6EHRprTKWu3U](https://www.blockchain.com/btc/address/33LrG1p81kdzNUHoCnsYGj6EHRprTKWu3U) | | ||
| Ethereum | [0x7ba0ea9975ac0efb5319886a287dcf5eecd3038e](https://etherdonation.com/d?to=0x7ba0ea9975ac0efb5319886a287dcf5eecd3038e) | | ||
|
||
## Store App Production Usage | ||
|
||
This app currently only Supports Trezor (https://github.com/MelbourneDeveloper/Trezor.Net) but it will soon support Ledger with this library. | ||
|
||
https://play.google.com/store/apps/details?id=com.Hardfolio (Android) | ||
## Based On | ||
|
||
https://www.microsoft.com/en-au/p/hardfolio/9p8xx70n5d2j (UWP) | ||
|
||
## [Hid.Net, Usb.Net](https://github.com/MelbourneDeveloper/Device.Net) | ||
|
||
KeepKey.Net communicates with the devices via the Hid.Net and Usb.Net libraries. You can see the repo for this library here. | ||
|
||
## [Trezor.Net](https://github.com/MelbourneDeveloper/Trezor.Net) | ||
|
||
KeepKey.Net is based on Trezor.Net which is based on Hid.Net. You can see the repo for this library here: | ||
| Library | Description | | ||
| ------------- |:-------------:| | ||
| [Trezor.Net](https://github.com/MelbourneDeveloper/Trezor.Net) | Trezor Hardwarewallet Library. KeepKey's and Trezor's protocol are very similar | | ||
| [Hardwarewallets.Net](https://github.com/MelbourneDeveloper/Hardwarewallets.Net) | This library is part of the Hardwarewallets.Net suite. It is aimed toward putting a set of common C# interfaces, and utilities that will work with all hardwarewallets. | | ||
| [Hid.Net, Usb.Net](https://github.com/MelbourneDeveloper/Device.Net) | Trezor.Net communicates with the devices via the Hid.Net and Usb.Net libraries. You can see the repo for this library here. | | ||
|
||
## See Also | ||
|
||
[Hardwarewallets.Net](https://github.com/MelbourneDeveloper/Hardwarewallets.Net) - Base level Hardwarewallet Library | ||
| Library | Description | | ||
| ------------- |:-------------:| | ||
| [Trezor.Net](https://github.com/MelbourneDeveloper/Trezor.Net) | Trezor Hardwarewallet Library | | ||
| [Ledger.Net](https://github.com/MelbourneDeveloper/Ledger.Net) | Ledger Hardwarewallet Library | | ||
| [Ledger .NET API](https://github.com/LedgerHQ/ledger-dotnet-api) | A similar Ledger library | | ||
| [Ledger Bitcoin App](https://github.com/LedgerHQ/blue-app-btc) | Bitcoin wallet application for Ledger Blue and Nano S | | ||
| [Ledger Ethereum App](https://github.com/LedgerHQ/blue-app-eth) | Ethereum wallet application for Ledger Blue and Nano S | | ||
|
||
[Ledger.Net](https://github.com/MelbourneDeveloper/Ledger.Net) - Ledger Hardwarewallet Library | ||
## Hardfolio - Store App Production Usage | ||
|
||
[Trezor.Net](https://github.com/MelbourneDeveloper/Trezor.Net) - Trezor Hardwarewallet Library | ||
https://play.google.com/store/apps/details?id=com.Hardfolio (Android) | ||
|
||
https://www.microsoft.com/en-au/p/hardfolio/9p8xx70n5d2j (UWP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters