This repository is for the Cardano Saturn NFT documentation example. This example will go through a simple 1 - click multisig mint. If you would like additional API examples, contact us on Twitter, on Discord, or on the Mercury Chat Town Square
- Pull this repository with:
git clone [email protected]:Orion-Crypto/SaturnIntegration.git
- To install all dependencies, run:
npm i
- Get an API key from Saturn. By connecting and signing into https://saturnnft.io/. The site uses 1 - click wallet login, so no username or password required!
- Create a .env file in the top level of this repo by copy and pasting the file /devops/environment/example.env and renaming it to .env. Paste your Saturn API Key into the SATURN_API_KEY field
NEXT_PUBLIC_SATURN_GRAPHQL_API_URL=https://api.saturnnft.io/graphql/
SATURN_API_KEY=
- Finally, to start this repository, run:
npm run dev
- Navigate to localhost:3000 in your browser, now click the "Create And Mint Test NFT With Saturn" button.
Note: With the default version of the code, this will only work with nami. You can change window.cardano.nami in this code to the wallet of your choice.
- Sign the transaction and you have successfully minted an NFT using Saturn with 1 button click!
Saturn uses a series of GraphQL apis for its minting engine. You can read all of the available apis in the Saturn API Documentation.
This repository is split into 4 parts:
- The front end javascript found in
pages/index.tsx
- The API request functions that we use to call the built in NextJS API routes to protect our Saturn API key found in
src/api/Requests/
- The NextJS API routes found in
pages/api/
that are called by the front end request functions. - The Saturn GraphQL APIs that are found in
src/api/GraphQL
To setup your own multisign minting engine. Copy the pattern for the above parts for whichever Saturn APIs you need.
If you need any help, feel free to reach out on Twitter, on Discord, or on the Mercury Chat Town Square =D
In addition to the Saturn APIs, if your DAPP wants to have built in user chat, we have provided an example of how to implement that here as well =)
import MercuryChat from '@mercury-chat/react-chat'
<div>
<MercuryChat />
</div>