LicenseClient

Methods

  • attachLicenseTerms
  • mintLicenseTokens
  • registerNonComSocialRemixingPIL
  • registerCommercialUsePIL
  • registerCommercialRemixPIL

attachLicenseTerms

Attaches license terms to an IP.

MethodType
attachLicenseTerms(request: AttachLicenseTermsRequest) => void

Parameters:

  • request: The request object that contains all data needed to attach license terms.
  • request.ipId: The address of the IP to which the license terms are attached.
  • request.licenseTemplate: The address of the license template.
  • request.licenseTermsId: The ID of the license terms.
  • request.txOptions: [Optional] The transaction options.

mintLicenseTokens

Mints license tokens for the license terms attached to an IP.

The license tokens are minted to the receiver.

The license terms must be attached to the IP before calling this function. But it can mint license token of default license terms without attaching the default license terms, since it is attached to all IPs by default.

IP owners can mint license tokens for their IPs for arbitrary license terms without attaching the license terms to IP.

It might require the caller pay the minting fee, depending on the license terms or configured by the iP owner. The minting fee is paid in the minting fee token specified in the license terms or configured by the IP owner. IP owners can configure the minting fee of their IPs or configure the minting fee module to determine the minting fee.

MethodType
mintLicenseTokens(request: MintLicenseTokensRequest) => Promise<MintLicenseTokensResponse>

Parameters:

  • request: The request object that contains all data needed to mint license tokens.
  • request.licensorIpId: The licensor IP ID.
  • request.licenseTemplate: The address of the license template.
  • request.licenseTermsId: The ID of the license terms within the license template.
  • request.amount: The amount of license tokens to mint.
  • request.receiver: The address of the receiver.
  • request.txOptions: [Optional] The transaction options.

registerNonComSocialRemixingPIL

Convenient function to register a PIL non commercial social remix license to the registry.

MethodType
registerNonComSocialRemixingPIL(request?: RegisterNonComSocialRemixingPILRequest) => Promise<RegisterPILResponse>

Parameters:

  • request: [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
  • request.txOptions: [Optional] The transaction options.

registerCommercialUsePIL

Convenient function to register a PIL commercial use license to the registry.

MethodType
registerCommercialUsePIL(request: RegisterCommercialUsePILRequest) => Promise<RegisterPILResponse>

Parameters:

  • request: The request object that contains all data needed to register a PIL commercial use license.
  • request.mintingFee: The fee to be paid when minting a license.
  • request.currency: The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
  • request.royaltyPolicy: The address of the royalty policy contract which required to StoryProtocol in advance.
  • request.txOptions: [Optional] The transaction options.

registerCommercialRemixPIL

Convenient function to register a PIL commercial Remix license to the registry.

MethodType
registerCommercialRemixPIL(request: RegisterCommercialRemixPILRequest) => Promise<RegisterPILResponse>

Parameters:

  • request: The request object that contains all data needed to register license.
  • request.mintingFee: The fee to be paid when minting a license.
  • request.commercialRevShare: Percentage of revenue that must be shared with the licensor.
  • request.currency: The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
  • request.royaltyPolicy: The address of the royalty policy contract which required to StoryProtocol in advance.
  • request.txOptions: [Optional] The transaction options.