LIBRARY USAGE
BACKEND INTEGRATION:
Import the
Sinqlarity
module from the "Triweb" library.Initialize the
Sinqlarity
instance with yourproject_Id
,sinqlarityKey
, andsinlaritySecret
. 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
SinqlarityClient
module from the "SinQlarity" library along with constants forNETWORKS
andCONTRACTS
.Transfer the
sinqlarityAuthenticationToken
obtained from the backend to the front end.Initialize the
SinqlaritySlient
instance 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.authenticate
when a user logs in with MetaMask.After authorization, the frontend can continue to execute operations on any chain by calling
sinqlarityClient.execute
as needed.
Last updated