Skip to content
KYVROTestnet
Documentation menu

Quickstart with Anchor

Create, deploy and invoke your first program with Anchor.

TestnetVerified Oct 15, 2026
On this page

Prerequisites#

  1. Install Rust from the official guide(opens in a new tab), the Solana CLI from the Agave releases(opens in a new tab) (the network runs Agave v3.0.14 (unmodified)), and Anchor from the Anchor docs(opens in a new tab).
  2. Create a keypair used only for testing and fund its address from the faucet(opens in a new tab). solana airdrop does not work on Kyvro — requestAirdrop is disabled.
Terminal
solana-keygen new --outfile ~/.config/solana/kyvro-test.json   # test keypair, never reused elsewhere
solana address --keypair ~/.config/solana/kyvro-test.json        # paste this address into the faucet

Create a project#

Terminal
anchor init my-kyvro-app
cd my-kyvro-app

This creates a sample program in programs/my-kyvro-app/src/lib.rs with an initialize instruction.

Configure for Kyvro#

Point the provider at the Kyvro RPC and at your test wallet. Anchor reads the program ID from declare_id!() in the program and mirrors it in Anchor.toml — keep the two in sync with anchor keys sync.

Anchor.toml
[provider]
cluster = "https://rpc-testnet.kyvro.si"
wallet = "~/.config/solana/kyvro-test.json"
Terminal
anchor keys sync
anchor build

Deploy#

Terminal
anchor deploy --provider.cluster https://rpc-testnet.kyvro.si --provider.wallet ~/.config/solana/kyvro-test.json

The output includes the Program Id. Paste it into the explorer(opens in a new tab) search: the address page shows the program, its program-data account and its upgrade authority.

Interact#

Invoke the program from a script. The keypair path comes from the environment — it is never committed or pasted into code.

scripts/invoke.ts
import { readFileSync } from "node:fs";
import { AnchorProvider, Program, Wallet } from "@coral-xyz/anchor";
import { Connection, Keypair } from "@solana/web3.js";
import idl from "../target/idl/my_kyvro_app.json";

const keypairPath = process.env.KYVRO_KEYPAIR;
if (!keypairPath) throw new Error("KYVRO_KEYPAIR is not set");
const payer = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(readFileSync(keypairPath, "utf8"))));

const connection = new Connection("https://rpc-testnet.kyvro.si", "confirmed");
const provider = new AnchorProvider(connection, new Wallet(payer), { commitment: "confirmed" });
const program = new Program(idl, provider);

const tx = await program.methods.initialize().rpc();
console.log("signature", tx);

Look the signature up on the explorer(opens in a new tab) to see the instructions, logs and balance changes.

Repeatable deploys#

Because the Testnet can be reset, keep deploys in a script so you can redeploy everything with one command, and read program IDs from a manifest your scripts write — not from constants in app code.

Terminal
KYVRO_KEYPAIR=~/.config/solana/kyvro-test.json anchor deploy \
  --provider.cluster https://rpc-testnet.kyvro.si \
  --provider.wallet "$KYVRO_KEYPAIR"
Never commit a keypair file, even a Testnet one, and never reuse a Testnet key on another network. See Security practices.

Something wrong or missing on this page? Send developer feedback.