Multi-edition NFT
Request for a demo API. Our admin will send you an instruction email soon. ([email protected])
Diagram 1
Diagram 1 describes how the Luniverse Multi-edition NFT APIs work.
  • STEP 1) ERC721 Contract Deployment Firstly, you must deploy a Luiniverse NFT smart contract implementing the ERC721 standard on your blockchain environment to use NFT API. As Luniverse provides two deployment options for your convenience, choose an appropriate option between using Luniverse console or API. Here, you can see how to deploy the NFT contract using the Luniverse console.
  • STEP 2) Media Upload (image, music, video, or else digital assets) After the contract is ready, the digital media file must be uploaded to the file storage through the media APIs. Use any uploading API along with your implementation preference.
  • STEP 3) Metadata Creation Create metadata to specify the media resource for the token, and configure how many tokens are allowed to refer to the metadata. The metadata can contain the required and customizable properties of NFT, such as creator information and timestamp.
  • STEP 4) NFT Minting and transferring Using token APIs, mint a token or tokens that refer to the created metadata id in step 3. You can mint multiple non-fungible tokens having the same metadata by assigning each token a distinguishable edition id using editionNofield. Once minted, the tokens can be transferred from one wallet to another. Are you finding a way to control the massive tokens for your service? See our Bulk NFT API and with additional utility APIs for it!

Prerequisites

In order to use Luniverse NFT APIs, the following items need to be ready in advance.
  1. 1.
    Sign Up & Sign in to the Luniverse Developer Console.
  2. 2.
    Configure your IAM account and API Key permissions to use.
    • Confirm that the permission checkbox for NFT APIs is checked.
  3. 3.
    Create a chain environment for NFT contract deployment and NFT minting.
  4. 4.
    Create a valid Auth Token using the API Key for API access.

Authorization API

Using this API, you can get a valid auth token to be included in every request header for NFT APIs.
post
/svc/v2/auth-tokens
API to issue an authorization token

NFT Contract API

As deploying the NFT contract is a part of a configuration task, one-time use of Luniverse console without any API integration is enough in general. You can consider integrating these APIs when building remote contract management functionalities such as an admin system.
post
/svc/v2/nft/contracts
Deploy ERC721 contract.
get
/svc/v2/nft/contracts
Get deployed contracts list.
get
/svc/v2/nft/contracts/{contractId}
Get details of deployed ERC721 contract by contractId.

Media API

Luniverse supports multiple media uploading APIs, and will gradually support more methods to help flexible integration. Choose a suitable option for your dev environment among these available methods.

Media Resource Upload

Option 1) Media creation using direct file uploading through the HTTP Multipart request.
post
/svc/v2/nft/media
Create media resource for NFT from file upload (multipart/form)
Option 2) Media creation by passing a URL of the media resources, which is accessible by the public.
post
/svc/v2/nft/media/by-public-url
Create media resource from media access link
Option 3) Media creation using AWS S3 pre-signed URL based file upload.
This option is for developers demanding a stable file upload protocol that supports failure handling. Unlike the above two options that return the location assigned after completing the whole resource uploading, this option uses an intermediate link for file upload.
How to use pre-signed URL method for media upload
get
/svc/v2/nft/media/prepare
Fetch a pre-signed url that allows you to give temporary access to S3 objects.
post
/svc/v2/nft/media/by-prepared-key
Create media resource for NFT from a prepared resource key
get
/svc/v2/nft/media/preview
Fetch a preview image URL from pre-signed URL

Media Resource Management

These APIs are for information retrieving of uploaded media and object deletion.
get
/svc/v2/nft/media
Get a list of uploaded media.
get
/svc/v2/nft/media/{mediaId}
Get details of uploaded media.
delete
/svc/v2/nft/media/{mediaId}
Delete a uploaded media.

Metadata API

Metadata APIs are designed for managing NFT metadata to specify media resources and NFT properties. The created metadata properties can be modified except the maxMintLimit field until minted. But once referred to one or more active tokens, the metadata of the tokens would be frozen which means being non-modifiable.
post
/svc/v2/nft/metadata
Create metadata
get
/svc/v2/nft/metadata
Get a list of created metadata.
get
/svc/v2/nft/metadata/{metadataId}
Fetch detailed description of created metadata.
patch
/svc/v2/nft/metadata/{metadataId}
Modify a created metadata.
delete
/svc/v2/nft/metadata/{metadataId}
Delete a created metadata.

Tokens API

APIs to mint, burn, retrieve, and transfer tokens are provided as follows. Token listing API supports pagination and filtering options such as currentOwner, metadataId, and searchKeyword.
What is callback and how can I use it?
post
/svc/v2/nft/contracts/{contractId}/tokens
Mint an ERC721 token on a specific contract
get
/svc/v2/nft/contracts/{contractId}/tokens/{tokenId}
Get details of a minted ERC721 token by tokenId
get
/svc/v2/nft/contracts/{contractId}/tokens
Get list of minted tokens on a specific contract
post
/svc/v2/nft/token/transfer
Transfer a ERC721 token
post
/svc/v2/nft/token/transfer/signedTx
Transfer a ERC721 token (signedTx)
post
/svc/v2/nft/token/burn
Burn a created ERC721 token (for raw Tx submit)
post
/svc/v2/nft/token/burn/signedTx
Burn a created ERC721 token (for signed Tx submit)

NFT Utility APIs

APIs for token index reservation by metadata pre-assignment

The token index is sequentially assigned for each minting request on ERC721 contracts. You can reserve index slots for future minting by metadata assignment. The reservation can be helpful when grouping tokens by their ids for easy management and range search.
post
/svc/v2/nft/contracts/{contractId}/metadata
Add contract metadata
get
/svc/v2/nft/contracts/{contractId}/metadata
Get list of contract metadata
get
/svc/v2/nft/contracts/{contractId}/metadata/{contractMetadataId}
Get contract metadata detail

APIs for Bulk Minting

Bulk NFT minting APIs supports a massive number of token minting with a single request. As these APIs work like a batch process, status checking and retrying interfaces are also provided.
post
/svc/v2/nft/bulk-mintings
Create New BulkMinting
get
/svc/v2/nft/bulk-mintings
Get BulkMinting list.
get
/svc/v2/nft/bulk-mintings/{bulkMintingId}
Fetch detailed description of bulk minting
post
/svc/v2/nft/bulk-mintings/{bulkMintingId}/retry
Retry failed bulk-minting (after being set as RETRYABLE status by operator)

APIs for retrieving transaction receipts

Returns transaction receipts submitted to the contract. You can use one of the transaction identifier(s) among txId, txIds, txHash, txHashes.
get
/svc/v2/nft/environments/{environmentId}/contract-addresses/{contractAddress}/receipts
Get receipt(s) of transaction by one of [txId, txIds, txHash, txHashes]

APIs for NFT contract symbol image control

You can use these APIs to upload and change the symbol image of NFT.
post
/svc/v2/nft/contract-symbols/by-form-data
Create contract symbol image by uploading a image file.
post
/svc/v2/nft/contract-symbols/by-public-url
Create contract symbol image using key obtained with prepare request
get
/svc/v2/nft/contract-symbols/prepare
Fetch a pre-signed url that allows you to temporary access to upload symbol image.
post
/svc/v2/nft/contract-symbols/by-prepared-key
Create contract symbol using key obtained with prepare request
get
/svc/v2/nft/contract-symbols/preview
Fetch a preview image url that pushed in a pre-signed url.