π An AI agent that uses NEAR chain signatures to interact with Bitcoin L1 | Powered by Bitte.ai
- π Project History
- β¨ Features
- ποΈ Architecture
- π Quick Start
- π§ Setup
- π Usage
- π οΈ Agent Tools
- π Links
- π€ Contributing
- π License
The Bitcoin Bitte Agent was initially developed during the One Trillion Agents Hackathon to enable Bitcoin testnet transactions using NEAR accounts. It allowed users to retrieve their NEAR account, corresponding BTC Testnet address, and balance, and seamlessly create and send Bitcoin transactions.
In v2.0, we are adding trading capabilities in this agent that will allow users to buy, sell and swap any assets on any chain to BTC and vice versa.
"Bitcoin Agent", an agent that uses NEAR chain signatures to interact with Bitcoin L1. Now, you can send transactions on the Bitcoin mainnet using just your NEAR account. The agentβs tools are highly composable and can be integrated with other agents to create MPC transactions and broadcast them on the Bitcoin mainnet.
- Native Bitcoin L1 transactions using NEAR accounts
- No bridges or wrapped tokens required
- Powered by NEAR chain signatures and MPC technology
- Direct settlement on Bitcoin mainnet
- View your Bitcoin address linked to your NEAR account
- Check wallet balances and transaction history
- Monitor agent status in real-time
- Access at bitcoin-agent.xyz/dashboard
- Swap any supported asset to BTC using NEAR Intents
- Chain-abstracted liquidity access
- Seamless deposit, swap, and withdrawal flow
- Support for multiple blockchain assets
The Bitcoin Agent leverages NEAR's chain signatures technology to enable Bitcoin transactions through MPC (Multi-Party Computation). The system integrates with NEAR Intents for cross-chain liquidity and the Bitte.ai runtime for AI agent functionality.
- Node.js 18+ and pnpm
- A NEAR account
- Basic understanding of Bitcoin and blockchain concepts
# Clone the repository
git clone https://github.com/0xAlphaDevs/Near-Bitcoin-Agent.git
cd Near-Bitcoin-Agent
# Install dependencies
pnpm install
# Setup environment
cp .env.example .env
# Fill in your environment variables
# Start development server
pnpm dev
Visit http://localhost:3001
to access the agent interface.
Create a .env
file with the following variables:
ACCOUNT_ID=your-near-account.near
BITTE_API_KEY=
# Add other required environment variables as specified in .env.example
# Development mode
pnpm dev
# Build for production
pnpm build
# Deploy agent
pnpm build:deploy
- Connect your NEAR account to the Bitcoin Agent
- View your Bitcoin address generated through MPC
- Check your BTC balance
- Create Bitcoin transactions using your NEAR account
- Swap assets to BTC from any asset supported on NEAR
// The agent handles the complex MPC signing process
// You just need to specify the recipient and amount
{
"btcReceiver": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"btcAmountInSatoshi": "100000"
}
The Bitcoin Agent provides several powerful tools built using the Bitte.ai Agent SDK:
Tool | Description | Purpose |
---|---|---|
get-user |
Retrieve NEAR wallet context | Get user's NEAR account and BTC address |
get-btc-balance |
Fetch Bitcoin balance | Check current BTC holdings |
create-btc-mpc-txn |
Generate Bitcoin transaction | Create MPC-signed Bitcoin transactions |
send-btc-txn |
Broadcast transaction | Send signed transaction to Bitcoin mainnet |
check-supported-token |
Verify asset support | Check if asset can be swapped to BTC |
intents |
Execute cross-chain swap | Swap assets to BTC via NEAR Intents |
All tools are registered in the AI plugin manifest at /api/ai-plugin
.
- π Website: bitcoin-agent.xyz
- π€ Live Agent: bitte.ai/agents/bitcoin-agent.xyz
- π Dashboard: bitcoin-agent.xyz/dashboard
- π Presentation: View Slides
- πΊοΈ Roadmap: View Roadmap
We welcome contributions from the community! Here's how you can help:
- π Report bugs by opening an issue
- π‘ Suggest features for future development
- π§ Submit pull requests with improvements
- π Improve documentation and examples
- π§ͺ Add tests to increase coverage
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes and test thoroughly
- Commit with clear messages (
git commit -m 'Add amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please read our Contributing Guidelines and Code of Conduct before contributing.
This project is licensed under the MIT License - see the LICENSE file for details.