Skip to content

Solizardking/clawd-bot / agent/skills/testing

testing

Verified

For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.

FileKindSize
SKILL.mdskill md3.1 KB
references/accounts.mdmarkdown1.5 KB
references/addresses.mdmarkdown1.4 KB
references/devnet.mdmarkdown1.7 KB
references/local.mdmarkdown2.5 KB

references/devnet.md

View on GitHub
# Devnet testing

## Quick start

```typescript
import { createRpc } from "@lightprotocol/stateless.js";

const connection = createRpc(
  "https://devnet.helius-rpc.com?api-key=<api_key>",
  "https://devnet.helius-rpc.com?api-key=<api_key>",
  "https://devnet.helius-rpc.com?api-key=<api_key>"
);
```

## Endpoints

| Service   | URL                                              |
|-----------|--------------------------------------------------|
| RPC       | `https://devnet.helius-rpc.com?api-key=<api_key>` |
| WebSocket | `wss://devnet.helius-rpc.com?api-key=<api_key>`   |
| Indexer   | `https://devnet.helius-rpc.com?api-key=<api_key>` |
| Prover    | `https://prover.helius.dev`                       |

## Client setup

```typescript
import { Rpc, createRpc } from "@lightprotocol/stateless.js";

const HELIUS_API_KEY = process.env.HELIUS_API_KEY;

const RPC_ENDPOINT = `https://devnet.helius-rpc.com?api-key=${HELIUS_API_KEY}`;
const COMPRESSION_ENDPOINT = RPC_ENDPOINT;
const PROVER_ENDPOINT = "https://prover.helius.dev";

const connection: Rpc = createRpc(RPC_ENDPOINT, COMPRESSION_ENDPOINT, PROVER_ENDPOINT);

// Fetch state trees at runtime
const { stateTrees } = await connection.getCachedActiveStateTreeInfo();
const outputStateTree = stateTrees[0].tree;
```

## Key considerations

- **Helius or Triton required**: The photon indexer implementation is maintained by Helius. You can also use Triton. Currently these RPC's provide compression endpoints.
- **Runtime tree fetch**: Always fetch active state trees at runtime via `getCachedActiveStateTreeInfo()`
- **Same programs**: Program addresses are identical on devnet and mainnet
- **Devnet-specific trees**: State tree lookup tables differ from mainnet
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall