How do I integrate Bitski?

  • Updated

Need help on integration? Start here!  đź’»

Ready to get started with wallets? There are a myriad of ways to add wallet support in your dApp. Two of the recommended ways to integrate Bitski are to use the Injected Wallet setup from either RainbowKit or BlockNative Onboard.
 

Steps for Rainbow Kit Integration:

  1. Install Rainbow kit via this guide: here
  2. Install the Bitski SDK with the guide here
  3. Follow instructions for adding Bitski as an injected wallet here

Steps for BlockNative Onboard Integration:

  1. Install BlockNative Onboard kit via this guide: here
  2. Install the Bitski SDK with the guide here
  3. Follow instructions for adding Bitski as an injected wallet here
This will let you quickly add Bitski into a dApp or website with minimal effort and let your users reap the benefits of our software stack built for mass adoption. In the future, we also plan to support Web3Modal from WalletConnect.
The Bitski wallet is currently compatible with Ethereum and Polygon, supports the most popular NFT standards, and is multi-platform. Users can access the Bitski wallet as a web wallet on desktop, a best-in-class mobile app on iOS devices, or as a browser extension, similar to Metamask but with additional security and quality-of-life features.

 

Integration of the Bitski Browser extension:

Integration of the Bitski extension is super simple. The extension works just like MetaMask or any other extension-based wallet.

 

We assign the Bitski provider to "window.ethereum" You can check to see if Bitski is installed by looking up the "window.ethereum.isBitski" property, if it’s true then it’s installed and ready to use, just like MetaMask.

  • If the user has multiple wallets installed, then window.ethereum will end up being whichever wallet was initialized last. To support all of the installed wallets simultaneously, you can check window.ethereum.providers, which should generally be an array of any other wallet providers that existed before the last one was created.
  • For instance, to find the Bitski provider, you would do window.ethereum.providers?.find(p => p.isBitski) and to find the MetaMask provider, you would do window.ethereum.providers?.find(p => p.isMetaMask).

So combining these, here are what two functions might look like for finding the Bitski provider when the user selects “Connect with Bitski”, and finding the MetaMask provider when the user selects “Connect with MetaMask”:

function findBitskiProvider() {

  if (window.ethereum?.isBitski) {

    return window.ethereum;

  }

 

  return window.ethereum?.providers?.find(p => p.isBitski);

}

 

function findMetaMaskProvider() {

  if (window.ethereum?.isMetaMask) {

    return window.ethereum;

  }

 

  return window.ethereum?.providers?.find(p => p.isMetaMask);

}

 

 

Bitski_flag_discord_sticker.png

Need help integrating or have questions for our developers? Send your question directly to support@bitski.com or jump into our Discord for even faster replies.

Comments

0 comments

Article is closed for comments.