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

@aeternity/id-manager-provider

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aeternity/id-manager-provider

This basically is a dummy web3 provider which sends its requests to the ID Manager instead of handling them itself. The communication is handled with postMessage calls and callbacks. For security all Dapps using this must run under the following url schem

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Æternity ID Manager provider

This basically is a dummy web3 provider which sends its requests to the ID Manager instead of handling them itself. The communication is handled with postMessage calls and callbacks. For security all Dapps using this must run under the following url scheme http(s)://.aepps.(com|dev)

import IdManagerProvider from '@aeternity/id-manager-provider'
// ...
function initWeb3() {
	let web3;
	let idManager = new IdManagerProvider({
		skipSecurity: process.env.NODE_ENV === 'development'
	})
	idManager.checkIdManager().then( (idManagerPresent) => {
		if (idManagerPresent) {
			// optional if you want the provider to poll current blocks
			idManager.startPolling()
			web3 = new Web3(idManager.provider)
		} else if (typeof window.web3 !== 'undefined') { // Metamask
			web3 = new Web3(window.web3.currentProvider);
		} else {
			web3 = null;
		}

		if (web3) {
			// Ready
		} else {
			// Not Ready
		}

	})
}

FAQs

Package last updated on 26 Feb 2018

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