Introduction
The BeL2 SDK enables developers to integrate Zero-Knowledge Proof (ZKP) functionality for Bitcoin transaction verification on EVM-compatible chains. This SDK provides an interface for submitting verification requests and monitoring their status, bridging the gap between Bitcoin's security and the programmability of EVM ecosystems.
Key Features
- Compatible with multiple versions of EVM providers, including ethers v5 and v6.
- Abstract complex ZKP operations into easy-to-use functions for developers.
- Monitor verification request status changes for responsive applications.
Core Functionalities
The BeL2 SDK primarily focuses on two main operations:
-
Submitting Verification Requests
- Create a verification request for a specific Bitcoin transaction using the
submitVerificationRequest
method. - Optionally include a script hex for additional verification.
- Create a verification request for a specific Bitcoin transaction using the
-
Checking Verification Status
- Retrieve the current status of a submitted verification request using the
checkStatus
method. - Continuously monitor status changes through the
status$
observable.
- Retrieve the current status of a submitted verification request using the
SDK Structure
The BeL2 SDK is organized into several modules:
ZKP
- The main module containing all ZKP-related functionality.EthersV5
- Provider for Ethers.js v5 compatibility.EthersV6
- Provider for Ethers.js v6 compatibility.
services
- Contains various services used by the SDK.chains
- Defines supported blockchain networks.evm
- Handles EVM-specific operations.nownodes-api
- Interfaces with the NOWNodes API for blockchain data.zkp
- Core ZKP functionality.
utils
- Utility functions, including cryptographic operations.
Getting Started
To start using the BeL2 SDK, you'll need to:
- Install the SDK in your project.
- Configure the SDK with your desired EVM provider and network.
- Create a verification instance for a Bitcoin transaction.
- Submit a verification request.
- Monitor the verification status.
For detailed instructions, please refer to the Installation and SDK Overview guides.
Use Cases
The BeL2 SDK enables various applications that require secure verification of Bitcoin transactions on EVM chains:
- Cross-Chain Bridges - Build secure bridges between Bitcoin and EVM-compatible chains.
- DeFi Applications - Develop decentralized finance applications that can verify Bitcoin transactions for cross-chain operations.
- Bitcoin-backed Assets - Create and manage Bitcoin-backed tokens on EVM chains with verifiable proof of backing.
- Blockchain Analytics Tools - Build tools that can verify and analyze Bitcoin transactions from within EVM environments.
By using the BeL2 SDK, developers can create innovative applications that leverage the security of Bitcoin while benefiting from the programmability of EVM-compatible chains.
For a complete list of available methods and their usage, please refer to the API Reference section.