# Core and SPL program decoders (Carbon 2.0)

> Decode 8 Solana core and SPL programs in Rust, including SPL Token, Token-2022, System Program and Address Lookup Table, with Carbon decoder crates.

Carbon 2.0.0 has decoder crates for 8 core and SPL programs on Solana: 164 instructions, 9 account types and 0 events in all. Use them to index SOL and token transfers, token accounts and mints, stake accounts and address lookup tables as typed Rust values instead of parsing raw bytes. Each program's page lists every instruction with its discriminator, data fields and accounts, every account and event, and a complete program that runs against the public RPC.

## Programs

Program IDs are the mainnet addresses compiled into each crate as `PROGRAM_ID`. Instruction counts exclude the `CpiEvent` wrapper.

| Program                                                                                       | Crate                                     | Program ID                                     | Instructions | Accounts | Events |
| --------------------------------------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------- | -----------: | -------: | -----: |
| [Address Lookup Table](https://carbon.sevenlabs.org/decoders/address-lookup-table.md)         | `carbon-address-lookup-table-decoder`     | `AddressLookupTab1e1111111111111111111111111`  |            5 |        1 |      0 |
| [Associated Token Account](https://carbon.sevenlabs.org/decoders/associated-token-account.md) | `carbon-associated-token-account-decoder` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` |            3 |        0 |      0 |
| [SPL Memo](https://carbon.sevenlabs.org/decoders/memo-program.md)                             | `carbon-memo-program-decoder`             | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr`  |            1 |        0 |      0 |
| [SPL Name Service](https://carbon.sevenlabs.org/decoders/name-service.md)                     | `carbon-name-service-decoder`             | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX`  |            5 |        1 |      0 |
| [SPL Token](https://carbon.sevenlabs.org/decoders/token-program.md)                           | `carbon-token-program-decoder`            | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`  |           28 |        3 |      0 |
| [Stake Program](https://carbon.sevenlabs.org/decoders/stake-program.md)                       | `carbon-stake-program-decoder`            | `Stake11111111111111111111111111111111111111`  |           18 |        0 |      0 |
| [System Program](https://carbon.sevenlabs.org/decoders/system-program.md)                     | `carbon-system-program-decoder`           | `11111111111111111111111111111111`             |           13 |        1 |      0 |
| [Token-2022](https://carbon.sevenlabs.org/decoders/token-2022.md)                             | `carbon-token-2022-decoder`               | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`  |           91 |        3 |      0 |

## Decode several in one pipeline

Add `carbon-core` and the decoder crates you need, all at the same version. For every program in this category:

```sh
cargo add carbon-core@2.0.0 carbon-address-lookup-table-decoder@2.0.0 carbon-associated-token-account-decoder@2.0.0 carbon-memo-program-decoder@2.0.0 carbon-name-service-decoder@2.0.0 carbon-token-program-decoder@2.0.0 carbon-stake-program-decoder@2.0.0 carbon-system-program-decoder@2.0.0 carbon-token-2022-decoder@2.0.0
```

Register each decoder with a processor for its instruction enum. This fragment goes in your pipeline setup; the processors are yours, one per program, each implementing `Processor` for that program's instruction input (see [processors](https://carbon.sevenlabs.org/concepts/processors.md)):

```rust
use carbon_token_program_decoder::TokenProgramDecoder;
use carbon_token_2022_decoder::Token2022Decoder;
use carbon_system_program_decoder::SystemProgramDecoder;

Pipeline::builder()
    .datasource(datasource) // a datasource that emits these programs' transactions
    .instruction(TokenProgramDecoder, TokenProgramProcessor)
    .instruction(Token2022Decoder, Token2022Processor)
    .instruction(SystemProgramDecoder, SystemProgramProcessor)
    .build()?
    .run()
    .await
```

Each decoder only returns instructions whose program ID matches its own `PROGRAM_ID`, so one pipeline can hold all of them. For datasource filters that follow several programs, and one processor that sees every program's instructions in a transaction, see [index multiple programs](https://carbon.sevenlabs.org/guides/multiple-programs.md).

## Guides

- [Index token transfers](https://carbon.sevenlabs.org/guides/index-token-transfers.md)

## A program that is not listed

Generate a decoder from the program's Anchor or Codama IDL with the Carbon CLI: see [generate a decoder](https://carbon.sevenlabs.org/guides/generate-a-decoder.md). Every crate above was generated the same way. The [full catalog](https://carbon.sevenlabs.org/decoders.md) lists decoders in every category.

---

Carbon 2.0.0 documentation · Web: https://carbon.sevenlabs.org/decoders/core-and-spl · Last updated 2026-11-09 · Index of all pages: https://carbon.sevenlabs.org/llms.txt
