Skip to content

v1.4.0

Choose a tag to compare

@lucas2brh lucas2brh released this 30 Sep 09:58
· 30 commits to main since this release
dd851f1

TypeScript SDK v1.4.0 Release Notes

This is the stable release of the Story Protocol SDK v1.4.0.

This version introduces a comprehensive update, including:

  • A major redesign of IP Asset registration and derivative workflows, consolidating previously fragmented methods into three general-purpose entry points
  • New IP Asset module methods, such as batchMintAndRegisterIp for batch NFT minting and automatic IP registration
  • Relocation of licensing logic to the license module
  • Introduction of the PILFlavor class for flexible license term generation
  • Stricter type safety with numeric fields and new type aliases (LicenseTermsIdInput, DeadlineInput, RevShareInput, FeeInput)
  • Default values for key parameters to simplify method calls (maxMintingFee, maxRts, maxRevenueShare, maxAllowedRewardShare)
  • Enhanced developer ergonomics and testing coverage, including commercialRevShare validations and IP signature verification

These improvements streamline IP asset management, strengthen reliability, and improve the overall developer experience.

Migration Guide

Breaking Changes

Changes from rc.2 to stable:

  • registerPilTermsAndAttach has been moved to the license module
  • Numeric fields that previously accepted string now only accept number or bigint
  • registerDerivative and registerDerivativeWithLicenseTokens now return LinkDerivativeResponse (aligned with linkDerivative)

Migrating from v1.3.x

Key Changes

IP Asset Client Methods

IP Asset Registration Redesign

Three general-purpose methods now handle IP asset creation and derivative management, consolidating multiple older workflows while maintaining backward compatibility. All methods support automatic token handling for minting fees, license terms, royalty tokens, and derivative data.

1. registerIpAsset — Create a new IP asset (minted or mint-on-demand), including licenseTermsData and royaltyShares. See #628, #630 for details.

Replaces workflows previously handled by:

  • registerIPAndAttachLicenseTermsAndDistributeRoyaltyTokens
  • registerIpAndAttachPilTerms
  • register
  • mintAndRegisterIpAndAttachPilTermsAndDistributeRoyaltyTokens
  • mintAndRegisterIpAssetWithPilTerms
  • mintAndRegisterIp

Usage Example:

await client.ipAsset.registerIpAsset({
          nft: { type: "minted", nftContract, tokenId},
          licenseTermsData,
          royaltyShares: [
            {
              recipient: TEST_WALLET_ADDRESS,
              percentage: 100,
            },
          ],
          deadline: 1000n,
        });

2. registerDerivativeIpAsset — Create a derivative IP asset with optional derivData, royaltyShares, and licenseTokenIds. See #629 for details.

Replaces workflows previously handled by:

  • registerDerivativeIpAndAttachLicenseTermsAndDistributeRoyaltyTokens
  • registerDerivativeIp
  • registerIpAndMakeDerivativeWithLicenseTokens
  • mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokens
  • mintAndRegisterIpAndMakeDerivative
  • mintAndRegisterIpAndMakeDerivativeWithLicenseTokens

Usage Example:

await client.ipAsset.registerDerivativeIpAsset({
          nft: { type: "mint", spgNftContract },
          derivData,
          royaltyShares: [
            {
              recipient: TEST_WALLET_ADDRESS,
              percentage: 100,
            },
          ],
        });

3. linkDerivative — Link an existing IP asset as a derivative using the parent IP's license terms or license tokens. See #633 for details.

Replaces workflows previously handled by:

  • registerDerivative
  • registerDerivativeWithLicenseTokens

Usage Example:

await client.ipAsset.linkDerivative({
        childIpId: childIpId,
        licenseTokenIds: [mintLicenseTokensResult.licenseTokenIds![0]],
        maxRts: 5 * 10 ** 6,
  })

batchMintAndRegisterIp

  • Enables batch minting of NFTs from SPGNFT collections and automatically registers them as IP assets. See #615 for details.

License Module Refactor

Moved registerPilTermsAndAttach into the license module. See #636 for details.

Export PIL Flavor class

Introduced the PILFlavor class to generate different license terms, such as nonCommercialSocialRemixing, commercialUse, commercialRemix, and creativeCommonsAttribution. See #605 for details.

Type System Improvements

  • Stricter numeric input types — Only number or bigint are allowed; strings are no longer accepted
  • Added new type aliases: LicenseTermsIdInput, DeadlineInput, RevShareInput, FeeInput. See #635 for details.

Add default values

Added default values for key parameters to simplify method calls. See #638 for details.

The following fields are now optional and have the indicated default values:

  • maxMintingFee: 0
  • maxRts: 100_000_000
  • maxRevenueShare: 100_000_000
  • maxAllowedRewardShare: 100_000_000

Other Changes

  • Enhanced test coverage and validation for commercialRevShare. See #621 for details.
  • Added IP account signature validation test cases. See #623 for details.
  • Fixed scaling of expectMinimumGroupRewardShare. See #612 for details.
  • Added git-leaks pre-commit hook to detect secrets. See #610 for details.
  • Added GitHub CodeQL security scanning badge to README. See #549 for details.

This version provides a robust, safer, and more ergonomic SDK for IP asset management, licensing, and derivative workflows, while consolidating multiple previous methods into intuitive, general-purpose APIs.