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

Sign up to get free protection for your applications and to get access to all the features.
@@ -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";
@@ -851,6 +837,13 @@ export declare class IPAssetClient {
851
837
  * @emits RootIPRegistered (msg.sender, ipId, policyId)
852
838
  */
853
839
  registerDerivativeIp(request: RegisterDerivativeIpRequest): Promise<RegisterDerivativeIpResponse>;
854
- 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>;
855
848
  }
856
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAyB;IAC9C,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAQ/B;;;;;;;;;;;;;;mBAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAO,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAchG"}
@@ -2417,6 +2417,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2417
2417
  }
2418
2418
  return registerDerivativeIp;
2419
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
+ */
2420
2427
  }, {
2421
2428
  key: "isNFTRegistered",
2422
2429
  value: function () {
@@ -2417,6 +2417,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2417
2417
  }
2418
2418
  return registerDerivativeIp;
2419
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
+ */
2420
2427
  }, {
2421
2428
  key: "isNFTRegistered",
2422
2429
  value: function () {
@@ -2390,6 +2390,13 @@ var IPAssetClient = /*#__PURE__*/function () {
2390
2390
  }
2391
2391
  return registerDerivativeIp;
2392
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
+ */
2393
2400
  }, {
2394
2401
  key: "isNFTRegistered",
2395
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.9",
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",