Introduction
Part 1: Foundations
1.
Getting Started
❱
1.1.
Installing the Compact Compiler
1.2.
Setting Up Your Environment
1.3.
Your First Contract
2.
Basic Concepts
❱
2.1.
Program Structure
2.2.
Pragma and Imports
2.3.
Comments and Style
Part 2: The Type System
3.
Primitive Types
❱
3.1.
Boolean and Field
3.2.
Unsigned Integers
3.3.
Bytes and Opaque Types
3.4.
Type Casting
4.
Composite Types
❱
4.1.
Tuples and Vectors
4.2.
Maybe Type
4.3.
Either Type
5.
User-Defined Types
❱
5.1.
Structs
5.2.
Enums
5.3.
Generic Types
Part 3: Core Language Features
6.
Circuits
❱
6.1.
Circuit Declaration
6.2.
Parameters and Returns
6.3.
Pure Circuits
7.
Witnesses
❱
7.1.
Understanding Witnesses
7.2.
TypeScript Implementation
8.
Control Flow
❱
8.1.
Conditionals
8.2.
Loops
8.3.
Assertions
9.
Expressions & Operators
❱
9.1.
Arithmetic Operators
9.2.
Comparison and Boolean
9.3.
Type Conversions
Part 4: State Management
10.
Ledger State 🚧
❱
10.1.
Declaring Ledger Fields
10.2.
Counter Type
10.3.
Map and Set Types
10.4.
MerkleTree Type
11.
The disclose() Function 🚧
❱
11.1.
Understanding Disclosure
11.2.
Disclosure Patterns
Part 5: Advanced Concepts
12.
Standard Library 🚧
❱
12.1.
Hash Functions
12.2.
Utility Functions
13.
Modules and Organization 🚧
❱
13.1.
Creating Modules
13.2.
Imports and Exports
14.
Constructors 🚧
15.
TypeScript Integration 🚧
❱
15.1.
Type Mappings
15.2.
Implementing Witnesses
15.3.
SDK Usage
15.4.
Deployment
Part 6: Projects
16.
Project: Counter DApp 🚧
❱
16.1.
Contract Implementation
16.2.
TypeScript CLI
16.3.
Deployment and Testing
17.
Project: Bulletin Board 🚧
❱
17.1.
Privacy Model
17.2.
Contract Implementation
17.3.
React UI
18.
Project: Private Voting 🚧
❱
18.1.
Design
18.2.
Implementation
18.3.
Frontend
Part 7: Best Practices & Reference
19.
Common Mistakes 🚧
20.
Testing Contracts 🚧
21.
Security Considerations 🚧
Appendix
22.
A: Compact Keywords 🚧
23.
B: Operators Reference 🚧
24.
C: Standard Library API 🚧
25.
D: Error Messages 🚧
26.
E: Version History 🚧
Light
Rust
Coal
Navy
Ayu
Learn Compact
TypeScript Integration