Use Trezor Connect To Access trezor-crypto Methods

Hi there! I’m looking to use Trezor devices as a way to replace software-based webcrypto functions in my website, is this currently possible with Trezor Connect? If not, are there plans to add this? And maybe i’m blind, but I couldn’t find documentation for the trezord bridge, which would probably be better suited for this task.

Hi @lively,

Wiki (user guide): Trezor Bridge - Trezor Wiki
Source: GitHub - trezor/trezord-go: Trezor Communication Daemon (written in Go)

Thanks! hmm, it looks like the documentation is a bit sparse and it doesn’t accept domains other than *trezor.io, maybe they’ll consider opening it up eventually?

I haven’t dived into this issue myself so I don’t know the details, but the wiki is meant for users, not developers, I think. Maybe there’s developer docs on Github, I don’t know.

My guess as for why only trezor.io is the only acceptable domain, is because otherwise it’d be open for scammers to make their own look-alike websites and steal funds from people’s Trezors.

I don’t know what your website project’s requirements are, but perhaps you can use Trezor’s authenticity function (ie. signing things on the website with the Trezor as a 2FA/MFA device)?

Here are some reading for you:

Trezor as 2FA: Two-factor authentication - Trezor Wiki
Trezor with U2F: User manual:Two-factor Authentication with U2F - Trezor Wiki
Trezor Password Manager: User manual:Password Manager - Trezor Wiki

hello,

This is most likely not going to work. Trezor doesn’t expose the low-level cryptographic APIs, only some high-level operations, and most of these must be explicitly confirmed by the user, you can only use Trezor’s own private keys, etc.

You can look into Connect documentation or the explorer to see what’s available.

it wouldn’t really :wink: although there is some functionality available on Trezor that’s not exposed via Connect, it’s not a lot and in most cases it doesn’t make sense to expose it. If it does, extending Connect to do it would be nicer.