@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
Last updated 2 years ago by muxe .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @aeternity/id-manager-provider 
SYNC missed versions from official npm registry.

Æ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)://<subdomain>.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
		}

	})
}

Current Tags

  • 0.0.11                                ...           latest (2 years ago)

11 Versions

  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 15
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |