Skip to content

Fix Trezor Support #3

@tynes

Description

@tynes

What is the best way to use Trezor in node.js?

Their library trezor.js is deprecated - https://github.com/trezor/trezor.js
Their library connect is for the browser - https://github.com/trezor/connect

Using trezor.js, it phones home to https://wallet.mytrezor.com/data/config_signed.bin
See https://github.com/trezor/trezor-link for more information. While I'm sure the team
decided to build their system in that way for a completely logical reason, it doesn't really
make sense to me as a developer to use. Their hardware is great, and I do want to support it,
so the options are to

1 - be ok with the phoning home
1 - fork the library and pull that code out
1 - not support trezor
1 - communicate with another process that can directly communicate with the device

I started writing a python script for the node.js process to start as a child process, but
that just seems horribly insecure and bug prone. For example, rendering paths as strings
in bash caused all of the ' (hardened) to disappear and use the wrong keys for things.
It would also be bad ux because then a user needs to set up their python environment
as well as their node.js environment.

I think I'm leaning towards forking trezor.js and then packaging it up with https://github.com/chjj/bpkg
and directly committing it into the repo into a vendor directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions