@story-protocol/core-sdk 0.0.1-beta-rc.9 → 0.0.1-beta-rc.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/resources/ipAsset.d.ts +10 -17
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/config.d.ts +2 -2
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.d.ts +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +58 -53
- package/dist/story-protocol-core-sdk.cjs.prod.js +58 -53
- package/dist/story-protocol-core-sdk.esm.js +58 -53
- package/package.json +2 -2
- package/dist/story-protocol-core-sdk.cjs.d.ts.map +0 -1
@@ -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
|
-
|
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;
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Account, Transport } from "viem";
|
1
|
+
import { Account, Transport, Address } from "viem";
|
2
2
|
/**
|
3
3
|
* Supported chains. For convenience, both name or chain ID are supported.
|
4
4
|
*
|
@@ -11,7 +11,7 @@ export type SupportedChainIds = "11155111" | "sepolia" | "1" | "mainnet" | "8000
|
|
11
11
|
* @public
|
12
12
|
*/
|
13
13
|
export interface StoryConfig {
|
14
|
-
readonly account: Account;
|
14
|
+
readonly account: Account | Address;
|
15
15
|
readonly chainId?: SupportedChainIds;
|
16
16
|
readonly transport: Transport;
|
17
17
|
}
|
@@ -1 +1 @@
|
|
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;
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"../../../../src/types","sources":["config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEnD;;;;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,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B"}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export * from "./declarations/src/index";
|
2
|
-
//# sourceMappingURL=
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcnktcHJvdG9jb2wtY29yZS1zZGsuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
@@ -30,24 +30,24 @@ function _interopNamespace(e) {
|
|
30
30
|
var dotenv__namespace = /*#__PURE__*/_interopNamespace(dotenv);
|
31
31
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
32
32
|
|
33
|
-
function
|
34
|
-
if (
|
35
|
-
var
|
36
|
-
if (
|
37
|
-
var
|
38
|
-
if (
|
33
|
+
function toPrimitive(t, r) {
|
34
|
+
if ("object" != typeof t || !t) return t;
|
35
|
+
var e = t[Symbol.toPrimitive];
|
36
|
+
if (void 0 !== e) {
|
37
|
+
var i = e.call(t, r || "default");
|
38
|
+
if ("object" != typeof i) return i;
|
39
39
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
40
40
|
}
|
41
|
-
return (
|
41
|
+
return ("string" === r ? String : Number)(t);
|
42
42
|
}
|
43
43
|
|
44
|
-
function
|
45
|
-
var
|
46
|
-
return
|
44
|
+
function toPropertyKey(t) {
|
45
|
+
var i = toPrimitive(t, "string");
|
46
|
+
return "symbol" == typeof i ? i : i + "";
|
47
47
|
}
|
48
48
|
|
49
49
|
function _defineProperty(obj, key, value) {
|
50
|
-
key =
|
50
|
+
key = toPropertyKey(key);
|
51
51
|
if (key in obj) {
|
52
52
|
Object.defineProperty(obj, key, {
|
53
53
|
value: value,
|
@@ -95,7 +95,7 @@ function _defineProperties(target, props) {
|
|
95
95
|
descriptor.enumerable = descriptor.enumerable || false;
|
96
96
|
descriptor.configurable = true;
|
97
97
|
if ("value" in descriptor) descriptor.writable = true;
|
98
|
-
Object.defineProperty(target,
|
98
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
99
99
|
}
|
100
100
|
}
|
101
101
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -215,7 +215,7 @@ function _regeneratorRuntime() {
|
|
215
215
|
function makeInvokeMethod(e, r, n) {
|
216
216
|
var o = h;
|
217
217
|
return function (i, a) {
|
218
|
-
if (o === f) throw
|
218
|
+
if (o === f) throw Error("Generator is already running");
|
219
219
|
if (o === s) {
|
220
220
|
if ("throw" === i) throw a;
|
221
221
|
return {
|
@@ -357,7 +357,7 @@ function _regeneratorRuntime() {
|
|
357
357
|
} else if (c) {
|
358
358
|
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
359
359
|
} else {
|
360
|
-
if (!u) throw
|
360
|
+
if (!u) throw Error("try statement without catch or finally");
|
361
361
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
362
362
|
}
|
363
363
|
}
|
@@ -397,7 +397,7 @@ function _regeneratorRuntime() {
|
|
397
397
|
return o;
|
398
398
|
}
|
399
399
|
}
|
400
|
-
throw
|
400
|
+
throw Error("illegal catch attempt");
|
401
401
|
},
|
402
402
|
delegateYield: function (e, r, n) {
|
403
403
|
return this.delegate = {
|
@@ -2251,9 +2251,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2251
2251
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2252
2252
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2253
2253
|
*/
|
2254
|
-
_createClass(IPAssetClient, [{
|
2254
|
+
return _createClass(IPAssetClient, [{
|
2255
2255
|
key: "registerRootIp",
|
2256
|
-
value: function () {
|
2256
|
+
value: (function () {
|
2257
2257
|
var _registerRootIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2258
2258
|
var _request$txOptions, ipId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2259
2259
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2337,9 +2337,10 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2337
2337
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2338
2338
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2339
2339
|
*/
|
2340
|
+
)
|
2340
2341
|
}, {
|
2341
2342
|
key: "registerDerivativeIp",
|
2342
|
-
value: function () {
|
2343
|
+
value: (function () {
|
2343
2344
|
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2344
2345
|
var _request$txOptions2, ipId, licenseIds, royaltyContext, _yield$this$rpcClient2, call, txHash, targetLogs;
|
2345
2346
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -2417,9 +2418,17 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2417
2418
|
}
|
2418
2419
|
return registerDerivativeIp;
|
2419
2420
|
}()
|
2421
|
+
/**
|
2422
|
+
* Checks if an NFT is already registered in the protocol.
|
2423
|
+
* @param chainId The chain ID of the NFT.
|
2424
|
+
* @param tokenAddress The address of the NFT.
|
2425
|
+
* @param tokenId The token ID of the NFT.
|
2426
|
+
* @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
|
2427
|
+
*/
|
2428
|
+
)
|
2420
2429
|
}, {
|
2421
2430
|
key: "isNFTRegistered",
|
2422
|
-
value: function () {
|
2431
|
+
value: (function () {
|
2423
2432
|
var _isNFTRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(chainId, tokenAddress, tokenId) {
|
2424
2433
|
var ipId, isRegistered;
|
2425
2434
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -2450,9 +2459,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2450
2459
|
return _isNFTRegistered.apply(this, arguments);
|
2451
2460
|
}
|
2452
2461
|
return isNFTRegistered;
|
2453
|
-
}()
|
2462
|
+
}())
|
2454
2463
|
}]);
|
2455
|
-
return IPAssetClient;
|
2456
2464
|
}();
|
2457
2465
|
|
2458
2466
|
var PermissionClient = /*#__PURE__*/function () {
|
@@ -2483,9 +2491,9 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2483
2491
|
* @returns A Promise that resolves to an object containing the transaction hash
|
2484
2492
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
2485
2493
|
*/
|
2486
|
-
_createClass(PermissionClient, [{
|
2494
|
+
return _createClass(PermissionClient, [{
|
2487
2495
|
key: "setPermission",
|
2488
|
-
value: function () {
|
2496
|
+
value: (function () {
|
2489
2497
|
var _setPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2490
2498
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
2491
2499
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2513,7 +2521,6 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2513
2521
|
request.permission // uint8
|
2514
2522
|
]
|
2515
2523
|
})],
|
2516
|
-
|
2517
2524
|
account: this.wallet.account
|
2518
2525
|
}));
|
2519
2526
|
case 4:
|
@@ -2557,9 +2564,8 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2557
2564
|
return _setPermission.apply(this, arguments);
|
2558
2565
|
}
|
2559
2566
|
return setPermission;
|
2560
|
-
}()
|
2567
|
+
}())
|
2561
2568
|
}]);
|
2562
|
-
return PermissionClient;
|
2563
2569
|
}();
|
2564
2570
|
|
2565
2571
|
var LicenseClient = /*#__PURE__*/function () {
|
@@ -2585,9 +2591,9 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2585
2591
|
* @param request.receiver Receiver address of the minted license NFT(s).
|
2586
2592
|
* @returns licenseId The ID of the minted license NFT(s).
|
2587
2593
|
*/
|
2588
|
-
_createClass(LicenseClient, [{
|
2594
|
+
return _createClass(LicenseClient, [{
|
2589
2595
|
key: "mintLicense",
|
2590
|
-
value: function () {
|
2596
|
+
value: (function () {
|
2591
2597
|
var _mintLicense = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2592
2598
|
var _request$txOptions, royaltyContext, royaltyPolicy, _royaltyContext$targe, _royaltyContext$targe2, targetRoyaltyAmount, _yield$this$rpcClient, call, txHash, targetLogs;
|
2593
2599
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2662,7 +2668,7 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2662
2668
|
return _mintLicense.apply(this, arguments);
|
2663
2669
|
}
|
2664
2670
|
return mintLicense;
|
2665
|
-
}()
|
2671
|
+
}())
|
2666
2672
|
}, {
|
2667
2673
|
key: "linkIpToParent",
|
2668
2674
|
value: function () {
|
@@ -2737,7 +2743,6 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2737
2743
|
return linkIpToParent;
|
2738
2744
|
}()
|
2739
2745
|
}]);
|
2740
|
-
return LicenseClient;
|
2741
2746
|
}();
|
2742
2747
|
|
2743
2748
|
var PolicyClient = /*#__PURE__*/function () {
|
@@ -2770,9 +2775,9 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2770
2775
|
* @param request.royaltyPolicy Address of a royalty policy contract (e.g. RoyaltyPolicyLS) that will handle royalty payments
|
2771
2776
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2772
2777
|
*/
|
2773
|
-
_createClass(PolicyClient, [{
|
2778
|
+
return _createClass(PolicyClient, [{
|
2774
2779
|
key: "registerPILPolicy",
|
2775
|
-
value: function () {
|
2780
|
+
value: (function () {
|
2776
2781
|
var _registerPILPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2777
2782
|
var _request$txOptions, frameworkData, policyId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2778
2783
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2888,9 +2893,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2888
2893
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
2889
2894
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2890
2895
|
*/
|
2896
|
+
)
|
2891
2897
|
}, {
|
2892
2898
|
key: "registerPILSocialRemixPolicy",
|
2893
|
-
value: function () {
|
2899
|
+
value: (function () {
|
2894
2900
|
var _registerPILSocialRemixPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2895
2901
|
var _request$txOptions2, frameworkData, policyId, _yield$this$rpcClient2, call, txHash, targetLog;
|
2896
2902
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3009,9 +3015,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3009
3015
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
3010
3016
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
3011
3017
|
*/
|
3018
|
+
)
|
3012
3019
|
}, {
|
3013
3020
|
key: "registerPILCommercialUsePolicy",
|
3014
|
-
value: function () {
|
3021
|
+
value: (function () {
|
3015
3022
|
var _registerPILCommercialUsePolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3016
3023
|
var _request$txOptions3, frameworkData, policyId, _yield$this$rpcClient3, call, txHash, targetLogs;
|
3017
3024
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3117,7 +3124,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3117
3124
|
return _registerPILCommercialUsePolicy.apply(this, arguments);
|
3118
3125
|
}
|
3119
3126
|
return registerPILCommercialUsePolicy;
|
3120
|
-
}()
|
3127
|
+
}())
|
3121
3128
|
}, {
|
3122
3129
|
key: "getPolicyId",
|
3123
3130
|
value: function () {
|
@@ -3171,7 +3178,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3171
3178
|
*/
|
3172
3179
|
}, {
|
3173
3180
|
key: "addPolicyToIp",
|
3174
|
-
value: function () {
|
3181
|
+
value: (function () {
|
3175
3182
|
var _addPolicyToIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
3176
3183
|
var _request$txOptions4, IPAccountConfig, _yield$this$rpcClient4, call, txHash, targetLogs;
|
3177
3184
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
@@ -3234,9 +3241,8 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3234
3241
|
return _addPolicyToIp.apply(this, arguments);
|
3235
3242
|
}
|
3236
3243
|
return addPolicyToIp;
|
3237
|
-
}()
|
3244
|
+
}())
|
3238
3245
|
}]);
|
3239
|
-
return PolicyClient;
|
3240
3246
|
}();
|
3241
3247
|
|
3242
3248
|
var DisputeClient = /*#__PURE__*/function () {
|
@@ -3263,9 +3269,9 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3263
3269
|
* @calls raiseDispute(address _targetIpId, string memory _linkToDisputeEvidence, bytes32 _targetTag, bytes calldata _data) external nonReentrant returns (uint256) {
|
3264
3270
|
* @emits DisputeRaised (disputeId_, targetIpId, msg.sender, arbitrationPolicy, linkToDisputeEvidence, targetTag, calldata);
|
3265
3271
|
*/
|
3266
|
-
_createClass(DisputeClient, [{
|
3272
|
+
return _createClass(DisputeClient, [{
|
3267
3273
|
key: "raiseDispute",
|
3268
|
-
value: function () {
|
3274
|
+
value: (function () {
|
3269
3275
|
var _raiseDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3270
3276
|
var _request$txOptions, _yield$this$rpcClient, call, txHash, targetLogs;
|
3271
3277
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3332,9 +3338,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3332
3338
|
* @calls cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
|
3333
3339
|
* @emits DisputeCancelled (_disputeId, _data);
|
3334
3340
|
*/
|
3341
|
+
)
|
3335
3342
|
}, {
|
3336
3343
|
key: "cancelDispute",
|
3337
|
-
value: function () {
|
3344
|
+
value: (function () {
|
3338
3345
|
var _cancelDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3339
3346
|
var _request$txOptions2, _yield$this$rpcClient2, call, txHash;
|
3340
3347
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3388,9 +3395,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3388
3395
|
* @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
|
3389
3396
|
* @emits DisputeResolved (_disputeId)
|
3390
3397
|
*/
|
3398
|
+
)
|
3391
3399
|
}, {
|
3392
3400
|
key: "resolveDispute",
|
3393
|
-
value: function () {
|
3401
|
+
value: (function () {
|
3394
3402
|
var _resolveDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3395
3403
|
var _request$txOptions3, _yield$this$rpcClient3, call, txHash;
|
3396
3404
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3434,9 +3442,8 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3434
3442
|
return _resolveDispute.apply(this, arguments);
|
3435
3443
|
}
|
3436
3444
|
return resolveDispute;
|
3437
|
-
}()
|
3445
|
+
}())
|
3438
3446
|
}]);
|
3439
|
-
return DisputeClient;
|
3440
3447
|
}();
|
3441
3448
|
|
3442
3449
|
var IPAccountClient = /*#__PURE__*/function () {
|
@@ -3454,9 +3461,9 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3454
3461
|
* @param request.data The data to send along with the transaction.
|
3455
3462
|
* @returns Tx hash for the transaction.
|
3456
3463
|
*/
|
3457
|
-
_createClass(IPAccountClient, [{
|
3464
|
+
return _createClass(IPAccountClient, [{
|
3458
3465
|
key: "execute",
|
3459
|
-
value: function () {
|
3466
|
+
value: (function () {
|
3460
3467
|
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3461
3468
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
3462
3469
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3515,9 +3522,10 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3515
3522
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
3516
3523
|
* @returns Tx hash for the transaction.
|
3517
3524
|
*/
|
3525
|
+
)
|
3518
3526
|
}, {
|
3519
3527
|
key: "executeWithSig",
|
3520
|
-
value: function () {
|
3528
|
+
value: (function () {
|
3521
3529
|
var _executeWithSig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3522
3530
|
var _request$txOptions2, IPAccountConfig, _yield$this$rpcClient2, call, txHash;
|
3523
3531
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3565,9 +3573,8 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3565
3573
|
return _executeWithSig.apply(this, arguments);
|
3566
3574
|
}
|
3567
3575
|
return executeWithSig;
|
3568
|
-
}()
|
3576
|
+
}())
|
3569
3577
|
}]);
|
3570
|
-
return IPAccountClient;
|
3571
3578
|
}();
|
3572
3579
|
|
3573
3580
|
var StoryAPIClient = /*#__PURE__*/function () {
|
@@ -3581,7 +3588,7 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3581
3588
|
}
|
3582
3589
|
});
|
3583
3590
|
}
|
3584
|
-
_createClass(StoryAPIClient, [{
|
3591
|
+
return _createClass(StoryAPIClient, [{
|
3585
3592
|
key: "getRoyaltyPolicy",
|
3586
3593
|
value: function () {
|
3587
3594
|
var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ipId) {
|
@@ -3654,7 +3661,6 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3654
3661
|
return getPolicy;
|
3655
3662
|
}()
|
3656
3663
|
}]);
|
3657
|
-
return StoryAPIClient;
|
3658
3664
|
}();
|
3659
3665
|
|
3660
3666
|
if (typeof process !== "undefined") {
|
@@ -3699,7 +3705,7 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3699
3705
|
*
|
3700
3706
|
* @param config - the configuration for a new SDK client
|
3701
3707
|
*/
|
3702
|
-
_createClass(StoryClient, [{
|
3708
|
+
return _createClass(StoryClient, [{
|
3703
3709
|
key: "ipAsset",
|
3704
3710
|
get:
|
3705
3711
|
/**
|
@@ -3795,7 +3801,6 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3795
3801
|
return new StoryClient(config);
|
3796
3802
|
}
|
3797
3803
|
}]);
|
3798
|
-
return StoryClient;
|
3799
3804
|
}();
|
3800
3805
|
|
3801
3806
|
exports.AddressZero = AddressZero;
|
@@ -30,24 +30,24 @@ function _interopNamespace(e) {
|
|
30
30
|
var dotenv__namespace = /*#__PURE__*/_interopNamespace(dotenv);
|
31
31
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
32
32
|
|
33
|
-
function
|
34
|
-
if (
|
35
|
-
var
|
36
|
-
if (
|
37
|
-
var
|
38
|
-
if (
|
33
|
+
function toPrimitive(t, r) {
|
34
|
+
if ("object" != typeof t || !t) return t;
|
35
|
+
var e = t[Symbol.toPrimitive];
|
36
|
+
if (void 0 !== e) {
|
37
|
+
var i = e.call(t, r || "default");
|
38
|
+
if ("object" != typeof i) return i;
|
39
39
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
40
40
|
}
|
41
|
-
return (
|
41
|
+
return ("string" === r ? String : Number)(t);
|
42
42
|
}
|
43
43
|
|
44
|
-
function
|
45
|
-
var
|
46
|
-
return
|
44
|
+
function toPropertyKey(t) {
|
45
|
+
var i = toPrimitive(t, "string");
|
46
|
+
return "symbol" == typeof i ? i : i + "";
|
47
47
|
}
|
48
48
|
|
49
49
|
function _defineProperty(obj, key, value) {
|
50
|
-
key =
|
50
|
+
key = toPropertyKey(key);
|
51
51
|
if (key in obj) {
|
52
52
|
Object.defineProperty(obj, key, {
|
53
53
|
value: value,
|
@@ -95,7 +95,7 @@ function _defineProperties(target, props) {
|
|
95
95
|
descriptor.enumerable = descriptor.enumerable || false;
|
96
96
|
descriptor.configurable = true;
|
97
97
|
if ("value" in descriptor) descriptor.writable = true;
|
98
|
-
Object.defineProperty(target,
|
98
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
99
99
|
}
|
100
100
|
}
|
101
101
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -215,7 +215,7 @@ function _regeneratorRuntime() {
|
|
215
215
|
function makeInvokeMethod(e, r, n) {
|
216
216
|
var o = h;
|
217
217
|
return function (i, a) {
|
218
|
-
if (o === f) throw
|
218
|
+
if (o === f) throw Error("Generator is already running");
|
219
219
|
if (o === s) {
|
220
220
|
if ("throw" === i) throw a;
|
221
221
|
return {
|
@@ -357,7 +357,7 @@ function _regeneratorRuntime() {
|
|
357
357
|
} else if (c) {
|
358
358
|
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
359
359
|
} else {
|
360
|
-
if (!u) throw
|
360
|
+
if (!u) throw Error("try statement without catch or finally");
|
361
361
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
362
362
|
}
|
363
363
|
}
|
@@ -397,7 +397,7 @@ function _regeneratorRuntime() {
|
|
397
397
|
return o;
|
398
398
|
}
|
399
399
|
}
|
400
|
-
throw
|
400
|
+
throw Error("illegal catch attempt");
|
401
401
|
},
|
402
402
|
delegateYield: function (e, r, n) {
|
403
403
|
return this.delegate = {
|
@@ -2251,9 +2251,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2251
2251
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2252
2252
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2253
2253
|
*/
|
2254
|
-
_createClass(IPAssetClient, [{
|
2254
|
+
return _createClass(IPAssetClient, [{
|
2255
2255
|
key: "registerRootIp",
|
2256
|
-
value: function () {
|
2256
|
+
value: (function () {
|
2257
2257
|
var _registerRootIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2258
2258
|
var _request$txOptions, ipId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2259
2259
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2337,9 +2337,10 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2337
2337
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2338
2338
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2339
2339
|
*/
|
2340
|
+
)
|
2340
2341
|
}, {
|
2341
2342
|
key: "registerDerivativeIp",
|
2342
|
-
value: function () {
|
2343
|
+
value: (function () {
|
2343
2344
|
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2344
2345
|
var _request$txOptions2, ipId, licenseIds, royaltyContext, _yield$this$rpcClient2, call, txHash, targetLogs;
|
2345
2346
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -2417,9 +2418,17 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2417
2418
|
}
|
2418
2419
|
return registerDerivativeIp;
|
2419
2420
|
}()
|
2421
|
+
/**
|
2422
|
+
* Checks if an NFT is already registered in the protocol.
|
2423
|
+
* @param chainId The chain ID of the NFT.
|
2424
|
+
* @param tokenAddress The address of the NFT.
|
2425
|
+
* @param tokenId The token ID of the NFT.
|
2426
|
+
* @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
|
2427
|
+
*/
|
2428
|
+
)
|
2420
2429
|
}, {
|
2421
2430
|
key: "isNFTRegistered",
|
2422
|
-
value: function () {
|
2431
|
+
value: (function () {
|
2423
2432
|
var _isNFTRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(chainId, tokenAddress, tokenId) {
|
2424
2433
|
var ipId, isRegistered;
|
2425
2434
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -2450,9 +2459,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2450
2459
|
return _isNFTRegistered.apply(this, arguments);
|
2451
2460
|
}
|
2452
2461
|
return isNFTRegistered;
|
2453
|
-
}()
|
2462
|
+
}())
|
2454
2463
|
}]);
|
2455
|
-
return IPAssetClient;
|
2456
2464
|
}();
|
2457
2465
|
|
2458
2466
|
var PermissionClient = /*#__PURE__*/function () {
|
@@ -2483,9 +2491,9 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2483
2491
|
* @returns A Promise that resolves to an object containing the transaction hash
|
2484
2492
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
2485
2493
|
*/
|
2486
|
-
_createClass(PermissionClient, [{
|
2494
|
+
return _createClass(PermissionClient, [{
|
2487
2495
|
key: "setPermission",
|
2488
|
-
value: function () {
|
2496
|
+
value: (function () {
|
2489
2497
|
var _setPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2490
2498
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
2491
2499
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2513,7 +2521,6 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2513
2521
|
request.permission // uint8
|
2514
2522
|
]
|
2515
2523
|
})],
|
2516
|
-
|
2517
2524
|
account: this.wallet.account
|
2518
2525
|
}));
|
2519
2526
|
case 4:
|
@@ -2557,9 +2564,8 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2557
2564
|
return _setPermission.apply(this, arguments);
|
2558
2565
|
}
|
2559
2566
|
return setPermission;
|
2560
|
-
}()
|
2567
|
+
}())
|
2561
2568
|
}]);
|
2562
|
-
return PermissionClient;
|
2563
2569
|
}();
|
2564
2570
|
|
2565
2571
|
var LicenseClient = /*#__PURE__*/function () {
|
@@ -2585,9 +2591,9 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2585
2591
|
* @param request.receiver Receiver address of the minted license NFT(s).
|
2586
2592
|
* @returns licenseId The ID of the minted license NFT(s).
|
2587
2593
|
*/
|
2588
|
-
_createClass(LicenseClient, [{
|
2594
|
+
return _createClass(LicenseClient, [{
|
2589
2595
|
key: "mintLicense",
|
2590
|
-
value: function () {
|
2596
|
+
value: (function () {
|
2591
2597
|
var _mintLicense = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2592
2598
|
var _request$txOptions, royaltyContext, royaltyPolicy, _royaltyContext$targe, _royaltyContext$targe2, targetRoyaltyAmount, _yield$this$rpcClient, call, txHash, targetLogs;
|
2593
2599
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2662,7 +2668,7 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2662
2668
|
return _mintLicense.apply(this, arguments);
|
2663
2669
|
}
|
2664
2670
|
return mintLicense;
|
2665
|
-
}()
|
2671
|
+
}())
|
2666
2672
|
}, {
|
2667
2673
|
key: "linkIpToParent",
|
2668
2674
|
value: function () {
|
@@ -2737,7 +2743,6 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2737
2743
|
return linkIpToParent;
|
2738
2744
|
}()
|
2739
2745
|
}]);
|
2740
|
-
return LicenseClient;
|
2741
2746
|
}();
|
2742
2747
|
|
2743
2748
|
var PolicyClient = /*#__PURE__*/function () {
|
@@ -2770,9 +2775,9 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2770
2775
|
* @param request.royaltyPolicy Address of a royalty policy contract (e.g. RoyaltyPolicyLS) that will handle royalty payments
|
2771
2776
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2772
2777
|
*/
|
2773
|
-
_createClass(PolicyClient, [{
|
2778
|
+
return _createClass(PolicyClient, [{
|
2774
2779
|
key: "registerPILPolicy",
|
2775
|
-
value: function () {
|
2780
|
+
value: (function () {
|
2776
2781
|
var _registerPILPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2777
2782
|
var _request$txOptions, frameworkData, policyId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2778
2783
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2888,9 +2893,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2888
2893
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
2889
2894
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2890
2895
|
*/
|
2896
|
+
)
|
2891
2897
|
}, {
|
2892
2898
|
key: "registerPILSocialRemixPolicy",
|
2893
|
-
value: function () {
|
2899
|
+
value: (function () {
|
2894
2900
|
var _registerPILSocialRemixPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2895
2901
|
var _request$txOptions2, frameworkData, policyId, _yield$this$rpcClient2, call, txHash, targetLog;
|
2896
2902
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3009,9 +3015,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3009
3015
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
3010
3016
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
3011
3017
|
*/
|
3018
|
+
)
|
3012
3019
|
}, {
|
3013
3020
|
key: "registerPILCommercialUsePolicy",
|
3014
|
-
value: function () {
|
3021
|
+
value: (function () {
|
3015
3022
|
var _registerPILCommercialUsePolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3016
3023
|
var _request$txOptions3, frameworkData, policyId, _yield$this$rpcClient3, call, txHash, targetLogs;
|
3017
3024
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3117,7 +3124,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3117
3124
|
return _registerPILCommercialUsePolicy.apply(this, arguments);
|
3118
3125
|
}
|
3119
3126
|
return registerPILCommercialUsePolicy;
|
3120
|
-
}()
|
3127
|
+
}())
|
3121
3128
|
}, {
|
3122
3129
|
key: "getPolicyId",
|
3123
3130
|
value: function () {
|
@@ -3171,7 +3178,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3171
3178
|
*/
|
3172
3179
|
}, {
|
3173
3180
|
key: "addPolicyToIp",
|
3174
|
-
value: function () {
|
3181
|
+
value: (function () {
|
3175
3182
|
var _addPolicyToIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
3176
3183
|
var _request$txOptions4, IPAccountConfig, _yield$this$rpcClient4, call, txHash, targetLogs;
|
3177
3184
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
@@ -3234,9 +3241,8 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3234
3241
|
return _addPolicyToIp.apply(this, arguments);
|
3235
3242
|
}
|
3236
3243
|
return addPolicyToIp;
|
3237
|
-
}()
|
3244
|
+
}())
|
3238
3245
|
}]);
|
3239
|
-
return PolicyClient;
|
3240
3246
|
}();
|
3241
3247
|
|
3242
3248
|
var DisputeClient = /*#__PURE__*/function () {
|
@@ -3263,9 +3269,9 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3263
3269
|
* @calls raiseDispute(address _targetIpId, string memory _linkToDisputeEvidence, bytes32 _targetTag, bytes calldata _data) external nonReentrant returns (uint256) {
|
3264
3270
|
* @emits DisputeRaised (disputeId_, targetIpId, msg.sender, arbitrationPolicy, linkToDisputeEvidence, targetTag, calldata);
|
3265
3271
|
*/
|
3266
|
-
_createClass(DisputeClient, [{
|
3272
|
+
return _createClass(DisputeClient, [{
|
3267
3273
|
key: "raiseDispute",
|
3268
|
-
value: function () {
|
3274
|
+
value: (function () {
|
3269
3275
|
var _raiseDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3270
3276
|
var _request$txOptions, _yield$this$rpcClient, call, txHash, targetLogs;
|
3271
3277
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3332,9 +3338,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3332
3338
|
* @calls cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
|
3333
3339
|
* @emits DisputeCancelled (_disputeId, _data);
|
3334
3340
|
*/
|
3341
|
+
)
|
3335
3342
|
}, {
|
3336
3343
|
key: "cancelDispute",
|
3337
|
-
value: function () {
|
3344
|
+
value: (function () {
|
3338
3345
|
var _cancelDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3339
3346
|
var _request$txOptions2, _yield$this$rpcClient2, call, txHash;
|
3340
3347
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3388,9 +3395,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3388
3395
|
* @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
|
3389
3396
|
* @emits DisputeResolved (_disputeId)
|
3390
3397
|
*/
|
3398
|
+
)
|
3391
3399
|
}, {
|
3392
3400
|
key: "resolveDispute",
|
3393
|
-
value: function () {
|
3401
|
+
value: (function () {
|
3394
3402
|
var _resolveDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3395
3403
|
var _request$txOptions3, _yield$this$rpcClient3, call, txHash;
|
3396
3404
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3434,9 +3442,8 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3434
3442
|
return _resolveDispute.apply(this, arguments);
|
3435
3443
|
}
|
3436
3444
|
return resolveDispute;
|
3437
|
-
}()
|
3445
|
+
}())
|
3438
3446
|
}]);
|
3439
|
-
return DisputeClient;
|
3440
3447
|
}();
|
3441
3448
|
|
3442
3449
|
var IPAccountClient = /*#__PURE__*/function () {
|
@@ -3454,9 +3461,9 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3454
3461
|
* @param request.data The data to send along with the transaction.
|
3455
3462
|
* @returns Tx hash for the transaction.
|
3456
3463
|
*/
|
3457
|
-
_createClass(IPAccountClient, [{
|
3464
|
+
return _createClass(IPAccountClient, [{
|
3458
3465
|
key: "execute",
|
3459
|
-
value: function () {
|
3466
|
+
value: (function () {
|
3460
3467
|
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3461
3468
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
3462
3469
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3515,9 +3522,10 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3515
3522
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
3516
3523
|
* @returns Tx hash for the transaction.
|
3517
3524
|
*/
|
3525
|
+
)
|
3518
3526
|
}, {
|
3519
3527
|
key: "executeWithSig",
|
3520
|
-
value: function () {
|
3528
|
+
value: (function () {
|
3521
3529
|
var _executeWithSig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3522
3530
|
var _request$txOptions2, IPAccountConfig, _yield$this$rpcClient2, call, txHash;
|
3523
3531
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3565,9 +3573,8 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3565
3573
|
return _executeWithSig.apply(this, arguments);
|
3566
3574
|
}
|
3567
3575
|
return executeWithSig;
|
3568
|
-
}()
|
3576
|
+
}())
|
3569
3577
|
}]);
|
3570
|
-
return IPAccountClient;
|
3571
3578
|
}();
|
3572
3579
|
|
3573
3580
|
var StoryAPIClient = /*#__PURE__*/function () {
|
@@ -3581,7 +3588,7 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3581
3588
|
}
|
3582
3589
|
});
|
3583
3590
|
}
|
3584
|
-
_createClass(StoryAPIClient, [{
|
3591
|
+
return _createClass(StoryAPIClient, [{
|
3585
3592
|
key: "getRoyaltyPolicy",
|
3586
3593
|
value: function () {
|
3587
3594
|
var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ipId) {
|
@@ -3654,7 +3661,6 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3654
3661
|
return getPolicy;
|
3655
3662
|
}()
|
3656
3663
|
}]);
|
3657
|
-
return StoryAPIClient;
|
3658
3664
|
}();
|
3659
3665
|
|
3660
3666
|
if (typeof process !== "undefined") {
|
@@ -3699,7 +3705,7 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3699
3705
|
*
|
3700
3706
|
* @param config - the configuration for a new SDK client
|
3701
3707
|
*/
|
3702
|
-
_createClass(StoryClient, [{
|
3708
|
+
return _createClass(StoryClient, [{
|
3703
3709
|
key: "ipAsset",
|
3704
3710
|
get:
|
3705
3711
|
/**
|
@@ -3795,7 +3801,6 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3795
3801
|
return new StoryClient(config);
|
3796
3802
|
}
|
3797
3803
|
}]);
|
3798
|
-
return StoryClient;
|
3799
3804
|
}();
|
3800
3805
|
|
3801
3806
|
exports.AddressZero = AddressZero;
|
@@ -3,24 +3,24 @@ import * as dotenv from 'dotenv';
|
|
3
3
|
import { polygonMumbai, sepolia as sepolia$1, mainnet } from 'viem/chains';
|
4
4
|
import axios from 'axios';
|
5
5
|
|
6
|
-
function
|
7
|
-
if (
|
8
|
-
var
|
9
|
-
if (
|
10
|
-
var
|
11
|
-
if (
|
6
|
+
function toPrimitive(t, r) {
|
7
|
+
if ("object" != typeof t || !t) return t;
|
8
|
+
var e = t[Symbol.toPrimitive];
|
9
|
+
if (void 0 !== e) {
|
10
|
+
var i = e.call(t, r || "default");
|
11
|
+
if ("object" != typeof i) return i;
|
12
12
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
13
13
|
}
|
14
|
-
return (
|
14
|
+
return ("string" === r ? String : Number)(t);
|
15
15
|
}
|
16
16
|
|
17
|
-
function
|
18
|
-
var
|
19
|
-
return
|
17
|
+
function toPropertyKey(t) {
|
18
|
+
var i = toPrimitive(t, "string");
|
19
|
+
return "symbol" == typeof i ? i : i + "";
|
20
20
|
}
|
21
21
|
|
22
22
|
function _defineProperty(obj, key, value) {
|
23
|
-
key =
|
23
|
+
key = toPropertyKey(key);
|
24
24
|
if (key in obj) {
|
25
25
|
Object.defineProperty(obj, key, {
|
26
26
|
value: value,
|
@@ -68,7 +68,7 @@ function _defineProperties(target, props) {
|
|
68
68
|
descriptor.enumerable = descriptor.enumerable || false;
|
69
69
|
descriptor.configurable = true;
|
70
70
|
if ("value" in descriptor) descriptor.writable = true;
|
71
|
-
Object.defineProperty(target,
|
71
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
72
72
|
}
|
73
73
|
}
|
74
74
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -188,7 +188,7 @@ function _regeneratorRuntime() {
|
|
188
188
|
function makeInvokeMethod(e, r, n) {
|
189
189
|
var o = h;
|
190
190
|
return function (i, a) {
|
191
|
-
if (o === f) throw
|
191
|
+
if (o === f) throw Error("Generator is already running");
|
192
192
|
if (o === s) {
|
193
193
|
if ("throw" === i) throw a;
|
194
194
|
return {
|
@@ -330,7 +330,7 @@ function _regeneratorRuntime() {
|
|
330
330
|
} else if (c) {
|
331
331
|
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
332
332
|
} else {
|
333
|
-
if (!u) throw
|
333
|
+
if (!u) throw Error("try statement without catch or finally");
|
334
334
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
335
335
|
}
|
336
336
|
}
|
@@ -370,7 +370,7 @@ function _regeneratorRuntime() {
|
|
370
370
|
return o;
|
371
371
|
}
|
372
372
|
}
|
373
|
-
throw
|
373
|
+
throw Error("illegal catch attempt");
|
374
374
|
},
|
375
375
|
delegateYield: function (e, r, n) {
|
376
376
|
return this.delegate = {
|
@@ -2224,9 +2224,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2224
2224
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2225
2225
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2226
2226
|
*/
|
2227
|
-
_createClass(IPAssetClient, [{
|
2227
|
+
return _createClass(IPAssetClient, [{
|
2228
2228
|
key: "registerRootIp",
|
2229
|
-
value: function () {
|
2229
|
+
value: (function () {
|
2230
2230
|
var _registerRootIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2231
2231
|
var _request$txOptions, ipId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2232
2232
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2310,9 +2310,10 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2310
2310
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
2311
2311
|
* @emits RootIPRegistered (msg.sender, ipId, policyId)
|
2312
2312
|
*/
|
2313
|
+
)
|
2313
2314
|
}, {
|
2314
2315
|
key: "registerDerivativeIp",
|
2315
|
-
value: function () {
|
2316
|
+
value: (function () {
|
2316
2317
|
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2317
2318
|
var _request$txOptions2, ipId, licenseIds, royaltyContext, _yield$this$rpcClient2, call, txHash, targetLogs;
|
2318
2319
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -2390,9 +2391,17 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2390
2391
|
}
|
2391
2392
|
return registerDerivativeIp;
|
2392
2393
|
}()
|
2394
|
+
/**
|
2395
|
+
* Checks if an NFT is already registered in the protocol.
|
2396
|
+
* @param chainId The chain ID of the NFT.
|
2397
|
+
* @param tokenAddress The address of the NFT.
|
2398
|
+
* @param tokenId The token ID of the NFT.
|
2399
|
+
* @returns A Promise that resolves to the IP ID if the NFT is already registered, otherwise it resolves to 0x.
|
2400
|
+
*/
|
2401
|
+
)
|
2393
2402
|
}, {
|
2394
2403
|
key: "isNFTRegistered",
|
2395
|
-
value: function () {
|
2404
|
+
value: (function () {
|
2396
2405
|
var _isNFTRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(chainId, tokenAddress, tokenId) {
|
2397
2406
|
var ipId, isRegistered;
|
2398
2407
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -2423,9 +2432,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
2423
2432
|
return _isNFTRegistered.apply(this, arguments);
|
2424
2433
|
}
|
2425
2434
|
return isNFTRegistered;
|
2426
|
-
}()
|
2435
|
+
}())
|
2427
2436
|
}]);
|
2428
|
-
return IPAssetClient;
|
2429
2437
|
}();
|
2430
2438
|
|
2431
2439
|
var PermissionClient = /*#__PURE__*/function () {
|
@@ -2456,9 +2464,9 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2456
2464
|
* @returns A Promise that resolves to an object containing the transaction hash
|
2457
2465
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
2458
2466
|
*/
|
2459
|
-
_createClass(PermissionClient, [{
|
2467
|
+
return _createClass(PermissionClient, [{
|
2460
2468
|
key: "setPermission",
|
2461
|
-
value: function () {
|
2469
|
+
value: (function () {
|
2462
2470
|
var _setPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2463
2471
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
2464
2472
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2486,7 +2494,6 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2486
2494
|
request.permission // uint8
|
2487
2495
|
]
|
2488
2496
|
})],
|
2489
|
-
|
2490
2497
|
account: this.wallet.account
|
2491
2498
|
}));
|
2492
2499
|
case 4:
|
@@ -2530,9 +2537,8 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
2530
2537
|
return _setPermission.apply(this, arguments);
|
2531
2538
|
}
|
2532
2539
|
return setPermission;
|
2533
|
-
}()
|
2540
|
+
}())
|
2534
2541
|
}]);
|
2535
|
-
return PermissionClient;
|
2536
2542
|
}();
|
2537
2543
|
|
2538
2544
|
var LicenseClient = /*#__PURE__*/function () {
|
@@ -2558,9 +2564,9 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2558
2564
|
* @param request.receiver Receiver address of the minted license NFT(s).
|
2559
2565
|
* @returns licenseId The ID of the minted license NFT(s).
|
2560
2566
|
*/
|
2561
|
-
_createClass(LicenseClient, [{
|
2567
|
+
return _createClass(LicenseClient, [{
|
2562
2568
|
key: "mintLicense",
|
2563
|
-
value: function () {
|
2569
|
+
value: (function () {
|
2564
2570
|
var _mintLicense = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2565
2571
|
var _request$txOptions, royaltyContext, royaltyPolicy, _royaltyContext$targe, _royaltyContext$targe2, targetRoyaltyAmount, _yield$this$rpcClient, call, txHash, targetLogs;
|
2566
2572
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2635,7 +2641,7 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2635
2641
|
return _mintLicense.apply(this, arguments);
|
2636
2642
|
}
|
2637
2643
|
return mintLicense;
|
2638
|
-
}()
|
2644
|
+
}())
|
2639
2645
|
}, {
|
2640
2646
|
key: "linkIpToParent",
|
2641
2647
|
value: function () {
|
@@ -2710,7 +2716,6 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
2710
2716
|
return linkIpToParent;
|
2711
2717
|
}()
|
2712
2718
|
}]);
|
2713
|
-
return LicenseClient;
|
2714
2719
|
}();
|
2715
2720
|
|
2716
2721
|
var PolicyClient = /*#__PURE__*/function () {
|
@@ -2743,9 +2748,9 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2743
2748
|
* @param request.royaltyPolicy Address of a royalty policy contract (e.g. RoyaltyPolicyLS) that will handle royalty payments
|
2744
2749
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2745
2750
|
*/
|
2746
|
-
_createClass(PolicyClient, [{
|
2751
|
+
return _createClass(PolicyClient, [{
|
2747
2752
|
key: "registerPILPolicy",
|
2748
|
-
value: function () {
|
2753
|
+
value: (function () {
|
2749
2754
|
var _registerPILPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
2750
2755
|
var _request$txOptions, frameworkData, policyId, _yield$this$rpcClient, call, txHash, targetLogs;
|
2751
2756
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -2861,9 +2866,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2861
2866
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
2862
2867
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2863
2868
|
*/
|
2869
|
+
)
|
2864
2870
|
}, {
|
2865
2871
|
key: "registerPILSocialRemixPolicy",
|
2866
|
-
value: function () {
|
2872
|
+
value: (function () {
|
2867
2873
|
var _registerPILSocialRemixPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
2868
2874
|
var _request$txOptions2, frameworkData, policyId, _yield$this$rpcClient2, call, txHash, targetLog;
|
2869
2875
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -2982,9 +2988,10 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
2982
2988
|
* @param request.contentRestrictions List of content restrictions where the license is valid. Empty if no restrictions.
|
2983
2989
|
* @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
|
2984
2990
|
*/
|
2991
|
+
)
|
2985
2992
|
}, {
|
2986
2993
|
key: "registerPILCommercialUsePolicy",
|
2987
|
-
value: function () {
|
2994
|
+
value: (function () {
|
2988
2995
|
var _registerPILCommercialUsePolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
2989
2996
|
var _request$txOptions3, frameworkData, policyId, _yield$this$rpcClient3, call, txHash, targetLogs;
|
2990
2997
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3090,7 +3097,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3090
3097
|
return _registerPILCommercialUsePolicy.apply(this, arguments);
|
3091
3098
|
}
|
3092
3099
|
return registerPILCommercialUsePolicy;
|
3093
|
-
}()
|
3100
|
+
}())
|
3094
3101
|
}, {
|
3095
3102
|
key: "getPolicyId",
|
3096
3103
|
value: function () {
|
@@ -3144,7 +3151,7 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3144
3151
|
*/
|
3145
3152
|
}, {
|
3146
3153
|
key: "addPolicyToIp",
|
3147
|
-
value: function () {
|
3154
|
+
value: (function () {
|
3148
3155
|
var _addPolicyToIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
3149
3156
|
var _request$txOptions4, IPAccountConfig, _yield$this$rpcClient4, call, txHash, targetLogs;
|
3150
3157
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
@@ -3207,9 +3214,8 @@ var PolicyClient = /*#__PURE__*/function () {
|
|
3207
3214
|
return _addPolicyToIp.apply(this, arguments);
|
3208
3215
|
}
|
3209
3216
|
return addPolicyToIp;
|
3210
|
-
}()
|
3217
|
+
}())
|
3211
3218
|
}]);
|
3212
|
-
return PolicyClient;
|
3213
3219
|
}();
|
3214
3220
|
|
3215
3221
|
var DisputeClient = /*#__PURE__*/function () {
|
@@ -3236,9 +3242,9 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3236
3242
|
* @calls raiseDispute(address _targetIpId, string memory _linkToDisputeEvidence, bytes32 _targetTag, bytes calldata _data) external nonReentrant returns (uint256) {
|
3237
3243
|
* @emits DisputeRaised (disputeId_, targetIpId, msg.sender, arbitrationPolicy, linkToDisputeEvidence, targetTag, calldata);
|
3238
3244
|
*/
|
3239
|
-
_createClass(DisputeClient, [{
|
3245
|
+
return _createClass(DisputeClient, [{
|
3240
3246
|
key: "raiseDispute",
|
3241
|
-
value: function () {
|
3247
|
+
value: (function () {
|
3242
3248
|
var _raiseDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3243
3249
|
var _request$txOptions, _yield$this$rpcClient, call, txHash, targetLogs;
|
3244
3250
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3305,9 +3311,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3305
3311
|
* @calls cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
|
3306
3312
|
* @emits DisputeCancelled (_disputeId, _data);
|
3307
3313
|
*/
|
3314
|
+
)
|
3308
3315
|
}, {
|
3309
3316
|
key: "cancelDispute",
|
3310
|
-
value: function () {
|
3317
|
+
value: (function () {
|
3311
3318
|
var _cancelDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3312
3319
|
var _request$txOptions2, _yield$this$rpcClient2, call, txHash;
|
3313
3320
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3361,9 +3368,10 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3361
3368
|
* @throws NotDisputeInitiator, if the transaction executor is not the one that initiated the dispute
|
3362
3369
|
* @emits DisputeResolved (_disputeId)
|
3363
3370
|
*/
|
3371
|
+
)
|
3364
3372
|
}, {
|
3365
3373
|
key: "resolveDispute",
|
3366
|
-
value: function () {
|
3374
|
+
value: (function () {
|
3367
3375
|
var _resolveDispute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3368
3376
|
var _request$txOptions3, _yield$this$rpcClient3, call, txHash;
|
3369
3377
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
@@ -3407,9 +3415,8 @@ var DisputeClient = /*#__PURE__*/function () {
|
|
3407
3415
|
return _resolveDispute.apply(this, arguments);
|
3408
3416
|
}
|
3409
3417
|
return resolveDispute;
|
3410
|
-
}()
|
3418
|
+
}())
|
3411
3419
|
}]);
|
3412
|
-
return DisputeClient;
|
3413
3420
|
}();
|
3414
3421
|
|
3415
3422
|
var IPAccountClient = /*#__PURE__*/function () {
|
@@ -3427,9 +3434,9 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3427
3434
|
* @param request.data The data to send along with the transaction.
|
3428
3435
|
* @returns Tx hash for the transaction.
|
3429
3436
|
*/
|
3430
|
-
_createClass(IPAccountClient, [{
|
3437
|
+
return _createClass(IPAccountClient, [{
|
3431
3438
|
key: "execute",
|
3432
|
-
value: function () {
|
3439
|
+
value: (function () {
|
3433
3440
|
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3434
3441
|
var _request$txOptions, IPAccountConfig, _yield$this$rpcClient, call, txHash;
|
3435
3442
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -3488,9 +3495,10 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3488
3495
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
3489
3496
|
* @returns Tx hash for the transaction.
|
3490
3497
|
*/
|
3498
|
+
)
|
3491
3499
|
}, {
|
3492
3500
|
key: "executeWithSig",
|
3493
|
-
value: function () {
|
3501
|
+
value: (function () {
|
3494
3502
|
var _executeWithSig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3495
3503
|
var _request$txOptions2, IPAccountConfig, _yield$this$rpcClient2, call, txHash;
|
3496
3504
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -3538,9 +3546,8 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
3538
3546
|
return _executeWithSig.apply(this, arguments);
|
3539
3547
|
}
|
3540
3548
|
return executeWithSig;
|
3541
|
-
}()
|
3549
|
+
}())
|
3542
3550
|
}]);
|
3543
|
-
return IPAccountClient;
|
3544
3551
|
}();
|
3545
3552
|
|
3546
3553
|
var StoryAPIClient = /*#__PURE__*/function () {
|
@@ -3554,7 +3561,7 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3554
3561
|
}
|
3555
3562
|
});
|
3556
3563
|
}
|
3557
|
-
_createClass(StoryAPIClient, [{
|
3564
|
+
return _createClass(StoryAPIClient, [{
|
3558
3565
|
key: "getRoyaltyPolicy",
|
3559
3566
|
value: function () {
|
3560
3567
|
var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ipId) {
|
@@ -3627,7 +3634,6 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
3627
3634
|
return getPolicy;
|
3628
3635
|
}()
|
3629
3636
|
}]);
|
3630
|
-
return StoryAPIClient;
|
3631
3637
|
}();
|
3632
3638
|
|
3633
3639
|
if (typeof process !== "undefined") {
|
@@ -3672,7 +3678,7 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3672
3678
|
*
|
3673
3679
|
* @param config - the configuration for a new SDK client
|
3674
3680
|
*/
|
3675
|
-
_createClass(StoryClient, [{
|
3681
|
+
return _createClass(StoryClient, [{
|
3676
3682
|
key: "ipAsset",
|
3677
3683
|
get:
|
3678
3684
|
/**
|
@@ -3768,7 +3774,6 @@ var StoryClient = /*#__PURE__*/function () {
|
|
3768
3774
|
return new StoryClient(config);
|
3769
3775
|
}
|
3770
3776
|
}]);
|
3771
|
-
return StoryClient;
|
3772
3777
|
}();
|
3773
3778
|
|
3774
3779
|
export { AddressZero, DisputeClient, HashZero, IPAssetClient, LicenseClient, PermissionClient, PolicyClient, StoryClient };
|
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.11",
|
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.8.12"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
38
|
"@babel/core": "^7.23.0",
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"story-protocol-core-sdk.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|