charles-cai / trezor-mac-toolkit

A macOS toolkit for Trezor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac toolkit for Trezor

This is a toolkit for macOS users who want to start tinkering with Trezor stack.

Currently it is only for my personal education.

Rationale

Trezor devs don't use macOS on daily basis and their docs/tools could have sharp edges when trying to use them under macOS.

The idea is to maintain some convenience scripts to

  1. keep interesting Trezor repos maintained side-by-side with paths properly set for macOS
  2. have tools like emulator and tests working under native macOS

And to cross check our macOS setup I also maintain a custom Docker container for trying the same operations under Linux (I use Ubuntu which should be more native environment to follow Trezor development).

Initial setup

git clone --recursive https://github.com/darwin/trezor-mac-toolkit.git
cd trezor-mac-toolkit
./scripts/bootstrap.sh

To build the docker image:

./scripts/docker-build.sh

To invoke commands in the docker container:

./scripts/docker-run.sh [arg1] [arg2] ...

The do.sh command

This is a wrapper command for convenience. It can be run on native macOS directly or via docker-run.sh which invokes it by default inside the docker container. I also provide ddo.sh which stands for "docker do" as a shortcut for invoking ./scripts/docker-run.sh.

./do.sh build_unix

# or alternatively
./ddo.sh build_unix
 
# to enter shell inside the container:
./ddo.sh bash
./ddo.sh fish

# note that trezor-mac-toolkit directory is mapped as a volume inside the container under /trezor-mac-toolkit

About

A macOS toolkit for Trezor


Languages

Language:Shell 100.0%