Getting Started
This guide will help you set up your environment and start building with our Ethereum Layer 2 solution that integrates Bitcoin functionality. You'll be up and running in no time!
Prerequisites
Before you begin, make sure you have the following installed:
Rust and Cargo (latest stable version)
A Bitcoin node (regtest)
Step 1: Install Corsa
Clone the Corsa repository:
Build the project:
Step 2: Configure Your Environment
Set up your Bitcoin node (if not already running).
Use the Corsa demo node at <https://regtest.oncorsa.com:18334>. This is a full regtest node any developer can use.
Username:
rpcusername
Password:
rpcpassword
btc-dev-utils is a quick way to spin up a dev environment.
Install dependancies with
just install-deps
Build with Cargo
just build
Create a configuration file
settings.toml
in the btc-dev-utils project root:Run a local Bitcoin Regtest chain with
just start-bitcoind
Step 3: Run Corsa Node
Start your Corsa node using the following command:
Your node should now be running and connecting to the specified Bitcoin network. You can test the connection by getting the current block height.
Step 4: Interact with Corsa
You can interact with Corsa using web3.js or ethers.js libraries. Here's a quick example using ethers.js:
Next Steps
Now that you have Corsa up and running, you can:
Explore our API documentation to learn about all available Bitcoin precompiles. Deploy your own smart contracts that interact with Bitcoin functionality. Join our community forums to connect with other developers and get support.
Happy building with Corsa!
Last updated