> For the complete documentation index, see [llms.txt](https://docs.elara.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elara.fi/protocol-reference/reference/api-reference.md).

# API Reference

Auto-generated NatSpec contract documentation for Elara.

Every public and external function, event, error, and struct — sourced directly from NatSpec in the contracts and regenerated on each release via `forge doc`. If the code changed, the docs reflect it.

## Contracts

The generated reference covers all nine protocol contracts:

| Contract                                                                                              | Interface          | Description                       |
| ----------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------- |
| [`Vault`](/protocol-reference/reference/api-reference/vault/contract.vault.md)                        | `IVault`           | Minting, redeeming, yield routing |
| [`ElUSD`](/protocol-reference/reference/api-reference/token/contract.elusd.md)                        | `IElUSD`           | Protocol-issued token             |
| [`sElUSD`](/protocol-reference/reference/api-reference/token/contract.selusd.md)                      | `IsElUSD`          | Staking share token               |
| [`ElUSDStake`](/protocol-reference/reference/api-reference/staking/contract.elusdstake.md)            | `IElUSDStake`      | Staking pool                      |
| [`TreasuryAdapter`](/protocol-reference/reference/api-reference/treasury/contract.treasuryadapter.md) | `ITreasuryAdapter` | Treasury coordination             |
| [`PriceOracle`](/protocol-reference/reference/api-reference/oracle/contract.priceoracle.md)           | `IPriceOracle`     | Stablecoin collateral depeg guard |
| [`KYCRegistry`](/protocol-reference/reference/api-reference/vault/contract.kycregistry.md)            | `IKYCRegistry`     | KYC status management             |
| [`TokenRegistry`](/protocol-reference/reference/api-reference/vault/contract.tokenregistry.md)        | `ITokenRegistry`   | Collateral token configurations   |
| [`ElaraBase`](/protocol-reference/reference/api-reference/base/abstract.elarabase.md)                 | `IElaraBase`       | Shared upgradeable base           |

For integration patterns and code examples, see the [Integration Guide](/protocol-reference/guides/integration-guide.md). For error definitions and resolution steps, see the [Error Reference](/protocol-reference/reference/error-reference.md).
