NFT
Make magic happen with your NFT superpowers
Create
Create a master edition NFT.
POST /sol/v1/nft/create_detach
Creating an NFT is just 1 simple API call, which internally does all the heavy lifting for you.
Uploads the image or anything you want to your choice of storage (IPFS or S3).
Creates an appropriate Metadata json file.
Uploads the metadata json file again to your choice of storage (IPFS or S3).
Finally mints your favorite NFT.
Body Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
wallet: Your wallet address who will be signing and paying the transaction fee
name: NFT Name
symbol: NFT Symbol
description: (optional) NFT description
attributes: (optional) attributes associated to this NFT. (You can create the attributes as an array of objects and then stringify it using
JSON.stringify
)external_url: (optional) any url to associate with the NFT
max_supply: (optional) Maximum number of clones/edition mints possible for this NFT. Default 0 for one-of-a-kind NFT.
royalty: (optional) represents how much percentage of secondary sales the original creator gets. Ranges from (0-100), 0 being the original creator gets nothing and 100 being the original creator gets the entire amount from the secondary sales
file: NFT Image
data: (Optional) Any digital data (.mp3/.wav/.mp4/.pdf/.json etc) that you want to put in the NFT
receiver: (optional) Account address which will receive the newly created NFT.
service_charge : (optional) - Transaction fee to be paid by the NFT creator for creating an NFT. This fee can be charged in SOL or any SPL-20 token. Below is the structure of the
service_charge
key.receiver: string - An address that will receive the service charge amount.
amount: number - The amount of currency to be charged.
token (optional): string - The address of the SPL token, the service charge currency. By default SOL is charged.
Charging Service charge in USDC:
Charging Service charge in SOL:
Response
You will get an encoded transaction in response which you can sign in your front end or back end using the same wallet used in the API.
We have already deployed a dev tool to sign and send transactions for quick testing https://shyft-insider.vercel.app/
Create V2
This API call allows an external wallet to pay the gas fee for creating NFT on behalf of the NFT creator. Moreover, this API is capable of performing everything that the V1 Create NFT API does.
This API is an improved version of the original Create NFT API. This API request allows an external wallet to pay the gas fee for creating NFT on behalf of the NFT creator.
NOTE: If your product is creating an end-user-facing platform for creating NFTs, then this API will be your best friend for onboarding users initially where, you can pay the gas fees for the NFTs that your users will create.
POST /sol/v2/nft/create
Creating an NFT, and is just 1 simple API call, which internally does all the heavy lifting for you.
Uploads the image or anything you want to your choice of storage (IPFS or S3).
Creates an appropriate Metadata json file.
Uploads the metadata json file again to your choice of storage (IPFS or S3).
If mentioned also pays the gas fee for the transaction from the mentioned account.
Finally mints your favorite NFT.
Body Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
creator_wallet: Your NFT creator's wallet address. By default, this address pays the transaction gas fee.
name: NFT Name
symbol: NFT Symbol
description: (optional) NFT description
collection_address: (optional) on-chain address of the collection represented by an NFT, with max_supply of 0.
attributes: (optional) attributes associated to this NFT. (You can create the attributes as an array of objects and then stringify it using
JSON.stringify
)external_url: (optional) any url to associate with the NFT
max_supply: (optional) Maximum number of clones/edition mints possible for this NFT. Default 0 for one-of-a-kind NFT.
royalty: (optional) represents how much percentage of secondary sales the original creator gets. Ranges from (0-100), 0 being the original creator gets nothing and 100 being the original creator gets the entire amount from the secondary sales
image: NFT Image
data: (Optional) Any digital data (.mp3/.wav/.mp4/.pdf/.json etc) that you want to put in the NFT
receiver: (optional) Account address which will receive the newly created NFT.
fee_payer: (optonal) If mentioned this is the account that will be used for paying the transaction gas fee.
service_charge
: (optional)
- Transaction fee to be paid by the NFT creator for creating an NFT. This fee can be charged in SOL or any SPL-20 token. Below is the structure of theservice_charge
key.receiver: string
- An address that will receive the service charge amount.amount: number
- The amount of currency to be charged.token(optional): string
- The address of the SPL token, the service charge currency. By default SOL is charged.
priority_fee: (optional) Prioritization fee of transaction in micro Lamports. A micro Lamport is 0.000001 Lamports.
Charging Service charge in USDC:
Charging Service charge in SOL:
Response
You will get an encoded transaction in response which you can sign in your front end or back end. 2 wallet address are needed to sign this txn:
creator_wallet
fee_payer
, only if specified in the API request.collection_address's collection_authority address, which is the update Authority of the collection NFT. Needed when, the txn was created with collection_address.
We have already deployed a dev tool to sign and send transactions for quick testing https://shyft-insider.vercel.app/
Create NFT from Metadata
This API allows you to create an NFT from an already uploaded metadata URI. The metadata_uri should open a JSON document complying with Metaplex Non-Fungible Token Standard. If the JSON doesn't follow the Metaplex standard then the API returns an error. The on-chain metadata of the NFT is fetched from the off-chain metadata present at the given URI.
POST /sol/v1/nft/create_from_metadata
Body Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
metadata_uri: URI that contains metadata of the NFT (metaplex non-fungible-standard) in JSON file format.
max_supply: (optional) Maximum number of clones/edition mints possible for this NFT. Default 0 for one-of-a-kind NFT.
collection_address: (optional) on-chain address of the collection represented by an NFT, with max_supply of 0.
receiver: (optional) Account address which will receive the newly created NFT.
fee_payer: (optional) If mentioned this is the account that will be used for paying the transaction gas fee.
service_charge
: (optional)
- Transaction fee to be paid by the NFT creator for creating an NFT. This fee can be charged in SOL or any SPL-20 token. Below is the structure of theservice_charge
key.receiver: string
- An address that will receive the service charge amount.amount: number
- The amount of currency to be charged.token(optional): string
- The address of the SPL token, the service charge currency. By default, SOL is charged.
priority_fee: (optional) Prioritization fee of transaction in micro Lamports. A micro Lamport is 0.000001 Lamports.
This API followed some rules and has some limitations:
Rules:
Inside metadata JSON the properties key should have a creators array. The 0th index of the creator address is the verified creator and if the array holds more than one creator inside it then others also are added in the on-chain metadata creators array with
{ verified: false }
.
0th index creator is also considered the
update_authority
of the NFT.
Limitation:
Solana transaction size is limited to 1232 bytes
. This might result into Transaction too large error
if creators
are present in the JSON and collection_address
is mentioned in the API request. Below are some limitations of the API:
If the API request has
service_charge
,collection_address
then metadata at the URI should have at max 2 creators.If the API request has
service_charge
, and nocollection_address
, then metadata at URI can have up to 8 creators.If the API request has collection_address and no service_charge then the metadata URI can have up to 5 creators.
Read All
Returns on chain and off chain data of all NFTs in the wallet.
First call might be slightly slow, we cache automatically so that subsequent calls are lightning-fast.
Query Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
address: Your wallet address
update_authority: (optional) Public key of update authority. Filters only those nfts in your wallet which have this update_authority.
refresh:(optional) Include this if the cached NFTs for this wallet need to be refreshed.
GET /sol/v1/nft/read_all
Read Wallet Nfts
Paginated version of Read All
API, returns the list of NFTs in a wallet. A maximum of 50 NFTs are returned in a single API request.
Query Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
address: Your wallet address
update_authority: (optional) Public key of update authority. Filters only those NFTs in your wallet that have this update_authority.
refresh:(optional) Include this if the cached NFTs for this wallet need to be refreshed.
page:(optional) Default value is 1.
size:(optional) Default value is 50.
GET /sol/v2/nft/read_all
Read
Returns on-chain and off-chain NFT data. We also cache NFT images in our CDN for super fast reads and an amazing UX, which web3 sorely needs.
First call might be slightly slow, we cache automatically so that subsequent calls are lightning-fast.
Query Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
token_address: address of the NFT that you want to read
token_record: (optional) Set it
true
if need to get additionaltoken_record
info along with requested NFTs.
GET /sol/v1/nft/read
Read Selected NFTs
Returns on-chain and off-chain data of selected NFTs.
First call might be slightly slow, we cache automatically so that subsequent calls are lightning-fast.
Body Params
network: Solana blockchain environment (testnet/devnet/mainnet-beta)
token_addresses: (array of strings) Selected token addresses (minimum 1 and maximum 10 NFTs could be fetched)
refresh:(optional) Include this if the cached NFTs need to be refreshed.
token_record: (optional) Set it
true
if need to get additionaltoken_record
info along with requested NFTs.