github starknet-io/starknet.js v11.0.0

pre-release3 hours ago

11.0.0 (2026-09-14)

Bug Fixes

  • cairoDataTypes: correct u256 and u512 toApiRequest and validate (11d758b)
  • calldata: a Cairo type serializes itself, abi or not (c0943fb)
  • calldata: an abi slot accepts the Cairo type it declares (b9fa576)
  • calldata: long string chunks stay text, at any ABI depth (06638d9)
  • calldata: out-of-range arguments refused, negative results come back negative (41bf052)
  • calldata: text reaches a ByteArray, whatever it spells (509c9f8)
  • deps: bump @noble/@scure crypto libs to 2.4.0 (5c448fe)
  • remove leftover v1 transaction references (52424df)
  • starknetId: accept bigAlphabet characters in isStarkDomain (f508984), closes #1668
  • starknetId: reject names the encoder cannot represent (76fe9b1), closes #1668
  • test: detect devnet by asking the node, not by the absence of a url (62b3944)
  • ws: tolerate an unclean close, and run the suite on devnet (5c706f0)
  • ws: webSocketProvider.create() typing, and the transport documentation (00dcc5c)

Features

  • cairoDataTypes: add CairoBool, CairoEthAddress and CairoSecp256k1Point (332dd1e)
  • cairoDataTypes: add the composite Cairo type classes and their strategy (58d1ae7), closes #1484 #1688 #1484
  • cairo: remove the deprecated string helpers, add CairoBytes31.fromText (49331fe)
  • calldata: run the calldata codec on the Cairo type classes (35f3b80)
  • channel: carry requests and subscriptions over one WebSocket transport (6344efc)
  • channel: route RPC requests through a pluggable transport (5af8a51)
  • constants: remove the feeder gateway BaseUrl constant (c455e2a)
  • provider: deprecate the Provider alias in favour of RpcProvider (08dad8c)
  • receipt: remove the deprecated ReceiptTx class (e57933c)
  • stark: add randomFelt and randomStarkPrivateKey generators (04c612e)
  • starknet.js v11 (0e360fd)
  • test: one npm test, four URL-driven categories (4e8e2c6)
  • ws: webSocketProvider, one socket for requests and subscriptions (2af307a)

BREAKING CHANGES

  • calldata: run the calldata codec on the Cairo type classes
  • cairoDataTypes: three inputs that used to reach the calldata are now refused.
    A core::bool argument that is neither a boolean nor 0/1 throws instead of being
    serialized as a felt. An EthAddress built from text throws instead of being
    encoded as its UTF-8 bytes. A Secp256k1Point wider than 512 bits throws instead
    of emitting four corrupted felts.
  • constants: constants.BaseUrl is removed. It exposed the feeder
    gateway roots, whose endpoints Starknet v0.14.4 deletes; the library has
    been JSON-RPC only since v7 and never read it. Use constants.NetworkName
    with provider.getDefaultNodeUrl(), or your own node's RPC url.
  • starknetId: useEncoded throws on any character outside the Starknet.id alphabets
    instead of silently ignoring it, and encodeBrotherDomain, which calls it with no guard,
    throws on the same input. isStarkDomain also rejects labels whose encoding overflows the
    field, including every 48-character label it used to accept.
  • v2hash, ETransactionVersion2, Details,
    InvocationsDetails.maxFee and TransactionHashPrefix.DEPLOY are removed.
    See the v10 to v11 migration guide, section 8.
  • receipt: remove the deprecated ReceiptTx class
  • cairo: shortString.encodeShortString(), shortString.decodeShortString(),
    CairoFelt() and encode.utf8ToArray() are removed. Use
    CairoBytes31.fromText(text).toHexString(), new CairoBytes31(felt).decodeUtf8(),
    CairoFelt252 and encode.utf8ToUint8Array(). cairo.felt() no longer accepts text,
    booleans or non-integer numbers.
  • @noble/curves, @noble/hashes and @scure/starknet bumped to 2.x. WeierstrassSignatureType is now weierstrass.ECDSASignature, a plain {r, s} object instead of the v1 signature class.

Don't miss a new starknet.js release

NewReleases is sending notifications on new releases.