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

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 (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 +63 -0
  7. package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
  8. package/dist/declarations/src/resources/ipAsset.d.ts +3 -4
  9. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/license.d.ts +10 -0
  11. package/dist/declarations/src/resources/license.d.ts.map +1 -0
  12. package/dist/declarations/src/resources/permission.d.ts +3 -4
  13. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  14. package/dist/declarations/src/resources/policy.d.ts +16 -0
  15. package/dist/declarations/src/resources/policy.d.ts.map +1 -0
  16. package/dist/declarations/src/resources/tagging.d.ts +3 -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 +2 -23
  29. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
  30. package/dist/declarations/src/types/resources/policy.d.ts +33 -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 +2458 -1645
  35. package/dist/story-protocol-core-sdk.cjs.prod.js +2458 -1645
  36. package/dist/story-protocol-core-sdk.esm.js +2455 -1639
  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
package/README.md CHANGED
@@ -68,18 +68,3 @@ const signer = new ethers.Wallet(<YOUR PRIVATE KEY>, provider)
68
68
  const client = StoryClient.newClient({ signer })
69
69
 
70
70
  ```
71
-
72
- ## Use SDK client
73
-
74
- ```typescript
75
- // Create a new franchise
76
- const response = await client.franchise.create({
77
- franchiseName: "Alice in Wonderland",
78
- franchiseSymbol: "Wonderland",
79
- franchiseDescription:
80
- "Fantastical journey, curious girl, whimsical characters, dreamlike adventures.",
81
- });
82
-
83
- // List franchises
84
- const { data: franchise } = await client.franchise.list();
85
- ```
@@ -1,63 +1,54 @@
1
- import { StoryConfig, StoryReadOnlyConfig } from "./types/config.js";
2
- import { TransactionClient } from "./resources/transaction.js";
3
- import { TransactionReadOnlyClient } from "./resources/transactionReadOnly.js";
4
- import { Client, ReadOnlyClient } from "./types/client.js";
5
- import { PlatformClient } from "./utils/platform.js";
6
- import { ModuleReadOnlyClient } from "./resources/moduleReadOnly.js";
1
+ import { StoryConfig } from "./types/config.js";
7
2
  import { TaggingClient } from "./resources/tagging.js";
8
- import { TaggingReadOnlyClient } from "./resources/taggingReadOnly.js";
9
3
  import { IPAssetClient } from "./resources/ipAsset.js";
10
- import { IPAssetReadOnlyClient } from "./resources/ipAssetReadOnly.js";
11
4
  import { PermissionClient } from "./resources/permission.js";
12
- import { PermissionReadOnlyClient } from "./resources/permissionReadOnly.js";
5
+ import { LicenseClient } from "./resources/license.js";
6
+ import { PolicyClient } from "./resources/policy.js";
7
+ import { DisputeClient } from "./resources/dispute.js";
8
+ import { PlatformClient } from "./utils/platform.js";
13
9
  /**
14
10
  * The StoryClient is the main entry point for the SDK.
15
11
  */
16
12
  export declare class StoryClient {
17
13
  private readonly config;
18
- private readonly httpClient;
19
- private readonly isReadOnly;
20
14
  private readonly rpcClient;
21
- private readonly wallet?;
15
+ private readonly wallet;
16
+ private readonly httpClient;
22
17
  private _ipAccount;
23
18
  private _permission;
24
- private _transaction;
19
+ private _license;
20
+ private _policy;
25
21
  private _platform;
26
- private _module;
27
22
  private _tagging;
23
+ private _dispute;
28
24
  /**
29
25
  * @param config - the configuration for the SDK client
30
- * @param isReadOnly
31
26
  */
32
27
  private constructor();
33
- /**
34
- * Factory method for creating a read only SDK client.
35
- *
36
- * @param config - the configuration for a read only SDK client
37
- */
38
- static newReadOnlyClient(config: StoryReadOnlyConfig): ReadOnlyClient;
39
28
  /**
40
29
  * Factory method for creating a SDK client with a signer.
41
30
  *
42
- * @param config - the configuration for a new read/write SDK client
31
+ * @param config - the configuration for a new SDK client
43
32
  */
44
- static newClient(config: StoryConfig): Client;
45
- get ipAsset(): IPAssetClient | IPAssetReadOnlyClient;
46
- get permission(): PermissionClient | PermissionReadOnlyClient;
33
+ static newClient(config: StoryConfig): StoryClient;
34
+ get ipAsset(): IPAssetClient;
35
+ get permission(): PermissionClient;
36
+ get license(): LicenseClient;
37
+ get policy(): PolicyClient;
47
38
  /**
48
- * Getter for the transaction client. The client is lazily created when
39
+ * Getter for the tagging client. The client is lazily created when
49
40
  * this method is called.
50
41
  *
51
- * @returns the TransactionReadOnlyClient or TransactionClient instance
42
+ * @returns the TaggingClient instance
52
43
  */
53
- get transaction(): TransactionClient | TransactionReadOnlyClient;
44
+ get tagging(): TaggingClient;
54
45
  /**
55
- * Getter for the tagging client. The client is lazily created when
46
+ * Getter for the dispute client. The client is lazily created when
56
47
  * this method is called.
57
48
  *
58
- * @returns the TaggingReadOnlyClient or TaggingClient instance
49
+ * @returns the DisputeClient instance
59
50
  */
60
- get tagging(): TaggingClient | TaggingReadOnlyClient;
51
+ get dispute(): DisputeClient;
61
52
  /**
62
53
  * Getter for the platform client. The client is lazily created when
63
54
  * this method is called.
@@ -65,12 +56,5 @@ export declare class StoryClient {
65
56
  * @returns the PlatformClient instance
66
57
  */
67
58
  get platform(): PlatformClient;
68
- /**
69
- * Getter for the module client. The client is lazily created when
70
- * this method is called.
71
- *
72
- * @returns the Module instance
73
- */
74
- get module(): ModuleReadOnlyClient;
75
59
  }
76
60
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 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AAE,WAAW,GAAG,WAAW;IAIlD,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED,IAAW,UAAU,IAAI,gBAAgB,CAMxC;IAED,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED,IAAW,MAAM,IAAI,YAAY,CAMhC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAMlC;IAED;;;;;OAKG;IACH,IAAW,QAAQ,IAAI,cAAc,CAMpC;CACF"}
@@ -1,19 +1,18 @@
1
1
  export { StoryClient } from "./client.js";
2
- export { ResourceType } from "./enums/ResourceType.js";
3
- export { ActionType } from "./enums/ActionType.js";
4
- export { TransactionClient } from "./resources/transaction.js";
5
2
  export { PlatformClient } from "./utils/platform.js";
6
3
  export { AddressZero, HashZero } from "./constants/common.js";
7
- export { TaggingReadOnlyClient } from "./resources/taggingReadOnly.js";
8
- export { ModuleReadOnlyClient } from "./resources/moduleReadOnly.js";
9
4
  export { IPAssetClient } from "./resources/ipAsset.js";
10
- export { IPAssetReadOnlyClient } from "./resources/ipAssetReadOnly.js";
11
5
  export { PermissionClient } from "./resources/permission.js";
12
- export { PermissionReadOnlyClient } from "./resources/permissionReadOnly.js";
13
- export type { StoryConfig, StoryReadOnlyConfig } from "./types/config.js";
14
- export type { Client, ReadOnlyClient } from "./types/client.js";
6
+ export { LicenseClient } from "./resources/license.js";
7
+ export { PolicyClient } from "./resources/policy.js";
8
+ export { TaggingClient } from "./resources/tagging.js";
9
+ export { DisputeClient } from "./resources/dispute.js";
10
+ export type { StoryConfig } from "./types/config.js";
15
11
  export type { Hex, TypedData } from "./types/common.js";
16
- export type { Transaction, GetTransactionRequest, GetTransactionResponse, ListTransactionRequest, ListTransactionResponse, } from "./types/resources/transaction.js";
17
- export type { Tag, ListTagRequest, ListTagResponse } from "./types/resources/tagging.js";
18
- export type { Module, GetModuleRequest, GetModuleResponse, ListModuleRequest, ListModuleResponse, } from "./types/resources/module.js";
12
+ export type { RegisterRootIpRequest, RegisterRootIpResponse, RegisterDerivativeIpRequest, RegisterDerivativeIpResponse, } from "./types/resources/ipAsset.js";
13
+ export type { MintLicenseRequest, MintLicenseResponse, LinkIpToParentRequest, LinkIpToParentResponse, } from "./types/resources/license.js";
14
+ export type { RegisterUMLPolicyRequest, RegisterUMLPolicyResponse, AddPolicyToIpRequest, AddPolicyToIpResponse, } from "./types/resources/policy.js";
15
+ export type { setPermissionsRequest, setPermissionsResponse } from "./types/resources/permission.js";
16
+ export type { SetTagRequest, SetTagResponse, RemoveTagRequest, RemoveTagResponse, } from "./types/resources/tagging.js";
17
+ export type { Dispute, RaiseDisputeRequest, RaiseDisputeResponse, SetDisputeJudgementRequest, SetDisputeJudgementResponse, CancelDisputeRequest, CancelDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, } from "./types/resources/dispute.js";
19
18
  //# 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,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,iBAAiB,EAAE,mCAAgC;AAC5D,OAAO,EAAE,cAAc,EAAE,4BAAyB;AAClD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,8BAA2B;AAE3D,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,oBAAoB,EAAE,sCAAmC;AAClE,OAAO,EAAE,aAAa,EAAE,+BAA4B;AACpD,OAAO,EAAE,qBAAqB,EAAE,uCAAoC;AACpE,OAAO,EAAE,gBAAgB,EAAE,kCAA+B;AAC1D,OAAO,EAAE,wBAAwB,EAAE,0CAAuC;AAE1E,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,0BAAuB;AACvE,YAAY,EAAE,MAAM,E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AkC;AAEnC,YAAY,EACV,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GACvB,qCAAkC"}
@@ -0,0 +1,63 @@
1
+ import { PublicClient, WalletClient } from "viem";
2
+ import { CancelDisputeRequest, CancelDisputeResponse, RaiseDisputeRequest, RaiseDisputeResponse, ResolveDisputeRequest, ResolveDisputeResponse, SetDisputeJudgementRequest, SetDisputeJudgementResponse } from "../types/resources/dispute.js";
3
+ export declare class DisputeClient {
4
+ private readonly wallet;
5
+ private readonly rpcClient;
6
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
7
+ /**
8
+ * Initiates a dispute on an IP.
9
+ * @param request - The request object containing necessary data to raise a dispute.
10
+ * @param request.targetIpId - The IP ID that is the target of the dispute.
11
+ * @param request.arbitrationPolicy - The address of the arbitration policy.
12
+ * @param request.linkToDisputeEvidence - The link to the dispute evidence.
13
+ * @param request.targetTag - The target tag of the dispute.
14
+ * @param request.calldata - Optional calldata to initialize the policy.
15
+ * @param request.txOptions - Optional transaction options.
16
+ * @returns A Promise that resolves to a RaiseDisputeResponse containing the transaction hash.
17
+ * @throws `NotRegisteredIpId` if targetIpId is not registered in the IPA Registry.
18
+ * @throws `NotWhitelistedDisputeTag` if targetTag is not whitelisted.
19
+ * @throws `ZeroLinkToDisputeEvidence` if linkToDisputeEvidence is empty
20
+ * @calls raiseDispute(address _targetIpId, string memory _linkToDisputeEvidence, bytes32 _targetTag, bytes calldata _data) external nonReentrant returns (uint256) {
21
+ * @emits DisputeRaised (disputeId_, targetIpId, msg.sender, arbitrationPolicy, linkToDisputeEvidence, targetTag, calldata);
22
+ */
23
+ raiseDispute(request: RaiseDisputeRequest): Promise<RaiseDisputeResponse>;
24
+ /**
25
+ * Sets the judgement for an existing dispute.
26
+ * @param request The request object containing details for setting the dispute judgement.
27
+ * @param request.disputeId The ID of the dispute to be judged.
28
+ * @param request.decision The decision of the dispute.
29
+ * @param request.calldata Optional additional data for the dispute judgement.
30
+ * @returns A Promise that resolves to a SetDisputeJudgementResponse containing the transaction hash.
31
+ * @throws An error if the process of setting the judgement fails.
32
+ * @throws `NotInDisputeState` if the currentTag of the Dispute is not being disputed.
33
+ * @throws `NotWhitelistedArbitrationRelayer` if the transaction executor is not a whitelisted arbitration relayer contract.
34
+ * @throws error if the Dispute's ArbitrationPolicy contract is not valid.
35
+ * @calls setDisputeJudgement(uint256 _disputeId, bool _decision, bytes calldata _data) external nonReentrant {
36
+ * @emits DisputeJudgementSet (_disputeId, _decision, _data);
37
+ */
38
+ setDisputeJudgement(request: SetDisputeJudgementRequest): Promise<SetDisputeJudgementResponse>;
39
+ /**
40
+ * Cancels an existing dispute.
41
+ * @param request The request object containing details to cancel the dispute.
42
+ * @param request.disputeId The ID of the dispute to be cancelled.
43
+ * @param request.calldata Optional additional data used in the cancellation process.
44
+ * @returns A Promise that resolves to a CancelDisputeResponse containing the transaction hash.
45
+ * @throws NotInDisputeState, if the currentTag of the Dispute is not being disputed
46
+ * @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
47
+ * @throws error if the Dispute's ArbitrationPolicy contract is not valid
48
+ * @calls cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
49
+ * @emits DisputeCancelled (_disputeId, _data);
50
+ */
51
+ cancelDispute(request: CancelDisputeRequest): Promise<CancelDisputeResponse>;
52
+ /**
53
+ * Resolves an existing dispute after a judgement has been set.
54
+ * @param request The request object containing details to resolve the dispute.
55
+ * @param request.disputeId The ID of the dispute to be resolved.
56
+ * @returns A Promise that resolves to a ResolveDisputeResponse.
57
+ * @throws NotAbleToResolve, if currentTag is still in dispute (i.e still needs a judgement to be set)
58
+ * @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
59
+ * @emits DisputeResolved (_disputeId)
60
+ */
61
+ resolveDispute(request: ResolveDisputeRequest): Promise<ResolveDisputeResponse>;
62
+ }
63
+ //# sourceMappingURL=dispute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../src/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAe,MAAM,MAAM,CAAC;AAI/D,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC5B,sCAAmC;AAGpC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKzD;;;;;;;;;;;;;;;OAeG;IACU,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA+BtF;;;;;;;;;;;;;OAaG;IACU,mBAAmB,CAC9B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAwBvC;;;;;;;;;;;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,10 +1,9 @@
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
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
8
7
  /**
9
8
  * Register a root IP on Story Protocol based on the specified input asset data.
10
9
  *
@@ -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,sBAAsB,EACvB,sCAAmC;AAGpC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKzD;;;;;OAKG;IACU,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IA+B5F;;;;;OAKG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;CAmCzC"}
@@ -0,0 +1,10 @@
1
+ import { PublicClient, WalletClient } from "viem";
2
+ import { LinkIpToParentRequest, LinkIpToParentResponse, MintLicenseRequest, MintLicenseResponse } from "../types/resources/license.js";
3
+ export declare class LicenseClient {
4
+ private readonly wallet;
5
+ private readonly rpcClient;
6
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
7
+ mintLicense(request: MintLicenseRequest): Promise<MintLicenseResponse>;
8
+ linkIpToParent(request: LinkIpToParentRequest): Promise<LinkIpToParentResponse>;
9
+ }
10
+ //# sourceMappingURL=license.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkC,MAAM,MAAM,CAAC;AAKlF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACpB,sCAAmC;AAEpC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAK5C,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAwCtE,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAwC7F"}
@@ -1,10 +1,9 @@
1
- import { AxiosInstance } from "axios";
2
1
  import { PublicClient, WalletClient } from "viem";
3
2
  import { setPermissionsRequest, setPermissionsResponse } from "../types/resources/permission.js";
4
- import { PermissionReadOnlyClient } from "./permissionReadOnly.js";
5
- export declare class PermissionClient extends PermissionReadOnlyClient {
3
+ export declare class PermissionClient {
6
4
  private readonly wallet;
7
- constructor(httpClient: AxiosInstance, rpcClient: PublicClient, wallet: WalletClient);
5
+ private readonly rpcClient;
6
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
8
7
  /**
9
8
  * Set Permission based on the specified input
10
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"permission.d.ts","sourceRoot":"../../../../src/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAuC,MAAM,MAAM,CAAC;AAGvF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,yCAAsC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,gCAA6B;AAMhE,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKpF;;;;;OAKG;IACU,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CA6C5F"}
1
+ {"version":3,"file":"permission.d.ts","sourceRoot":"../../../../src/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAuC,MAAM,MAAM,CAAC;AAGvF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,yCAAsC;AAI9F,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKzD;;;;;OAKG;IACU,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CA2C5F"}
@@ -0,0 +1,16 @@
1
+ import { PublicClient, WalletClient } from "viem";
2
+ import { RegisterUMLPolicyRequest, RegisterUMLPolicyResponse, AddPolicyToIpRequest, AddPolicyToIpResponse } from "../types/resources/policy.js";
3
+ export declare class PolicyClient {
4
+ private readonly wallet;
5
+ private readonly rpcClient;
6
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
7
+ /**
8
+ * Create a policy on Story Protocol based on the specified params.
9
+ *
10
+ * @param request - the request object that contains all data needed to register a policy.
11
+ * @returns the response object that contains results from the policy creation.
12
+ */
13
+ registerUMLPolicy(request: RegisterUMLPolicyRequest): Promise<RegisterUMLPolicyResponse>;
14
+ addPolicyToIp(request: AddPolicyToIpRequest): Promise<AddPolicyToIpResponse>;
15
+ }
16
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"../../../../src/resources","sources":["policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAA+C,MAAM,MAAM,CAAC;AAS/F,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACtB,qCAAkC;AAEnC,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKzD;;;;;OAKG;IACU,iBAAiB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IA0CxB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAoC1F"}
@@ -1,10 +1,9 @@
1
- import { AxiosInstance } from "axios";
2
1
  import { PublicClient, WalletClient } from "viem";
3
- import { TaggingReadOnlyClient } from "./taggingReadOnly.js";
4
2
  import { RemoveTagRequest, RemoveTagResponse, SetTagRequest, SetTagResponse } from "../types/resources/tagging.js";
5
- export declare class TaggingClient extends TaggingReadOnlyClient {
3
+ export declare class TaggingClient {
6
4
  private readonly wallet;
7
- constructor(httpClient: AxiosInstance, rpcClient: PublicClient, wallet: WalletClient);
5
+ private readonly rpcClient;
6
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
8
7
  setTag(request: SetTagRequest): Promise<SetTagResponse>;
9
8
  removeTag(request: RemoveTagRequest): Promise<RemoveTagResponse>;
10
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tagging.d.ts","sourceRoot":"../../../../src/resources","sources":["tagging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD,OAAO,EAAE,qBAAqB,EAAE,6BAA0B;AAC1D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,sCAAmC;AAEpC,qBAAa,aAAc,SAAQ,qBAAqB;IACtD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAKvE,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAgBvD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAe9E"}
1
+ {"version":3,"file":"tagging.d.ts","sourceRoot":"../../../../src/resources","sources":["tagging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,sCAAmC;AAGpC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;gBAE7B,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY;IAK5C,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAoBvD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAmB9E"}
@@ -1,19 +1,18 @@
1
- import { Account, Chain, Transport } from "viem";
1
+ import { Account, Transport } from "viem";
2
2
  /**
3
- * Configuration for the SDK Client.
3
+ * Supported chains. For convenience, both name or chain ID are supported.
4
4
  *
5
5
  * @public
6
6
  */
7
- export interface StoryConfig extends StoryReadOnlyConfig {
8
- readonly account: Account;
9
- }
7
+ export type SupportedChainIds = "11155111" | "sepolia" | "1" | "mainnet" | "80001" | "mumbai" | "polygonMumbai";
10
8
  /**
11
- * Configuration for the read-only SDK Client.
9
+ * Configuration for the SDK Client.
12
10
  *
13
11
  * @public
14
12
  */
15
- export interface StoryReadOnlyConfig {
16
- readonly chain?: Chain;
17
- readonly transport?: Transport;
13
+ export interface StoryConfig {
14
+ readonly account: Account;
15
+ readonly chainId?: SupportedChainIds;
16
+ readonly transport: Transport;
18
17
  }
19
18
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;CAChC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,SAAS,GACT,GAAG,GACH,SAAS,GACT,OAAO,GACP,QAAQ,GACR,eAAe,CAAC;AAEpB;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B"}
@@ -3,10 +3,4 @@ export type TxOptions = {
3
3
  gasPrice?: bigint;
4
4
  numBlockConfirmations?: number;
5
5
  };
6
- export type QueryOptions = {
7
- pagination?: {
8
- offset?: number;
9
- limit?: number;
10
- };
11
- };
12
6
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"../../../../src/types","sources":["options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"../../../../src/types","sources":["options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { TxOptions } from "../options.js";
2
+ export type Dispute = {
3
+ targetIpId: `0x${string}`;
4
+ disputeInitiator: `0x${string}`;
5
+ arbitrationPolicy: `0x${string}`;
6
+ linkToDisputeEvidence: string;
7
+ targetTag: string;
8
+ currentTag: string;
9
+ };
10
+ export type RaiseDisputeRequest = {
11
+ targetIpId: `0x${string}`;
12
+ arbitrationPolicy: `0x${string}`;
13
+ linkToDisputeEvidence: string;
14
+ targetTag: string;
15
+ calldata?: `0x${string}`;
16
+ txOptions?: TxOptions;
17
+ };
18
+ export type RaiseDisputeResponse = {
19
+ txHash: string;
20
+ disputeId?: `0x${string}`;
21
+ arbitrationPolicy?: `0x${string}`;
22
+ };
23
+ export type SetDisputeJudgementRequest = {
24
+ disputeId: number;
25
+ decision: boolean;
26
+ calldata?: `0x${string}`;
27
+ txOptions?: TxOptions;
28
+ };
29
+ export type SetDisputeJudgementResponse = {
30
+ txHash: string;
31
+ disputeId?: bigint;
32
+ decision?: boolean;
33
+ data?: `0x${string}`;
34
+ };
35
+ export type CancelDisputeRequest = {
36
+ disputeId: number | string | bigint;
37
+ calldata?: `0x${string}`;
38
+ txOptions?: TxOptions;
39
+ };
40
+ export type CancelDisputeResponse = {
41
+ txHash: string;
42
+ };
43
+ export type ResolveDisputeRequest = {
44
+ disputeId: number | string | bigint;
45
+ txOptions?: TxOptions;
46
+ };
47
+ export type ResolveDisputeResponse = {
48
+ txHash: string;
49
+ };
50
+ //# sourceMappingURL=dispute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispute.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["dispute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,iBAAiB,EAAE,KAAK,MAAM,EAAE,CAAC;IACjC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MA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MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1,144 +1,29 @@
1
- import { QueryOptions, TxOptions } from "../options.js";
2
- /**
3
- * Core data model for IP Org.
4
- *
5
- * @public
6
- */
7
- export type IPOrg = {
8
- id: string;
9
- name: string;
10
- symbol: string;
11
- owner: string;
12
- baseUri?: string;
13
- contractUri?: string;
14
- ipAssetTypes: Array<string>;
15
- createdAt: string;
16
- txHash: string;
17
- };
18
- /**
19
- * Request type for iporg.get method.
20
- *
21
- * @public
22
- */
23
- export type GetIPOrgRequest = {
24
- ipOrgId: string;
25
- };
26
- /**
27
- * Response type for iporg.get method.
28
- *
29
- * @public
30
- */
31
- export type GetIPOrgResponse = {
32
- ipOrg: IPOrg;
33
- };
34
- /**
35
- * Request type for iporg.create method.
36
- *
37
- * @public
38
- */
39
- export type CreateIPOrgRequest = {
40
- name: string;
41
- symbol: string;
42
- owner?: string;
43
- ipAssetTypes: Array<string>;
44
- txOptions?: TxOptions;
45
- };
46
- /**
47
- * Response type for iporg.create method.
48
- *
49
- * @public
50
- */
51
- export type CreateIPOrgResponse = {
52
- txHash: string;
53
- ipOrgId?: string;
54
- };
55
- /**
56
- * Request type for iporg.list method.
57
- *
58
- * @public
59
- */
60
- export type ListIPOrgRequest = {
61
- options?: QueryOptions;
62
- };
63
- /**
64
- * Response type for iporg.list method.
65
- *
66
- * @public
67
- */
68
- export type ListIPOrgResponse = {
69
- ipOrgs: IPOrg[];
70
- };
71
- export type IpAsset = {
72
- id: string;
73
- ipId: string;
74
- chainId: number;
75
- tokenContract: string;
76
- tokenId: number;
77
- metadataResolverAddress: string;
78
- };
79
- export type GetIpAssetRequest = {
80
- ipId: string;
81
- };
82
- export type GetIpAssetResponse = {
83
- data: IpAsset;
84
- };
85
- export type ListIpAssetRequest = {
86
- options?: QueryOptions;
87
- };
88
- export type ListIpAssetResponse = {
89
- data: IpAsset[];
90
- };
91
- export type RegisterIpAssetRequest = {
92
- chainId: string;
93
- tokenContractAddress: string;
94
- tokenId: string;
95
- txOptions?: TxOptions;
96
- };
97
- export type RegisterIpAssetResponse = {
98
- txHash: string;
99
- ipAccountId?: string;
100
- };
1
+ import { TxOptions } from "../options.js";
101
2
  export type RegisterRootIpRequest = {
102
3
  policyId: string;
103
4
  tokenContractAddress: string;
104
5
  tokenId: string;
6
+ ipName?: string;
7
+ contentHash?: `0x${string}`;
8
+ uri?: string;
105
9
  txOptions?: TxOptions;
106
10
  };
107
11
  export type RegisterRootIpResponse = {
108
12
  txHash: string;
109
- ipAccountId?: string;
13
+ ipId?: string;
110
14
  };
111
15
  export type RegisterDerivativeIpRequest = {
112
- licenseId: string;
16
+ licenseIds: string[];
113
17
  tokenContractAddress: string;
114
18
  tokenId: string;
115
- ipName: string;
116
- ipDescription: string;
117
- hash: string;
19
+ ipName?: string;
20
+ contentHash?: `0x${string}`;
21
+ uri?: string;
22
+ minRoyalty?: number;
118
23
  txOptions?: TxOptions;
119
24
  };
120
25
  export type RegisterDerivativeIpResponse = {
121
26
  txHash: string;
122
- ipAccountId?: string;
123
- };
124
- export type addPolicyRequest = {
125
- frameworkId: string;
126
- mintingParamValues: string[];
127
- activationParamValues: string[];
128
- needsActivation: boolean;
129
- linkParentParamValues: string[];
130
- txOptions?: TxOptions;
131
- };
132
- export type addPolicyToIpRequest = {
133
- ipId: string;
134
- policyId: string;
135
- };
136
- export type addPolicyResponse = {
137
- txHash: string;
138
- policyId?: number;
139
- isNew?: boolean;
140
- };
141
- export type addPolicyToIpResponse = {
142
- indexOnIpId: number;
27
+ ipId?: string;
143
28
  };
144
29
  //# sourceMappingURL=ipAsset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAmB;AAErD;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EA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