@statechannels/iframe-channel-provider

v0.3.0-hyperspace-patch-0
It exposes a global object called `channelProvider` that implements the [EIP 1193](https://github.com/ryanio/EIPs/blob/master/EIPS/eip-1193.md) standard.

🔌 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

npm i @statechannels/iframe-channel-provider

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 2/28/2023

Downloads