finds.dev← search

// the find

starknet-io/starknet.js

★ 1,260 · TypeScript · MIT · updated Jul 2026

JavaScript library for Starknet

starknet.js is the official JavaScript/TypeScript client library for Starknet, StarkWare's ZK-rollup L2. It handles account abstraction, contract calls, calldata encoding/decoding, transaction signing, and WebSocket subscriptions. The target audience is developers building dapps on Starknet or integrating wallets like Argent or Braavos.

The calldata serialization layer is genuinely well-engineered — it handles Cairo's type system (u256, felt252, ByteArray, enums, tuples, fixed arrays) automatically from ABI definitions, which saves enormous amounts of hand-rolled encoding code. The plugin architecture is a clean design decision: StarknetId, fast-execute, and similar extensions live outside the core without monkey-patching. Test coverage is wide, with separate unit and integration test configs and mocked Cairo contracts baked in for deterministic testing without devnet. The new `skills/` directory for feeding AI agents accurate, versioned context about the library is a clever practical move given how badly LLMs hallucinate Starknet-specific APIs.

The library tracks multiple RPC spec versions simultaneously (0.9, 0.10.2, 0.10.3) across separate channel files, which means diverging type definitions and no clear deprecation timeline — you can easily end up on the wrong spec version if you're not careful about provider configuration. Bundle size is a real concern for browser dapps: the library pulls in cryptographic primitives and big-integer math that add significant weight, and tree-shaking is limited because much of the surface area is re-exported from a single index. Account abstraction patterns on Starknet are still evolving rapidly and the library version has chased the Cairo/RPC spec versions aggressively, so version mismatches between starknet.js, your contract compiler output, and the node you're talking to are a recurring source of mysterious failures that aren't well-documented. WebSocket subscription support is recent and the reconnection logic in the tests hints it's not fully hardened yet.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →