Developers guide:Running Trezor Connect on localhost

From Trezor Wiki
Jump to: navigation, search
Trezor Wiki/Developer/Developers guide/ Running Trezor Connect on localhost


To run Trezor Connect at localhost you will need nodejs and npm installed.

1.First clone Trezor Connect GitHub:

git clone https://github.com/trezor/connect.git

2. Install and run yarn:

npm install -g yarn
yarn

3. Run Trezor Connect locally:

yarn run dev

Now your Trezor Connect runs on localhost port.

If you want to connect your application to Trezor connect on your localhost, make sure that trezor-connect lib is pointing to a proper endpoint. You need to set window variable:

window.__TREZOR_CONNECT_SRC = 'https://localhost:8088/';


NoteThere is possibility to choose https/http and localhost port in connect/webpack/config.dev.babel.js. If the https is enabled, it is necessary to go to the address in your browser and confirm the certificate, otherwise Trezor Connect will not communicate.


See also Trezor Connect API

Like Trezor? Get one here!