StarknetKit
Docs v1.1.9
Starknet.js 101
Starknetjs 101

Starknet.js 101

Introduction to Starknet.js

Starknet.js is a library that helps to connect your website or your Decentralized Application (DAPP) to the blockchain-based Starknet network, using Javascript / Typescript language.

To get started with the starknetkit package, we need to take a short detour to understand a few concepts from Starknet.js.

Provider

The Provider is an API from Starknet.js, that enables you to interact with StarkNet, without necessarily signing messages, e.g. when performing read calls. You can read states without signing messages, but you cannot alter or modify the contract’s state.

Account

The Account API extends the primary features of the Provider API to also include the Signer API, which can be used to create and verify signatures. This API unlike the Provider, can make both read and write calls to the blockchain, and as such is the primary way to interact with StarkNet contracts.

Signer

The Signer API simply allows you to sign transactions and messages.

Contract

Contracts are primarily how we create instantiations of our smart contracts with javascript. It takes in the contract’s ABI, the contract’s address, and the provider or account.

In the next sections, we are going to take a deeper dive into these concepts.