SDK & Libraries
Official SDKs and libraries for integrating ReserveBTC protocol into your applications. Currently in development and planned for future release.
Planned SDKs
We are developing SDKs for popular programming languages to simplify integration with ReserveBTC protocol. All SDKs will provide the same core functionality with language-specific optimizations and conventions.
JavaScript/TypeScript
Planned NPM Package
Python
Planned PyPI Package
More Languages
Future Releases
JavaScript SDK (Planned)
Full-featured SDK for Node.js and browser environments with TypeScript support, wallet integrations, and comprehensive error handling. Currently in development.
Python SDK (Planned)
Python library with async/await support, data science integrations, and comprehensive documentation for backend applications. Planned for future release.
JavaScript SDK (Preview)
Installation (Coming Soon)
# Will be available soon
npm install @reservebtc/sdk
SDK is currently in development. For now, integrate directly with smart contracts using the ABI documentation.
Planned API (Preview)
import { ReserveBTC } from '@reservebtc/sdk'; // Initialize the SDK const reserveBTC = new ReserveBTC({ network: 'mainnet', // or 'testnet' provider: window.ethereum, // or your Web3 provider }); // Connect wallet await reserveBTC.connect(); // Mint synthetic tokens const result = await reserveBTC.mintSynth({ btcAddress: 'bc1q...', // Your Bitcoin address amount: '1000000', // Amount in satoshis signature: '...', // BIP-322 signature }); console.log('Minted:', result.transactionHash);
Advanced Usage
// Get user balances const synthBalance = await reserveBTC.getSynthBalance(); const wrappedBalance = await reserveBTC.getWrappedBalance(); // Listen to events reserveBTC.on('synthMinted', (event) => { console.log('Synth minted:', event); }); // Burn tokens await reserveBTC.burnSynth('500000'); // Burn 0.005 BTC worth // Get Bitcoin address verification const isValid = await reserveBTC.verifyBitcoinSignature({ address: 'bc1q...', signature: '...', message: 'verification message' });
Python SDK (Preview)
Installation (Coming Soon)
# Will be available soon
pip install reservebtc-sdk
Planned API (Preview)
from reservebtc import ReserveBTC import asyncio async def main(): # Initialize the SDK reservebtc = ReserveBTC( network='mainnet', private_key='your_private_key' # Or use wallet connection ) # Mint synthetic tokens result = await reservebtc.mint_synth( btc_address='bc1q...', amount=1000000, # Amount in satoshis signature='...' # BIP-322 signature ) print(f"Minted: {result['transaction_hash']}") # Run the example asyncio.run(main())
Data Analysis Integration
import pandas as pd from reservebtc import ReserveBTC # Get historical data reservebtc = ReserveBTC() events = await reservebtc.get_mint_events( from_block=1000000, to_block='latest' ) # Convert to DataFrame for analysis df = pd.DataFrame([{ 'timestamp': event['timestamp'], 'amount': event['amount'], 'user': event['user'] } for event in events]) # Analyze minting trends daily_volume = df.groupby(df['timestamp'].dt.date)['amount'].sum() print(daily_volume.describe())
SDK Features
Core Features
- ✓ Mint synthetic and wrapped tokens
- ✓ Burn tokens and reclaim backing
- ✓ Query balances and protocol state
- ✓ BIP-322 signature verification
- ✓ Event listening and filtering
- ✓ Transaction history tracking
Advanced Features
- ✓ Multi-wallet support
- ✓ Network switching (mainnet/testnet)
- ✓ Gas optimization utilities
- ✓ Error handling and retries
- ✓ TypeScript type definitions
- ✓ Comprehensive logging
Development Resources
Support & Community
Need help with the SDK? Our community and support team are here to help.