Skip to content

Open Source Compoable NFT Upload API compatible with Metaplex NFT metadata standard. Built With NodeJS, Typescript

Notifications You must be signed in to change notification settings

seanlion/solana-nft-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana Composable NFT Uploader

uploader is a API to uploading Composable NFTs to the Arweave storage for use with the Mixture Machine. This tool is only for Solana devnet now.

Prerequisites

Please install or have installed the following:

  • nodejs and npm
  • typescript
  • babel
  • express
  • @project-serum/anchor
  • @solana/web3.js
  • @metaplex/arweave-cost
  • solana-cli

Or you can follow:

  • Clone it Into A Folder.
  • Install The Dependencies.(ex.cd solana-nft-upload npm install)

Please create solana keypair using solana-cli:

  • solana-keygen new --outfile {KEYPAIR_NAME}.json (need to run this command in a project home directory)

and set the solana config:

  • solana config set --keypair PROJECT_DIRECTORY/{KEYPAIR_NAME}.json

Set your environment variables(.env file):

  • Set your ASSETS folder path, and KEYPAIR path environment variables.

You'll also need some SOL. You can get SOL into your generated wallet by using solana airdrop command.

Start

  • Start Up The Server With npm run start
  • A server could be run with port 8082.

API Request

  • Call POST request with following request body data:
  • 'metadata' field is compatible with metaplex metadata standard.
  • We only support .png type for image now.
{
    "metadata" : {
         "name": "NFT NAME",
        "symbol": "NFT SYMBOL",
        "description": "NFT DESCRIPTION",
        "image": "{IMAGE_NAME}.{png}",
        "properties": {
        "files": [
            {
            "uri": "{IMAGE_NAME}.{png}",
            "type": "image/png"
            }
        ],
        "creators": [
            {
            "address": "{BASE58 ENCODED NFT CREATOR ACCOUNT ADDRESS}",
            "share": {NUMBER}
            }
        ],
        "children" : [
            {
            "pubkeys": [{BASE58 ENCODED CHILDREN TOKEN ACCOUNT ADDRESS}]
            }
        ]
        }
    },
    "network": "devnet",
    "composableNFTIndex": {IMAGE_NAME},
    "parentNFT": "{BASE58 ENCODED NFT ACCOUNT ADDRESS NEED TO BE COMPOSED}"
}
  • you need to generate key pair for composable nft before call this API.

About

Open Source Compoable NFT Upload API compatible with Metaplex NFT metadata standard. Built With NodeJS, Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published