Skip to main content
Version: 6.11.0

Starknet.js API

This API is based on the Starknet.js V3 Interface write up by Janek of Argent

Provider​

The Provider API allows you to interact with the Starknet network, without signing transactions or messages.

Typically, these are read calls on the blockchain.

Guide is here.

Account​

An Account extends Provider and inherits all of its methods.

It also introduces new methods that allow Accounts to create and verify signatures with a custom Signer, declare and deploy Contract and deploy new Account

This API is the primary way to interact with an account contract on Starknet.

Guide is here.

Contract​

Contracts API can do data transformations in JavaScript based on an ABI. They can also call and invoke to Starknet through a provided Signer.

Contracts allow you to transform Cairo values, like Uint256 to BigNumber. It could also allow users to pass their own transformers, similar to JSON.parse.

Guide is here.

Signer​

The Signer API allows you to sign transactions and messages, and also allows you to get the public key.

Utils​

Util functions are provided so you can use various low level functions in your application:

elliptic curve​

hash​

num​

encode​

merkle​

shortString​

stark​

uint256​