query/modules/agreements.AgreementsQueryModule

Module for querying agreement data from The Graph

Table of contents

Methods

constructor

new AgreementsQueryModule(queryClient): AgreementsQueryModule

Parameters

NameType
queryClientQueryClient

Returns

AgreementsQueryModule

Methods

getAgreements

getAgreements(params?, filters?): Promise<AgreementsResponse>

Get a list of agreements based on filtering and pagination parameters

Parameters

NameTypeDescription
paramsPaginationParamsPagination parameters
filtersAgreementFiltersFiltering options

Returns

Promise<AgreementsResponse>

List of agreements with pagination info

getAgreementById

getAgreementById(id): Promise<null | AgreementObject>

Get a single agreement by its ID

Parameters

NameTypeDescription
idstringThe 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

NameTypeDescription
licenseeAddress`0x${string}`Licensee’s address
paramsPaginationParamsPagination parameters

Returns

Promise<AgreementsResponse>

List of agreements with pagination info

getAgreementsByLicensor

getAgreementsByLicensor(licensorAddress, params?): Promise<AgreementsResponse>

Get all agreements for a specific licensor

Parameters

NameTypeDescription
licensorAddress`0x${string}`Licensor’s address
paramsPaginationParamsPagination parameters

Returns

Promise<AgreementsResponse>

List of agreements with pagination info

getAgreementsByListing

getAgreementsByListing(listingId, params?): Promise<AgreementsResponse>

Get all agreements for a specific listing

Parameters

NameTypeDescription
listingIdstringListing ID
paramsPaginationParamsPagination parameters

Returns

Promise<AgreementsResponse>

List of agreements with pagination info

getBindingAgreements

getBindingAgreements(params?): Promise<AgreementsResponse>

Get all binding agreements (stage 4)

Parameters

NameTypeDescription
paramsPaginationParamsPagination parameters

Returns

Promise<AgreementsResponse>

List of binding agreements with pagination info