Skip to content

This repository showcases how you can easily add Saturn NFT Creation APIs to your application!

Notifications You must be signed in to change notification settings

orwhaleian/SaturnIntegration

 
 

Repository files navigation

Saturn API Documentation Example

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


One - Click Multisig Minting Test

  1. Pull this repository with:
git clone [email protected]:Orion-Crypto/SaturnIntegration.git
  1. To install all dependencies, run:
npm i
  1. 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!

APIKey

  1. 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=
  1. Finally, to start this repository, run:
npm run dev
  1. 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.

SaturnMultiSigMintingButton

  1. Sign the transaction and you have successfully minted an NFT using Saturn with 1 button click!

Using the Saturn API To Implement Your Own Cardano Multisig Minting Engine

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:

  1. The front end javascript found in pages/index.tsx
  2. 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/
  3. The NextJS API routes found in pages/api/ that are called by the front end request functions.
  4. 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


Additional - Mercury Chat Integration

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>

About

This repository showcases how you can easily add Saturn NFT Creation APIs to your application!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.3%
  • TypeScript 14.7%