API Integration
Only needs to be done once
If computations are performed off-chain (ex. to calculate airdrop rewards), then teams can integrate with the Passport API.
The protocol backend will just need to pass along the user address and the Passport API will return the primitives requested or a composable LoyaltyScore V2.
The Passport web2 backend currently provides three API endpoints:
GET /scores/{terra_address}
This endpoint takes a terra address and returns the counts of some wallet behaviors and a composable loyalty score. Please see Example: Anchor Rewards Boost for how the composable score is calculated here.
GET /raw_primitives/{terra_address}
Currently this endpoint returns 11 raw primitive scores listed below:
GET /raw_primitives_proof/{terra_address}
This endpoint returns a merkle tree proof of the returned primitives in addition to the raw primitive scores. Protocols need to request API key from Passport team to be able to query it. More of this endpoint can be found in Smart Contract Integration.
Endpoint query example
Last updated