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

Learn Compact

Project: Private Voting

Coming Soon.