0.23.0 • Published 3 years ago

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

Weekly downloads
139
License
MIT
Repository
github
Last release
3 years ago

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: 'https://kovan.infura.io/v3/YOUR-PROJECT-ID', //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.

Arkane.arkaneConnect().linkWallets();

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

1.9.4-develop.0

3 years ago

0.24.0-develop.3

3 years ago

0.24.0-develop.2

3 years ago

0.24.0-develop.1

3 years ago

0.23.0

3 years ago

0.23.0-develop.1

3 years ago

0.22.0-develop.3

4 years ago

0.22.0-develop.2

4 years ago

0.22.0-develop.4

4 years ago

0.22.0

4 years ago

0.22.0-develop.1

4 years ago

0.20.0

4 years ago

0.21.0-develop.3

4 years ago

0.21.0-develop.1

4 years ago

0.20.0-develop.1

4 years ago

0.21.0-develop.2

4 years ago

0.21.0

4 years ago

0.19.0

4 years ago

0.19.0-develop.1

4 years ago

0.18.0

4 years ago

0.18.0-develop.1

4 years ago

0.17.0

4 years ago

0.17.0-develop.1

4 years ago

0.16.0

4 years ago

0.16.0-develop.1

4 years ago

0.15.0

4 years ago

0.15.0-develop.6

4 years ago

0.15.0-develop.4

4 years ago

0.15.0-develop.5

4 years ago

0.15.0-develop.3

4 years ago

0.15.0-develop.2

4 years ago

0.14.0

4 years ago

0.15.0-develop.1

4 years ago

0.14.0-develop.6

4 years ago

0.13.0-develop.5

4 years ago

0.13.0-develop.4

4 years ago

0.13.0-develop.3

4 years ago

0.13.0

4 years ago

0.13.0-develop.1

4 years ago

0.12.0

4 years ago

0.12.0-develop.9

4 years ago

0.12.0-develop.8

4 years ago

0.12.0-develop.7

4 years ago

0.12.0-develop.6

4 years ago

0.12.0-develop.5

4 years ago

0.12.0-develop.4

4 years ago

0.12.0-develop.3

4 years ago

0.12.0-develop.2

4 years ago

0.12.0-develop.1

4 years ago

0.11.0

4 years ago

0.11.0-develop.4

4 years ago

0.11.0-develop.5

4 years ago

0.11.0-develop.3

4 years ago

0.9.0

4 years ago

0.7.0

4 years ago

0.7.0-develop.7

4 years ago

0.7.0-develop.8

4 years ago

0.10.0

4 years ago

0.7.0-develop.6

4 years ago

0.10.0-develop.3

4 years ago

0.8.0

4 years ago

0.10.0-develop.5

4 years ago

0.9.0-develop.1

4 years ago

0.8.0-develop.1

4 years ago

0.9.0-develop.2

4 years ago

0.7.0-develop.3

4 years ago

0.7.0-develop.4

4 years ago

0.7.0-develop.2

4 years ago

0.4.0-develop.24

4 years ago

0.7.0-develop.1

4 years ago

0.6.0

4 years ago

0.4.0-develop.23

4 years ago

0.4.0-develop.22

4 years ago

0.4.0-develop.21

4 years ago

0.4.0-develop.20

4 years ago

0.4.0-develop.19

4 years ago

0.4.0-develop.16

4 years ago

0.4.0-develop.18

4 years ago

0.4.0-develop.17

4 years ago

0.4.0-develop.15

4 years ago

0.4.0-develop.14

4 years ago

0.4.0-develop.13

4 years ago

0.4.0-develop.12

4 years ago

0.4.0-develop.11

4 years ago

0.4.0-develop.10

4 years ago

0.4.0-develop.9

4 years ago

0.4.0-develop.8

4 years ago

0.4.0-develop.7

4 years ago

0.4.0-develop.6

4 years ago

0.4.0-develop.5

4 years ago

0.4.0-develop.4

4 years ago

0.4.0

4 years ago

0.4.0-develop.3

4 years ago

0.4.0-develop.2

4 years ago

0.3.0

4 years ago

0.4.0-develop.1

4 years ago

0.2.6-develop.3

4 years ago

0.2.6-develop.2

5 years ago

0.2.6-develop.1

5 years ago

0.2.5

5 years ago

0.2.3-beta.9

5 years ago

0.2.3-beta.8

5 years ago

0.2.3-beta.7

5 years ago

0.2.3-beta.5

5 years ago

0.2.3-beta.4

5 years ago

0.2.3-beta.3

5 years ago

0.2.3-beta.2

5 years ago

0.2.3-beta.1

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.0-develop.2

5 years ago

0.2.0-develop.1

5 years ago

0.2.0-develop.0

5 years ago

0.1.0

5 years ago

0.1.0-develop.3

5 years ago

0.1.0-develop.2

5 years ago

0.1.0-develop.1

5 years ago

0.1.0-develop.0

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

6 years ago

0.0.17-develop-4

6 years ago

0.0.17-develop-3

6 years ago

0.0.17-develop-2

6 years ago

0.0.17-develop-1

6 years ago

0.0.17-develop-0

6 years ago

0.0.16

6 years ago

0.0.16-beta-2

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago