Kanari SDK
flowchart LR
%% Main Layers
subgraph Application["Application Layer"]
direction LR
WebExplorer["Web Explorer"]
CLI["CLI Tools"]
RPC["RPC API"]
end
subgraph Framework["Framework Layer"]
direction LR
KanariFramework["Kanari Framework"]
StandardLib["Standard Library"]
SystemFramework["System Framework"]
end
subgraph Core["Core Layer"]
direction LR
subgraph Blockchain
K2Core["K2 Core"]
Transaction
State
end
subgraph Runtime
MoveVM["Move VM"]
MoveCompiler["Move Compiler"]
end
subgraph Consensus
PoW["Proof of Work"]
PoS["Proof of Stake"]
end
end
subgraph Network["Network Layer"]
direction LR
P2P["P2P Network"]
RPCNetwork["RPC Network"]
end
subgraph Storage["Storage Layer"]
direction LR
WalletMgmt["Wallet Management"]
FileStorage["File Storage"]
StateDB["State Database"]
end
%% Relationships
Application --> Framework
Framework --> Core
Core --> Network
Core --> Storage
%% Styling
classDef default fill:#ffffff,stroke:#333,stroke-width:2px,color:#333
classDef layer fill:#e3f2fd,stroke:#1976d2,stroke-width:3px,color:#0d47a1
classDef critical fill:#fff8e1,stroke:#ffa000,stroke-width:3px,color:#ff6f00
classDef storage fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#1b5e20
classDef network fill:#fce4ec,stroke:#c2185b,stroke-width:2px,color:#880e4f
class Application,Framework,Core,Network,Storage layer
- Ensure you have Ubuntu or a similar Linux distribution.
- Install necessary dependencies like
build-essential
,curl
,clang
,gcc
,libssl-dev
,llvm
,make
,pkg-config
,tmux
,xz-utils
,ufw
using the providedbuild_ubuntu.sh
script.
- Rust is required for building and running the Kari chain. Use the command provided in the
build_ubuntu.sh
script to install Rust and its package manager, Cargo.
- Obtain the source code for Kari chain. This might involve cloning a Git repository or downloading source code from a specific location.
- Navigate to the project directory.
- Run
cargo build --release
to compile the project. This command compiles the project in release mode, optimizing the binary for performance.
- After building, you can start a Kari chain node using
cargo run --release
. This command runs the compiled project. - Depending on the project's specifics, you might need to add additional flags or configuration files to successfully start a node.
- Use the provided tools and documentation to interact with the Kari chain. This could involve sending transactions, mining blocks, or querying the blockchain state.
- Regularly update your local repository with the latest changes from the main Kari chain source.
- Rebuild the project as needed to ensure you're running the latest version.
# Update and install dependencies
./build_ubuntu.sh
# Clone the Kari chain repo
git clone https://github.com/kanari-network/kanari-sdk.git
cd kanari-network
# Initialize and update submodules
git submodule init
git submodule update --init --recursive
# Build the project
cargo build --release
# Generate wallet
cargo run --release --bin kari keytool generate
# Configure and start node
# Interactive prompts will ask for:
# 1. Node type (enter 1 for validator)
# 2. RPC port (default: 3031)
# 3. Network domain (default: devnet.kari.network)
cargo run --release --bin kari start
# Start Kari node
# Windows
cargo run --release --bin kari start
# Linux/MacOS
cargo run --release --bin kari start
- Install Visual Studio Build Tools
- Install Rust
- Install MinGW via chocolatey:
choco install mingw
cargo install --locked --git https://github.com/kanari-network/kanari-sdk.git --branch main kari