new VerifiedRightsMethods()
new VerifiedRightsMethods(client):VerifiedRightsMethods
Parameters
client
QueryClientInterface
Returns
VerifiedRightsMethods
Methods
getById()
getById(Get verified rights by IDid):Promise<null|VerifiedRights>
Parameters
id
string
The ID of the verified rights
Returns
Promise<null | VerifiedRights>
The verified rights data or null if not found
Example
Remarks
This method fetches a single verified rights entry by its ID. It returns null if no matching rights are found. The ID is typically a unique identifier generated when the rights are created through attestation.getByDigitalAsset()
getByDigitalAsset(Get verified rights by digital asset infoassetAddress,assetId):Promise<null|VerifiedRights>
Parameters
assetAddress
string
The address of the digital asset contract
assetId
string
The ID of the digital asset
Returns
Promise<null | VerifiedRights>
The verified rights data or null if not found
Example
Remarks
This method allows you to find the verified rights associated with a specific digital asset. It’s useful when you know the asset’s contract address and token ID, and want to check if it has been attested and what asset class it received. The method validates that the provided address has the correct format.getByOwner()
getByOwner(Get verified rights by ownerownerAddress,first,skip):Promise<VerifiedRights[]>
Parameters
ownerAddress
string
The owner’s address
first
number = 100
Number of items to fetch (default: 100)
skip
number = 0
Number of items to skip (default: 0)
Returns
Promise<VerifiedRights[]>
Array of verified rights
Example
Remarks
This method returns all verified rights entries owned by a specific address. The address must be a valid Ethereum address. Results are ordered by creation date (newest first) and can be paginated using the first and skip parameters. This is useful for creating user dashboards that show all assets a user has had verified.getByAssetClass()
getByAssetClass(Get verified rights by asset classassetClass,first,skip):Promise<VerifiedRights[]>
Parameters
assetClass
string
The asset class to filter by (e.g. “0”, “1”, “2”, “3”)
first
number = 100
Number of items to fetch (default: 100)
skip
number = 0
Number of items to skip (default: 0)
Returns
Promise<VerifiedRights[]>
Array of verified rights
Example
Remarks
This method returns all verified rights with a specific asset class. Currently, there is only the general class (0=General) available. This function is designed for future use when additional asset classes are added, each with their own specific requirements for verification. This query will be useful for filtering assets by their asset class.getAll()
getAll(Get all verified rightsfirst,skip):Promise<VerifiedRights[]>
Parameters
first
number = 100
Number of items to fetch (default: 100)
skip
number = 0
Number of items to skip (default: 0)
Returns
Promise<VerifiedRights[]>
Array of verified rights
Example
Remarks
This method returns all verified rights in the system, ordered by creation date (newest first). Use pagination parameters to efficiently handle large result sets. This query is useful for creating explorers or dashboards that display all verified rights in the system. For large datasets, it’s recommended to use pagination to improve performance and user experience.getVerified()
getVerified(Get verified rights that have been successfully verified (isVerified = true)first,skip):Promise<VerifiedRights[]>
Parameters
first
number = 100
Number of items to fetch (default: 100)
skip
number = 0
Number of items to skip (default: 0)
Returns
Promise<VerifiedRights[]>
Array of verified rights that have been successfully verified

