5 releases (3 breaking)

new 0.4.0 Nov 3, 2025
0.3.0 May 13, 2025
0.2.0 Mar 26, 2025
0.1.1 Jan 17, 2025
0.1.0 Nov 1, 2024

#2 in #token-2022

Download history 39184/week @ 2025-07-14 43070/week @ 2025-07-21 53653/week @ 2025-07-28 59861/week @ 2025-08-04 51260/week @ 2025-08-11 57224/week @ 2025-08-18 48932/week @ 2025-08-25 47408/week @ 2025-09-01 54256/week @ 2025-09-08 52343/week @ 2025-09-15 48491/week @ 2025-09-22 45134/week @ 2025-09-29 48924/week @ 2025-10-06 54512/week @ 2025-10-13 54470/week @ 2025-10-20 50465/week @ 2025-10-27

210,626 downloads per month
Used in 305 crates (3 directly)

Apache-2.0

75KB
1K SLoC

Token 2022

Programs

The token-2022 repo contains two on-chain programs, the token-2022 program in program, which you can build / test / format using the following commands:

make build-sbf-program
make test-program
make format-check-program
make clippy-program

There's also the ElGamal pubkey registry program in confidential/elgamal-registry, which you can build and test with the following commands:

make build-sbf-confidential-elgamal-registry
make test-confidential-elgamal-registry
make format-check-confidential-elgamal-registry
make clippy-confidential-elgamal-registry

IDL

The token-2022 program has the following IDL.

Generating clients

Once your program's IDL has been generated, you can generate clients for them using the following commands.

pnpm install # only need to run this once
pnpm generate:clients

Managing clients

The following clients are available. You may use the following links to learn more about each client:

Starting and stopping the local validator

The following script is available to start your local validator. In order to run the local validator you must also have the token-2022 and elgamal registry programs built.

make build-sbf-program # you only need to run this once
make build-sbf-confidential-elgamal-registry # you only need to run this once
make restart-test-validator

Finally, you may stop the local validator using the following command.

make stop-test-validator

Dependencies

~12MB
~183K SLoC