Skip to content

kanari-network/kanari-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

911 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Kanari

Kanari is a real-time transaction network designed for in-game payments and asset systems.

It allows developers to build instant game economy features โ€” such as UID top-ups, item purchases, and asset transfers โ€” with sub-second finality and no gas fees.


What can you build with Kanari?

  • ๐ŸŽฎ In-game payment system (UID top-up)
  • ๐Ÿ’ฐ Instant item purchases
  • ๐Ÿ” Real-time asset transfers
  • ๐Ÿ“Š Game economy backend

Why Kanari?

Traditional systems:

  • โŒ Slow settlement (seconds or batch processing)
  • โŒ Complex backend logic
  • โŒ No verifiable state

Kanari:

  • โšก Instant execution (~10 ms)
  • ๐Ÿ”’ Secure finality (~300 ms)
  • ๐Ÿ’ธ No gas fees (user-friendly UX)
  • ๐Ÿงฉ Simple integration

How it works

  1. Transaction is submitted
  2. Executed instantly by a small node set (~10 ms)
  3. Propagated across the network (DAG)
  4. Finalized by Byzantine quorum (~300 ms)

Result:

  • Instant user experience
  • Strong consistency and correctness

Example: In-game payment

  1. Player enters UID
  2. Payment is submitted
  3. Balance updates instantly
  4. Transaction is finalized within ~300 ms

No waiting. No gas fees.


Developer Quick Start

Prerequisites

  • Rust and Cargo (stable channel recommended)
  • Clang, LLVM, CMake (for RocksDB)
  • Libssl-dev, pkg-config

Build CLI

cargo build -p kanari

Run CLI

# List wallets (first run will bootstrap genesis)
cargo run -p kanari -- keytool list

Move commands

# Create new Move package
cargo run -p kanari -- move new my_token

# Test Move package
cargo run -p kanari -- move test ./my_token

Note: On first run, the CLI performs a Rust-side genesis that mints initial supply. To reset state, remove ~/.kanari/kanari-db/ and rerun.


Testing

# Run all tests
cargo test

# Run specific crate tests
cargo test -p kanari-types

Project Structure

  • crates/kanari โ€” CLI binary and bootstrap logic
  • crates/kanari-types โ€” domain types (accounts, balances, TransferRecord)
  • crates/kanari-move-runtime โ€” Move VM integration (execution, validation, persistence)
  • crates/kanari-crypto โ€” key management, signing, crypto utilities
  • crates/kanari-frameworks/packages/kanari-system โ€” Move packages (on-chain modules)
  • crates/kanari-core โ€” blockchain engine and DAG consensus
  • crates/centauri โ€” consensus implementation
  • third_party/move โ€” bundled Move toolchain (path dependencies)

Local State

  • RocksDB path: ~/.kari/kanari-db/move_vm_db
  • State storage: Serialized MoveVMState under key "state"
  • Reset state: Delete the DB directory and restart

Architecture (Advanced)

Kanari uses a distributed execution model with:

  • Event-driven execution (no block dependency)
  • DAG-based propagation (Narwhal & Bullshark)
  • Byzantine quorum consensus (2f+1 finality)
  • Parallel transaction processing
  • Sparse Merkle Tree state verification

Transactions are executed instantly and finalized asynchronously through DAG consensus.

For detailed architecture documentation:


Key Files for Development

  • crates/kanari/src/main.rs โ€” CLI entry point and bootstrap
  • crates/kanari-move-runtime/src/move_runtime.rs โ€” Move VM integration
  • crates/kanari-types/src/transfer.rs โ€” TransferRecord validation
  • crates/kanari-frameworks/packages/kanari-system โ€” Move modules

Documentation


Vision

Kanari is built for real-time interactive systems like games, where speed, usability, and reliability are critical.

It bridges the gap between traditional game backend systems and verifiable distributed infrastructure.


Contributing

See CONTRIBUTING.md for guidelines.

License

Copyright (c) KanariNetwork, Inc.
SPDX-License-Identifier: Apache-2.0


Need help?

About

Kanari Network: A High-Performance Event-Driven Ledger for Web5 Infrastructure. Powered by MoveVM and Post-Quantum Cryptography (PQC), providing a sub-0.1s secure data plane for Web2 integration and verifiable resource management.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors