Client library to onboard users to web3 apps
MIT License
Published by aaronbarnardsound over 4 years ago
Just a small release to update the WalletConnect dependency to the latest version which adds Trust wallet to the mobile to mobile connection screen among other things. Link the latest WalletConnect release notes here
Changelog:
Published by aaronbarnardsound over 4 years ago
This release updates to the latest WalletConnect version, adding mobile to mobile connection. The xDai
network has also been added as a valid network.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release just has a few small fixes. One notable change is the z-index
property has been removed from all of the modals as it made the onboard connect modal appear in front of the Torus login modal. If you would like to restore the z-index
setting from previous releases, then you can add the following to your css:
.bn-onboard-custom.bn-onboard-modal {
z-index: 99;
}
Changelog:
Published by aaronbarnardsound over 4 years ago
This release has a couple of small changes. First the Authereum wallet module now exposes all of the Authereum initialization options, notably the new apiKey
option.
The other included change is to add a class to a centered position button in the wallet select and wallet check modals so that it can be easily targeted for custom styling.
Changelog:
Published by aaronbarnardsound over 4 years ago
Just a small release to fix a bug that affected Ledger hardware wallets when trying to connect to the Ledger Live path.
Changelog:
Published by aaronbarnardsound over 4 years ago
A small release that updates the Authereum dependency to allow Authereum to work in Rollup builds and to fix a small memory leak when the Authereum instance is destroyed.
Changelog:
Published by aaronbarnardsound over 4 years ago
Just a small release to add the dashboard
function to the Fortmatic wallet module and to fix the Coinbase wallet logo not rendering correctly.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release just has a few small fixes and enhancements.
In Electron apps, selecting Ledger wallet would leave the UI hanging if the device wasn't connected and unlocked. A fix was added so that the Ledger transport is initialized at a later time allowing it to be selected without having it connected.
The wallet check modals weren't able to be customized due to some incorrect validation logic. That has now been fixed so that you can now customize the following in the wallet check initialization objects:
import Onboard from 'bnc-onboard'
const onboard = Onboard({
walletCheck: [
{
checkName: 'connect',
heading: 'Your Custom Heading',
description: 'Your custom description',
icon: 'Your custom icon string',
html: '<p>Some extra custom markup that will be displayed under the description</p>' ,
button: {
text: 'Custom button text',
onclick: () => alert('You clicked the custom button')
}
},
{ checkName: 'network' },
{ checkName: 'balance', minimumBalance: '100000' },
]
})
Changelog:
Published by aaronbarnardsound over 4 years ago
This release adds WalletLink to the list of wallet modules that Onboard supports out of the box. To add wallet link to your app, just add the following wallet initialization object to your Onboard config wallets array:
//... other config options
walletSelect: {
wallets: [
{ walletName: 'walletLink', rpcUrl: '<RPC_URL>' }
]
}
Also included in this release is the Trezor Connect library has been updated to v8 which includes a fix that will allow it to work in Electron apps.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release makes the dappId
in the initialization object an optional parameter, so that Onboard.js can be used without an API key. By including a dappId
then you opt in to additional features:
If a dappId
is not included in the initialization object, then "Powered by Blocknative" will be displayed on the bottom of each modal by default. If you would like to hide this branding, you can set an additional initialization parameter hideBranding: true
to remove it.
If you have included a dappId
but you would still like the Blocknative branding to be displayed, then set hideBranding: false
.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release is mostly to update and fix the TypeScript definitions to be accurate. The bnc-sdk
dependency has been updated and Eslint has been added to the codebase.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release adds an enhancement so that the balance subscription works correctly for WalletConnect by creating a provider specifically to request the balance. There is also a fix so that regular web3 requests work correctly with the provider.
A few changes have been made so that Onboard is compatible with Rollup.js builds. The only current exceptions are that Ledger, Trezor and Authereum cannot be included in the Onboard configuration for a successful build. This is due to the node crypto
module being needed in the global namespace, which is currently problematic (not possible?) due to Rollup not officially supporting node builtins through their plugin ecosystem and the user created plugins haven't been maintained for years. Hopefully this will change in the future and we will update our recommendations accordingly.
The hardware wallet modules are now fully dynamically imported for smaller bundle sizes served to users 😄
Changelog:
Published by aaronbarnardsound over 4 years ago
Just a small release to add some more options to the WalletConnect module. You can now pass in a rpc
url endpoint and your own bridge
url and that will be passed on to the WalletConnect provider when it is instantiated.
Also included is a fix for a bug for the WalletConnect module where it wouldn't show the QR code as Onboard is waiting on the address promise to resolve, but with WalletConnect it hangs. So timeout has been added to makes sure that it always eventually resolves.
Changelog:
Published by aaronbarnardsound over 4 years ago
Just a small internal change in this release.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release fixes some of the typescript definitions to be more accurate, specifically the wallet
object that the wallet subscription is called with.
Also included is a couple of small fixes. The Ledger wallet module that was causing an error in Electron apps which has been fixed and the wallet check timeout that defines whether a loading spinner will be shown has been extended.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release includes an update to the WalletConnect dependency, which has a reduced bundle size.
Also included is a UI update so that when performing wallet checks, the loading spinner will only show after a delay of 150ms. This prevents the loading spinner from flashing on screen for a brief moment when the user's wallet is in the correct state already, making for a better UX.
"Checking wallet" text has also been added to the loading spinner to better inform the user.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release includes a few small performance enhancements so that calls to walletSelect and
walletCheck` resolve significantly quicker in some scenarios.
Changelog:
Published by aaronbarnardsound over 4 years ago
This release adds the ability to sign messages on Ledger and Trezor wallets:
// using web3.js
const result = await web3.eth.sign('TESTING TESTING 123', address)
// using ethers.js
const result = await signer.signMessage('TESTING TESTING 123')
// using the provider directly
const message = `0x${new Buffer('TESTING TESTING 123').toString('hex')}`
wallet.provider.send(
{
jsonrpc: '2.0',
method: 'eth_sign',
params: [address, message],
id: 42
},
console.log
)
Changelog:
Published by aaronbarnardsound over 4 years ago
This release adds support for imToken wallet. The imToken provider does not support eth_balance
rpc calls, so if you would like the balance subscription to work as it does on other wallets you will need to pass in an optional rpcUrl
into the wallet initialization object:
const config = {
// ...other config options
walletSelect: {
wallets: [
{ walletName: 'imToken', rpcUrl: '<RPC_ENDPOINT>' }
]
}
}
const onboard = Onboard(config)
If you don't pass in a rpcUrl
the wallet will function as normal, but the balance subscription will never get updated as it will have no way of getting access to the wallet's balance.
Also included in this release is a change to the Trust wallet module to allow the same functionality for wallet balance as the Trust wallet provider also doesn't allow eth_balance
rpc calls. So you can now pass in an rpcUrl
to the Trust wallet initialization object for balance updates:
const config = {
// ...other config options
walletSelect: {
wallets: [
{ walletName: 'trust', rpcUrl: '<RPC_ENDPOINT>' }
]
}
}
const onboard = Onboard(config)
NOTE: When you pass in the rpcUrl
it will be for the network that your app is running on, so when the balance subscription is called, the balance value will reflect the balance of that address on the network that your app is running on not necessarily the network that the user's wallet is connected to.
Changelog:
Published by aaronbarnardsound over 4 years ago
The wallet
object that the wallet subscription callback is called with now has a dashboard
parameter instead of the url
parameter. The url
parameter was a String
that is used to open a new window that would load the dashboard for SDK wallets. To make this more flexible we have changed this to dashboard
and to a Function
type so that if a SDK wallet has a function on the instance that will load the dashboard in the same window, then that can be called.
So if you are utilizing the url
parameter in you code currently, you will need to make the following changes:
// you might have a button that when clicked runs this onclick function...
// current code using url parameter
function onclick() {
if (wallet.type === 'sdk') {
wallet.url && window.open(wallet.url)
}
}
// new code using dashboard parameter
function onclick() {
if (wallet.type === 'sdk') {
wallet.dashboard && wallet.dashboard()
}
}
Also included in this release are a couple of small bug fixes via updates to both the Authereum and Unilogin dependencies.
Changelog: