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

@portkey/extension-provider

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@portkey/extension-provider

@portkey/m

  • 2.4.0-alpha.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
258
decreased by-50.67%
Maintainers
0
Weekly downloads
 
Created
Source

@portkey/mobile-provider

This project creates javascript code that will be injected into Portkey APP's WebView environment, for providing basic functions for DApp developers.

Usage

1. Use @portkey/detect-provider

We recommend to use the @portkey/detect-provider package to detect if Portkey is injected.
Click the link above to learn more.

provider will be injected to the window or globalThis.window object, providing you a way to detect it directly.
Also, when provider is injected, an event named portkeyInitEvent will be triggered on the host object (window).

const detectedProvider:IProvider = window.portkey;
if(!detectedProvider){
    // Portkey is not injected yet
    window.addEventListener('portkeyInitEvent', ()=>{
      const provider = window.portkey;
      // Do something with the provider
      ...
    });
  }

You can find more details and examples in @portkey/detect-provider 's README doc.

FAQs

Package last updated on 14 Jan 2025

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