# LIBRARY USAGE

**BACKEND INTEGRATION:**&#x20;

1. Import the `Sinqlarity` module from the "Triweb" library.
2. Initialize the `Sinqlarity` instance with your`project_Id`, `sinqlarityKey`, and `sinlaritySecret`. These credentials likely authenticate your backend with SinQlarity.
3. Generate an authentication token for backend operations using `sinqlarity.getAuthenticationToken()`. This token can have a customizable expiration time.

**FRONTEND INTEGRATION:**&#x20;

1. Import the `SinqlarityClient` module from the "SinQlarity" library along with constants for `NETWORKS` and `CONTRACTS`.
2. Transfer the `sinqlarityAuthenticationToken` obtained from the backend to the front end.
3. Initialize the `SinqlaritySlient` instance on the front end using the transferred authentication token.
4. Execute smart contract functions on the front end using `sinqlarityClient.execute(NETWORKS.POLYGON, CONTRACTS.NFT_MARKET_PLACE.MINT_NFT, data)`.

**WALLET INTEGRATION:**

1. To enable MetaMask integration, you can use `sinqlarityClient.authenticate` when a user logs in with MetaMask.
2. After authorization, the frontend can continue to execute operations on any chain by calling `sinqlarityClient.execute` as needed.


---

# 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://sinqlarity.gitbook.io/sinqlarity-docs/getting-started/library-usage.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.
