# Options Library

As we are not currently running a frontend for Option Tokens or Options Liquidity Mining, the Options Library is intended to allow protocols to easily integrate these into their own frontends.

[GitHub](https://github.com/Bond-Protocol/options-library)

[NPM](https://www.npmjs.com/package/@bond-protocol/options-library)

The main benefits of this library are as follows:

* Helper functions for common frontend tasks such as calculating prices, APRs, requesting commonly used data on Option Tokens etc
* Getter functions for contract addresses/ABIs on a per chain basis (initially, these will all be identical, and ideally will stay that way. However, past experience with our Bond contracts shows that there is a possibility they may diverge later).

The library uses [Viem](https://viem.sh), and some helper functions require a Viem [`PublicClient`](https://viem.sh/docs/clients/public.html) or [`WalletClient`](https://viem.sh/docs/clients/wallet.html) (the Viem equivalent of [Ethers](https://ethers.org/)' [`Provider`](https://docs.ethers.org/v6/api/providers/) and [`Signer`](https://docs.ethers.org/v6/api/providers/#Signer)) to be passed in - this is easiest for frontends using [wagmi](https://wagmi.sh) v1+, but we have included an example UI using the legacy Ethers based version of wagmi in order to demonstrate manual setup of a `PublicClient` and `WalletClient`.


---

# 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://dev.bondprotocol.finance/developers/options-library.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.
