Elon4AfD Logo

NFT Generator

Swagger API Docs
API Authentication
Annual Percentage Yield (e.g., 66 for 66%)
Leave blank for random background
Leave blank for random avatar
Upload the generated image to IPFS via Pinata
Generated NFT
Generated NFT

Successfully saved to IPFS

IPFS Hash:

View on IPFS Gateway

Loading...

Generating NFT...

1. Introduction

Welcome to the NFT Generator! This application allows you to create unique NFT bonds with customizable parameters. The generated bonds are stored in a database and can be backed up for safekeeping.

1.1 What are Bond NFTs?

Bond NFTs represent financial instruments that combine cryptocurrency assets with Elon4AfD tokens. Each bond has specific parameters such as frame type, asset types, amounts, lock periods, and APY (Annual Percentage Yield).

2. Authentication

This application uses Bearer Token authentication to secure API endpoints. The token management interface is located at the top of the Generator tab.

2.1 Token Management

  • View/Hide Token: Click the eye icon to toggle visibility of your token
  • Save Token: Stores your token in the browser's localStorage for persistence
  • Clear Token: Removes the stored token from localStorage
  • Verify Token: Checks if your token is valid by making a request to the API

The default API token is: elon4afd_secret_token_89734598237459

3. Generating NFT Bonds

To create a new NFT bond, fill out the form in the Generator tab with your desired parameters:

3.1 Bond Parameters

  • Frame Type: Choose from Standard, Rare, Legendary, or Mystery frames
  • Asset 1 Type: Select WBTC, SOL, or USDC as the primary asset
  • Asset 1 Amount: Specify the amount of the primary asset
  • Elon4AfD Amount: Set the amount of Elon4AfD tokens
  • Lock Period: Choose between 3, 6, 12, or 36 months
  • APY Percentage: Set the annual percentage yield (default: 66%)
  • Background ID: Optional - specify a background or leave blank for random
  • Avatar ID: Optional - specify an avatar or leave blank for random

3.2 Generated NFT

After submission, the application will generate a unique NFT bond image and display it on the right side of the screen. The image will include:

  • Visual representation of your bond with the selected frame
  • Asset information and amounts
  • Lock period and APY
  • IPFS hash for decentralized storage

4. Bond History

All generated bonds are stored in the application's database and displayed in the Bond History section below the generator. Each bond thumbnail shows:

  • A preview of the generated NFT image
  • Frame type
  • Asset information
  • Lock period

4.1 History Management

You can manage your bond history with the following options:

  • Backup Bonds: Export all bonds to a JSON file for safekeeping
  • Clear History: Remove all bonds from the display (note: this doesn't delete them from the database)
  • View Bond: Click on any bond thumbnail to view it in a lightbox

5. IPFS Integration

This application uses IPFS (InterPlanetary File System) to store NFT bond images in a decentralized manner. Two IPFS options are available:

5.1 Local IPFS Node

By default, the application attempts to connect to a local IPFS node at /ip4/127.0.0.1/tcp/5001. If no local node is available, the application will generate mock IPFS hashes for testing purposes.

5.2 Pinata IPFS

The application now supports Pinata, a popular IPFS pinning service that provides reliable and persistent storage for your NFT bond images.

To use Pinata:

  1. Sign up for a Pinata account at https://www.pinata.cloud/
  2. Generate API keys in your Pinata dashboard
  3. Configure the application with your Pinata credentials using the /configure-pinata API endpoint

Benefits of using Pinata:

  • Persistent storage without running your own IPFS node
  • Higher availability and reliability
  • Faster retrieval times through Pinata's optimized gateway

6. API Documentation

The application provides several API endpoints for programmatic interaction:

GET /verify-token
Verifies if the provided bearer token is valid. Requires authentication.
POST /generate-token
Generates a new secure API token. Requires authentication with an existing token.
GET /bonds
Retrieves all bonds from the database. Requires authentication.
GET /backup
Creates a backup of all bonds as a JSON file. Requires authentication.
POST /generate-nft
Generates a new NFT bond image based on provided parameters. Authentication is optional but recommended.
GET /pinata-status
Checks the status of Pinata IPFS integration, including configuration and connection status. Requires authentication.
POST /configure-pinata
Configures Pinata IPFS integration settings, including API keys and enabling/disabling the integration. Requires authentication.

6.1 Authentication

Protected endpoints require a valid bearer token in the Authorization header:

Authorization: Bearer elon4afd_secret_token_89734598237459

6.2 Complete API Documentation

For a complete interactive API documentation, visit the Swagger UI by clicking the API Docs button in the header.

IPFS Settings

Pinata IPFS Configuration
Checking status...

Configure Pinata IPFS integration for reliable, decentralized storage of your NFT bond images. Sign up for Pinata to get your API keys.

You can provide either API Key + Secret Key OR JWT token.

Bond History

No history yet. Generate your first bond to see it here.