This is a simple React example repo to demonstrate the React SDK. This repo uses NextJS, TypeScript, wagmi, and Tailwind.
First, make sure you have a WalletConnect ID and store that in a .env.local
file:
NEXT_PUBLIC_WC_PROJECT_ID=<YOUR_WC_PROJECT_ID>
NEXT_PUBLIC_RPC_PROVIDER_URL=https://rpc.ankr.com/eth_sepolia // Optionally use your own RPC provider
Next, install the packages:
npm i
# or
yarn
# or
pnpm i
You can now run the repo:
npm run dev
# or
yarn dev
# or
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
If you are having issues with types not importing correctly, change "moduleResolution": "bundler",
to "moduleResolution": "node",
in your tsconfig.json
In this tutorial, we will:
- (Optional) Create an NFT, if you don't have one already
- Register that NFT onto the IP Asset registry, as an IP Asset (IPA) (
RegisterIpAsset.tsx
) - (Optional) Create a Policy, if you don't want to use a pre-existing Policy (
.tsx
). Note: You want to set commercialUse = false, and derivativesAllowed = true to keep this demonstration easier. - Attach the Policy terms to your IPA (
AddPolicyToIpAsset.tsx
) - Mint a License NFT for your IPA
Next, using the License NFT you can register another NFT as a derivative 6. (Optional) Create an NFT, if you don't have one already 7. Register another NFT as a derivative of the original one by specifying the ipId and licenseId