Skip to main content
Version: 5.19.5

Getting Started


# use the main branch

npm install starknet

# to use latest features (merges in develop branch)

npm install starknet@next

Running test locally

With Devnet

The example devnet version is 0.5.3.

Get devnet with docker:

docker pull shardlabs/starknet-devnet:0.5.3
docker run -p 5050:5050 shardlabs/starknet-devnet:0.5.3 --seed 0

Open a new console tab, go to your starknet.js directory, and run:

npm run test # all tests
npm run test ./__tests__/contract.test.ts # just one test suite

By default, defaultProvider tests will be run through the Sequencer.

If you want to run defaultProvider through the RPC run:

export TEST_RPC_URL = ""

# only RPC related tests:
npm run test ./__tests__/rpcProvider.test.ts

Running docs locally

If you want to change documentation and see how it looks before making a PR:

cd www
npm install # install docusaurus
npm run start # fires up a local documentation site

Compiling Starknet Contracts

Please check the Starknet documentation here to compile Starknet contracts.

Additional helpful resources can also be found at OpenZeppelin documentation site.

Full example with account & erc20 deployments

Please take a look at our workshop using OpenZeppelin contracts here.

Example with the Argent contract here.

Contracts used in the guides

You can find the compiled contracts used in these guides in compiled_contracts directory.