# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
