@story-protocol/core-sdk 1.3.0-rc.2 → 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/abi/generated.d.ts +88 -535
- package/dist/declarations/src/abi/generated.d.ts.map +1 -1
- 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 +19 -15
- 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 +21 -10
- 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 +38 -11
- 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 +23 -1
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/utils/chain.d.ts +8 -6
- 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/ipfs.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.d.ts +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +1506 -1739
- package/dist/story-protocol-core-sdk.cjs.prod.js +1506 -1739
- package/dist/story-protocol-core-sdk.esm.js +1506 -1739
- package/package.json +2 -1
@@ -24,83 +24,59 @@ export declare class StoryClient {
|
|
24
24
|
private _nftClient;
|
25
25
|
private _group;
|
26
26
|
private _wip;
|
27
|
-
/**
|
28
|
-
* @param config - the configuration for the SDK client
|
29
|
-
*/
|
30
27
|
private constructor();
|
31
28
|
private get chainId();
|
32
29
|
/**
|
33
|
-
* Factory method for creating
|
30
|
+
* Factory method for creating an SDK client with a signer.
|
34
31
|
*
|
35
|
-
* @param config StoryClient - the configuration for a new SDK client
|
36
32
|
*/
|
37
33
|
static newClient(config: StoryConfig): StoryClient;
|
38
34
|
/**
|
39
|
-
* Factory method for creating
|
40
|
-
*
|
41
|
-
* @param config WalletClientConfig - the configuration for a new SDK client
|
35
|
+
* Factory method for creating an SDK client with a signer.
|
42
36
|
*/
|
43
37
|
static newClientUseWallet(config: UseWalletStoryConfig): StoryClient;
|
44
38
|
/**
|
45
|
-
* Factory method for creating
|
46
|
-
*
|
47
|
-
* @param config UseAccountStoryConfig - the configuration for a new SDK client
|
39
|
+
* Factory method for creating an SDK client with a signer.
|
48
40
|
*/
|
49
41
|
static newClientUseAccount(config: UseAccountStoryConfig): StoryClient;
|
50
42
|
/**
|
51
43
|
* Getter for the ip asset client. The client is lazily created when
|
52
44
|
* this method is called.
|
53
|
-
*
|
54
|
-
* @returns the IPAssetClient instance
|
55
45
|
*/
|
56
46
|
get ipAsset(): IPAssetClient;
|
57
47
|
/**
|
58
48
|
* Getter for the permission client. The client is lazily created when
|
59
49
|
* this method is called.
|
60
|
-
*
|
61
|
-
* @returns the PermissionClient instance
|
62
50
|
*/
|
63
51
|
get permission(): PermissionClient;
|
64
52
|
/**
|
65
53
|
* Getter for the license client. The client is lazily created when
|
66
54
|
* this method is called.
|
67
|
-
*
|
68
|
-
* @returns the LicenseClient instance
|
69
55
|
*/
|
70
56
|
get license(): LicenseClient;
|
71
57
|
/**
|
72
58
|
* Getter for the dispute client. The client is lazily created when
|
73
59
|
* this method is called.
|
74
|
-
*
|
75
|
-
* @returns the DisputeClient instance
|
76
60
|
*/
|
77
61
|
get dispute(): DisputeClient;
|
78
62
|
/**
|
79
63
|
* Getter for the ip account client. The client is lazily created when
|
80
64
|
* this method is called.
|
81
|
-
*
|
82
|
-
* @returns the IPAccountClient instance
|
83
65
|
*/
|
84
66
|
get ipAccount(): IPAccountClient;
|
85
67
|
/**
|
86
68
|
* Getter for the royalty client. The client is lazily created when
|
87
69
|
* this method is called.
|
88
|
-
*
|
89
|
-
* @returns the RoyaltyClient instance
|
90
70
|
*/
|
91
71
|
get royalty(): RoyaltyClient;
|
92
72
|
/**
|
93
73
|
* Getter for the NFT client. The client is lazily created when
|
94
74
|
* this method is called.
|
95
|
-
*
|
96
|
-
* @returns the NftClient instance
|
97
75
|
*/
|
98
76
|
get nftClient(): NftClient;
|
99
77
|
/**
|
100
78
|
* Getter for the group client. The client is lazily created when
|
101
79
|
* this method is called.
|
102
|
-
*
|
103
|
-
* @returns the GroupClient instance
|
104
80
|
*/
|
105
81
|
get groupClient(): GroupClient;
|
106
82
|
get wipClient(): WipClient;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,WAAW,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,0BAAuB;AACpG,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,eAAe,EAAE,iCAA8B;AAExD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,iCAA8B;AAClD,OAAO,EAAE,WAAW,EAAE,6BAA0B;AAEhD,OAAO,EAAE,SAAS,EAAE,2BAAwB;AAK5C;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,UAAU,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AEG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,GAAG,WAAW;IAQtE;;;OAGG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;OAGG;IACH,IAAW,UAAU,IAAI,gBAAgB,CAMxC;IAED;;;OAGG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;OAGG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;OAGG;IACH,IAAW,SAAS,IAAI,eAAe,CAMtC;IAED;;;OAGG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;OAGG;IACH,IAAW,SAAS,IAAI,SAAS,CAMhC;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,WAAW,CAMpC;IAED,IAAW,SAAS,IAAI,SAAS,CAKhC;IAEY,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAOnC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAM1D"}
|
@@ -1,9 +1,6 @@
|
|
1
1
|
import { Hex } from "viem";
|
2
|
-
export declare const AddressZero = "0x0000000000000000000000000000000000000000";
|
3
|
-
export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
4
2
|
export declare const defaultFunctionSelector: Hex;
|
5
3
|
export declare const royaltySharesTotalSupply: number;
|
6
4
|
export declare const MAX_ROYALTY_TOKEN = 100000000;
|
7
|
-
|
8
|
-
export declare const WIP_TOKEN_ADDRESS = "0x1514000000000000000000000000000000000000";
|
5
|
+
export declare const WIP_TOKEN_ADDRESS: "0x1514000000000000000000000000000000000000";
|
9
6
|
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/constants","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/constants","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAK3B,eAAO,MAAM,uBAAuB,EAAE,GAAkB,CAAC;AACzD,eAAO,MAAM,wBAAwB,EAAE,MAAoB,CAAC;AAC5D,eAAO,MAAM,iBAAiB,YAAc,CAAC;AAC7C,eAAO,MAAM,iBAAiB,8CAA+B,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { StoryClient } from "./client.js";
|
2
|
-
export {
|
2
|
+
export { WIP_TOKEN_ADDRESS } from "./constants/common.js";
|
3
3
|
export { aeneid, mainnet } from "./utils/chain.js";
|
4
4
|
export { IPAssetClient } from "./resources/ipAsset.js";
|
5
5
|
export { PermissionClient } from "./resources/permission.js";
|
@@ -10,23 +10,23 @@ export { IPAccountClient } from "./resources/ipAccount.js";
|
|
10
10
|
export { RoyaltyClient } from "./resources/royalty.js";
|
11
11
|
export { GroupClient } from "./resources/group.js";
|
12
12
|
export { WipClient } from "./resources/wip.js";
|
13
|
-
export
|
14
|
-
export
|
15
|
-
export
|
13
|
+
export * from "./types/config.js";
|
14
|
+
export * from "./types/common.js";
|
15
|
+
export * from "./types/options.js";
|
16
|
+
export * from "./types/resources/ipAsset.js";
|
16
17
|
export * from "./types/resources/ipMetadata.js";
|
17
|
-
export
|
18
|
+
export * from "./types/resources/license.js";
|
19
|
+
export * from "./types/resources/royalty.js";
|
20
|
+
export * from "./types/resources/permission.js";
|
21
|
+
export * from "./types/resources/dispute.js";
|
22
|
+
export * from "./types/resources/ipAccount.js";
|
23
|
+
export * from "./types/resources/nftClient.js";
|
24
|
+
export * from "./types/resources/group.js";
|
25
|
+
export * from "./types/resources/wip.js";
|
18
26
|
export { PIL_TYPE } from "./types/resources/license.js";
|
19
|
-
export type { PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse, ClaimableRevenueRequest, ClaimableRevenueResponse, ClaimAllRevenueRequest, ClaimAllRevenueResponse, BatchClaimAllRevenueRequest, BatchClaimAllRevenueResponse, } from "./types/resources/royalty.js";
|
20
|
-
export type { SetPermissionsRequest, SetPermissionsResponse, CreateSetPermissionSignatureRequest, SetAllPermissionsRequest, SetBatchPermissionsRequest, CreateBatchPermissionSignatureRequest, PermissionSignatureRequest, SignatureRequest, SignatureResponse, } from "./types/resources/permission.js";
|
21
27
|
export { AccessPermission } from "./types/resources/permission.js";
|
22
|
-
export type { RaiseDisputeRequest, RaiseDisputeResponse, CancelDisputeRequest, CancelDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, } from "./types/resources/dispute.js";
|
23
|
-
export type { IPAccountExecuteRequest, IPAccountExecuteResponse, IPAccountExecuteWithSigRequest, IPAccountExecuteWithSigResponse, IpAccountStateResponse, TokenResponse, } from "./types/resources/ipAccount.js";
|
24
|
-
export type { CreateNFTCollectionRequest, CreateNFTCollectionResponse, } from "./types/resources/nftClient.js";
|
25
|
-
export type { RegisterGroupRequest, RegisterGroupResponse, RegisterGroupAndAttachLicenseRequest, RegisterGroupAndAttachLicenseResponse, RegisterGroupAndAttachLicenseAndAddIpsRequest, RegisterGroupAndAttachLicenseAndAddIpsResponse, MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest, MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse, RegisterIpAndAttachLicenseAndAddToGroupRequest, RegisterIpAndAttachLicenseAndAddToGroupResponse, } from "./types/resources/group.js";
|
26
28
|
export type { PiLicenseTemplateGetLicenseTermsResponse, IpAccountImplStateResponse, EncodedTxData, LicensingModulePredictMintingLicenseFeeResponse, } from "./abi/generated.js";
|
27
29
|
export { royaltyPolicyLapAddress, royaltyPolicyLrpAddress } from "./abi/generated.js";
|
28
|
-
export type { DepositRequest, WithdrawRequest, ApproveRequest, TransferRequest, TransferFromRequest, } from "./types/resources/wip.js";
|
29
30
|
export { getPermissionSignature, getSignature } from "./utils/sign.js";
|
30
31
|
export { convertCIDtoHashIPFS, convertHashIPFStoCID } from "./utils/ipfs.js";
|
31
|
-
export type { TxOptions, TransactionResponse, WipOptions, ERC20Options } from "./types/options.js";
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,iBAAiB,EAAE,8BAA2B;AACvD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAsB;AAChD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,iCAA8B;AAClD,OAAO,EAAE,eAAe,EAAE,iCAA8B;AACxD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,WAAW,EAAE,6BAA0B;AAChD,OAAO,EAAE,SAAS,EAAE,2BAAwB;AAE5C,kCAA+B;AAC/B,kCAA+B;AAC/B,mCAAgC;AAEhC,6CAA0C;AAC1C,gDAA6C;AAC7C,6CAA0C;AAC1C,6CAA0C;AAC1C,gDAA6C;AAC7C,6CAA0C;AAC1C,+CAA4C;AAC5C,+CAA4C;AAC5C,2CAAwC;AACxC,yCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,qCAAkC;AAErD,OAAO,EAAE,gBAAgB,EAAE,wCAAqC;AAEhE,YAAY,EACV,wCAAwC,EACxC,0BAA0B,EAC1B,aAAa,EACb,+CAA+C,GAChD,2BAAwB;AAEzB,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,2BAAwB;AAEnF,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,wBAAqB;AAEpE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,wBAAqB"}
|
@@ -15,53 +15,37 @@ export declare class DisputeClient {
|
|
15
15
|
/**
|
16
16
|
* Raises a dispute on a given ipId.
|
17
17
|
*
|
18
|
-
*
|
19
|
-
* @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L64 | IDisputeModule.sol}
|
20
|
-
* for a list of on-chain events emitted when a dispute is raised.
|
21
|
-
*
|
22
|
-
* @remarks `WipOptions.useMulticallWhenPossible` is disabled for this function due to disputeInitiator issue. It will be executed sequentially with several transactions.
|
18
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L64 | `DisputeRaised`} event.
|
23
19
|
*/
|
24
20
|
raiseDispute(request: RaiseDisputeRequest): Promise<RaiseDisputeResponse>;
|
25
21
|
/**
|
26
22
|
* Cancels an ongoing dispute
|
27
|
-
*
|
28
|
-
*
|
29
|
-
* @param request.data [Optional] additional data used in the cancellation process.
|
30
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
31
|
-
* @returns A Promise that resolves to a CancelDisputeResponse containing the transaction hash.
|
32
|
-
* @throws NotInDisputeState, if the currentTag of the Dispute is not being disputed
|
33
|
-
* @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
|
34
|
-
* @throws error if the Dispute's ArbitrationPolicy contract is not valid
|
35
|
-
* @calls cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
|
36
|
-
* @emits DisputeCancelled (_disputeId, _data);
|
23
|
+
*
|
24
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L84 | `DisputeCancelled`} event.
|
37
25
|
*/
|
38
26
|
cancelDispute(request: CancelDisputeRequest): Promise<CancelDisputeResponse>;
|
39
27
|
/**
|
40
|
-
* Resolves a dispute after it has been judged
|
41
|
-
*
|
42
|
-
*
|
43
|
-
* @param request.data The data to resolve the dispute.
|
44
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
45
|
-
* @returns A Promise that resolves to a ResolveDisputeResponse.
|
46
|
-
* @throws NotAbleToResolve, if currentTag is still in dispute (i.e still needs a judgement to be set)
|
47
|
-
* @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
|
48
|
-
* @emits DisputeResolved (_disputeId)
|
28
|
+
* Resolves a dispute after it has been judged.
|
29
|
+
*
|
30
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L104 | `DisputeResolved`} event.
|
49
31
|
*/
|
50
32
|
resolveDispute(request: ResolveDisputeRequest): Promise<ResolveDisputeResponse>;
|
51
33
|
/**
|
52
34
|
* Tags a derivative if a parent has been tagged with an infringement tag
|
53
35
|
* or a group ip if a group member has been tagged with an infringement tag.
|
54
36
|
*
|
55
|
-
*
|
56
|
-
* for a list of on-chain events emitted when a derivative is tagged on an infringement.
|
37
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L93 | `IpTaggedOnRelatedIpInfringement`} event.
|
57
38
|
*/
|
58
39
|
tagIfRelatedIpInfringed(request: TagIfRelatedIpInfringedRequest): Promise<TransactionResponse[]>;
|
59
40
|
/**
|
60
41
|
* Counters a dispute that was raised by another party on an IP using counter evidence.
|
42
|
+
* The counter evidence (e.g., documents, images) should be uploaded to IPFS,
|
43
|
+
* and its corresponding CID is converted to a hash for the request.
|
61
44
|
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
45
|
+
* @remarks
|
46
|
+
* The liveness period is split in two parts:
|
47
|
+
* - the first part of the liveness period in which only the IP's owner can be called the method.
|
48
|
+
* - a second part in which any address can be called the method.
|
65
49
|
*
|
66
50
|
* If you only have a `disputeId`, call {@link disputeIdToAssertionId} to get the `assertionId` needed here.
|
67
51
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../src/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAgD,MAAM,MAAM,CAAC;AAGvF,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC/B,sCAAmC;AACpC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EAGnB,gBAAgB,EAChB,kBAAkB,
|
1
|
+
{"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../src/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAgD,MAAM,MAAM,CAAC;AAGvF,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC/B,sCAAmC;AACpC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EAGnB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,4BAAyB;AAG1B,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAE3C,OAAO,EAAE,mBAAmB,EAAE,4BAAyB;AAKvD,qBAAa,aAAa;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;IACxC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ;IAUlF;;;;OAIG;IACU,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmFtF;;;;OAIG;IACU,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAyBzF;;;;OAIG;IACU,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAwB5F;;;;;OAKG;IACU,uBAAuB,CAClC,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAwCjC;;;;;;;;;;;OAWG;IACU,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAyGhF,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAM9E"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PublicClient } from "viem";
|
2
|
-
import { CoreMetadataModuleClient, GroupingModuleClient, GroupingModuleEventClient, GroupingWorkflowsClient, IpAssetRegistryClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, SimpleWalletClient } from "../abi/generated.js";
|
2
|
+
import { CoreMetadataModuleClient, GroupingModuleClient, GroupingModuleEventClient, GroupingWorkflowsClient, IpAssetRegistryClient, LicenseRegistryReadOnlyClient, LicenseTokenReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, RoyaltyModuleEventClient, SimpleWalletClient } from "../abi/generated.js";
|
3
3
|
import { ChainIds } from "../types/config.js";
|
4
|
-
import { MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest, MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse, RegisterGroupAndAttachLicenseAndAddIpsRequest, RegisterGroupAndAttachLicenseAndAddIpsResponse, RegisterGroupAndAttachLicenseRequest, RegisterGroupAndAttachLicenseResponse, RegisterGroupRequest, RegisterGroupResponse, RegisterIpAndAttachLicenseAndAddToGroupRequest, RegisterIpAndAttachLicenseAndAddToGroupResponse } from "../types/resources/group.js";
|
4
|
+
import { MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest, MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse, RegisterGroupAndAttachLicenseAndAddIpsRequest, RegisterGroupAndAttachLicenseAndAddIpsResponse, RegisterGroupAndAttachLicenseRequest, RegisterGroupAndAttachLicenseResponse, RegisterGroupRequest, RegisterGroupResponse, RegisterIpAndAttachLicenseAndAddToGroupRequest, RegisterIpAndAttachLicenseAndAddToGroupResponse, CollectAndDistributeGroupRoyaltiesRequest, CollectAndDistributeGroupRoyaltiesResponse } from "../types/resources/group.js";
|
5
5
|
export declare class GroupClient {
|
6
6
|
groupingWorkflowsClient: GroupingWorkflowsClient;
|
7
7
|
groupingModuleEventClient: GroupingModuleEventClient;
|
@@ -12,38 +12,42 @@ export declare class GroupClient {
|
|
12
12
|
coreMetadataModuleClient: CoreMetadataModuleClient;
|
13
13
|
licensingModuleClient: LicensingModuleClient;
|
14
14
|
licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
|
15
|
+
royaltyModuleEventClient: RoyaltyModuleEventClient;
|
15
16
|
private readonly rpcClient;
|
16
17
|
private readonly wallet;
|
17
18
|
private readonly chainId;
|
18
19
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
|
19
20
|
/** Registers a Group IPA.
|
20
|
-
*
|
21
|
-
*
|
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);
|
21
|
+
*
|
22
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | `IPGroupRegistered`} event.
|
25
23
|
*/
|
26
24
|
registerGroup(request: RegisterGroupRequest): Promise<RegisterGroupResponse>;
|
27
25
|
/** 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
|
-
*
|
29
|
-
*
|
26
|
+
*
|
27
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | `IPRegistered`} event.
|
30
28
|
*/
|
31
29
|
mintAndRegisterIpAndAttachLicenseAndAddToGroup(request: MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse>;
|
32
30
|
/** Register an NFT as IP with metadata, attach license terms to the registered IP, and add it to a group IP.
|
33
|
-
*
|
34
|
-
*
|
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.
|
35
33
|
*/
|
36
34
|
registerIpAndAttachLicenseAndAddToGroup(request: RegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<RegisterIpAndAttachLicenseAndAddToGroupResponse>;
|
37
35
|
/** Register a group IP with a group reward pool and attach license terms to the group IP.
|
38
|
-
*
|
39
|
-
*
|
36
|
+
*
|
37
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | `IPGroupRegistered`} event.
|
40
38
|
*/
|
41
39
|
registerGroupAndAttachLicense(request: RegisterGroupAndAttachLicenseRequest): Promise<RegisterGroupAndAttachLicenseResponse>;
|
42
40
|
/** Register a group IP with a group reward pool, attach license terms to the group IP, and add individual IPs to the group IP.
|
43
|
-
*
|
44
|
-
*
|
41
|
+
*
|
42
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | `IPGroupRegistered`} event.
|
45
43
|
*/
|
46
44
|
registerGroupAndAttachLicenseAndAddIps(request: RegisterGroupAndAttachLicenseAndAddIpsRequest): Promise<RegisterGroupAndAttachLicenseAndAddIpsResponse>;
|
45
|
+
/**
|
46
|
+
* Collect royalties for the entire group and distribute the rewards to each member IP's royalty vault.
|
47
|
+
*
|
48
|
+
* Emits an on-chain {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L38 | `CollectedRoyaltiesToGroupPool`} event.
|
49
|
+
*/
|
50
|
+
collectAndDistributeGroupRoyalties({ groupIpId, currencyTokens, memberIpIds, txOptions, }: CollectAndDistributeGroupRoyaltiesRequest): Promise<CollectAndDistributeGroupRoyaltiesResponse>;
|
47
51
|
private getLicenseData;
|
48
52
|
}
|
49
53
|
//# sourceMappingURL=group.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"../../../../src/resources","sources":["group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"../../../../src/resources","sources":["group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoC,MAAM,MAAM,CAAC;AAEtE,OAAO,EAEL,wBAAwB,EAExB,oBAAoB,EACpB,yBAAyB,EAEzB,uBAAuB,EAMvB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAE1B,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,EACnB,4BAAyB;AAK1B,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAC3C,OAAO,EAGL,qDAAqD,EACrD,sDAAsD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AC9C,SAAS,EACT,cAAc,EACd,WAAW,EACX,SAAS,GACV,EAAE,yCAAyC,GAAG,OAAO,CAAC,0CAA0C,CAAC;IAmElG,OAAO,CAAC,cAAc;CAYvB"}
|
@@ -10,38 +10,20 @@ export declare class IPAccountClient {
|
|
10
10
|
private readonly rpcClient;
|
11
11
|
private readonly chainId;
|
12
12
|
constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @param request.ipId The Ip Id to get ip account.
|
16
|
-
* @param request.to The recipient of the transaction.
|
17
|
-
* @param request.value The amount of Ether to send.
|
18
|
-
* @param request.accountAddress The ipId to send.
|
19
|
-
* @param request.data The data to send along with the transaction.
|
20
|
-
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
21
|
-
* @returns Tx hash for the transaction.
|
13
|
+
/**
|
14
|
+
* Executes a transaction from the IP Account.
|
22
15
|
*/
|
23
16
|
execute(request: IPAccountExecuteRequest): Promise<IPAccountExecuteResponse>;
|
24
|
-
/**
|
25
|
-
*
|
26
|
-
* @param request.ipId The Ip Id to get ip account.
|
27
|
-
* @param request.to The recipient of the transaction.
|
28
|
-
* @param request.data The data to send along with the transaction.
|
29
|
-
* @param request.signer The signer of the transaction.
|
30
|
-
* @param request.deadline The deadline of the transaction signature.
|
31
|
-
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
32
|
-
* @param request.value [Optional] The amount of Ether to send.
|
33
|
-
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
34
|
-
* @returns Tx hash for the transaction.
|
17
|
+
/**
|
18
|
+
* Executes a transaction from the IP Account with a signature.
|
35
19
|
*/
|
36
20
|
executeWithSig(request: IPAccountExecuteWithSigRequest): Promise<IPAccountExecuteWithSigResponse>;
|
37
|
-
/**
|
38
|
-
*
|
39
|
-
* @returns A Promise that resolves to the IP Account's nonce.
|
21
|
+
/**
|
22
|
+
* Returns the IPAccount's internal nonce for transaction ordering.
|
40
23
|
*/
|
41
24
|
getIpAccountNonce(ipId: Address): Promise<IpAccountStateResponse>;
|
42
25
|
/**
|
43
26
|
* Returns the identifier of the non-fungible token which owns the account
|
44
|
-
* @returns A Promise that resolves to an object containing the chain ID, token contract address, and token ID.
|
45
27
|
*/
|
46
28
|
getToken(ipId: Address): Promise<TokenResponse>;
|
47
29
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAsB,YAAY,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACrB,wCAAqC;AAEtC,OAAO,EAGL,WAAW,EAEX,kBAAkB,EAClB,eAAe,EAChB,4BAAyB;AAE1B,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAE3C,OAAO,EAAE,mBAAmB,EAAE,4BAAyB;AAGvD,qBAAa,eAAe;IACnB,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;gBACvB,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ;IAQlF
|
1
|
+
{"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAsB,YAAY,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EACL,uBAAuB,E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