onchainid.getClaim(GetClaim)
Fetch a claim from an ONCHAINID identity by claimId. This is a read-only call to the identity contract.
GetClaim Type Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| subjectIdentity | string | Required | The ONCHAINID identity contract address to read from. |
| claimId | string | Required | The claim identifier, computed as keccak256(abi.encode(issuer, topic)). |
claimId is derived from the issuer contract address and the claim topic to uniquely identify a claim on an identity. In Solidity this is keccak256(abi.encode(_issuer, _topic)). In ethers you can compute it via keccak256(new AbiCoder().encode(["address","uint256"], [issuer, topic])).
Returns
| Field | Type | Description |
|---|---|---|
| claim | Claim | The full claim payload read from the identity contract. |

