JavaScript/TypeScript library for interacting with Starknet, a ZK-rollup Layer 2 on Ethereum. This library provides a complete interface for account management, contract interaction, and transaction signing. Current stable version 10.0.2 (released November 2024) with monthly releases. It requires Node.js >=22 (breaking from previous 18 support) and is ESM-only from v6. Key differentiators: official SDK from Starkware, supports both RPC and sequencer APIs.
npm install starknetNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating an RPC provider, account, and calling a read function on an ERC20 contract.
Update Node.js to version 22 or later.
Use import syntax. If you must use CommonJS, use dynamic import: const starknet = await import('starknet');Replace new Provider(...) with new RPCProvider(...) or new SequencerProvider(...).
Always call await session.authorize() after creating a ConnectSession.
Use import { cairo } from 'starknet' and call cairo.felt() etc. Do not use cairo.default.Use import { createStarknetConfig } from 'starknet' instead of Starknet.config().Install with npm install starknet. For browser, use a bundler or importmap.
Change to: import { Starknet, Account } from 'starknet';Provide a valid nodeUrl, e.g., new RPCProvider({ nodeUrl: 'https://starknet-sepolia.public.blastapi.io/rpc/v0_7' }).Use RPCProvider with nodeUrl or SequencerProvider with baseUrl.
No dependency data recorded yet.