@story-protocol/core-sdk 1.0.0-rc.6 → 1.2.0-rc.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 +8 -9
- package/dist/declarations/src/abi/generated.d.ts +30706 -11072
- package/dist/declarations/src/abi/generated.d.ts.map +1 -1
- package/dist/declarations/src/client.d.ts +18 -0
- package/dist/declarations/src/client.d.ts.map +1 -1
- package/dist/declarations/src/constants/common.d.ts +2 -1
- package/dist/declarations/src/constants/common.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +18 -8
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/dispute.d.ts +8 -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/ipAccount.d.ts +17 -2
- package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +232 -8
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +45 -17
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/nftClient.d.ts +29 -0
- package/dist/declarations/src/resources/nftClient.d.ts.map +1 -0
- package/dist/declarations/src/resources/permission.d.ts +69 -8
- package/dist/declarations/src/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/resources/royalty.d.ts +76 -20
- package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/types/common.d.ts +11 -1
- package/dist/declarations/src/types/common.d.ts.map +1 -1
- package/dist/declarations/src/types/config.d.ts +2 -2
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/options.d.ts +4 -5
- package/dist/declarations/src/types/options.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/dispute.d.ts +13 -31
- 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/ipAccount.d.ts +21 -11
- package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +178 -14
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/license.d.ts +50 -25
- package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/nftClient.d.ts +23 -0
- package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -0
- package/dist/declarations/src/types/resources/permission.d.ts +44 -5
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/royalty.d.ts +86 -35
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/utils/chain.d.ts +34 -0
- package/dist/declarations/src/utils/chain.d.ts.map +1 -0
- package/dist/declarations/src/utils/sign.d.ts +16 -0
- package/dist/declarations/src/utils/sign.d.ts.map +1 -0
- package/dist/story-protocol-core-sdk.cjs.dev.js +6528 -13466
- package/dist/story-protocol-core-sdk.cjs.prod.js +6528 -13466
- package/dist/story-protocol-core-sdk.esm.js +6522 -13468
- package/package.json +2 -2
@@ -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,5 +1,5 @@
|
|
1
|
-
import { PublicClient } from "viem";
|
2
|
-
import { IPAccountExecuteRequest, IPAccountExecuteResponse, IPAccountExecuteWithSigRequest, IPAccountExecuteWithSigResponse } from "../types/resources/ipAccount.js";
|
1
|
+
import { Address, PublicClient } from "viem";
|
2
|
+
import { IPAccountExecuteRequest, IPAccountExecuteResponse, IPAccountExecuteWithSigRequest, IPAccountExecuteWithSigResponse, IpAccountStateResponse, TokenResponse } from "../types/resources/ipAccount.js";
|
3
3
|
import { SimpleWalletClient } from "../abi/generated.js";
|
4
4
|
export declare class IPAccountClient {
|
5
5
|
private readonly wallet;
|
@@ -7,22 +7,37 @@ export declare class IPAccountClient {
|
|
7
7
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
8
8
|
/** Executes a transaction from the IP Account.
|
9
9
|
* @param request - The request object containing necessary data to execute IP Account a transaction.
|
10
|
+
* @param request.ipId The Ip Id to get ip account.
|
10
11
|
* @param request.to The recipient of the transaction.
|
11
12
|
* @param request.value The amount of Ether to send.
|
13
|
+
* @param request.accountAddress The ipId to send.
|
12
14
|
* @param request.data The data to send along with the transaction.
|
15
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
13
16
|
* @returns Tx hash for the transaction.
|
14
17
|
*/
|
15
18
|
execute(request: IPAccountExecuteRequest): Promise<IPAccountExecuteResponse>;
|
16
19
|
/** Executes a transaction from the IP Account.
|
17
20
|
* @param request - The request object containing necessary data to execute IP Account a transaction.
|
21
|
+
* @param request.ipId The Ip Id to get ip account.
|
18
22
|
* @param request.to The recipient of the transaction.
|
19
23
|
* @param request.value The amount of Ether to send.
|
20
24
|
* @param request.data The data to send along with the transaction.
|
21
25
|
* @param request.signer The signer of the transaction.
|
22
26
|
* @param request.deadline The deadline of the transaction signature.
|
23
27
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
28
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
24
29
|
* @returns Tx hash for the transaction.
|
25
30
|
*/
|
26
31
|
executeWithSig(request: IPAccountExecuteWithSigRequest): Promise<IPAccountExecuteWithSigResponse>;
|
32
|
+
/** Returns the IPAccount's internal nonce for transaction ordering.
|
33
|
+
* @param ipId The IP ID
|
34
|
+
* @returns A Promise that resolves to the IP Account's nonce.
|
35
|
+
*/
|
36
|
+
getIpAccountNonce(ipId: Address): Promise<IpAccountStateResponse>;
|
37
|
+
/**
|
38
|
+
* Returns the identifier of the non-fungible token which owns the account
|
39
|
+
* @returns A Promise that resolves to an object containing the chain ID, token contract address, and token ID.
|
40
|
+
*/
|
41
|
+
getToken(ipId: Address): Promise<TokenResponse>;
|
27
42
|
}
|
28
43
|
//# sourceMappingURL=ipAccount.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
1
|
+
{"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,aAAa,EACd,wCAAqC;AAEtC,OAAO,EAAuB,kBAAkB,EAAE,4BAAyB;AAG3E,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAK/D;;;;;;;;;OASG;IACU,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAgCzF;;;;;;;;;;;OAWG;IACU,cAAc,CACzB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC;IAmC3C;;;OAGG;IACU,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAc9E;;;OAGG;IACU,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;CAiB7D"}
|
@@ -1,23 +1,90 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
2
|
import { SupportedChainIds } from "../types/config.js";
|
3
|
-
import { RegisterDerivativeRequest, RegisterDerivativeResponse, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, RegisterIpResponse, RegisterRequest } from "../types/resources/ipAsset.js";
|
4
|
-
import { IpAssetRegistryClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, SimpleWalletClient } from "../abi/generated.js";
|
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
|
+
accessControllerClient: AccessControllerClient;
|
12
|
+
coreMetadataModuleClient: CoreMetadataModuleClient;
|
13
|
+
registrationWorkflowsClient: RegistrationWorkflowsClient;
|
14
|
+
licenseAttachmentWorkflowsClient: LicenseAttachmentWorkflowsClient;
|
15
|
+
derivativeWorkflowsClient: DerivativeWorkflowsClient;
|
11
16
|
private readonly rpcClient;
|
17
|
+
private readonly wallet;
|
12
18
|
private readonly chainId;
|
13
19
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: SupportedChainIds);
|
20
|
+
/**
|
21
|
+
* Create a new `IpCreator` object with the specified details.
|
22
|
+
* @param params - The parameters required to create the `IpCreator` object.
|
23
|
+
* @param params.name The name of the creator.
|
24
|
+
* @param params.address The wallet address of the creator.
|
25
|
+
* @param params.description [Optional] A description of the creator.
|
26
|
+
* @param params.image [Optional] The URL or path to an image representing the creator.
|
27
|
+
* @param params.socialMedia [Optional] An array of social media profiles associated with the creator.
|
28
|
+
* @param params.socialMedia[].platform The name of the social media platform.
|
29
|
+
* @param params.socialMedia[].url The URL to the creator's profile on the platform.
|
30
|
+
* @param params.contributionPercent The percentage of contribution by the creator, must add up to 100.
|
31
|
+
* @param params.role [Optional] The role of the creator in relation to the IP.
|
32
|
+
* @returns An `IpCreator` object containing the provided details.
|
33
|
+
*/
|
34
|
+
generateCreatorMetadata(param: GenerateCreatorMetadataParam): IpCreator;
|
35
|
+
/**
|
36
|
+
* Create a new `IpMetadata` object with the specified details.
|
37
|
+
* @param params - The parameters required to create the `IpMetadata` object.
|
38
|
+
* @param params.title [Optional] The title of the IP.
|
39
|
+
* @param params.description [Optional] A description of the IP.
|
40
|
+
* @param params.ipType [Optional] The type of the IP asset (e.g., "character", "chapter").
|
41
|
+
* @param params.relationships [Optional] An array of relationships between this IP and its parent IPs.
|
42
|
+
* @param params.relationships[].ipId The ID of the parent IP.
|
43
|
+
* @param params.relationships[].type The type of relationship (e.g., "APPEARS_IN").
|
44
|
+
* @param params.createdAt [Optional] The creation date and time of the IP in ISO 8601 format.
|
45
|
+
* @param params.watermarkImg [Optional] The URL or path to an image used as a watermark for the IP.
|
46
|
+
* @param params.creators [Optional] An array of creators associated with the IP.
|
47
|
+
* @param params.creators[].name The name of the creator.
|
48
|
+
* @param params.creators[].address The address of the creator.
|
49
|
+
* @param params.creators[].description [Optional] A description of the creator.
|
50
|
+
* @param params.creators[].image [Optional] The URL or path to an image representing the creator.
|
51
|
+
* @param params.creators[].socialMedia [Optional] An array of social media profiles for the creator.
|
52
|
+
* @param params.creators[].socialMedia[].platform The social media platform name.
|
53
|
+
* @param params.creators[].socialMedia[].url The URL to the creator's profile.
|
54
|
+
* @param params.creators[].role [Optional] The role of the creator in relation to the IP.
|
55
|
+
* @param params.creators[].contributionPercent The percentage of contribution by the creator.
|
56
|
+
* @param params.media [Optional] An array of media related to the IP.
|
57
|
+
* @param params.media[].name The name of the media.
|
58
|
+
* @param params.media[].url The URL to the media.
|
59
|
+
* @param params.media[].mimeType The MIME type of the media.
|
60
|
+
* @param params.attributes [Optional] An array of key-value pairs providing additional metadata.
|
61
|
+
* @param params.attributes[].key The key for the attribute.
|
62
|
+
* @param params.attributes[].value The value for the attribute, can be a string or number.
|
63
|
+
* @param params.app [Optional] Information about the application associated with the IP.
|
64
|
+
* @param params.app.id The ID of the application.
|
65
|
+
* @param params.app.name The name of the application.
|
66
|
+
* @param params.app.website The website URL of the application.
|
67
|
+
* @param params.tags [Optional] An array of tags associated with the IP.
|
68
|
+
* @param params.robotTerms [Optional] Robot terms for the IP, specifying access rules.
|
69
|
+
* @param params.robotTerms.userAgent The user agent for which the rules apply.
|
70
|
+
* @param params.robotTerms.allow The rules allowing access.
|
71
|
+
* @param params.additionalProperties [Optional] Any additional key-value pairs to include in the metadata.
|
72
|
+
* @returns An `IpMetadata` object containing the provided details and any additional properties.
|
73
|
+
*/
|
74
|
+
generateIpMetadata(param: GenerateIpMetadataParam): IpMetadata;
|
14
75
|
/**
|
15
76
|
* Registers an NFT as IP, creating a corresponding IP record.
|
16
77
|
* @param request - The request object that contains all data needed to register IP.
|
17
|
-
* @param request.
|
78
|
+
* @param request.nftContract The address of the NFT.
|
18
79
|
* @param request.tokenId The token identifier of the NFT.
|
19
|
-
* @param request.
|
20
|
-
*
|
80
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
81
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
82
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
83
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
84
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
85
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
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.
|
21
88
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
22
89
|
*/
|
23
90
|
register(request: RegisterRequest): Promise<RegisterIpResponse>;
|
@@ -31,7 +98,7 @@ export declare class IPAssetClient {
|
|
31
98
|
* @param request.childIpId The derivative IP ID.
|
32
99
|
* @param request.parentIpIds The parent IP IDs.
|
33
100
|
* @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
34
|
-
* @param request.txOptions [Optional]
|
101
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
35
102
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
36
103
|
*/
|
37
104
|
registerDerivative(request: RegisterDerivativeRequest): Promise<RegisterDerivativeResponse>;
|
@@ -43,11 +110,168 @@ export declare class IPAssetClient {
|
|
43
110
|
* @param request - The request object that contains all data needed to register derivative license tokens.
|
44
111
|
* @param request.childIpId The derivative IP ID.
|
45
112
|
* @param request.licenseTokenIds The IDs of the license tokens.
|
46
|
-
* @param request.txOptions [Optional]
|
113
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
47
114
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
48
115
|
*/
|
49
116
|
registerDerivativeWithLicenseTokens(request: RegisterDerivativeWithLicenseTokensRequest): Promise<RegisterDerivativeWithLicenseTokensResponse>;
|
50
|
-
|
117
|
+
/**
|
118
|
+
* Mint an NFT from a collection and register it as an IP.
|
119
|
+
* @param request - The request object that contains all data needed to mint and register ip.
|
120
|
+
* @param request.spgNftContract The address of the NFT collection.
|
121
|
+
* @param request.pilType The type of the PIL.
|
122
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
123
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
124
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
125
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
126
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
127
|
+
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
128
|
+
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
129
|
+
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
130
|
+
* @param request.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
131
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
132
|
+
* @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.
|
133
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
134
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
135
|
+
*/
|
136
|
+
mintAndRegisterIpAssetWithPilTerms(request: CreateIpAssetWithPilTermsRequest): Promise<CreateIpAssetWithPilTermsResponse>;
|
137
|
+
/**
|
138
|
+
* Register a given NFT as an IP and attach Programmable IP License Terms.R.
|
139
|
+
* @param request - The request object that contains all data needed to mint and register ip.
|
140
|
+
* @param request.nftContract The address of the NFT collection.
|
141
|
+
* @param request.tokenId The ID of the NFT.
|
142
|
+
* @param request.pilType The type of the PIL.
|
143
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
144
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
145
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
146
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
147
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
148
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
149
|
+
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
150
|
+
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
151
|
+
* @param request.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
152
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
153
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID, License Terms Id if waitForTxn is set to true.
|
154
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
155
|
+
*/
|
156
|
+
registerIpAndAttachPilTerms(request: RegisterIpAndAttachPilTermsRequest): Promise<RegisterIpAndAttachPilTermsResponse>;
|
157
|
+
/**
|
158
|
+
* Register the given NFT as a derivative IP with metadata without using license tokens.
|
159
|
+
* @param request - The request object that contains all data needed to register derivative IP.
|
160
|
+
* @param request.nftContract The address of the NFT collection.
|
161
|
+
* @param request.tokenId The ID of the NFT.
|
162
|
+
* @param request.derivData The derivative data to be used for registerDerivative.
|
163
|
+
* @param request.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
164
|
+
* @param request.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
165
|
+
* @param request.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
166
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
167
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
168
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
169
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
170
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
171
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds,default is 1000ms.
|
172
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
173
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
174
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
175
|
+
*/
|
176
|
+
registerDerivativeIp(request: RegisterIpAndMakeDerivativeRequest): Promise<RegisterIpAndMakeDerivativeResponse>;
|
177
|
+
/**
|
178
|
+
* Mint an NFT from a collection and register it as a derivative IP without license tokens.
|
179
|
+
* @param request - The request object that contains all data needed to mint and register ip and make derivative.
|
180
|
+
* @param request.spgNftContract The address of the NFT collection.
|
181
|
+
* @param request.derivData The derivative data to be used for registerDerivative.
|
182
|
+
* @param request.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
183
|
+
* @param request.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
184
|
+
* @param request.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
185
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
186
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
187
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
188
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
189
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
190
|
+
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
191
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
192
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
193
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
194
|
+
*/
|
195
|
+
mintAndRegisterIpAndMakeDerivative(request: MintAndRegisterIpAndMakeDerivativeRequest): Promise<RegisterDerivativeResponse>;
|
196
|
+
/**
|
197
|
+
* Mint an NFT from a SPGNFT collection and register it with metadata as an IP.
|
198
|
+
* @param request - The request object that contains all data needed to attach license terms.
|
199
|
+
* @param request.spgNftContract The address of the SPGNFT collection.
|
200
|
+
* @param request.recipient The address of the recipient of the minted NFT,default value is your wallet address.
|
201
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
202
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
203
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
204
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
205
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
206
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
207
|
+
* @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.
|
208
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
209
|
+
*/
|
210
|
+
mintAndRegisterIp(request: MintAndRegisterIpRequest): Promise<RegisterIpResponse>;
|
211
|
+
/**
|
212
|
+
* Register Programmable IP License Terms (if unregistered) and attach it to IP.
|
213
|
+
* @param request - The request object that contains all data needed to attach license terms.
|
214
|
+
* @param request.ipId The ID of the IP.
|
215
|
+
* @param request.terms The PIL terms to be registered.
|
216
|
+
* @param request.terms.transferable Indicates whether the license is transferable or not.
|
217
|
+
* @param request.terms.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
218
|
+
* @param request.terms.mintingFee The fee to be paid when minting a license.
|
219
|
+
* @param request.terms.expiration The expiration period of the license.
|
220
|
+
* @param request.terms.commercialUse Indicates whether the work can be used commercially or not.
|
221
|
+
* @param request.terms.commercialAttribution Whether attribution is required when reproducing the work commercially or not.
|
222
|
+
* @param request.terms.commercializerChecker Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
|
223
|
+
* @param request.terms.commercializerCheckerData The data to be passed to the commercializer checker contract.
|
224
|
+
* @param request.terms.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
225
|
+
* @param request.terms.commercialRevCeiling The maximum revenue that can be generated from the commercial use of the work.
|
226
|
+
* @param request.terms.derivativesAllowed Indicates whether the licensee can create derivatives of his work or not.
|
227
|
+
* @param request.terms.derivativesAttribution Indicates whether attribution is required for derivatives of the work or not.
|
228
|
+
* @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.
|
229
|
+
* @param request.terms.derivativesReciprocal Indicates whether the licensee must license derivatives of the work under the same terms or not.
|
230
|
+
* @param request.terms.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
231
|
+
* @param request.terms.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
232
|
+
* @param request.terms.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
233
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds,default is 1000ms.
|
234
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
235
|
+
* @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.
|
236
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
237
|
+
*/
|
238
|
+
registerPilTermsAndAttach(request: RegisterPilTermsAndAttachRequest): Promise<RegisterPilTermsAndAttachResponse>;
|
239
|
+
/**
|
240
|
+
* Mint an NFT from a collection and register it as a derivative IP using license tokens
|
241
|
+
* @param request - The request object that contains all data needed to mint and register ip and make derivative with license tokens.
|
242
|
+
* @param request.spgNftContract The address of the NFT collection.
|
243
|
+
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
244
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
245
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
246
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
247
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
248
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
249
|
+
* @param request.recipient - [Optional] The address to receive the minted NFT,default value is your wallet address.
|
250
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
251
|
+
* @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.
|
252
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
253
|
+
*/
|
254
|
+
mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(request: MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
255
|
+
/**
|
256
|
+
* Register the given NFT as a derivative IP using license tokens.
|
257
|
+
* @param request - The request object that contains all data needed to register ip and make derivative with license tokens.
|
258
|
+
* @param request.nftContract The address of the NFT collection.
|
259
|
+
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
260
|
+
* @param request.tokenId The ID of the NFT.
|
261
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
262
|
+
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
263
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
264
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
265
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
266
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
267
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
268
|
+
* @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.
|
269
|
+
*/
|
270
|
+
registerIpAndMakeDerivativeWithLicenseTokens(request: RegisterIpAndMakeDerivativeWithLicenseTokensRequest): Promise<RegisterIpResponse>;
|
271
|
+
private getIpIdAddress;
|
51
272
|
private isRegistered;
|
273
|
+
private getSigSignatureState;
|
274
|
+
private getLicenseTermsId;
|
275
|
+
private validateLicenseTokenIds;
|
52
276
|
}
|
53
277
|
//# sourceMappingURL=ipAsset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,
|
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;AACpC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EAMzB,qBAAqB,EACrB,gCAAgC,EAIhC,6BAA6B,EAC7B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,EAG3B,kBAAkB,EAInB,4BAAyB;AAK1B,qBAAa,aAAa;IACjB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,yBAAyB,EAAE,yBAAyB,CAAC;IAE5D,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;IAgB3F;;;;;;;;;;;;;OAaG;IACI,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,SAAS;IAqB9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACI,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,UAAU;IAiCrE;;;;;;;;;;;;;;OAcG;IACU,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuF5E;;;;;;;;;;;;OAYG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;IA4DtC;;;;;;;;;;OAUG;IACU,mCAAmC,CAC9C,OAAO,EAAE,0CAA0C,GAClD,OAAO,CAAC,2CAA2C,CAAC;IAiCvD;;;;;;;;;;;;;;;;;;OAkBG;IACU,kCAAkC,CAC7C,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IAwD7C;;;;;;;;;;;;;;;;;;OAkBG;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,21 +1,47 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
|
-
import { IpAssetRegistryClient, LicenseRegistryEventClient, LicenseRegistryReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient,
|
3
|
-
import { RegisterNonComSocialRemixingPILRequest, RegisterPILResponse, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, MintLicenseTokensRequest, MintLicenseTokensResponse } from "../types/resources/license.js";
|
2
|
+
import { IpAssetRegistryClient, LicenseRegistryEventClient, LicenseRegistryReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, PiLicenseTemplateGetLicenseTermsResponse, PiLicenseTemplateReadOnlyClient, SimpleWalletClient } from "../abi/generated.js";
|
3
|
+
import { RegisterNonComSocialRemixingPILRequest, RegisterPILResponse, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, MintLicenseTokensRequest, MintLicenseTokensResponse, AttachLicenseTermsResponse, LicenseTermsId, RegisterPILTermsRequest } 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
11
|
licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
|
12
12
|
private readonly rpcClient;
|
13
13
|
private readonly wallet;
|
14
|
-
|
14
|
+
private readonly chainId;
|
15
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: SupportedChainIds);
|
16
|
+
/**
|
17
|
+
* Registers new license terms and return the ID of the newly registered license terms.
|
18
|
+
* @param request - The request object that contains all data needed to register a license term.
|
19
|
+
* @param request.transferable Indicates whether the license is transferable or not.
|
20
|
+
* @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
21
|
+
* @param request.mintingFee The fee to be paid when minting a license.
|
22
|
+
* @param request.expiration The expiration period of the license.
|
23
|
+
* @param request.commercialUse Indicates whether the work can be used commercially or not.
|
24
|
+
* @param request.commercialAttribution Whether attribution is required when reproducing the work commercially or not.
|
25
|
+
* @param request.commercializerChecker Commercializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
|
26
|
+
* @param request.commercializerCheckerData The data to be passed to the commercializer checker contract.
|
27
|
+
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
28
|
+
* @param request.commercialRevCeiling The maximum revenue that can be generated from the commercial use of the work.
|
29
|
+
* @param request.derivativesAllowed Indicates whether the licensee can create derivatives of his work or not.
|
30
|
+
* @param request.derivativesAttribution Indicates whether attribution is required for derivatives of the work or not.
|
31
|
+
* @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.
|
32
|
+
* @param request.derivativesReciprocal Indicates whether the licensee must license derivatives of the work under the same terms or not.
|
33
|
+
* @param request.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
34
|
+
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
35
|
+
* @param request.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
36
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
37
|
+
* @returns A Promise that resolves to an object containing the optional transaction hash, optional transaction encodedTxData and optional license terms Id.
|
38
|
+
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
39
|
+
*/
|
40
|
+
registerPILTerms(request: RegisterPILTermsRequest): Promise<RegisterPILResponse>;
|
15
41
|
/**
|
16
42
|
* Convenient function to register a PIL non commercial social remix license to the registry
|
17
43
|
* @param request - [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
|
18
|
-
* @param request.txOptions [Optional]
|
44
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
19
45
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
20
46
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
21
47
|
*/
|
@@ -23,10 +49,9 @@ export declare class LicenseClient {
|
|
23
49
|
/**
|
24
50
|
* Convenient function to register a PIL commercial use license to the registry.
|
25
51
|
* @param request - The request object that contains all data needed to register a PIL commercial use license.
|
26
|
-
* @param request.
|
52
|
+
* @param request.defaultMintingFee The fee to be paid when minting a license.
|
27
53
|
* @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
|
28
|
-
* @param request.
|
29
|
-
* @param request.txOptions [Optional] The transaction options.
|
54
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
30
55
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
31
56
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
32
57
|
*/
|
@@ -34,11 +59,10 @@ export declare class LicenseClient {
|
|
34
59
|
/**
|
35
60
|
* Convenient function to register a PIL commercial Remix license to the registry.
|
36
61
|
* @param request - The request object that contains all data needed to register license.
|
37
|
-
* @param request.
|
62
|
+
* @param request.defaultMintingFee The fee to be paid when minting a license.
|
38
63
|
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
39
64
|
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
40
|
-
* @param request.
|
41
|
-
* @param request.txOptions [Optional] The transaction options.
|
65
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
42
66
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
43
67
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
44
68
|
*/
|
@@ -49,12 +73,10 @@ export declare class LicenseClient {
|
|
49
73
|
* @param request.ipId The address of the IP to which the license terms are attached.
|
50
74
|
* @param request.licenseTemplate The address of the license template.
|
51
75
|
* @param request.licenseTermsId The ID of the license terms.
|
52
|
-
* @param request.txOptions [Optional]
|
76
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
53
77
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
54
78
|
*/
|
55
|
-
attachLicenseTerms(request: AttachLicenseTermsRequest): Promise<
|
56
|
-
txHash: `0x${string}`;
|
57
|
-
}>;
|
79
|
+
attachLicenseTerms(request: AttachLicenseTermsRequest): Promise<AttachLicenseTermsResponse>;
|
58
80
|
/**
|
59
81
|
* Mints license tokens for the license terms attached to an IP.
|
60
82
|
* The license tokens are minted to the receiver.
|
@@ -73,11 +95,17 @@ export declare class LicenseClient {
|
|
73
95
|
* @param request.licenseTermsId The ID of the license terms within the license template.
|
74
96
|
* @param request.amount The amount of license tokens to mint.
|
75
97
|
* @param request.receiver The address of the receiver.
|
76
|
-
* @param request.txOptions [Optional]
|
77
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional license token
|
98
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
99
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional license token IDs if waitForTxn is set to true.
|
78
100
|
* @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
|
79
101
|
*/
|
80
102
|
mintLicenseTokens(request: MintLicenseTokensRequest): Promise<MintLicenseTokensResponse>;
|
103
|
+
/**
|
104
|
+
* Gets license terms of the given ID.
|
105
|
+
* @param selectedLicenseTermsId The ID of the license terms.
|
106
|
+
* @returns A Promise that resolves to an object containing the PILTerms associate with the given ID.
|
107
|
+
*/
|
108
|
+
getLicenseTerms(selectedLicenseTermsId: LicenseTermsId): Promise<PiLicenseTemplateGetLicenseTermsResponse>;
|
81
109
|
private getLicenseTermsId;
|
82
110
|
}
|
83
111
|
//# 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,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,
|
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,EACrB,uBAAuB,EACvB,wCAAwC,EACxC,+BAA+B,EAC/B,kBAAkB,EAEnB,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,EACxB,sCAAmC;AAIpC,OAAO,EAAE,iBAAiB,EAAE,2BAAwB;AAEpD,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;IACpE,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;IAW3F;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACU,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAiC7F;;;;;;OAMG;IACU,+BAA+B,CAC1C,OAAO,CAAC,EAAE,sCAAsC,GAC/C,OAAO,CAAC,mBAAmB,CAAC;IAiC/B;;;;;;;;OAQG;IACU,wBAAwB,CACnC,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,mBAAmB,CAAC;IAwC/B;;;;;;;;;OASG;IACU,0BAA0B,CACrC,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,mBAAmB,CAAC;IA0C/B;;;;;;;;OAQG;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;YAUtC,iBAAiB;CAIhC"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { PublicClient } from "viem";
|
2
|
+
import { RegistrationWorkflowsClient, SimpleWalletClient } from "../abi/generated.js";
|
3
|
+
import { CreateNFTCollectionRequest, CreateNFTCollectionResponse } from "../types/resources/nftClient.js";
|
4
|
+
export declare class NftClient {
|
5
|
+
registrationWorkflowsClient: RegistrationWorkflowsClient;
|
6
|
+
private readonly rpcClient;
|
7
|
+
private readonly wallet;
|
8
|
+
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
|
9
|
+
/**
|
10
|
+
* Creates a new SPG NFT Collection.
|
11
|
+
* @param request - The request object containing necessary data to create a SPG NFT Collection.
|
12
|
+
* @param request.name - The name of the collection.
|
13
|
+
* @param request.symbol - The symbol of the collection.
|
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);
|
26
|
+
*/
|
27
|
+
createNFTCollection(request: CreateNFTCollectionRequest): Promise<CreateNFTCollectionResponse>;
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=nftClient.d.ts.map
|
@@ -0,0 +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,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"}
|