Skip to main content

1.1. Entities Diagram

Diagram.png

1.1.1. Space

Space is used for aggregating your campaigns.

1.1.2. Campaign

Campaign is the key object that holds all info for NFT claiming process. Except info of itself, like campaign name, thumbnail, description, it also contains info of NFT contract, NFT template etc.

1.1.3. NFT Core

NFT contract(ERC-721) that used for minting NFTs within the campaign.

1.1.4. NFT Template

NFT template of the campaign contains info that used for generating metadata of a minted NFT. Including NFT name, image, traits etc.

1.1.5. Credential

Credential is elemental object that determine whether an address is eligible to claim the NFT. It takes a single wallet address as input and outputs 0(false)/1(true) to indicate whether the wallet address is eligible for this credentail.

1.1.6. 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 witin the campaign. e.g. (C_2&C_3)_1 means a user eligible for both credential 2 and 3 can claim one NFT, (C_4|C_5)_2 means a user eligible for either credential 4 and 5 can claim two NFTs.

1.1.7. TaskConfig

TaskConfig is the configuration structure of campaign’s task condition and task reward. It replaces the previous structure of Formula and credgroup, but we will fill in the credgroup structure with data for compatibility. It is recommended to use this structure when there is TaskConfig. detailed structure as follows: Diagram.png

1.2. Integration workflow

  1. Sign up for Galxe Space Dashboard, please visit Create a Space.
  2. Create credentials through the Dashboard. Upload data for your credentials if their source is CSV file.
  3. Create NFT core(NFT contract) if needed, if you are only need to intergrate OAT campaign, then it`s not needed.
  4. Create space through the Dashboard.
  5. Create campaign with with “Integrate campaign claiming into third-party websites” checked under your space through the Dashboard. (This will turn the campaign into gasless mode, right now we only support any campaign that does not require users to pay gas.)
  6. Go to your campaign page inside Galxe to check if the campaign info is correct and credentials lighted up for eligible users.
  7. Release your campaign through Dashboard.
  8. Integrate query campaign API, get campaign info data for rendering your NFT claim page.
  9. If you need to check whether a user is eligible to claim before hand, integrate 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.
  10. Integrate mutation prepareParticipate API, send the claim request once user claim.
  11. If needed, integrate query participations API to check Tx status periodically.
  12. If you want, integrate query campaign API and get holders(first:Int, after:String) field info to setup NFTs showcase page.
  13. If needed, integrate 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).
NOTE: Then you will need an access token bound to your galxe account to use this API. Please go to the Galxe user setting page to generate an access token.Then add access-token in the header of the query.

2.1. Overview

For endpoint and other info, please refer to Overview | Galxe Docs. And for interface of each GraphQL query, please check docs/schema from Playground - https://graphigo-business.prd.galaxy.eco/query .

2.2. Query campaign

This API is used for get campaign object, a campaign is the key object that holds all info for NFT claiming process, integrate this API to setup your own NFT claim page. An example of how a campaign can be shown on website: New To The Galxe? Start your adventure here! by Galxe Space | Galxe .

2.2.1. Query

2.2.2. Arguments

2.2.3. Fields

2.2.3.1. Space fields

2.2.3.2. NFT Core fields

2.2.3.3. NFT Template fields

2.2.3.4. Creds fields

2.2.3.5. TaskConfig

2.2.3.5.1. rewardConfigs fields

2.2.3.5.1.1. condition ExprEntity fields

2.2.3.5.1.2. reward ExprReward fields

2.2.3.6. CredentialGroup fields

2.2.3.6.1. condition CredentialGroupCondition fields

2.2.3.6.2. reward CredentialGroupReward fields

2.2.4. Query example

2.2.5. Response example

2.3. Query and mutate credential

Creds fields

2.3.1. query credential info

2.3.2. update credential items

Use API to update credential Items | Galxe Docs

2.3.3. check address eligiblilty Single

**NOTE:**This can only check single credential eligible. **NOTE:**This is just to get the eligible status and will not do verification.

2.3.4. check address eligiblilty(verify button) Single

**NOTE:**This can only check single credential eligible. **NOTE:**This will verify the user’s data. Some cred types will have recaptcha restrictions (if verify gets a recaptcha error). Verification can only be initiated from the galxe page, we will regularly adjust the types that require recaptcha.

2.3.5. check address eligiblilty(verify button) Universal

**NOTE:**This will verify the user’s data. Some cred types will have recaptcha restrictions (if verify gets a recaptcha error). Verification can only be initiated from the galxe page, we will regularly adjust the types that require recaptcha.
**NOTE:**You can use ExprEntityInput like TaskConfig ExprEntity verify complex conditions.

2.4. Mutation prepareParticipate

This API send the request for minting a NFT once user claim, our backend will eventually call the NFT contract to have the NFT minted to user.

2.4.1. Mutation

2.4.2. Arguments

2.4.3. Fields

2.4.4. Query example

2.4.5. Response example

2.5. Query participations

Once the claim request is sent, use this API to monitor on-chain Tx status.

2.5.1. Query

2.5.2. Arguments

2.5.3. Fields

2.5.4. Query example

2.5.5. Response example

2.6. Query SpaceLeaderboard

You can use this query to query the info information of the leaderboard of space.

2.6.1. Query

2.6.2. Arguments

2.6.3. Fields

2.6.4. Query example

2.6.5. Response example