Before issuing points for an event, you must first register the event using the Register Off-Chain Event API. This is a one-time process for each unique event.
Absinthe’s off-chain points API allows any project the freedom to issue, query, update, and delete points for any off-chain action.
You can test-drive the API in our interactive graphql playground here.
You will need an API key to set in an authorization header. If you don’t have one yet, reach out
to the Absinthe team
here
to get you one.
Before being able to introspect the schema through our interactive graphql playground or through a direct call, you will need to set the API key as an authorization header via this format:
The primary key for each entry is an autogenerated id integer.
This means that you can issue the same points, to the same identity multiple times.
If you choose to update someone’s score, either insert an entry with the positive difference or
issue an update mutation.
You can issue points to evm addresses, solana addresses, and different social identites like
discord, x (twitter), and github. The identity_type is an enum that indicates what type of identity account_id is.
Some identity types in the list include “PROVIDER_ID” because they are associated with external service providers or platforms. It’s important to note that these PROVIDER_IDs are not usernames, but rather unique numerical or alphanumeric identifiers. For example like this: 1517923606637912064.
These identifiers can be retrieved through OAuth authentication flows or by using authentication providers like NextAuth.js (now Auth.js). When a user authenticates through these services, your application receives this unique identifier, allowing you to link the user’s external account to their account in your system.
The PROVIDER_ID approach is more reliable than using usernames because:
It’s a stable identifier that doesn’t change even if the user changes their username.
It’s unique to each user on the platform.
It’s provided securely through the authentication process.
The UUID of the registered event, obtained when you registered the event using the Register Off-Chain Event API. This links the points issuance to a specific registered event.