> For the complete documentation index, see [llms.txt](https://docs.creditcoop.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.creditcoop.xyz/developer-material/v1-developer-material/functions-and-methods/libraries.md).

# Libraries

#### **LineLib.sol**

Stores basic functions for the Line of Credit e.g. health statuses and transferring tokens

#### **CreditLib.sol**

Stores basic functions for interacting with Lender positions e.g. computing ids for individual credit lines, accruing interest and repaying debt

#### **CreditListLib.sol**

Stores functionality for interacting with collections of Lender positions on a Line e.g. adding and removing positions or re-sorting positions in the repayment queue

#### SpigotLib.sol

Stores functionality for claiming revenue, updating revenue splits, updating stakeholder addresses and all other Spigot functions

#### SpigotedLineLib.sol

Stores functionality related to a Line which is secured by a Spigot

#### EscrowLib.sol

* Calculates the total value of collateral assets escrowed
* Calculates collateral ratio based on collateral value
* Ensures that whitelisted (enabled) collateral enabled has a price feed

#### LineFactoryLib.sol

Stores functionality related to deploying multiple contracts simultaneously

#### MutualConsent.sol

* Forked from <https://github.com/IndexCoop/index-coop-smart-contracts/blob/1acec44229b3aaf4a40dad2095b0cc6accb8fbfc/contracts/lib/MutualUpgrade.sol>
* Essentially a 2/2 multisig baked into your contract
* Ensures that two predefined addresses both sign a transaction with the same inputs and then executes the function with those parameters.

#### Chainlink Denominations


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.creditcoop.xyz/developer-material/v1-developer-material/functions-and-methods/libraries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
