Query a single attribute
Use the getAttributes()
function from the QuadReader smart contract to query a single attribute about a passport holder.
Requirements
Installation
Install @quadrata/contracts package
Permissions
Calling smart contract have to be granted permissions to call getAttributes
in Mainnet.
Contact us via email at contact@quadrata.com or Discord
Testnets like Goerli,Mumbai,etc.. do not require any permissions
Function
Parameters
user
address of the passport holder
address (required)
attribute
bytes32 (required)
Return values
A list of attributes that have been issued.
For Solidity version < 0.8.0
Use
getAttributesLegacy()
which
returns three arrays. The index of each array maps to the others to create a tuple (e.g. attributeValues[0]
, epochs[0]
, issuers[0]
are part of the same result).
attributeValues: Raw or hashed attribute values. See Supported attributes for the return values of each attribute.
epochs: Timestamp that indicates when the attribute was verified by the passport issuer.
issuers: Passport issuer who verified the attributes.
Example
You can find our helper library to facilitate parsing the response => QuadReaderUtils
Last updated