LogoLogo
WebsiteDiscordTelegramX (Twitter)
  • About LightLink
    • What is LightLink?
    • Low Gas Fees
    • Enterprise Mode With Zero Fees
    • Benefits of Enterprise Mode
  • Using LightLink
    • Connecting a Wallet
    • Adding LL Tokens to Your Wallet
    • Bridging Assets
    • Getting Testnet Tokens
    • Use Cases
  • Building on LightLink
    • Live Networks
    • EVM and Solidity Basics
    • Smart Contracts
    • Boneh-Lynn-Shacham Signatures (BLS)
    • JSON-RPC Specification
    • Enterprise Mode Overview
    • Enabling Enterprise Mode
    • Developer AI Support
  • Tools for Developers
    • Bolt for Gasless NFT Minting
    • Block Explorers
    • Clients
    • IDEs
    • Toolchains
    • Data Indexers
    • Oracles and Random Number Generators
    • Deployed Contracts
    • SPACE ID Web3 Name SDK
  • Achitecture & Design
    • LightLink Protocol: Deep Dive
    • Bridge Architecture
    • Live Contracts Addresses
  • Miscellaneous
    • Brand Assets
    • Security Audits
    • Ecosystem Growth Program
Powered by GitBook
On this page
  • Start Using Bolt
  • Implement Bolt API calls to transmit data
  • Default Models
  • Retrieve Data With Endpoints
  1. Tools for Developers

Bolt for Gasless NFT Minting

PreviousDeveloper AI SupportNextBlock Explorers

Last updated 10 months ago

is LightLink's gasless NFT minting plugin.

It leverages LightLink’s for gasless transactions, providing instant, gasless NFT minting for games, rewards, loyalty cards, and more projects wanting to store data on-chain.

Bolt operates by combining AWS Lambda and SQS for seamless serverless function processing, eliminating manual server management.

Simple API integration for developers:

  1. Developers fill out a form to create a project account and receive an API key.

  2. Bolt sets up an ERC721 contract for the project.

  3. The project calls Bolt API and passes the NFT metadata.

  4. Projects send data to the Bolt API, which maps this data and mints NFTs. Users can specify an address to mint to, or provide a userId. If a userId is provided rather then an Ethereum address, a unique LightLink account is created for the user.

Start Using Bolt

Fill out the to set up an ERC721 contract for your application and obtain an API key.

Implement Bolt API calls to transmit data

curl --location 'https://bolt-dev.lightlink.io/{PROJECT_ID}/{USER_ID}/mint' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Epic Dragon",
  "description": "A rare and powerful dragon NFT.",
  "attributes": [
    {
      "trait_type": "Color",
      "value": "Red"
    },
    {
      "trait_type": "Rarity",
      "value": "Legendary"
    },
    {
      "trait_type": "Power",
      "value": 9001
    },
    {
      "trait_type": "Wingspan",
      "value": "15 meters"
    },
    {
      "trait_type": "Fire Breath",
      "value": "Intense"
    }
  ]
}'
import requests
import json

url = "https://bolt-dev.lightlink.io/{PROJECT_ID}/{USER_ID}/mint"

payload = json.dumps({
  "name": "Epic Dragon",
  "description": "A rare and powerful dragon NFT.",
  "attributes": [
    {
      "trait_type": "Color",
      "value": "Red"
    },
    {
      "trait_type": "Rarity",
      "value": "Legendary"
    },
    {
      "trait_type": "Power",
      "value": 9001
    },
    {
      "trait_type": "Wingspan",
      "value": "15 meters"
    },
    {
      "trait_type": "Fire Breath",
      "value": "Intense"
    }
  ]
})
headers = {
  'x-api-key': '{API_KEY}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"name\": \"Epic Dragon\",\n  \"description\": \"A rare and powerful dragon NFT.\",\n  \"attributes\": [\n    {\n      \"trait_type\": \"Color\",\n      \"value\": \"Red\"\n    },\n    {\n      \"trait_type\": \"Rarity\",\n      \"value\": \"Legendary\"\n    },\n    {\n      \"trait_type\": \"Power\",\n      \"value\": 9001\n    },\n    {\n      \"trait_type\": \"Wingspan\",\n      \"value\": \"15 meters\"\n    },\n    {\n      \"trait_type\": \"Fire Breath\",\n      \"value\": \"Intense\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("https://bolt-dev.lightlink.io/{PROJECT_ID}/{USER_ID}/mint")
  .method("POST", body)
  .addHeader("x-api-key", "{API_KEY}")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
const axios = require('axios');
let data = JSON.stringify({
  "name": "Epic Dragon",
  "description": "A rare and powerful dragon NFT.",
  "attributes": [
    {
      "trait_type": "Color",
      "value": "Red"
    },
    {
      "trait_type": "Rarity",
      "value": "Legendary"
    },
    {
      "trait_type": "Power",
      "value": 9001
    },
    {
      "trait_type": "Wingspan",
      "value": "15 meters"
    },
    {
      "trait_type": "Fire Breath",
      "value": "Intense"
    }
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://bolt-dev.lightlink.io/{PROJECT_ID}/{USER_ID}/mint',
  headers: { 
    'x-api-key': '{API_KEY}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Default Models

  • gameId: Game's ID

  • userId: User's ID

  • payload: Data payload

  • metadata: Metadata information

  • tokenId: Token's ID

  • walletAddress: Wallet's address (Unique)

  • walletId: Wallet's ID

  • externalId: External ID

  • gameId: Game's ID

  • userId: User's ID

  • gameId: Game's ID

  • tokenId: Token's unique string identifier

  • name: Name of the game

  • contractAddress: Game's contract address

  • imageUrl: Image URL for the game

  • mappingKey: Mapping key for the game

Retrieve Data With Endpoints

  • URL: /status

  • Method: GET

  • Response: { status: 'ok' }

  • URL: /users/:userId/stats

  • Method: GET

  • URL Parameters: userId (required) - ID of the user

  • Response:

    • Success: { success: true, data: userStats }

    • Error: { error: error message, url: requested URL }

  • URL: /games/:gameId/stats

  • Method: GET

  • URL Parameters: gameId (required) - ID of the game

  • Response:

    • Success: { success: true, data: gameStats }

    • Error: { error: error message, url: requested URL }

  • URL: /games/:gameId/users

  • Method: GET

  • URL Parameters: gameId (required) - ID of the game

  • Response:

    • Success: { success: true, data: users }

    • Error: { error: error message, url: requested URL }

  • URL: /:gameId/:userId/mint/

  • Method: POST

  • URL Parameters:

    • gameId (required) - ID of the game

    • userId (required) - The users ID, or Ethereum wallet.

  • Body: JSON object with metadata payload

  • Response:

    • Success: { success: true, data: postedStats }

    • Error: { error: error message, url: requested URL, body: sent data }

  • URL: /metadata/:gameId/:tokenId/

  • Method: GET

  • URL Parameters:

    • gameId (required) - ID of the game

    • gameId (required) - Numeric ID of the token

  • Response:

    • Success: { NftMetadata }

    • Error: { error: error message, url: requested URL, body: sent data }

Bolt
Enterprise Mode
form