Links

Creating an Enjin Beam

Create a Token using the Enjin Platform UI

Log into the Platform UI and navigate to the Beams page. Next, click the Create Enjin Beam button and fill in the form to set up the transaction that will create your Enjin Beam.

Create a Token using the Enjin Platform API

Please refer to the API Docs for the CreateBeam mutation, or use the GraphiQL Docs Explorer (available once you have set an Authorization header, or are logged in to the Platform UI).
First, create the Beam with the parameters of your choice, such as name, description, image, begin and end date & the number of assets that you would like to distribute.
mutation CreateBeam {
CreateBeam(
name: "My Beam"
description: "This is a test beam."
image: "https://assets-global.website-files.com/60f57c496975b84c29335fb7/60f58bd888a6e86e3ff69551_Enjin.svg"
start: "20230101"
end: "20240101"
collectionId: 7153
tokens: [
{tokenIds:"1..10" tokenQuantityPerClaim:1 claimQuantity:1 type:MINT_ON_DEMAND}
]
)
}
This mutation will return a code over to your response field, once you have that with you, you will need to query the beam depending on the type of beam created with the following queries:
GetBeam
GetSingleUseCodes
query GetBeam {
GetBeam(code: "yourBeamCode") {
id
code
name
description
image
start
end
isClaimable
claimsRemaining
qr {
url
payload
}
message {
walletPublicKey
message
}
collection {
collectionId
maxTokenCount
maxTokenSupply
forceSingleMint
frozen
network
}
}
}
query GetSingleUseCodes {
GetSingleUseCodes(code: "YourBeamCode") {
edges {
cursor
node {
code
qr {
url
payload
}
}
}
totalCount
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
}
}
}
With the response from both queries, you will receive a link to a QRcode or your platform claim link, which will allow your users to claim the Beams created by your collection.
This mutation will set up a Beam with the options and tokens you specify. A WebSocket event will also be fired so you can pick up the Beam creation in real time by listening to the app channel on the WebSocket.
© 2023 Enjin Pte. Ltd.