# HardKAS — Developer Framework & Transaction Simulator for Kaspa L1 > HardKAS is an open-source, local-first development framework, transaction simulator, and visual IDE for Kaspa L1. > Inspired by the ergonomics of Ethereum tools (Hardhat, Foundry), built from first principles for Kaspa's UTXO BlockDAG. ## Core Truth & Boundaries - Kaspa L1 is a Proof-of-Work UTXO BlockDAG running Kaspa Script (NOT an EVM, no Solidity on L1). - Versions: repository development tree is `0.13.0-rc.3` (may be ahead of npm `latest`; check `npm view @hardkas/cli dist-tags`). - Managed Docker simnet (`--profile toccata-v2`) runs `rusty-kaspad` `v2.1.0` (container `hardkas-kaspad-toccata-v2`, JSON wRPC `ws://127.0.0.1:18210`). - Mainnet is blocked by policy (no reads, signing, or broadcast). - `simulated` and local `silver test` (`SCRIPT_VM`) are NOT independent consensus proof; use `simnet` for real-node verification. - Prefer HardKAS CLI/SDK over custom `kaspa-wasm` scripts for payments, keystores, SilverScript, and artifact verification. ## Token-Saving Reading Rule for Agents - For a standard KAS payment on `simnet`, use the **Fast Path** below directly — do **not** read `llms-full.txt` (23 KB) and do **not** run `doctor`/`silver doctor` first. - Only read a specific recipe anchor or `https://hardkas.dev/llms-full.txt` when you need SilverScript, Toccata covenants, artifact verification, or error codes: - Send KAS: https://hardkas.dev/docs/ai/workflows#1-send-kas-on-simnet-and-confirm-the-transaction - SilverScript P2SH: https://hardkas.dev/docs/ai/workflows#2-compile-and-execute-silverscript-p2sh-workflows - Covenants (valid & invalid): https://hardkas.dev/docs/ai/workflows#3-perform-valid-and-invalid-covenant-transitions-against-a-real-node - Verify receipts: https://hardkas.dev/docs/ai/workflows#4-verify-transaction-receipts-and-execution-artifacts - Diagnose node/UTXOs: https://hardkas.dev/docs/ai/workflows#5-diagnose-node-rpc-account-and-utxo-problems - CLI vs SDK: https://hardkas.dev/docs/ai/workflows#6-select-the-appropriate-hardkas-cli-or-sdk-workflow - Full AI Reference (all above combined): https://hardkas.dev/llms-full.txt ## Fast Path: Send KAS on Simnet (2 commands, no config file needed) - Omit `--url` if using the default HardKAS localnet (`ws://127.0.0.1:18210`). `--wait` waits until `CONFIRMED` on the same node (default `--wait-timeout 60`; on timeout it exits `1` with `code: TX_SEND_WAIT_FAILED` and `outcome: submitted`). ```bash export HARDKAS_PASSWORD='choose-a-simnet-password' hardkas accounts real import --name payer --address --network simnet --private-key-env PK --password-env HARDKAS_PASSWORD && \ hardkas tx send --from payer --to --amount 10 --network simnet --url ws://:18210 --password-env HARDKAS_PASSWORD --yes --wait --json ``` ## Canonical Web Endpoints - Homepage: https://hardkas.dev/ - HardKAS IDE: https://hardkas.dev/ide/ - Documentation Base: https://hardkas.dev/docs/ - Build on Kaspa with AI: https://hardkas.dev/docs/ai/ - Canonical AI Workflows (6 tasks): https://hardkas.dev/docs/ai/workflows - AI Troubleshooting & Error Codes: https://hardkas.dev/docs/ai/troubleshooting - Claude Code & Cursor Guide: https://hardkas.dev/docs/ai/claude-code-and-cursor - 5-Minute Quickstart: https://hardkas.dev/docs/getting-started/quickstart - CLI Command Reference: https://hardkas.dev/docs/reference/cli - SDK Core Reference: https://hardkas.dev/docs/reference/sdk/core/ ## First Checks (for SilverScript, Covenants, or Debugging) ```bash hardkas doctor --json hardkas silver doctor --network simnet --json ``` --- # Build on Kaspa with AI HardKAS is a local-first development framework, transaction planner/signer, SilverScript toolchain wrapper, and artifact verifier for **Kaspa L1**. > [!IMPORTANT] > **Kaspa L1 is a Proof-of-Work UTXO BlockDAG, NOT an EVM.** > - Do not write Solidity or EVM RPC scripts for Kaspa L1. > - Do not write custom `kaspa-wasm` payment/signing scripts when a HardKAS CLI command or SDK method already implements the operation. > - Do not treat `simulated` ledger runs or local `silver test` (`SCRIPT_VM`) runs as real node consensus proof. ## Versions & Pinned Toolchain - **Repository development version:** `0.13.0-rc.3` (may be ahead of npm `latest`; check `npm view @hardkas/cli dist-tags` and use `npx @hardkas/cli@latest` when installing from npm outside the monorepo) - **Localnet node (`--profile toccata-v2`):** `rusty-kaspad` `v2.1.0` (container `hardkas-kaspad-toccata-v2`, JSON wRPC port `18210`; custom Docker setups may publish another port such as `26510`) - **SilverScript compiler:** `silverc` `v1.0.0` (installed via `hardkas toolchain install silverc`) - **Node.js requirement:** `24.22.1` ## What HardKAS Does (and Does Not Do) | Area | Status in this release | Notes for agents | | :--- | :--- | :--- | | Payments (`tx plan`, `tx sign`, `tx send`, `tx wait`, `tx status`) | Verified on `simnet` | Uses upstream `kaspa-wasm` Generator; supports Schnorr & ECDSA, CLTV (`--lock-time-daa` / `--lock-time-ms`), and multi-recipient batches. | | SilverScript P2SH (`silver compile`, `verify`, `deploy`, `spend`) | Verified on `simnet` | Compiles `.sil` with pinned `silverc v1.0.0`, deploys and spends v0 P2SH contracts. | | Toccata 1:1 Covenants (`silver covenant genesis`, `transition`, `inspect`) | Verified on `simnet` | Real v1 transactions on `rusty-kaspad v2.1.0` with `covenant_id` lineage checks. | | Artifact & Receipt Verification (`artifact inspect`, `artifact verify`, `tx receipt`) | Verified | Integrity check works offline on all networks; network & consensus checks query a real node of the artifact's network. | | `silver covenant start\|advance` (1:N, N:M), `kcc20`, `silver test --on-node`, `zk toccata spend`, `testnet-10` | **Experimental** | Explicitly opt-in or experimental; do not present them as stable. | | `silver test`, `silver debug`, `silver preflight` (local runner) | **Unverified (`SCRIPT_VM`)** | Requires `--allow-unverified-runner` with a local build; **never** independent consensus proof. Use `--on-node` or real node spends for consensus checks. | | `mainnet` (reads, signing, broadcast) | **Blocked by policy** | Refused before any network connection (`MAINNET_CONNECTION_DISABLED`, `MAINNET_SIGNING_DISABLED`, `MAINNET_BROADCAST_DISABLED`). | | `vProgs`, trustless bridges, `@hardkas/l2`, `@hardkas/pskt-native` | **Not supported / Not published** | Only offline artifact inspection for vProgs; do not invent bridge or L2 commands. | ## Environment Matrix | Environment | `network` flag | Node required | Consensus proof? | Typical use | | :--- | :--- | :--- | :--- | :--- | | In-memory ledger | `simulated` | No | **No** (synthetic UTXOs, no script VM) | Fast local loop, `replay verify` | | Managed or custom simnet | `simnet` | Yes (`rusty-kaspad 2.1.0`) | **Yes** (local node consensus) | Payments, SilverScript P2SH, Toccata v1 covenants | | Public Testnet-10 | `testnet-10` | Yes (opt-in) | Yes (experimental) | Public test funds only (`experimental: true`, `allowPublic: true`) | | Mainnet | `mainnet` | Refused | Offline `artifact verify` only | Blocked for RPC, signing, and broadcast | ## First Checks Before Running Tasks Run these machine-readable checks first so you never assume unavailable features: ```bash hardkas doctor --json hardkas silver doctor --network simnet --json ``` In TypeScript SDK code, call `sdk.capabilities.get()` before invoking optional or experimental namespaces. ## Canonical Entry Points - **Step-by-step agent recipes (6 core tasks):** [Canonical Workflows](./workflows.md) - **Error codes & recovery:** [AI Troubleshooting](./troubleshooting.md) - **Agent setup for Claude Code & Cursor:** [Claude Code & Cursor Guide](./claude-code-and-cursor.md) - **Machine-readable maps:** [`/llms.txt`](https://hardkas.dev/llms.txt) (short navigation map) and [`/llms-full.txt`](https://hardkas.dev/llms-full.txt) (complete AI reference) - **Full human guide for simnet:** `docs/start/build-on-simnet.md` in the repository - **Video tutorials:** [KasLabDevs on YouTube](https://www.youtube.com/@kaslabdevs) --- # Canonical AI Workflows All commands below are checked against the Commander CLI inventory (`apps/docs/docs-data/cli-command-inventory.json`) and repository simnet guides (`docs/start/build-on-simnet.md`, `docs/start/silverscript-covenants.md`, `docs/start/receipts-and-levels.md`). > Replace `hardkas` with `npx hardkas` inside a project where `@hardkas/cli` is installed, or `pnpm hardkas` inside the HardKAS monorepo. --- ## 1. Send KAS on `simnet` and Confirm the Transaction - **Goal:** Send a real KAS payment on `simnet` and confirm inclusion via an independent node query. - **Supported environments:** `simnet` (verified), `simulated` (synthetic only), `testnet-10` (experimental opt-in). Mainnet is blocked. - **Prerequisites:** - Running `rusty-kaspad` `v2.1.0` simnet node (e.g. `hardkas localnet start --profile toccata-v2` on `ws://127.0.0.1:18210`, or your own node configured in `hardkas.config.ts`). - Funded sender account on `simnet` with mature UTXOs (coinbase outputs require 1,000 DAA maturity on simnet) and `HARDKAS_PASSWORD` set in the environment. ### Option A: Fast 2-step send (when plan review is not needed) - Omit `--url` if using the default HardKAS localnet (`ws://127.0.0.1:18210`). No `hardkas.config.mjs` is needed: `tx send --wait` submits and waits until `CONFIRMED` on the same `--url` node (default `--wait-timeout 60`; if confirmation times out, it exits `1` with `code: TX_SEND_WAIT_FAILED` and `outcome: submitted`). ```bash export HARDKAS_PASSWORD='choose-a-simnet-password' hardkas accounts real import --name payer --address --network simnet --private-key-env PK --password-env HARDKAS_PASSWORD hardkas tx send --from payer --to --amount 10 --network simnet --url ws://:18210 --password-env HARDKAS_PASSWORD --yes --wait --json ``` ### Option B: Audited 4-step lifecycle (`plan → verify → sign → send --wait`) ```bash hardkas tx plan --network simnet --url ws://:18210 --from miner --to alice --amount 100 --out plan.json hardkas artifact verify plan.json hardkas tx sign plan.json --account miner --password-env HARDKAS_PASSWORD --out signed.json hardkas tx send signed.json --network simnet --url ws://:18210 --yes --wait --json # Or wait separately: hardkas tx wait --until confirmed --network simnet --url ws://:18210 --json ``` - **Expected output:** `tx send` emits a `hardkas.txSubmission.v1` record under `.hardkas/artifacts/receipts/` and prints `txId`. `tx wait --until confirmed` polls until the accepting chain block reaches 100 blue-score confirmations (HardKAS default policy) and the node's UTXO view reflects the outputs. - **Avoid:** Writing a custom `kaspa-wasm` script to build/sign/send standard payments. - **Known limitations:** `replay verify` does **not** work on `simnet` (`REPLAY_MODE_UNSUPPORTED`); use `tx status` and `artifact verify` instead. --- ## 2. Compile and Execute SilverScript P2SH Workflows - **Goal:** Compile a `.sil` contract with the pinned `silverc` compiler, verify reproducibility, deploy a P2SH output on `simnet`, and spend it. - **Supported environments:** `simnet` (verified), `testnet-10` (experimental). Mainnet is refused (`SILVERSCRIPT_MAINNET_NOT_ENABLED`). - **Prerequisites:** - `hardkas toolchain install silverc` (installs `silverc v1.0.0` with SHA-256 verification). - `hardkas silver doctor --network simnet` reports `silver.compile.v1` and `silver.p2sh.deploy-spend.v1` as `ready`. - Constructor bytes arguments must use `{ "kind": "bytes", "value": [/* 32-byte x-only pubkey bytes */] }` (raw hex strings are rejected with `SILVER_VALUE_INVALID`). ### Commands ```bash # 1. Compile and verify deterministic reproduction hardkas silver compile contracts/signed-release.sil --args contracts/owner.args.json --network simnet --out contracts/signed-release.compile.json hardkas silver verify contracts/signed-release.compile.json --args contracts/owner.args.json # 2. Deploy P2SH output on simnet (v0 by default; --wait confirms UTXO creation) hardkas silver deploy contracts/signed-release.compile.json --from alice --amount 1 --network simnet --password-env HARDKAS_PASSWORD --wait # 3. Spend entry using signature arg: [{"kind":"signature","account":"alice"}] hardkas silver spend .hardkas/artifacts/silver/silverDeploy-.json --entry release --to --args contracts/release.args.json --network simnet --password-env HARDKAS_PASSWORD --wait ``` - **Verification:** `silver verify` prints `REPRODUCED with silverc v1.0.0`. `silver deploy` and `silver spend` write `.hardkas/artifacts/silver/silverDeploy-*.json` and `silverSpend-*.json`; verify consensus depth with `hardkas artifact verify --network simnet --require consensus`. - **Important distinction (`silver test` vs node validation):** - `hardkas silver test` runs the local `cli-debugger` runner (`SCRIPT_VM`, labelled `UNVERIFIED`, requires `--allow-unverified-runner`). **It is NOT independent consensus proof.** - `hardkas silver test --on-node --network simnet` (experimental) executes reproducible cases as real node transactions and records node verdicts. --- ## 3. Perform Valid and Invalid Covenant Transitions Against a Real Node - **Goal:** Create a Toccata 1:1 auth-bound covenant (`v1` transaction) on `simnet`, advance it with a valid state transition, and verify that an invalid transition is rejected by `rusty-kaspad` consensus. - **Supported environments:** `simnet` (verified for 1:1 auth-bound transitions). 1:N / N:M / termination (`silver covenant start|advance`) are **experimental**. - **Prerequisites:** Compiled `.sil` covenant artifact (e.g. `Counter` with `#[covenant(binding = auth, from = 1, to = 1, mode = transition)]`), funded account `alice`, running `rusty-kaspad 2.1.0` simnet node with miner active. ### Step A — Genesis & Valid Transition ```bash # 1. Compile covenant with initial constructor args (e.g. [{"kind":"int","value":7}]) hardkas silver compile contracts/counter.sil --args contracts/counter.args.json --network simnet --out contracts/counter.compile.json # 2. Genesis (v1 transaction; explicit compute-budget and fee are required) hardkas silver covenant genesis contracts/counter.compile.json --from alice --amount 10 --compute-budget 10 --fee 1000000 --network simnet --password-env HARDKAS_PASSWORD --wait # 3. Valid transition (e.g. bump delta = 5 -> next state value = 12) hardkas silver covenant transition .hardkas/artifacts/silver/silverCovenant-.json \ --policy bump \ --constructor-args contracts/counter.args.json \ --state-map contracts/counter.state-map.json \ --next-state contracts/counter.next-state.json \ --args contracts/bump.args.json \ --compute-budget 0 \ --emit-args contracts/counter.next-args.json \ --network simnet \ --password-env HARDKAS_PASSWORD \ --wait ``` ### Step B — Invalid Transition (Negative Node Consensus Test) `hardkas silver covenant transition` checks locally that the template did not change (`SILVER_SUCCESSOR_TEMPLATE_CHANGED`) and that the compiled successor state differs from the current state (`SILVER_SUCCESSOR_STATE_UNCHANGED` — so keeping `next-state` equal to the current state is rejected locally before broadcast). However, HardKAS **does not** evaluate SilverScript `require(...)` predicates or state arithmetic locally; `rusty-kaspad` enforces them at consensus. To send an invalid transition that reaches the node and tests consensus rejection: 1. Keep `--next-state` **different** from the current state (so it passes `SILVER_SUCCESSOR_STATE_UNCHANGED`), while violating the contract rule — for example, pass `next-state` `{"value":{"kind":"int","value":99}}` with `delta = 5` (violates `prev_state.value + delta`), or `value: 13` with `delta = 0` (violates `require(delta > 0)`). 2. Run `hardkas silver covenant transition ... --wait --json`. 3. **Expected result:** HardKAS submits the `v1` transaction, the node rejects it at script verification, `silver covenant transition` exits non-zero, and the covenant tip on the node remains unchanged. ### Step C — Independent Verification ```bash hardkas silver covenant inspect --network simnet hardkas artifact verify .hardkas/artifacts/silver --recursive ``` - **Expected output:** `covenant VERIFIED`, showing `genesis` anchor verified and `tip` pointing to the unspent successor UTXO on the node. - **Note on shells:** On PowerShell 5.1 / `cmd`, pass `--state-map` as a JSON file path (e.g. `contracts/counter.state-map.json` containing `{"value":0}`) to avoid quote-escaping issues. --- ## 4. Verify Transaction Receipts and Execution Artifacts - **Goal:** Distinguish file integrity, node observation, and consensus confirmation for any transaction or SilverScript artifact. - **Supported environments:** Offline integrity works everywhere (including `mainnet` artifacts); network/consensus checks require a node on the artifact's network (`simnet` or `testnet-10`). ### Commands ```bash # 1. Inspect local artifact fields and lineage hardkas artifact inspect --json # 2. Offline integrity check (detects tampering via contentHash) hardkas artifact verify --strict --json # 3. Real-node consensus check (100 blue-score confirmations by default) hardkas artifact verify --network simnet --require consensus --json # 4. Query recorded submission receipt and live node status hardkas tx receipt --json hardkas tx status --network simnet --json ``` - **Replay asymmetry:** `hardkas replay verify ` works **only** for `simulated` ledger runs. Real-node sends write `hardkas.txSubmission.v1` and fail closed on `replay verify` with `REPLAY_MODE_UNSUPPORTED`. --- ## 5. Diagnose Node, RPC, Account, and UTXO Problems - **Goal:** Isolate failures across workspace config, Docker container, RPC sync, keystore, or UTXO maturity without guessing. ### Commands ```bash # 1. Overall workspace, toolchain, and node readiness hardkas doctor --network simnet --json # 2. Docker localnet status (managed container hardkas-kaspad-toccata-v2, wRPC 18210) hardkas localnet status --json # 3. Live node health, sync state, and virtual DAA score hardkas rpc health --network simnet --json hardkas rpc info --network simnet --json # 4. Account balance and raw UTXOs visible to the node hardkas accounts balance --network simnet --json hardkas rpc utxos --network simnet --json ``` - **Key diagnostic rule:** `accounts balance` counts immature coinbase UTXOs, whereas `tx plan` skips them (`NO_SPENDABLE_UTXOS`). On `simnet`, wait ~1,000 DAA with the miner running before spending coinbase rewards. --- ## 6. Select the Appropriate HardKAS CLI or SDK Workflow Use the **CLI** when orchestrating environments, keystores, or SilverScript tooling, and the **TypeScript SDK (`@hardkas/sdk`)** inside application code or Vitest suites. | Task | Use CLI | Use SDK (`@hardkas/sdk`) | Notes | | :--- | :--- | :--- | :--- | | Start/stop/fund Docker localnet (`--profile toccata-v2`) | `hardkas localnet start\|stop\|fund` | **Not supported in 0.13.0-rc.3** | SDK explicitly throws directing you to the CLI. | | Install `silverc` / `kaspa-wasm` | `hardkas toolchain install` | No | CLI-managed with SHA-256 verification. | | Payments & batching in app logic | `hardkas tx plan\|sign\|send\|wait` | `sdk.tx.plan`, `sign`, `send`, `waitForConfirmations` | Both use the `kaspa-wasm` Generator and emit artifacts. | | Capability discovery before execution | `hardkas doctor --json`, `hardkas silver doctor --json` | `sdk.capabilities.get()` | Always check capabilities first. | | SilverScript compile / P2SH / 1:1 covenant | `hardkas silver compile\|deploy\|spend\|covenant` | `sdk.silver.*` | CLI is fastest for scripts & ops; SDK for custom tests. | | Complex v1 covenants (1:N, N:M) | `hardkas silver covenant start\|advance` (experimental) | `sdk.covenants.*` (experimental) | Requires explicit v1 compute budget & fee. | --- ## Related Repository Resources - **Hands-on simnet walkthrough:** `docs/start/build-on-simnet.md`, `docs/start/quickstart-simnet.md`, `docs/start/silverscript-covenants.md` - **Runnable TypeScript examples:** `examples/01-hello-kaspa` through `examples/11-kcc20-token` (`pnpm example:hello`, `pnpm example:transfer`, `pnpm example:localnet`, `pnpm example:covenant-demo`) - **Builder Labs:** `labs/bl-001-offline-multisig`, `labs/bl-002-escrow-multisig`, `labs/bl-003-silverscript-covenant`, `labs/02-merchant-checkout` ([overview](../tutorials/builder-labs.md)) - **Video tutorials:** [KasLabDevs YouTube](https://www.youtube.com/@kaslabdevs) --- # AI Troubleshooting & Error Codes Always pass `--json` when diagnosing failures so HardKAS prints the stable `code` field. | Error Code | Root Cause | Diagnostic Command | Safe Recovery | | :--- | :--- | :--- | :--- | | `RPC_CONNECTION_FAILED` / `RPC_INFO_UNAVAILABLE` | Node not running, wrong port (`18210` default for `toccata-v2`, or custom port in `hardkas.config.ts`), or missing `--rpclisten-json`. | `hardkas rpc health --network simnet --json` | Start localnet (`hardkas localnet start --profile toccata-v2`) or verify `docker ps` and `rpcUrl`. | | `NODE_NOT_SYNCED` | Simnet node has no peers and stopped receiving mined blocks. | `hardkas rpc info --network simnet --json` | Start or resume the CPU miner until `Synced: yes`. | | `NO_SPENDABLE_UTXOS` | Account has 0 UTXOs, or only immature coinbase rewards (< 1,000 DAA on simnet). | `hardkas accounts balance --network simnet --json` | Fund the account or keep the miner running ~1,000 DAA (~1 minute) and retry. | | `TX_SEND_WAIT_FAILED` | `tx send --wait` submitted the transaction (`outcome: submitted`), but confirmation did not finish within `--wait-timeout` (default 60 s). | `hardkas tx status --network simnet --json` | Do **not** resend blindly. Wait on the same txId: `hardkas tx wait --until confirmed --network simnet --url --json`. | | `INSUFFICIENT_FUNDS_UPSTREAM` | Spendable UTXOs do not cover `amount + fee`. | `hardkas rpc utxos
--network simnet --json` | Reduce `--amount` or fund the account with more KAS. | | `ARTIFACT_HASH_MISMATCH` | Artifact JSON was edited after creation (`contentHash` mismatch). | `hardkas artifact inspect --json` | Do **not** edit hashes manually; re-run from the last intact step (`tx plan` / `tx sign`). | | `REPLAY_MODE_UNSUPPORTED` | `replay verify` was called on a real-node (`simnet` / `testnet-10`) submission. | `hardkas tx status --network simnet --json` | Replay only covers `simulated` runs. Use `tx status` and `artifact verify --require consensus`. | | `SILVER_VALUE_INVALID` | Passed a raw hex string for a SilverScript `bytes` constructor arg instead of a byte array. | `hardkas silver verify --args ` | Format as `[{"kind":"bytes","value":[...]}]` (for `pubkey`, use the 32-byte x-only key: compressed pubkey without byte 0). | | `MAINNET_CONNECTION_DISABLED` / `MAINNET_SIGNING_DISABLED` / `MAINNET_BROADCAST_DISABLED` / `SILVERSCRIPT_MAINNET_NOT_ENABLED` | Mainnet is intentionally blocked in this release. | `hardkas doctor --json` | Switch `--network` to `simnet` (or `simulated` for local dry-runs). | --- # Claude Code & Cursor Guide All AI coding agents should use the same canonical HardKAS documentation: - Short navigation map: `https://hardkas.dev/llms.txt` - Full AI reference & recipes: `https://hardkas.dev/llms-full.txt` - Canonical docs section: `https://hardkas.dev/docs/ai/` ## Claude Code (`CLAUDE.md` snippet) Add these rules to your project's `CLAUDE.md` when building on Kaspa with HardKAS: ```markdown ## Kaspa L1 with HardKAS - Kaspa L1 is a UTXO BlockDAG (not EVM). Use HardKAS CLI/SDK instead of custom `kaspa-wasm` scripts for payments, keystores, SilverScript, and artifact verification. - Read `https://hardkas.dev/llms.txt` (or `https://hardkas.dev/llms-full.txt`) before writing custom Kaspa code. - Before runtime tasks, run `hardkas doctor --json` and `hardkas silver doctor --network simnet --json` (or `sdk.capabilities.get()`). - Always pass `--json` to CLI commands in automated flows. - Never claim `simulated` or local `silver test` (`SCRIPT_VM`) verdicts are real-node consensus proof. - Mainnet is blocked by policy; use `simnet` for real-node testing. ``` ## Cursor (`.cursorrules` / `@Docs`) 1. Index `https://hardkas.dev/docs/ai/` or reference `https://hardkas.dev/llms-full.txt` in `@Docs`. 2. Keep the same rules in `.cursorrules`: - Prefer `hardkas tx`, `hardkas silver`, `hardkas artifact`, and `hardkas localnet` over custom `kaspa-wasm` boilerplate. - Verify CLI flags with `hardkas --help` or the [CLI Reference](../reference/cli.md) if unsure. - Use `rusty-kaspad v2.1.0` on `simnet` (`ws://127.0.0.1:18210` for `--profile toccata-v2`) for real consensus checks. ---