#solana #spl-token #ciphertext #math #elgamal

spl-token-confidential-transfer-ciphertext-arithmetic

Solana Program Library Confidential Transfer Ciphertext Arithmetic

9 unstable releases

new 0.5.1 May 21, 2026
0.4.1 Nov 3, 2025
0.3.0 Mar 26, 2025
0.2.0 Nov 1, 2024

#960 in Magic Beans

Download history 62843/week @ 2026-02-04 52328/week @ 2026-02-11 56734/week @ 2026-02-18 60594/week @ 2026-02-25 70960/week @ 2026-03-04 79544/week @ 2026-03-11 73349/week @ 2026-03-18 71704/week @ 2026-03-25 76666/week @ 2026-04-01 74567/week @ 2026-04-08 73884/week @ 2026-04-15 69308/week @ 2026-04-22 71476/week @ 2026-04-29 101520/week @ 2026-05-06 113783/week @ 2026-05-13 112457/week @ 2026-05-20

410,686 downloads per month
Used in 286 crates (via spl-token-2022)

Apache-2.0

19KB
293 lines

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

~2.4–4MB
~83K SLoC