Arkane Web3 Provider
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.
Adding the library
npm i @arkane-network/web3-arkane-provider
Add the following script to the head of your page:
Using the Library
Adding the web3 provider
const options =clientId: 'YOUR_CLIENT_ID'rpcUrl: '' //optionalenvironment: 'staging' //optional, production by defaultsignMethod: 'POPUP' //optional, REDIRECT by default'obtained_bearer_token' //optional, default undefined;Arkane;
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.
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:
- An eli5 about Arkane
- What is Arkane and what can it do for me?
- Our wallet security explained
- I'm a developer what can Arkane do for me? (Watch video)
- I'm a crypto-enthusiast: what can Arkane do for me? (Watch video)