Skip to content

A prototype for private token transfers on Aztec Network featuring integrated compliance mechanisms like per transaction send limits, transaction send limits over a given time period (e.g. monthly), and country whitelisting.

License

Notifications You must be signed in to change notification settings

deryakarl/zkpassport-aztec-sandbox

 
 

Repository files navigation

zkPassport on Aztec Sandbox

Aztec Sandbox License: Apache-2.0 Tests

A prototype for private token transfers on Aztec Network featuring integrated compliance mechanisms like per transaction send limits, transaction send limits over a given time period (e.g. monthly), and country whitelisting.

Usage

Install dependencies

npm install

Ensure Aztec Sandbox version 0.16.9 is running

In a separate terminal:

cd ~/.aztec && DEBUG=aztec:simulator:oracle SANDBOX_VERSION=0.16.9 docker compose up

Run tests

Compile contracts and run integration tests:

npm run test

Run integration tests without (re)compiling contracts:

SKIP_COMPILE=1 npm run test

Compile contracts

npm run compile

Clear cache

The cache contains compiled contract artifacts, deployed contract addresses, and the Slow Update Tree database.

If you are encountering issues you may need to clear the cache.

npm run clear_cache

Reference

DG1 TD3 Data Structure

ASN.1 Header

61      0x40 (Application class) + 0x20 (constructed structure indicates inner components) + 0x01 (Tag ID)
5B      The length of the data to follow is 91 bytes (indicates TD3)
5F 1F   MRZ Data Tag
58      The length of the data to follow is 88 bytes (indicates TD3)

TD3 Data Structure

    Name of Data Element            Length
-------------------------------------------
A   Document code                   2
B   Issuing State or organization   3
C   Name of holder                  39
D   Document number                 9
E   Check digit — Document number   1
F   Nationality                     3
G   Date of birth                   6
H   Check digit — Date of birth     1
I   Sex                             1
J   Date of expiry                  6
K   Check digit — Date of expiry    1
L   Optional data                   14
M   Check digit                     1
N   Composite check digit           1
-------------------------------------------
TD3 length is always 88 bytes
TD3 looks like this: AABBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDEFFFGGGGGGHIJJJJJJKLLLLLLLLLLLLLLMN

Authors

License

Licensed under the Apache-2.0 License. See LICENSE for more information.

About

A prototype for private token transfers on Aztec Network featuring integrated compliance mechanisms like per transaction send limits, transaction send limits over a given time period (e.g. monthly), and country whitelisting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 78.2%
  • TypeScript 17.7%
  • JavaScript 2.8%
  • Shell 1.3%