npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bangjelkoski/trezor-connect-web

v9.4.7

Published

High-level javascript interface for Trezor hardware wallet in web environment.

Downloads

175

Readme

@trezor/connect-web

Build Status NPM Known Vulnerabilities

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 on https://connect.trezor.io/<version>/iframe.html
  • Create and handle communication and lifecycle of @trezor/connect-popup hosted on https://connect.trezor.io/<version>/popup.html

Installation

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>

Initialization

ES6

import TrezorConnect from '@trezor/connect-web';

Inline

var TrezorConnect = window.TrezorConnect;

For more instructions refer to this document

Development

  • clone repository: git clone [email protected]:trezor/trezor-suite.git
  • install node_modules: yarn && yarn build:libs
  • generate certs yarn workspace @trezor/connect-web predev
  • It is possible to run local dev server with iframe and popup using: yarn workspace @trezor/connect-web dev Note: don't forget to visit https://localhost:8088/ and allow self-signed certificate. No UI is displayed here.

TrezorConnect Support Matrix

The table below details the support for different environments by TrezorConnect for integrating Trezor devices, including the use of WebUSB and the need for Trezor Bridge.

| Environment | Chrome | Firefox | Safari | Chrome Android | Firefox Android | Notes | | ----------------------------- | :----: | :-----: | :----: | :------------: | :-------------: | ----------------------------------------------------------------------- | | Web (WebUSB) | ✓ | ✗ | ✗ | ✓ | ✗ | WebUSB is fully supported where indicated. (Chromium based browsers) | | Web (Bridge) | ✓ | ✓ | ✗ | ✗ | ✗ | Trezor Bridge is required where WebUSB is not supported. (e.g. Firefox) | | WebExtension (WebUSB, Bridge) | ✓ | ✓ | ✗ | ✓ | ✗ | Requires Trezor Bridge on platforms not supporting WebUSB. |

Key Differences

  • WebUSB: Allows direct communication with Trezor devices via the browser. Supported by most modern browsers but may have limitations on mobile devices and is not supported by Safari.
  • Trezor Bridge: A service that runs with Trezor Suite or Standalone that facilitates communication between your Trezor device and a web browser. Required for browsers that do not support WebUSB or for a more stable connection on desktop environments.