LicenseClient allows you to manage license terms and tokens within Story.
Method | Type |
---|---|
attachLicenseTerms | (request: AttachLicenseTermsRequest) => AttachLicenseTermsResponse |
request.ipId
: The address of the IP to which the license terms are attached.request.licenseTermsId
: The ID of the license terms.request.licenseTemplate
: [Optional] The address of the license template.receiver
.
Note that a license token can only be minted if the licenseTermsId
are already attached to the IP Asset, making it a publicly available license. The IP owner can, however, mint a private license by minting a license token with a licenseTermsId
that is not attached to the IP Asset.
Method | Type |
---|---|
mintLicenseTokens | (request: MintLicenseTokensRequest) => Promise<MintLicenseTokensResponse> |
request.licensorIpId
: The licensor IP ID.request.licenseTermsId
: The ID of the license terms within the license template.request.maxMintingFee
: The maximum minting fee to be paid when minting a license.request.maxRevenueShare
: The maximum revenue share to be paid when minting a license.request.amount
: [Optional] The amount of license tokens to mint.request.receiver
: [Optional] The address of the receiver.request.licenseTemplate
: [Optional] The address of the license template.Method | Type |
---|---|
registerPILTerms | (request: RegisterPILTermsRequest) => Promise<RegisterPILResponse> |
LicenseTerms
type in this file. They all come from the PIL Terms.licenseTermdId = 1
in our protocol. There’s no reason to register them again.Method | Type |
---|---|
registerNonComSocialRemixingPIL | (request?: RegisterNonComSocialRemixingPILRequest) => Promise<RegisterPILResponse> |
Method | Type |
---|---|
registerCommercialUsePIL | (request: RegisterCommercialUsePILRequest) => Promise<RegisterPILResponse> |
request.defaultMintingFee
: 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 on Story’s protocol.request.royaltyPolicyAddress
: [Optional] The address of the royalty policy contract, default value is LAP.Method | Type |
---|---|
registerCommercialRemixPIL | (request: RegisterCommercialRemixPILRequest) => Promise<RegisterPILResponse> |
request.defaultMintingFee
: 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 on Story’s protocol.request.royaltyPolicyAddress
: [Optional] The address of the royalty policy contract, default value is LAP.Method | Type |
---|---|
registerCreativeCommonsAttributionPIL | (request: RegisterCreativeCommonsAttributionPILRequest) => Promise<RegisterPILResponse> |
request.currency
: The ERC20 token to be used to pay the minting fee and the token must be registered on Story’s protocol.request.royaltyPolicyAddress
: [Optional] The address of the royalty policy contract, default value is LAP.Method | Type |
---|---|
getLicenseTerms | (selectedLicenseTermsId: string | number | bigint) => PiLicenseTemplateGetLicenseTermsResponse |
selectedLicenseTermsId
: The ID of the license terms.Method | Type |
---|---|
predictMintingLicenseFee | (request: PredictMintingLicenseFeeRequest) => LicensingModulePredictMintingLicenseFeeResponse |
request.licensorIpId
: The IP ID of the licensor.request.licenseTermsId
: The ID of the license terms.request.amount
: The amount of license tokens to mint.request.licenseTemplate
: [Optional] The address of the license template, default value is Programmable IP License.request.receiver
: [Optional] The address of the receiver, default value is your wallet address.Method | Type |
---|---|
setLicensingConfig | (request: SetLicensingConfigRequest) => SetLicensingConfigResponse |
request.ipId
: The address of the IP for which the configuration is being set.request.licenseTermsId
: The ID of the license terms within the license template.request.licenseTemplate
: [Optional] The address of the license template used, If not specified, the configuration applies to all licenses.request.licensingConfig
: The licensing configuration for the license.
request.licensingConfig.isSet
: Whether the configuration is set or not.request.licensingConfig.mintingFee
: The minting fee to be paid when minting license tokens.request.licensingConfig.hookData
: The data to be used by the licensing hook.request.licensingConfig.licensingHook
: The hook contract address for the licensing module, or address(0) if none.request.licensingConfig.commercialRevShare
: The commercial revenue share percentage (from 0 to 100).request.licensingConfig.disabled
: Whether the licensing is disabled or not. If this is true, then no licenses can be minted and no more derivatives can be attached at all.request.licensingConfig.expectMinimumGroupRewardShare
: The minimum percentage of the group’s reward share (from 0 to 100).request.licensingConfig.expectGroupRewardPool
: The address of the expected group reward pool. The IP can only be added to a group with this specified reward pool address, or zero address if the IP does not want to be added to any group.Method | Type |
---|---|
getLicensingConfig | (request: GetLicensingConfigRequest) => LicensingConfig |
request.ipId
: The address of the IP for which the configuration is being fetched.request.licenseTermsId
: The ID of the license terms within the license template.request.licenseTemplate
: [Optional] The address of the license template used.TotalLicenseTokenLimitHook
, and sets the max license tokens to the specified limit.
Method | Type |
---|---|
setMaxLicenseTokens | (request: SetMaxLicenseTokensRequest) => Promise<TransactionResponse> |
request.ipId
: The address of the IP for which the configuration is being set.request.licenseTermsId
: The ID of the license terms within the license template.request.maxLicenseTokens
: The total license token limit, 0 means no limit.request.licenseTemplate
: [Optional] The address of the license template used.