LIT Protocol: Create a MintLIT NFT with LIT Protocol and IPFS
Learn how to create a MintLIT NFT with LIT Protocol and IPFS.
Last updated
Was this helpful?
Learn how to create a MintLIT NFT with LIT Protocol and IPFS.
Last updated
Was this helpful?
LIT Protocol is a decentralized blockchain-based platform designed to allow users to transact and exchange digital assets in a secure, transparent, and trustless manner. LIT Protocol enables users to create and trade synthetic assets that are backed by real-world assets, such as fiat currencies, commodities, and stocks, using smart contracts.
A MintLIT NFT is a type of NFT created with LIT Protocol that has an unlockable functionality. These NFTs can be used to gate certain content and make it exclusive for the NFT holder.
Read below to learn how to create a MintLIT NFT with LIT Protocol and IPFS.
yarn add @lit-protocol/sdk-browser
yarn add lit-js-sdk
git clone https://github.com/LIT-Protocol/MintLIT.git
cd MintLIT
yarn
src/Mint.js
file. Replace lines 191-203 with the following content:Replace the FILEBASE_API_KEY with your Filebase IPFS Pinning Service API key.
Then copy the generated Secret Access Token:
src/Mint.js
file, replace line 211 with the following:const fileUrl = https://gateway-name.myfilebase.com/ipfs/${ipfsCid}
A new window will open prompting you to provide a gateway name and select the gateway’s access level.
Gateway names are subject to the same naming restrictions as bucket names. All gateway names must be lowercase, between 3-63 characters, and must be unique.
Select ‘Public’, then select ‘Create Gateway’.
src/Mint.js
file. Then, build your app with the following commands:yarn build
yarn global add serve
serve -s build
localhost:3000
:You can test the visibility of the ‘Unlock’ and ‘Lock’ feature with the toggle button in the top right.
The API Key can be generated by navigating to the , then viewing the IPFS Pinning Service API Endpoint. Click the drop down menu for 'Choose Bucket to Generate Token', then choose the IPFS Filebase Bucket you want to use.
Replace ‘Gateway Name
’ with your Filebase IPFS dedicated gateway name. To create an IPFS dedicated gateway, navigate to the on the Filebase web console. Then select the ‘Create Gateway’ button in the upper right corner.