@story-protocol/core-sdk 0.1.0-rc.7 → 1.0.0-rc.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/README.md +94 -55
  2. package/dist/declarations/src/abi/generated.d.ts +23328 -0
  3. package/dist/declarations/src/abi/generated.d.ts.map +1 -0
  4. package/dist/declarations/src/client.d.ts +50 -49
  5. package/dist/declarations/src/client.d.ts.map +1 -1
  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 +16 -10
  9. package/dist/declarations/src/index.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/dispute.d.ts +50 -0
  11. package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
  12. package/dist/declarations/src/resources/ipAccount.d.ts +29 -0
  13. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -0
  14. package/dist/declarations/src/resources/ipAsset.d.ts +92 -20
  15. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  16. package/dist/declarations/src/resources/license.d.ts +83 -18
  17. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  18. package/dist/declarations/src/resources/nftClient.d.ts +24 -0
  19. package/dist/declarations/src/resources/nftClient.d.ts.map +1 -0
  20. package/dist/declarations/src/resources/permission.d.ts +30 -0
  21. package/dist/declarations/src/resources/permission.d.ts.map +1 -0
  22. package/dist/declarations/src/resources/royalty.d.ts +73 -0
  23. package/dist/declarations/src/resources/royalty.d.ts.map +1 -0
  24. package/dist/declarations/src/types/common.d.ts +5 -0
  25. package/dist/declarations/src/types/common.d.ts.map +1 -0
  26. package/dist/declarations/src/types/config.d.ts +27 -12
  27. package/dist/declarations/src/types/config.d.ts.map +1 -1
  28. package/dist/declarations/src/types/options.d.ts +10 -0
  29. package/dist/declarations/src/types/options.d.ts.map +1 -0
  30. package/dist/declarations/src/types/resources/dispute.d.ts +52 -0
  31. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -0
  32. package/dist/declarations/src/types/resources/ipAccount.d.ts +26 -0
  33. package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -0
  34. package/dist/declarations/src/types/resources/ipAsset.d.ts +62 -63
  35. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  36. package/dist/declarations/src/types/resources/license.d.ts +62 -68
  37. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  38. package/dist/declarations/src/types/resources/nftClient.d.ts +21 -0
  39. package/dist/declarations/src/types/resources/nftClient.d.ts.map +1 -0
  40. package/dist/declarations/src/types/resources/permission.d.ts +14 -0
  41. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -0
  42. package/dist/declarations/src/types/resources/royalty.d.ts +72 -0
  43. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -0
  44. package/dist/story-protocol-core-sdk.cjs.d.ts +1 -1
  45. package/dist/story-protocol-core-sdk.cjs.dev.js +16636 -1651
  46. package/dist/story-protocol-core-sdk.cjs.prod.js +16636 -1651
  47. package/dist/story-protocol-core-sdk.esm.js +16631 -1647
  48. package/package.json +16 -13
  49. package/dist/declarations/src/abi/generated/CollectModule.d.ts +0 -80
  50. package/dist/declarations/src/abi/generated/CollectModule.d.ts.map +0 -1
  51. package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts +0 -78
  52. package/dist/declarations/src/abi/generated/FranchiseRegistry.d.ts.map +0 -1
  53. package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts +0 -94
  54. package/dist/declarations/src/abi/generated/IpAssetRegistry.d.ts.map +0 -1
  55. package/dist/declarations/src/abi/generated/LicensingModule.d.ts +0 -97
  56. package/dist/declarations/src/abi/generated/LicensingModule.d.ts.map +0 -1
  57. package/dist/declarations/src/abi/generated/RelationshipModule.d.ts +0 -116
  58. package/dist/declarations/src/abi/generated/RelationshipModule.d.ts.map +0 -1
  59. package/dist/declarations/src/abi/generated/common.d.ts +0 -22
  60. package/dist/declarations/src/abi/generated/common.d.ts.map +0 -1
  61. package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts +0 -52
  62. package/dist/declarations/src/abi/generated/factories/CollectModule__factory.d.ts.map +0 -1
  63. package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts +0 -58
  64. package/dist/declarations/src/abi/generated/factories/FranchiseRegistry__factory.d.ts.map +0 -1
  65. package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts +0 -112
  66. package/dist/declarations/src/abi/generated/factories/IpAssetRegistry__factory.d.ts.map +0 -1
  67. package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts +0 -88
  68. package/dist/declarations/src/abi/generated/factories/LicensingModule__factory.d.ts.map +0 -1
  69. package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts +0 -175
  70. package/dist/declarations/src/abi/generated/factories/RelationshipModule__factory.d.ts.map +0 -1
  71. package/dist/declarations/src/abi/generated/factories/index.d.ts +0 -6
  72. package/dist/declarations/src/abi/generated/factories/index.d.ts.map +0 -1
  73. package/dist/declarations/src/abi/generated/index.d.ts +0 -12
  74. package/dist/declarations/src/abi/generated/index.d.ts.map +0 -1
  75. package/dist/declarations/src/enums/Environment.d.ts +0 -8
  76. package/dist/declarations/src/enums/Environment.d.ts.map +0 -1
  77. package/dist/declarations/src/enums/IPAssetType.d.ts +0 -12
  78. package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
  79. package/dist/declarations/src/enums/ResourceType.d.ts +0 -11
  80. package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
  81. package/dist/declarations/src/resources/collect.d.ts +0 -17
  82. package/dist/declarations/src/resources/collect.d.ts.map +0 -1
  83. package/dist/declarations/src/resources/collectReadOnly.d.ts +0 -15
  84. package/dist/declarations/src/resources/collectReadOnly.d.ts.map +0 -1
  85. package/dist/declarations/src/resources/franchise.d.ts +0 -26
  86. package/dist/declarations/src/resources/franchise.d.ts.map +0 -1
  87. package/dist/declarations/src/resources/franchiseReadOnly.d.ts +0 -27
  88. package/dist/declarations/src/resources/franchiseReadOnly.d.ts.map +0 -1
  89. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +0 -25
  90. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts.map +0 -1
  91. package/dist/declarations/src/resources/licenseReadOnly.d.ts +0 -27
  92. package/dist/declarations/src/resources/licenseReadOnly.d.ts.map +0 -1
  93. package/dist/declarations/src/resources/relationship.d.ts +0 -47
  94. package/dist/declarations/src/resources/relationship.d.ts.map +0 -1
  95. package/dist/declarations/src/resources/relationshipReadOnly.d.ts +0 -16
  96. package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +0 -1
  97. package/dist/declarations/src/resources/transaction.d.ts +0 -10
  98. package/dist/declarations/src/resources/transaction.d.ts.map +0 -1
  99. package/dist/declarations/src/resources/transactionReadOnly.d.ts +0 -25
  100. package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +0 -1
  101. package/dist/declarations/src/types/client.d.ts +0 -29
  102. package/dist/declarations/src/types/client.d.ts.map +0 -1
  103. package/dist/declarations/src/types/resources/collect.d.ts +0 -45
  104. package/dist/declarations/src/types/resources/collect.d.ts.map +0 -1
  105. package/dist/declarations/src/types/resources/franchise.d.ts +0 -71
  106. package/dist/declarations/src/types/resources/franchise.d.ts.map +0 -1
  107. package/dist/declarations/src/types/resources/relationship.d.ts +0 -83
  108. package/dist/declarations/src/types/resources/relationship.d.ts.map +0 -1
  109. package/dist/declarations/src/types/resources/transaction.d.ts +0 -40
  110. package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
  111. package/dist/story-protocol-core-sdk.cjs.d.ts.map +0 -1
@@ -1,22 +1,87 @@
1
- import { AxiosInstance } from "axios";
2
- import { Signer } from "ethers";
3
- import { CreateLicenseRequest, CreateLicenseResponse } from "../types/resources/license.js";
4
- import { FranchiseRegistry } from "../abi/generated/index.js";
5
- import { LicenseReadOnlyClient } from "./licenseReadOnly.js";
6
- /**
7
- * A class representing License operations.
8
- *
9
- * @public
10
- */
11
- export declare class LicenseClient extends LicenseReadOnlyClient {
12
- private readonly signer;
13
- constructor(httpClient: AxiosInstance, signer: Signer, franchiseRegistry: FranchiseRegistry);
1
+ import { PublicClient } from "viem";
2
+ import { IpAssetRegistryClient, LicenseRegistryEventClient, LicenseRegistryReadOnlyClient, LicensingModuleClient, PiLicenseTemplateClient, PiLicenseTemplateGetLicenseTermsResponse, PiLicenseTemplateReadOnlyClient, RoyaltyPolicyLapClient, SimpleWalletClient } from "../abi/generated.js";
3
+ import { RegisterNonComSocialRemixingPILRequest, RegisterPILResponse, RegisterCommercialUsePILRequest, RegisterCommercialRemixPILRequest, AttachLicenseTermsRequest, MintLicenseTokensRequest, MintLicenseTokensResponse } from "../types/resources/license.js";
4
+ export declare class LicenseClient {
5
+ licenseRegistryClient: LicenseRegistryEventClient;
6
+ licensingModuleClient: LicensingModuleClient;
7
+ ipAssetRegistryClient: IpAssetRegistryClient;
8
+ piLicenseTemplateReadOnlyClient: PiLicenseTemplateReadOnlyClient;
9
+ licenseTemplateClient: PiLicenseTemplateClient;
10
+ royaltyPolicyLAPClient: RoyaltyPolicyLapClient;
11
+ licenseRegistryReadOnlyClient: LicenseRegistryReadOnlyClient;
12
+ private readonly rpcClient;
13
+ private readonly wallet;
14
+ constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
14
15
  /**
15
- * Create a license within the Story Protocol based on the specified input data.
16
- *
17
- * @param request - An object containing the necessary data to create a license.
18
- * @returns A response object containing the result of the create license action, including the transaction hash.
16
+ * Convenient function to register a PIL non commercial social remix license to the registry
17
+ * @param request - [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
18
+ * @param request.txOptions [Optional] The transaction options.
19
+ * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
20
+ * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
19
21
  */
20
- create(request: CreateLicenseRequest): Promise<CreateLicenseResponse>;
22
+ registerNonComSocialRemixingPIL(request?: RegisterNonComSocialRemixingPILRequest): Promise<RegisterPILResponse>;
23
+ /**
24
+ * Convenient function to register a PIL commercial use license to the registry.
25
+ * @param request - The request object that contains all data needed to register a PIL commercial use license.
26
+ * @param request.mintingFee The fee to be paid when minting a license.
27
+ * @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
28
+ * @param request.txOptions [Optional] The transaction options.
29
+ * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
30
+ * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
31
+ */
32
+ registerCommercialUsePIL(request: RegisterCommercialUsePILRequest): Promise<RegisterPILResponse>;
33
+ /**
34
+ * Convenient function to register a PIL commercial Remix license to the registry.
35
+ * @param request - The request object that contains all data needed to register license.
36
+ * @param request.mintingFee The fee to be paid when minting a license.
37
+ * @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
38
+ * @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
39
+ * @param request.txOptions [Optional] The transaction options.
40
+ * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
41
+ * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
42
+ */
43
+ registerCommercialRemixPIL(request: RegisterCommercialRemixPILRequest): Promise<RegisterPILResponse>;
44
+ /**
45
+ * Attaches license terms to an IP.
46
+ * @param request - The request object that contains all data needed to attach license terms.
47
+ * @param request.ipId The address of the IP to which the license terms are attached.
48
+ * @param request.licenseTemplate The address of the license template.
49
+ * @param request.licenseTermsId The ID of the license terms.
50
+ * @param request.txOptions [Optional] The transaction options.
51
+ * @returns A Promise that resolves to an object containing the transaction hash.
52
+ */
53
+ attachLicenseTerms(request: AttachLicenseTermsRequest): Promise<{
54
+ txHash: `0x${string}`;
55
+ }>;
56
+ /**
57
+ * Mints license tokens for the license terms attached to an IP.
58
+ * The license tokens are minted to the receiver.
59
+ * The license terms must be attached to the IP before calling this function.
60
+ * But it can mint license token of default license terms without attaching the default license terms,
61
+ * since it is attached to all IPs by default.
62
+ * IP owners can mint license tokens for their IPs for arbitrary license terms
63
+ * without attaching the license terms to IP.
64
+ * It might require the caller pay the minting fee, depending on the license terms or configured by the iP owner.
65
+ * The minting fee is paid in the minting fee token specified in the license terms or configured by the IP owner.
66
+ * IP owners can configure the minting fee of their IPs or
67
+ * configure the minting fee module to determine the minting fee.
68
+ * @param request - The request object that contains all data needed to mint license tokens.
69
+ * @param request.licensorIpId The licensor IP ID.
70
+ * @param request.licenseTemplate The address of the license template.
71
+ * @param request.licenseTermsId The ID of the license terms within the license template.
72
+ * @param request.amount The amount of license tokens to mint.
73
+ * @param request.receiver The address of the receiver.
74
+ * @param request.txOptions [Optional] The transaction options.
75
+ * @returns A Promise that resolves to an object containing the transaction hash and optional license token ID if waitForTxn is set to true.
76
+ * @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
77
+ */
78
+ mintLicenseTokens(request: MintLicenseTokensRequest): Promise<MintLicenseTokensResponse>;
79
+ /**
80
+ * Gets license terms of the given ID.
81
+ * @param selectedLicenseTermsId The ID of the license terms.
82
+ * @returns A Promise that resolves to an object containing the PILTerms associate with the given ID.
83
+ */
84
+ getLicenseTerms(selectedLicenseTermsId: string): Promise<PiLicenseTemplateGetLicenseTermsResponse>;
85
+ private getLicenseTermsId;
21
86
  }
22
87
  //# sourceMappingURL=license.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"license.d.ts","sourceRoot":"../../../../src/resources","sources":["license.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,MAAM,EAAkC,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sCAAmC;AACzF,OAAO,EAAE,iBAAiB,EAA4B,kCAAyB;AAE/E,OAAO,EAAE,qBAAqB,EAAE,6BAA0B;AAE1D;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,qBAAqB;IACtD,O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IAuB/B;;;;;;;;;OASG;IACU,0BAA0B,CACrC,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,mBAAmB,CAAC;IAyB/B;;;;;;;;OAQG;IACU,kBAAkB,CAAC,OAAO,EAAE,yBAAyB;;;IA2ClE;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,iBAAiB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAoDrC;;;;OAIG;IACU,eAAe,CAC1B,sBAAsB,EAAE,MAAM,GAC7B,OAAO,CAAC,wCAAwC,CAAC;YAUtC,iBAAiB;CAIhC"}
@@ -0,0 +1,24 @@
1
+ import { PublicClient } from "viem";
2
+ import { SimpleWalletClient, SpgClient } from "../abi/generated.js";
3
+ import { CreateNFTCollectionRequest, CreateNFTCollectionResponse } from "../types/resources/nftClient.js";
4
+ export declare class NftClient {
5
+ spgClient: SpgClient;
6
+ private readonly rpcClient;
7
+ private readonly wallet;
8
+ constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
9
+ /**
10
+ * Creates a new SPG NFT Collection.
11
+ * @param request - The request object containing necessary data to create a SPG NFT Collection.
12
+ * @param request.name - The name of the collection.
13
+ * @param request.symbol - The symbol of the collection.
14
+ * @param request.maxSupply - The maximum supply of the collection.
15
+ * @param request.mintCost - The cost to mint a token.
16
+ * @param request.mintToken - The token to mint.
17
+ * @param request.owner - The owner of the collection.
18
+ * @param request.txOptions - Optional transaction options.
19
+ * @returns A Promise that resolves to a CreateNFTCollectionResponse containing the transaction hash and collection address.
20
+ * @emits CollectionCreated (nftContract);
21
+ */
22
+ createNFTCollection<TReq extends CreateNFTCollectionRequest, TRes = CreateNFTCollectionResponse<TReq>>(request: TReq): Promise<TRes>;
23
+ }
24
+ //# sourceMappingURL=nftClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftClient.d.ts","sourceRoot":"../../../../src/resources","sources":["nftClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiD,MAAM,MAAM,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,4BAAyB;AACjE,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC5B,wCAAqC;AAGtC,qBAAa,SAAS;IACb,SAAS,EAAE,SAAS,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D;;;;;;;;;;;;OAYG;IACU,mBAAmB,CAC9B,IAAI,SAAS,0BAA0B,EACvC,IAAI,GAAG,2BAA2B,CAAC,IAAI,CAAC,EACxC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA4BhC"}
@@ -0,0 +1,30 @@
1
+ import { PublicClient } from "viem";
2
+ import { SetPermissionsRequest, SetPermissionsResponse } from "../types/resources/permission.js";
3
+ import { SimpleWalletClient } from "../abi/generated.js";
4
+ export declare class PermissionClient {
5
+ private readonly wallet;
6
+ private readonly rpcClient;
7
+ private accessControllerClient;
8
+ constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
9
+ /**
10
+ * Sets the permission for a specific function call
11
+ * Each policy is represented as a mapping from an IP account address to a signer address to a recipient
12
+ * address to a function selector to a permission level. The permission level can be 0 (ABSTAIN), 1 (ALLOW), or
13
+ * 2 (DENY).
14
+ * By default, all policies are set to 0 (ABSTAIN), which means that the permission is not set.
15
+ * The owner of ipAccount by default has all permission.
16
+ * address(0) => wildcard
17
+ * bytes4(0) => wildcard
18
+ * Specific permission overrides wildcard permission.
19
+ * @param request - The request object containing necessary data to set permissions.
20
+ * @param request.ipAsset The address of the IP account that grants the permission for `signer`
21
+ * @param request.signer The address that can call `to` on behalf of the `ipAccount`
22
+ * @param request.to The address that can be called by the `signer` (currently only modules can be `to`)
23
+ * @param request.func Optional. The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
24
+ * @param request.permission The new permission level
25
+ * @returns A Promise that resolves to an object containing the transaction hash
26
+ * @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
27
+ */
28
+ setPermission(request: SetPermissionsRequest): Promise<SetPermissionsResponse>;
29
+ }
30
+ //# sourceMappingURL=permission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission.d.ts","sourceRoot":"../../../../src/resources","sources":["permission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuC,MAAM,MAAM,CAAC;AAGzE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,yCAAsC;AAE9F,OAAO,EAIL,kBAAkB,EACnB,4BAAyB;AAE1B,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAM/D;;;;;;;;;;;;;;;;;;OAkBG;IACU,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAkC5F"}
@@ -0,0 +1,73 @@
1
+ import { Hex, PublicClient } from "viem";
2
+ import { ClaimableRevenueRequest, ClaimableRevenueResponse, CollectRoyaltyTokensRequest, CollectRoyaltyTokensResponse, PayRoyaltyOnBehalfRequest, PayRoyaltyOnBehalfResponse, RoyaltyVaultAddress, SnapshotRequest, SnapshotResponse, ClaimRevenueRequest, ClaimRevenueResponse } from "../types/resources/royalty.js";
3
+ import { IpAssetRegistryClient, RoyaltyModuleClient, RoyaltyPolicyLapClient, SimpleWalletClient } from "../abi/generated.js";
4
+ import { IPAccountClient } from "./ipAccount.js";
5
+ export declare class RoyaltyClient {
6
+ royaltyPolicyLapClient: RoyaltyPolicyLapClient;
7
+ royaltyModuleClient: RoyaltyModuleClient;
8
+ ipAssetRegistryClient: IpAssetRegistryClient;
9
+ ipAccountClient: IPAccountClient;
10
+ private readonly rpcClient;
11
+ private readonly wallet;
12
+ constructor(rpcClient: PublicClient, wallet: SimpleWalletClient);
13
+ /**
14
+ * Allows ancestors to claim the royalty tokens and any accrued revenue tokens
15
+ * @param request - The request object that contains all data needed to collect royalty tokens.
16
+ * @param request.parentIpId The ip id of the ancestor to whom the royalty tokens belong to.
17
+ * @param request.royaltyVaultIpId The id of the royalty vault.
18
+ * @param request.txOptions [Optional] The transaction options.
19
+ * @returns A Promise that resolves to an object containing the transaction hash and optional the amount of royalty tokens collected if waitForTxn is set to true.
20
+ * @emits RoyaltyTokensCollected (ancestorIpId, royaltyTokensCollected)
21
+ */
22
+ collectRoyaltyTokens(request: CollectRoyaltyTokensRequest): Promise<CollectRoyaltyTokensResponse>;
23
+ /**
24
+ * Allows the function caller to pay royalties to the receiver IP asset on behalf of the payer IP asset.
25
+ * @param request - The request object that contains all data needed to pay royalty on behalf.
26
+ * @param request.receiverIpId The ipId that receives the royalties.
27
+ * @param request.payerIpId The ID of the IP asset that pays the royalties.
28
+ * @param request.token The token to use to pay the royalties.
29
+ * @param request.amount The amount to pay.
30
+ * @param request.txOptions [Optional] The transaction options.
31
+ * @returns A Promise that resolves to an object containing the transaction hash.
32
+ */
33
+ payRoyaltyOnBehalf(request: PayRoyaltyOnBehalfRequest): Promise<PayRoyaltyOnBehalfResponse>;
34
+ /**
35
+ * Calculates the amount of revenue token claimable by a token holder at certain snapshot.
36
+ * @param request - The request object that contains all data needed to claim Revenue.
37
+ * @param request.royaltyVaultIpId The id of the royalty vault.
38
+ * @param request.account The address of the token holder.
39
+ * @param request.snapshotId The snapshot id.
40
+ * @param request.token The revenue token to claim.
41
+ * @param request.txOptions [Optional] The transaction options.
42
+ * @returns A Promise that contains the amount of revenue token claimable
43
+ */
44
+ claimableRevenue(request: ClaimableRevenueRequest): Promise<ClaimableRevenueResponse>;
45
+ /**
46
+ * Allows token holders to claim by a list of snapshot ids based on the token balance at certain snapshot
47
+ * @param request - The request object that contains all data needed to claim revenue.
48
+ * @param request.snapshotIds The list of snapshot ids.
49
+ * @param request.royaltyVaultIpId The id of the royalty vault.
50
+ * @param request.token The revenue token to claim.
51
+ * @param request.account [Optional] The ipId to send.
52
+ * @param request.txOptions [Optional] The transaction options.
53
+ * @returns A Promise that resolves to an object containing the transaction hash and optional claimableToken if waitForTxn is set to true.
54
+ * @emits RevenueTokenClaimed (claimer, token, amount).
55
+ */
56
+ claimRevenue(request: ClaimRevenueRequest): Promise<ClaimRevenueResponse>;
57
+ /**
58
+ * Snapshots the claimable revenue and royalty token amounts.
59
+ * @param request - The request object that contains all data needed to snapshot.
60
+ * @param request.royaltyVaultIpId The id of the royalty vault.
61
+ * @param request.txOptions [Optional] The transaction options.
62
+ * @returns A Promise that resolves to an object containing the transaction hash and optional snapshotId if waitForTxn is set to true.
63
+ * @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
64
+ */
65
+ snapshot(request: SnapshotRequest): Promise<SnapshotResponse>;
66
+ /**
67
+ * Get the royalty vault proxy address of given royaltyVaultIpId.
68
+ * @param royaltyVaultIpId the id of the royalty vault.
69
+ * @returns A Promise that resolves to an object containing the royalty vault address.
70
+ */
71
+ getRoyaltyVaultAddress(royaltyVaultIpId: Hex): Promise<RoyaltyVaultAddress>;
72
+ }
73
+ //# sourceMappingURL=royalty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"royalty.d.ts","sourceRoot":"../../../../src/resources","sources":["royalty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAkC,MAAM,MAAM,CAAC;AAGzE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACrB,sCAAmC;AACpC,OAAO,EACL,qBAAqB,EAErB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAEnB,4BAAyB;AAC1B,OAAO,EAAE,eAAe,EAAE,uBAAoB;AAE9C,qBAAa,aAAa;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,eAAe,EAAE,eAAe,CAAC;IACxC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB;IAS/D;;;;;;;;OAQG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;IAgCxC;;;;;;;;;OASG;IACU,kBAAkB,CAC7B,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC;IA+BtC;;;;;;;;;OASG;IACU,gBAAgB,CAC3B,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAmBpC;;;;;;;;;;OAUG;IACU,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA2CtF;;;;;;;OAOG;IACU,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAqB1E;;;;OAIG;IACU,sBAAsB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAezF"}
@@ -0,0 +1,5 @@
1
+ export type TypedData = {
2
+ interface: string;
3
+ data: unknown[];
4
+ };
5
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"../../../../src/types","sources":["common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC"}
@@ -1,18 +1,33 @@
1
- import { Provider } from "@ethersproject/providers";
2
- import { Signer } from "ethers";
3
- import { Environment } from "../enums/Environment.js";
1
+ import { Account, Transport, Address } from "viem";
2
+ import { SimpleWalletClient } from "../abi/generated.js";
3
+ /**
4
+ * Supported chains. For convenience, both name or chain ID are supported.
5
+ *
6
+ * @public
7
+ */
8
+ export type SupportedChainIds = "11155111" | "sepolia";
4
9
  /**
5
10
  * Configuration for the SDK Client.
6
11
  *
7
12
  * @public
8
13
  */
9
- export interface StoryCommonConfig {
10
- readonly environment: Environment;
11
- }
12
- export interface StoryConfig extends StoryCommonConfig {
13
- readonly signer: Signer;
14
- }
15
- export interface StoryReadOnlyConfig extends StoryCommonConfig {
16
- readonly provider?: Provider;
17
- }
14
+ export type UseAccountStoryConfig = {
15
+ readonly account: Account | Address;
16
+ readonly chainId?: SupportedChainIds;
17
+ readonly transport: Transport;
18
+ };
19
+ export type UseWalletStoryConfig = {
20
+ readonly chainId?: SupportedChainIds;
21
+ readonly transport: Transport;
22
+ readonly wallet: SimpleWalletClient;
23
+ };
24
+ export type StoryConfig = {
25
+ readonly chainId?: SupportedChainIds;
26
+ readonly transport: Transport;
27
+ readonly wallet?: SimpleWalletClient;
28
+ readonly account?: Account | Address;
29
+ };
30
+ export type ContractAddress = {
31
+ [key in SupportedChainIds]: Record<string, string>;
32
+ };
18
33
  //# 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,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,gCAA6B;AAEnD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CACnC;AAED,M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xOptions = {
2
+ waitForTransaction?: boolean;
3
+ gasPrice?: bigint;
4
+ maxFeePerGas?: bigint;
5
+ numBlockConfirmations?: number;
6
+ };
7
+ export type WithTxOptions<T> = T & {
8
+ txOptions?: TxOptions;
9
+ };
10
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { Hex } from "viem";
2
+ import { TxOptions } from "../options.js";
3
+ export type Dispute = {
4
+ targetIpId: Hex;
5
+ disputeInitiator: Hex;
6
+ arbitrationPolicy: Hex;
7
+ linkToDisputeEvidence: string;
8
+ targetTag: string;
9
+ currentTag: string;
10
+ };
11
+ export type RaiseDisputeRequest = {
12
+ targetIpId: Hex;
13
+ arbitrationPolicy: Hex;
14
+ linkToDisputeEvidence: string;
15
+ targetTag: string;
16
+ calldata?: Hex;
17
+ txOptions?: TxOptions;
18
+ };
19
+ export type RaiseDisputeResponse = {
20
+ txHash: string;
21
+ disputeId?: Hex;
22
+ arbitrationPolicy?: Hex;
23
+ };
24
+ export type SetDisputeJudgementRequest = {
25
+ disputeId: number;
26
+ decision: boolean;
27
+ calldata?: Hex;
28
+ txOptions?: TxOptions;
29
+ };
30
+ export type SetDisputeJudgementResponse = {
31
+ txHash: string;
32
+ disputeId?: bigint;
33
+ decision?: boolean;
34
+ data?: Hex;
35
+ };
36
+ export type CancelDisputeRequest = {
37
+ disputeId: number | string | bigint;
38
+ calldata?: Hex;
39
+ txOptions?: TxOptions;
40
+ };
41
+ export type CancelDisputeResponse = {
42
+ txHash: string;
43
+ };
44
+ export type ResolveDisputeRequest = {
45
+ disputeId: number | string | bigint;
46
+ data: Hex;
47
+ txOptions?: TxOptions;
48
+ };
49
+ export type ResolveDisputeResponse = {
50
+ txHash: string;
51
+ };
52
+ //# 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,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,GAAG,CAAC;IACtB,iBAAiB,EAAE,GAAG,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,GAAG,CAAC;IAChB,iBAAiB,EAAE,GAAG,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,iBAAiB,CAAC,EAAE,GAAG,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Hex } from "viem";
2
+ import { TxOptions } from "../options.js";
3
+ export type IPAccountExecuteRequest = {
4
+ accountAddress: Hex;
5
+ to: Hex;
6
+ value: number;
7
+ data: Hex;
8
+ txOptions?: TxOptions;
9
+ };
10
+ export type IPAccountExecuteResponse = {
11
+ txHash: string;
12
+ };
13
+ export type IPAccountExecuteWithSigRequest = {
14
+ accountAddress: Hex;
15
+ to: Hex;
16
+ value: number;
17
+ data: Hex;
18
+ signer: Hex;
19
+ deadline: number;
20
+ signature: Hex;
21
+ txOptions?: TxOptions;
22
+ };
23
+ export type IPAccountExecuteWithSigResponse = {
24
+ txHash: string;
25
+ };
26
+ //# sourceMappingURL=ipAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipAccount.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE,GAAG,CAAC;IACpB,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,cAAc,EAAE,GAAG,CAAC;IACpB,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1,71 +1,70 @@
1
- import { IPAssetType } from "../../enums/IPAssetType.js";
2
- /**
3
- * Core data model for IP Asset.
4
- *
5
- * @public
6
- */
7
- export type IPAsset = {
8
- ipAssetId: string;
9
- franchiseId: string;
10
- ipAssetName: string;
11
- ipAssetType: IPAssetType;
12
- ownerAddress: string;
13
- tokenUri: string;
14
- txHash: string;
15
- };
16
- /**
17
- * Request type for ipAsset.get method.
18
- *
19
- * @public
20
- */
21
- export type GetIpAssetRequest = {
22
- ipAssetId: string;
23
- franchiseId: string;
1
+ import { Address, Hex } from "viem";
2
+ import { TxOptions } from "../options.js";
3
+ import { PIL_TYPE } from "./license.js";
4
+ export type RegisterIpResponse = {
5
+ txHash?: string;
6
+ ipId?: Hex;
24
7
  };
25
- /**
26
- * Response type for ipAsset.get method.
27
- *
28
- * @public
29
- */
30
- export type GetIpAssetResponse = {
31
- data: IPAsset;
8
+ export type RegisterRequest = {
9
+ tokenContract: Hex;
10
+ tokenId: string;
11
+ txOptions?: TxOptions;
32
12
  };
33
- /**
34
- * Request type for ipAsset.create method.
35
- *
36
- * @public
37
- */
38
- export type CreateIpAssetRequest = {
39
- franchiseId: string;
40
- ipAssetType: IPAssetType;
41
- ipAssetName: string;
42
- description: string;
43
- mediaUrl: string;
44
- to: string;
45
- parentIpAssetId: string;
13
+ export type RegisterDerivativeWithLicenseTokensRequest = {
14
+ childIpId: Hex;
15
+ licenseTokenIds: string[];
16
+ txOptions?: TxOptions;
46
17
  };
47
- /**
48
- * Response type for ipAsset.create method.
49
- *
50
- * @public
51
- */
52
- export type CreateIpAssetResponse = {
18
+ export type RegisterDerivativeWithLicenseTokensResponse = {
53
19
  txHash: string;
54
20
  };
55
- /**
56
- * Request type for ipAsset.list method.
57
- *
58
- * @public
59
- */
60
- export type ListIpAssetRequest = {
61
- franchiseId: string;
21
+ export type RegisterDerivativeRequest = {
22
+ childIpId: Hex;
23
+ parentIpIds: Hex[];
24
+ licenseTermsIds: string[];
25
+ licenseTemplate?: Hex;
26
+ txOptions?: TxOptions;
27
+ };
28
+ export type RegisterDerivativeResponse = {
29
+ txHash?: string;
30
+ childIpId?: Hex;
31
+ };
32
+ export type CreateIpAssetWithPilTermsRequest = {
33
+ nftContract: Address;
34
+ pilType: PIL_TYPE;
35
+ metadata?: {
36
+ metadataURI: string;
37
+ metadata: string;
38
+ nftMetadata: string;
39
+ };
40
+ recipient?: Hex;
41
+ mintingFee?: string;
42
+ currency?: Hex;
43
+ commercialRevShare?: number;
44
+ txOptions?: TxOptions;
62
45
  };
63
- /**
64
- * Response type for ipAsset.list method.
65
- *
66
- * @public
67
- */
68
- export type ListIpAssetResponse = {
69
- data: IPAsset[];
46
+ export type RegisterIpAndMakeDerivativeRequest = {
47
+ nftContract: Address;
48
+ tokenId: string;
49
+ derivData: {
50
+ parentIpIds: Address[];
51
+ licenseTermsIds: string[];
52
+ licenseTemplate?: Address;
53
+ };
54
+ metadata?: {
55
+ metadataURI: string;
56
+ metadata: string;
57
+ nftMetadata: string;
58
+ };
59
+ sigMetadata?: {
60
+ signer: Address;
61
+ deadline: string;
62
+ signature: Hex;
63
+ };
64
+ sigRegister: {
65
+ signer: Address;
66
+ deadline: string;
67
+ signature: Hex;
68
+ };
70
69
  };
71
70
  //# 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,WAAW,EAAE,mCAAgC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACl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