Skip to main content

Step 2 - Curate Credentials

Supported Credential Data Sourcesโ€‹

Currently we support curating credentials through multiple data sources:

  • CSV file
  • Subgraph endpoint
  • GraphQL endpoint
  • REST endpoint

CSV Credential Fileโ€‹

Via Galaxy Dashboardโ€‹

  • The user can see and select all credentials from any user while creating the space campaign, but on the โ€œCredentialโ€ - โ€œMy Credential Listโ€ page, the user can only see and edit their own created credential list.
  • The user can download the existing whitelist file
  • The user can easily upload addresses in batches at once with the following file requirements:
    • The file needs to be CSV format (Without Comma)
    • Each address must not be duplicated
    • The file should not contain headers
  • The user can also create a reference link for credentials as needed.

Create/edit CSV Credentialsโ€‹

  1. Click "Credential" to go to "My Credential List" page
  2. Click "Create New Credential"
  3. Fill up the Credential Title
  4. Select the deployed Network
  5. Upload the CSV file
    1. Error Alert if CSV file contained duplicated address and invalid address
  6. Fill up the Credential Description
  7. Fill up the reference link (If needed)
  8. Click "Create"
  9. Confirm to create the Credential by clicking "Sign" on the signature request
  10. Made a mistake? No worries! You can always come back to edit the credentials that you have created

Credential.png

Or check out this video for instructions: https://youtu.be/EeE2Ngv7oEo

Via credential update APIโ€‹

Alternatively, you can call our credential API to skip the manual steps in the dashboard.

More info here

Subgraph/GraphQL Credential Endpointโ€‹

๐Ÿ’ก We are adding Galaxy dashboard support to create subgraph Credentials in a self-serve fashion. Before that, please contact Galaxy team for assistance.

Subgraph and GraphQL typed Credentials consist of: endpoint, query, expression, and header. The only difference being subgraph is specific to the subgraphs hosted on thegraph. Galaxy will send query to the endpoint with header, and process the returned data with expression. For example:

endpoint:

https://api.xxx.com/cred/

header:

{"Authorization": "key"}

query:

query getEligibility($address: String!) {
campaignEligibility(address: $address) {
eligible
}
}

expression:

function(data){
if(data != null && data.campaignEligibility != null && data.campaignEligibility.eligible) {
return 1
}
return 0
}

When expression returns 1, the address we checked is now confirmed to have this credential.

REST Credential Endpointโ€‹

A REST typed credential endpoint consists of three parts: endpoint, header and expression. Similar to subgraph/graphql, Galaxy will send a GET request to the endpoint with header, and process the returned data with expression. For example:

endpoint ($address will be swapped out with the wallet address we need to check):

https://api.xxx.com/cred/address=$address

header:

{"Authorization": "key"}

expression:

function(data){
if(data != null && data.campaignEligibility != null && data.campaignEligibility.eligible) {
return 1
}
return 0
}

When expression returns 1, the address we checked is now confirmed to have this credential.