Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bloks/browser-transport

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bloks/browser-transport

Vanilla JS browser transport for Proton Link

  • 3.2.1-24
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A transport library for usage of Proton Link within a web browser environment.

Basic usage

A transport is required for Proton Link to communicate with clients. In most examples we use the browser transport with no configuration, like so:

const transport = new ProtonBrowserTransport()
const link = new ProtonLink({transport})

Parameters can be passed to the transport during construction as an object, allowing for the following optional changes:

const transport = new ProtonBrowserTransport({
    /** CSS class prefix, defaults to `proton-link` */
    classPrefix: 'my-css-prefix',
    /** Whether to inject CSS styles in the page header, defaults to true. */
    injectStyles: true,
    /** Whether to display request success and error messages, defaults to true */
    requestStatus: false,
    /** Local storage prefix, defaults to `proton-link`. */
    storagePrefix: 'my-localstorage-prefix',
    /**
     * Whether to use Greymass Fuel for low resource accounts, defaults to false.
     *  Note that this service is not available on all networks, and will automatically
     *  determine based on chain id if it should be enabled or not.
     */
    disableGreymassFuel: false,
    /** Referral account to use for Greymass Fuel. */
    fuelReferrer: 'teamgreymass',
})
const link = new ProtonLink({transport})

Developing

You need Make, node.js and yarn installed.

Clone the repository and run make to checkout all dependencies and build the project. See the Makefile for other useful targets. Before submitting a pull request make sure to run make lint.

License

MIT


Made with ☕️ & ❤️ by Greymass, if you find this useful please consider supporting us.

FAQs

Package last updated on 16 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc