@yqrashawn/conflux-portal-inpage-provider

An ethereum provider that connects over a WebExtension port.

Usage no npm install needed!

<script type="module">
  import yqrashawnConfluxPortalInpageProvider from 'https://cdn.skypack.dev/@yqrashawn/conflux-portal-inpage-provider';
</script>

README

ConfluxPortal Inpage Provider

Used to initialize the inpage ethereum provider injected by ConfluxPortal.

Installation

yarn add @yqrashawn/conflux-portal-inpage-provider

Usage

// Create a stream to a remote provider:
var confluxPortalStream = new LocalMessageDuplexStream({
  name: 'inpage',
  target: 'contentscript',
})

// compose the inpage provider
var inpageProvider = new ConfluxPortalInpageProvider(confluxPortalStream)