Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @arkane-network/web3-arkane-provider with all npm packages installed. Try it out:

var web3ArkaneProvider = require("@arkane-network/web3-arkane-provider")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@arkane-network/web3-arkane-provider v0.17.0

Arkane-enabled Web3 Provider for the web

Arkane Web3 Provider

The Arkane Web3 provider is a smart wrapper around the existing Web3 Ethereum JavaScript API.

If you already have an application running using web3 technology, you can make use of this wrapper to leverage the full potential of Arkane Network. Your existing infrastructure is just one code block away from being Arkane Enabled.

Arkane Components

Getting Started

Adding the library

npm i @arkane-network/web3-arkane-provider

Add the following script to the head of your page:

<script src="/node_modules/@arkane-network/web3-arkane-provider/dist/web3-arkane-provider.js"></script>

Using the Library

After adding the javascript file to your page, a global Arkane object is added to your window. This object is the gateway for creating the web3 wrapper and fully integrates the Arkane Connect JS SDK.

Adding the web3 provider

const options = {
  clientId: 'YOUR_CLIENT_ID',
  rpcUrl: '', //optional
  environment: 'staging', //optional, production by default  
  signMethod: 'POPUP', //optional, REDIRECT by default
  bearerTokenProvider: () => 'obtained_bearer_token' //optional, default undefined
Arkane.createArkaneProviderEngine(options).then(provider => {
    web3 = new Web3(provider);

The web3 instance now works as if it was injected by parity or metamask. You can fetch your wallets or sign transactions and messages.

If you provide your own implementation of bearerTokenProvider, the web3 provider will not attempt to obtain an authentication code, but rather use the one provided by you.

Using Arkane Connect JS natively

Although we use Arkane Connect JS under the hood, the functionality of the web3 wrapper isn't limited to the web3 API. Linking or fetching profile information is not supported by Web3, but it is in our wrapper. After creating an Arkane Provider Engine, we add an instance of ArkaneConnect to the global Arkane object. As a result, it's possible to call Arkane Connect JS natively, like so.


The full documentation of the Arkane Connect JS SDK can be found here.

Example Project

As an example, we transformed our Arketype demo to sign transactions and data using web3.

What is Arkane Network

Not sure yet what Arkane Network is all about, where are some resources to help you get a better view:

alt text

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free