Code Monkey home page Code Monkey logo

trezor.net's Introduction

Trezor.Net

Cross Platform C# Library for the Trezor Cryptocurrency Hardwarewallet

This library allows you to communicate with both Trezor hardwarewallets in the same way that the Trezor browser wallet app communicates with them. It can be used to build apps that send or receive crypto currencies like Bitcoin in a secure way.

Currently supports: .NET Framework, .NET Core, Android, UWP , See MacOS and Linux Support

Would you like to contribute?

Quick Start

  • Clone the repo and open the solution
  • There is a console sample, Xamarin Forms sample and unit tests for UWP, and .NET
  • 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.
  • Note that the UWP unit test has a UI for entering the pin. Please read instructions there.

All Trezor messages are in the Trezor.Net.Contracts namespace. To implement them, you need to call SendMessageAsync

NuGet: Install-Package Trezor.Net

Example:

public async Task<string> GetAddressAsync()
{
    //Register the factory for creating Usb devices. Trezor One Firmware 1.7.x, 1.8.x / Trezor Model T 2.1.x
    WindowsUsbDeviceFactory.Register();
    //Register the factory for creating Hid devices. Trezor One Firmware 1.6.x
    WindowsHidDeviceFactory.Register();

    var trezorManagerBroker = new TrezorManagerBroker(GetPin, 2000, new DefaultCoinUtility());

    var trezorManager =  await trezorManagerBroker.WaitForFirstTrezorAsync();

    var bip44AddressPath = AddressPathBase.Parse<BIP44AddressPath>("m/49'/0'/0'/0/0");

    return await trezorManager.GetAddressAsync(bip44AddressPath, false, true);
}

Contact

The community needs your help! Unit tests, integration tests, more app integrations and bug fixes please! Check out the Issues section.

Donate

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.

Coin Address
Bitcoin 33LrG1p81kdzNUHoCnsYGj6EHRprTKWu3U
Ethereum 0x7ba0ea9975ac0efb5319886a287dcf5eecd3038e

Based On

Library Description
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 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

Library Description
KeepKey.Net KeepKey Hardwarewallet Library
Ledger.Net Ledger Hardwarewallet Library
Ledger .NET API A similar Ledger library
Ledger Bitcoin App Bitcoin wallet application for Ledger Blue and Nano S
Ledger Ethereum App Ethereum wallet application for Ledger Blue and Nano S

Hardfolio - Store App Production Usage

https://play.google.com/store/apps/details?id=com.Hardfolio (Android)

https://www.microsoft.com/en-au/p/hardfolio/9p8xx70n5d2j (UWP)

trezor.net's People

Contributors

matejcik avatar melbournedeveloper avatar mtleliever avatar raystonn avatar www avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.