@story-protocol/core-sdk 0.0.1-beta-rc.8 → 0.0.1-beta-rc.10

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -41,7 +41,7 @@ The SDK supports using `viem` for initiating SDK client. Create a typescript fil
41
41
  ```typescript index.ts
42
42
  import { privateKeyToAccount } from "viem/accounts";
43
43
 
44
- const PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
44
+ const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
45
45
  const account = privateKeyToAccount(WALLET_PRIVATE_KEY as `0x${string}`);
46
46
  ```
47
47
 
@@ -1,4 +1,4 @@
1
- import { PublicClient, WalletClient } from "viem";
1
+ import { PublicClient, WalletClient, Hex } from "viem";
2
2
  import { StoryAPIClient } from "../clients/storyAPI.js";
3
3
  import { RegisterDerivativeIpRequest, RegisterDerivativeIpResponse, RegisterRootIpRequest, RegisterRootIpResponse } from "../types/resources/ipAsset.js";
4
4
  export declare class IPAssetClient {
@@ -202,21 +202,7 @@ export declare class IPAssetClient {
202
202
  }, {
203
203
  readonly internalType: "address";
204
204
  readonly name: "to";
205
- readonly type: "address"; /**
206
- * Registers a root-level IP into the protocol. Root-level IPs can be thought of as organizational hubs
207
- * for encapsulating policies that actual IPs can use to register through. As such, a root-level IP is not an
208
- * actual IP, but a container for IP policy management for their child IP assets.
209
- * @param request The request object that contains all data needed to register a root IP.
210
- * @param request.policyId The policy that identifies the licensing terms of the IP.
211
- * @param request.tokenContract The address of the NFT bound to the root-level IP.
212
- * @param request.tokenId The token id of the NFT bound to the root-level IP.
213
- * @param request.ipName [Optional] The name assigned to the new IP.
214
- * @param request.contentHash [Optional] The content hash of the IP being registered.
215
- * @param request.uri [Optional] An external URI to link to the IP.
216
- * @param request.txOptions [Optional] The transaction options.
217
- * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
218
- * @emits RootIPRegistered (msg.sender, ipId, policyId)
219
- */
205
+ readonly type: "address";
220
206
  }, {
221
207
  readonly internalType: "bytes4";
222
208
  readonly name: "func";
@@ -846,12 +832,18 @@ export declare class IPAssetClient {
846
832
  * @param request.ipName [Optional] The name assigned to the new IP.
847
833
  * @param request.contentHash [Optional] The content hash of the IP being registered.
848
834
  * @param request.uri [Optional] An external URI to link to the IP.
849
- * @param request.minRoyalty [Optional] The minimum royalty percentage that the IP owner will receive.
850
835
  * @param request.txOptions [Optional] The transaction options.
851
836
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
852
837
  * @emits RootIPRegistered (msg.sender, ipId, policyId)
853
838
  */
854
839
  registerDerivativeIp(request: RegisterDerivativeIpRequest): Promise<RegisterDerivativeIpResponse>;
855
- private isNFTRegistered;
840
+ /**
841
+ * Checks if an NFT is already registered in the protocol.
842
+ * @param chainId The chain ID of the NFT.
843
+ * @param tokenAddress The address of the NFT.
844
+ * @param tokenId The token ID of the NFT.
845
+ * @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
846
+ */
847
+ isNFTRegistered(chainId: string, tokenAddress: Hex, tokenId: string): Promise<Hex>;
856
848
  }
857
849
  //# sourceMappingURL=ipAsset.d.ts.map
@@ -1 +1 @@
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,EAAE,cAAc,EAAE,+BAA4B;AACrD,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACvB,sCAAmC;AAMpC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IACtC,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA4B;gBAE/C,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc;IAMtF;;;;;;;;;;;;;;OAcG;IACU,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAuC5F;;;;;;;;;;;;;OAaG;IACU,oBAAoB,CAC/B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,4BAA4B,CAAC;IAiDxC;;;;;;OAMG;IACU,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAchG"}
@@ -19,7 +19,6 @@ export type RegisterDerivativeIpRequest = {
19
19
  ipName?: string;
20
20
  contentHash?: `0x${string}`;
21
21
  uri?: string;
22
- minRoyalty?: number;
23
22
  txOptions?: TxOptions;
24
23
  };
25
24
  export type RegisterDerivativeIpResponse = {
@@ -1 +1 @@
1
- {"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../../src/types/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAmB;AAEvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,oBAAoB,EAAE,KAAK,MAAM,EAAE,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAA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E,CAAC;IACrB,oBAAoB,EAAE,KAAK,MAAM,EAAE,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1915,28 +1915,28 @@ var ErrorsABI = [{
1915
1915
  }];
1916
1916
 
1917
1917
  var sepolia = {
1918
- AccessController: "0x8eB53745795E2107E3568c647A77a7294C89Ef31",
1919
- AncestorsVaultLAP: "0x7FD793C4914da052022524BA17508976733B09AA",
1920
- ArbitrationPolicySP: "0xFfE389378AFa13D91485182D72700d226Cb0db16",
1921
- DisputeModule: "0xe94d7198EF5657C15be755aC3D9cb386F2Db50Bd",
1922
- Governance: "0x14Ac96796aadef6053e993aBDc3C1e7830ede901",
1923
- IPAccountImpl: "0xec3F947902fac41e59aa25669Fe39997BFA1357c",
1924
- IPAccountRegistry: "0xfe3ef84acECAd1F91583CB09E62953669C1c2bb5",
1925
- IPAssetRegistry: "0xA3a77482C64e91d4C89114D83Bd51457132ea947",
1926
- IPAssetRenderer: "0xF36c279a61b32D39e5Bc25e317f779362Be07E1d",
1927
- IPMetadataProvider: "0x40D52438C3852A872c71eB3a8b81d6274C5b6274",
1928
- IPResolver: "0x8BcE3019dBe94402A0276A2630373CDDB67fe271",
1929
- LicenseRegistry: "0x176d33Cc80ed3390256033bbf7Fd651c9C5A364F",
1930
- LicensingModule: "0x9CDDD88Dd34429a0F39eaDf91a56D1bf0533E72B",
1931
- MockERC20: "0x1219A0E87e617E6560104fA11cfd4f01FeB47362",
1932
- MockERC721: "0x9d790FF5B6A7469f32f18E677E15D48b86C6839b",
1933
- MockTokenGatedHook: "0x25018B7521E7607A7101302401bE81eDCA2E9730",
1934
- ModuleRegistry: "0x6E09516f10a4094b9B9A8C2b7Aa611A2D7827d3F",
1935
- PILPolicyFrameworkManager: "0x50c3bCAA67D4eC3f285E4328451315Ab0D9e539f",
1936
- RegistrationModule: "0x8b3f6b736b520F69c37a575293D3c1ff6383D495",
1937
- RoyaltyModule: "0x833774B42357939B4c96e1bCF5cE26e815AE3Ae6",
1938
- RoyaltyPolicyLAP: "0xda483fd6e6ecA1C2D913802F9a6B57a83b73029f",
1939
- TokenWithdrawalModule: "0x01469702E71F5C8199A15a97e8147D002C60a0B9"
1918
+ AccessController: "0xad64a4b2e18FF7D2f97aF083E7b193d7Dd141735",
1919
+ AncestorsVaultLAP: "0x1db575D163685F4b825aA2b0972B62CB6E7Ac2Db",
1920
+ ArbitrationPolicySP: "0x532BC697eFFd12Eb16C913b0df04ebEA87dea309",
1921
+ DisputeModule: "0x6157B19CBc151af2b36e0a2581001d32a22b2661",
1922
+ Governance: "0xc5Cdbb3359143C2449D03342D2F13F2F0e58c1b8",
1923
+ IPAccountImpl: "0x79792DccC6C58C303510fc1F7649e481C431aFb1",
1924
+ IPAccountRegistry: "0xBD2780F291588C8bDDf7F5874988fA9d3179d560",
1925
+ IPAssetRegistry: "0x292639452A975630802C17c9267169D93BD5a793",
1926
+ IPAssetRenderer: "0x1Ce95B7b333d71C00C3334a96713440d5A5A26dD",
1927
+ IPMetadataProvider: "0x31c65C12A6A3889cd08A055914931E2Fbe773dD6",
1928
+ IPResolver: "0x3809f4128B0B33AFb17576edafD7D4F4E2ABE933",
1929
+ LicenseRegistry: "0xc2BC7a2d5784768BDEd98436f2522A4931e2FBb4",
1930
+ LicensingModule: "0x950d766A1a0afDc33c3e653C861A8765cb42DbdC",
1931
+ MockERC20: "0x857308523a01B430cB112400976B9FC4A6429D55",
1932
+ MockERC721: "0x16d50f333B264b153B7BF1DD9fe65A2707B3281b",
1933
+ MockTokenGatedHook: "0x28C32a4B5B3E186d7f658C051d3Bb4a95243209a",
1934
+ ModuleRegistry: "0x5Aac3177F496F503Ac724A0D0A697f6ba9dA2C27",
1935
+ PILPolicyFrameworkManager: "0xeAABf2b80B7e069EE449B5629590A1cc0F9bC9C2",
1936
+ RegistrationModule: "0x613128e88b568768764824f898C8135efED97fA6",
1937
+ RoyaltyModule: "0xA6bEf9CC650A16939566c1da5d5088f3F028a865",
1938
+ RoyaltyPolicyLAP: "0x16eF58e959522727588921A92e9084d36E5d3855",
1939
+ TokenWithdrawalModule: "0x66738a5722e9Cd91B694bA39146CFEcE95457F04"
1940
1940
  };
1941
1941
 
1942
1942
  var IPAccountABI = [].concat(_toConsumableArray(IPAccountImplABI), _toConsumableArray(ErrorsABI));
@@ -2333,7 +2333,6 @@ var IPAssetClient = /*#__PURE__*/function () {
2333
2333
  * @param request.ipName [Optional] The name assigned to the new IP.
2334
2334
  * @param request.contentHash [Optional] The content hash of the IP being registered.
2335
2335
  * @param request.uri [Optional] An external URI to link to the IP.
2336
- * @param request.minRoyalty [Optional] The minimum royalty percentage that the IP owner will receive.
2337
2336
  * @param request.txOptions [Optional] The transaction options.
2338
2337
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
2339
2338
  * @emits RootIPRegistered (msg.sender, ipId, policyId)
@@ -2418,6 +2417,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2418
2417
  }
2419
2418
  return registerDerivativeIp;
2420
2419
  }()
2420
+ /**
2421
+ * Checks if an NFT is already registered in the protocol.
2422
+ * @param chainId The chain ID of the NFT.
2423
+ * @param tokenAddress The address of the NFT.
2424
+ * @param tokenId The token ID of the NFT.
2425
+ * @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
2426
+ */
2421
2427
  }, {
2422
2428
  key: "isNFTRegistered",
2423
2429
  value: function () {
@@ -1915,28 +1915,28 @@ var ErrorsABI = [{
1915
1915
  }];
1916
1916
 
1917
1917
  var sepolia = {
1918
- AccessController: "0x8eB53745795E2107E3568c647A77a7294C89Ef31",
1919
- AncestorsVaultLAP: "0x7FD793C4914da052022524BA17508976733B09AA",
1920
- ArbitrationPolicySP: "0xFfE389378AFa13D91485182D72700d226Cb0db16",
1921
- DisputeModule: "0xe94d7198EF5657C15be755aC3D9cb386F2Db50Bd",
1922
- Governance: "0x14Ac96796aadef6053e993aBDc3C1e7830ede901",
1923
- IPAccountImpl: "0xec3F947902fac41e59aa25669Fe39997BFA1357c",
1924
- IPAccountRegistry: "0xfe3ef84acECAd1F91583CB09E62953669C1c2bb5",
1925
- IPAssetRegistry: "0xA3a77482C64e91d4C89114D83Bd51457132ea947",
1926
- IPAssetRenderer: "0xF36c279a61b32D39e5Bc25e317f779362Be07E1d",
1927
- IPMetadataProvider: "0x40D52438C3852A872c71eB3a8b81d6274C5b6274",
1928
- IPResolver: "0x8BcE3019dBe94402A0276A2630373CDDB67fe271",
1929
- LicenseRegistry: "0x176d33Cc80ed3390256033bbf7Fd651c9C5A364F",
1930
- LicensingModule: "0x9CDDD88Dd34429a0F39eaDf91a56D1bf0533E72B",
1931
- MockERC20: "0x1219A0E87e617E6560104fA11cfd4f01FeB47362",
1932
- MockERC721: "0x9d790FF5B6A7469f32f18E677E15D48b86C6839b",
1933
- MockTokenGatedHook: "0x25018B7521E7607A7101302401bE81eDCA2E9730",
1934
- ModuleRegistry: "0x6E09516f10a4094b9B9A8C2b7Aa611A2D7827d3F",
1935
- PILPolicyFrameworkManager: "0x50c3bCAA67D4eC3f285E4328451315Ab0D9e539f",
1936
- RegistrationModule: "0x8b3f6b736b520F69c37a575293D3c1ff6383D495",
1937
- RoyaltyModule: "0x833774B42357939B4c96e1bCF5cE26e815AE3Ae6",
1938
- RoyaltyPolicyLAP: "0xda483fd6e6ecA1C2D913802F9a6B57a83b73029f",
1939
- TokenWithdrawalModule: "0x01469702E71F5C8199A15a97e8147D002C60a0B9"
1918
+ AccessController: "0xad64a4b2e18FF7D2f97aF083E7b193d7Dd141735",
1919
+ AncestorsVaultLAP: "0x1db575D163685F4b825aA2b0972B62CB6E7Ac2Db",
1920
+ ArbitrationPolicySP: "0x532BC697eFFd12Eb16C913b0df04ebEA87dea309",
1921
+ DisputeModule: "0x6157B19CBc151af2b36e0a2581001d32a22b2661",
1922
+ Governance: "0xc5Cdbb3359143C2449D03342D2F13F2F0e58c1b8",
1923
+ IPAccountImpl: "0x79792DccC6C58C303510fc1F7649e481C431aFb1",
1924
+ IPAccountRegistry: "0xBD2780F291588C8bDDf7F5874988fA9d3179d560",
1925
+ IPAssetRegistry: "0x292639452A975630802C17c9267169D93BD5a793",
1926
+ IPAssetRenderer: "0x1Ce95B7b333d71C00C3334a96713440d5A5A26dD",
1927
+ IPMetadataProvider: "0x31c65C12A6A3889cd08A055914931E2Fbe773dD6",
1928
+ IPResolver: "0x3809f4128B0B33AFb17576edafD7D4F4E2ABE933",
1929
+ LicenseRegistry: "0xc2BC7a2d5784768BDEd98436f2522A4931e2FBb4",
1930
+ LicensingModule: "0x950d766A1a0afDc33c3e653C861A8765cb42DbdC",
1931
+ MockERC20: "0x857308523a01B430cB112400976B9FC4A6429D55",
1932
+ MockERC721: "0x16d50f333B264b153B7BF1DD9fe65A2707B3281b",
1933
+ MockTokenGatedHook: "0x28C32a4B5B3E186d7f658C051d3Bb4a95243209a",
1934
+ ModuleRegistry: "0x5Aac3177F496F503Ac724A0D0A697f6ba9dA2C27",
1935
+ PILPolicyFrameworkManager: "0xeAABf2b80B7e069EE449B5629590A1cc0F9bC9C2",
1936
+ RegistrationModule: "0x613128e88b568768764824f898C8135efED97fA6",
1937
+ RoyaltyModule: "0xA6bEf9CC650A16939566c1da5d5088f3F028a865",
1938
+ RoyaltyPolicyLAP: "0x16eF58e959522727588921A92e9084d36E5d3855",
1939
+ TokenWithdrawalModule: "0x66738a5722e9Cd91B694bA39146CFEcE95457F04"
1940
1940
  };
1941
1941
 
1942
1942
  var IPAccountABI = [].concat(_toConsumableArray(IPAccountImplABI), _toConsumableArray(ErrorsABI));
@@ -2333,7 +2333,6 @@ var IPAssetClient = /*#__PURE__*/function () {
2333
2333
  * @param request.ipName [Optional] The name assigned to the new IP.
2334
2334
  * @param request.contentHash [Optional] The content hash of the IP being registered.
2335
2335
  * @param request.uri [Optional] An external URI to link to the IP.
2336
- * @param request.minRoyalty [Optional] The minimum royalty percentage that the IP owner will receive.
2337
2336
  * @param request.txOptions [Optional] The transaction options.
2338
2337
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
2339
2338
  * @emits RootIPRegistered (msg.sender, ipId, policyId)
@@ -2418,6 +2417,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2418
2417
  }
2419
2418
  return registerDerivativeIp;
2420
2419
  }()
2420
+ /**
2421
+ * Checks if an NFT is already registered in the protocol.
2422
+ * @param chainId The chain ID of the NFT.
2423
+ * @param tokenAddress The address of the NFT.
2424
+ * @param tokenId The token ID of the NFT.
2425
+ * @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
2426
+ */
2421
2427
  }, {
2422
2428
  key: "isNFTRegistered",
2423
2429
  value: function () {
@@ -1888,28 +1888,28 @@ var ErrorsABI = [{
1888
1888
  }];
1889
1889
 
1890
1890
  var sepolia = {
1891
- AccessController: "0x8eB53745795E2107E3568c647A77a7294C89Ef31",
1892
- AncestorsVaultLAP: "0x7FD793C4914da052022524BA17508976733B09AA",
1893
- ArbitrationPolicySP: "0xFfE389378AFa13D91485182D72700d226Cb0db16",
1894
- DisputeModule: "0xe94d7198EF5657C15be755aC3D9cb386F2Db50Bd",
1895
- Governance: "0x14Ac96796aadef6053e993aBDc3C1e7830ede901",
1896
- IPAccountImpl: "0xec3F947902fac41e59aa25669Fe39997BFA1357c",
1897
- IPAccountRegistry: "0xfe3ef84acECAd1F91583CB09E62953669C1c2bb5",
1898
- IPAssetRegistry: "0xA3a77482C64e91d4C89114D83Bd51457132ea947",
1899
- IPAssetRenderer: "0xF36c279a61b32D39e5Bc25e317f779362Be07E1d",
1900
- IPMetadataProvider: "0x40D52438C3852A872c71eB3a8b81d6274C5b6274",
1901
- IPResolver: "0x8BcE3019dBe94402A0276A2630373CDDB67fe271",
1902
- LicenseRegistry: "0x176d33Cc80ed3390256033bbf7Fd651c9C5A364F",
1903
- LicensingModule: "0x9CDDD88Dd34429a0F39eaDf91a56D1bf0533E72B",
1904
- MockERC20: "0x1219A0E87e617E6560104fA11cfd4f01FeB47362",
1905
- MockERC721: "0x9d790FF5B6A7469f32f18E677E15D48b86C6839b",
1906
- MockTokenGatedHook: "0x25018B7521E7607A7101302401bE81eDCA2E9730",
1907
- ModuleRegistry: "0x6E09516f10a4094b9B9A8C2b7Aa611A2D7827d3F",
1908
- PILPolicyFrameworkManager: "0x50c3bCAA67D4eC3f285E4328451315Ab0D9e539f",
1909
- RegistrationModule: "0x8b3f6b736b520F69c37a575293D3c1ff6383D495",
1910
- RoyaltyModule: "0x833774B42357939B4c96e1bCF5cE26e815AE3Ae6",
1911
- RoyaltyPolicyLAP: "0xda483fd6e6ecA1C2D913802F9a6B57a83b73029f",
1912
- TokenWithdrawalModule: "0x01469702E71F5C8199A15a97e8147D002C60a0B9"
1891
+ AccessController: "0xad64a4b2e18FF7D2f97aF083E7b193d7Dd141735",
1892
+ AncestorsVaultLAP: "0x1db575D163685F4b825aA2b0972B62CB6E7Ac2Db",
1893
+ ArbitrationPolicySP: "0x532BC697eFFd12Eb16C913b0df04ebEA87dea309",
1894
+ DisputeModule: "0x6157B19CBc151af2b36e0a2581001d32a22b2661",
1895
+ Governance: "0xc5Cdbb3359143C2449D03342D2F13F2F0e58c1b8",
1896
+ IPAccountImpl: "0x79792DccC6C58C303510fc1F7649e481C431aFb1",
1897
+ IPAccountRegistry: "0xBD2780F291588C8bDDf7F5874988fA9d3179d560",
1898
+ IPAssetRegistry: "0x292639452A975630802C17c9267169D93BD5a793",
1899
+ IPAssetRenderer: "0x1Ce95B7b333d71C00C3334a96713440d5A5A26dD",
1900
+ IPMetadataProvider: "0x31c65C12A6A3889cd08A055914931E2Fbe773dD6",
1901
+ IPResolver: "0x3809f4128B0B33AFb17576edafD7D4F4E2ABE933",
1902
+ LicenseRegistry: "0xc2BC7a2d5784768BDEd98436f2522A4931e2FBb4",
1903
+ LicensingModule: "0x950d766A1a0afDc33c3e653C861A8765cb42DbdC",
1904
+ MockERC20: "0x857308523a01B430cB112400976B9FC4A6429D55",
1905
+ MockERC721: "0x16d50f333B264b153B7BF1DD9fe65A2707B3281b",
1906
+ MockTokenGatedHook: "0x28C32a4B5B3E186d7f658C051d3Bb4a95243209a",
1907
+ ModuleRegistry: "0x5Aac3177F496F503Ac724A0D0A697f6ba9dA2C27",
1908
+ PILPolicyFrameworkManager: "0xeAABf2b80B7e069EE449B5629590A1cc0F9bC9C2",
1909
+ RegistrationModule: "0x613128e88b568768764824f898C8135efED97fA6",
1910
+ RoyaltyModule: "0xA6bEf9CC650A16939566c1da5d5088f3F028a865",
1911
+ RoyaltyPolicyLAP: "0x16eF58e959522727588921A92e9084d36E5d3855",
1912
+ TokenWithdrawalModule: "0x66738a5722e9Cd91B694bA39146CFEcE95457F04"
1913
1913
  };
1914
1914
 
1915
1915
  var IPAccountABI = [].concat(_toConsumableArray(IPAccountImplABI), _toConsumableArray(ErrorsABI));
@@ -2306,7 +2306,6 @@ var IPAssetClient = /*#__PURE__*/function () {
2306
2306
  * @param request.ipName [Optional] The name assigned to the new IP.
2307
2307
  * @param request.contentHash [Optional] The content hash of the IP being registered.
2308
2308
  * @param request.uri [Optional] An external URI to link to the IP.
2309
- * @param request.minRoyalty [Optional] The minimum royalty percentage that the IP owner will receive.
2310
2309
  * @param request.txOptions [Optional] The transaction options.
2311
2310
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
2312
2311
  * @emits RootIPRegistered (msg.sender, ipId, policyId)
@@ -2391,6 +2390,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2391
2390
  }
2392
2391
  return registerDerivativeIp;
2393
2392
  }()
2393
+ /**
2394
+ * Checks if an NFT is already registered in the protocol.
2395
+ * @param chainId The chain ID of the NFT.
2396
+ * @param tokenAddress The address of the NFT.
2397
+ * @param tokenId The token ID of the NFT.
2398
+ * @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
2399
+ */
2394
2400
  }, {
2395
2401
  key: "isNFTRegistered",
2396
2402
  value: function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@story-protocol/core-sdk",
3
- "version": "0.0.1-beta-rc.8",
3
+ "version": "0.0.1-beta-rc.10",
4
4
  "description": "Story Protocol Core SDK",
5
5
  "main": "dist/story-protocol-core-sdk.cjs.js",
6
6
  "module": "dist/story-protocol-core-sdk.esm.js",
@@ -32,7 +32,7 @@
32
32
  "abitype": "^0.10.2",
33
33
  "axios": "^1.5.1",
34
34
  "dotenv": "^16.3.1",
35
- "viem": "^1.18.4"
35
+ "viem": "^2.7.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/core": "^7.23.0",
@@ -79,10 +79,10 @@
79
79
  "src/types/**/*"
80
80
  ],
81
81
  "check-coverage": true,
82
- "lines": 40,
83
- "functions": 40,
84
- "branches": 40,
85
- "statements": 40
82
+ "lines": 90,
83
+ "functions": 90,
84
+ "branches": 90,
85
+ "statements": 90
86
86
  },
87
87
  "typedoc": {
88
88
  "entryPoint": "./src/index.ts",