> For the complete documentation index, see [llms.txt](https://sinqlarity.gitbook.io/sinqlarity-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sinqlarity.gitbook.io/sinqlarity-docs/getting-started/library-usage.md).

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