Getting Started
Already have support for Web3? GREAT πŸŽ‰, this is the place to start.
If you already support Web3-technology, you can improve the UX within your application by integrating the Venly Web3 provider, a smart wrapper around the existing Web3 Ethereum JavaScript API.
By making use of our Web3 provider you are able to leverage the full potential of Venly with minimal effort and you will be able to onboard users that are less tech-savvy without making them leave your application or download third-party plugins. Integrating just takes 2 steps and 5 minutes.

Don't support Web3 yet?

Don't worry we've got you covered with our πŸ“¦ Widget - Venly Connect.

Step 1: Add the library to your project

Install the library by downloading it to your project via NPM
1
npm i @venly/web3-provider
Copied!
followed by adding the script to the head of your page.
1
<script src="/node_modules/@venly/web3-provider/dist/web3-provider.js"></script>
Copied!
After adding the javascript file to your page, a global Venly object is added to your window. This object is the gateway for creating the web3 wrapper and fully integrates the widget - Venly Connect.

Step 2: Initialize the web3 provider

Add the following lines of code to your project, it will load the Venly web3 provider.
Simple
Advanced
1
Venly.createProviderEngine({clientId: 'Testaccount'}).then(provider => {
2
web3 = new Web3(provider);
3
});
Copied!
1
const options = {
2
clientId: 'Arketype',
3
environment: 'staging', //optional, production by default
4
signMethod: 'POPUP', //optional, REDIRECT by default
5
bearerTokenProvider: () => 'obtained_bearer_token', //optional, default undefined
6
//optional: you can set an identity provider to be used when authenticating
7
authenticationOptions: {
8
idpHint: 'google'
9
},
10
secretType: 'ETHEREUM' //optional, ETHEREUM by default
11
};
12
Venly.createProviderEngine(options).then(provider => {
13
web3 = new Web3(provider);
14
});
Copied!
The web3 instance now works as if it was injected by parity or metamask. You can fetch wallets, sign transactions, and messages.

Congratulations, your dapp now supports Venly πŸŽ‰

πŸ§™ To connect with a personalised Client ID, and access our production environment, please request access one using this form.
If you want to use the web3js event emitter, please use version >= 1.3.0 of web3js.

Object Types

​
Last modified 7d ago