1.0.4 • Published 6 months ago
@surgebuild/bitcoin-zkp-sdk v1.0.4
@surgebuild/bitcoin-zkp-sdk
A TypeScript library for submitting and verifying Zero-Knowledge Proofs (ZKP) on Bitcoin through the Surge network.
Features
- Submit ZK proofs to the Surge blockchain
- Verify proof transactions
- Built-in support for file handling and binary data encoding
- Cosmos SDK compatible
- TypeScript support with full type definitions
Installation
npm install @surgebuild/bitcoin-zkp-sdk
Usage
Initialize the Client
import { SurgeClient } from '@surgebuild/bitcoin-zkp-sdk';
// Initialize with default options
const client = new SurgeClient();
// Initialize with private key
await client.init("your_private_key");
Submit a Proof
await client.submitProof(
"creator_address",
"method_id_file_path",
"proof_file_path",
"proof_system",
"public_input_file_path"
);
Verify a Transaction settlement on Bitcoin
const result = await client.verifyTransaction("transaction_hash");
Configuration
Default configuration:
- RPC URL: https://alphatestnet.surge.dev/
- Chain ID: surge-alphatestnet-1
- Gas Price: 0.025usurg
Dependencies
- @cosmjs/cosmwasm-stargate
- @cosmjs/proto-signing
- @cosmjs/stargate
- cosmjs-types
- buffer
Development
# Build the project
npm run build
# Watch mode during development
npm run dev
License
MIT