Class: AgreementsQueryModule
query/modules/agreements.AgreementsQueryModule
Module for querying agreement data from The Graph
Table of contents
Methods
- getAgreements
- getAgreementById
- getAgreementsByLicensee
- getAgreementsByLicensor
- getAgreementsByListing
- getBindingAgreements
constructor
• new AgreementsQueryModule(queryClient
): AgreementsQueryModule
Parameters
Name | Type |
---|---|
queryClient | QueryClient |
Returns
Methods
getAgreements
▸ getAgreements(params?
, filters?
): Promise
<AgreementsResponse
>
Get a list of agreements based on filtering and pagination parameters
Parameters
Name | Type | Description |
---|---|---|
params | PaginationParams | Pagination parameters |
filters | AgreementFilters | Filtering options |
Returns
Promise
<AgreementsResponse
>
List of agreements with pagination info
getAgreementById
▸ getAgreementById(id
): Promise
<null
| AgreementObject
>
Get a single agreement by its ID
Parameters
Name | Type | Description |
---|---|---|
id | string | The agreement ID |
Returns
Promise
<null
| AgreementObject
>
The agreement or null if not found
getAgreementsByLicensee
▸ getAgreementsByLicensee(licenseeAddress
, params?
): Promise
<AgreementsResponse
>
Get all agreements for a specific licensee
Parameters
Name | Type | Description |
---|---|---|
licenseeAddress | `0x${string}` | Licensee’s address |
params | PaginationParams | Pagination parameters |
Returns
Promise
<AgreementsResponse
>
List of agreements with pagination info
getAgreementsByLicensor
▸ getAgreementsByLicensor(licensorAddress
, params?
): Promise
<AgreementsResponse
>
Get all agreements for a specific licensor
Parameters
Name | Type | Description |
---|---|---|
licensorAddress | `0x${string}` | Licensor’s address |
params | PaginationParams | Pagination parameters |
Returns
Promise
<AgreementsResponse
>
List of agreements with pagination info
getAgreementsByListing
▸ getAgreementsByListing(listingId
, params?
): Promise
<AgreementsResponse
>
Get all agreements for a specific listing
Parameters
Name | Type | Description |
---|---|---|
listingId | string | Listing ID |
params | PaginationParams | Pagination parameters |
Returns
Promise
<AgreementsResponse
>
List of agreements with pagination info
getBindingAgreements
▸ getBindingAgreements(params?
): Promise
<AgreementsResponse
>
Get all binding agreements (stage 4)
Parameters
Name | Type | Description |
---|---|---|
params | PaginationParams | Pagination parameters |
Returns
Promise
<AgreementsResponse
>
List of binding agreements with pagination info