Table of contents
Methods
constructor
• new RoyaltyClient(client
): RoyaltyClient
Parameters
Name | Type |
---|---|
client | SpaceportSDK |
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
Name | Type | Description |
---|---|---|
params | RegisterRoyaltiesParams | Royalty registration parameters including CSV file and product IDs |
Returns
Promise
<RegisterRoyaltiesResponse
>
Promise resolving to registration response
Example
payOffchain
▸ payOffchain(params
): Promise
<OffchainPaymentResponse
>
Pays royalties for a set of products.
Parameters
Name | Type | Description |
---|---|---|
params | PayOffchainRoyaltiesInput | Parameters for paying royalties. |
Returns
Promise
<OffchainPaymentResponse
>
A promise resolving to the response from the payment endpoint.
acceptOffchain
▸ acceptOffchain(royalties
): Promise
<OffchainAcceptanceDenialResponse
>
Accepts royalties.
Parameters
Name | Type | Description |
---|---|---|
royalties | AcceptDenyRoyaltiesInput [] | An array of royalty inputs to accept. |
Returns
Promise
<OffchainAcceptanceDenialResponse
>
A promise resolving to the response from the acceptance endpoint.
denyOffchain
▸ denyOffchain(royalties
): Promise
<OffchainAcceptanceDenialResponse
>
Denies royalties.
Parameters
Name | Type | Description |
---|---|---|
royalties | AcceptDenyRoyaltiesInput [] | An array of royalty inputs to deny. |
Returns
Promise
<OffchainAcceptanceDenialResponse
>
A promise resolving to the response from the denial endpoint.