@story-protocol/core-sdk 0.0.1-beta-test.1 → 0.0.1-beta-rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/README.md +0 -15
  2. package/dist/declarations/src/client.d.ts +22 -38
  3. package/dist/declarations/src/client.d.ts.map +1 -1
  4. package/dist/declarations/src/index.d.ts +11 -12
  5. package/dist/declarations/src/index.d.ts.map +1 -1
  6. package/dist/declarations/src/resources/dispute.d.ts +835 -0
  7. package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
  8. package/dist/declarations/src/resources/ipAsset.d.ts +145 -12
  9. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/license.d.ts +1014 -0
  11. package/dist/declarations/src/resources/license.d.ts.map +1 -0
  12. package/dist/declarations/src/resources/permission.d.ts +1478 -8
  13. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  14. package/dist/declarations/src/resources/policy.d.ts +1063 -0
  15. package/dist/declarations/src/resources/policy.d.ts.map +1 -0
  16. package/dist/declarations/src/resources/tagging.d.ts +711 -4
  17. package/dist/declarations/src/resources/tagging.d.ts.map +1 -1
  18. package/dist/declarations/src/types/config.d.ts +8 -9
  19. package/dist/declarations/src/types/config.d.ts.map +1 -1
  20. package/dist/declarations/src/types/options.d.ts +0 -6
  21. package/dist/declarations/src/types/options.d.ts.map +1 -1
  22. package/dist/declarations/src/types/resources/dispute.d.ts +50 -0
  23. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -0
  24. package/dist/declarations/src/types/resources/ipAsset.d.ts +11 -126
  25. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  26. package/dist/declarations/src/types/resources/license.d.ts +23 -0
  27. package/dist/declarations/src/types/resources/license.d.ts.map +1 -0
  28. package/dist/declarations/src/types/resources/permission.d.ts +5 -26
  29. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
  30. package/dist/declarations/src/types/resources/policy.d.ts +35 -0
  31. package/dist/declarations/src/types/resources/policy.d.ts.map +1 -0
  32. package/dist/declarations/src/types/resources/tagging.d.ts +1 -13
  33. package/dist/declarations/src/types/resources/tagging.d.ts.map +1 -1
  34. package/dist/story-protocol-core-sdk.cjs.dev.js +2492 -1617
  35. package/dist/story-protocol-core-sdk.cjs.prod.js +2492 -1617
  36. package/dist/story-protocol-core-sdk.esm.js +2490 -1612
  37. package/package.json +5 -5
  38. package/dist/declarations/src/enums/ActionType.d.ts +0 -11
  39. package/dist/declarations/src/enums/ActionType.d.ts.map +0 -1
  40. package/dist/declarations/src/enums/ResourceType.d.ts +0 -15
  41. package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
  42. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +0 -26
  43. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts.map +0 -1
  44. package/dist/declarations/src/resources/moduleReadOnly.d.ts +0 -25
  45. package/dist/declarations/src/resources/moduleReadOnly.d.ts.map +0 -1
  46. package/dist/declarations/src/resources/permissionReadOnly.d.ts +0 -25
  47. package/dist/declarations/src/resources/permissionReadOnly.d.ts.map +0 -1
  48. package/dist/declarations/src/resources/taggingReadOnly.d.ts +0 -24
  49. package/dist/declarations/src/resources/taggingReadOnly.d.ts.map +0 -1
  50. package/dist/declarations/src/resources/transaction.d.ts +0 -11
  51. package/dist/declarations/src/resources/transaction.d.ts.map +0 -1
  52. package/dist/declarations/src/resources/transactionReadOnly.d.ts +0 -25
  53. package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +0 -1
  54. package/dist/declarations/src/types/client.d.ts +0 -23
  55. package/dist/declarations/src/types/client.d.ts.map +0 -1
  56. package/dist/declarations/src/types/resources/module.d.ts +0 -43
  57. package/dist/declarations/src/types/resources/module.d.ts.map +0 -1
  58. package/dist/declarations/src/types/resources/transaction.d.ts +0 -52
  59. package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../src/resources","sources":["dispute.ts"],"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;;;;;;;;;;;;;;;;MAAuB;gBAErC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKzD;;;;;;;;;;;;;;;OAeG;IACU,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA+BtF;;;;;;;;;;;OAWG;IACU,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAoBzF;;;;;;;;OAQG;IACU,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAmB7F"}
@@ -1,22 +1,155 @@
1
- import { AxiosInstance } from "axios";
2
1
  import { PublicClient, WalletClient } from "viem";
3
- import { IPAssetReadOnlyClient } from "./ipAssetReadOnly.js";
4
2
  import { RegisterDerivativeIpRequest, RegisterDerivativeIpResponse, RegisterRootIpRequest, RegisterRootIpResponse } from "../types/resources/ipAsset.js";
5
- export declare class IPAssetClient extends IPAssetReadOnlyClient {
3
+ export declare class IPAssetClient {
6
4
  private readonly wallet;
7
- constructor(httpClient: AxiosInstance, rpcClient: PublicClient, wallet: WalletClient);
5
+ private readonly rpcClient;
6
+ ipAssetRegistryConfig: {
7
+ abi: readonly [{
8
+ readonly anonymous: false;
9
+ readonly inputs: readonly [{
10
+ readonly indexed: false;
11
+ readonly internalType: "address";
12
+ readonly name: "ipId";
13
+ readonly type: "address";
14
+ }, {
15
+ readonly indexed: true;
16
+ readonly internalType: "uint256";
17
+ readonly name: "chainId";
18
+ readonly type: "uint256";
19
+ }, {
20
+ readonly indexed: true;
21
+ readonly internalType: "address";
22
+ readonly name: "tokenContract";
23
+ readonly type: "address";
24
+ }, {
25
+ readonly indexed: true;
26
+ readonly internalType: "uint256";
27
+ readonly name: "tokenId";
28
+ readonly type: "uint256";
29
+ }, {
30
+ readonly indexed: false;
31
+ readonly internalType: "address";
32
+ readonly name: "resolver";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly indexed: false;
36
+ readonly internalType: "address";
37
+ readonly name: "provider";
38
+ readonly type: "address";
39
+ }, {
40
+ readonly indexed: false;
41
+ readonly internalType: "bytes";
42
+ readonly name: "metadata";
43
+ readonly type: "bytes";
44
+ }];
45
+ readonly name: "IPRegistered";
46
+ readonly type: "event";
47
+ }];
48
+ address: `0x${string}`;
49
+ };
50
+ registrationModuleConfig: {
51
+ abi: readonly [{
52
+ readonly inputs: readonly [{
53
+ readonly internalType: "uint256[]";
54
+ readonly name: "licenseIds";
55
+ readonly type: "uint256[]";
56
+ }, {
57
+ readonly internalType: "address";
58
+ readonly name: "tokenContract";
59
+ readonly type: "address";
60
+ }, {
61
+ readonly internalType: "uint256";
62
+ readonly name: "tokenId";
63
+ readonly type: "uint256";
64
+ }, {
65
+ readonly internalType: "string";
66
+ readonly name: "ipName";
67
+ readonly type: "string";
68
+ }, {
69
+ readonly internalType: "bytes32";
70
+ readonly name: "contentHash";
71
+ readonly type: "bytes32";
72
+ }, {
73
+ readonly internalType: "string";
74
+ readonly name: "externalURL";
75
+ readonly type: "string";
76
+ }, {
77
+ readonly internalType: "bytes";
78
+ readonly name: "royaltyContext";
79
+ readonly type: "bytes";
80
+ }];
81
+ readonly name: "registerDerivativeIp";
82
+ readonly outputs: readonly [];
83
+ readonly stateMutability: "nonpayable";
84
+ readonly type: "function";
85
+ }, {
86
+ readonly inputs: readonly [{
87
+ readonly internalType: "uint256";
88
+ readonly name: "policyId";
89
+ readonly type: "uint256";
90
+ }, {
91
+ readonly internalType: "address";
92
+ readonly name: "tokenContract";
93
+ readonly type: "address";
94
+ }, {
95
+ readonly internalType: "uint256";
96
+ readonly name: "tokenId";
97
+ readonly type: "uint256";
98
+ }, {
99
+ readonly internalType: "string";
100
+ readonly name: "ipName";
101
+ readonly type: "string";
102
+ }, {
103
+ readonly internalType: "bytes32";
104
+ readonly name: "contentHash";
105
+ readonly type: "bytes32";
106
+ }, {
107
+ readonly internalType: "string";
108
+ readonly name: "externalURL";
109
+ readonly type: "string";
110
+ }];
111
+ readonly name: "registerRootIp";
112
+ readonly outputs: readonly [{
113
+ readonly internalType: "address";
114
+ readonly name: "";
115
+ readonly type: "address";
116
+ }];
117
+ readonly stateMutability: "nonpayable";
118
+ readonly type: "function";
119
+ }];
120
+ address: `0x${string}`;
121
+ };
122
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
8
123
  /**
9
- * Register a root IP on Story Protocol based on the specified input asset data.
10
- *
11
- * @param request - the request object that contains all data needed to register a root IP.
12
- * @returns the response object that contains results from the IP creation.
124
+ * Registers a root-level IP into the protocol. Root-level IPs can be thought of as organizational hubs
125
+ * for encapsulating policies that actual IPs can use to register through. As such, a root-level IP is not an
126
+ * actual IP, but a container for IP policy management for their child IP assets.
127
+ * @param request The request object that contains all data needed to register a root IP.
128
+ * @param request.policyId The policy that identifies the licensing terms of the IP.
129
+ * @param request.tokenContract The address of the NFT bound to the root-level IP.
130
+ * @param request.tokenId The token id of the NFT bound to the root-level IP.
131
+ * @param request.ipName [Optional] The name assigned to the new IP.
132
+ * @param request.contentHash [Optional] The content hash of the IP being registered.
133
+ * @param request.uri [Optional] An external URI to link to the IP.
134
+ * @param request.txOptions [Optional] The transaction options.
135
+ * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
136
+ * @emits RootIPRegistered (msg.sender, ipId, policyId)
13
137
  */
14
138
  registerRootIp(request: RegisterRootIpRequest): Promise<RegisterRootIpResponse>;
15
139
  /**
16
- * Register a derivative IP on Story Protocol based on the specified input asset data.
17
- *
18
- * @param request - the request object that contains all data needed to register a derivative IP.
19
- * @returns the response object that contains results from the IP creation.
140
+ * Registers derivative IPs into the protocol. Derivative IPs are IP assets that inherit policies from
141
+ * parent IPs by burning acquired license NFTs.
142
+ * @param request The request object that contains all data needed to register a root IP.
143
+ * @param request.licenseIds The policy that identifies the licensing terms of the IP.
144
+ * @param request.tokenContract The address of the NFT bound to the derivative IP.
145
+ * @param request.tokenId The token id of the NFT bound to the derivative IP.
146
+ * @param request.ipName [Optional] The name assigned to the new IP.
147
+ * @param request.contentHash [Optional] The content hash of the IP being registered.
148
+ * @param request.uri [Optional] An external URI to link to the IP.
149
+ * @param request.minRoyalty [Optional] The minimum royalty percentage that the IP owner will receive.
150
+ * @param request.txOptions [Optional] The transaction options.
151
+ * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
152
+ * @emits RootIPRegistered (msg.sender, ipId, policyId)
20
153
  */
21
154
  registerDerivativeIp(request: RegisterDerivativeIpRequest): Promise<RegisterDerivativeIpResponse>;
22
155
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,6BAA0B;AAG1D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACvB,sCAAmC;AAIpC,qBAAa,aAAc,SAAQ,qBAAqB;IACtD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKpF;;;;;OAKG;IACU,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IA4B5F;;;;;OAKG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;CAmEzC"}
1
+ {"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AAK9D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB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