Key Changes & New Features
1. Digital Asset Minting (CulturaDigitalAssetClient)
-
BREAKING CHANGE: The
mintDigitalAssetfunction signature has changed:- The
imageUrl?: stringparameter has been removed and replaced by two new mandatory parameters:terms: Record<string, any> | string: Holds asset-specific terms or extended metadata. For derivatives, this often contains licensing terms. Accepts an object (for IPFS upload) or a pre-existing URI string.tokenURI: Record<string, any> | string: Holds the standard ERC721 metadata (name, description, image, etc.). Accepts an object (for IPFS upload) or a pre-existing URI string.
- Migration: Update all calls to
mintDigitalAssetto provide both thetermsandtokenURIparameters, even for original assets. For originals,termscan point to general metadata or creator terms distinct from the standardtokenURImetadata.
- The
-
New Validation:
mintDigitalAssetnow strictly validates that the sum ofroyaltySplitvalues in theparentDigitalAssetsarray equals exactly75n(representing 75%) when minting derivative assets (i.e., whenparentDigitalAssetsis not empty). Calls will now fail if the sum is incorrect. Ensure your derivative minting logic adheres to this rule. -
Utility Update: The internal
uploadMetadataToIpfsutility function is now more flexible, accepting anyRecord<string, any>object, aligning with the changes tomintDigitalAsset.
2. Royalty System (RoyaltyClient & CRS Contract Updates)
- New Feature: Off-Chain Payment Workflow: The Cultura Royalty System (CRS) contract and the
RoyaltyClientnow support reporting, accepting, and denying royalty payments made off-chain (e.g., via traditional methods). This allows for tracking and reconciliation within the Cultura ecosystem.- New SDK Methods:
royalty.reportOffChainPayment(tokenId, periodIndex, amount, metadata): Allows a payer (e.g., licensee) to report an off-chain payment amount for a specific royalty period.royalty.acceptOffChainPayment(tokenId, periodIndex, culturaBoundAccount, signature): Allows the rights holder (via their bound account) to accept a reported off-chain payment, requiring an EIP712 signature.royalty.denyOffChainPayment(tokenId, periodIndex, signature): Allows the rights holder to deny a reported off-chain payment, requiring an EIP712 signature.
- New Contract Events: Corresponding events (
OffChainPaymentReported,OffChainPaymentAccepted,OffChainPaymentDenied) are emitted by the CRS contract. - New Contract Errors: Several new error types related to off-chain payment status, signatures, and allowances have been added to the CRS contract for robustness.
- New SDK Methods:
- EIP712 Integration: The CRS contract now implements EIP712, providing the necessary domain separator for creating signatures required by
acceptOffChainPaymentanddenyOffChainPayment. The SDK handles signature creation internally where applicable.
3. Mock Licensing Protocol (MockLicensingProtocolClient Updates)
- Behavior Change:
isLicensedToken(collectionAddress, tokenId)now specifically checks if the currently connected wallet (i.e.,walletClient.account.address) has licensed the specified token via an attestation. Previously, it might have only checked for the token’s existence. This makes the check more accurate for verifying if the current user has the necessary license. - API Update:
createLicensedAssetnow accepts an optionaltermsURI?: stringparameter, allowing explicit setting of terms during mock licensed asset creation. ThelicensedAssetDetailsinput object now also expects an optionalimageUrl. Internally, this function now correctly calls the updatedmintDigitalAssetwith bothtermsURIand token metadata (including the image URL). - Example Flow Update: The
verified-rights-licensing-flow.tsexample demonstrates the updated flow:- The licensee (not the minter) now calls
licenseDigitalAsseton the parent tokens. - Includes checks using the updated
isLicensedTokenlogic before creating the derivative. - Shows passing
imageUrlwithinlicensedAssetDetailstocreateLicensedAsset.
- The licensee (not the minter) now calls
4. Verifier Module (VerifierModuleClient New Feature)
- New Method: Added
getTotalRewards(digitalAssetAddress, digitalAssetId)method. This allows querying the total accumulated rewards (collected verification fees, potentially unclaimed) associated with a specific verified right (identified by its digital asset address and ID) directly from theVerifierModulecontract.
5. Query Client & Types (QueryClient Data Enhancements)
- Richer Query Data: Subgraph queries have been updated to return more comprehensive data, potentially reducing the need for subsequent calls:
digitalAsset.ownernow includes the owner’stokenCount.digitalAsset.verifiedRights(when fetched as part of adigitalAssetquery) andverifiedRights(when queried directly) now include a detailedverificationsarray. Each entry in this array contains information about an individual verification action, including theverifier’s details (address, bond amount, etc.), thebondAmountfor that specific verification, and thetimestamp.verifiedRights.digitalAsset(when fetched as part of averifiedRightsquery) now includes the nested digital asset’sid,tokenId, and fullownerinformation (address, token count).
- Internal Type Reorganization: SDK type definitions have been reorganized into more granular files (e.g.,
types/query.ts,types/resources/culturaDigitalAsset.ts). This primarily affects internal structure but might impact projects directly importing specific type definitions. The mainindex.tsexport structure remains largely consistent for core functionalities.
6. Contract Deployments
- Contract addresses for
devnetandtestnethave been updated. Ensure your SDK configuration points to the correct environment or manually provide the latest addresses if needed. See Deployments.
Migration Guide
mintDigitalAssetCalls: (Required) Review every call tosdk.culturaDigitalAsset.mintDigitalAsset. Replace the old optionalimageUrlparameter with the two new mandatory parameters:terms(object/URI for specific terms/metadata) andtokenURI(object/URI for standard ERC721 metadata including image). Ensure both are provided for original and derivative assets.- Derivative Minting Validation: (Required) If minting derivative assets (passing non-empty
parentDigitalAssets), ensure the sum ofroyaltySplitvalues in the array equals exactly75n. Adjust splits if necessary. isLicensedTokenLogic: (Review Recommended) If usingsdk.mockLicensingProtocol.isLicensedToken, be aware it now checks if the currently connected wallet holds the license attestation. Update application logic if it previously assumed a different check (e.g., just token existence).createLicensedAssetCalls: (Optional) If usingsdk.mockLicensingProtocol.createLicensedAsset, you can now optionally providetermsURIand includeimageUrlin thelicensedAssetDetails.- Query Result Handling: (Optional) Update frontend or backend code that processes query results to leverage the new data fields (e.g.,
owner.tokenCount,verifiedRights.verificationsarray) for richer displays or logic. - Contract Addresses: Ensure your SDK initialization or application configuration uses the updated contract addresses for the target network (testnet/devnet) as listed in the Deployments section.

