@story-protocol/core-sdk 1.1.0-stable → 1.2.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/abi/generated.d.ts +24560 -13241
- package/dist/declarations/src/abi/generated.d.ts.map +1 -1
- package/dist/declarations/src/client.d.ts +9 -0
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +9 -7
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/dispute.d.ts +6 -7
- package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
- package/dist/declarations/src/resources/group.d.ts +85 -0
- package/dist/declarations/src/resources/group.d.ts.map +1 -0
- package/dist/declarations/src/resources/ipAsset.d.ts +93 -14
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +42 -13
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/nftClient.d.ts +14 -9
- package/dist/declarations/src/resources/nftClient.d.ts.map +1 -1
- package/dist/declarations/src/resources/permission.d.ts +1 -2
- package/dist/declarations/src/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/resources/royalty.d.ts +64 -13
- package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/types/common.d.ts +10 -11
- package/dist/declarations/src/types/common.d.ts.map +1 -1
- package/dist/declarations/src/types/config.d.ts +1 -1
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/dispute.d.ts +4 -5
- package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/group.d.ts +65 -0
- package/dist/declarations/src/types/resources/group.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/ipAsset.d.ts +35 -14
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/license.d.ts +28 -1
- package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/nftClient.d.ts +7 -2
- package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/permission.d.ts +11 -1
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/royalty.d.ts +57 -10
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/utils/chain.d.ts +5 -6
- package/dist/declarations/src/utils/chain.d.ts.map +1 -1
- package/dist/declarations/src/utils/ipfs.d.ts +4 -0
- package/dist/declarations/src/utils/ipfs.d.ts.map +1 -0
- package/dist/declarations/src/utils/sign.d.ts +1 -1
- package/dist/declarations/src/utils/sign.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +6807 -20722
- package/dist/story-protocol-core-sdk.cjs.prod.js +6807 -20722
- package/dist/story-protocol-core-sdk.esm.js +6802 -20723
- package/package.json +3 -1
@@ -0,0 +1,85 @@
|
|
1
|
+
import { PublicClient } from "viem";
|
2
|
+
import { CoreMetadataModuleClient, GroupingModuleClient, GroupingModuleEventClient, GroupingWorkflowsClient, IpAssetRegistryClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, SimpleWalletClient } from "../abi/generated.js";
|
3
|
+
import { SupportedChainIds } from "../types/config.js";
|
4
|
+
import { MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest, MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse, RegisterGroupAndAttachLicenseAndAddIpsRequest, RegisterGroupAndAttachLicenseAndAddIpsResponse, RegisterGroupAndAttachLicenseRequest, RegisterGroupAndAttachLicenseResponse, RegisterGroupRequest, RegisterGroupResponse, RegisterIpAndAttachLicenseAndAddToGroupRequest, RegisterIpAndAttachLicenseAndAddToGroupResponse } from "../types/resources/group.js";
|
5
|
+
export declare class GroupClient {
|
6
|
+
groupingWorkflowsClient: GroupingWorkflowsClient;
|
7
|
+
groupingModuleEventClient: GroupingModuleEventClient;
|
8
|
+
groupingModuleClient: GroupingModuleClient;
|
9
|
+
licenseTemplateClient: PiLicenseTemplateClient;
|
10
|
+
licenseTokenReadOnlyClient: LicenseTokenReadOnlyClient;
|
11
|
+
ipAssetRegistryClient: IpAssetRegistryClient;
|
12
|
+
coreMetadataModuleClient: CoreMetadataModuleClient;
|
13
|
+
licensingModuleClient: LicensingModuleClient;
|
14
|
+
licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
|
15
|
+
private readonly rpcClient;
|
16
|
+
private readonly wallet;
|
17
|
+
private readonly chainId;
|
18
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: SupportedChainIds);
|
19
|
+
/** Registers a Group IPA.
|
20
|
+
* @param request - The request object containing necessary data to register group.
|
21
|
+
* @param request.groupPool The address specifying how royalty will be split amongst the pool of IPs in the group.
|
22
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
23
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes group id.
|
24
|
+
* @emits PGroupRegistered (groupId, groupPool);
|
25
|
+
*/
|
26
|
+
registerGroup(request: RegisterGroupRequest): Promise<RegisterGroupResponse>;
|
27
|
+
/** Mint an NFT from a SPGNFT collection, register it with metadata as an IP, attach license terms to the registered IP, and add it to a group IP.
|
28
|
+
* @param request - The request object containing necessary data to mint and register Ip and attach license and add to group.
|
29
|
+
* @param request.nftContract The address of the NFT collection.
|
30
|
+
* @param request.groupId The ID of the group IP to add the newly registered IP.
|
31
|
+
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
32
|
+
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
33
|
+
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
34
|
+
* . @param request.deadline [Optional] The deadline for the signature in milliseconds,default value is 1000ms.
|
35
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
36
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
37
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
38
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
39
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
40
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
41
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes IP ID, token ID.
|
42
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
43
|
+
*/
|
44
|
+
mintAndRegisterIpAndAttachLicenseAndAddToGroup(request: MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse>;
|
45
|
+
/** Register an NFT as IP with metadata, attach license terms to the registered IP, and add it to a group IP.
|
46
|
+
* @param request - The request object containing necessary data to register ip and attach license and add to group.
|
47
|
+
* @param request.spgNftContract The address of the NFT collection.
|
48
|
+
* @param request.tokenId The ID of the NFT.
|
49
|
+
* @param request.groupId The ID of the group IP to add the newly registered IP.
|
50
|
+
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
51
|
+
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
52
|
+
* . @param request.deadline [Optional] The deadline for the signature in milliseconds,default is 1000ms.
|
53
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
54
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
55
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
56
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
57
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
58
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
59
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes IP ID, token ID.
|
60
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
61
|
+
*/
|
62
|
+
registerIpAndAttachLicenseAndAddToGroup(request: RegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<RegisterIpAndAttachLicenseAndAddToGroupResponse>;
|
63
|
+
/** Register a group IP with a group reward pool and attach license terms to the group IP.
|
64
|
+
* @param request - The request object containing necessary data to register group and attach license.
|
65
|
+
* @param request.groupPool The address specifying how royalty will be split amongst the pool of IPs in the group.
|
66
|
+
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new group IP.
|
67
|
+
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP, default value is Programmable IP License.
|
68
|
+
* @param request.txOptions [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
69
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes group id.
|
70
|
+
* @emits PGroupRegistered (groupId, groupPool);
|
71
|
+
*/
|
72
|
+
registerGroupAndAttachLicense(request: RegisterGroupAndAttachLicenseRequest): Promise<RegisterGroupAndAttachLicenseResponse>;
|
73
|
+
/** Register a group IP with a group reward pool, attach license terms to the group IP, and add individual IPs to the group IP.
|
74
|
+
* @param request - The request object containing necessary data to register group and attach license and add ips.
|
75
|
+
* @param request.pIds must have the same PIL terms as the group IP.
|
76
|
+
* @param request.groupPool The address specifying how royalty will be split amongst the pool of IPs in the group.
|
77
|
+
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new group IP.
|
78
|
+
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
79
|
+
* @param request.txOptions [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
80
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes group id.
|
81
|
+
* @emits PGroupRegistered (groupId, groupPool);
|
82
|
+
*/
|
83
|
+
registerGroupAndAttachLicenseAndAddIps(request: RegisterGroupAndAttachLicenseAndAddIpsRequest): Promise<RegisterGroupAndAttachLicenseAndAddIpsResponse>;
|
84
|
+
}
|
85
|
+
//# sourceMappingURL=group.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"../../../../src/resources","sources":["group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiC,MAAM,MAAM,CAAC;AAEnE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EAEzB,uBAAuB,EAKvB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EACnB,4BAAyB;AAK1B,OAAO,EAAE,iBAAiB,EAAE,2BAAwB;AACpD,OAAO,EACL,qDAAqD,EACrD,sDAAsD,EACtD,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,oBAAoB,EACpB,qBAAqB,EACrB,8CAA8C,EAC9C,+CAA+C,EAChD,oCAAiC;AAElC,qBAAa,WAAW;IACf,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,6BAA6B,EAAE,6BAA6B,CAAC;IAEpE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,iBAAiB;IAc3F;;;;;;OAMG;IACU,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA0BzF;;;;;;;;;;;;;;;;OAgBG;IACU,8CAA8C,CACzD,OAAO,EAAE,qDAAqD,GAC7D,OAAO,CAAC,sDAAsD,CAAC;IA0ElE;;;;;;;;;;;;;;;;OAgBG;IACU,uCAAuC,CAClD,OAAO,EAAE,8CAA8C,GACtD,OAAO,CAAC,+CAA+C,CAAC;IAsG3D;;;;;;;;OAQG;IACU,6BAA6B,CACxC,OAAO,EAAE,oCAAoC,GAC5C,OAAO,CAAC,qCAAqC,CAAC;IA8BjD;;;;;;;;;OASG;IACU,sCAAsC,CACjD,OAAO,EAAE,6CAA6C,GACrD,OAAO,CAAC,8CAA8C,CAAC;CAyD3D"}
|
@@ -1,17 +1,18 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
2
|
import { SupportedChainIds } from "../types/config.js";
|
3
|
-
import { CreateIpAssetWithPilTermsRequest, CreateIpAssetWithPilTermsResponse, GenerateCreatorMetadataParam, GenerateIpMetadataParam, IpCreator, IpMetadata, MintAndRegisterIpAndMakeDerivativeRequest, RegisterDerivativeRequest, RegisterDerivativeResponse, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, RegisterIpAndAttachPilTermsRequest, RegisterIpAndAttachPilTermsResponse, RegisterIpAndMakeDerivativeRequest, RegisterIpAndMakeDerivativeResponse, RegisterIpResponse, RegisterRequest } from "../types/resources/ipAsset.js";
|
4
|
-
import { AccessControllerClient, CoreMetadataModuleClient, IpAssetRegistryClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient,
|
3
|
+
import { CreateIpAssetWithPilTermsRequest, CreateIpAssetWithPilTermsResponse, GenerateCreatorMetadataParam, GenerateIpMetadataParam, IpCreator, IpMetadata, MintAndRegisterIpAndMakeDerivativeRequest, MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest, MintAndRegisterIpRequest, RegisterDerivativeRequest, RegisterDerivativeResponse, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, RegisterIpAndAttachPilTermsRequest, RegisterIpAndAttachPilTermsResponse, RegisterIpAndMakeDerivativeRequest, RegisterIpAndMakeDerivativeResponse, RegisterIpAndMakeDerivativeWithLicenseTokensRequest, RegisterIpResponse, RegisterPilTermsAndAttachRequest, RegisterPilTermsAndAttachResponse, RegisterRequest } from "../types/resources/ipAsset.js";
|
4
|
+
import { AccessControllerClient, CoreMetadataModuleClient, DerivativeWorkflowsClient, IpAssetRegistryClient, LicenseAttachmentWorkflowsClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, RegistrationWorkflowsClient, SimpleWalletClient } from "../abi/generated.js";
|
5
5
|
export declare class IPAssetClient {
|
6
6
|
licensingModuleClient: LicensingModuleClient;
|
7
7
|
ipAssetRegistryClient: IpAssetRegistryClient;
|
8
8
|
licenseTemplateClient: PiLicenseTemplateClient;
|
9
9
|
licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
|
10
10
|
licenseTokenReadOnlyClient: LicenseTokenReadOnlyClient;
|
11
|
-
royaltyPolicyLAPClient: RoyaltyPolicyLapClient;
|
12
11
|
accessControllerClient: AccessControllerClient;
|
13
12
|
coreMetadataModuleClient: CoreMetadataModuleClient;
|
14
|
-
|
13
|
+
registrationWorkflowsClient: RegistrationWorkflowsClient;
|
14
|
+
licenseAttachmentWorkflowsClient: LicenseAttachmentWorkflowsClient;
|
15
|
+
derivativeWorkflowsClient: DerivativeWorkflowsClient;
|
15
16
|
private readonly rpcClient;
|
16
17
|
private readonly wallet;
|
17
18
|
private readonly chainId;
|
@@ -82,8 +83,8 @@ export declare class IPAssetClient {
|
|
82
83
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
83
84
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
84
85
|
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
85
|
-
* @param request.txOptions
|
86
|
-
* @returns A Promise that resolves to
|
86
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
87
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes IP ID, token ID.
|
87
88
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
88
89
|
*/
|
89
90
|
register(request: RegisterRequest): Promise<RegisterIpResponse>;
|
@@ -116,19 +117,20 @@ export declare class IPAssetClient {
|
|
116
117
|
/**
|
117
118
|
* Mint an NFT from a collection and register it as an IP.
|
118
119
|
* @param request - The request object that contains all data needed to mint and register ip.
|
119
|
-
* @param request.
|
120
|
+
* @param request.spgNftContract The address of the NFT collection.
|
120
121
|
* @param request.pilType The type of the PIL.
|
121
122
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
122
123
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
123
124
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
124
125
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
125
126
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
126
|
-
* @param request.
|
127
|
+
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
128
|
+
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
127
129
|
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
128
130
|
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
129
131
|
* @param request.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
130
|
-
* @param request.txOptions
|
131
|
-
* @returns A Promise that resolves to
|
132
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
133
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes IP ID, Token ID, License Terms Id.
|
132
134
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
133
135
|
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
134
136
|
*/
|
@@ -144,6 +146,7 @@ export declare class IPAssetClient {
|
|
144
146
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
145
147
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
146
148
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
149
|
+
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
147
150
|
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
148
151
|
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
149
152
|
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
@@ -176,7 +179,7 @@ export declare class IPAssetClient {
|
|
176
179
|
/**
|
177
180
|
* Mint an NFT from a collection and register it as a derivative IP without license tokens.
|
178
181
|
* @param request - The request object that contains all data needed to mint and register ip and make derivative.
|
179
|
-
* @param request.
|
182
|
+
* @param request.spgNftContract The address of the NFT collection.
|
180
183
|
* @param request.derivData The derivative data to be used for registerDerivative.
|
181
184
|
* @param request.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
182
185
|
* @param request.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
@@ -185,16 +188,92 @@ export declare class IPAssetClient {
|
|
185
188
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
186
189
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
187
190
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
188
|
-
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT
|
189
|
-
* @param request.recipient [Optional] The address of the recipient of the minted NFT.
|
191
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
192
|
+
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
190
193
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
191
|
-
* @returns A Promise that resolves to
|
194
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes child ip id and token id.
|
192
195
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
193
196
|
*/
|
194
197
|
mintAndRegisterIpAndMakeDerivative(request: MintAndRegisterIpAndMakeDerivativeRequest): Promise<RegisterDerivativeResponse>;
|
198
|
+
/**
|
199
|
+
* Mint an NFT from a SPGNFT collection and register it with metadata as an IP.
|
200
|
+
* @param request - The request object that contains all data needed to attach license terms.
|
201
|
+
* @param request.spgNftContract The address of the SPGNFT collection.
|
202
|
+
* @param request.recipient The address of the recipient of the minted NFT,default value is your wallet address.
|
203
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
204
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
205
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
206
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
207
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
208
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
209
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes IP ID and Token ID.
|
210
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
211
|
+
*/
|
212
|
+
mintAndRegisterIp(request: MintAndRegisterIpRequest): Promise<RegisterIpResponse>;
|
213
|
+
/**
|
214
|
+
* Register Programmable IP License Terms (if unregistered) and attach it to IP.
|
215
|
+
* @param request - The request object that contains all data needed to attach license terms.
|
216
|
+
* @param request.ipId The ID of the IP.
|
217
|
+
* @param request.terms The PIL terms to be registered.
|
218
|
+
* @param request.terms.transferable Indicates whether the license is transferable or not.
|
219
|
+
* @param request.terms.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
220
|
+
* @param request.terms.mintingFee The fee to be paid when minting a license.
|
221
|
+
* @param request.terms.expiration The expiration period of the license.
|
222
|
+
* @param request.terms.commercialUse Indicates whether the work can be used commercially or not.
|
223
|
+
* @param request.terms.commercialAttribution Whether attribution is required when reproducing the work commercially or not.
|
224
|
+
* @param request.terms.commercializerChecker Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
|
225
|
+
* @param request.terms.commercializerCheckerData The data to be passed to the commercializer checker contract.
|
226
|
+
* @param request.terms.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
227
|
+
* @param request.terms.commercialRevCeiling The maximum revenue that can be generated from the commercial use of the work.
|
228
|
+
* @param request.terms.derivativesAllowed Indicates whether the licensee can create derivatives of his work or not.
|
229
|
+
* @param request.terms.derivativesAttribution Indicates whether attribution is required for derivatives of the work or not.
|
230
|
+
* @param request.terms.derivativesApproval Indicates whether the licensor must approve derivatives of the work before they can be linked to the licensor IP ID or not.
|
231
|
+
* @param request.terms.derivativesReciprocal Indicates whether the licensee must license derivatives of the work under the same terms or not.
|
232
|
+
* @param request.terms.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
233
|
+
* @param request.terms.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
234
|
+
* @param request.terms.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
235
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds,default is 1000ms.
|
236
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
237
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms id.
|
238
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
239
|
+
*/
|
240
|
+
registerPilTermsAndAttach(request: RegisterPilTermsAndAttachRequest): Promise<RegisterPilTermsAndAttachResponse>;
|
241
|
+
/**
|
242
|
+
* Mint an NFT from a collection and register it as a derivative IP using license tokens
|
243
|
+
* @param request - The request object that contains all data needed to mint and register ip and make derivative with license tokens.
|
244
|
+
* @param request.spgNftContract The address of the NFT collection.
|
245
|
+
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
246
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
247
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
248
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
249
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
250
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
251
|
+
* @param request.recipient - [Optional] The address to receive the minted NFT,default value is your wallet address.
|
252
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
253
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes IP ID and Token ID.
|
254
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
255
|
+
*/
|
256
|
+
mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(request: MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
257
|
+
/**
|
258
|
+
* Register the given NFT as a derivative IP using license tokens.
|
259
|
+
* @param request - The request object that contains all data needed to register ip and make derivative with license tokens.
|
260
|
+
* @param request.nftContract The address of the NFT collection.
|
261
|
+
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
262
|
+
* @param request.tokenId The ID of the NFT.
|
263
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
264
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
265
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
266
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
267
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
268
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
269
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
270
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes IP ID.
|
271
|
+
*/
|
272
|
+
registerIpAndMakeDerivativeWithLicenseTokens(request: RegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
195
273
|
private getIpIdAddress;
|
196
274
|
private isRegistered;
|
197
275
|
private getSigSignatureState;
|
198
276
|
private getLicenseTermsId;
|
277
|
+
private validateLicenseTokenIds;
|
199
278
|
}
|
200
279
|
//# sourceMappingURL=ipAsset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAWb,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,iBAAiB,EAAE,2BAAwB;AAEpD,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,4BAA4B,EAC5B,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,yCAAyC,EACzC,yBAAyB,EACzB,0BAA0B,EAC1B,0CAA0C,EAC1C,2CAA2C,EAC3C,kCAAkC,EAClC,mCAAmC,EACnC,kCAAkC,EAClC,mCAAmC,EACnC,kBAAkB,EAClB,eAAe,EAChB,sCAAmC;AACpC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,
|
1
|
+
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAWb,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,iBAAiB,EAAE,2BAAwB;AAEpD,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,4BAA4B,EAC5B,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,yCAAyC,EACzC,0DAA0D,EAC1D,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0CAA0C,EAC1C,2CAA2C,EAC3C,kCAAkC,EAClC,mCAAmC,EACnC,kCAAkC,EAClC,mCAAmC,EACnC,mDAAmD,EACnD,kBAAkB,EAClB,gCAAgC,EAChC,iCAAiC,EACjC,eAAe,EAChB,sCAAmC;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AA0C,GAClD,OAAO,CAAC,2CAA2C,CAAC;IAiCvD;;;;;;;;;;;;;;;;;;;OAmBG;IACU,kCAAkC,CAC7C,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAwD7C;;;;;;;;;;;;;;;;;;;OAmBG;IACU,2BAA2B,CACtC,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;IAoH/C;;;;;;;;;;;;;;;;;;OAkBG;IACU,oBAAoB,CAC/B,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;IA+H/C;;;;;;;;;;;;;;;;;OAiBG;IACU,kCAAkC,CAC7C,OAAO,EAAE,yCAAyC,GACjD,OAAO,CAAC,0BAA0B,CAAC;IAiEtC;;;;;;;;;;;;;OAaG;IACU,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAgC9F;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACU,yBAAyB,CACpC,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAiE7C;;;;;;;;;;;;;;OAcG;IACU,mDAAmD,CAC9D,OAAO,EAAE,0DAA0D,GAClE,OAAO,CAAC,kBAAkB,CAAC;IA4C9B;;;;;;;;;;;;;;OAcG;IACU,4CAA4C,CACvD,OAAO,EAAE,mDAAmD,GAC3D,OAAO,CAAC,kBAAkB,CAAC;YA+FhB,cAAc;YAYd,YAAY;IAI1B,OAAO,CAAC,oBAAoB;YA+Bd,iBAAiB;YAajB,uBAAuB;CAiBtC"}
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
|
-
import { IpAssetRegistryClient, LicenseRegistryEventClient, LicenseRegistryReadOnlyClient, LicensingModuleClient,
|
3
|
-
import { RegisterNonComSocialRemixingPILRequest, RegisterPILResponse, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, MintLicenseTokensRequest, MintLicenseTokensResponse, AttachLicenseTermsResponse, LicenseTermsId, RegisterPILTermsRequest } from "../types/resources/license.js";
|
2
|
+
import { IpAssetRegistryClient, LicenseRegistryEventClient, LicenseRegistryReadOnlyClient, LicensingModuleClient, LicensingModulePredictMintingLicenseFeeResponse, ModuleRegistryReadOnlyClient, PiLicenseTemplateClient, PiLicenseTemplateGetLicenseTermsResponse, PiLicenseTemplateReadOnlyClient, SimpleWalletClient } from "../abi/generated.js";
|
3
|
+
import { RegisterNonComSocialRemixingPILRequest, RegisterPILResponse, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, MintLicenseTokensRequest, MintLicenseTokensResponse, AttachLicenseTermsResponse, LicenseTermsId, RegisterPILTermsRequest, PredictMintingLicenseFeeRequest, SetLicensingConfigRequest, SetLicensingConfigResponse } from "../types/resources/license.js";
|
4
|
+
import { SupportedChainIds } from "../types/config.js";
|
4
5
|
export declare class LicenseClient {
|
5
6
|
licenseRegistryClient: LicenseRegistryEventClient;
|
6
7
|
licensingModuleClient: LicensingModuleClient;
|
7
8
|
ipAssetRegistryClient: IpAssetRegistryClient;
|
8
9
|
piLicenseTemplateReadOnlyClient: PiLicenseTemplateReadOnlyClient;
|
9
10
|
licenseTemplateClient: PiLicenseTemplateClient;
|
10
|
-
royaltyPolicyLAPClient: RoyaltyPolicyLapClient;
|
11
|
-
royaltyModuleReadOnlyClient: RoyaltyModuleReadOnlyClient;
|
12
11
|
licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
|
12
|
+
moduleRegistryReadOnlyClient: ModuleRegistryReadOnlyClient;
|
13
13
|
private readonly rpcClient;
|
14
14
|
private readonly wallet;
|
15
|
-
|
15
|
+
private readonly chainId;
|
16
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: SupportedChainIds);
|
16
17
|
/**
|
17
18
|
* Registers new license terms and return the ID of the newly registered license terms.
|
18
19
|
* @param request - The request object that contains all data needed to register a license term.
|
@@ -34,7 +35,7 @@ export declare class LicenseClient {
|
|
34
35
|
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
35
36
|
* @param request.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
36
37
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
37
|
-
* @returns A Promise that resolves to
|
38
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms Id.
|
38
39
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
39
40
|
*/
|
40
41
|
registerPILTerms(request: RegisterPILTermsRequest): Promise<RegisterPILResponse>;
|
@@ -42,7 +43,7 @@ export declare class LicenseClient {
|
|
42
43
|
* Convenient function to register a PIL non commercial social remix license to the registry
|
43
44
|
* @param request - [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
|
44
45
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
45
|
-
* @returns A Promise that resolves to
|
46
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms Id.
|
46
47
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
47
48
|
*/
|
48
49
|
registerNonComSocialRemixingPIL(request?: RegisterNonComSocialRemixingPILRequest): Promise<RegisterPILResponse>;
|
@@ -51,8 +52,9 @@ export declare class LicenseClient {
|
|
51
52
|
* @param request - The request object that contains all data needed to register a PIL commercial use license.
|
52
53
|
* @param request.defaultMintingFee The fee to be paid when minting a license.
|
53
54
|
* @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
|
55
|
+
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
54
56
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
55
|
-
* @returns A Promise that resolves to
|
57
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms Id.
|
56
58
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
57
59
|
*/
|
58
60
|
registerCommercialUsePIL(request: RegisterCommercialUsePILRequest): Promise<RegisterPILResponse>;
|
@@ -62,8 +64,9 @@ export declare class LicenseClient {
|
|
62
64
|
* @param request.defaultMintingFee The fee to be paid when minting a license.
|
63
65
|
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
64
66
|
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
67
|
+
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
65
68
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
66
|
-
* @returns A Promise that resolves to
|
69
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms Id.
|
67
70
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
68
71
|
*/
|
69
72
|
registerCommercialRemixPIL(request: RegisterCommercialRemixPILRequest): Promise<RegisterPILResponse>;
|
@@ -74,7 +77,8 @@ export declare class LicenseClient {
|
|
74
77
|
* @param request.licenseTemplate The address of the license template.
|
75
78
|
* @param request.licenseTermsId The ID of the license terms.
|
76
79
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
77
|
-
* @returns A Promise that resolves to
|
80
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes success.
|
81
|
+
* If Ip have attached license terms, success will return false and txhash is empty.
|
78
82
|
*/
|
79
83
|
attachLicenseTerms(request: AttachLicenseTermsRequest): Promise<AttachLicenseTermsResponse>;
|
80
84
|
/**
|
@@ -96,7 +100,7 @@ export declare class LicenseClient {
|
|
96
100
|
* @param request.amount The amount of license tokens to mint.
|
97
101
|
* @param request.receiver The address of the receiver.
|
98
102
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
99
|
-
* @returns A Promise that resolves to
|
103
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license token IDs.
|
100
104
|
* @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
|
101
105
|
*/
|
102
106
|
mintLicenseTokens(request: MintLicenseTokensRequest): Promise<MintLicenseTokensResponse>;
|
@@ -106,8 +110,33 @@ export declare class LicenseClient {
|
|
106
110
|
* @returns A Promise that resolves to an object containing the PILTerms associate with the given ID.
|
107
111
|
*/
|
108
112
|
getLicenseTerms(selectedLicenseTermsId: LicenseTermsId): Promise<PiLicenseTemplateGetLicenseTermsResponse>;
|
113
|
+
/**
|
114
|
+
* Pre-compute the minting license fee for the given IP and license terms. The function can be used to calculate the minting license fee before minting license tokens.
|
115
|
+
* @param request - The request object that contains all data needed to predict minting licenses fee.
|
116
|
+
* @param request.licensorIpId The IP ID of the licensor.
|
117
|
+
* @param request.licenseTermsId The ID of the license terms.
|
118
|
+
* @param request.amount The amount of license tokens to mint.
|
119
|
+
* @param request.licenseTemplate [Optional] The address of the license template,default value is Programmable IP License.
|
120
|
+
* @param request.receiver [Optional] The address of the receiver,default value is your wallet address.
|
121
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
122
|
+
* @returns A Promise that resolves to an object containing the currency token and token amount.
|
123
|
+
*/
|
124
|
+
predictMintingLicenseFee(request: PredictMintingLicenseFeeRequest): Promise<LicensingModulePredictMintingLicenseFeeResponse>;
|
125
|
+
/**
|
126
|
+
* Sets the licensing configuration for a specific license terms of an IP. If both licenseTemplate and licenseTermsId are not specified then the licensing config apply to all licenses of given IP.
|
127
|
+
* @param request - The request object that contains all data needed to set licensing config.
|
128
|
+
* @param request.ipId The address of the IP for which the configuration is being set.
|
129
|
+
* @param request.licenseTermsId The ID of the license terms within the license template.
|
130
|
+
* @param request.licenseTemplate The address of the license template used, If not specified, the configuration applies to all licenses.
|
131
|
+
* @param request.licensingConfig The licensing configuration for the license.
|
132
|
+
* @param request.licensingConfig.isSet Whether the configuration is set or not.
|
133
|
+
* @param request.licensingConfig.mintingFee The minting fee to be paid when minting license tokens.
|
134
|
+
* @param request.licensingConfig.hookData The data to be used by the licensing hook.
|
135
|
+
* @param request.licensingConfig.licensingHook The hook contract address for the licensing module, or address(0) if none.
|
136
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
137
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes success.
|
138
|
+
*/
|
139
|
+
setLicensingConfig(request: SetLicensingConfigRequest): Promise<SetLicensingConfigResponse>;
|
109
140
|
private getLicenseTermsId;
|
110
|
-
private verifyCommercialUse;
|
111
|
-
private verifyDerivatives;
|
112
141
|
}
|
113
142
|
//# sourceMappingURL=license.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,MAAM,CAAC;AAEjD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,MAAM,CAAC;AAEjD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,E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,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,mBAAmB,CAAC;IA0C/B;;;;;;;;;OASG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;IAmDtC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,iBAAiB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAiErC;;;;OAIG;IACU,eAAe,CAC1B,sBAAsB,EAAE,cAAc,GACrC,OAAO,CAAC,wCAAwC,CAAC;IAUpD;;;;;;;;;;OAUG;IACU,wBAAwB,CACnC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,+CAA+C,CAAC;IAkC3D;;;;;;;;;;;;;OAaG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;YAuDxB,iBAAiB;CAIhC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
|
-
import {
|
2
|
+
import { RegistrationWorkflowsClient, SimpleWalletClient } from "../abi/generated.js";
|
3
3
|
import { CreateNFTCollectionRequest, CreateNFTCollectionResponse } from "../types/resources/nftClient.js";
|
4
4
|
export declare class NftClient {
|
5
|
-
|
5
|
+
registrationWorkflowsClient: RegistrationWorkflowsClient;
|
6
6
|
private readonly rpcClient;
|
7
7
|
private readonly wallet;
|
8
8
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
@@ -11,13 +11,18 @@ export declare class NftClient {
|
|
11
11
|
* @param request - The request object containing necessary data to create a SPG NFT Collection.
|
12
12
|
* @param request.name - The name of the collection.
|
13
13
|
* @param request.symbol - The symbol of the collection.
|
14
|
-
* @param request.
|
15
|
-
* @param request.
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
14
|
+
* @param request.isPublicMinting - If true, anyone can mint from the collection. If false, only the addresses with the minter role can mint.
|
15
|
+
* @param request.mintOpen Whether the collection is open for minting on creation.
|
16
|
+
* @param request.mintFeeRecipient - The address to receive mint fees.
|
17
|
+
* @param request.mintFeeRecipient - The contract URI for the collection. Follows ERC-7572 standard. See https://eips.ethereum.org/EIPS/eip-7572
|
18
|
+
* @param request.baseURI - [Optional] The base URI for the collection. If baseURI is not empty, tokenURI will be either baseURI + token ID (if nftMetadataURI is empty) or baseURI + nftMetadataURI.
|
19
|
+
* @param request.maxSupply - [Optional] The maximum supply of the collection.
|
20
|
+
* @param request.mintFee - [Optional] The cost to mint a token.
|
21
|
+
* @param request.mintFeeToken - [Optional] The token to mint.
|
22
|
+
* @param request.owner - [Optional] The owner of the collection.
|
23
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
24
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes spg nft contract address.
|
25
|
+
* @emits CollectionCreated (spgNftContract);
|
21
26
|
*/
|
22
27
|
createNFTCollection(request: CreateNFTCollectionRequest): Promise<CreateNFTCollectionResponse>;
|
23
28
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nftClient.d.ts","sourceRoot":"../../../../src/resources","sources":["nftClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqC,MAAM,MAAM,CAAC;AAEvE,OAAO,
|
1
|
+
{"version":3,"file":"nftClient.d.ts","sourceRoot":"../../../../src/resources","sources":["nftClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqC,MAAM,MAAM,CAAC;AAEvE,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EACnB,4BAAyB;AAC1B,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC5B,wCAAqC;AAItC,qBAAa,SAAS;IACb,2BAA2B,EAAE,2BAA2B,CAAC;IAChE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D;;;;;;;;;;;;;;;;;OAiBG;IACU,mBAAmB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;CAmDxC"}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
2
|
import { CreateBatchPermissionSignatureRequest, CreateSetPermissionSignatureRequest, SetAllPermissionsRequest, SetBatchPermissionsRequest, SetPermissionsRequest, SetPermissionsResponse } from "../types/resources/permission.js";
|
3
|
-
import { AccessControllerClient, CoreMetadataModuleClient, IpAssetRegistryClient, SimpleWalletClient
|
3
|
+
import { AccessControllerClient, CoreMetadataModuleClient, IpAssetRegistryClient, SimpleWalletClient } from "../abi/generated.js";
|
4
4
|
import { SupportedChainIds } from "../types/config.js";
|
5
5
|
export declare class PermissionClient {
|
6
6
|
accessControllerClient: AccessControllerClient;
|
7
7
|
ipAssetRegistryClient: IpAssetRegistryClient;
|
8
|
-
spgClient: SpgClient;
|
9
8
|
coreMetadataModuleClient: CoreMetadataModuleClient;
|
10
9
|
private readonly wallet;
|
11
10
|
private readonly rpcClient;
|
@@ -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,kBAAkB,
|
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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Client, RoyaltyModuleClient,
|
2
|
+
import { ClaimableRevenueRequest, ClaimableRevenueResponse, PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse, SnapshotRequest, SnapshotResponse, TransferToVaultAndSnapshotAndClaimByTokenBatchRequest, TransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest, SnapshotAndClaimByTokenBatchRequest, SnapshotAndClaimBySnapshotBatchRequest, ClaimRevenueRequest, ClaimRevenueResponse, SnapshotAndClaimBySnapshotBatchResponse, TransferToVaultAndSnapshotAndClaimBySnapshotBatchResponse, TransferToVaultAndSnapshotAndClaimByTokenBatchResponse, SnapshotAndClaimByTokenBatchResponse } from "../types/resources/royalty.js";
|
3
|
+
import { IpAssetRegistryClient, IpRoyaltyVaultImplClient, IpRoyaltyVaultImplEventClient, RoyaltyModuleClient, RoyaltyWorkflowsClient, SimpleWalletClient } from "../abi/generated.js";
|
4
4
|
import { IPAccountClient } from "./ipAccount.js";
|
5
5
|
export declare class RoyaltyClient {
|
6
|
-
royaltyPolicyLapClient: RoyaltyPolicyLapClient;
|
7
6
|
royaltyModuleClient: RoyaltyModuleClient;
|
8
7
|
ipAssetRegistryClient: IpAssetRegistryClient;
|
9
8
|
ipAccountClient: IPAccountClient;
|
9
|
+
royaltyWorkflowsClient: RoyaltyWorkflowsClient;
|
10
|
+
ipRoyaltyVaultImplClient: IpRoyaltyVaultImplClient;
|
11
|
+
ipRoyaltyVaultImplEventClient: IpRoyaltyVaultImplEventClient;
|
10
12
|
private readonly rpcClient;
|
11
13
|
private readonly wallet;
|
12
14
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
13
|
-
/**
|
14
|
-
* Allows ancestors to claim the royalty tokens and any accrued revenue tokens
|
15
|
-
* @param request - The request object that contains all data needed to collect royalty tokens.
|
16
|
-
* @param request.parentIpId The ip id of the ancestor to whom the royalty tokens belong to.
|
17
|
-
* @param request.royaltyVaultIpId The id of the royalty vault.
|
18
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
19
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional the amount of royalty tokens collected if waitForTxn is set to true.
|
20
|
-
* @emits RoyaltyTokensCollected (ancestorIpId, royaltyTokensCollected)
|
21
|
-
*/
|
22
|
-
collectRoyaltyTokens(request: CollectRoyaltyTokensRequest): Promise<CollectRoyaltyTokensResponse>;
|
23
15
|
/**
|
24
16
|
* Allows the function caller to pay royalties to the receiver IP asset on behalf of the payer IP asset.
|
25
17
|
* @param request - The request object that contains all data needed to pay royalty on behalf.
|
@@ -68,5 +60,64 @@ export declare class RoyaltyClient {
|
|
68
60
|
* @returns A Promise that resolves to an object containing the royalty vault address.
|
69
61
|
*/
|
70
62
|
getRoyaltyVaultAddress(royaltyVaultIpId: Hex): Promise<Address>;
|
63
|
+
/**
|
64
|
+
* Transfers royalties from royalty policy to the ancestor IP's royalty vault, takes a snapshot, and claims revenue on that snapshot for each specified currency token.
|
65
|
+
* @param request - The request object that contains all data needed to transfer to vault and snapshot and claim by token batch.
|
66
|
+
* @param request.ancestorIpId The address of the ancestor IP.
|
67
|
+
* @param request.royaltyClaimDetails The details of the royalty claim from child IPs
|
68
|
+
* @param request.royaltyClaimDetails - The details of the royalty claim from child IPs
|
69
|
+
* @param request.royaltyClaimDetails.childIpId The address of the child IP.
|
70
|
+
* @param request.royaltyClaimDetails.royaltyPolicy The address of the royalty policy.
|
71
|
+
* @param request.royaltyClaimDetails.currencyToken The address of the currency (revenue) token to claim.
|
72
|
+
* @param request.claimer [Optional] The address of the claimer of the revenue tokens (must be a royalty token holder), default value is wallet address.
|
73
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
74
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes snapshot ID and amounts claimed.
|
75
|
+
* @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
|
76
|
+
* @emits RevenueTokenClaimed (claimer, token, amount).
|
77
|
+
*/
|
78
|
+
transferToVaultAndSnapshotAndClaimByTokenBatch(request: TransferToVaultAndSnapshotAndClaimByTokenBatchRequest): Promise<TransferToVaultAndSnapshotAndClaimByTokenBatchResponse>;
|
79
|
+
/**
|
80
|
+
* Transfers royalties to the ancestor IP's royalty vault, takes a snapshot, claims revenue for each
|
81
|
+
* specified currency token both on the new snapshot and on each specified unclaimed snapshots.
|
82
|
+
* @param request - The request object that contains all data needed to transfer to vault and snapshot and claim by snapshot batch.
|
83
|
+
* @param request.ancestorIpId The address of the ancestor IP.
|
84
|
+
* @param request.unclaimedSnapshotIds The IDs of unclaimed snapshots to include in the claim.
|
85
|
+
* @param request.royaltyClaimDetails The details of the royalty claim from child IPs
|
86
|
+
* @param request.royaltyClaimDetails - The details of the royalty claim from child IPs
|
87
|
+
* @param request.royaltyClaimDetails.childIpId The address of the child IP.
|
88
|
+
* @param request.royaltyClaimDetails.royaltyPolicy The address of the royalty policy.
|
89
|
+
* @param request.royaltyClaimDetails.currencyToken The address of the currency (revenue) token to claim.
|
90
|
+
* @param request.claimer [Optional] The address of the claimer of the revenue tokens (must be a royalty token holder), default value is wallet address.
|
91
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
92
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes snapshot ID and amounts claimed.
|
93
|
+
* @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
|
94
|
+
* @emits RevenueTokenClaimed (claimer, token, amount).
|
95
|
+
*/
|
96
|
+
transferToVaultAndSnapshotAndClaimBySnapshotBatch(request: TransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest): Promise<TransferToVaultAndSnapshotAndClaimBySnapshotBatchResponse>;
|
97
|
+
/**
|
98
|
+
* Takes a snapshot of the IP's royalty vault and claims revenue on that snapshot for each
|
99
|
+
* @param request - The request object that contains all data needed to snapshot and claim by token batch.
|
100
|
+
* @param request.royaltyVaultIpId The address of the IP.
|
101
|
+
* @param request.currencyTokens The addresses of the currency (revenue) tokens to claim.
|
102
|
+
* @param request.claimer [Optional] The address of the claimer of the revenue tokens (must be a royalty token holder), default value is wallet address.
|
103
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
104
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes snapshot ID and amounts claimed.
|
105
|
+
* @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
|
106
|
+
* @emits RevenueTokenClaimed (claimer, token, amount).
|
107
|
+
*/
|
108
|
+
snapshotAndClaimByTokenBatch(request: SnapshotAndClaimByTokenBatchRequest): Promise<SnapshotAndClaimByTokenBatchResponse>;
|
109
|
+
/**
|
110
|
+
* Takes a snapshot of the IP's royalty vault and claims revenue for each specified currency token
|
111
|
+
* @param request - The request object that contains all data needed to snapshot and claim by snapshot batch.
|
112
|
+
* @param request.royaltyVaultIpId The address of the IP.
|
113
|
+
* @param request.unclaimedSnapshotIds The IDs of unclaimed snapshots to include in the claim.
|
114
|
+
* @param request.currencyTokens The addresses of the currency (revenue) tokens to claim.
|
115
|
+
* @param request.claimer [Optional] The address of the claimer of the revenue tokens (must be a royalty token holder), default value is wallet address.
|
116
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
117
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes snapshot ID and amounts claimed.
|
118
|
+
* @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
|
119
|
+
* @emits RevenueTokenClaimed (claimer, token, amount).
|
120
|
+
*/
|
121
|
+
snapshotAndClaimBySnapshotBatch(request: SnapshotAndClaimBySnapshotBatchRequest): Promise<SnapshotAndClaimBySnapshotBatchResponse>;
|
71
122
|
}
|
72
123
|
//# sourceMappingURL=royalty.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../src/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAmC,MAAM,MAAM,CAAC;AAGnF,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,
|
1
|
+
{"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../src/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAmC,MAAM,MAAM,CAAC;AAGnF,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,qDAAqD,EACrD,wDAAwD,EACxD,mCAAmC,EACnC,sCAAsC,EACtC,mBAAmB,EACnB,oBAAoB,EACpB,uCAAuC,EACvC,yDAAyD,EACzD,sDAAsD,EACtD,oCAAoC,EACrC,sCAAmC;AACpC,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,6BAA6B,EAC7B,mBAAmB,EACnB,sBAAsB,EAKtB,kBAAkB,EAEnB,4BAAyB;AAC1B,OAAO,EAAE,eAAe,EAAE,uBAAoB;AAG9C,qBAAa,aAAa;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,eAAe,EAAE,eAAe,CAAC;IACjC,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,6BAA6B,EAAE,6BAA6B,CAAC;IACpE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MA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