---
title: Reading from Network
description:
  Learn how to read data from the Solana blockchain network. This guide covers
  fetching wallet accounts, program accounts, and token mint accounts with
  JavaScript/TypeScript examples using Solana Kit.
---

Read data from the Solana network by fetching different accounts. This guide
explains the structure of Solana [accounts](/docs/core/accounts). Each Solana
account has a unique
[address](/docs/core/accounts/account-structure#account-address) that is used to
locate the account's onchain data. Solana accounts contain either
[state data or an executable program](/docs/core/accounts/account-types).

## Fetch a wallet account

<WithMentions>

A wallet account is an account owned by the
[System Program](/docs/core/programs/builtin-programs#the-system-program).
Wallet accounts are primarily used to hold SOL and sign transactions. When SOL
is sent to a new address for the first time, a system account is automatically
created.

The example below [creates a Kit client](mention:client), generates a
[new signer](mention:keypair), [requests SOL](mention:airdrop) to fund the new
address, and [retrieves the account data](mention:info) from the client's RPC
API.

<CodeTabs flags="r">

```ts !! title="Fetch account"
import { createClient, generateKeyPairSigner, lamports } from "@solana/kit";
import { solanaRpc, rpcAirdrop } from "@solana/kit-plugin-rpc";
import { generatedPayer } from "@solana/kit-plugin-signer";

// !mention(1:9) client
const client = await createClient()
  .use(generatedPayer())
  .use(
    solanaRpc({
      rpcUrl: "http://localhost:8899",
      rpcSubscriptionsUrl: "ws://localhost:8900"
    })
  )
  .use(rpcAirdrop());

// !mention keypair
const signer = await generateKeyPairSigner();
console.log(`Address: ${signer.address}`);

// Funding an address with SOL automatically creates an account
// !mention airdrop
await client.airdrop(signer.address, lamports(1_000_000_000n));

// !mention info
const accountInfo = await client.rpc.getAccountInfo(signer.address).send();

console.log(accountInfo);
```

</CodeTabs>
</WithMentions>

<ScrollyCoding>

## !!steps

When you fetch a wallet account with `getAccountInfo()`, Kit returns the RPC
response shown in the example output on the right.

The response has two top-level fields: `context` describes when the read
happened, and `value` contains the account fields returned by the RPC method.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `context` field shows the slot used to read the account and the RPC API
version that served the response. A later read can return a different slot or
API version.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  // !focus(1:4)
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `value` field contains the account state returned by the RPC method. The
following steps walk through the fields inside `value` in the order the fields
appear.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  // !focus(1:8)
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `lamports` field contains the account's SOL balance, measured in
[lamports](/docs/references/terminology#lamport), the smallest unit of SOL.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    // !focus
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `data` field contains the account's data stored as bytes. RPC returns
account data as a tuple: the encoded data string, followed by the encoding. For
wallet accounts, the encoded data string is empty because the account stores 0
bytes of data.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    // !focus
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `owner` field shows the program that owns the account. For wallets, the
owner is always the System Program, with the address
`11111111111111111111111111111111`.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    // !focus
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `executable` field tells you whether the account's address is callable.
`true` means the address represents a program that can process instructions.
`false` means the account stores state, such as a wallet balance or account
data, and is not called as a program. Wallet accounts use `false`.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    // !focus
    executable: false,
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `rentEpoch` field is a legacy field from a deprecated rent mechanism. The
field is still returned for backward compatibility.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    // !focus
    rentEpoch: 0n,
    space: 0n
  }
}
```

## !!steps

The `space` field shows the number of bytes contained in the `data` field. The
`space` field is returned with the account-fetching response, but it is not part
of the account's data type.

For the wallet account example, the `space` field is 0 because the `data` field
contains 0 bytes of data.

<CodePlaceholder title="Example output" />

```ts !! title="Example output"
{
  context: {
    slot: 420602714n,
    apiVersion: "3.1.6"
  },
  value: {
    lamports: 1000000000n,
    data: ["", "base64"],
    owner: "11111111111111111111111111111111",
    executable: false,
    rentEpoch: 0n,
    // !focus
    space: 0n
  }
}
```

</ScrollyCoding>

## Fetch the Token Program

The example below fetches the Token Program to demonstrate the difference
between wallet and program accounts. The Token Program defines instructions for
working with tokens, such as creating and transferring tokens. Programs are
invoked to process instructions. Program state, such as token data and balances,
are stored in separate accounts owned by the program.

The Token Program's address is the onchain Program account. For simplicity, you
can think of the program address as the program, because that is the address
used to invoke it. For upgradeable programs, the Program account stores metadata
and points to a separate ProgramData account that stores the deployed executable
code. You can view the Token Program
[source code](https://github.com/solana-program/token/tree/main/program) and the
Program account on the
[Solana Explorer](https://explorer.solana.com/address/TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA).

<CodeTabs flags="r">

```ts !! title="Fetch program account"
import { address, createClient, fetchJsonParsedAccount } from "@solana/kit";
import { solanaRpc } from "@solana/kit-plugin-rpc";
import { generatedPayer } from "@solana/kit-plugin-signer";

const client = await createClient()
  .use(generatedPayer())
  .use(
    solanaRpc({
      rpcUrl: "https://api.mainnet.solana.com"
    })
  );

// !mark(1:3)
const tokenProgramAddress = address(
  "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
);

// !mark(1:5)
const accountInfo = await client.rpc
  .getAccountInfo(tokenProgramAddress, {
    encoding: "base64"
  })
  .send();

console.log(accountInfo);

// !mark(1:4)
const parsedAccount = await fetchJsonParsedAccount(
  client.rpc,
  tokenProgramAddress
);

console.log(parsedAccount);
```

</CodeTabs>

<ScrollyCoding>

## !!steps

The Token Program is an executable program account. Programs have the same
underlying fields as all [accounts](/docs/core/accounts/account-structure), but
with key differences.

The Token Program example uses `base64` encoding to return the Program account's
raw data.

The following steps walk through the fields inside `value` in the order the
fields appear.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

The `data` field stores the BPF Upgradeable Loader's Program account state. The
first tuple item contains the full account data encoded as base64. The second
tuple item identifies the encoding. Here, the 36 bytes include metadata and the
ProgramData account address.

For upgradeable programs, the Program account state points to the separate
ProgramData account that stores the program's executable code.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    // !focus
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

The `executable` field is set to `true`, which indicates that the account's
address can be invoked as a program.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    // !focus
    executable: true,
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

The `lamports` field contains the SOL balance held by the Program account.
Program accounts need enough lamports to remain rent-exempt.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    // !focus
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

Every program account is owned by a
[loader program](/docs/core/programs/program-deployment#loader-programs). For
the Token Program account, the `owner` is the BPF Upgradeable Loader.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    lamports: 2191440n,
    // !focus
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

The `rentEpoch` field is a legacy field from a deprecated rent mechanism. The
field is still returned for backward compatibility.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    // !focus
    rentEpoch: 18446744073709551615n,
    space: 36n
  }
}
```

## !!steps

The `space` field shows the full size of the Program account's data in bytes.
The `space` value is only `36` bytes because the Program account stores loader
metadata and the address of the ProgramData account, not the full compiled
program.

<CodePlaceholder title="Token program account" />

```ts !! title="Token program account"
{
  context: {
    apiVersion: "3.1.14",
    slot: 420601581n
  },
  value: {
    data: ["AgAAACfxkLHTr5i4znFMROjK3/n4/EXLjl+sQgLv+BENl903", "base64"],
    executable: true,
    lamports: 2191440n,
    owner: "BPFLoaderUpgradeab1e11111111111111111111111",
    rentEpoch: 18446744073709551615n,
    // !focus
    space: 36n
  }
}
```

## !!steps

The previous response returned the Program account's `data` field as a base64
tuple. The parsed response deserializes those bytes into named fields on the
`data` object. The `programData` field contains the address of the ProgramData
account that stores the executable program code.

<CodePlaceholder title="Parsed Token program account" />

```ts !! title="Parsed Token program account"
{
  executable: true,
  lamports: 43712780n,
  programAddress: "BPFLoaderUpgradeab1e11111111111111111111111",
  space: 36n,
  address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  // !focus(1:4)
  data: {
    programData: "3gvYRKWyXRR9xKWe1ZjPhLY5ZJRN7KDB4rFZFGoJfFk2",
    parsedAccountMeta: { program: "bpf-upgradeable-loader", type: "program" }
  },
  exists: true
}
```

</ScrollyCoding>

## Fetch a mint account

A [mint account](/docs/tokens/basics/create-mint) is an account owned by the
Token Program that stores global metadata for a specific token. The mint account
stores the token's total supply, number of decimals, mint authority, and freeze
authority. The mint account's address uniquely identifies a token on the Solana
network.

The example below fetches the USD Coin Mint account to demonstrate how a
program's state is stored in a separate account. Exact balances and supply
values may differ depending on the slot your RPC node reads from.

<CodeTabs flags="r">

```ts !! title="Fetch mint account"
import { address, createClient } from "@solana/kit";
import { solanaRpc } from "@solana/kit-plugin-rpc";
import { generatedPayer } from "@solana/kit-plugin-signer";

const client = await createClient()
  .use(generatedPayer())
  .use(
    solanaRpc({
      rpcUrl: "https://api.mainnet.solana.com"
    })
  );

// !mark
const mintAddress = address("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");

// !mark(1:5)
const accountInfo = await client.rpc
  .getAccountInfo(mintAddress, {
    encoding: "base64"
  })
  .send();

console.log(accountInfo);
```

</CodeTabs>

<ScrollyCoding>

## !!steps

Mint accounts store state, not executable code. Mint accounts are owned by the
Token Program, which includes instructions defining how to create and update
mint accounts.

The following steps walk through the fields inside `value` in the order the
fields appear.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The `data` field contains the serialized `Mint` account state. The first tuple
item contains the full 82-byte account data encoded as base64. The second tuple
item identifies the encoding.

To read from a Mint account, you must deserialize the `data` field into the
`Mint` data type, which is shown in the
[next example](#deserialize-mint-account).

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    // !focus(1:4)
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The `executable` field indicates whether the account can be invoked as a
program. Mint accounts store state, so the `executable` field is `false`.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    // !focus
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The `lamports` field contains the SOL balance held by the mint account. The
lamports value is the mint account's rent-exempt balance, not the token supply.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    // !focus
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The mint account is owned by the
[Token Program](/docs/references/terminology#token-program). The mint account's
`data` field can only be modified by the Token Program's instructions.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    // !focus
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The `rentEpoch` field is a legacy field from a deprecated rent mechanism. The
field is still returned for backward compatibility.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    // !focus
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

## !!steps

The `space` field shows that the mint account contains 82 bytes of data.

<CodePlaceholder title="Mint account" />

```ts !! title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    // !focus
    space: 82n
  }
}
```

</ScrollyCoding>

## Deserialize mint account

Account data is stored in the `data` field in a serialized format. To read that
data as fields like `supply` or `decimals`, deserialize the `data` field into
the account type defined by the owning program. Most Solana programs provide
client libraries with helper functions for this step. These helpers return
structured account data, making the result easier to work with.

<WithMentions>

For example, the _shell`@solana-program/token`_ library includes the
[_ts`fetchMint()`_](mention:one) function to fetch a mint account and
deserialize the mint account's `data` field into the
[Mint](https://github.com/solana-program/token/blob/program%40v8.0.0/program/src/state.rs#L16-L30)
data type defined by the Token Program.

<CodeTabs flags="r">

```ts !! title="Deserialize mint account data"
import { address, createClient } from "@solana/kit";
import { solanaRpc } from "@solana/kit-plugin-rpc";
import { generatedPayer } from "@solana/kit-plugin-signer";
import { fetchMint } from "@solana-program/token";

const client = await createClient()
  .use(generatedPayer())
  .use(
    solanaRpc({
      rpcUrl: "https://api.mainnet.solana.com"
    })
  );

const mintAddress = address("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
// !mention one
const mint = await fetchMint(client.rpc, mintAddress);

console.log(mint);
```

</CodeTabs>

</WithMentions>

```rs title="Mint account type"
pub struct Mint {
    /// Optional authority used to mint new tokens. The mint authority may only
    /// be provided during mint creation. If no mint authority is present
    /// then the mint has a fixed supply and no further tokens may be
    /// minted.
    pub mint_authority: COption<Pubkey>,
    /// Total supply of tokens.
    pub supply: u64,
    /// Number of base 10 digits to the right of the decimal place.
    pub decimals: u8,
    /// Is `true` if this structure has been initialized
    pub is_initialized: bool,
    /// Optional authority to freeze token accounts.
    pub freeze_authority: COption<Pubkey>,
}
```

<ScrollyCoding>

## !!steps

The _ts`fetchMint()`_ function fetches a mint account and deserializes the mint
account's `data` field into the Mint account type.

```ts title="Mint account"
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    // !focus(1:4)
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

You can view the fully deserialized
[mint account](https://explorer.solana.com/address/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v?cluster=mainnet-beta)
data on the Solana Explorer.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `address` field contains the mint account's address.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  // !focus
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `data` field contains the deserialized `Mint` account state. The nested
fields in `data` come from the Token Program's `Mint` account type.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  // !focus(1:13)
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `data.mintAuthority` field shows the only account that can create new units
of the token.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    // !focus(1:4)
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `supply` field shows the total number of tokens that have been minted. The
supply value is measured in the smallest unit of the token. To get the total
supply in standard units, adjust the value of the `supply` field by the
`decimals`.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    // !focus
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `decimals` field shows the number of decimal places for the token.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    // !focus
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `isInitialized` field indicates whether the mint account has been
initialized. The `isInitialized` field is a security check used in the Token
Program.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    // !focus
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `data.freezeAuthority` field shows the account with authority to freeze
token accounts. A [token account](/docs/tokens/basics/create-token-account) is a
separate account that stores units of a token for an owner. When frozen, a token
account cannot transfer or burn its token balance.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    // !focus(1:4)
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `executable` field is false. The USDC mint account stores token state, so
the USDC mint account cannot be invoked as a program.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  // !focus
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `lamports` field contains the SOL balance held by the mint account. The
lamports value is the mint account's rent-exempt balance, not the token supply.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  // !focus
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `programAddress` field shows the program that owns the mint account. For
USDC, the owning program is the Token Program. Only the program that owns an
account can modify its `data` field through the program's deployed instructions.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  // !focus
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

## !!steps

The `space` field shows the size of the original mint account data in bytes. The
Token Program's base `Mint` account is 82 bytes.

<CodePlaceholder title="Decoded mint account" />

```ts !! title="Decoded mint account"
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  // !focus
  space: 82n
}
```

</ScrollyCoding>

### Serialized vs deserialized output

Both examples read the same USDC mint account. The first response leaves the
`data` field serialized. To read the mint account's contents, decode that data
as the account type defined by the owning program. For a mint account, the Token
Program defines the `Mint` type shown on the right.

<SideBySide>

### !left

Before decoding, the [`data`](mention:serialized-data) field contains serialized
account data.

```ts title="Serialized mint account" -w
{
  context: {
    slot: 325000000n,
    apiVersion: "3.1.14"
  },
  value: {
    // !mark(1:4)
    // !mention(1:4) serialized-data
    data: [
      "AQAAAJj+huiNm+Lqi8HMpIeLKYjCQPUrhCS/tA7Rot3LXhmbbq9O2SvsHwAGAQEAAABicKqKWcWUBbRShshncubNEm6bil06OFNtN/e0FOi2Zw==",
      "base64"
    ],
    executable: false,
    lamports: 407438077149n,
    owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    rentEpoch: 18446744073709551615n,
    space: 82n
  }
}
```

### !right

After decoding the data as a `Mint`, the [`data`](mention:decoded-data) field
contains named account fields.

```ts title="Deserialized mint account" -w
{
  address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  // !mark(1:13)
  // !mention(1:13) decoded-data
  data: {
    mintAuthority: {
      __option: "Some",
      value: "BJE5MMbqXjVwjAF7oxwPYXnTXDyspzZyt4vwenNw5ruG"
    },
    supply: 8985397351591790n,
    decimals: 6,
    isInitialized: true,
    freezeAuthority: {
      __option: "Some",
      value: "7dGbd2QZcCKcTndnHcTL8q7SMVXAkp688NTQYwrRCrar"
    }
  },
  executable: false,
  lamports: 407438077149n,
  programAddress: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
  space: 82n
}
```

</SideBySide>
