@statechannels/iframe-channel-provider
TypeScript icon, indicating that this package has built-in type declarations

0.3.0-hyperspace-patch-0 • Public • Published

🔌 IFrame Channel Provider

It exposes a global object called channelProvider that implements the EIP 1193 standard.

Usage

Include the iframe-channel-provider.min.js file in your app via a script tag:

<script src="node_modules/@statechannels/iframe-channel-provider/dist/iframe-channel-provider.js"></script>

Then, enable the provider, passing on an URL to where the Wallet UI hosted.

window.channelProvider.mountWalletComponent('http://xstate-wallet.statechannels.org');

In order for the wallet connection to be useful, you'll want to enable it by calling .enable(). This method tells the wallet to establish a connection with the user's Web3 provider.

For more information see https://docs.statechannels.org

Dependencies (3)

Dev Dependencies (28)

Package Sidebar

Install

npm i @statechannels/iframe-channel-provider

Weekly Downloads

37

Version

0.3.0-hyperspace-patch-0

License

MIT

Unpacked Size

2.95 MB

Total Files

74

Last publish

Collaborators

  • tashieugyal
  • gill93
  • nilock
  • geoknee
  • kerzhner
  • lagap