@@ -3,7 +3,8 @@ import { Address, Hex } from "viem";
33import { TxOptions } from "../options" ;
44import { RegisterPILTermsRequest } from "./license" ;
55import { EncodedTxData } from "../../abi/generated" ;
6- import { IpMetadataAndTxOption } from "../common" ;
6+ import { IpMetadataAndTxOption , LicensingConfig } from "../common" ;
7+ import { IpMetadataForWorkflow } from "../../utils/getIpMetadataForWorkflow" ;
78
89export type DerivativeData = {
910 parentIpIds : Address [ ] ;
@@ -56,10 +57,14 @@ export type RegisterDerivativeResponse = {
5657 txHash ?: Hex ;
5758 encodedTxData ?: EncodedTxData ;
5859} ;
59-
60+ export type LicenseTermsData < T , U > = {
61+ terms : T ;
62+ licensingConfig : U ;
63+ } ;
6064export type MintAndRegisterIpAssetWithPilTermsRequest = {
6165 spgNftContract : Address ;
62- terms : RegisterPILTermsRequest [ ] ;
66+ allowDuplicates : boolean ;
67+ licenseTermsData : LicenseTermsData < RegisterPILTermsRequest , LicensingConfig > [ ] ;
6368 recipient ?: Address ;
6469 royaltyPolicyAddress ?: Address ;
6570} & IpMetadataAndTxOption ;
@@ -76,10 +81,11 @@ export type RegisterIpAndMakeDerivativeRequest = {
7681 nftContract : Address ;
7782 tokenId : string | number | bigint ;
7883 deadline ?: string | number | bigint ;
79- derivData : {
80- parentIpIds : Address [ ] ;
81- licenseTermsIds : string [ ] | bigint [ ] | number [ ] ;
82- licenseTemplate ?: Address ;
84+ derivData : DerivativeData ;
85+ sigMetadataAndRegister ?: {
86+ signer : Address ;
87+ deadline : bigint | string | number ;
88+ signature : Hex ;
8389 } ;
8490} & IpMetadataAndTxOption ;
8591
@@ -93,7 +99,7 @@ export type RegisterIpAndMakeDerivativeResponse = {
9399export type RegisterIpAndAttachPilTermsRequest = {
94100 nftContract : Address ;
95101 tokenId : bigint | string | number ;
96- terms : RegisterPILTermsRequest [ ] ;
102+ licenseTermsData : LicenseTermsData < RegisterPILTermsRequest , LicensingConfig > [ ] ;
97103 deadline ?: bigint | number | string ;
98104} & IpMetadataAndTxOption ;
99105
@@ -107,12 +113,9 @@ export type RegisterIpAndAttachPilTermsResponse = {
107113
108114export type MintAndRegisterIpAndMakeDerivativeRequest = {
109115 spgNftContract : Address ;
110- derivData : {
111- parentIpIds : Address [ ] ;
112- licenseTermsIds : string [ ] | bigint [ ] | number [ ] ;
113- licenseTemplate ?: Address ;
114- } ;
116+ derivData : DerivativeData ;
115117 recipient ?: Address ;
118+ allowDuplicates : boolean ;
116119} & IpMetadataAndTxOption ;
117120
118121export type MintAndRegisterIpAndMakeDerivativeResponse = {
@@ -216,11 +219,12 @@ export type IpMetadata = {
216219export type MintAndRegisterIpRequest = {
217220 spgNftContract : Address ;
218221 recipient ?: Address ;
222+ allowDuplicates : boolean ;
219223} & IpMetadataAndTxOption ;
220224
221225export type RegisterPilTermsAndAttachRequest = {
222226 ipId : Address ;
223- terms : RegisterPILTermsRequest [ ] ;
227+ licenseTermsData : LicenseTermsData < RegisterPILTermsRequest , LicensingConfig > [ ] ;
224228 deadline ?: string | number | bigint ;
225229 txOptions ?: TxOptions ;
226230} ;
@@ -235,13 +239,16 @@ export type MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
235239 spgNftContract : Address ;
236240 licenseTokenIds : string [ ] | bigint [ ] | number [ ] ;
237241 recipient ?: Address ;
242+ maxRts : number | string ;
243+ allowDuplicates : boolean ;
238244} & IpMetadataAndTxOption ;
239245
240246export type RegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
241247 nftContract : Address ;
242248 tokenId : string | number | bigint ;
243249 licenseTokenIds : string [ ] | bigint [ ] | number [ ] ;
244250 deadline ?: string | number | bigint ;
251+ maxRts : number | string ;
245252} & IpMetadataAndTxOption ;
246253
247254export type BatchMintAndRegisterIpAssetWithPilTermsRequest = {
@@ -290,7 +297,7 @@ export type BatchRegisterResponse = {
290297export type RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest = {
291298 nftContract : Address ;
292299 tokenId : bigint | string | number ;
293- terms : RegisterPILTermsRequest [ ] ;
300+ licenseTermsData : LicenseTermsData < RegisterPILTermsRequest , LicensingConfig > [ ] ;
294301 deadline ?: string | number | bigint ;
295302 royaltyShares : RoyaltyShare [ ] ;
296303 txOptions ?: Omit < TxOptions , "encodedTxDataOnly" > ;
@@ -324,8 +331,9 @@ export type RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensReq
324331 deadline ?: string | number | bigint ;
325332 derivData : DerivativeData ;
326333 royaltyShares : RoyaltyShare [ ] ;
334+ ipMetadata ?: IpMetadataForWorkflow ;
327335 txOptions ?: Omit < TxOptions , "encodedTxDataOnly" > ;
328- } & IPMetadataInfo ;
336+ } ;
329337
330338export type RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse = {
331339 registerDerivativeIpAndAttachLicenseTermsAndDistributeRoyaltyTokensTxHash : Address ;
@@ -337,7 +345,11 @@ export type RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensRes
337345
338346export type MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensRequest = {
339347 spgNftContract : Address ;
340- terms : RegisterPILTermsRequest [ ] ;
348+ allowDuplicates : boolean ;
349+ licenseTermsData : {
350+ terms : RegisterPILTermsRequest ;
351+ licensingConfig : LicensingConfig ;
352+ } [ ] ;
341353 royaltyShares : RoyaltyShare [ ] ;
342354 recipient ?: Address ;
343355 txOptions ?: Omit < TxOptions , "encodedTxDataOnly" > ;
0 commit comments