Skip to content

SDK: getClaim (singular) returning the full claim record #164

Description

@Psalmuel01

Summary

getClaims returns all claims; hasClaim returns a bool. There's no single-claim detail fetch. Add getClaim(wallet, type) returning { valid, verifiedAt, expiry } (or null) so UIs can show expiry/verifiedAt without pulling every type.

What to build

  • export async function getClaim(wallet, claimType, opts?): Promise<Claim | null>
  • Reuses readIsVerified; respects trustedIssuers
  • Added to the StellarCred namespace + README

Acceptance criteria

  • getClaim returns the record or null
  • Respects trustedIssuers
  • Exported from namespace + default export
  • pnpm tsc --noEmit passes---

✅ Merge requirements (read before starting)

Before this PR can be merged, all of the following must hold:

  • All CI checks pass (contracts, frontend, circuits as applicable)
  • Every Greptile review comment is addressed — no unresolved review threads
  • Greptile confidence score is 4/5 or higher

Greptile performs the detailed code review on each PR. Please resolve its feedback fully before requesting a human merge — PRs below 4/5 or with open Greptile threads will not be merged.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programeasyGood for newcomers, low complexityenhancementNew feature or requesthelp wantedExtra attention is neededsdk@stellarcred/sdk work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions