Welcome to The Starknet Book

The Starknet Book is a work in progress, shaped by ongoing community input. Some sections may be incomplete or still under review and are marked under a 🚧 emoji. We welcome your suggestions, feedback, and content contributions to make this book a reliable guide for everyone.

The Starknet Book is a step-by-step guide aimed at teaching you the essentials of Starknet development. It’s a community effort, with each chapter guiding you through the Starknet ecosystem.

Understanding Cairo, the key programming language for Starknet smart contracts, is crucial. That’s why this book works hand-in-hand with the Cairo Book, another community resource. You can access the Cairo Book here.

In short, the Cairo Book helps you master Cairo, while The Starknet Book focuses on Starknet’s specific features. For a well-rounded understanding, we recommend exploring both. This book will introduce you to tools, architecture, account setups, STARKs, and Starknet-specific apps.

Table of Contents

Chapter Description

1: Starknet Introduction

Delve into the fundamental concepts of Starknet and acquaint yourself with the deployment of smart contracts.

2: Starknet Tooling

Familiarize yourself with vital tools, such as Protostar and Hardhat, and explore how languages like Javascript, Python, and Rust can be leveraged for Starknet interactions.

3: Starknet Architecture

Uncover Starknet’s core structure, gaining insights into the transaction lifecycle and the interplay between the Sequencer, Prover, and Nodes.

4: Account Abstraction

Delve deep into Starknet’s unique approach to user accounts, and master the art of crafting custom accounts.

5: Pioneering Applications

Investigate the frontier of Starknet’s capabilities, including On-Chain AI and Storage Proofs.

6: STARKs

Dive into the intricacies of STARKs and their pivotal role in shaping Starknet’s landscape.

Where to Start?

Depending on your goals and interests, you can choose different paths through the Starknet Book. Here are some recommendations based on various objectives:

  • If you’re a complete beginner and want to start learning about Cairo and Starknet from scratch, follow the book in its entirety, starting with Introduction to Starknet.

  • If you’re an experienced developer looking to quickly dive into writing scalable and decentralized smart contracts, focus on the Cairo Book, particularly chapter 12: Starknet Smart Contracts (link).

  • If you’re a frontend developer wanting to integrate Starknet with a React frontend using Javascript, prioritize the starknet-js and starknet-react subchapters in Starknet Tooling

  • If you’re a DevOps engineer or node operator interested in running a Starknet node and indexer, head straight to Starknet Architecture.

  • If you’re a security researcher or smart contract auditor wanting to learn about the Account Abstraction feature and its implications, go for Account Abstraction.

  • If you’re a blockchain enthusiast curious about the underlying architecture and mechanics of Starknet and Cairo, explore Starknet Architecture.

  • If you’re a cryptography expert or researcher eager to understand the fundamentals of STARKs and their connection to the Starknet ecosystem, delve into STARKs.

Feel free to mix and match these paths based on your unique interests and requirements.

Your Contributions Matter

Welcome aboard! By contributing to the Starknet Book, you’re doing more than sharing expertiseβ€”you’re shaping the future of decentralized tech. Let’s build a guide that helps developers unlock Starknet’s potential.

For detailed contribution guidelines, visit the Contributors Guide. Every contribution counts. Your skills and passion will help make this book an invaluable tool.

How You Can Help

  • Found an empty section? Fill it in!

  • Think we need a new section? Suggest one.

  • See room for improvement? Go ahead and tweak it.

  • Want to add code in a new programming language? Go for it.

  • Found a bug? Fix it.

  • Exercises unclear? Add explanations.

  • Show off your favorite Cairo features through new exercises.

Additional Key Educational Resources

We’ve compiled a list of valuable educational resources that will help deepen your understanding and enhance your skills in coding with Cairo and staying abreast with Starknet developments:

  1. Cairo Book: A comprehensive guide to Cairo, the programming language for Starknet smart contracts. You can access it here.

  2. Starklings: A resource specifically designed to guide you through learning Cairo programming, ensuring that you reach a proficient level. You can access it here.

  3. Starknet Community Forum: An online platform where you can engage in discussions about the latest developments in Starknet. Join the conversation here.

  4. Starknet Documentation: You can browse through the documentation here.

  5. Cairo Documentation: Explore it here.

  6. Starknet Developer Telegram (English): A community for English-speaking Starknet developers. This is a great platform for networking, sharing ideas, and troubleshooting together. Join us on Telegram here.

Starknet Book Authors ✨

We extend our sincere gratitude to these exceptional individuals who have made invaluable contributions to the Starknet Book:

16685321?v=4&s=100

Dr Spaceman

113911244?v=4&s=100

James Stark

4755430?v=4&s=100

Omar Espejel

27683905?v=4&s=100

Gyan

22731646?v=4&s=100

Henri

2279046?v=4&s=100

David Barreto

30735581?v=4&s=100

Remedcu

73983677?v=4&s=100

Omahs

70894690?v=4&s=100

Lucas @ Starkware

33158502?v=4&s=100

Qd-Qd

12909374?v=4&s=100

Oboulant

63842643?v=4&s=100

Code Whizperer

2437994?v=4&s=100

Avi Mak

36516516?v=4&s=100

Robert Kodra

49245208?v=4&s=100

Manmit Singh

85268534?v=4&s=100

Lvis Wang

98833290?v=4&s=100

Leablock

113949669?v=4&s=100

Carlos Lira

21693926?v=4&s=100

Artur Vargas

126797224?v=4&s=100

Lorcan-codes

117481421?v=4&s=100

Devnet0x

2848732?v=4&s=100

Ivan PavičiΔ‡

67330943?v=4&s=100

Raphael Ndonga

114395459?v=4&s=100

Asten

35219743?v=4&s=100

Trangnv

102651969?v=4&s=100

0xKubitus

12902455?v=4&s=100

Evolve Art

112663528?v=4&s=100

Nadai

30095502?v=4&s=100

Prince Anuragi

876976?v=4&s=100

Ccolorado

95504156?v=4&s=100

Diego Hermida

105909776?v=4&s=100

0x180db

11048263?v=4&s=100

Shramee Srivastav

31094102?v=4&s=100

Santala

13951843?v=4&s=100

Satyam Bansal

25623039?v=4&s=100

ZΓ© Diogo

106890011?v=4&s=100

Pikkuherkko

2940022?v=4&s=100

Davide Silva

22482966?v=4&s=100

Leapalazzolo

65915812?v=4&s=100

Keivin

87354252?v=4&s=100

lambda-0x

22297601?v=4&s=100

David Lange

46480795?v=4&s=100

0xlenny

125185051?v=4&s=100

razlandau

24778804?v=4&s=100

neelkamath

75367288?v=4&s=100

Mohamed Abdessamed

18651846?v=4&s=100

xiang

39279277?v=4&s=100

Steve Goodman

22782504?v=4&s=100

GianMarco

19387360?v=4&s=100

TEMHITHORPHE

2598660?v=4&s=100

Tristan

15204272?v=4&s=100

Orlando Sanchez