You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: clean string type via number type (#635)
* refactor: update type definitions to use LicenseTermsIdInput and DeadlineInput for improved consistency and clarity across IP asset and licensing methods
* refactor: update LicensingConfig and related types to use RevShareInput and FeeInput for improved type consistency across SDK
* refactor: update disputeId type in settleAssertion method to use DisputeId for improved type safety
* refactor: update mintFee handling to use BigInt for consistency across NFT and licensing methods
* refactor: remove redundant NaN checks in revenue share and license validation functions for improved clarity
* refactor: update CommercialRemixRequest and CommercialUseRequest types to use FeeInput for minting fees, enhancing type consistency across SDK
Copy file name to clipboardExpand all lines: packages/core-sdk/src/types/common.ts
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ export type LicensingConfigInput = {
23
23
/** Whether the licensing configuration is active. If false, the configuration is ignored. */
24
24
isSet: boolean;
25
25
/** The minting fee to be paid when minting license tokens. */
26
-
mintingFee: bigint|string|number;
26
+
mintingFee: FeeInput;
27
27
/**
28
28
* The licensingHook is an address to a smart contract that implements the `ILicensingHook` interface.
29
29
* This contract's `beforeMintLicenseTokens` function is executed before a user mints a License Token,
@@ -40,21 +40,21 @@ export type LicensingConfigInput = {
40
40
* Percentage of revenue that must be shared with the licensor.
41
41
* Must be between 0 and 100 (where 100% represents 100_000_000).
42
42
*/
43
-
commercialRevShare: number|string;
43
+
commercialRevShare: RevShareInput;
44
44
/** Whether the licensing is disabled or not. If this is true, then no licenses can be minted and no more derivatives can be attached at all. */
45
45
disabled: boolean;
46
46
/**
47
47
* The minimum percentage of the group’s reward share (from 0 to 100%, represented as 100_000_000) that can be allocated to the IP when it is added to the group.
48
48
* Must be between 0 and 100 (where 100% represents 100_000_000).
49
49
*/
50
-
expectMinimumGroupRewardShare: number|string;
50
+
expectMinimumGroupRewardShare: RevShareInput;
51
51
/** 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. */
/** The liveness is the time window (in seconds) in which a counter dispute can be presented (30days). */
22
-
liveness: bigint|number|string;
24
+
liveness: bigint|number;
23
25
/**
24
26
* The amount of wrapper IP that the dispute initiator pays upfront into a pool.
25
27
* To counter that dispute the opposite party of the dispute has to place a bond of the same amount.
26
28
* 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.
27
29
* 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.
28
30
*/
29
-
bond?: bigint|number|string;
31
+
bond?: bigint|number;
30
32
/**
31
33
* Omit {@link WipOptions.useMulticallWhenPossible} for this function due to disputeInitiator issue.
32
34
* It will be executed sequentially with several transactions.
@@ -41,7 +43,7 @@ export type RaiseDisputeResponse = {
41
43
};
42
44
43
45
exporttypeCancelDisputeRequest={
44
-
disputeId: number|string|bigint;
46
+
disputeId: DisputeId;
45
47
/**
46
48
* Additional data used in the cancellation process.
47
49
*
@@ -57,7 +59,7 @@ export type CancelDisputeResponse = {
57
59
};
58
60
59
61
exporttypeResolveDisputeRequest={
60
-
disputeId: number|string|bigint;
62
+
disputeId: DisputeId;
61
63
/**
62
64
* Additional data used in the resolution process.
63
65
*
@@ -77,7 +79,7 @@ export type TagIfRelatedIpInfringedRequest = {
77
79
/** The ipId to tag */
78
80
ipId: Address;
79
81
/** The dispute id that tagged the related infringing ipId */
0 commit comments