GithubHelp home page GithubHelp logo

imranmehdi5511 / trezor-user-env Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trezor/trezor-user-env

0.0 0.0 0.0 73.51 MB

Shell 10.46% JavaScript 11.38% Python 67.71% CSS 1.10% Nix 0.63% Makefile 0.40% HTML 5.86% Dockerfile 2.47%

trezor-user-env's Introduction

Trezor User Env

This environment is meant to support Trezor development - both Firmware and Suite and other related projects. Its main goals are:

  • Provide an easy websocket server that is capable of:
    • Launching/stopping different versions of the firmware emulator.
    • Launching/stopping trezord-go (Bridge).
    • Send simple debug commands to the emulator.
  • Enable full integration testing of Suite, firmware emulator and Bridge using the websocket server.
  • Provide a HTML page that communicates with the server. This allows the developers to perform the actions above.
  • To be Nix-native but also offer Docker image to allow non-NixOS developers to use it.

How to run

You can also run trezor-user-env "natively" if you are on NixOS but we mainly support the Docker way as described here.

In case you have installed Trezor Bridge previously there will be a port conflict, please make sure it is not running. Either uninstall it completely or stop the service.

Supported platforms are Linux and macOS (both Intel and Silicon).

Prerequisites

  • Docker
  • xhost on Linux
  • XQuartz on macOS. Configure > Preferences > Security > Allow connections from network clients

Steps

  1. Clone this repo and enter the directory
  2. Run ./run.sh it will determine your platform and launch trezor-user-env. See ./run.sh --help for some additional arguments.
  3. Open http://localhost:9002.

Basic terminology

  • Controller
    • Websocket server running on localhost:9001
    • Has the functionality to control trezor components (run emulators, bridges, etc.)
    • Used by Dashboard (below) or by automated end-to-end tests in Trezor Suite
  • Dashboard
    • HTML page being accessible on localhost:9002
    • Instructs the websocket server what to do by predefined functionality
    • Used by developers testing their firmware/suite applications manually
  • Bridge
    • Service running on localhost:21325
    • Connection between the trezor device (or running emulator) and the host
    • Used by applications needing to communicate with trezor device (for example Suite)
  • Bridge proxy
    • Proxies requests to the bridge
  • Bitcoin regtest
    • Bitcoind with blockbook running in regtest mode
    • Default credentials for bitcoin backend
      • user and password: rpc/rpc and that you can run
    • You can test the connection with bitcoin-cli -rpcport=18021 -rpcuser=rpc -rpcpassword=rpc -getinfo

Development

See docs/development.md.

Troubleshooting

  • On Apple Silicon Macs, trezor-user-env-regtest runs in an emulation layer as there is no arm native image. You may experience some slowness or issues when using it on arm Macs.

trezor-user-env's People

Contributors

grdddj avatar tsusanka avatar vdovhanych avatar szymonlesisz avatar darwin avatar mroz22 avatar mmilata avatar sime avatar wendys-cats 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.