v1.4.3
TypeScript SDK v1.4.3 Release Notes
This patch release adds a batch derivative registration API with automatic fee handling, support for pre-registered license terms via licenseTermsId, fixes for for batchMintAndRegisterIpAssetWithPilTerms and setMaxLicenseTokens, and test and dependency cleanup.
Key Changes
Batch Derivative Registration (Automatic Fee Handling: ERC20 + WIP)(#675)
- Introduced
ipAsset.batchRegisterDerivatives(new, recommended): batches derivative registrations and automatically handles fees for both ERC20 and WIP tokens (paid from the wallet). - Deprecated
ipAsset.batchRegisterDerivative(old API): legacy batching method kept for backward compatibility; no automatic fee handling and will be removed in a future release.
Usage Example:
await client.ipAsset.batchRegisterDerivatives({
requests: [
{
childIpId: childIpId1,
parentIpIds: [parentIpId1, parentIpId2],
licenseTermsIds: [licenseTermsId1, licenseTermsId2],
},
{
childIpId: childIpId2,
parentIpIds: [parentIpIdForWIP],
licenseTermsIds: [licenseTermsIdFor100WIP],
},
],
});Support Pre-Registered License Terms via licenseTermsId
Enables workflows to reference existing license terms IDs (instead of re-registering the same PIL terms repeatedly)(#677).
LicenseTermsDataInputnow acceptslicenseTermsIdin addition totermsacross the SDK.- This means all APIs that previously took “terms” can now take a pre-registered
licenseTermsIdto attach existing terms. - If both
licenseTermsIdandtermsare provided, terms takes priority and new terms are registered.
await client.ipAsset.registerIpAsset({
nft: { type: "mint", spgNftContract },
licenseTermsData: [
{
terms: PILFlavor.commercialRemix({
defaultMintingFee: 100n,
commercialRevShare: 10,
currency: WIP_TOKEN_ADDRESS,
}),
},
{
licenseTermsId: licenseTermsId,
},
],
royaltyShares: [
{
recipient,
percentage: 10,
},
],
});Fixes
- Fixed
ipAsset.batchMintAndRegisterIpAssetWithPilTermsreturning incorrectlicenseTermsIdsby applying the missinggetRevenueSharetransformation forcommercialRevSharewhen resolving license terms IDs. (#677) - Fixed
commercialRevShareconversion in thesetMaxLicenseTokens(#690)