@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.
- package/README.md +29 -101
- package/dist/declarations/src/client.d.ts +3 -27
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/constants/common.d.ts +1 -4
- package/dist/declarations/src/constants/common.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +13 -13
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/dispute.d.ts +13 -29
- package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
- package/dist/declarations/src/resources/group.d.ts +10 -13
- package/dist/declarations/src/resources/group.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAccount.d.ts +6 -24
- package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +36 -164
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +18 -76
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/nftClient.d.ts +3 -15
- package/dist/declarations/src/resources/nftClient.d.ts.map +1 -1
- package/dist/declarations/src/resources/permission.d.ts +13 -56
- package/dist/declarations/src/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/resources/royalty.d.ts +12 -8
- package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/types/common.d.ts +11 -3
- package/dist/declarations/src/types/common.d.ts.map +1 -1
- package/dist/declarations/src/types/config.d.ts +15 -0
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/dispute.d.ts +14 -3
- package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/group.d.ts +14 -9
- package/dist/declarations/src/types/resources/group.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAccount.d.ts +13 -2
- package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +54 -32
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/license.d.ts +65 -6
- package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/nftClient.d.ts +11 -3
- package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/permission.d.ts +34 -2
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/royalty.d.ts +4 -0
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/utils/chain.d.ts +2 -0
- package/dist/declarations/src/utils/chain.d.ts.map +1 -1
- package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts +1 -1
- package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts.map +1 -1
- package/dist/declarations/src/utils/sign.d.ts +0 -17
- package/dist/declarations/src/utils/sign.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +514 -709
- package/dist/story-protocol-core-sdk.cjs.prod.js +514 -709
- package/dist/story-protocol-core-sdk.esm.js +514 -709
- package/package.json +1 -1
@@ -28,34 +28,14 @@ export declare class IPAssetClient {
|
|
28
28
|
generateIpMetadata(metadata: IpMetadata): IpMetadata;
|
29
29
|
/**
|
30
30
|
* Registers an NFT as IP, creating a corresponding IP record.
|
31
|
-
*
|
32
|
-
*
|
33
|
-
* @param request.tokenId The token identifier of the NFT.
|
34
|
-
* @param {Object} request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
35
|
-
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
36
|
-
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
37
|
-
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
38
|
-
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
39
|
-
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
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)
|
31
|
+
*
|
32
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
43
33
|
*/
|
44
34
|
register(request: RegisterRequest): Promise<RegisterIpResponse>;
|
45
35
|
/**
|
46
36
|
* Batch registers an NFT as IP, creating a corresponding IP record.
|
47
|
-
*
|
48
|
-
*
|
49
|
-
* @param request.args.nftContract The address of the NFT.
|
50
|
-
* @param request.args.tokenId The token identifier of the NFT.
|
51
|
-
* @param {Object} request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
52
|
-
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
53
|
-
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
54
|
-
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
55
|
-
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
56
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxDataOnly option.
|
57
|
-
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, return an array of containing IP ID, Token ID, NFT Contract.
|
58
|
-
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
37
|
+
*
|
38
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
59
39
|
*/
|
60
40
|
batchRegister(request: BatchRegisterRequest): Promise<BatchRegisterResponse>;
|
61
41
|
/**
|
@@ -68,208 +48,100 @@ export declare class IPAssetClient {
|
|
68
48
|
registerDerivative(request: RegisterDerivativeRequest): Promise<RegisterDerivativeResponse>;
|
69
49
|
/**
|
70
50
|
* Batch registers a derivative directly with parent IP's license terms.
|
71
|
-
* @param request - The request object that contains all data needed to batch register derivative IP.
|
72
|
-
* @param {Array} request.args The array of objects containing the data needed to register derivative IP.
|
73
|
-
* @param request.args.childIpId The derivative IP ID.
|
74
|
-
* @param {Array} request.args.parentIpIds The parent IP IDs.
|
75
|
-
* @param {Array} request.args.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
76
|
-
* @param request.args.maxMintingFee The maximum minting fee that the caller is willing to pay. if set to 0 then no limit.
|
77
|
-
* @param request.args.maxRts The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000).
|
78
|
-
* @param request.args.maxRevenueShare The maximum revenue share percentage allowed for minting the License Tokens. Must be between 0 and 100,000,000 (where 100,000,000 represents 100%).
|
79
|
-
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
80
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxDataOnly option.
|
81
|
-
* @returns A Promise that resolves to a transaction hash.
|
82
51
|
*/
|
83
52
|
batchRegisterDerivative(request: BatchRegisterDerivativeRequest): Promise<BatchRegisterDerivativeResponse>;
|
84
53
|
/**
|
85
54
|
* Registers a derivative with license tokens. The derivative IP is registered with license tokens minted from the parent IP's license terms.
|
86
55
|
* The license terms of the parent IPs issued with license tokens are attached to the derivative IP.
|
87
56
|
* The caller must be the derivative IP owner or an authorized operator.
|
88
|
-
* @param request - The request object that contains all data needed to register derivative license tokens.
|
89
|
-
* @param request.childIpId The derivative IP ID.
|
90
|
-
* @param {Array} request.licenseTokenIds The IDs of the license tokens.
|
91
|
-
* @param request.args.maxRts The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000).
|
92
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
93
|
-
* @returns A Promise that resolves to an object containing the transaction hash.
|
94
57
|
*/
|
95
58
|
registerDerivativeWithLicenseTokens(request: RegisterDerivativeWithLicenseTokensRequest): Promise<RegisterDerivativeWithLicenseTokensResponse>;
|
96
59
|
/**
|
97
60
|
* Mint an NFT from a collection and register it as an IP.
|
98
|
-
*
|
99
|
-
*
|
100
|
-
* @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L19 | ILicensingModule}
|
101
|
-
* for a list of on-chain events emitted when an IP is minted and registered, and license terms are attached to an IP.
|
61
|
+
*
|
62
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L19 | `LicenseTermsAttached`} events.
|
102
63
|
*/
|
103
64
|
mintAndRegisterIpAssetWithPilTerms(request: MintAndRegisterIpAssetWithPilTermsRequest): Promise<MintAndRegisterIpAssetWithPilTermsResponse>;
|
104
65
|
/**
|
105
66
|
* Batch mint an NFT from a collection and register it as an IP.
|
106
|
-
*
|
107
|
-
*
|
108
|
-
* @param request.args.spgNftContract The address of the NFT collection.
|
109
|
-
* @param request.allowDuplicates Indicates whether the license terms can be attached to the same IP ID or not.
|
110
|
-
* @param {Array} request.args.licenseTermsData The PIL terms and licensing configuration data to be attached to the IP.
|
111
|
-
* @param {Object} request.args.licenseTermsData.terms The PIL terms to be used for the licensing.
|
112
|
-
* @param request.args.licenseTermsData.terms.transferable Indicates whether the license is transferable or not.
|
113
|
-
* @param request.args.licenseTermsData.terms.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
114
|
-
* @param request.args.licenseTermsData.terms.mintingFee The fee to be paid when minting a license.
|
115
|
-
* @param request.args.licenseTermsData.terms.expiration The expiration period of the license.
|
116
|
-
* @param request.args.licenseTermsData.terms.commercialUse Indicates whether the work can be used commercially or not, Commercial use is required to deploy a royalty vault.
|
117
|
-
* @param request.args.licenseTermsData.terms.commercialAttribution Whether attribution is required when reproducing the work commercially or not.
|
118
|
-
* @param request.args.licenseTermsData.terms.commercializerChecker Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
|
119
|
-
* @param request.args.licenseTermsData.terms.commercializerCheckerData The data to be passed to the commercializer checker contract.
|
120
|
-
* @param request.args.licenseTermsData.terms.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
121
|
-
* @param request.args.licenseTermsData.terms.commercialRevCeiling The maximum revenue that can be generated from the commercial use of the work.
|
122
|
-
* @param request.args.licenseTermsData.terms.derivativesAllowed Indicates whether the licensee can create derivatives of his work or not.
|
123
|
-
* @param request.args.licenseTermsData.terms.derivativesAttribution Indicates whether attribution is required for derivatives of the work or not.
|
124
|
-
* @param request.args.licenseTermsData.terms.derivativesApproval Indicates whether the licensor must approve derivatives of the work before they can be linked to the licensor IP ID or not.
|
125
|
-
* @param request.args.licenseTermsData.terms.derivativesReciprocal Indicates whether the licensee must license derivatives of the work under the same terms or not.
|
126
|
-
* @param request.args.licenseTermsData.terms.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
127
|
-
* @param request.args.licenseTermsData.terms.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
128
|
-
* @param request.args.licenseTermsData.terms.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
129
|
-
* @param {Object} request.args.licenseTermsData.licensingConfig The PIL terms and licensing configuration data to attach to the IP.
|
130
|
-
* @param request.args.licenseTermsData.licensingConfig.isSet Whether the configuration is set or not.
|
131
|
-
* @param request.args.licenseTermsData.licensingConfig.mintingFee The minting fee to be paid when minting license tokens.
|
132
|
-
* @param request.args.licenseTermsData.licensingConfig.licensingHook The hook contract address for the licensing module, or zero address if none
|
133
|
-
* @param request.args.licenseTermsData.licensingConfig.hookData The data to be used by the licensing hook.
|
134
|
-
* @param request.args.licenseTermsData.licensingConfig.commercialRevShare The commercial revenue share percentage.
|
135
|
-
* @param request.args.licenseTermsData.licensingConfig.disabled Whether the licensing is disabled or not.
|
136
|
-
* @param request.args.licenseTermsData.licensingConfig.expectMinimumGroupRewardShare The minimum percentage of the group's reward share (from 0 to 100%, represented as 100 * 10 ** 6) that can be allocated to the IP when it is added to the group.
|
137
|
-
* If the remaining reward share in the group is less than the minimumGroupRewardShare,the IP cannot be added to the group.
|
138
|
-
* @param request.args.licenseTermsData.licensingConfig.expectGroupRewardPool 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.
|
139
|
-
* @param {Object} request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
140
|
-
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
141
|
-
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
142
|
-
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
143
|
-
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
144
|
-
* @param request.args.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
145
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
146
|
-
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, return an array containing IP ID, Token ID, License Terms Ids, SPG NFT Contract.
|
147
|
-
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
148
|
-
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
67
|
+
*
|
68
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L19 | `LicenseTermsAttached`} events.
|
149
69
|
*/
|
150
70
|
batchMintAndRegisterIpAssetWithPilTerms(request: BatchMintAndRegisterIpAssetWithPilTermsRequest): Promise<BatchMintAndRegisterIpAssetWithPilTermsResponse>;
|
151
71
|
/**
|
152
72
|
* Register a given NFT as an IP and attach Programmable IP License Terms.
|
153
|
-
*
|
154
|
-
*
|
73
|
+
*
|
74
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L19 | `LicenseTermsAttached`} events.
|
155
75
|
*/
|
156
76
|
registerIpAndAttachPilTerms(request: RegisterIpAndAttachPilTermsRequest): Promise<RegisterIpAndAttachPilTermsResponse>;
|
157
77
|
/**
|
158
78
|
* Register the given NFT as a derivative IP with metadata without using license tokens.
|
159
|
-
*
|
160
|
-
*
|
79
|
+
*
|
80
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
161
81
|
*/
|
162
82
|
registerDerivativeIp(request: RegisterIpAndMakeDerivativeRequest): Promise<RegisterIpAndMakeDerivativeResponse>;
|
163
83
|
/**
|
164
84
|
* Mint an NFT from a collection and register it as a derivative IP without license tokens.
|
165
|
-
*
|
166
|
-
*
|
85
|
+
*
|
86
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
167
87
|
*/
|
168
88
|
mintAndRegisterIpAndMakeDerivative(request: MintAndRegisterIpAndMakeDerivativeRequest): Promise<MintAndRegisterIpAndMakeDerivativeResponse>;
|
169
89
|
/**
|
170
90
|
* Batch mint an NFT from a collection and register it as a derivative IP without license tokens.
|
171
|
-
*
|
172
|
-
*
|
173
|
-
* @param request.args.spgNftContract The address of the NFT collection.
|
174
|
-
* @param {Object} request.args.derivData The derivative data to be used for registerDerivative.
|
175
|
-
* @param {Array} request.args.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
176
|
-
* @param {Array} request.args.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
177
|
-
* @param request.args.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
178
|
-
* @param {Object} request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
179
|
-
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
180
|
-
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
181
|
-
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
182
|
-
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
183
|
-
* @param request.arg.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
184
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
185
|
-
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, return an array of containing IP ID and token ID, SPG NFT Contract.
|
186
|
-
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
91
|
+
*
|
92
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
187
93
|
*/
|
188
94
|
batchMintAndRegisterIpAndMakeDerivative(request: BatchMintAndRegisterIpAndMakeDerivativeRequest): Promise<BatchMintAndRegisterIpAndMakeDerivativeResponse>;
|
189
95
|
/**
|
190
96
|
* Mint an NFT from a SPGNFT collection and register it with metadata as an IP.
|
191
|
-
*
|
192
|
-
*
|
193
|
-
* @param request.recipient The address of the recipient of the minted NFT,default value is your wallet address.
|
194
|
-
* @param request.allowDuplicates Set to true to allow minting an NFT with a duplicate metadata hash.
|
195
|
-
* @param {Object} request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
196
|
-
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
197
|
-
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
198
|
-
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
199
|
-
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
200
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
201
|
-
* @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.
|
202
|
-
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
97
|
+
*
|
98
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
203
99
|
*/
|
204
100
|
mintAndRegisterIp(request: MintAndRegisterIpRequest): Promise<RegisterIpResponse>;
|
205
101
|
/**
|
206
102
|
* Register Programmable IP License Terms (if unregistered) and attach it to IP.
|
207
|
-
*
|
208
|
-
*
|
103
|
+
*
|
104
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L19 | `LicenseTermsAttached`} event.
|
209
105
|
*/
|
210
106
|
registerPilTermsAndAttach(request: RegisterPilTermsAndAttachRequest): Promise<RegisterPilTermsAndAttachResponse>;
|
211
107
|
/**
|
212
|
-
*
|
108
|
+
* Mint an NFT from a collection and register it as a derivative IP using license tokens.
|
213
109
|
* Requires caller to have the minter role or the SPG NFT to allow public minting. Caller must own the license tokens and have approved DerivativeWorkflows to transfer them.
|
214
|
-
*
|
215
|
-
*
|
216
|
-
* @param {Array} request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
217
|
-
* @param request.allowDuplicates Set to true to allow minting an NFT with a duplicate metadata hash.
|
218
|
-
* @param request.maxRts The maximum number of royalty tokens that can be distributed to the external royalty policies (max: 100,000,000).
|
219
|
-
* @param {Object} request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
220
|
-
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
221
|
-
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
222
|
-
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
223
|
-
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
224
|
-
* @param request.recipient - [Optional] The address to receive the minted NFT,default value is your wallet address.
|
225
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
226
|
-
* @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.
|
227
|
-
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
110
|
+
*
|
111
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
228
112
|
*/
|
229
113
|
mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(request: MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
230
114
|
/**
|
231
115
|
* Register the given NFT as a derivative IP using license tokens.
|
232
|
-
*
|
233
|
-
*
|
234
|
-
* @param {Array} request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
235
|
-
* @param request.tokenId The ID of the NFT.
|
236
|
-
* @param {Object} request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
237
|
-
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
238
|
-
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
239
|
-
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
240
|
-
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
241
|
-
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
242
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
243
|
-
* @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, Token ID.
|
116
|
+
*
|
117
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
244
118
|
*/
|
245
119
|
registerIpAndMakeDerivativeWithLicenseTokens(request: RegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
246
120
|
/**
|
247
|
-
* Register the given NFT and attach license terms and distribute royalty
|
248
|
-
*
|
249
|
-
*
|
250
|
-
*
|
251
|
-
*
|
121
|
+
* Register the given NFT and attach license terms and distribute royalty
|
122
|
+
* tokens. In order to successfully distribute royalty tokens, the first
|
123
|
+
* license terms attached to the IP must be a commercial license.
|
124
|
+
*
|
125
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/royalty/IRoyaltyModule.sol#L88 | `IpRoyaltyVaultDeployed`} events.
|
252
126
|
*/
|
253
127
|
registerIPAndAttachLicenseTermsAndDistributeRoyaltyTokens(request: RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest): Promise<RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse>;
|
254
128
|
/**
|
255
129
|
* Register the given NFT as a derivative IP and attach license terms and distribute royalty tokens. In order to successfully distribute royalty tokens, the license terms attached to the IP must be
|
256
130
|
* a commercial license.
|
257
|
-
*
|
258
|
-
* @
|
259
|
-
* for a list of on-chain events emitted when a derivative IP is registered, license terms are attached to an IP, and royalty tokens are distributed.
|
131
|
+
*
|
132
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/royalty/IRoyaltyModule.sol#L88| `IpRoyaltyVaultDeployed`} events.
|
260
133
|
*/
|
261
134
|
registerDerivativeIpAndAttachLicenseTermsAndDistributeRoyaltyTokens(request: RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest): Promise<RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse>;
|
262
135
|
/**
|
263
136
|
* Mint an NFT and register the IP, attach PIL terms, and distribute royalty tokens.
|
264
|
-
*
|
265
|
-
* @
|
266
|
-
* for a list of on-chain events emitted when an IP is minted and registered, PIL terms are attached to an IP, and royalty tokens are distributed.
|
137
|
+
*
|
138
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} and {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/royalty/IRoyaltyModule.sol#L88| `IpRoyaltyVaultDeployed`} events.
|
267
139
|
*/
|
268
140
|
mintAndRegisterIpAndAttachPilTermsAndDistributeRoyaltyTokens(request: MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensRequest): Promise<MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensResponse>;
|
269
141
|
/**
|
270
142
|
* Mint an NFT and register the IP, make a derivative, and distribute royalty tokens.
|
271
|
-
*
|
272
|
-
*
|
143
|
+
*
|
144
|
+
* Emits on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
273
145
|
*/
|
274
146
|
mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokens(request: MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensRequest): Promise<MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensResponse>;
|
275
147
|
private getRoyaltyShares;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,YAAY,EAQb,MAAM,MAAM,CAAC;AAId,OAAO,EACL,8CAA8C,EAC9C,+CAA+C,EAC/C,8CAA8C,EAC9C,+CAA+C,EAC/C,8BAA8B,EAC9B,+BAA+B,EAC/B,oBAAoB,EACpB,qBAAqB,EACrB,yCAAyC,EACzC,0CAA0C,EAC1C,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,EACf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A4D,CACvE,OAAO,EAAE,mEAAmE,GAC3E,OAAO,CAAC,oEAAoE,CAAC;IAqDhF;;;;OAIG;IACU,4DAA4D,CACvE,OAAO,EAAE,mEAAmE,GAC3E,OAAO,CAAC,oEAAoE,CAAC;IAyChF,OAAO,CAAC,gBAAgB;YAqBV,uBAAuB;YA0CvB,cAAc;IAYf,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;YAIxC,iBAAiB;YAWjB,uBAAuB;IAkBrC,OAAO,CAAC,2BAA2B;YAgBrB,qBAAqB;IAKnC,OAAO,CAAC,cAAc;YASR,sBAAsB;YA6DtB,wBAAwB;YAuBxB,0BAA0B;CAoFzC"}
|
@@ -19,112 +19,54 @@ export declare class LicenseClient {
|
|
19
19
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
|
20
20
|
/**
|
21
21
|
* Registers new license terms and return the ID of the newly registered license terms.
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
25
|
-
* @param request.mintingFee The fee to be paid when minting a license.
|
26
|
-
* @param request.expiration The expiration period of the license.
|
27
|
-
* @param request.commercialUse Indicates whether the work can be used commercially or not.
|
28
|
-
* @param request.commercialAttribution Whether attribution is required when reproducing the work commercially or not.
|
29
|
-
* @param request.commercializerChecker Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
|
30
|
-
* @param request.commercializerCheckerData The data to be passed to the commercializer checker contract.
|
31
|
-
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
32
|
-
* @param request.commercialRevCeiling The maximum revenue that can be generated from the commercial use of the work.
|
33
|
-
* @param request.derivativesAllowed Indicates whether the licensee can create derivatives of his work or not.
|
34
|
-
* @param request.derivativesAttribution Indicates whether attribution is required for derivatives of the work or not.
|
35
|
-
* @param request.derivativesApproval Indicates whether the licensor must approve derivatives of the work before they can be linked to the licensor IP ID or not.
|
36
|
-
* @param request.derivativesReciprocal Indicates whether the licensee must license derivatives of the work under the same terms or not.
|
37
|
-
* @param request.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
38
|
-
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
39
|
-
* @param request.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
40
|
-
* @param request.txOptions - [Optional] transaction. 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 license terms Id.
|
42
|
-
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
22
|
+
*
|
23
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicenseTemplate.sol#L19 | `LicenseTermsRegistered`} event.
|
43
24
|
*/
|
44
25
|
registerPILTerms(request: RegisterPILTermsRequest): Promise<RegisterPILResponse>;
|
45
26
|
/**
|
46
27
|
* Convenient function to register a PIL non commercial social remix license to the registry
|
47
|
-
*
|
48
|
-
*
|
49
|
-
* @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.
|
50
|
-
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
28
|
+
*
|
29
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicenseTemplate.sol#L19 | `LicenseTermsRegistered`} event.
|
51
30
|
*/
|
52
31
|
registerNonComSocialRemixingPIL(request?: RegisterNonComSocialRemixingPILRequest): Promise<RegisterPILResponse>;
|
53
32
|
/**
|
54
33
|
* Convenient function to register a PIL commercial use license to the registry.
|
55
|
-
*
|
56
|
-
*
|
57
|
-
* @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
|
58
|
-
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
59
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
60
|
-
* @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.
|
61
|
-
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
34
|
+
*
|
35
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicenseTemplate.sol#L19 | `LicenseTermsRegistered`} event.
|
62
36
|
*/
|
63
37
|
registerCommercialUsePIL(request: RegisterCommercialUsePILRequest): Promise<RegisterPILResponse>;
|
64
38
|
/**
|
65
39
|
* Convenient function to register a PIL commercial Remix license to the registry.
|
66
|
-
*
|
67
|
-
*
|
68
|
-
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
69
|
-
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
70
|
-
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
71
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
72
|
-
* @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.
|
73
|
-
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
40
|
+
*
|
41
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicenseTemplate.sol#L19 | `LicenseTermsRegistered`} event.
|
74
42
|
*/
|
75
43
|
registerCommercialRemixPIL(request: RegisterCommercialRemixPILRequest): Promise<RegisterPILResponse>;
|
76
44
|
/**
|
77
45
|
* Attaches license terms to an IP.
|
78
|
-
* @param request - The request object that contains all data needed to attach license terms.
|
79
|
-
* @param request.ipId The address of the IP to which the license terms are attached.
|
80
|
-
* @param request.licenseTemplate The address of the license template, default value is Programmable IP License.
|
81
|
-
* @param request.licenseTermsId The ID of the license terms.
|
82
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
83
|
-
* @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.
|
84
|
-
* If Ip have attached license terms, success will return false and txhash is empty.
|
85
46
|
*/
|
86
47
|
attachLicenseTerms(request: AttachLicenseTermsRequest): Promise<AttachLicenseTermsResponse>;
|
87
48
|
/**
|
88
49
|
* Mints license tokens for the license terms attached to an IP.
|
89
|
-
* The license tokens are minted to the receiver.
|
90
|
-
* The license terms must be attached to the IP before calling this function.
|
91
|
-
* But it can mint license token of default license terms without attaching the default license terms,
|
92
|
-
* since it is attached to all IPs by default.
|
93
|
-
* IP owners can mint license tokens for their IPs for arbitrary license terms
|
94
|
-
* without attaching the license terms to IP.
|
95
50
|
* It might require the caller pay the minting fee, depending on the license terms or configured by the iP owner.
|
96
51
|
* The minting fee is paid in the minting fee token specified in the license terms or configured by the IP owner.
|
97
|
-
* IP owners can configure the minting fee of their IPs or
|
98
|
-
*
|
99
|
-
* @
|
100
|
-
*
|
101
|
-
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
107
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
108
|
-
* @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.
|
109
|
-
* @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
|
52
|
+
* IP owners can configure the minting fee of their IPs or configure the minting fee module to determine the minting fee.
|
53
|
+
*
|
54
|
+
* @remarks
|
55
|
+
* Before minting license tokens, the license terms must be attached to the IP, with two exceptions:
|
56
|
+
* 1. Default license terms can be minted without explicit attachment since they are automatically
|
57
|
+
* attached to all IPs by default
|
58
|
+
* 2. IP owners have special privileges and can mint license tokens for their own IPs using any
|
59
|
+
* license terms, even if those terms are not explicitly attached
|
60
|
+
*
|
61
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/licensing/ILicensingModule.sol#L34 | `LicenseTokensMinted`} event.
|
110
62
|
*/
|
111
63
|
mintLicenseTokens(request: MintLicenseTokensRequest): Promise<MintLicenseTokensResponse>;
|
112
64
|
/**
|
113
65
|
* Gets license terms of the given ID.
|
114
|
-
* @param selectedLicenseTermsId The ID of the license terms.
|
115
|
-
* @returns A Promise that resolves to an object containing the PILTerms associate with the given ID.
|
116
66
|
*/
|
117
67
|
getLicenseTerms(selectedLicenseTermsId: LicenseTermsId): Promise<PiLicenseTemplateGetLicenseTermsResponse>;
|
118
68
|
/**
|
119
69
|
* 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.
|
120
|
-
* @param request - The request object that contains all data needed to predict minting licenses fee.
|
121
|
-
* @param request.licensorIpId The IP ID of the licensor.
|
122
|
-
* @param request.licenseTermsId The ID of the license terms.
|
123
|
-
* @param request.amount The amount of license tokens to mint.
|
124
|
-
* @param request.licenseTemplate [Optional] The address of the license template, default value is Programmable IP License.
|
125
|
-
* @param request.receiver [Optional] The address of the receiver,default value is your wallet address.
|
126
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
127
|
-
* @returns A Promise that resolves to an object containing the currency token and token amount.
|
128
70
|
*/
|
129
71
|
predictMintingLicenseFee(request: PredictMintingLicenseFeeRequest): Promise<LicensingModulePredictMintingLicenseFeeResponse>;
|
130
72
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAe,MAAM,MAAM,CAAC;AAE1D,OAAO,
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAe,MAAM,MAAM,CAAC;AAE1D,OAAO,EAEL,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,EAGrB,+CAA+C,EAE/C,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,wCAAwC,EACxC,+BAA+B,EAC/B,kBAAkB,EAClB,eAAe,EAGhB,4BAAyB;AAC1B,OAAO,EAEL,sCAAsC,EACtC,mBAAmB,EACnB,+BAA+B,EAC/B,iCAAiC,EACjC,yBAAyB,EAEzB,wBAAwB,EACxB,yBAAyB,EAEzB,0BAA0B,EAC1B,cAAc,EACd,uBAAuB,EACvB,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC3B,sCAAmC;AAQpC,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAO3C,qBAAa,aAAa;IACjB,qBAAqB,EAAE,0BAA0B,CAAC;IAClD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,+BAA+B,EAAE,+BAA+B,CAAC;IACjE,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,eAAe,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;gBAE5B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ;IAelF;;;;OAIG;IACU,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAiC7F;;;;OAIG;IACU,+BAA+B,CAC1C,OAAO,CAAC,EAAE,sCAAsC,GAC/C,OAAO,CAAC,mBAAmB,CAAC;IAiC/B;;;;OAIG;IACU,wBAAwB,CACnC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,mBAAmB,CAAC;IAuC/B;;;;OAIG;IACU,0BAA0B,CACrC,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,mBAAmB,CAAC;IAyC/B;;OAEG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;IAkDtC;;;;;;;;;;;;;;OAcG;IACU,iBAAiB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAgGrC;;OAEG;IACU,eAAe,CAC1B,sBAAsB,EAAE,cAAc,GACrC,OAAO,CAAC,wCAAwC,CAAC;IAUpD;;OAEG;IACU,wBAAwB,CACnC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,+CAA+C,CAAC;IAoC3D;;OAEG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;YAsDxB,iBAAiB;CAIhC"}
|
@@ -8,21 +8,9 @@ export declare class NftClient {
|
|
8
8
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
9
9
|
/**
|
10
10
|
* Creates a new SPG NFT Collection.
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
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.contractURI - 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);
|
11
|
+
*
|
12
|
+
* Emits an on-chain `CollectionCreated` event.
|
13
|
+
* @see {@link https://github.com/storyprotocol/protocol-periphery-v1/blob/v1.3.1/contracts/interfaces/workflows/IRegistrationWorkflows.sol#L12 | IRegistrationWorkflows}
|
26
14
|
*/
|
27
15
|
createNFTCollection(request: CreateNFTCollectionRequest): Promise<CreateNFTCollectionResponse>;
|
28
16
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nftClient.d.ts","sourceRoot":"../../../../src/resources","sources":["nftClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAqC,MAAM,MAAM,CAAC;AAEhF,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EAEnB,4BAAyB;AAC1B,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC5B,wCAAqC;AAItC,qBAAa,SAAS;IACb,2BAA2B,EAAE,2BAA2B,CAAC;IAEhE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D
|
1
|
+
{"version":3,"file":"nftClient.d.ts","sourceRoot":"../../../../src/resources","sources":["nftClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAqC,MAAM,MAAM,CAAC;AAEhF,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EAEnB,4BAAyB;AAC1B,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC5B,wCAAqC;AAItC,qBAAa,SAAS;IACb,2BAA2B,EAAE,2BAA2B,CAAC;IAEhE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D;;;;;OAKG;IACU,mBAAmB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAmDvC;;OAEG;IACU,eAAe,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvE;;OAEG;IACU,UAAU,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;CAOlE"}
|
@@ -11,80 +11,37 @@ export declare class PermissionClient {
|
|
11
11
|
private readonly chainId;
|
12
12
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
|
13
13
|
/**
|
14
|
-
* Sets the permission for a specific function call
|
14
|
+
* Sets the permission for a specific function call.
|
15
15
|
* Each policy is represented as a mapping from an IP account address to a signer address to a recipient
|
16
|
-
* address to a function selector to a permission level. The permission level
|
17
|
-
*
|
18
|
-
* By default, all policies are set to 0 (ABSTAIN), which means that the permission is not set.
|
16
|
+
* address to a function selector to a permission level. The permission level is an enum of `AccessPermission`.
|
17
|
+
* By default, all policies are set to ABSTAIN, which means that the permission is not set.
|
19
18
|
* The owner of ipAccount by default has all permission.
|
20
|
-
*
|
21
|
-
*
|
22
|
-
* Specific permission overrides wildcard permission.
|
23
|
-
* @param request - The request object containing necessary data to set `permission`.
|
24
|
-
* @param request.ipId The IP ID that grants the permission for `signer`.
|
25
|
-
* @param request.signer The address that can call `to` on behalf of the `ipAccount`.
|
26
|
-
* @param request.to The address that can be called by the `signer` (currently only modules can be `to`).
|
27
|
-
* @param request.permission The new permission level.
|
28
|
-
* @param request.func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
29
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
30
|
-
* @returns A Promise that resolves to an object containing the transaction hash.
|
31
|
-
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
19
|
+
*
|
20
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/access/IAccessController.sol#L13 | `PermissionSet`} event.
|
32
21
|
*/
|
33
22
|
setPermission(request: SetPermissionsRequest): Promise<SetPermissionsResponse>;
|
34
23
|
/**
|
35
24
|
* Specific permission overrides wildcard permission with signature.
|
36
|
-
*
|
37
|
-
*
|
38
|
-
* @param request.signer The address that can call `to` on behalf of the `ipAccount`
|
39
|
-
* @param request.to The address that can be called by the `signer` (currently only modules can be `to`)
|
40
|
-
* @param request.permission The new permission level.
|
41
|
-
* @param request.func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
42
|
-
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
43
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
44
|
-
* @returns A Promise that resolves to an object containing the transaction hash.
|
45
|
-
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
25
|
+
*
|
26
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/access/IAccessController.sol#L13 | `PermissionSet`} event.
|
46
27
|
*/
|
47
28
|
createSetPermissionSignature(request: CreateSetPermissionSignatureRequest): Promise<SetPermissionsResponse>;
|
48
29
|
/**
|
49
30
|
* Sets permission to a signer for all functions across all modules.
|
50
|
-
*
|
51
|
-
*
|
52
|
-
* @param request.signer The address of the signer receiving the permissions.
|
53
|
-
* @param request.permission The new permission.
|
54
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
55
|
-
* @returns A Promise that resolves to an object containing the transaction hash
|
56
|
-
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
31
|
+
*
|
32
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/access/IAccessController.sol#L13 | `PermissionSet`} event.
|
57
33
|
*/
|
58
34
|
setAllPermissions(request: SetAllPermissionsRequest): Promise<SetPermissionsResponse>;
|
59
35
|
/**
|
60
36
|
* Sets a batch of permissions in a single transaction.
|
61
|
-
*
|
62
|
-
*
|
63
|
-
* @param request.permissions[].ipId The IP ID that grants the permission for `signer`.
|
64
|
-
* @param request.permissions[].signer The address that can call `to` on behalf of the `ipAccount`.
|
65
|
-
* @param request.permissions[].to The address that can be called by the `signer` (currently only modules can be `to`).
|
66
|
-
* @param request.permissions[].permission The new permission level.
|
67
|
-
* @param request.permissions[].func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
68
|
-
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
69
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
70
|
-
* @returns A Promise that resolves to an object containing the transaction hash
|
71
|
-
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
37
|
+
*
|
38
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/access/IAccessController.sol#L13 | `PermissionSet`} event.
|
72
39
|
*/
|
73
40
|
setBatchPermissions(request: SetBatchPermissionsRequest): Promise<SetPermissionsResponse>;
|
74
41
|
/**
|
75
42
|
* Sets a batch of permissions in a single transaction with signature.
|
76
|
-
*
|
77
|
-
*
|
78
|
-
* @param {Array} request.permissions - An array of `Permission` structure, each representing the permission to be set.
|
79
|
-
* @param request.permissions[].ipId The IP ID that grants the permission for `signer`.
|
80
|
-
* @param request.permissions[].signer The address that can call `to` on behalf of the `ipAccount`.
|
81
|
-
* @param request.permissions[].to The address that can be called by the `signer` (currently only modules can be `to`).
|
82
|
-
* @param request.permissions[].permission The new permission level.
|
83
|
-
* @param request.permissions[].func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
84
|
-
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
85
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
86
|
-
* @returns A Promise that resolves to an object containing the transaction hash.
|
87
|
-
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
43
|
+
*
|
44
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/access/IAccessController.sol#L13 | `PermissionSet`} event.
|
88
45
|
*/
|
89
46
|
createBatchPermissionSignature(request: CreateBatchPermissionSignatureRequest): Promise<SetPermissionsResponse>;
|
90
47
|
private checkIsRegistered;
|