This install workflow will change frequently until v1.0.0. Check back for updates when upgrading between versions.
Prerequisites
- Rust toolchain: Install from rustup.rs
- Buf CLI (for building gRPC clients): Install from buf.build/docs/cli/installation
Download the C SDK
Download the C SDK from GitHub:Download Latest Release
Get the latest Thru Program SDK for C
thru-program-sdk-c-{version}.tar.gz(or.zip) - C SDK for writing programs
Setup
1
Install the CLI
Install the Thru CLI using cargo:Verify the install:
2
Make an initial call (expected to fail)
Try a simple command:
This will likely fail on first run. By default, the CLI uses
http://localhost:8080/api. The failure confirms the CLI is installed and you now need to configure the RPC endpoint.3
Configure RPC endpoint
Edit your CLI configuration file at
~/.thru/cli/config.yamlSet the base URL:4
Verify with getversion
Run again:
If you can see the
thru-node version your CLI can reach the alphanet endpoint.5
Generate a keypair
Generate a keypair to use for your account:For example, to create a keypair named
default:This keypair will be stored locally and used to sign transactions. If you don’t specify a name, it defaults to
default.This command generates a private key. Never share your private key with anyone. It’s stored securely in
~/.thru/cli/config.yaml.6
Create your first account
Create an account on-chain using your keypair:For example, to create an account named You’ll see output similar to this:
default: