> 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/developers/v1-developer-material/functions-and-methods/linefactory.sol.md).

# LineFactory.sol

Core functions and methods of LineFactory.sol

Factory contract to automate the deployment and re-usage of Lines of Credit and related Spigot and Escrow features

<details>

<summary>External functions</summary>

```solidity
function deploySecuredLine(address borrower, uint256 ttl) external returns (address line)
function deploySecuredLineWithConfig(CoreLineParams calldata coreParams) external returns (address line
function deploySecuredLineWithModules(CoreLineParams calldata coreParams, address mSpigot, address mEscrow) external returns (address line)
function rolloverSecuredLine(address payable oldLine, address borrower, uint256 ttl) external returns (address line)
function deploySpigot(address owner, address operator) external returns (address)
function deployEscrow(uint32 minCRatio, address owner, address borrower) external returns (address)
```

</details>

<details>

<summary>Methods</summary>

`function deploySecuredLine():` Deploys a Secured Line including a Spigot and a collateral escrow with default settings

`function deploySecuredLineWithConfig():` Deploys a Secured Line including a Spigot and a collateral escrow configured according to Borrower and Lender agreed terms

`function deploySecuredLineWithModules():` Deploys a new Secured Line and transfers ownership to that new Line of an existing Escrowed Token Collateral and Spigot

`function rolloverSecuredLine():` Allows a Borrower to set up a new Line based upon the terms of a currently active or repaid Line (or any other status)

`function deploySpigot():` Deploys a Spigot with default settings

`function deployEscrow():` Deploys a collateral escrow with default settings

</details>


---

# 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/developers/v1-developer-material/functions-and-methods/linefactory.sol.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.
