query campaign
API, get campaign info data for rendering your NFT claim page.query campaign
API to get TaskConfig(address: $address)
, If there is a participateCondition
field, it is determined that participateCondition->eligible == true
. If not, rewardConfigs->eligible
it represents the achievement of each set of tasks, and rewardConfigs->rewards->rewardCount
represents the number of rewards that the user can obtain.mutation prepareParticipate
API, send the claim request once user claim.query participations
API to check Tx status periodically.query campaign
API and get holders(first:Int, after:String)
field info to setup NFTs showcase page.query SpaceLeaderboard
API to get Leaderboard info (But if you need data after 1000 positions in the rankings, you need owner auth and add auth-token in query header).access-token
in the header of the query.
Arguments | Description |
---|---|
id String! | You can get campaign id from Galxe Dashboard page`s url once you created a campaign |
Fields | Description |
---|---|
id | Campaign id is used to identify a certain campaign |
name | Campaign name |
description | Campaign description |
thumbnail | How many NFTs have been minted/claimed for this campaign |
numNFTMinted | How many NFTs have been minted/claimed for this campaign |
startTime | Campaign start time in unix time |
endTime | Campaign end time in unix time, if null means no end time |
formula | (Deprecated)Formula is a algebraic expression of credentials and entries, the output of formula decide whether and how many NFTs a user can claim. |
claimedTimes(address: $String!) | How many times a certain address has successfully claimed in this campaign |
space | Space is object for aggregating your campaigns. Check object fields below |
nftCore | NFT contract that used for this campaign. Check object fields below |
nftTemplate | NFT template contains info that used for generating metadata for a minted NFT. Check object fields below |
creds | Credentials are element object that determine whether an address is eligible to claim the NFT. Check object fields below |
holders(first:Int, after: String) | It shows user who have NFT minted from this campaign, first is same as limit, after is same as offset but it’s a number string and starts from “-1”. |
TaskConfig(address: $String) | TaskConfig is the configuration structure of campaign’s task condition and task reward. |
CredentialGroup(address: $String) | This structure is gradually deprecated. If there is TaskConfig, it is recommended to use the above data structure. If not, compatible data will be filled here. |
Fields | Description |
---|---|
id | Space id |
name | Space name |
alias | Space alias, used for constructing the space url |
thumbnail | Space icon image |
Fields | Description |
---|---|
name | NFT contract name |
contractAddress | NFT contract address |
Fields | Description |
---|---|
name | NFT name metadata |
image | NFT image url metadata |
ipfsImage | NFT decentralized image url metadata |
traits | NFT traits(you can refer to opensea NFT traits) metadata |
Fields | Description |
---|---|
id | Credential ID |
name | Credential name |
description | Credential description |
credType | Credential type |
credSource | Credential data source |
eligible(address: $String) | If a certain address is eligible for this credential |
referenceLink | Call-to-Action: For example, Discord, Twitter, Telegram, etc. can use this link to jump to the third-party page for completing the task. If the value is empty, there is no direct jump point, and the task needs to be completed according to the task description. |
Fields | Description |
---|---|
participateCondition | A necessary condition for the campaign, which is optional. If this is present, it is a threshold condition for participating in the campaign. It must be completed to verify the following. |
referralConfig | The task and reward configuration of the campaign`s referral, which is optional. The detailed structure is RewardConfig. |
rewardConfigs | Campaign`s task and reward configuration, the detailed structure is []RewardConfig. |
Fields | Description |
---|---|
conditions [ExprEntity] | Campaign Task condition config |
conditionalFormula | This is a combined expression that means conditions, usually simple ALL/ANY, but also supports complex expressions such as: (entity_0&&entity_1)||(entity_3&&entity_4)||(entity_5&&entity_6) |
eligible | It means rewardConfig is eligible. |
description | Reward config desc |
rewards [ExprReward] | Campaign`s rewards config |
rewardAttrVals | Parameter replacement value of multi credential |
Fields | Description |
---|---|
cred | Credential Info |
attrs | This parameter is only available when encountering multi credential, such as space user, score, etc. |
attrFormula | This is a combined expression that means conditions, usually simple ALL/ANY, but also supports complex expressions such as: (entity_0&&entity_1)||(entity_3&&entity_4)||(entity_5&&entity_6) |
eligible | It means whether the entire ExprEntity is eligible. |
eligibleAddress | This represents which addresses are eligible (usually means when multiple binding addresses are eligible) |
Fields | Description |
---|---|
arithmetics | As ExprEntity before, but the attrFormula here is a little different from the above. Here is an arithmetic expression. ex: entity_0+entity_1, entity_0/entity_1, entity_0/2 |
arithmeticFormula | This is a combined expression that represents the amount of the reward, usually a simple constant, but complex expressions are also supported, such as: (entity_0+entity_1)/2, entity_0/2*5 |
rewardType | NFT,TOKEN,DISCORDROLE,LOYALTYPOINTS,OAT,CUSTOM,LOYALTYPOINTSMYSTERYBOX,MINTLIST |
rewardCount | This is the reward quantity value calculated by using the user’s actual data into the expression. |
Fields | Description |
---|---|
credentials | Credential detail strcut, There is an eligible field inside that represents the achievement status of each credential. |
conditionRelation | ALL/ANY |
conditions [CredentialGroupCondition] | Credential gruop condition config |
rewards [CredentialGroupReward] | Credential group rewards config |
Fields | Description |
---|---|
eligible | It means whether the entire ExprEntity is eligible. |
eligibleAddress | This represents which addresses are eligible (usually means when multiple binding addresses are eligible) |
Fields | Description |
---|---|
rewardType | NFT,TOKEN,DISCORDROLE,LOYALTYPOINTS,OAT,CUSTOM,LOYALTYPOINTSMYSTERYBOX,MINTLIST |
rewardCount | This is the reward quantity value calculated by using the user’s actual data into the expression. |
Arguments | Description |
---|---|
signature String! | Deprecating, keep it a empty string |
campaignID String! | Campaign ID |
address String! | User’ wallet address, you can get it from user’s wallet connection or just a plain test input. In either way, for a successful claim, this address must be eligible through credentials of this campaign. |
mintCount Int | Batch claim count, if batch claim is needed. Otherwise don’t pass in this argument. |
Fields | Description |
---|---|
allow | If the user is able to claim the NFT |
disallowReason | Claim failed reason |
mintFuncInfo-> verifyIDs | Unique ids(if it’s a batch claim, there will be multiple ids) for identifying and getting on-chain Tx(s) |
mintFuncInfo-> nftCoreAddress | NFT contract address |
Arguments | Description |
---|---|
id [Int!]! | ids are verify ids returned by mutation prepareParticipate API |
Fields | Description |
---|---|
tx | Tx address |
status | Tx status. Status enum: Generated, tx is just born; Pending, tx is in pending; Success, tx is succeed; Queueing, tx is still in message queue; Failed, tx is failed |
Arguments | Description |
---|---|
id Int! | space id |
pageSize Int! | page size |
order | Points/GalxeID |
cursorAfter String | You don’t need to pass in this value on the first page. On the second page, you can start passing in the endCursor value returned by the first page. |
sprintId Int | The id value of the Session can access the data of the specified Session. |
Fields | Description |
---|---|
rank | user rank in this leaderboard |
points | user point at this space/sprint |
address | user info has more field for detail |