@story-protocol/core-sdk 0.1.0-rc.5 → 1.0.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/README.md +100 -52
  2. package/dist/declarations/src/client.d.ts +36 -28
  3. package/dist/declarations/src/client.d.ts.map +1 -1
  4. package/dist/declarations/src/clients/storyAPI.d.ts +9 -0
  5. package/dist/declarations/src/clients/storyAPI.d.ts.map +1 -0
  6. package/dist/declarations/src/constants/common.d.ts +4 -0
  7. package/dist/declarations/src/constants/common.d.ts.map +1 -0
  8. package/dist/declarations/src/index.d.ts +12 -9
  9. package/dist/declarations/src/index.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/dispute.d.ts +1128 -0
  11. package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
  12. package/dist/declarations/src/resources/ipAccount.d.ts +1028 -0
  13. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -0
  14. package/dist/declarations/src/resources/ipAsset.d.ts +2357 -31
  15. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  16. package/dist/declarations/src/resources/license.d.ts +4351 -27
  17. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  18. package/dist/declarations/src/resources/permission.d.ts +2077 -0
  19. package/dist/declarations/src/resources/permission.d.ts.map +1 -0
  20. package/dist/declarations/src/resources/royalty.d.ts +3019 -0
  21. package/dist/declarations/src/resources/royalty.d.ts.map +1 -0
  22. package/dist/declarations/src/types/common.d.ts +6 -0
  23. package/dist/declarations/src/types/common.d.ts.map +1 -0
  24. package/dist/declarations/src/types/config.d.ts +15 -5
  25. package/dist/declarations/src/types/config.d.ts.map +1 -1
  26. package/dist/declarations/src/types/options.d.ts +6 -0
  27. package/dist/declarations/src/types/options.d.ts.map +1 -0
  28. package/dist/declarations/src/types/resources/dispute.d.ts +50 -0
  29. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -0
  30. package/dist/declarations/src/types/resources/ipAccount.d.ts +25 -0
  31. package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -0
  32. package/dist/declarations/src/types/resources/ipAsset.d.ts +23 -63
  33. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  34. package/dist/declarations/src/types/resources/license.d.ts +56 -68
  35. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  36. package/dist/declarations/src/types/resources/permission.d.ts +14 -0
  37. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -0
  38. package/dist/declarations/src/types/resources/royalty.d.ts +58 -0
  39. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -0
  40. package/dist/story-protocol-core-sdk.cjs.d.ts +1 -1
  41. package/dist/story-protocol-core-sdk.cjs.dev.js +3347 -1332
  42. package/dist/story-protocol-core-sdk.cjs.prod.js +3347 -1332
  43. package/dist/story-protocol-core-sdk.esm.js +3339 -1327
  44. package/package.json +16 -13
  45. package/dist/declarations/src/abi/generated/CollectModule.d.ts +0 -70
  46. package/dist/declarations/src/abi/generated/CollectModule.d.ts.map +0 -1
  47. package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts +0 -73
  48. package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts.map +0 -1
  49. package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts +0 -94
  50. package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts.map +0 -1
  51. package/dist/declarations/src/abi/generated/LicensingModule.d.ts +0 -97
  52. package/dist/declarations/src/abi/generated/LicensingModule.d.ts.map +0 -1
  53. package/dist/declarations/src/abi/generated/RelationshipModule.d.ts +0 -116
  54. package/dist/declarations/src/abi/generated/RelationshipModule.d.ts.map +0 -1
  55. package/dist/declarations/src/abi/generated/common.d.ts +0 -22
  56. package/dist/declarations/src/abi/generated/common.d.ts.map +0 -1
  57. package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts +0 -52
  58. package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts.map +0 -1
  59. package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts +0 -58
  60. package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts.map +0 -1
  61. package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts +0 -112
  62. package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts.map +0 -1
  63. package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts +0 -88
  64. package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts.map +0 -1
  65. package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts +0 -175
  66. package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts.map +0 -1
  67. package/dist/declarations/src/abi/generated/factories/index.d.ts +0 -6
  68. package/dist/declarations/src/abi/generated/factories/index.d.ts.map +0 -1
  69. package/dist/declarations/src/abi/generated/index.d.ts +0 -12
  70. package/dist/declarations/src/abi/generated/index.d.ts.map +0 -1
  71. package/dist/declarations/src/enums/Environment.d.ts +0 -8
  72. package/dist/declarations/src/enums/Environment.d.ts.map +0 -1
  73. package/dist/declarations/src/enums/IPAssetType.d.ts +0 -12
  74. package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
  75. package/dist/declarations/src/enums/ResourceType.d.ts +0 -11
  76. package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
  77. package/dist/declarations/src/resources/collect.d.ts +0 -24
  78. package/dist/declarations/src/resources/collect.d.ts.map +0 -1
  79. package/dist/declarations/src/resources/franchise.d.ts +0 -41
  80. package/dist/declarations/src/resources/franchise.d.ts.map +0 -1
  81. package/dist/declarations/src/resources/relationship.d.ts +0 -48
  82. package/dist/declarations/src/resources/relationship.d.ts.map +0 -1
  83. package/dist/declarations/src/resources/transaction.d.ts +0 -25
  84. package/dist/declarations/src/resources/transaction.d.ts.map +0 -1
  85. package/dist/declarations/src/types/resources/collect.d.ts +0 -45
  86. package/dist/declarations/src/types/resources/collect.d.ts.map +0 -1
  87. package/dist/declarations/src/types/resources/franchise.d.ts +0 -71
  88. package/dist/declarations/src/types/resources/franchise.d.ts.map +0 -1
  89. package/dist/declarations/src/types/resources/relationship.d.ts +0 -83
  90. package/dist/declarations/src/types/resources/relationship.d.ts.map +0 -1
  91. package/dist/declarations/src/types/resources/transaction.d.ts +0 -40
  92. package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
  93. package/dist/story-protocol-core-sdk.cjs.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,76 +1,124 @@
1
- core-sdk is the base level sdk to interact with story protocol. It provides functions to both read and write data to the protocol.
1
+ # Story Protocol SDK
2
2
 
3
- ## Installation
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.
4
4
 
5
- Install the SDK and ethers.js
5
+ ## How to use Story Protocol SDK in Your Project
6
+
7
+ ### Install Story Protocol core SDK
8
+
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:
10
+
11
+ Use `npm`:
6
12
 
7
- npm
8
- ```shell
9
- npm i @story-protocol/core-sdk ethers@^5.7.2
10
- ```
11
- pnpm
12
- ```shell
13
- pnpm i @story-protocol/core-sdk ethers@^5.7.2
14
13
  ```
15
- yarn
16
- ```shell
17
- yarn add @story-protocol/core-sdk ethers@^5.7.2
14
+ npm install --save @story-protocol/core-sdk viem@1.21.4
18
15
  ```
19
16
 
20
- ## Set up `.env` file
17
+ Use `pnpm`:
18
+
19
+ ```
20
+ pnpm install @story-protocol/core-sdk viem@1.21.4
21
+ ```
21
22
 
22
- (Ask the team to provide the values)
23
+ Use `yarn`:
23
24
 
24
25
  ```
25
- NEXT_PUBLIC_API_BASE_URL =
26
- NEXT_PUBLIC_FRANCHISE_REGISTRY_CONTRACT =
27
- NEXT_PUBLIC_RELATIONSHIP_MODULE_CONTRACT =
28
- NEXT_PUBLIC_COLLECT_MODULE_CONTRACT =
29
- NEXT_PUBLIC_LICENSING_MODULE_CONTRACT =
26
+ yarn add @story-protocol/core-sdk viem@1.21.4
30
27
  ```
31
28
 
32
- ## Set up SDK client
33
- Using browser wallet
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
34
 
35
- ```typescript
36
- import { StoryClient } from "@story-protocol/core-sdk"
37
- import ethers from "ethers"
35
+ ## Set up your wallet
38
36
 
39
- // Signer from browser wallet (i.e Metamask)
40
- const provider = new ethers.providers.Web3Provider(window.ethereum);
41
- // request wallet permissions
42
- await provider.send("eth_requestAccounts", []);
43
- const signer = await provider.getSigner();
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:
44
38
 
45
- // Instantiate the Story Client
46
- const client = new StoryClient( { signer } )
39
+ > :information-source: Make sure to have WALLET_PRIVATE_KEY set up in your .env file.
47
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 `0x${string}`);
48
46
  ```
49
- Using private key
50
- ```typescript
51
- import { StoryClient } from "@story-protocol/core-sdk"
52
- import ethers from "ethers"
53
47
 
54
- // Signer from private key
55
- const provider = new ethers.providers.JsonRpcProvider(<YOUR RPC URL>)
56
- const signer = new ethers.Wallet(<YOUR PRIVATE KEY>, provider)
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 Sepolia network with `RPC_PROVIDER_URL=https://rpc.ankr.com/eth_sepolia`.
57
55
 
58
- // Instantiate the Story Client
59
- const client = new StoryClient( { signer } )
56
+ ```typescript index.ts
57
+ import { StoryClient, StoryConfig } from "@story-protocol/core-sdk";
60
58
 
59
+ const config: StoryConfig = {
60
+ transport: http(process.env.RPC_PROVIDER_URL),
61
+ account: account,
62
+ };
63
+ const client = StoryClient.newClient(config);
61
64
  ```
62
65
 
63
- ## Use SDK client
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 smart contract ABIs (Currently pulls from the protocol-contracts `dev` branch)
102
+
103
+ Must have `solc` installed (https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html)
104
+
105
+ - run `make compile_contracts`
106
+
107
+ ## Release
108
+
109
+ | Package | Description |
110
+ | :------------------------------ | :--------------------------------------------- |
111
+ | [core-sdk](./packages/core-sdk) | The core sdk for interacting with the protocol |
112
+
113
+ ## Contributing
114
+
115
+ Pull requests are welcome. For major changes, please open an issue first
116
+ to discuss what you would like to change. Details see: [CONTRIBUTING](/CONTRIBUTING.md)
117
+
118
+ Please make sure to update tests as appropriate.
64
119
 
65
- ```typescript
66
- // Create a new franchise
67
- const response = await client.franchise.create({
68
- franchiseName: "Alice in Wonderland",
69
- franchiseSymbol: "Wonderland",
70
- franchiseDescription: "Fantastical journey, curious girl, whimsical characters, dreamlike adventures.",
71
- })
120
+ ## License
72
121
 
73
- // List franchises
74
- const { data: franchise } = await client.franchise.list()
122
+ [MIT License](/LICENSE.md)
75
123
 
76
- ```
124
+ ## Contact Us
@@ -1,67 +1,75 @@
1
1
  import { StoryConfig } from "./types/config.js";
2
- import { FranchiseClient } from "./resources/franchise.js";
3
- import { LicenseClient } from "./resources/license.js";
4
- import { TransactionClient } from "./resources/transaction.js";
5
- import { RelationshipClient } from "./resources/relationship.js";
6
2
  import { IPAssetClient } from "./resources/ipAsset.js";
7
- import { CollectClient } from "./resources/collect.js";
3
+ import { PermissionClient } from "./resources/permission.js";
4
+ import { LicenseClient } from "./resources/license.js";
5
+ import { DisputeClient } from "./resources/dispute.js";
6
+ import { IPAccountClient } from "./resources/ipAccount.js";
7
+ import { RoyaltyClient } from "./resources/royalty.js";
8
8
  /**
9
9
  * The StoryClient is the main entry point for the SDK.
10
10
  */
11
11
  export declare class StoryClient {
12
12
  private readonly config;
13
- private readonly httpClient;
14
- private _franchise;
15
- private _relationship;
13
+ private readonly rpcClient;
14
+ private readonly wallet;
15
+ private readonly storyClient;
16
16
  private _ipAsset;
17
+ private _permission;
17
18
  private _license;
18
- private _transaction;
19
- private _collect;
19
+ private _dispute;
20
+ private _ipAccount;
21
+ private _royalty;
20
22
  /**
21
23
  * @param config - the configuration for the SDK client
22
24
  */
23
- constructor(config: StoryConfig);
25
+ private constructor();
24
26
  /**
25
- * Getter for the franchise client. The client is lazily created when
26
- * this method is called.
27
+ * Factory method for creating a SDK client with a signer.
27
28
  *
28
- * @returns the FranchiseClient instance
29
+ * @param config - the configuration for a new SDK client
29
30
  */
30
- get franchise(): FranchiseClient;
31
+ static newClient(config: StoryConfig): StoryClient;
31
32
  /**
32
- * Getter for the relationship client. The client is lazily created when
33
+ * Getter for the ip asset client. The client is lazily created when
33
34
  * this method is called.
34
35
  *
35
- * @returns the RelationshipClient instance
36
+ * @returns the IPAssetClient instance
36
37
  */
37
- get relationship(): RelationshipClient;
38
+ get ipAsset(): IPAssetClient;
38
39
  /**
39
- * Getter for the IP Asset client. The client is lazily created when
40
+ * Getter for the permission client. The client is lazily created when
40
41
  * this method is called.
41
42
  *
42
- * @returns the IpAssetClient instance
43
+ * @returns the PermissionClient instance
43
44
  */
44
- get ipAsset(): IPAssetClient;
45
+ get permission(): PermissionClient;
45
46
  /**
46
47
  * Getter for the license client. The client is lazily created when
47
48
  * this method is called.
48
49
  *
49
- * @returns the FranchiseClient instance
50
+ * @returns the LicenseClient instance
50
51
  */
51
52
  get license(): LicenseClient;
52
53
  /**
53
- * Getter for the transaction client. The client is lazily created when
54
+ * Getter for the dispute client. The client is lazily created when
55
+ * this method is called.
56
+ *
57
+ * @returns the DisputeClient instance
58
+ */
59
+ get dispute(): DisputeClient;
60
+ /**
61
+ * Getter for the ip account client. The client is lazily created when
54
62
  * this method is called.
55
63
  *
56
- * @returns the TransactionClient instance
64
+ * @returns the IPAccountClient instance
57
65
  */
58
- get transaction(): TransactionClient;
66
+ get ipAccount(): IPAccountClient;
59
67
  /**
60
- * Getter for the collect module client. The client is lazily created when
68
+ * Getter for the royalty client. The client is lazily created when
61
69
  * this method is called.
62
70
  *
63
- * @returns the CollectClient instance
71
+ * @returns the RoyaltyClient instance
64
72
  */
65
- get collect(): CollectClient;
73
+ get royalty(): RoyaltyClient;
66
74
  }
67
75
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"../../../src","sources":["client.ts"],"names":[],"mappings":"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O,EAAE,eAAe,EAAE,iCAA8B;AAGxD,OAAO,EAAE,aAAa,EAAE,+BAA4B;AAKpD;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IACtE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,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;;OAEG;IACH,OAAO;IAgCP;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAIlD;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,UAAU,IAAI,gBAAgB,CAMxC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAWlC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,SAAS,IAAI,eAAe,CAMtC;IACD;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;CACF"}
@@ -0,0 +1,9 @@
1
+ import { RoyaltyPolicy } from "../types/resources/royalty.js";
2
+ import { License } from "../types/resources/license.js";
3
+ export declare class StoryAPIClient {
4
+ private readonly httpClient;
5
+ constructor();
6
+ getRoyaltyPolicy(ipId: string): Promise<RoyaltyPolicy>;
7
+ getLicense(licenseId: string): Promise<License>;
8
+ }
9
+ //# sourceMappingURL=storyAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyAPI.d.ts","sourceRoot":"../../../../src/clients","sources":["storyAPI.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAA4B,sCAAmC;AACrF,OAAO,EAAE,OAAO,EAAsB,sCAAmC;AAEzE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;;IAY9B,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKtD,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAI7D"}
@@ -0,0 +1,4 @@
1
+ export declare const AddressZero = "0x0000000000000000000000000000000000000000";
2
+ export declare const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000";
3
+ export declare const SepoliaChainId = "11155111";
4
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/constants","sources":["common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,+CAA+C,CAAC;AAExE,eAAO,MAAM,QAAQ,uEAAuE,CAAC;AAE7F,eAAO,MAAM,cAAc,aAAa,CAAC"}
@@ -1,12 +1,15 @@
1
1
  export { StoryClient } from "./client.js";
2
- export { Environment } from "./enums/Environment.js";
3
- export { IPAssetType } from "./enums/IPAssetType.js";
4
- export { ResourceType } from "./enums/ResourceType.js";
2
+ export { AddressZero, HashZero } from "./constants/common.js";
3
+ export { IPAssetClient } from "./resources/ipAsset.js";
4
+ export { PermissionClient } from "./resources/permission.js";
5
+ export { LicenseClient } from "./resources/license.js";
6
+ export { DisputeClient } from "./resources/dispute.js";
5
7
  export type { StoryConfig } from "./types/config.js";
6
- export type { Franchise, GetFranchiseRequest, GetFranchiseResponse, CreateFranchiseRequest, CreateFranchiseResponse, ListFranchiseResponse, ConfigureFranchiseRequest, ConfigureFranchiseResponse, } from "./types/resources/franchise.js";
7
- export type { IPAsset, GetIpAssetRequest, GetIpAssetResponse, CreateIpAssetRequest, CreateIpAssetResponse, ListIpAssetRequest, ListIpAssetResponse, } from "./types/resources/ipAsset.js";
8
- export type { License, GetLicenseRequest, GetLicenseResponse, CreateLicenseRequest, CreateLicenseResponse, CreateLicenseRequestOptions, ListLicenseRequest, ListLicenseResponse, } from "./types/resources/license.js";
9
- export type { IPAssetId, RelationshipRelateRequest, RelationshipRelateResponse, RelationshipUnrelateRequest, RelationshipUnrelateResponse, RelationshipIsRelationshipExpiredRequest, RelationshipIsRelationshipExpiredResponse, RelationshipIsRelatedRequest, RelationshipIsRelatedResponse, } from "./types/resources/relationship.js";
10
- export type { Collection, CollectIPAssetRequest, CollectIPAssetResponse, ListCollectionsRequest, ListCollectionsResponse, } from "./types/resources/collect.js";
11
- export type { Transaction, GetTransactionRequest, GetTransactionResponse, ListTransactionResponse, } from "./types/resources/transaction.js";
8
+ export type { Hex, TypedData } from "./types/common.js";
9
+ export type { RegisterIpResponse, RegisterRequest, RegisterDerivativeResponse, RegisterDerivativeRequest, RegisterDerivativeWithLicenseTokensRequest, RegisterDerivativeWithLicenseTokensResponse, } from "./types/resources/ipAsset.js";
10
+ export type { MintLicenseTokensResponse, MintLicenseTokensRequest, RegisterCommercialUsePILRequest, RegisterLicenseTermsResponse, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, LicenseTermsIdResponse, } from "./types/resources/license.js";
11
+ export type { CollectRoyaltyTokensRequest, CollectRoyaltyTokensResponse, PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse, } from "./types/resources/royalty.js";
12
+ export type { SetPermissionsRequest, SetPermissionsResponse } from "./types/resources/permission.js";
13
+ export type { Dispute, RaiseDisputeRequest, RaiseDisputeResponse, SetDisputeJudgementRequest, SetDisputeJudgementResponse, CancelDisputeRequest, CancelDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, } from "./types/resources/dispute.js";
14
+ export type { IPAccountExecuteRequest, IPAccountExecuteResponse, IPAccountExecuteWithSigRequest, IPAccountExecuteWithSigResponse, } from "./types/resources/ipAccount.js";
12
15
  //# 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,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AAEpD,YAAY,EAAE,WAAW,EAAE,0BAAuB;AAElD,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,GAC3B,uCAAoC;AAErC,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,qCAAkC;AAEnC,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,qCAAkC;AAEnC,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,wCAAwC,EACxC,yCAAyC,EACzC,4BAA4B,EAC5B,6BAA6B,GAC9B,0CAAuC;AAExC,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GACxB,qCAAkC;AAEnC,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GACxB,yCAAsC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAiB;AACvC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,8BAA2B;AAE3D,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,gBAAgB,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