@story-protocol/core-sdk 1.3.0-rc.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +29 -101
  2. package/dist/declarations/src/client.d.ts +3 -27
  3. package/dist/declarations/src/client.d.ts.map +1 -1
  4. package/dist/declarations/src/constants/common.d.ts +1 -4
  5. package/dist/declarations/src/constants/common.d.ts.map +1 -1
  6. package/dist/declarations/src/index.d.ts +13 -13
  7. package/dist/declarations/src/index.d.ts.map +1 -1
  8. package/dist/declarations/src/resources/dispute.d.ts +13 -29
  9. package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/group.d.ts +10 -13
  11. package/dist/declarations/src/resources/group.d.ts.map +1 -1
  12. package/dist/declarations/src/resources/ipAccount.d.ts +6 -24
  13. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
  14. package/dist/declarations/src/resources/ipAsset.d.ts +36 -164
  15. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  16. package/dist/declarations/src/resources/license.d.ts +18 -76
  17. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  18. package/dist/declarations/src/resources/nftClient.d.ts +3 -15
  19. package/dist/declarations/src/resources/nftClient.d.ts.map +1 -1
  20. package/dist/declarations/src/resources/permission.d.ts +13 -56
  21. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  22. package/dist/declarations/src/resources/royalty.d.ts +12 -8
  23. package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
  24. package/dist/declarations/src/types/common.d.ts +11 -3
  25. package/dist/declarations/src/types/common.d.ts.map +1 -1
  26. package/dist/declarations/src/types/config.d.ts +15 -0
  27. package/dist/declarations/src/types/config.d.ts.map +1 -1
  28. package/dist/declarations/src/types/resources/dispute.d.ts +14 -3
  29. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -1
  30. package/dist/declarations/src/types/resources/group.d.ts +14 -9
  31. package/dist/declarations/src/types/resources/group.d.ts.map +1 -1
  32. package/dist/declarations/src/types/resources/ipAccount.d.ts +13 -2
  33. package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
  34. package/dist/declarations/src/types/resources/ipAsset.d.ts +54 -32
  35. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  36. package/dist/declarations/src/types/resources/license.d.ts +65 -6
  37. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  38. package/dist/declarations/src/types/resources/nftClient.d.ts +11 -3
  39. package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -1
  40. package/dist/declarations/src/types/resources/permission.d.ts +34 -2
  41. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
  42. package/dist/declarations/src/types/resources/royalty.d.ts +4 -0
  43. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
  44. package/dist/declarations/src/utils/chain.d.ts +2 -0
  45. package/dist/declarations/src/utils/chain.d.ts.map +1 -1
  46. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts +1 -1
  47. package/dist/declarations/src/utils/getIpMetadataForWorkflow.d.ts.map +1 -1
  48. package/dist/declarations/src/utils/sign.d.ts +0 -17
  49. package/dist/declarations/src/utils/sign.d.ts.map +1 -1
  50. package/dist/story-protocol-core-sdk.cjs.dev.js +514 -709
  51. package/dist/story-protocol-core-sdk.cjs.prod.js +514 -709
  52. package/dist/story-protocol-core-sdk.esm.js +514 -709
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -1,113 +1,43 @@
1
- # Story Protocol SDK
1
+ # Story Protocol SDK [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/storyprotocol/sdk/blob/main/LICENSE.md)[![npm version](https://img.shields.io/npm/v/@story-protocol/core-sdk)](https://www.npmjs.com/package/@story-protocol/core-sdk)[![npm downloads](https://img.shields.io/npm/dm/@story-protocol/core-sdk)](https://www.npmjs.com/package/@story-protocol/core-sdk)
2
2
 
3
- Welcome to the documents for Story Protocol SDK. The SDK provides the APIs for developers to build applications with Story Protocol. By using the SDK, developers can create the resources like IP assets and perform actions to interact with the resource.
3
+ Welcome to the Story Protocol SDK - a comprehensive toolkit for building applications on Story Protocol. This SDK empowers developers to seamlessly interact with intellectual property (IP) assets on the blockchain through an intuitive API interface.
4
4
 
5
- ## How to use Story Protocol SDK in Your Project
5
+ Key Features:
6
6
 
7
- ### Install Story Protocol core SDK
7
+ - IP Asset Module: Register, and manage intellectual property assets on-chain
8
+ - License Module: Create customizable license terms, attach them to IP assets, and mint transferable license tokens
9
+ - Royalty Module: Claim royalties, and manage payment distributions
10
+ - Dispute Module: Initiate, manage and resolve IP-related disputes through on-chain governance
11
+ - Group Module: Create IP collections with shared revenue pools
12
+ - WIP Module: Wrap native IP into ERC-20 tokens for DeFi integrations
13
+ - NFT Client Module: Mint a new SPG collection for use with Story Protocol.
8
14
 
9
- Suppose you already have a node project or created a new node project. First, you need to install `@story-protocol/core-sdk` in your project. You can use one of the following command to install the package:
15
+ The SDK provides robust support for the following networks:
10
16
 
11
- Use `npm`:
17
+ - [aeneid](https://docs.story.foundation/network/network-info/aeneid) - A dedicated testnet environment for development and testing
18
+ - [mainnet](https://docs.story.foundation/network/network-info/mainnet) - The production network for live deployments
12
19
 
13
- ```
14
- npm install --save @story-protocol/core-sdk viem@1.21.4
15
- ```
20
+ # Documentation
16
21
 
17
- Use `pnpm`:
22
+ For more detailed information on using the SDK, refer to the [TypeScript SDK Guide](https://docs.story.foundation/developers/typescript-sdk/overview).
18
23
 
19
- ```
20
- pnpm install @story-protocol/core-sdk viem@1.21.4
21
- ```
24
+ The documentation is divided into the following sections:
22
25
 
23
- Use `yarn`:
24
-
25
- ```
26
- yarn add @story-protocol/core-sdk viem@1.21.4
27
- ```
28
-
29
- Besides the Story Protocol SDK package `@story-protocol/core-sdk`, we also require the package `viem` (https://www.npmjs.com/package/viem) to access the DeFi wallet accounts.
30
-
31
- # Initiate SDK Client
32
-
33
- Next we can initiate the SDK Client by first setting up our wallet and then the client itself.
34
-
35
- ## Set up your wallet
36
-
37
- The SDK supports using `viem` for initiating SDK client. Create a typescript file and write the following code to initiate the client with a private key:
38
-
39
- > :information-source: Make sure to have WALLET_PRIVATE_KEY set up in your .env file.
40
-
41
- ```typescript index.ts
42
- import { privateKeyToAccount } from "viem/accounts";
43
-
44
- const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
45
- const account = privateKeyToAccount(WALLET_PRIVATE_KEY as Address);
46
- ```
47
-
48
- The preceding code created the `account` object for creating the SDK client.
49
-
50
- ## Set up SDK client
51
-
52
- To set up the SDK client, import `StoryClient` and `StoryConfig` from `@story-protocol/core-sdk`. Write the following code, utilizing the `account` we created previously.
53
-
54
- > :information-source: Make sure to have RPC_PROVIDER_URL for your desired chain set up in your .env file. We recommend using the Iliad network with `RPC_PROVIDER_URL=https://rpc.partner.testnet.storyprotocol.net`.
55
-
56
- ```typescript index.ts
57
- import { StoryClient, StoryConfig } from "@story-protocol/core-sdk";
58
-
59
- const config: StoryConfig = {
60
- transport: http(process.env.RPC_PROVIDER_URL),
61
- account: account,
62
- };
63
- const client = StoryClient.newClient(config);
64
- ```
65
-
66
- ## How To Build and Test Story Protocol SDK for local testing
67
-
68
- This section provides the instructions on how to build Story Protocol SDK from source code.
69
-
70
- ### Prerequisite
71
-
72
- - Install PNPM: Execute `npm install -g pnpm`
73
- - Install TypeScript: Run `pnpm add typescript -D`
74
- - Install Yalc: Use `npm install -g yalc`
75
-
76
- ### Steps for Using Yalc for Local Testing of Core-SDK
77
-
78
- For manual testing of the core-sdk, set up a separate web project. The guide below uses `yalc` to link the `core-sdk` locally, enabling its installation and import for testing.
79
-
80
- Under the `typescript-sdk/packages/core-sdk` directory:
81
-
82
- - Navigate to the `core-sdk` directory.
83
- - Execute `npm run build` to build your latest code.
84
- - Run `yalc publish`. You should see a message like `@story-protocol/core-sdk@<version> published in store.` (Note: The version number may vary).
85
-
86
- To set up your testing environment (e.g., a new Next.js project), use `yalc add @story-protocol/core-sdk@<version>` (ensure the version number is updated accordingly).
87
-
88
- - Run `pnpm install`. This installs `@story-protocol/core-sdk@<version>` with your local changes.
89
-
90
- ### Steps to Refresh the Changes
91
-
92
- Under the `typescript-sdk/packages/core-sdk` directory:
93
-
94
- - Execute `npm run build` to build your latest code.
95
- - Run `yalc push`.
96
-
97
- In your testing environment:
98
-
99
- - Run `yalc update` to pull the latest changes.
100
-
101
- ## Steps to pull and compile latest Protocol Core & Periphery v1 Smart Contract ABIs (Currently pulls from the protocol-core-v1 and protocol-periphery-v1 `release-v1.x.x` branch)
102
-
103
- - run `cd packages/wagmi-generator && npm run generate`
26
+ - [Overview](https://docs.story.foundation/developers/typescript-sdk/overview)
27
+ - [Setup](https://docs.story.foundation/developers/typescript-sdk/setup)
28
+ - [Register an IP Asset](https://docs.story.foundation/developers/typescript-sdk/register-ip-asset)
29
+ - [Attach Terms to an IPA](https://docs.story.foundation/developers/typescript-sdk/attach-terms)
30
+ - [Mint a License Token](https://docs.story.foundation/developers/typescript-sdk/mint-license)
31
+ - [Register a Derivative](https://docs.story.foundation/developers/typescript-sdk/register-derivative)
32
+ - [Pay an IPA](https://docs.story.foundation/developers/typescript-sdk/pay-ipa)
33
+ - [Claim Revenue](https://docs.story.foundation/developers/typescript-sdk/claim-revenue)
34
+ - [Raise a Dispute](https://docs.story.foundation/developers/typescript-sdk/raise-dispute)
104
35
 
105
36
  ## Release
106
37
 
107
- | Package | Description |
108
- | :-------------------------------- | :---------------------------------------------- |
109
- | [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
110
- | [react-sdk](./packages/react-sdk) | The react sdk for interacting with the protocol |
38
+ | Package | Description |
39
+ | :------------------------------ | :--------------------------------------------- |
40
+ | [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
111
41
 
112
42
  ## Contributing
113
43
 
@@ -118,6 +48,4 @@ Please make sure to update tests as appropriate.
118
48
 
119
49
  ## License
120
50
 
121
- [MIT License](/LICENSE.md)
122
-
123
- ## Contact Us
51
+ [Copyright (c) 2023-Present Story Protocol Inc.](/LICENSE.md)
@@ -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 a SDK client with a signer.
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 a SDK client with a signer.
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 a SDK client with a signer.
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,CAA0B;IAC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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
- /** Address for the WIP contract. This address is fixed */
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;AAE3B,eAAO,MAAM,WAAW,+CAA+C,CAAC;AACxE,eAAO,MAAM,QAAQ,uEAAuE,CAAC;AAC7F,eAAO,MAAM,uBAAuB,EAAE,GAAkB,CAAC;AACzD,eAAO,MAAM,wBAAwB,EAAE,MAAoB,CAAC;AAC5D,eAAO,MAAM,iBAAiB,YAAc,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,+CAA+C,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 { AddressZero, HashZero, WIP_TOKEN_ADDRESS } from "./constants/common.js";
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 type { StoryConfig, SupportedChainIds } from "./types/config.js";
14
- export type { LicensingConfig } from "./types/common.js";
15
- export type { RegisterRequest, RegisterIpResponse, RegisterDerivativeResponse, RegisterDerivativeRequest, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, MintAndRegisterIpAssetWithPilTermsRequest, MintAndRegisterIpAssetWithPilTermsResponse, RegisterIpAndMakeDerivativeRequest, RegisterIpAndMakeDerivativeResponse, RegisterIpAndAttachPilTermsRequest, RegisterIpAndAttachPilTermsResponse, MintAndRegisterIpAndMakeDerivativeRequest, MintAndRegisterIpAndMakeDerivativeResponse, MintAndRegisterIpRequest, RegisterPilTermsAndAttachRequest, RegisterPilTermsAndAttachResponse, MintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest, RegisterIpAndMakeDerivativeWithLicenseTokensRequest, BatchMintAndRegisterIpAssetWithPilTermsRequest, BatchMintAndRegisterIpAssetWithPilTermsResponse, BatchMintAndRegisterIpAndMakeDerivativeRequest, BatchMintAndRegisterIpAndMakeDerivativeResponse, BatchRegisterRequest, BatchRegisterResponse, BatchRegisterDerivativeRequest, BatchRegisterDerivativeResponse, RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest, RegisterIPAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse, RoyaltyShare, RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensRequest, RegisterDerivativeAndAttachLicenseTermsAndDistributeRoyaltyTokensResponse, MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensRequest, MintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokensResponse, MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensRequest, MintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensResponse, LicenseTermsData, } from "./types/resources/ipAsset.js";
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 type { RegisterNonComSocialRemixingPILRequest, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, RegisterPILTermsRequest, RegisterPILResponse, AttachLicenseTermsRequest, AttachLicenseTermsResponse, MintLicenseTokensRequest, MintLicenseTokensResponse, LicenseTermsId, LicenseTerms, PredictMintingLicenseFeeRequest, SetLicensingConfigRequest, SetLicensingConfigResponse, } from "./types/resources/license.js";
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, NativeRoyaltyPolicy, TransferToVaultRequest, RoyaltyPolicyInput, } 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, CollectAndDistributeGroupRoyaltiesRequest, CollectAndDistributeGroupRoyaltiesResponse, } 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
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B,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
- * Submits a {@link DisputeRaised} event.
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
- * @param request - The request object containing details to cancel the dispute.
28
- * @param request.disputeId The ID of the dispute to be cancelled.
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
- * @param request - The request object containing details to resolve the dispute.
42
- * @param request.disputeId The ID of the dispute to be resolved.
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
- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/dispute/IDisputeModule.sol#L93 | IDisputeModule.sol}
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
- * This method can only be called by the IP's owner to counter a dispute by providing
63
- * counter evidence. The counter evidence (e.g., documents, images) should be
64
- * uploaded to IPFS, and its corresponding CID is converted to a hash for the request.
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,EAElB,eAAe,EAChB,4BAAyB;AAG1B,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAE3C,OAAO,EAAE,mBAAmB,EAAE,4BAAyB;AAIvD,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;;;;;;;;OAQG;IACU,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmFtF;;;;;;;;;;;;OAYG;IACU,aAAa,CAAC,OAAO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AE,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"}
@@ -18,31 +18,28 @@ export declare class GroupClient {
18
18
  private readonly chainId;
19
19
  constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: ChainIds);
20
20
  /** Registers a Group IPA.
21
- * @param request - The request object containing necessary data to register group.
22
- * @param request.groupPool The address specifying how royalty will be split amongst the pool of IPs in the group.
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 group id.
25
- * @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.
26
23
  */
27
24
  registerGroup(request: RegisterGroupRequest): Promise<RegisterGroupResponse>;
28
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.
29
- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | IIPAssetRegistry}
30
- * for a list of on-chain events emitted when an IP is minted and registered, license terms are attached to an IP, and it is added to a group.
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.
31
28
  */
32
29
  mintAndRegisterIpAndAttachLicenseAndAddToGroup(request: MintAndRegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<MintAndRegisterIpAndAttachLicenseAndAddToGroupResponse>;
33
30
  /** Register an NFT as IP with metadata, attach license terms to the registered IP, and add it to a group IP.
34
- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | IIPAssetRegistry}
35
- * for a list of on-chain events emitted when an IP is registered, license terms are attached to an IP, and it is added to a group.
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.
36
33
  */
37
34
  registerIpAndAttachLicenseAndAddToGroup(request: RegisterIpAndAttachLicenseAndAddToGroupRequest): Promise<RegisterIpAndAttachLicenseAndAddToGroupResponse>;
38
35
  /** Register a group IP with a group reward pool and attach license terms to the group IP.
39
- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | IGroupingModule}
40
- * for a list of on-chain events emitted when a group IP is registered, license terms are attached to a group IP .
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.
41
38
  */
42
39
  registerGroupAndAttachLicense(request: RegisterGroupAndAttachLicenseRequest): Promise<RegisterGroupAndAttachLicenseResponse>;
43
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.
44
- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1/contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | IGroupingModule}
45
- * for a list of on-chain events emitted when a group IP is registered, license terms are attached to a group IP, and individual IPs are added to a group.
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.
46
43
  */
47
44
  registerGroupAndAttachLicenseAndAddIps(request: RegisterGroupAndAttachLicenseAndAddIpsRequest): Promise<RegisterGroupAndAttachLicenseAndAddIpsResponse>;
48
45
  /**
@@ -1 +1 @@
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,EACtD,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,oBAAoB,EACpB,qBAAqB,EACrB,8CAA8C,EAC9C,+CAA+C,EAC/C,yCAAyC,EACzC,0CAA0C,EAC3C,oCAAiC;AAQlC,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;IAC7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IA0BjD;;;OAGG;IACU,sCAAsC,CACjD,OAAO,EAAE,6CAA6C,GACrD,OAAO,CAAC,8CAA8C,CAAC;IAqD1D;;;;OAIG;IACU,kCAAkC,CAAC,EAC9C,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
- /** Executes a transaction from the IP Account.
14
- * @param request - The request object containing necessary data to execute IP Account a transaction.
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
- /** Executes a transaction from the IP Account.
25
- * @param request - The request object containing necessary data to execute IP Account a transaction.
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
- /** Returns the IPAccount's internal nonce for transaction ordering.
38
- * @param ipId The IP ID
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;;;;;;;;;OASG;IACU,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAgCzF;;;;;;;;;;;OAWG;IACU,cAAc,CACzB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BA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