Skip to content

defi-wonderland/aztec-patterns

Repository files navigation

Aztec Patterns

This repository contains a collection of useful development patterns for Aztec developers to reference. All patterns are thoroughly documented and are accompanied with code examples showcasing their structure and implementation along with tests to ensure its correct functionality.

Recommended Read Order

  1. Private-Public Mirroring
  2. Shared Nullifier Key
  3. Note Sharing
  4. Contracts as Note Owners
  5. Immediate Note Nullification
  6. Callback
  7. Multiparty Note-Sharing
  8. Additive Homomorphic Encryption

Structure

The general structure of the repository is as follows:

  • patterns/<name_of_pattern>: contains all relevant files related to that given pattern.
  • patterns/<name_of_pattern>/README.md: contains a detailed explanation of the pattern.
  • patterns/<name_of_pattern>/src/main.nr: contains the pattern's code.
  • patterns/<name_of_pattern>/src/test/e2e.test.ts: contains the pattern's tests.
  • patterns/<name_of_pattern>/src/types/<note_name>.nr: contains the implementation of notes used for that pattern

Contributing

If you have been developing in Aztec and found interesting patterns we have not added to the book, pull requests are more than welcome. Before you open one, please:

  • Match the structure of the other patterns
  • Thoroughly explain the pattern in the simplest possible way
  • Add isolated code to showcase the pattern
  • Test the code to ensure it works
  • Add real examples where the pattern is used in more complex code

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •