@story-protocol/core-sdk 1.3.0-rc.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +29 -101
  2. package/dist/declarations/src/client.d.ts +3 -27
  3. package/dist/declarations/src/client.d.ts.map +1 -1
  4. package/dist/declarations/src/constants/common.d.ts +1 -4
  5. package/dist/declarations/src/constants/common.d.ts.map +1 -1
  6. package/dist/declarations/src/index.d.ts +13 -13
  7. package/dist/declarations/src/index.d.ts.map +1 -1
  8. package/dist/declarations/src/resources/dispute.d.ts +13 -29
  9. package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/group.d.ts +10 -13
  11. package/dist/declarations/src/resources/group.d.ts.map +1 -1
  12. package/dist/declarations/src/resources/ipAccount.d.ts +6 -24
  13. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
  14. package/dist/declarations/src/resources/ipAsset.d.ts +36 -164
  15. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  16. package/dist/declarations/src/resources/license.d.ts +18 -76
  17. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  18. package/dist/declarations/src/resources/nftClient.d.ts +3 -15
  19. package/dist/declarations/src/resources/nftClient.d.ts.map +1 -1
  20. package/dist/declarations/src/resources/permission.d.ts +13 -56
  21. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  22. package/dist/declarations/src/resources/royalty.d.ts +12 -8
  23. package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
  24. package/dist/declarations/src/types/common.d.ts +11 -3
  25. package/dist/declarations/src/types/common.d.ts.map +1 -1
  26. package/dist/declarations/src/types/config.d.ts +15 -0
  27. package/dist/declarations/src/types/config.d.ts.map +1 -1
  28. package/dist/declarations/src/types/resources/dispute.d.ts +14 -3
  29. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -1
  30. package/dist/declarations/src/types/resources/group.d.ts +14 -9
  31. package/dist/declarations/src/types/resources/group.d.ts.map +1 -1
  32. package/dist/declarations/src/types/resources/ipAccount.d.ts +13 -2
  33. package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
  34. package/dist/declarations/src/types/resources/ipAsset.d.ts +54 -32
  35. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  36. package/dist/declarations/src/types/resources/license.d.ts +65 -6
  37. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  38. package/dist/declarations/src/types/resources/nftClient.d.ts +11 -3
  39. package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -1
  40. package/dist/declarations/src/types/resources/permission.d.ts +34 -2
  41. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
  42. package/dist/declarations/src/types/resources/royalty.d.ts +4 -0
  43. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
  44. package/dist/declarations/src/utils/chain.d.ts +2 -0
  45. package/dist/declarations/src/utils/chain.d.ts.map +1 -1
  46. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts +1 -1
  47. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts.map +1 -1
  48. package/dist/declarations/src/utils/sign.d.ts +0 -17
  49. package/dist/declarations/src/utils/sign.d.ts.map +1 -1
  50. package/dist/story-protocol-core-sdk.cjs.dev.js +514 -709
  51. package/dist/story-protocol-core-sdk.cjs.prod.js +514 -709
  52. package/dist/story-protocol-core-sdk.esm.js +514 -709
  53. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"permission.d.ts","sourceRoot":"../../../../src/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiE,MAAM,MAAM,CAAC;AAGnG,OAAO,EACL,qCAAqC,EACrC,mCAAmC,EACnC,wBAAwB,EACxB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACvB,yCAAsC;AACvC,OAAO,EAEL,sBAAsB,EACtB,wBAAwB,EAExB,qBAAqB,EACrB,kBA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,kBAAkB,EACnB,4BAAyB;AAI1B,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAE3C,qBAAa,gBAAgB;IACpB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,wBAAwB,EAAE,wBAAwB,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;gBAEvB,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ;IASlF;;;;;;;;OAQG;IACU,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IA8B3F;;;;OAIG;IACU,4BAA4B,CACvC,OAAO,EAAE,mCAAmC,GAC3C,OAAO,CAAC,sBAAsB,CAAC;IA8DlC;;;;OAIG;IACU,iBAAiB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,sBAAsB,CAAC;IA0BlC;;;;OAIG;IACU,mBAAmB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC;IAiClC;;;;OAIG;IACU,8BAA8B,CACzC,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,sBAAsB,CAAC;YA0DpB,iBAAiB;CAQhC"}
@@ -17,9 +17,14 @@ export declare class RoyaltyClient {
17
17
  private readonly chainId;
18
18
  constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
19
19
  /**
20
- * Claims all revenue from the child IPs of an ancestor IP, then transfer.
20
+ * Claims all revenue from the child IPs of an ancestor IP, then transfer
21
21
  * all claimed tokens to the wallet if the wallet owns the IP or is the claimer.
22
22
  * If claimed token is WIP, it will also be converted back to IP.
23
+ *
24
+ * @remarks
25
+ * Even if there are no child IPs, you must still populate {@link ClaimAllRevenueRequest.currencyTokens} with
26
+ * the token addresses you wish to claim. This is required for the claim operation to know which
27
+ * token balances to process.
23
28
  */
24
29
  claimAllRevenue(req: ClaimAllRevenueRequest): Promise<ClaimAllRevenueResponse>;
25
30
  /**
@@ -27,6 +32,11 @@ export declare class RoyaltyClient {
27
32
  * if multicall is disabled, it will call @link{claimAllRevenue} for each ancestor IP.
28
33
  * Then transfer all claimed tokens to the wallet if the wallet owns the IP or is the claimer.
29
34
  * If claimed token is WIP, it will also be converted back to IP.
35
+ *
36
+ * @remarks
37
+ * Even if there are no child IPs, you must still populate `currencyTokens` in each ancestor IP
38
+ * with the token addresses you wish to claim. This is required for the claim operation to know which
39
+ * token balances to process.
30
40
  */
31
41
  batchClaimAllRevenue(request: BatchClaimAllRevenueRequest): Promise<BatchClaimAllRevenueResponse>;
32
42
  /**
@@ -35,17 +45,11 @@ export declare class RoyaltyClient {
35
45
  payRoyaltyOnBehalf(request: PayRoyaltyOnBehalfRequest): Promise<PayRoyaltyOnBehalfResponse>;
36
46
  /**
37
47
  * Get total amount of revenue token claimable by a royalty token holder.
38
- * @param request - The request object that contains all data needed to claim Revenue.
39
- * @param request.royaltyVaultIpId The id of the royalty vault.
40
- * @param request.claimer The address of the royalty token holder
41
- * @param request.token The revenue token to claim.
42
- * @returns A Promise that contains the amount of revenue token claimable
48
+ * Returns the amount of revenue token claimable by the claimer.
43
49
  */
44
50
  claimableRevenue(request: ClaimableRevenueRequest): Promise<ClaimableRevenueResponse>;
45
51
  /**
46
52
  * Get the royalty vault proxy address of given royaltyVaultIpId.
47
- * @param royaltyVaultIpId the id of the royalty vault.
48
- * @returns A Promise that resolves to an object containing the royalty vault address.
49
53
  */
50
54
  getRoyaltyVaultAddress(royaltyVaultIpId: Hex): Promise<Address>;
51
55
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../src/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGP,GAAG,EACH,YAAY,EAGb,MA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AAO,CAAC,QAAQ,CAAC,aAAa,CAAU;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;gBAEvB,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ;IAalF;;;;;;;;;OASG;IACU,eAAe,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAmD3F;;;;;;;;;;OAUG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;IAoHxC;;OAEG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;IA6DtC;;;OAGG;IACU,gBAAgB,CAC3B,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAepC;;OAEG;IACU,sBAAsB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAU5E;;OAEG;IACU,eAAe,CAAC,EAC3B,SAAS,EACT,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,KAAK,GACN,EAAE,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC;YAsB1C,mCAAmC;YAuBnC,cAAc;IAY5B;;;OAGG;YACW,eAAe;CAe9B"}
@@ -9,14 +9,22 @@ export type IpMetadataAndTxOptions = WithTxOptions & {
9
9
  /** The desired metadata for the newly minted NFT and newly registered IP. */
10
10
  ipMetadata?: Partial<IpMetadataForWorkflow>;
11
11
  };
12
- export type LicensingConfig = {
12
+ /**
13
+ * This data used IP owners to define the configuration
14
+ * when others are minting license tokens of their IP through the LicensingModule.
15
+ * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/lib/Licensing.sol#L27 | Licensing.sol}
16
+ */
17
+ export type LicensingConfigInput = {
13
18
  /** Whether the configuration is set or not */
14
19
  isSet: boolean;
15
20
  /** The minting fee to be paid when minting license tokens. */
16
21
  mintingFee: bigint | string | number;
17
22
  /** The hook contract address for the licensing module, or zero address if none. */
18
23
  licensingHook: Address;
19
- /** The data to be used by the licensing hook. */
24
+ /**
25
+ * The data to be used by the licensing hook.
26
+ * Set to a zero hash if no data is provided.
27
+ */
20
28
  hookData: Hex;
21
29
  /** The commercial revenue share percentage (from 0 to 100%, represented as 100_000_000). */
22
30
  commercialRevShare: number | string;
@@ -27,7 +35,7 @@ export type LicensingConfig = {
27
35
  /** 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. */
28
36
  expectGroupRewardPool: Address;
29
37
  };
30
- export type ValidatedLicensingConfig = LicensingConfig & {
38
+ export type LicensingConfig = LicensingConfigInput & {
31
39
  mintingFee: bigint;
32
40
  commercialRevShare: number;
33
41
  expectMinimumGroupRewardShare: number;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/types","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,qBAAkB;AAC1C,OAAO,EAAE,qBAAqB,EAAE,6CAA0C;AAE1E,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG;IACnD,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC7C,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC5B,8CAA8C;IAC9C,KAAK,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC,mFAAmF;IACnF,aAAa,EAAE,OAAO,CAAC;IACvB,iDAAiD;IACjD,QAAQ,EAAE,GAAG,CAAC;IACd,4FAA4F;IAC5F,k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CAAC;IACd,4FAA4F;IAC5F,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,qKAAqK;IACrK,6BAA6B,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/C,oMAAoM;IACpM,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/C;;;GAGG;AACH,oBAAY,YAAY;IACtB,wBAAwB,uBAAuB;IAC/C,iBAAiB,oBAAoB;IACrC,wBAAwB,0BAA0B;CACnD"}
@@ -13,16 +13,31 @@ export type SupportedChainIds = "aeneid" | "mainnet" | ChainIds;
13
13
  */
14
14
  export type UseAccountStoryConfig = {
15
15
  readonly account: Account | Address;
16
+ /**
17
+ * The chain ID to use, the default is `aeneid`.
18
+ *
19
+ * @default 13_15
20
+ */
16
21
  readonly chainId?: SupportedChainIds;
17
22
  readonly transport: Transport;
18
23
  };
19
24
  export type UseWalletStoryConfig = {
25
+ /**
26
+ * The chain ID to use, the default is `aeneid`.
27
+ *
28
+ * @default 13_15
29
+ */
20
30
  readonly chainId?: SupportedChainIds;
21
31
  readonly transport: Transport;
22
32
  readonly wallet: SimpleWalletClient;
23
33
  };
24
34
  export type StoryConfig = {
25
35
  readonly transport: Transport;
36
+ /**
37
+ * The chain ID to use, the default is `aeneid`.
38
+ *
39
+ * @default 13_15
40
+ */
26
41
  readonly chainId?: SupportedChainIds;
27
42
  readonly wallet?: SimpleWalletClient;
28
43
  readonly account?: Account | Address;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"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AAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAAE,CAAC;AAErF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -22,8 +22,9 @@ export type RaiseDisputeRequest = WithTxOptions & {
22
22
  * The amount of wrapper IP that the dispute initiator pays upfront into a pool.
23
23
  * To counter that dispute the opposite party of the dispute has to place a bond of the same amount.
24
24
  * The winner of the dispute gets the original bond back + 50% of the other party bond. The remaining 50% of the loser party bond goes to the reviewer.
25
+ * The bond amount must be between the minimum and maximum bond values defined in the Optimistic Oracle V3 (OOV3) contract. If not specified, it defaults to the minimum bond value.
25
26
  */
26
- bond: bigint | number | string;
27
+ bond?: bigint | number | string;
27
28
  /**
28
29
  * Omit {@link WipOptions.useMulticallWhenPossible} for this function due to disputeInitiator issue.
29
30
  * It will be executed sequentially with several transactions.
@@ -37,7 +38,12 @@ export type RaiseDisputeResponse = {
37
38
  };
38
39
  export type CancelDisputeRequest = {
39
40
  disputeId: number | string | bigint;
40
- data?: Address;
41
+ /**
42
+ * Additional data used in the cancellation process.
43
+ *
44
+ * @default 0x
45
+ */
46
+ data?: Hex;
41
47
  txOptions?: TxOptions;
42
48
  };
43
49
  export type CancelDisputeResponse = {
@@ -46,7 +52,12 @@ export type CancelDisputeResponse = {
46
52
  };
47
53
  export type ResolveDisputeRequest = {
48
54
  disputeId: number | string | bigint;
49
- data: Address;
55
+ /**
56
+ * Additional data used in the resolution process.
57
+ *
58
+ * @default 0x
59
+ */
60
+ data?: Hex;
50
61
  txOptions?: TxOptions;
51
62
  };
52
63
  export type ResolveDisputeResponse = {
@@ -1 +1 @@
1
- {"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,sBAAmB;AAClE,OAAO,EAAE,aAAa,EAAE,+BAA4B;AAEpD,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,mDAAmD;IACnD,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,yGAAyG;IACzG,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,0BAA0B,CAAC,CA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IAClC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,gBAAgB,EAAE;QAChB,sBAAsB;QACtB,IAAI,EAAE,OAAO,CAAC;QACd,6DAA6D;QAC7D,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;KACrC,EAAE,CAAC;IACJ,OAAO,CAAC,EAAE;QACR;;;;;WAKG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;KACpC,CAAC;CACH,GAAG,aAAa,CAAC;AAElB,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,WAAW,EAAE,GAAG,CAAC;IACjB;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,0BAA0B,CAAC,CAAC;CAC3D,GAAG,aAAa,CAAC"}
@@ -1,15 +1,19 @@
1
1
  import { Address, Hash, TransactionReceipt } from "viem";
2
2
  import { TxOptions } from "../options.js";
3
3
  import { EncodedTxData, GroupingModuleCollectedRoyaltiesToGroupPoolEvent } from "../../abi/generated.js";
4
- import { IpMetadataAndTxOptions, LicensingConfig, ValidatedLicensingConfig } from "../common.js";
5
- export type LicenseData = {
4
+ import { IpMetadataAndTxOptions, LicensingConfigInput, LicensingConfig } from "../common.js";
5
+ export type LicenseDataInput = {
6
6
  licenseTermsId: string | bigint | number;
7
- licensingConfig?: LicensingConfig;
7
+ /**
8
+ * The address of the license template.
9
+ * Defaults to {@link https://docs.story.foundation/docs/programmable-ip-license | PIL} address if not provided.
10
+ */
11
+ licensingConfig?: LicensingConfigInput;
8
12
  licenseTemplate?: Address;
9
13
  };
10
- export type ValidatedLicenseData = {
14
+ export type LicenseData = {
11
15
  licenseTermsId: bigint;
12
- licensingConfig: ValidatedLicensingConfig;
16
+ licensingConfig: LicensingConfig;
13
17
  licenseTemplate: Address;
14
18
  };
15
19
  export type MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest = {
@@ -24,7 +28,7 @@ export type MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest = {
24
28
  /** The maximum reward share percentage that can be allocated to each member IP. */
25
29
  maxAllowedRewardShare: number | string;
26
30
  /** The data of the license and its configuration to be attached to the new group IP. */
27
- licenseData: LicenseData[];
31
+ licenseData: LicenseDataInput[];
28
32
  /** The address of the recipient of the minted NFT. If not provided, the function will use the user's own wallet address. */
29
33
  recipient?: Address;
30
34
  /**
@@ -40,6 +44,7 @@ export type MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse = {
40
44
  tokenId?: bigint;
41
45
  };
42
46
  export type RegisterGroupRequest = {
47
+ /** The address specifying how royalty will be split amongst the pool of IPs in the group. */
43
48
  groupPool: Address;
44
49
  txOptions?: TxOptions;
45
50
  };
@@ -59,7 +64,7 @@ export type RegisterIpAndAttachLicenseAndAddToGroupRequest = {
59
64
  */
60
65
  deadline?: bigint;
61
66
  /** The data of the license and its configuration to be attached to the new group IP. */
62
- licenseData: LicenseData[];
67
+ licenseData: LicenseDataInput[];
63
68
  /** The maximum reward share percentage that can be allocated to each member IP. */
64
69
  maxAllowedRewardShare: number | string;
65
70
  } & IpMetadataAndTxOptions;
@@ -73,7 +78,7 @@ export type RegisterGroupAndAttachLicenseRequest = {
73
78
  /** The address specifying how royalty will be split amongst the pool of IPs in the group. */
74
79
  groupPool: Address;
75
80
  /** The data of the license and its configuration to be attached to the new group IP. */
76
- licenseData: LicenseData;
81
+ licenseData: LicenseDataInput;
77
82
  txOptions?: TxOptions;
78
83
  };
79
84
  export type RegisterGroupAndAttachLicenseResponse = {
@@ -87,7 +92,7 @@ export type RegisterGroupAndAttachLicenseAndAddIpsRequest = {
87
92
  /** The IP IDs of the IPs to be added to the group. */
88
93
  ipIds: Address[];
89
94
  /** The data of the license and its configuration to be attached to the new group IP. */
90
- licenseData: LicenseData;
95
+ licenseData: LicenseDataInput;
91
96
  /** The maximum reward share percentage that can be allocated to each member IP. */
92
97
  maxAllowedRewardShare: number | string;
93
98
  txOptions?: TxOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"group.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,sBAAmB;AACvC,OAAO,EACL,aAAa,EACb,gDAAgD,EACjD,+BAA4B;AAC7B,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAE,qBAAkB;AAE9F,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACzC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,wBAAwB,CAAC;IAC1C,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AACF,MAAM,MAAM,qDAAqD,GAAG;IAClE,cAAc,EAAE,OAAO,CAAC;IACxB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mFAAmF;IACnF,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,wFAAwF;IACxF,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,4HAA4H;I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GAAG;IAC1D,6FAA6F;IAC7F,SAAS,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,wFAAwF;IACxF,WAAW,EAAE,gBAAgB,CAAC;IAC9B,mFAAmF;IACnF,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,8CAA8C,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,8DAA8D;IAC9D,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,IAAI,CAAC,gDAAgD,EAAE,MAAM,CAAC,EAAE,CAAC;IACtF,oBAAoB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,OAAO,CAAC;QACf;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;KACxB,EAAE,CAAC;CACL,CAAC"}
@@ -3,10 +3,14 @@ import { TxOptions } from "../options.js";
3
3
  import { EncodedTxData } from "../../abi/generated.js";
4
4
  import { TokenAmountInput } from "../common.js";
5
5
  export type IPAccountExecuteRequest = {
6
+ /** The IP ID of the IP Account {@link https://docs.story.foundation/docs/ip-account}. */
6
7
  ipId: Address;
8
+ /** The recipient of the transaction. */
7
9
  to: Address;
10
+ /** The amount of IP to send. */
8
11
  value: number;
9
- data: Address;
12
+ /** The data to send along with the transaction. */
13
+ data: Hex;
10
14
  txOptions?: TxOptions;
11
15
  };
12
16
  export type IPAccountExecuteResponse = {
@@ -14,12 +18,19 @@ export type IPAccountExecuteResponse = {
14
18
  encodedTxData?: EncodedTxData;
15
19
  };
16
20
  export type IPAccountExecuteWithSigRequest = {
21
+ /** The IP ID of the IP Account {@link https://docs.story.foundation/docs/ip-account}.*/
17
22
  ipId: Address;
23
+ /** The recipient of the transaction. */
18
24
  to: Address;
19
- data: Address;
25
+ /** The data to send along with the transaction. */
26
+ data: Hex;
27
+ /** The signer of the transaction. */
20
28
  signer: Address;
29
+ /** The deadline of the transaction signature in seconds. */
21
30
  deadline: number | bigint | string;
31
+ /** The signature of the transaction, EIP-712 encoded. The helper method `getPermissionSignature` supports generating the signature. */
22
32
  signature: Address;
33
+ /** The amount of IP to send. */
23
34
  value?: number | bigint | string;
24
35
  txOptions?: TxOptions;
25
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,sBAAmB;AACvC,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,qBAAkB;AAE7C,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;CAC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IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,uEAAuE;QACvE,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,gBAAgB,CAAC;QACzB,oCAAoC;QACpC,MAAM,EAAE,OAAO,CAAC;KACjB,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;CAClD,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import { Address, Hash, Hex, TransactionReceipt } from "viem";
2
2
  import { TxOptions, WithWipOptions } from "../options.js";
3
- import { LicenseTerms, RegisterPILTermsRequest } from "./license.js";
3
+ import { LicenseTerms, LicenseTermsInput } from "./license.js";
4
4
  import { EncodedTxData } from "../../abi/generated.js";
5
- import { IpMetadataAndTxOptions, LicensingConfig, ValidatedLicensingConfig } from "../common.js";
6
- import { IpMetadataForWorkflow } from "../../utils/getIpMetadataForWorkflow.js";
7
- export type DerivativeData = {
5
+ import { IpMetadataAndTxOptions, LicensingConfig, LicensingConfigInput } from "../common.js";
6
+ export type DerivativeDataInput = {
8
7
  parentIpIds: Address[];
9
8
  /** The IDs of the license terms that the parent IP supports. */
10
9
  licenseTermsIds: bigint[] | string[] | number[];
@@ -23,10 +22,13 @@ export type DerivativeData = {
23
22
  * @default 100
24
23
  */
25
24
  maxRevenueShare?: number | string;
26
- /** The license template address, default value is Programmable IP License. */
25
+ /**
26
+ * The address of the license template.
27
+ * Defaults to {@link https://docs.story.foundation/docs/programmable-ip-license | License Template} address if not provided.
28
+ */
27
29
  licenseTemplate?: Address;
28
30
  };
29
- export type InternalDerivativeData = {
31
+ export type DerivativeData = {
30
32
  parentIpIds: readonly Address[];
31
33
  licenseTermsIds: readonly bigint[];
32
34
  royaltyContext: Hex;
@@ -39,13 +41,22 @@ export type RegisterIpResponse = RegistrationResponse & {
39
41
  encodedTxData?: EncodedTxData;
40
42
  };
41
43
  export type RegisterRequest = {
44
+ /** The address of the NFT. */
42
45
  nftContract: Address;
46
+ /** The token identifier of the NFT. */
43
47
  tokenId: string | number | bigint;
48
+ /**
49
+ * The deadline of the transaction signature in seconds.
50
+ * @default 1000
51
+ */
44
52
  deadline?: string | number | bigint;
45
53
  } & IpMetadataAndTxOptions;
46
54
  export type RegisterDerivativeWithLicenseTokensRequest = {
55
+ /** The derivative IP ID. */
47
56
  childIpId: Address;
57
+ /** The IDs of the license tokens. */
48
58
  licenseTokenIds: string[] | bigint[] | number[];
59
+ /** The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000). */
49
60
  maxRts: number | string;
50
61
  txOptions?: TxOptions;
51
62
  };
@@ -53,7 +64,7 @@ export type RegisterDerivativeWithLicenseTokensResponse = {
53
64
  txHash?: Hex;
54
65
  encodedTxData?: EncodedTxData;
55
66
  };
56
- export type RegisterDerivativeRequest = WithWipOptions & DerivativeData & {
67
+ export type RegisterDerivativeRequest = WithWipOptions & DerivativeDataInput & {
57
68
  txOptions?: TxOptions;
58
69
  childIpId: Address;
59
70
  };
@@ -61,12 +72,12 @@ export type RegisterDerivativeResponse = {
61
72
  txHash?: Hex;
62
73
  encodedTxData?: EncodedTxData;
63
74
  };
64
- export type LicenseTermsData<T = RegisterPILTermsRequest, C = LicensingConfig> = {
75
+ export type LicenseTermsDataInput<T = LicenseTermsInput, C = LicensingConfigInput> = {
65
76
  terms: T;
66
77
  licensingConfig?: C;
67
78
  };
68
- export type ValidatedLicenseTermsData = Omit<LicenseTermsData<LicenseTerms, ValidatedLicensingConfig>, "licensingConfig"> & {
69
- licensingConfig: ValidatedLicensingConfig;
79
+ export type LicenseTermsData = Omit<LicenseTermsDataInput<LicenseTerms, LicensingConfig>, "licensingConfig"> & {
80
+ licensingConfig: LicensingConfig;
70
81
  };
71
82
  export type MintAndRegisterIpAssetWithPilTermsRequest = {
72
83
  spgNftContract: Address;
@@ -76,8 +87,8 @@ export type MintAndRegisterIpAssetWithPilTermsRequest = {
76
87
  */
77
88
  allowDuplicates?: boolean;
78
89
  /** The data of the license and its configuration to be attached to the IP. */
79
- licenseTermsData: LicenseTermsData[];
80
- /** The address to receive the minted NFT. If not provided, the function will use the user's own wallet address. */
90
+ licenseTermsData: LicenseTermsDataInput[];
91
+ /** The address to receive the minted NFT. If not provided, the client's own wallet address will be used. */
81
92
  recipient?: Address;
82
93
  } & IpMetadataAndTxOptions & WithWipOptions;
83
94
  export type MintAndRegisterIpAssetWithPilTermsResponse = {
@@ -97,7 +108,7 @@ export type RegisterIpAndMakeDerivativeRequest = {
97
108
  */
98
109
  deadline?: string | number | bigint;
99
110
  /** The derivative data to be used for register derivative. */
100
- derivData: DerivativeData;
111
+ derivData: DerivativeDataInput;
101
112
  } & IpMetadataAndTxOptions & WithWipOptions;
102
113
  export type RegisterIpAndMakeDerivativeResponse = {
103
114
  txHash?: Hex;
@@ -110,7 +121,7 @@ export type RegisterIpAndAttachPilTermsRequest = {
110
121
  nftContract: Address;
111
122
  tokenId: bigint | string | number;
112
123
  /** The data of the license and its configuration to be attached to the IP. */
113
- licenseTermsData: LicenseTermsData[];
124
+ licenseTermsData: LicenseTermsDataInput[];
114
125
  /**
115
126
  * The deadline for the signature in seconds.
116
127
  * @default 1000
@@ -127,8 +138,8 @@ export type RegisterIpAndAttachPilTermsResponse = {
127
138
  export type MintAndRegisterIpAndMakeDerivativeRequest = {
128
139
  spgNftContract: Address;
129
140
  /** The derivative data to be used for register derivative. */
130
- derivData: DerivativeData;
131
- /** The address to receive the minted NFT. If not provided, the function will use the user's own wallet address. */
141
+ derivData: DerivativeDataInput;
142
+ /** The address to receive the minted NFT. If not provided, the client's own wallet address will be used. */
132
143
  recipient?: Address;
133
144
  /**
134
145
  * Set to true to allow minting an NFT with a duplicate metadata hash.
@@ -139,7 +150,7 @@ export type MintAndRegisterIpAndMakeDerivativeRequest = {
139
150
  export type MintAndRegisterIpAndMakeDerivativeResponse = RegistrationResponse & {
140
151
  encodedTxData?: EncodedTxData;
141
152
  };
142
- type IPMetadataInfo = {
153
+ type WithIpMetadata = {
143
154
  ipMetadata?: {
144
155
  ipMetadataURI?: string;
145
156
  ipMetadataHash?: Hex;
@@ -149,6 +160,7 @@ type IPMetadataInfo = {
149
160
  };
150
161
  export type MintAndRegisterIpRequest = IpMetadataAndTxOptions & WithWipOptions & {
151
162
  spgNftContract: Address;
163
+ /** The address of the recipient of the minted NFT. If not provided, the client's own wallet address will be used. */
152
164
  recipient?: Address;
153
165
  /**
154
166
  * Set to true to allow minting an NFT with a duplicate metadata hash.
@@ -159,7 +171,7 @@ export type MintAndRegisterIpRequest = IpMetadataAndTxOptions & WithWipOptions &
159
171
  export type RegisterPilTermsAndAttachRequest = {
160
172
  ipId: Address;
161
173
  /** The data of the license and its configuration to be attached to the IP. */
162
- licenseTermsData: LicenseTermsData[];
174
+ licenseTermsData: LicenseTermsDataInput[];
163
175
  /** The deadline for the signature in seconds.
164
176
  * @default 1000
165
177
  */
@@ -173,8 +185,11 @@ export type RegisterPilTermsAndAttachResponse = {
173
185
  };
174
186
  export type MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
175
187
  spgNftContract: Address;
188
+ /** The IDs of the license tokens to be burned for linking the IP to parent IPs. */
176
189
  licenseTokenIds: string[] | bigint[] | number[];
190
+ /** The address of the recipient of the minted NFT. If not provided, the client's own wallet address will be used. */
177
191
  recipient?: Address;
192
+ /** The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000). */
178
193
  maxRts: number | string;
179
194
  /**
180
195
  * Set to true to allow minting an NFT with a duplicate metadata hash.
@@ -185,9 +200,15 @@ export type MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
185
200
  export type RegisterIpAndMakeDerivativeWithLicenseTokensRequest = {
186
201
  nftContract: Address;
187
202
  tokenId: string | number | bigint;
203
+ /** The IDs of the license tokens to be burned for linking the IP to parent IPs. */
188
204
  licenseTokenIds: string[] | bigint[] | number[];
189
- deadline?: string | number | bigint;
205
+ /** The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000). */
190
206
  maxRts: number | string;
207
+ /**
208
+ * The deadline for the signature in seconds.
209
+ * @default 1000
210
+ */
211
+ deadline?: string | number | bigint;
191
212
  } & IpMetadataAndTxOptions & WithWipOptions;
192
213
  export type BatchMintAndRegisterIpAssetWithPilTermsRequest = {
193
214
  args: Omit<MintAndRegisterIpAssetWithPilTermsRequest, "txOptions">[];
@@ -205,6 +226,9 @@ export type BatchMintAndRegisterIpAssetWithPilTermsResponse = {
205
226
  };
206
227
  export type BatchRegisterDerivativeRequest = {
207
228
  args: RegisterDerivativeRequest[];
229
+ /** The deadline for the signature in seconds.
230
+ * @default 1000
231
+ */
208
232
  deadline?: string | number | bigint;
209
233
  txOptions?: Omit<TxOptions, "encodedTxDataOnly">;
210
234
  };
@@ -232,7 +256,7 @@ export type RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest = {
232
256
  nftContract: Address;
233
257
  tokenId: bigint | string | number;
234
258
  /** The data of the license and its configuration to be attached to the new group IP. */
235
- licenseTermsData: LicenseTermsData[];
259
+ licenseTermsData: LicenseTermsDataInput[];
236
260
  /**
237
261
  * The deadline for the signature in seconds.
238
262
  * @default 1000
@@ -241,7 +265,7 @@ export type RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest = {
241
265
  /** Authors of the IP and their shares of the royalty tokens. */
242
266
  royaltyShares: RoyaltyShare[];
243
267
  txOptions?: Omit<TxOptions, "encodedTxDataOnly">;
244
- } & IPMetadataInfo;
268
+ } & WithIpMetadata;
245
269
  export type RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse = {
246
270
  registerIpAndAttachPilTermsAndDeployRoyaltyVaultTxHash: Hex;
247
271
  distributeRoyaltyTokensTxHash: Hex;
@@ -284,13 +308,11 @@ export type RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensReq
284
308
  */
285
309
  deadline?: string | number | bigint;
286
310
  /** The derivative data to be used for register derivative.*/
287
- derivData: DerivativeData;
311
+ derivData: DerivativeDataInput;
288
312
  /** Authors of the IP and their shares of the royalty tokens. */
289
313
  royaltyShares: RoyaltyShare[];
290
- /** The desired metadata for the newly minted NFT and newly registered IP. */
291
- ipMetadata?: IpMetadataForWorkflow;
292
314
  txOptions?: Omit<TxOptions, "encodedTxDataOnly">;
293
- } & WithWipOptions;
315
+ } & WithWipOptions & WithIpMetadata;
294
316
  export type RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse = {
295
317
  registerDerivativeIpAndAttachLicenseTermsAndDistributeRoyaltyTokensTxHash: Address;
296
318
  distributeRoyaltyTokensTxHash: Address;
@@ -307,13 +329,13 @@ export type MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensRequest
307
329
  */
308
330
  allowDuplicates?: boolean;
309
331
  /** The data of the license and its configuration to be attached to the new group IP. */
310
- licenseTermsData: LicenseTermsData[];
332
+ licenseTermsData: LicenseTermsDataInput[];
311
333
  /** Authors of the IP and their shares of the royalty tokens */
312
334
  royaltyShares: RoyaltyShare[];
313
- /** The address to receive the minted NFT. If not provided, the function will use the user's own wallet address. */
335
+ /** The address to receive the minted NFT. If not provided, the client's own wallet address will be used. */
314
336
  recipient?: Address;
315
337
  txOptions?: Omit<TxOptions, "encodedTxDataOnly">;
316
- } & IPMetadataInfo & WithWipOptions;
338
+ } & WithIpMetadata & WithWipOptions;
317
339
  export type MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensResponse = {
318
340
  txHash: Hex;
319
341
  ipId?: Address;
@@ -324,7 +346,7 @@ export type MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensResponse
324
346
  export type MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensRequest = {
325
347
  spgNftContract: Address;
326
348
  /** The derivative data to be used for register derivative. */
327
- derivData: DerivativeData;
349
+ derivData: DerivativeDataInput;
328
350
  /** Authors of the IP and their shares of the royalty tokens. */
329
351
  royaltyShares: RoyaltyShare[];
330
352
  /**
@@ -332,10 +354,10 @@ export type MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensRequest
332
354
  * @default true
333
355
  */
334
356
  allowDuplicates?: boolean;
335
- /** The address to receive the minted NFT. If not provided, the function will use the user's own wallet address. */
357
+ /** The address to receive the minted NFT. If not provided, the client's own wallet address will be used. */
336
358
  recipient?: Address;
337
359
  txOptions?: Omit<TxOptions, "encodedTxDataOnly">;
338
- } & IPMetadataInfo & WithWipOptions;
360
+ } & WithIpMetadata & WithWipOptions;
339
361
  export type MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensResponse = {
340
362
  txHash: Hex;
341
363
  ipId?: Address;
@@ -347,7 +369,7 @@ export type CommonRegistrationParams = WithWipOptions & {
347
369
  spgNftContract?: Address;
348
370
  /** the spg contract in which the minting fee is paid to */
349
371
  spgSpenderAddress: Address;
350
- derivData?: InternalDerivativeData;
372
+ derivData?: DerivativeData;
351
373
  sender: Address;
352
374
  txOptions?: TxOptions;
353
375
  };