@story-protocol/core-sdk 0.0.1-beta-rc.8 → 0.0.1-beta-rc.10
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.
- package/README.md +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +10 -18
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +0 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +29 -23
- package/dist/story-protocol-core-sdk.cjs.prod.js +29 -23
- package/dist/story-protocol-core-sdk.esm.js +29 -23
- package/package.json +6 -6
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
|
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
|
-
|
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;
|
1
|
+
{"version":3,"file":"ipAsset.d.ts","sourceRoot":"../../../../src/resources","sources":["ipAsset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,EAAc,MAAM,MAAM,CAAC;AAKnE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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K,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: "
|
1919
|
-
AncestorsVaultLAP: "
|
1920
|
-
ArbitrationPolicySP: "
|
1921
|
-
DisputeModule: "
|
1922
|
-
Governance: "
|
1923
|
-
IPAccountImpl: "
|
1924
|
-
IPAccountRegistry: "
|
1925
|
-
IPAssetRegistry: "
|
1926
|
-
IPAssetRenderer: "
|
1927
|
-
IPMetadataProvider: "
|
1928
|
-
IPResolver: "
|
1929
|
-
LicenseRegistry: "
|
1930
|
-
LicensingModule: "
|
1931
|
-
MockERC20: "
|
1932
|
-
MockERC721: "
|
1933
|
-
MockTokenGatedHook: "
|
1934
|
-
ModuleRegistry: "
|
1935
|
-
PILPolicyFrameworkManager: "
|
1936
|
-
RegistrationModule: "
|
1937
|
-
RoyaltyModule: "
|
1938
|
-
RoyaltyPolicyLAP: "
|
1939
|
-
TokenWithdrawalModule: "
|
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: "
|
1919
|
-
AncestorsVaultLAP: "
|
1920
|
-
ArbitrationPolicySP: "
|
1921
|
-
DisputeModule: "
|
1922
|
-
Governance: "
|
1923
|
-
IPAccountImpl: "
|
1924
|
-
IPAccountRegistry: "
|
1925
|
-
IPAssetRegistry: "
|
1926
|
-
IPAssetRenderer: "
|
1927
|
-
IPMetadataProvider: "
|
1928
|
-
IPResolver: "
|
1929
|
-
LicenseRegistry: "
|
1930
|
-
LicensingModule: "
|
1931
|
-
MockERC20: "
|
1932
|
-
MockERC721: "
|
1933
|
-
MockTokenGatedHook: "
|
1934
|
-
ModuleRegistry: "
|
1935
|
-
PILPolicyFrameworkManager: "
|
1936
|
-
RegistrationModule: "
|
1937
|
-
RoyaltyModule: "
|
1938
|
-
RoyaltyPolicyLAP: "
|
1939
|
-
TokenWithdrawalModule: "
|
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: "
|
1892
|
-
AncestorsVaultLAP: "
|
1893
|
-
ArbitrationPolicySP: "
|
1894
|
-
DisputeModule: "
|
1895
|
-
Governance: "
|
1896
|
-
IPAccountImpl: "
|
1897
|
-
IPAccountRegistry: "
|
1898
|
-
IPAssetRegistry: "
|
1899
|
-
IPAssetRenderer: "
|
1900
|
-
IPMetadataProvider: "
|
1901
|
-
IPResolver: "
|
1902
|
-
LicenseRegistry: "
|
1903
|
-
LicensingModule: "
|
1904
|
-
MockERC20: "
|
1905
|
-
MockERC721: "
|
1906
|
-
MockTokenGatedHook: "
|
1907
|
-
ModuleRegistry: "
|
1908
|
-
PILPolicyFrameworkManager: "
|
1909
|
-
RegistrationModule: "
|
1910
|
-
RoyaltyModule: "
|
1911
|
-
RoyaltyPolicyLAP: "
|
1912
|
-
TokenWithdrawalModule: "
|
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.
|
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": "^
|
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":
|
83
|
-
"functions":
|
84
|
-
"branches":
|
85
|
-
"statements":
|
82
|
+
"lines": 90,
|
83
|
+
"functions": 90,
|
84
|
+
"branches": 90,
|
85
|
+
"statements": 90
|
86
86
|
},
|
87
87
|
"typedoc": {
|
88
88
|
"entryPoint": "./src/index.ts",
|