Skip to main content
resources/royalties.RoyaltyClient The RoyaltyClient handles the complex process of royalty management. Royalties are the payments due to licensors based on the revenue generated by licensed products. This client provides methods to register sales data (via invoices), calculate royalties, and manage their payment and acceptance both on-chain and off-chain.

Table of contents

Methods

constructor

new RoyaltyClient(client): RoyaltyClient

Parameters

Returns

RoyaltyClient

Methods

register

register(params): Promise<RegisterRoyaltiesResponse> Registers royalties from a CSV invoice file. This method uploads a CSV file containing invoice data and processes it for royalty registration. It first imports the invoices, then creates royalty registration periods with the necessary signatures.

Parameters

Returns

Promise<RegisterRoyaltiesResponse> Promise resolving to registration response Example

payOffchain

payOffchain(params): Promise<OffchainPaymentResponse> Pays royalties for a set of products.

Parameters

Returns

Promise<OffchainPaymentResponse> A promise resolving to the response from the payment endpoint.

acceptOffchain

acceptOffchain(royalties): Promise<OffchainAcceptanceDenialResponse> Accepts royalties.

Parameters

Returns

Promise<OffchainAcceptanceDenialResponse> A promise resolving to the response from the acceptance endpoint.

denyOffchain

denyOffchain(royalties): Promise<OffchainAcceptanceDenialResponse> Denies royalties.

Parameters

Returns

Promise<OffchainAcceptanceDenialResponse> A promise resolving to the response from the denial endpoint.