Setting Chain Drivers
With custom implementations (not outsourced), you can implement and setup your own ChainDrivers. Mix and match drivers as you wish according to your application's requirements. See Supported Chains to see some already implemented ChainDrivers, or see Adding a New Chain for how to create your own!
1) For each chain you want to support in your application, you will need a ChainDriver implementation for that blockchain (see below). You can either implement the interface yourself (see Adding a New Chain), or Blockin and its community provide some already implemented ChainDrivers (see Supported Chains) that you import (or use as starting points).
2) Once you have your ChainDriver implementations that you want to use in your application, you will need to handle getting it where needed.
Option 1 - Directly Import: For the Blockin built or preexisting drivers, if all you need is the standard out of the box functionality you can install pre-existing ChainDrivers via:
and
Option 2 - Copy/Paste (Recommended): However, we actually find it a lot more flexible to simply copy and paste the driver files such as https://github.com/Blockin-Labs/blockin-eth-driver/tree/main/src and use them directly in your project that way instead of importing via a library. They are small (only ~200 lines of code), and this allows you to perform minor tweaks and customization as needed, as well as seeing how they work behind the scenes.
See https://github.com/BitBadges/bitbadges-indexer/tree/master/src/blockin.
Option 3 - Implement Your Own: Implement your own from scratch!
Last updated