LIBRARY USAGE
BACKEND INTEGRATION:
- Import the - Sinqlaritymodule from the "Triweb" library.
- Initialize the - Sinqlarityinstance with your- project_Id,- sinqlarityKey, and- sinlaritySecret. These credentials likely authenticate your backend with SinQlarity.
- Generate an authentication token for backend operations using - sinqlarity.getAuthenticationToken(). This token can have a customizable expiration time.
FRONTEND INTEGRATION:
- Import the - SinqlarityClientmodule from the "SinQlarity" library along with constants for- NETWORKSand- CONTRACTS.
- Transfer the - sinqlarityAuthenticationTokenobtained from the backend to the front end.
- Initialize the - SinqlaritySlientinstance on the front end using the transferred authentication token.
- Execute smart contract functions on the front end using - sinqlarityClient.execute(NETWORKS.POLYGON, CONTRACTS.NFT_MARKET_PLACE.MINT_NFT, data).
WALLET INTEGRATION:
- To enable MetaMask integration, you can use - sinqlarityClient.authenticatewhen a user logs in with MetaMask.
- After authorization, the frontend can continue to execute operations on any chain by calling - sinqlarityClient.executeas needed.
Last updated