# circomlib

[circomlib is a companion repository](https://github.com/iden3/circomlib) to the Circom language officially released and maintained by Iden3. It contains all of the necessary primitives you need for basic operations within your circuits. The circomlib library is similar to [`@openzeppelin/contracts`](https://github.com/OpenZeppelin/openzeppelin-contracts) for Solidity in premise. Accompanying the main circomlib library is the  [`circomlibjs`](https://github.com/iden3/circomlibjs) JavaScript-based library. All components [contained in the circomlib library](https://github.com/iden3/circomlib/tree/master/circuits) can be driven using circomlibjs.\
\
As you begin to extend these templates into your own circuits, make sure to keep [*Anonymous Templates* ](https://github.com/iden3/circom/blob/master/mkdocs/docs/circom-language/anonymous-components-and-tuples.md)in mind. Check out *Circom Language > Components and Templates* *> Anonymous Templates* for an exploration of the shortcut on one-time use of components.

This section only contains the essential, easy-to-use components provided by circomlib. The components not included are for those who do not need BattleZips!

{% hint style="info" %}
The [circomlib repository contains unit testing for all of its templates](https://github.com/iden3/circomlib/tree/master/test). Use them for additional insight into their integration with your circuits.
{% endhint %}


---

# 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://battlezips.gitbook.io/battlezips/development/circomlib.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.
