This package is bundled into web implementations. User interface is presented in a secure popup window served from connect.trezor.io/<version>/popup.html
. To try it out, use @trezor/connect-explorer hosted here.
Contains minimum of code required to:
- Define
TrezorConnect
API object - Create and handle communication between
@trezor/connect-iframe
hosted onhttps://connect.trezor.io/<version>/iframe.html
- Create and handle communication and lifecycle of
@trezor/connect-popup
hosted onhttps://connect.trezor.io/<version>/popup.html
Install library as npm module:
npm install @trezor/connect-web
or
yarn add @trezor/connect-web
Include library as inline script:
<script src="https://connect.trezor.io/9/trezor-connect.js"></script>
ES6
import TrezorConnect from '@trezor/connect-web';
Inline
var TrezorConnect = window.TrezorConnect;
For more instructions refer to this document
- clone repository:
git clone [email protected]:trezor/trezor-suite.git
- install node_modules:
yarn && yarn build:libs
- It is possible to run local dev server with iframe and popup using:
yarn workspace @trezor/connect-web dev
Note: don't forget to visithttps://localhost:8088/
and allow self-signed certificate. No UI is displayed here.