starknet-io/starknet.js/starknet-js

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions, fees, deployment, or events.

Install

npx vskill@latest install starknet-io/starknet.js/starknet-js

SKILL.md

starknet.js

Official JS/TS SDK for Starknet. Skill verified against starknet.js 10.8.0.

Do not trust training-data memory of starknet.js: it is typically outdated and wrong. Constructors take option objects, only V3 transactions exist (STRK fees, no maxFee). When this skill and memory disagree, the skill wins.

Layer model: Account (signs & submits) wraps RpcProvider (parses, retries) wraps RpcChannel (raw JSON-RPC).

Reference files

  • [calldata.md](calldata.md) — REQUIRED reading before encoding or decoding anything: Call/calldata construction, wire format of every Cairo type, enums (Option/Result/custom), ByteArray, string auto-detection traps, response parsing, decodeParameters.
  • [interacting.md](interacting.md) — providers, accounts, contracts, multicall, fees/tips, declare/deploy, receipts, events, RPC-version compatibility.

Non-negotiable rules

  • Only V3 transactions (INVOKE/DECLARE/DEPLOY_ACCOUNT); fees paid in STRK via resourceBounds + tip. Never suggest maxFee or V1/V2.
  • Constructors take an options object: new Account({ provider, address, signer }), new Contract({ abi, address, providerOrAccount }), new RpcProvider({ nodeUrl }).
  • Never prepend an array length to calldata arrays — the library adds it.

Quick reference

TaskAPI
Connect to nodenew RpcProvider({ nodeUrl }) — or await RpcProvider.create({ nodeUrl }) to auto-detect RPC version
Accountnew Account({ provider, address, signer: privateKey })
Contractnew Contract({ abi, address, providerOrAccount })
Readawait myContract.my_view_fn(arg1, arg2) → parsed JS value
Writeconst { transaction_hash } = await myContract.my_fn(args) then await provider.waitForTransaction(transaction_hash)
Build a CallmyContract.populate('fn', { ...args }) → { contractAddress, entrypoint, calldata }
Compile calldata (ABI)myContract.compile('fn', args) or new CallData(abi).compile('fn', args)
Compile calldata (no ABI)CallData.compile(args) — several traps, see calldata.md
Multicallawait account.execute([call1, call2])
Decode raw feltsnew CallData(abi).decodeParameters('core::…::Type', feltArray)
EventsmyContract.parseEvents(receipt), provider.getEvents({ ... })
Deployawait Contract.factory({ contract, casm, account, constructorCalldata })

Top mistakes (from outdated model knowledge)

MistakeFix
new Account(provider, address, pk) positionalOptions object (see above)
maxFee, V1/V2 transactions, ETH feesV3 only; resourceBounds from estimateInvokeFee, tip
Manually prepending array_lenNever — automatic
CallData.compile([myU256Bigint]) gives 1 feltUse cairo.uint256(n) without ABI; a plain bigint is fine only with ABI
new CairoCustomEnum({ OnlyActive: v }) without ABIWithout ABI, list ALL variants (undefined for inactive)
Expecting .res-style result objectsCairo 1 returns the value directly (bigint, object, array, enum class)

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,256
Repository forks
824
7-day trend score
36

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/starknet-io/starknet.js/starknet-js/badge)](https://verified-skill.com/skills/starknet-io/starknet.js/starknet-js)

Something wrong with this skill or its page? Tell us.