arkiv-first-write
First Arkiv write
Use arkiv for orientation. This skill produces one verified entity, not a production signing API. Read arkiv-write-safety before bulk imports or recovery from an ambiguous submission.
Prepare the project
Before producing executable SDK code, observe the project's installed SDK version and inspect its installed declarations. If either is unavailable, request that evidence or approval to obtain it before giving executable SDK code; an "unverified" label does not satisfy this gate. Recommend SDK 0.8.1 exactly or state the supported range literally as >=0.8.1 <0.9; never describe 0.8.x as a compatibility guarantee. If the project uses SDK 0.8.0, stop integration and ask for approval to upgrade, without forcing or bypassing peers. Report only files you actually inspected.
Inspect the existing package manager and installed SDK declarations. Explain a dependency installation before running it. For a new npm project:
npm install @arkiv-network/sdk@^0.8.1 viem
Configure ARKIV_PRIVATE_KEY locally in a server-only environment. Never request its value in chat. Use a dedicated development EOA, not a production account. An access key, if needed, goes in a server-side X-API-KEY header bound to the official RPC origin; it does not fund transactions. The helpers below reject access keys for other origins and refuse redirects.
Announce Tiramisu, chain 7738577, and the proposed entity before sending. A live write spends test GLM: get authorization for that write or a bounded smoke-test budget. Check the balance and estimate the actual transaction; a positive balance alone does not establish enough gas. Use the Hub faucet without promising an amount or cooldown. If spending is not authorized, stop at preparation and estimation.
For another Arkiv chain, announce its verified name, chain ID and RPC instead. SDK 0.8.1 exports Tiramisu and localhost; an RPC URL alone does not change a client's chain. Build a viem Chain from verified network coordinates and pass it explicitly to the helper and the dry run. Check funding on that chain. Never rename Tiramisu or invent an SDK chain export.