Skip to content

uzproof/uzproof-example-marinade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uzproof-example-marinade

Reference integration showing how a Solana dApp (Marinade-style) consumes UZPROOF quest-completion attestations to gate loyalty tiers, airdrop eligibility, or reward badges on genuine on-chain activity.

Stack: @uzproof/verify-reader + @solana/web3.js. No API keys. No UZPROOF account. No on-chain writes from this code.

Why this exists

UZPROOF writes SAS (Solana Attestation Service) attestations every time a wallet completes a verified UZPROOF quest. These attestations are permanent, portable, and cryptographically signed on Solana mainnet.

Your protocol reads them. This repo shows how, in under 30 lines of code.

Data model (important)

UZPROOF's current Paid Claim flow writes one attestation per quest, keyed by action = "quest_<id>". So to check "did this wallet complete my loyalty-worthy quest?", you pass the UZPROOF quest id:

import { hasQuestCompletion } from "@uzproof/verify-reader";
const eligible = await hasQuestCompletion(wallet, 31);

See uzproof.com/docs for the current quest catalogue and what actions each quest verifies on-chain.

Quickstart

npm install
npm run check -- FX3Zs3jKRs8cQcjymCJRwmzwNh11PxnxSXTmLA1Dci8Q 31

Output:

✅ FX3Zs3jK... completed UZPROOF quest 31
   attestation: https://solscan.io/account/<attestation-pda>
   protocol:    DeFi
   amount USD:  $0.00
   genuine:     87/100
   verified at: 2026-04-10T14:23:00.000Z

SDK availability: @uzproof/verify-reader is live on npm — npm install @uzproof/verify-reader @solana/web3.js resolves against the latest published version. This example's package.json pins ^0.1.4 which is the current latest tag; all earlier 0.1.x versions are deprecated with upgrade pointers.

What's in the box

src/check-staker.ts

The minimum viable integration. One function call (getQuestCompletion), prints an attestation reference if the wallet completed the given UZPROOF quest.

Use in CI, snapshot pipelines, or cron jobs that filter candidate wallets.

src/loyalty-tier.ts

A more realistic pattern: classify a wallet into Bronze / Silver / Gold tier based on which UZPROOF quests it has completed. Uses verifyBatch for cheap existence checks first, then getQuestCompletion only for citation data on hits.

npm run tier -- FX3Zs3jKRs8cQcjymCJRwmzwNh11PxnxSXTmLA1Dci8Q

Integration pattern

import { Connection, clusterApiUrl } from "@solana/web3.js";
import { verifyBatch } from "@uzproof/verify-reader";

// Your paid RPC for batch workloads
const conn = new Connection("https://mainnet.helius-rpc.com/?api-key=...");

// Filter a candidate list down to wallets that completed quest 42
const candidates = [/* wallet addresses */];
const verifiedMap = await verifyBatch(candidates, "quest_42", conn);
const eligible = candidates.filter((w) => verifiedMap.get(w) === true);

That's the whole playbook. 3 lines for airdrop filtering, 5 lines for a loyalty tier.

Why SAS, why UZPROOF

  • Portable credentials — your verified Marinade user arrives at Sanctum already pre-verified. Network effects favour protocols that share a reputation layer.
  • No user friction — UZPROOF writes the attestation on-chain using the user's own payment (Paid Claim flow, user-signed).
  • Cryptographic proof — every attestation is a signed account on SAS mainnet. Your users can verify it independently at any time.
  • Anti-sybil built-in — UZPROOF runs 14 anti-sybil signals before issuing an attestation, so genuineScore is meaningful.

License

MIT © UZPROOF

Related

About

Reference integration showing how Solana dApps consume UZPROOF proof-of-use attestations via @uzproof/verify-reader

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors