> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cultura.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: VerifiedRightsMethods

Methods for querying verified rights from The Graph

The VerifiedRightsMethods class provides specialized queries for retrieving verified rights
data from The Graph subgraph. These methods allow you to efficiently access rights
attestation data without making direct blockchain calls.

### new VerifiedRightsMethods()

> **new VerifiedRightsMethods**(`client`): [`VerifiedRightsMethods`](./verified-rights-methods)

#### Parameters

##### client

[`QueryClientInterface`](../types/query-client-interface)

#### Returns

[`VerifiedRightsMethods`](./verified-rights-methods)

## Methods

### getById()

> **getById**(`id`): `Promise`\<`null` | [`VerifiedRights`](../types/verified-rights)>

Get verified rights by ID

#### Parameters

##### id

`string`

The ID of the verified rights

#### Returns

`Promise`\<`null` | [`VerifiedRights`](../types/verified-rights)>

The verified rights data or null if not found

#### Example

```typescript theme={null}
// Get verified rights by ID
const rights = await queryClient.verifiedRights.getById("1")
if (rights) {
  console.log(`Found verified rights with grade ${rights.grade}`)
} else {
  console.log("No verified rights found with that ID")
}
```

#### 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**(`assetAddress`, `assetId`): `Promise`\<`null` | [`VerifiedRights`](../types/verified-rights)>

Get verified rights by digital asset info

#### Parameters

##### assetAddress

`string`

The address of the digital asset contract

##### assetId

`string`

The ID of the digital asset

#### Returns

`Promise`\<`null` | [`VerifiedRights`](../types/verified-rights)>

The verified rights data or null if not found

#### Example

```typescript theme={null}
// Get verified rights for a specific digital asset
const rights = await queryClient.verifiedRights.getByDigitalAsset(
  "0x1234567890abcdef1234567890abcdef12345678",
  "42"
)

if (rights) {
  console.log(`Asset verified with grade ${rights.grade} and ${rights.attestorCount} attestors`)
} else {
  console.log("No verified rights found for this asset")
}
```

#### 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 grade it received. The method validates that the provided
address has the correct format.

### getByOwner()

> **getByOwner**(`ownerAddress`, `first`, `skip`): `Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Get verified rights by owner

#### 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`](../types/verified-rights)\[]>

Array of verified rights

#### Example

```typescript theme={null}
// Get all verified rights owned by an address
const rights = await queryClient.verifiedRights.getByOwner("0x123...789")
console.log(`Found ${rights.length} verified rights owned by this address`)

// With pagination
const firstPage = await queryClient.verifiedRights.getByOwner("0x123...789", 10, 0)
const secondPage = await queryClient.verifiedRights.getByOwner("0x123...789", 10, 10)
```

#### 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.

### getByGrade()

> **getByGrade**(`grade`, `first`, `skip`): `Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Get verified rights by grade

#### Parameters

##### grade

`string`

The grade to filter by (e.g. "S", "A", "B", "C")

##### first

`number` = `100`

Number of items to fetch (default: 100)

##### skip

`number` = `0`

Number of items to skip (default: 0)

#### Returns

`Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Array of verified rights

#### Example

```typescript theme={null}
// Get all verified rights with a specific grade
const sGradeRights = await queryClient.verifiedRights.getByGrade("S")
console.log(`Found ${sGradeRights.length} S-grade verified rights`)

// Get different grades for comparison
const aGradeRights = await queryClient.verifiedRights.getByGrade("A")
const bGradeRights = await queryClient.verifiedRights.getByGrade("B")
```

#### Remarks

This method returns all verified rights with a specific grade. Grades represent the
attestation quality and affect bond requirements and rights promotion thresholds.
Higher grades (e.g., "S", "A") typically indicate stronger verification with more
attestors or higher bond amounts. This query is useful for filtering assets by
their verification quality.

### getAll()

> **getAll**(`first`, `skip`): `Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Get all verified rights

#### Parameters

##### first

`number` = `100`

Number of items to fetch (default: 100)

##### skip

`number` = `0`

Number of items to skip (default: 0)

#### Returns

`Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Array of verified rights

#### Example

```typescript theme={null}
// Get the first 10 verified rights
const rights = await queryClient.verifiedRights.getAll(10, 0)
console.log(`Retrieved ${rights.length} verified rights`)

// Iterate through pages of results
let allRights = []
let pageSize = 50
let currentPage = 0

while (true) {
  const batch = await queryClient.verifiedRights.getAll(pageSize, currentPage * pageSize)
  if (batch.length === 0) break
  allRights = [...allRights, ...batch]
  currentPage++
}
console.log(`Total verified rights collected: ${allRights.length}`)
```

#### 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**(`first`, `skip`): `Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Get verified rights that have been successfully verified (isVerified = true)

#### Parameters

##### first

`number` = `100`

Number of items to fetch (default: 100)

##### skip

`number` = `0`

Number of items to skip (default: 0)

#### Returns

`Promise`\<[`VerifiedRights`](../types/verified-rights)\[]>

Array of verified rights that have been successfully verified

#### Remarks

This method returns all rights that have been successfully verified (where isVerified = true), and assets have reached level 2.
