| Crates.io | kaccy |
| lib.rs | kaccy |
| version | 0.1.0 |
| created_at | 2026-01-18 23:03:32.761369+00 |
| updated_at | 2026-01-18 23:03:32.761369+00 |
| description | Kaccy Protocol - Complete platform for fractional Bitcoin transactions (meta crate) |
| homepage | https://github.com/cool-japan/kaccy |
| repository | https://github.com/cool-japan/kaccy |
| max_upload_size | |
| id | 2053272 |
| size | 173,133 |
Meta-crate for the Kaccy Protocol - Complete platform for fractional Bitcoin transactions.
This is a convenience meta-crate that re-exports all Kaccy sub-crates, allowing you to use the entire Kaccy ecosystem through a single dependency.
Add this to your Cargo.toml:
[dependencies]
kaccy = "0.1.0"
The easiest way to get started:
use kaccy::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// All common types are available
let pool = create_pool(&std::env::var("DATABASE_URL")?).await?;
let user_repo = UserRepository::new(pool.clone());
Ok(())
}
Access specific crate functionality:
use kaccy::kaccy_core::pricing::LinearBondingCurve;
use kaccy::kaccy_bitcoin::BitcoinClient;
use kaccy::kaccy_reputation::ReputationEngine;
use kaccy::kaccy_ai::AiEvaluator;
This meta-crate includes all Kaccy components:
If you only need specific components, you can install them individually:
[dependencies]
kaccy-core = "0.1.0"
kaccy-db = "0.1.0"
kaccy-bitcoin = "0.1.0"
kaccy-reputation = "0.1.0"
kaccy-ai = "0.1.0"
kaccy-api = "0.1.0"
Individual crate documentation:
use kaccy::prelude::*;
use rust_decimal_macros::dec;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Setup database
let pool = create_pool(&std::env::var("DATABASE_URL")?).await?;
// Create repositories
let user_repo = UserRepository::new(pool.clone());
let token_repo = TokenRepository::new(pool.clone());
// Initialize Bitcoin client
let bitcoin_client = kaccy::kaccy_bitcoin::BitcoinClient::new(
"http://localhost:8332",
"rpcuser",
"rpcpassword",
)?;
// Create HD wallet for address generation
let wallet = kaccy::kaccy_bitcoin::HdWallet::new(
&std::env::var("WALLET_XPUB")?
)?;
// Initialize reputation engine
let reputation = kaccy::kaccy_reputation::ReputationEngine::new(pool.clone());
// Use bonding curve for pricing
let curve = LinearBondingCurve::new(
dec!(0.0001), // Initial price
dec!(0.00001), // Increment
);
let cost = curve.buy_price(dec!(0), dec!(10));
println!("Cost for 10 tokens: {} BTC", cost);
Ok(())
}
All features from sub-crates are available:
# Database
DATABASE_URL=postgresql://user:password@localhost/kaccy
# Bitcoin
BITCOIN_RPC_URL=http://localhost:8332
BITCOIN_RPC_USER=rpcuser
BITCOIN_RPC_PASSWORD=rpcpassword
WALLET_XPUB=xpub...
# API
JWT_SECRET=your-secret-key
PORT=8080
# AI Services (optional)
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
Proprietary - All rights reserved