# Ledger Entry Common Fields

[Source](https://github.com/XRPLF/rippled/blob/release/3.4.x/src/libxrpl/protocol/LedgerFormats.cpp)

Every entry in a [ledger](/es-es/docs/concepts/ledgers)'s state data has the same set of common fields, plus additional fields based on the [ledger entry type](/es-es/docs/references/protocol/ledger-data/ledger-entry-types). Field names are case-sensitive. The common fields for all ledger entries are:

| Field | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Required? | Description |
|  --- | --- | --- | --- | --- |
| `index` or `LedgerIndex` | String | UInt256 | No | The unique ID for this ledger entry. In JSON, this field is represented with different names depending on the context and API method. (Note, even though this is specified as "optional" in the code, every ledger entry should have one unless it's legacy data from very early in the XRP Ledger's history.) |
| `LedgerEntryType` | String | UInt16 | Yes | The type of ledger entry. Valid [ledger entry types](/es-es/docs/references/protocol/ledger-data/ledger-entry-types) include `AccountRoot`, `Offer`, `RippleState`, and others. |
| `Flags` | Number | UInt32 | Yes | Set of bit-flags for this ledger entry. |
| `Sponsor` | String | AccountID | No | The sponsor paying the owner reserve for this ledger entry. When present, this indicates that the reserve burden for this entry has shifted from the owner to the sponsor. See [Sponsor](#sponsor) for a list of ledger entry types that support sponsorship. _Requires the [Sponsor amendment](/resources/known-amendments#sponsor). (Open for Voting: 17.14%)_ |


In JSON, the ledger entry ID is in the `index` or `LedgerIndex` field. This is not the same as a [ledger index](/docs/references/protocol/data-types/basic-data-types#ledger-index) in the `ledger_index` field.

## Ledger Entry ID

[Source](https://github.com/XRPLF/rippled/blob/release/3.4.x/src/libxrpl/protocol/Indexes.cpp)

Each ledger entry has a unique ID. The ID is derived by hashing important contents of the entry, along with a *namespace identifier* which is a 16 bit value. The [ledger entry type](/es-es/docs/references/protocol/ledger-data/ledger-entry-types) determines the namespace identifier to use and which contents to include in the hash. This ensures every ID is unique. The hash function is [SHA-512Half](/docs/references/protocol/data-types/basic-data-types#hashes).

Generally, a ledger entry's ID is returned as the `index` field in JSON, at the same level as the object's contents. In [transaction metadata](/es-es/docs/references/protocol/transactions/metadata), the ledger entry's ID in JSON is `LedgerIndex`.

Offer directories have special IDs, where part of the hash is replaced with the exchange rate of Offers in that directory.

[](/assets/ledger-object-ids.a22380b075c431155a6c70cf3275f168b2b4f8c72b0aa6f774689c95ab742ece.ac57e6ef.svg)

## Flags

Flags are on/off settings, which are represented as binary values that are combined into a single number using bitwise-OR operations. The bit values for the flags in ledger entries are different than the values used to enable or disable those flags in a transaction. Ledger state flags have names that begin with **`lsf`**.

The possible values for the flags field vary based on the ledger entry type. Some ledger entry types have no flags defined. In these cases, the `Flags` field always has the value `0`.

## Sponsor

_Requires the [Sponsor amendment](/resources/known-amendments#sponsor). (Open for Voting: 17.14%)_

The `Sponsor` field may appear on the following ledger entry types:

- [AccountRoot entry](/docs/references/protocol/ledger-data/ledger-entry-types/accountroot)
- [Check entry](/docs/references/protocol/ledger-data/ledger-entry-types/check)
- [Credential entry](/docs/references/protocol/ledger-data/ledger-entry-types/credential)
- [Delegate entry](/docs/references/protocol/ledger-data/ledger-entry-types/delegate)
- [DepositPreauth entry](/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth)
- [Escrow entry](/docs/references/protocol/ledger-data/ledger-entry-types/escrow)
- [MPToken entry](/docs/references/protocol/ledger-data/ledger-entry-types/mptoken)
- [MPTokenIssuance entry](/docs/references/protocol/ledger-data/ledger-entry-types/mptokenissuance)
- [PayChannel entry](/docs/references/protocol/ledger-data/ledger-entry-types/paychannel)
- [SignerList entry](/docs/references/protocol/ledger-data/ledger-entry-types/signerlist)


[RippleState](/es-es/docs/references/protocol/ledger-data/ledger-entry-types/ripplestate) entries also support sponsorship, but use the `HighSponsor` and `LowSponsor` fields instead of `Sponsor`.