@story-protocol/core-sdk 0.0.1-beta-rc.11 → 0.0.1-beta-rc.13

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.
Files changed (33) hide show
  1. package/dist/declarations/src/client.d.ts +9 -9
  2. package/dist/declarations/src/client.d.ts.map +1 -1
  3. package/dist/declarations/src/clients/storyAPI.d.ts +0 -2
  4. package/dist/declarations/src/clients/storyAPI.d.ts.map +1 -1
  5. package/dist/declarations/src/index.d.ts +3 -4
  6. package/dist/declarations/src/index.d.ts.map +1 -1
  7. package/dist/declarations/src/resources/dispute.d.ts +419 -78
  8. package/dist/declarations/src/resources/dispute.d.ts.map +1 -1
  9. package/dist/declarations/src/resources/ipAccount.d.ts +400 -76
  10. package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
  11. package/dist/declarations/src/resources/ipAsset.d.ts +26 -756
  12. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  13. package/dist/declarations/src/resources/license.d.ts +3411 -650
  14. package/dist/declarations/src/resources/license.d.ts.map +1 -1
  15. package/dist/declarations/src/resources/permission.d.ts +1000 -313
  16. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  17. package/dist/declarations/src/resources/royalty.d.ts +3103 -0
  18. package/dist/declarations/src/resources/{policy.d.ts.map → royalty.d.ts.map} +1 -1
  19. package/dist/declarations/src/types/config.d.ts +6 -2
  20. package/dist/declarations/src/types/config.d.ts.map +1 -1
  21. package/dist/declarations/src/types/resources/ipAsset.d.ts +5 -21
  22. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  23. package/dist/declarations/src/types/resources/license.d.ts +54 -18
  24. package/dist/declarations/src/types/resources/license.d.ts.map +1 -1
  25. package/dist/declarations/src/types/resources/royalty.d.ts +41 -0
  26. package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
  27. package/dist/story-protocol-core-sdk.cjs.dev.js +1580 -1371
  28. package/dist/story-protocol-core-sdk.cjs.prod.js +1580 -1371
  29. package/dist/story-protocol-core-sdk.esm.js +1583 -1373
  30. package/package.json +5 -5
  31. package/dist/declarations/src/resources/policy.d.ts +0 -2436
  32. package/dist/declarations/src/types/resources/policy.d.ts +0 -83
  33. package/dist/declarations/src/types/resources/policy.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
- import { PublicClient, WalletClient, Hex } from "viem";
2
- import { StoryAPIClient } from "../clients/storyAPI.js";
3
- import { RegisterDerivativeIpRequest, RegisterDerivativeIpResponse, RegisterRootIpRequest, RegisterRootIpResponse } from "../types/resources/ipAsset.js";
1
+ import { PublicClient, WalletClient } from "viem";
2
+ import { SupportedChainIds } from "../types/config.js";
3
+ import { RegisterIpResponse, RegisterRequest } from "../types/resources/ipAsset.js";
4
4
  export declare class IPAssetClient {
5
5
  private readonly wallet;
6
6
  private readonly rpcClient;
7
- private readonly storyClient;
7
+ private readonly chainId;
8
8
  ipAssetRegistryConfig: {
9
9
  abi: readonly [{
10
10
  readonly anonymous: false;
@@ -30,19 +30,19 @@ export declare class IPAssetClient {
30
30
  readonly type: "uint256";
31
31
  }, {
32
32
  readonly indexed: false;
33
- readonly internalType: "address";
34
- readonly name: "resolver";
35
- readonly type: "address";
33
+ readonly internalType: "string";
34
+ readonly name: "name";
35
+ readonly type: "string";
36
36
  }, {
37
37
  readonly indexed: false;
38
- readonly internalType: "address";
39
- readonly name: "provider";
40
- readonly type: "address";
38
+ readonly internalType: "string";
39
+ readonly name: "uri";
40
+ readonly type: "string";
41
41
  }, {
42
42
  readonly indexed: false;
43
- readonly internalType: "bytes";
44
- readonly name: "metadata";
45
- readonly type: "bytes";
43
+ readonly internalType: "uint256";
44
+ readonly name: "registrationDate";
45
+ readonly type: "uint256";
46
46
  }];
47
47
  readonly name: "IPRegistered";
48
48
  readonly type: "event";
@@ -82,50 +82,8 @@ export declare class IPAssetClient {
82
82
  }];
83
83
  readonly stateMutability: "view";
84
84
  readonly type: "function";
85
- }];
86
- address: `0x${string}`;
87
- };
88
- registrationModuleConfig: {
89
- abi: ({
90
- readonly inputs: readonly [{
91
- readonly internalType: "uint256[]";
92
- readonly name: "licenseIds";
93
- readonly type: "uint256[]";
94
- }, {
95
- readonly internalType: "address";
96
- readonly name: "tokenContract";
97
- readonly type: "address";
98
- }, {
99
- readonly internalType: "uint256";
100
- readonly name: "tokenId";
101
- readonly type: "uint256";
102
- }, {
103
- readonly internalType: "string";
104
- readonly name: "ipName";
105
- readonly type: "string";
106
- }, {
107
- readonly internalType: "bytes32";
108
- readonly name: "contentHash";
109
- readonly type: "bytes32";
110
- }, {
111
- readonly internalType: "string";
112
- readonly name: "externalURL";
113
- readonly type: "string";
114
- }, {
115
- readonly internalType: "bytes";
116
- readonly name: "royaltyContext";
117
- readonly type: "bytes";
118
- }];
119
- readonly name: "registerDerivativeIp";
120
- readonly outputs: readonly [];
121
- readonly stateMutability: "nonpayable";
122
- readonly type: "function";
123
- } | {
85
+ }, {
124
86
  readonly inputs: readonly [{
125
- readonly internalType: "uint256";
126
- readonly name: "policyId";
127
- readonly type: "uint256";
128
- }, {
129
87
  readonly internalType: "address";
130
88
  readonly name: "tokenContract";
131
89
  readonly type: "address";
@@ -133,717 +91,29 @@ export declare class IPAssetClient {
133
91
  readonly internalType: "uint256";
134
92
  readonly name: "tokenId";
135
93
  readonly type: "uint256";
136
- }, {
137
- readonly internalType: "string";
138
- readonly name: "ipName";
139
- readonly type: "string";
140
- }, {
141
- readonly internalType: "bytes32";
142
- readonly name: "contentHash";
143
- readonly type: "bytes32";
144
- }, {
145
- readonly internalType: "string";
146
- readonly name: "externalURL";
147
- readonly type: "string";
148
94
  }];
149
- readonly name: "registerRootIp";
95
+ readonly name: "register";
150
96
  readonly outputs: readonly [{
151
97
  readonly internalType: "address";
152
- readonly name: "";
98
+ readonly name: "id";
153
99
  readonly type: "address";
154
100
  }];
155
101
  readonly stateMutability: "nonpayable";
156
102
  readonly type: "function";
157
- } | {
158
- readonly inputs: readonly [{
159
- readonly internalType: "address";
160
- readonly name: "caller";
161
- readonly type: "address";
162
- }];
163
- readonly name: "AccessControlled__CallerIsNotIpAccount";
164
- readonly type: "error";
165
- } | {
166
- readonly inputs: readonly [{
167
- readonly internalType: "address";
168
- readonly name: "ipAccount";
169
- readonly type: "address";
170
- }];
171
- readonly name: "AccessControlled__NotIpAccount";
172
- readonly type: "error";
173
- } | {
174
- readonly inputs: readonly [];
175
- readonly name: "AccessControlled__ZeroAddress";
176
- readonly type: "error";
177
- } | {
178
- readonly inputs: readonly [];
179
- readonly name: "AccessController__CallerIsNotIPAccount";
180
- readonly type: "error";
181
- } | {
182
- readonly inputs: readonly [{
183
- readonly internalType: "address";
184
- readonly name: "ipAccount";
185
- readonly type: "address";
186
- }];
187
- readonly name: "AccessController__IPAccountIsNotValid";
188
- readonly type: "error";
189
- } | {
190
- readonly inputs: readonly [];
191
- readonly name: "AccessController__IPAccountIsZeroAddress";
192
- readonly type: "error";
193
- } | {
194
- readonly inputs: readonly [{
195
- readonly internalType: "address";
196
- readonly name: "ipAccount";
197
- readonly type: "address";
198
- }, {
199
- readonly internalType: "address";
200
- readonly name: "signer";
201
- readonly type: "address";
202
- }, {
203
- readonly internalType: "address";
204
- readonly name: "to";
205
- readonly type: "address";
206
- }, {
207
- readonly internalType: "bytes4";
208
- readonly name: "func";
209
- readonly type: "bytes4";
210
- }];
211
- readonly name: "AccessController__PermissionDenied";
212
- readonly type: "error";
213
- } | {
214
- readonly inputs: readonly [];
215
- readonly name: "AccessController__PermissionIsNotValid";
216
- readonly type: "error";
217
- } | {
218
- readonly inputs: readonly [{
219
- readonly internalType: "address";
220
- readonly name: "to";
221
- readonly type: "address";
222
- }];
223
- readonly name: "AccessController__RecipientIsNotRegisteredModule";
224
- readonly type: "error";
225
- } | {
226
- readonly inputs: readonly [];
227
- readonly name: "AccessController__SignerIsZeroAddress";
228
- readonly type: "error";
229
- } | {
230
- readonly inputs: readonly [];
231
- readonly name: "AncestorsVaultLAP__AlreadyClaimed";
232
- readonly type: "error";
233
- } | {
234
- readonly inputs: readonly [];
235
- readonly name: "AncestorsVaultLAP__ClaimerNotAnAncestor";
236
- readonly type: "error";
237
- } | {
238
- readonly inputs: readonly [];
239
- readonly name: "AncestorsVaultLAP__ERC20BalanceNotZero";
240
- readonly type: "error";
241
- } | {
242
- readonly inputs: readonly [];
243
- readonly name: "AncestorsVaultLAP__ETHBalanceNotZero";
244
- readonly type: "error";
245
- } | {
246
- readonly inputs: readonly [];
247
- readonly name: "AncestorsVaultLAP__InvalidAncestorsHash";
248
- readonly type: "error";
249
- } | {
250
- readonly inputs: readonly [];
251
- readonly name: "AncestorsVaultLAP__InvalidClaimer";
252
- readonly type: "error";
253
- } | {
254
- readonly inputs: readonly [];
255
- readonly name: "AncestorsVaultLAP__TransferFailed";
256
- readonly type: "error";
257
- } | {
258
- readonly inputs: readonly [];
259
- readonly name: "AncestorsVaultLAP__ZeroRoyaltyPolicyLAP";
260
- readonly type: "error";
261
- } | {
262
- readonly inputs: readonly [];
263
- readonly name: "ArbitrationPolicySP__NotDisputeModule";
264
- readonly type: "error";
265
- } | {
266
- readonly inputs: readonly [];
267
- readonly name: "ArbitrationPolicySP__ZeroDisputeModule";
268
- readonly type: "error";
269
- } | {
270
- readonly inputs: readonly [];
271
- readonly name: "ArbitrationPolicySP__ZeroPaymentToken";
272
- readonly type: "error";
273
- } | {
274
- readonly inputs: readonly [];
275
- readonly name: "DisputeModule__NotAbleToResolve";
276
- readonly type: "error";
277
- } | {
278
- readonly inputs: readonly [];
279
- readonly name: "DisputeModule__NotDisputeInitiator";
280
- readonly type: "error";
281
- } | {
282
- readonly inputs: readonly [];
283
- readonly name: "DisputeModule__NotInDisputeState";
284
- readonly type: "error";
285
- } | {
286
- readonly inputs: readonly [];
287
- readonly name: "DisputeModule__NotRegisteredIpId";
288
- readonly type: "error";
289
- } | {
290
- readonly inputs: readonly [];
291
- readonly name: "DisputeModule__NotWhitelistedArbitrationPolicy";
292
- readonly type: "error";
293
- } | {
294
- readonly inputs: readonly [];
295
- readonly name: "DisputeModule__NotWhitelistedArbitrationRelayer";
296
- readonly type: "error";
297
- } | {
298
- readonly inputs: readonly [];
299
- readonly name: "DisputeModule__NotWhitelistedDisputeTag";
300
- readonly type: "error";
301
- } | {
302
- readonly inputs: readonly [];
303
- readonly name: "DisputeModule__UnauthorizedAccess";
304
- readonly type: "error";
305
- } | {
306
- readonly inputs: readonly [];
307
- readonly name: "DisputeModule__ZeroArbitrationPolicy";
308
- readonly type: "error";
309
- } | {
310
- readonly inputs: readonly [];
311
- readonly name: "DisputeModule__ZeroArbitrationRelayer";
312
- readonly type: "error";
313
- } | {
314
- readonly inputs: readonly [];
315
- readonly name: "DisputeModule__ZeroDisputeTag";
316
- readonly type: "error";
317
- } | {
318
- readonly inputs: readonly [];
319
- readonly name: "DisputeModule__ZeroLinkToDisputeEvidence";
320
- readonly type: "error";
321
- } | {
322
- readonly inputs: readonly [];
323
- readonly name: "Governance__InconsistentState";
324
- readonly type: "error";
325
- } | {
326
- readonly inputs: readonly [];
327
- readonly name: "Governance__NewStateIsTheSameWithOldState";
328
- readonly type: "error";
329
- } | {
330
- readonly inputs: readonly [];
331
- readonly name: "Governance__OnlyProtocolAdmin";
332
- readonly type: "error";
333
- } | {
334
- readonly inputs: readonly [];
335
- readonly name: "Governance__ProtocolPaused";
336
- readonly type: "error";
337
- } | {
338
- readonly inputs: readonly [{
339
- readonly internalType: "string";
340
- readonly name: "interfaceName";
341
- readonly type: "string";
342
- }];
343
- readonly name: "Governance__UnsupportedInterface";
344
- readonly type: "error";
345
- } | {
346
- readonly inputs: readonly [];
347
- readonly name: "Governance__ZeroAddress";
348
- readonly type: "error";
349
- } | {
350
- readonly inputs: readonly [];
351
- readonly name: "IPAccountRegistry_InvalidIpAccountImpl";
352
- readonly type: "error";
353
- } | {
354
- readonly inputs: readonly [];
355
- readonly name: "IPAccount__ExpiredSignature";
356
- readonly type: "error";
357
- } | {
358
- readonly inputs: readonly [];
359
- readonly name: "IPAccount__InvalidAccessController";
360
- readonly type: "error";
361
- } | {
362
- readonly inputs: readonly [];
363
- readonly name: "IPAccount__InvalidCalldata";
364
- readonly type: "error";
365
- } | {
366
- readonly inputs: readonly [];
367
- readonly name: "IPAccount__InvalidSignature";
368
- readonly type: "error";
369
- } | {
370
- readonly inputs: readonly [];
371
- readonly name: "IPAccount__InvalidSigner";
372
- readonly type: "error";
373
- } | {
374
- readonly inputs: readonly [];
375
- readonly name: "IPAssetRegistry__AlreadyRegistered";
376
- readonly type: "error";
377
- } | {
378
- readonly inputs: readonly [];
379
- readonly name: "IPAssetRegistry__IPAccountAlreadyCreated";
380
- readonly type: "error";
381
- } | {
382
- readonly inputs: readonly [];
383
- readonly name: "IPAssetRegistry__InvalidAccount";
384
- readonly type: "error";
385
- } | {
386
- readonly inputs: readonly [];
387
- readonly name: "IPAssetRegistry__InvalidMetadataProvider";
388
- readonly type: "error";
389
- } | {
390
- readonly inputs: readonly [];
391
- readonly name: "IPAssetRegistry__NotYetRegistered";
392
- readonly type: "error";
393
- } | {
394
- readonly inputs: readonly [];
395
- readonly name: "IPAssetRegistry__RegistrantUnauthorized";
396
- readonly type: "error";
397
- } | {
398
- readonly inputs: readonly [];
399
- readonly name: "IPAssetRegistry__ResolverInvalid";
400
- readonly type: "error";
401
- } | {
402
- readonly inputs: readonly [];
403
- readonly name: "IPAssetRegistry__Unauthorized";
404
- readonly type: "error";
405
- } | {
406
- readonly inputs: readonly [];
407
- readonly name: "IPResolver_InvalidIP";
408
- readonly type: "error";
409
- } | {
410
- readonly inputs: readonly [];
411
- readonly name: "IPResolver_Unauthorized";
412
- readonly type: "error";
413
- } | {
414
- readonly inputs: readonly [];
415
- readonly name: "LicenseRegistry__CallerNotLicensingModule";
416
- readonly type: "error";
417
- } | {
418
- readonly inputs: readonly [];
419
- readonly name: "LicenseRegistry__NotTransferable";
420
- readonly type: "error";
421
- } | {
422
- readonly inputs: readonly [];
423
- readonly name: "LicenseRegistry__RevokedLicense";
424
- readonly type: "error";
425
- } | {
426
- readonly inputs: readonly [];
427
- readonly name: "LicenseRegistry__ZeroDisputeModule";
428
- readonly type: "error";
429
- } | {
430
- readonly inputs: readonly [];
431
- readonly name: "LicenseRegistry__ZeroLicensingModule";
432
- readonly type: "error";
433
- } | {
434
- readonly inputs: readonly [];
435
- readonly name: "LicensingModuleAware__CallerNotLicensingModule";
436
- readonly type: "error";
437
- } | {
438
- readonly inputs: readonly [];
439
- readonly name: "LicensingModule__CallerNotLicenseRegistry";
440
- readonly type: "error";
441
- } | {
442
- readonly inputs: readonly [];
443
- readonly name: "LicensingModule__CallerNotLicensorAndPolicyNotSet";
444
- readonly type: "error";
445
- } | {
446
- readonly inputs: readonly [];
447
- readonly name: "LicensingModule__CommercialTermInNonCommercialPolicy";
448
- readonly type: "error";
449
- } | {
450
- readonly inputs: readonly [];
451
- readonly name: "LicensingModule__DerivativeRevShareSumExceedsMaxRNFTSupply";
452
- readonly type: "error";
453
- } | {
454
- readonly inputs: readonly [];
455
- readonly name: "LicensingModule__DerivativesCannotAddPolicy";
456
- readonly type: "error";
457
- } | {
458
- readonly inputs: readonly [];
459
- readonly name: "LicensingModule__DisputedIpId";
460
- readonly type: "error";
461
- } | {
462
- readonly inputs: readonly [];
463
- readonly name: "LicensingModule__EmptyLicenseUrl";
464
- readonly type: "error";
465
- } | {
466
- readonly inputs: readonly [];
467
- readonly name: "LicensingModule__EmptyParamName";
468
- readonly type: "error";
469
- } | {
470
- readonly inputs: readonly [];
471
- readonly name: "LicensingModule__FrameworkNotFound";
472
- readonly type: "error";
473
- } | {
474
- readonly inputs: readonly [];
475
- readonly name: "LicensingModule__IncompatibleLicensorCommercialPolicy";
476
- readonly type: "error";
477
- } | {
478
- readonly inputs: readonly [];
479
- readonly name: "LicensingModule__IncompatibleLicensorRoyaltyDerivativeRevShare";
480
- readonly type: "error";
481
- } | {
482
- readonly inputs: readonly [];
483
- readonly name: "LicensingModule__IncompatibleRoyaltyPolicyAddress";
484
- readonly type: "error";
485
- } | {
486
- readonly inputs: readonly [];
487
- readonly name: "LicensingModule__IncompatibleRoyaltyPolicyDerivativeRevShare";
488
- readonly type: "error";
489
- } | {
490
- readonly inputs: readonly [];
491
- readonly name: "LicensingModule__InvalidLicensor";
492
- readonly type: "error";
493
- } | {
494
- readonly inputs: readonly [];
495
- readonly name: "LicensingModule__InvalidPolicyFramework";
496
- readonly type: "error";
497
- } | {
498
- readonly inputs: readonly [];
499
- readonly name: "LicensingModule__LicensorDoesntHaveThisPolicy";
500
- readonly type: "error";
501
- } | {
502
- readonly inputs: readonly [];
503
- readonly name: "LicensingModule__LicensorNotRegistered";
504
- readonly type: "error";
505
- } | {
506
- readonly inputs: readonly [];
507
- readonly name: "LicensingModule__LinkParentParamFailed";
508
- readonly type: "error";
509
- } | {
510
- readonly inputs: readonly [];
511
- readonly name: "LicensingModule__LinkingRevokedLicense";
512
- readonly type: "error";
513
- } | {
514
- readonly inputs: readonly [];
515
- readonly name: "LicensingModule__MintLicenseParamFailed";
516
- readonly type: "error";
517
- } | {
518
- readonly inputs: readonly [];
519
- readonly name: "LicensingModule__MintingFeeTokenNotWhitelisted";
520
- readonly type: "error";
521
- } | {
522
- readonly inputs: readonly [];
523
- readonly name: "LicensingModule__MismatchBetweenRoyaltyPolicy";
524
- readonly type: "error";
525
- } | {
526
- readonly inputs: readonly [];
527
- readonly name: "LicensingModule__NotLicensee";
528
- readonly type: "error";
529
- } | {
530
- readonly inputs: readonly [];
531
- readonly name: "LicensingModule__ParamVerifierAlreadySet";
532
- readonly type: "error";
533
- } | {
534
- readonly inputs: readonly [];
535
- readonly name: "LicensingModule__ParamVerifierLengthMismatch";
536
- readonly type: "error";
537
- } | {
538
- readonly inputs: readonly [];
539
- readonly name: "LicensingModule__ParentIdEqualThanChild";
540
- readonly type: "error";
541
- } | {
542
- readonly inputs: readonly [];
543
- readonly name: "LicensingModule__PolicyAlreadySetForIpId";
544
- readonly type: "error";
545
- } | {
546
- readonly inputs: readonly [];
547
- readonly name: "LicensingModule__PolicyNotFound";
548
- readonly type: "error";
549
- } | {
550
- readonly inputs: readonly [];
551
- readonly name: "LicensingModule__RegisterPolicyFrameworkMismatch";
552
- readonly type: "error";
553
- } | {
554
- readonly inputs: readonly [];
555
- readonly name: "LicensingModule__RoyaltyPolicyNotWhitelisted";
556
- readonly type: "error";
557
- } | {
558
- readonly inputs: readonly [];
559
- readonly name: "LicensingModule__TransferParamFailed";
560
- readonly type: "error";
561
- } | {
562
- readonly inputs: readonly [];
563
- readonly name: "LicensingModule__UnauthorizedAccess";
564
- readonly type: "error";
565
- } | {
566
- readonly inputs: readonly [];
567
- readonly name: "LicensingModule__UnregisteredFrameworkAddingPolicy";
568
- readonly type: "error";
569
- } | {
570
- readonly inputs: readonly [];
571
- readonly name: "LicensorApprovalChecker__Unauthorized";
572
- readonly type: "error";
573
- } | {
574
- readonly inputs: readonly [];
575
- readonly name: "MetadataProvider__HashInvalid";
576
- readonly type: "error";
577
- } | {
578
- readonly inputs: readonly [];
579
- readonly name: "MetadataProvider__IPAssetOwnerInvalid";
580
- readonly type: "error";
581
- } | {
582
- readonly inputs: readonly [];
583
- readonly name: "MetadataProvider__MetadataNotCompatible";
584
- readonly type: "error";
585
- } | {
586
- readonly inputs: readonly [];
587
- readonly name: "MetadataProvider__NameInvalid";
588
- readonly type: "error";
589
- } | {
590
- readonly inputs: readonly [];
591
- readonly name: "MetadataProvider__RegistrantInvalid";
592
- readonly type: "error";
593
- } | {
594
- readonly inputs: readonly [];
595
- readonly name: "MetadataProvider__RegistrationDateInvalid";
596
- readonly type: "error";
597
- } | {
598
- readonly inputs: readonly [];
599
- readonly name: "MetadataProvider__URIInvalid";
600
- readonly type: "error";
601
- } | {
602
- readonly inputs: readonly [];
603
- readonly name: "MetadataProvider__Unauthorized";
604
- readonly type: "error";
605
- } | {
606
- readonly inputs: readonly [];
607
- readonly name: "MetadataProvider__UpgradeProviderInvalid";
608
- readonly type: "error";
609
- } | {
610
- readonly inputs: readonly [];
611
- readonly name: "MetadataProvider__UpgradeUnavailable";
612
- readonly type: "error";
613
- } | {
614
- readonly inputs: readonly [];
615
- readonly name: "ModuleRegistry__InterfaceIdZero";
616
- readonly type: "error";
617
- } | {
618
- readonly inputs: readonly [];
619
- readonly name: "ModuleRegistry__ModuleAddressNotContract";
620
- readonly type: "error";
621
- } | {
622
- readonly inputs: readonly [];
623
- readonly name: "ModuleRegistry__ModuleAddressZeroAddress";
624
- readonly type: "error";
625
- } | {
626
- readonly inputs: readonly [];
627
- readonly name: "ModuleRegistry__ModuleAlreadyRegistered";
628
- readonly type: "error";
629
- } | {
630
- readonly inputs: readonly [];
631
- readonly name: "ModuleRegistry__ModuleNotRegistered";
632
- readonly type: "error";
633
- } | {
634
- readonly inputs: readonly [];
635
- readonly name: "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId";
636
- readonly type: "error";
637
- } | {
638
- readonly inputs: readonly [];
639
- readonly name: "ModuleRegistry__ModuleTypeAlreadyRegistered";
640
- readonly type: "error";
641
- } | {
642
- readonly inputs: readonly [];
643
- readonly name: "ModuleRegistry__ModuleTypeEmptyString";
644
- readonly type: "error";
645
- } | {
646
- readonly inputs: readonly [];
647
- readonly name: "ModuleRegistry__ModuleTypeNotRegistered";
648
- readonly type: "error";
649
- } | {
650
- readonly inputs: readonly [];
651
- readonly name: "ModuleRegistry__NameAlreadyRegistered";
652
- readonly type: "error";
653
- } | {
654
- readonly inputs: readonly [];
655
- readonly name: "ModuleRegistry__NameDoesNotMatch";
656
- readonly type: "error";
657
- } | {
658
- readonly inputs: readonly [];
659
- readonly name: "ModuleRegistry__NameEmptyString";
660
- readonly type: "error";
661
- } | {
662
- readonly inputs: readonly [];
663
- readonly name: "Module_Unauthorized";
664
- readonly type: "error";
665
- } | {
666
- readonly inputs: readonly [{
667
- readonly internalType: "address";
668
- readonly name: "commercializer";
669
- readonly type: "address";
670
- }];
671
- readonly name: "PolicyFrameworkManager__CommercializerCheckerDoesNotSupportHook";
672
- readonly type: "error";
673
- } | {
674
- readonly inputs: readonly [];
675
- readonly name: "PolicyFrameworkManager__GettingPolicyWrongFramework";
676
- readonly type: "error";
677
- } | {
678
- readonly inputs: readonly [];
679
- readonly name: "RegistrationModule__InvalidOwner";
680
- readonly type: "error";
681
- } | {
682
- readonly inputs: readonly [];
683
- readonly name: "RoyaltyModule__CanOnlyMintSelectedPolicy";
684
- readonly type: "error";
685
- } | {
686
- readonly inputs: readonly [];
687
- readonly name: "RoyaltyModule__IncompatibleRoyaltyPolicy";
688
- readonly type: "error";
689
- } | {
690
- readonly inputs: readonly [];
691
- readonly name: "RoyaltyModule__NoParentsOnLinking";
692
- readonly type: "error";
693
- } | {
694
- readonly inputs: readonly [];
695
- readonly name: "RoyaltyModule__NoRoyaltyPolicySet";
696
- readonly type: "error";
697
- } | {
698
- readonly inputs: readonly [];
699
- readonly name: "RoyaltyModule__NotAllowedCaller";
700
- readonly type: "error";
701
- } | {
702
- readonly inputs: readonly [];
703
- readonly name: "RoyaltyModule__NotRegisteredIpId";
704
- readonly type: "error";
705
- } | {
706
- readonly inputs: readonly [];
707
- readonly name: "RoyaltyModule__NotWhitelistedRoyaltyPolicy";
708
- readonly type: "error";
709
- } | {
710
- readonly inputs: readonly [];
711
- readonly name: "RoyaltyModule__NotWhitelistedRoyaltyToken";
712
- readonly type: "error";
713
- } | {
714
- readonly inputs: readonly [];
715
- readonly name: "RoyaltyModule__ZeroLicensingModule";
716
- readonly type: "error";
717
- } | {
718
- readonly inputs: readonly [];
719
- readonly name: "RoyaltyModule__ZeroRoyaltyPolicy";
720
- readonly type: "error";
721
- } | {
722
- readonly inputs: readonly [];
723
- readonly name: "RoyaltyModule__ZeroRoyaltyToken";
724
- readonly type: "error";
725
- } | {
726
- readonly inputs: readonly [];
727
- readonly name: "RoyaltyPolicyLAP__AboveAncestorsLimit";
728
- readonly type: "error";
729
- } | {
730
- readonly inputs: readonly [];
731
- readonly name: "RoyaltyPolicyLAP__AboveParentLimit";
732
- readonly type: "error";
733
- } | {
734
- readonly inputs: readonly [];
735
- readonly name: "RoyaltyPolicyLAP__AboveRoyaltyStackLimit";
736
- readonly type: "error";
737
- } | {
738
- readonly inputs: readonly [];
739
- readonly name: "RoyaltyPolicyLAP__ImplementationAlreadySet";
740
- readonly type: "error";
741
- } | {
742
- readonly inputs: readonly [];
743
- readonly name: "RoyaltyPolicyLAP__InvalidAncestors";
744
- readonly type: "error";
745
- } | {
746
- readonly inputs: readonly [];
747
- readonly name: "RoyaltyPolicyLAP__InvalidAncestorsHash";
748
- readonly type: "error";
749
- } | {
750
- readonly inputs: readonly [];
751
- readonly name: "RoyaltyPolicyLAP__InvalidAncestorsLength";
752
- readonly type: "error";
753
- } | {
754
- readonly inputs: readonly [];
755
- readonly name: "RoyaltyPolicyLAP__InvalidAncestorsRoyalty";
756
- readonly type: "error";
757
- } | {
758
- readonly inputs: readonly [];
759
- readonly name: "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength";
760
- readonly type: "error";
761
- } | {
762
- readonly inputs: readonly [];
763
- readonly name: "RoyaltyPolicyLAP__InvalidRoyaltyAmountLength";
764
- readonly type: "error";
765
- } | {
766
- readonly inputs: readonly [];
767
- readonly name: "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense";
768
- readonly type: "error";
769
- } | {
770
- readonly inputs: readonly [];
771
- readonly name: "RoyaltyPolicyLAP__NotFullOwnership";
772
- readonly type: "error";
773
- } | {
774
- readonly inputs: readonly [];
775
- readonly name: "RoyaltyPolicyLAP__NotRoyaltyModule";
776
- readonly type: "error";
777
- } | {
778
- readonly inputs: readonly [];
779
- readonly name: "RoyaltyPolicyLAP__TransferFailed";
780
- readonly type: "error";
781
- } | {
782
- readonly inputs: readonly [];
783
- readonly name: "RoyaltyPolicyLAP__UnlinkableToParents";
784
- readonly type: "error";
785
- } | {
786
- readonly inputs: readonly [];
787
- readonly name: "RoyaltyPolicyLAP__ZeroAncestorsVaultImpl";
788
- readonly type: "error";
789
- } | {
790
- readonly inputs: readonly [];
791
- readonly name: "RoyaltyPolicyLAP__ZeroLicensingModule";
792
- readonly type: "error";
793
- } | {
794
- readonly inputs: readonly [];
795
- readonly name: "RoyaltyPolicyLAP__ZeroLiquidSplitFactory";
796
- readonly type: "error";
797
- } | {
798
- readonly inputs: readonly [];
799
- readonly name: "RoyaltyPolicyLAP__ZeroLiquidSplitMain";
800
- readonly type: "error";
801
- } | {
802
- readonly inputs: readonly [];
803
- readonly name: "RoyaltyPolicyLAP__ZeroRoyaltyModule";
804
- readonly type: "error";
805
- })[];
103
+ }];
806
104
  address: `0x${string}`;
807
105
  };
808
- constructor(rpcClient: PublicClient, wallet: WalletClient, storyClient: StoryAPIClient);
106
+ constructor(rpcClient: PublicClient, wallet: WalletClient, chainId: SupportedChainIds);
107
+ private isNFTRegistered;
809
108
  /**
810
- * Registers a root-level IP into the protocol. Root-level IPs can be thought of as organizational hubs
811
- * for encapsulating policies that actual IPs can use to register through. As such, a root-level IP is not an
812
- * actual IP, but a container for IP policy management for their child IP assets.
813
- * @param request The request object that contains all data needed to register a root IP.
814
- * @param request.policyId The policy that identifies the licensing terms of the IP.
815
- * @param request.tokenContract The address of the NFT bound to the root-level IP.
816
- * @param request.tokenId The token id of the NFT bound to the root-level IP.
817
- * @param request.ipName [Optional] The name assigned to the new IP.
818
- * @param request.contentHash [Optional] The content hash of the IP being registered.
819
- * @param request.uri [Optional] An external URI to link to the IP.
820
- * @param request.txOptions [Optional] The transaction options.
109
+ * Registers an NFT as IP, creating a corresponding IP record.
110
+ * @param request The request object that contains all data needed to register IP.
111
+ * @param request.tokenContract The address of the NFT.
112
+ * @param request.tokenId The token identifier of the NFT.
113
+ * @param request.txOptions [Optional] The transaction options.
821
114
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
822
- * @emits RootIPRegistered (msg.sender, ipId, policyId)
823
- */
824
- registerRootIp(request: RegisterRootIpRequest): Promise<RegisterRootIpResponse>;
825
- /**
826
- * Registers derivative IPs into the protocol. Derivative IPs are IP assets that inherit policies from
827
- * parent IPs by burning acquired license NFTs.
828
- * @param request The request object that contains all data needed to register a root IP.
829
- * @param request.licenseIds The policy that identifies the licensing terms of the IP.
830
- * @param request.tokenContract The address of the NFT bound to the derivative IP.
831
- * @param request.tokenId The token id of the NFT bound to the derivative IP.
832
- * @param request.ipName [Optional] The name assigned to the new IP.
833
- * @param request.contentHash [Optional] The content hash of the IP being registered.
834
- * @param request.uri [Optional] An external URI to link to the IP.
835
- * @param request.txOptions [Optional] The transaction options.
836
- * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
837
- * @emits RootIPRegistered (msg.sender, ipId, policyId)
838
- */
839
- registerDerivativeIp(request: RegisterDerivativeIpRequest): Promise<RegisterDerivativeIpResponse>;
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.
115
+ * @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
846
116
  */
847
- isNFTRegistered(chainId: string, tokenAddress: Hex, tokenId: string): Promise<Hex>;
117
+ register(request: RegisterRequest): Promise<RegisterIpResponse>;
848
118
  }
849
119
  //# sourceMappingURL=ipAsset.d.ts.map