bitproof-sdk
v0.1.2
Published
Verify BTC ownership on Starknet without bridging
Maintainers
Readme
bitproof-sdk
Native Bitcoin Proof-of-Reserves for Starknet.
BitProof is a natively integrated Starknet primitive that lets any DeFi protocol verify a user holds Bitcoin on the mainnet. No bridges. No wrapping. Zero custodian risk.
📦 Installation
npm install bitproof-sdk🚀 Quick Start
const { BTCProofSDK } = require('bitproof-sdk');
// Initialize with the BitProof Oracle address (Sepolia Testnet)
const ORACLE_ADDR = '0x07f5fc810bede069f3316f8b034e5ba7874fdacc9d40944fc167d245ab5d890a';
const sdk = new BTCProofSDK(ORACLE_ADDR);
async function checkUser(address) {
const minBTC = 0.1;
const isVerified = await sdk.verify(address, minBTC);
if (isVerified) {
console.log("User is a verified BTC whale! 🐋");
}
}📖 API Reference
sdk.verify(starknetAddress, minBTC)
Performs a quick on-chain check. Returns true if the user has a valid credential holding at least minBTC.
sdk.verifyWithDetails(starknetAddress, minBTC)
Returns a detailed result object:
{
"approved": true,
"verifiedBTC": 1.5,
"issuedAt": 1708892400,
"isValid": true
}sdk.isCredentialFresh(starknetAddress, maxAgeSeconds)
Checks if the proof was updated within a specific window (default: 24 hours). Useful for protocols that require frequent re-verification.
sdk.getCredential(starknetAddress)
Raw access to the BTCCredential struct from the Starknet contract.
🏗️ Builder Use Cases
- Undercollateralized Loans: Give users a credit line based on their proven BTC holdings.
- Yield Farming Gating: Open premium vaults only to verified Bitcoiners.
- DAO Governance: Grant voting power proportional to proven off-chain BTC wealth.
- NFT Whitelisting: Automatic whitelist for any wallet proving >0.1 BTC ownership.
🛠️ Development
BitProof utilizes Starknet's native verify_eth_signature precompile to verify Bitcoin ECDSA signatures (secp256k1) directly on-chain. This makes verification extremely cheap (~$0.01) and fully trustless.
📜 License
MIT - Developed for the Starknet Re{define} Hackathon 2026.
