# Implementing a New Chain Driver

It is very easy to add support for a new blockchain or create your own implementation. All you need to do is implement the [ChainDriver ](/blockin/developer-docs/getting-started/chaindrivers/chain-driver-interface.md#ichaindriver-interface)interface which only takes around 200 lines of code (see our [EthDriver code](https://github.com/Blockin-Labs/blockin-eth-driver/blob/main/src/EthDriver.ts)). If you do this, it would be greatly appreciated if it is shared with us via [GitHub](https://github.com/Blockin-Labs/blockin/tree/main/src/ChainDrivers) or [Discord](https://discord.gg/hUEuXbQzSe), so we can add it to our [Supported Chains](/blockin/developer-docs/getting-started/chaindrivers/list-of-implemented-chain-drivers.md)!

### Development Notes

* Most of the required logic should already be implemented by existing libraries or APIs of that blockchain (e.g. ethers for Ethereum). Most functions only require you to handle and call one of these functions. For example, isValidAddress(address) => return ethers.utils.isAddress(address).

### Importance of Functions

Depending on the needs of your project, you may choose to only implement what is necessary.

**Mandatory**: These functions are mandatory to be implemented by all ChainDriver implementations. Blockin directly calls and depends on these functions for its core functionality. They must be implemented no matter what. These do not requiring querying the blockchain state and are expected to be offline-compatible.

If all you need is basic signature verification and no additional Blockin features, you only need to implement the following functions.

* verifySignature
* parseChallengeStringFromBytesToSign
* isValidAddress

**Mandatory for Asset Sign-Ins**: Blockin calls these functions if it requires querying the blockchain in some way. If all you need is signature verifications, you do not need these functions. But if you want to utilize Blockin's additional features such as signing in with assets (NFTs), these must be implemented. Implementations may require the internet (if not using a snapshot) and API keys (dependent on the implementation).

* verifyAssets


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blockin.gitbook.io/blockin/developer-docs/getting-started/chaindrivers/implementing-a-new-chain-driver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
