mutation CreateCollection {
CreateCollection(attributes: {key: "name", value: "Collection Name Goes Here"}) {
id
state
}
}
Copy
Create NFT
Create an NFT in your collection.
mutation CreateToken {
CreateToken(
recipient: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f" #The recipient of the initial supply
collectionId: 2406 #Set the collection ID received from the above mutation
params:{
tokenId: {integer: 0} #Set the token ID
initialSupply: 1 #Mint initial supply
cap: {type: INFINITE} #Define the supply type
}
) {
id
state
}
}
Copy
Mint NFT
Mint supply for existing NFTs.
mutation BatchMint {
BatchMint(
collectionId: "2406" #Specify the collection ID
recipients: [
{
account: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f" #The recipient of the mint
mintParams: {
tokenId: {integer: 0} #Token ID to mint
amount:15 #Amount to mint
}
},
{
account: "cxKy7aqhQTtoJYUjpebxFK2ooKhcvQ2FQj3FePrXhDhd9nLfu" #The recipient of the mint
mintParams: {
tokenId: {integer: 5} #Token ID to mint
amount:1 #Amount to mint
}
}
]
)
{
id
state
}
}
Copy
Send NFT
Send NFTs from one wallet to another.
mutation BatchTransfer {
BatchTransfer(
collectionId: 2406 #Specify the collection ID
recipients: [
{
account: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f" #Specify the recipient address
simpleParams: {
tokenId: {integer: 0},
amount: 15
}
},
{
account: "cxKy7aqhQTtoJYUjpebxFK2ooKhcvQ2FQj3FePrXhDhd9nLfu" #Specify the recipient address
simpleParams: {
tokenId: {integer: 5},
amount: 1
}
}
]
)
{
id
state
}
}
Copy
Link User Wallet
Connect to a user’s Enjin Wallet to enable blockchain interactions.
# Call the RequestAccount query and display the QR code from the response for your user to scan
query RequestAccount {
RequestAccount {
qrCode #Returns a QR code for your user to scan
verificationId #Save this for next step
}
}
Copy
View User Balance
Get the connected user’s wallet balance.
#Call the GetWallet query with the verificationId from the previous query response.
#If the user linked his wallet by scanning the QR code, the response will contain his wallet and balance.
#This acts as a proof that the user owns this wallet.
query GetVerifiedWallet {
GetWallet(verificationId: "0x78af...") { #Set the verificationId from the RequestAccount response
account {
address
}
balances {
free
}
}
}
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.