LIBRARY USAGE

BACKEND INTEGRATION:

  1. Import the Sinqlarity module from the "Triweb" library.

  2. Initialize the Sinqlarity instance with yourproject_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:

  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.

Last updated