@story-protocol/core-sdk 0.0.1-beta-test.1 → 0.0.1-beta-rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/README.md +0 -15
  2. package/dist/declarations/src/client.d.ts +22 -38
  3. package/dist/declarations/src/client.d.ts.map +1 -1
  4. package/dist/declarations/src/index.d.ts +11 -12
  5. package/dist/declarations/src/index.d.ts.map +1 -1
  6. package/dist/declarations/src/resources/dispute.d.ts +835 -0
  7. package/dist/declarations/src/resources/dispute.d.ts.map +1 -0
  8. package/dist/declarations/src/resources/ipAsset.d.ts +145 -12
  9. package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
  10. package/dist/declarations/src/resources/license.d.ts +1014 -0
  11. package/dist/declarations/src/resources/license.d.ts.map +1 -0
  12. package/dist/declarations/src/resources/permission.d.ts +1478 -8
  13. package/dist/declarations/src/resources/permission.d.ts.map +1 -1
  14. package/dist/declarations/src/resources/policy.d.ts +1063 -0
  15. package/dist/declarations/src/resources/policy.d.ts.map +1 -0
  16. package/dist/declarations/src/resources/tagging.d.ts +711 -4
  17. package/dist/declarations/src/resources/tagging.d.ts.map +1 -1
  18. package/dist/declarations/src/types/config.d.ts +8 -9
  19. package/dist/declarations/src/types/config.d.ts.map +1 -1
  20. package/dist/declarations/src/types/options.d.ts +0 -6
  21. package/dist/declarations/src/types/options.d.ts.map +1 -1
  22. package/dist/declarations/src/types/resources/dispute.d.ts +50 -0
  23. package/dist/declarations/src/types/resources/dispute.d.ts.map +1 -0
  24. package/dist/declarations/src/types/resources/ipAsset.d.ts +11 -126
  25. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  26. package/dist/declarations/src/types/resources/license.d.ts +23 -0
  27. package/dist/declarations/src/types/resources/license.d.ts.map +1 -0
  28. package/dist/declarations/src/types/resources/permission.d.ts +5 -26
  29. package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
  30. package/dist/declarations/src/types/resources/policy.d.ts +35 -0
  31. package/dist/declarations/src/types/resources/policy.d.ts.map +1 -0
  32. package/dist/declarations/src/types/resources/tagging.d.ts +1 -13
  33. package/dist/declarations/src/types/resources/tagging.d.ts.map +1 -1
  34. package/dist/story-protocol-core-sdk.cjs.dev.js +2492 -1617
  35. package/dist/story-protocol-core-sdk.cjs.prod.js +2492 -1617
  36. package/dist/story-protocol-core-sdk.esm.js +2490 -1612
  37. package/package.json +5 -5
  38. package/dist/declarations/src/enums/ActionType.d.ts +0 -11
  39. package/dist/declarations/src/enums/ActionType.d.ts.map +0 -1
  40. package/dist/declarations/src/enums/ResourceType.d.ts +0 -15
  41. package/dist/declarations/src/enums/ResourceType.d.ts.map +0 -1
  42. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +0 -26
  43. package/dist/declarations/src/resources/ipAssetReadOnly.d.ts.map +0 -1
  44. package/dist/declarations/src/resources/moduleReadOnly.d.ts +0 -25
  45. package/dist/declarations/src/resources/moduleReadOnly.d.ts.map +0 -1
  46. package/dist/declarations/src/resources/permissionReadOnly.d.ts +0 -25
  47. package/dist/declarations/src/resources/permissionReadOnly.d.ts.map +0 -1
  48. package/dist/declarations/src/resources/taggingReadOnly.d.ts +0 -24
  49. package/dist/declarations/src/resources/taggingReadOnly.d.ts.map +0 -1
  50. package/dist/declarations/src/resources/transaction.d.ts +0 -11
  51. package/dist/declarations/src/resources/transaction.d.ts.map +0 -1
  52. package/dist/declarations/src/resources/transactionReadOnly.d.ts +0 -25
  53. package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +0 -1
  54. package/dist/declarations/src/types/client.d.ts +0 -23
  55. package/dist/declarations/src/types/client.d.ts.map +0 -1
  56. package/dist/declarations/src/types/resources/module.d.ts +0 -43
  57. package/dist/declarations/src/types/resources/module.d.ts.map +0 -1
  58. package/dist/declarations/src/types/resources/transaction.d.ts +0 -52
  59. package/dist/declarations/src/types/resources/transaction.d.ts.map +0 -1
@@ -0,0 +1,1063 @@
1
+ import { PublicClient, WalletClient } from "viem";
2
+ import { RegisterPILPolicyRequest, RegisterPILPolicyResponse, AddPolicyToIpRequest, AddPolicyToIpResponse } from "../types/resources/policy.js";
3
+ export declare class PolicyClient {
4
+ private readonly wallet;
5
+ private readonly rpcClient;
6
+ ipAccountABI: ({
7
+ readonly inputs: readonly [{
8
+ readonly internalType: "address";
9
+ readonly name: "to";
10
+ readonly type: "address";
11
+ }, {
12
+ readonly internalType: "uint256";
13
+ readonly name: "value";
14
+ readonly type: "uint256";
15
+ }, {
16
+ readonly internalType: "bytes";
17
+ readonly name: "data";
18
+ readonly type: "bytes";
19
+ }];
20
+ readonly name: "execute";
21
+ readonly outputs: readonly [{
22
+ readonly internalType: "bytes";
23
+ readonly name: "result";
24
+ readonly type: "bytes";
25
+ }];
26
+ readonly stateMutability: "payable";
27
+ readonly type: "function";
28
+ } | {
29
+ readonly inputs: readonly [{
30
+ readonly internalType: "address";
31
+ readonly name: "to";
32
+ readonly type: "address";
33
+ }, {
34
+ readonly internalType: "uint256";
35
+ readonly name: "value";
36
+ readonly type: "uint256";
37
+ }, {
38
+ readonly internalType: "bytes";
39
+ readonly name: "data";
40
+ readonly type: "bytes";
41
+ }, {
42
+ readonly internalType: "address";
43
+ readonly name: "signer";
44
+ readonly type: "address";
45
+ }, {
46
+ readonly internalType: "uint256";
47
+ readonly name: "deadline";
48
+ readonly type: "uint256";
49
+ }, {
50
+ readonly internalType: "bytes";
51
+ readonly name: "signature";
52
+ readonly type: "bytes";
53
+ }];
54
+ readonly name: "executeWithSig";
55
+ readonly outputs: readonly [{
56
+ readonly internalType: "bytes";
57
+ readonly name: "result";
58
+ readonly type: "bytes";
59
+ }];
60
+ readonly stateMutability: "payable";
61
+ readonly type: "function";
62
+ } | {
63
+ readonly inputs: readonly [{
64
+ readonly internalType: "address";
65
+ readonly name: "caller";
66
+ readonly type: "address";
67
+ }];
68
+ readonly name: "AccessControlled__CallerIsNotIpAccount";
69
+ readonly type: "error";
70
+ } | {
71
+ readonly inputs: readonly [{
72
+ readonly internalType: "address";
73
+ readonly name: "ipAccount";
74
+ readonly type: "address";
75
+ }];
76
+ readonly name: "AccessControlled__NotIpAccount";
77
+ readonly type: "error";
78
+ } | {
79
+ readonly inputs: readonly [];
80
+ readonly name: "AccessControlled__ZeroAddress";
81
+ readonly type: "error";
82
+ } | {
83
+ readonly inputs: readonly [];
84
+ readonly name: "AccessController__CallerIsNotIPAccount";
85
+ readonly type: "error";
86
+ } | {
87
+ readonly inputs: readonly [{
88
+ readonly internalType: "address";
89
+ readonly name: "ipAccount";
90
+ readonly type: "address";
91
+ }];
92
+ readonly name: "AccessController__IPAccountIsNotValid";
93
+ readonly type: "error";
94
+ } | {
95
+ readonly inputs: readonly [];
96
+ readonly name: "AccessController__IPAccountIsZeroAddress";
97
+ readonly type: "error";
98
+ } | {
99
+ readonly inputs: readonly [{
100
+ readonly internalType: "address";
101
+ readonly name: "ipAccount";
102
+ readonly type: "address";
103
+ }, {
104
+ readonly internalType: "address";
105
+ readonly name: "signer";
106
+ readonly type: "address";
107
+ }, {
108
+ readonly internalType: "address";
109
+ readonly name: "to";
110
+ readonly type: "address";
111
+ }, {
112
+ readonly internalType: "bytes4";
113
+ readonly name: "func";
114
+ readonly type: "bytes4";
115
+ }];
116
+ readonly name: "AccessController__PermissionDenied";
117
+ readonly type: "error";
118
+ } | {
119
+ readonly inputs: readonly [];
120
+ readonly name: "AccessController__PermissionIsNotValid";
121
+ readonly type: "error";
122
+ } | {
123
+ readonly inputs: readonly [{
124
+ readonly internalType: "address";
125
+ readonly name: "to";
126
+ readonly type: "address";
127
+ }];
128
+ readonly name: "AccessController__RecipientIsNotRegisteredModule";
129
+ readonly type: "error";
130
+ } | {
131
+ readonly inputs: readonly [];
132
+ readonly name: "AccessController__SignerIsZeroAddress";
133
+ readonly type: "error";
134
+ } | {
135
+ readonly inputs: readonly [];
136
+ readonly name: "AncestorsVaultLAP__AlreadyClaimed";
137
+ readonly type: "error";
138
+ } | {
139
+ readonly inputs: readonly [];
140
+ readonly name: "AncestorsVaultLAP__ClaimerNotAnAncestor";
141
+ readonly type: "error";
142
+ } | {
143
+ readonly inputs: readonly [];
144
+ readonly name: "AncestorsVaultLAP__ERC20BalanceNotZero";
145
+ readonly type: "error";
146
+ } | {
147
+ readonly inputs: readonly [];
148
+ readonly name: "AncestorsVaultLAP__ETHBalanceNotZero";
149
+ readonly type: "error";
150
+ } | {
151
+ readonly inputs: readonly [];
152
+ readonly name: "AncestorsVaultLAP__InvalidAncestorsHash";
153
+ readonly type: "error";
154
+ } | {
155
+ readonly inputs: readonly [];
156
+ readonly name: "AncestorsVaultLAP__InvalidClaimer";
157
+ readonly type: "error";
158
+ } | {
159
+ readonly inputs: readonly [];
160
+ readonly name: "AncestorsVaultLAP__TransferFailed";
161
+ readonly type: "error";
162
+ } | {
163
+ readonly inputs: readonly [];
164
+ readonly name: "AncestorsVaultLAP__ZeroRoyaltyPolicyLAP";
165
+ readonly type: "error";
166
+ } | {
167
+ readonly inputs: readonly [];
168
+ readonly name: "ArbitrationPolicySP__NotDisputeModule";
169
+ readonly type: "error";
170
+ } | {
171
+ readonly inputs: readonly [];
172
+ readonly name: "ArbitrationPolicySP__ZeroDisputeModule";
173
+ readonly type: "error";
174
+ } | {
175
+ readonly inputs: readonly [];
176
+ readonly name: "ArbitrationPolicySP__ZeroPaymentToken";
177
+ readonly type: "error";
178
+ } | {
179
+ readonly inputs: readonly [];
180
+ readonly name: "DisputeModule__NotAbleToResolve";
181
+ readonly type: "error";
182
+ } | {
183
+ readonly inputs: readonly [];
184
+ readonly name: "DisputeModule__NotDisputeInitiator";
185
+ readonly type: "error";
186
+ } | {
187
+ readonly inputs: readonly [];
188
+ readonly name: "DisputeModule__NotInDisputeState";
189
+ readonly type: "error";
190
+ } | {
191
+ readonly inputs: readonly [];
192
+ readonly name: "DisputeModule__NotRegisteredIpId";
193
+ readonly type: "error";
194
+ } | {
195
+ readonly inputs: readonly [];
196
+ readonly name: "DisputeModule__NotWhitelistedArbitrationPolicy";
197
+ readonly type: "error";
198
+ } | {
199
+ readonly inputs: readonly [];
200
+ readonly name: "DisputeModule__NotWhitelistedArbitrationRelayer";
201
+ readonly type: "error";
202
+ } | {
203
+ readonly inputs: readonly [];
204
+ readonly name: "DisputeModule__NotWhitelistedDisputeTag";
205
+ readonly type: "error";
206
+ } | {
207
+ readonly inputs: readonly [];
208
+ readonly name: "DisputeModule__UnauthorizedAccess";
209
+ readonly type: "error";
210
+ } | {
211
+ readonly inputs: readonly [];
212
+ readonly name: "DisputeModule__ZeroArbitrationPolicy";
213
+ readonly type: "error";
214
+ } | {
215
+ readonly inputs: readonly [];
216
+ readonly name: "DisputeModule__ZeroArbitrationRelayer";
217
+ readonly type: "error";
218
+ } | {
219
+ readonly inputs: readonly [];
220
+ readonly name: "DisputeModule__ZeroDisputeTag";
221
+ readonly type: "error";
222
+ } | {
223
+ readonly inputs: readonly [];
224
+ readonly name: "DisputeModule__ZeroLinkToDisputeEvidence";
225
+ readonly type: "error";
226
+ } | {
227
+ readonly inputs: readonly [];
228
+ readonly name: "Governance__InconsistentState";
229
+ readonly type: "error";
230
+ } | {
231
+ readonly inputs: readonly [];
232
+ readonly name: "Governance__NewStateIsTheSameWithOldState";
233
+ readonly type: "error";
234
+ } | {
235
+ readonly inputs: readonly [];
236
+ readonly name: "Governance__OnlyProtocolAdmin";
237
+ readonly type: "error";
238
+ } | {
239
+ readonly inputs: readonly [];
240
+ readonly name: "Governance__ProtocolPaused";
241
+ readonly type: "error";
242
+ } | {
243
+ readonly inputs: readonly [{
244
+ readonly internalType: "string";
245
+ readonly name: "interfaceName";
246
+ readonly type: "string";
247
+ }];
248
+ readonly name: "Governance__UnsupportedInterface";
249
+ readonly type: "error";
250
+ } | {
251
+ readonly inputs: readonly [];
252
+ readonly name: "Governance__ZeroAddress";
253
+ readonly type: "error";
254
+ } | {
255
+ readonly inputs: readonly [];
256
+ readonly name: "IPAccountRegistry_InvalidIpAccountImpl";
257
+ readonly type: "error";
258
+ } | {
259
+ readonly inputs: readonly [];
260
+ readonly name: "IPAccount__ExpiredSignature";
261
+ readonly type: "error";
262
+ } | {
263
+ readonly inputs: readonly [];
264
+ readonly name: "IPAccount__InvalidAccessController";
265
+ readonly type: "error";
266
+ } | {
267
+ readonly inputs: readonly [];
268
+ /**
269
+ * Adds a policy to the set of policies of an IP
270
+ * @param request The request object containing details to add a policy to an IP
271
+ * @param request.ipId The id of the IP
272
+ * @param request.polId The id of the policy
273
+ * @return the transaction hash and the index of the policy in the IP's policy set if the txOptions.waitForTransaction is set to true
274
+ */
275
+ readonly name: "IPAccount__InvalidCalldata";
276
+ readonly type: "error";
277
+ } | {
278
+ readonly inputs: readonly [];
279
+ readonly name: "IPAccount__InvalidSignature";
280
+ readonly type: "error";
281
+ } | {
282
+ readonly inputs: readonly [];
283
+ readonly name: "IPAccount__InvalidSigner";
284
+ readonly type: "error";
285
+ } | {
286
+ readonly inputs: readonly [];
287
+ readonly name: "IPAssetRegistry__AlreadyRegistered";
288
+ readonly type: "error";
289
+ } | {
290
+ readonly inputs: readonly [];
291
+ readonly name: "IPAssetRegistry__IPAccountAlreadyCreated";
292
+ readonly type: "error";
293
+ } | {
294
+ readonly inputs: readonly [];
295
+ readonly name: "IPAssetRegistry__InvalidAccount";
296
+ readonly type: "error";
297
+ } | {
298
+ readonly inputs: readonly [];
299
+ readonly name: "IPAssetRegistry__InvalidMetadataProvider";
300
+ readonly type: "error";
301
+ } | {
302
+ readonly inputs: readonly [];
303
+ readonly name: "IPAssetRegistry__NotYetRegistered";
304
+ readonly type: "error";
305
+ } | {
306
+ readonly inputs: readonly [];
307
+ readonly name: "IPAssetRegistry__RegistrantUnauthorized";
308
+ readonly type: "error";
309
+ } | {
310
+ readonly inputs: readonly [];
311
+ readonly name: "IPAssetRegistry__ResolverInvalid";
312
+ readonly type: "error";
313
+ } | {
314
+ readonly inputs: readonly [];
315
+ readonly name: "IPAssetRegistry__Unauthorized";
316
+ readonly type: "error";
317
+ } | {
318
+ readonly inputs: readonly [];
319
+ readonly name: "IPResolver_InvalidIP";
320
+ readonly type: "error";
321
+ } | {
322
+ readonly inputs: readonly [];
323
+ readonly name: "IPResolver_Unauthorized";
324
+ readonly type: "error";
325
+ } | {
326
+ readonly inputs: readonly [];
327
+ readonly name: "LicenseRegistry__CallerNotLicensingModule";
328
+ readonly type: "error";
329
+ } | {
330
+ readonly inputs: readonly [];
331
+ readonly name: "LicenseRegistry__NotTransferable";
332
+ readonly type: "error";
333
+ } | {
334
+ readonly inputs: readonly [];
335
+ readonly name: "LicenseRegistry__RevokedLicense";
336
+ readonly type: "error";
337
+ } | {
338
+ readonly inputs: readonly [];
339
+ readonly name: "LicenseRegistry__ZeroDisputeModule";
340
+ readonly type: "error";
341
+ } | {
342
+ readonly inputs: readonly [];
343
+ readonly name: "LicenseRegistry__ZeroLicensingModule";
344
+ readonly type: "error";
345
+ } | {
346
+ readonly inputs: readonly [];
347
+ readonly name: "LicensingModuleAware__CallerNotLicensingModule";
348
+ readonly type: "error";
349
+ } | {
350
+ readonly inputs: readonly [];
351
+ readonly name: "LicensingModule__CallerNotLicenseRegistry";
352
+ readonly type: "error";
353
+ } | {
354
+ readonly inputs: readonly [];
355
+ readonly name: "LicensingModule__CallerNotLicensorAndPolicyNotSet";
356
+ readonly type: "error";
357
+ } | {
358
+ readonly inputs: readonly [];
359
+ readonly name: "LicensingModule__CommercialTermInNonCommercialPolicy";
360
+ readonly type: "error";
361
+ } | {
362
+ readonly inputs: readonly [];
363
+ readonly name: "LicensingModule__DerivativeRevShareSumExceedsMaxRNFTSupply";
364
+ readonly type: "error";
365
+ } | {
366
+ readonly inputs: readonly [];
367
+ readonly name: "LicensingModule__DerivativesCannotAddPolicy";
368
+ readonly type: "error";
369
+ } | {
370
+ readonly inputs: readonly [];
371
+ readonly name: "LicensingModule__DisputedIpId";
372
+ readonly type: "error";
373
+ } | {
374
+ readonly inputs: readonly [];
375
+ readonly name: "LicensingModule__EmptyLicenseUrl";
376
+ readonly type: "error";
377
+ } | {
378
+ readonly inputs: readonly [];
379
+ readonly name: "LicensingModule__EmptyParamName";
380
+ readonly type: "error";
381
+ } | {
382
+ readonly inputs: readonly [];
383
+ readonly name: "LicensingModule__FrameworkNotFound";
384
+ readonly type: "error";
385
+ } | {
386
+ readonly inputs: readonly [];
387
+ readonly name: "LicensingModule__IncompatibleLicensorCommercialPolicy";
388
+ readonly type: "error";
389
+ } | {
390
+ readonly inputs: readonly [];
391
+ readonly name: "LicensingModule__IncompatibleLicensorRoyaltyDerivativeRevShare";
392
+ readonly type: "error";
393
+ } | {
394
+ readonly inputs: readonly [];
395
+ readonly name: "LicensingModule__IncompatibleRoyaltyPolicyAddress";
396
+ readonly type: "error";
397
+ } | {
398
+ readonly inputs: readonly [];
399
+ readonly name: "LicensingModule__IncompatibleRoyaltyPolicyDerivativeRevShare";
400
+ readonly type: "error";
401
+ } | {
402
+ readonly inputs: readonly [];
403
+ readonly name: "LicensingModule__InvalidLicensor";
404
+ readonly type: "error";
405
+ } | {
406
+ readonly inputs: readonly [];
407
+ readonly name: "LicensingModule__InvalidPolicyFramework";
408
+ readonly type: "error";
409
+ } | {
410
+ readonly inputs: readonly [];
411
+ readonly name: "LicensingModule__LicensorDoesntHaveThisPolicy";
412
+ readonly type: "error";
413
+ } | {
414
+ readonly inputs: readonly [];
415
+ readonly name: "LicensingModule__LicensorNotRegistered";
416
+ readonly type: "error";
417
+ } | {
418
+ readonly inputs: readonly [];
419
+ readonly name: "LicensingModule__LinkParentParamFailed";
420
+ readonly type: "error";
421
+ } | {
422
+ readonly inputs: readonly [];
423
+ readonly name: "LicensingModule__LinkingRevokedLicense";
424
+ readonly type: "error";
425
+ } | {
426
+ readonly inputs: readonly [];
427
+ readonly name: "LicensingModule__MintLicenseParamFailed";
428
+ readonly type: "error";
429
+ } | {
430
+ readonly inputs: readonly [];
431
+ readonly name: "LicensingModule__MintingFeeTokenNotWhitelisted";
432
+ readonly type: "error";
433
+ } | {
434
+ readonly inputs: readonly [];
435
+ readonly name: "LicensingModule__MismatchBetweenRoyaltyPolicy";
436
+ readonly type: "error";
437
+ } | {
438
+ readonly inputs: readonly [];
439
+ readonly name: "LicensingModule__NotLicensee";
440
+ readonly type: "error";
441
+ } | {
442
+ readonly inputs: readonly [];
443
+ readonly name: "LicensingModule__ParamVerifierAlreadySet";
444
+ readonly type: "error";
445
+ } | {
446
+ readonly inputs: readonly [];
447
+ readonly name: "LicensingModule__ParamVerifierLengthMismatch";
448
+ readonly type: "error";
449
+ } | {
450
+ readonly inputs: readonly [];
451
+ readonly name: "LicensingModule__ParentIdEqualThanChild";
452
+ readonly type: "error";
453
+ } | {
454
+ readonly inputs: readonly [];
455
+ readonly name: "LicensingModule__PolicyAlreadySetForIpId";
456
+ readonly type: "error";
457
+ } | {
458
+ readonly inputs: readonly [];
459
+ readonly name: "LicensingModule__PolicyNotFound";
460
+ readonly type: "error";
461
+ } | {
462
+ readonly inputs: readonly [];
463
+ readonly name: "LicensingModule__RegisterPolicyFrameworkMismatch";
464
+ readonly type: "error";
465
+ } | {
466
+ readonly inputs: readonly [];
467
+ readonly name: "LicensingModule__RoyaltyPolicyNotWhitelisted";
468
+ readonly type: "error";
469
+ } | {
470
+ readonly inputs: readonly [];
471
+ readonly name: "LicensingModule__TransferParamFailed";
472
+ readonly type: "error";
473
+ } | {
474
+ readonly inputs: readonly [];
475
+ readonly name: "LicensingModule__UnauthorizedAccess";
476
+ readonly type: "error";
477
+ } | {
478
+ readonly inputs: readonly [];
479
+ readonly name: "LicensingModule__UnregisteredFrameworkAddingPolicy";
480
+ readonly type: "error";
481
+ } | {
482
+ readonly inputs: readonly [];
483
+ readonly name: "LicensorApprovalChecker__Unauthorized";
484
+ readonly type: "error";
485
+ } | {
486
+ readonly inputs: readonly [];
487
+ readonly name: "MetadataProvider__HashInvalid";
488
+ readonly type: "error";
489
+ } | {
490
+ readonly inputs: readonly [];
491
+ readonly name: "MetadataProvider__IPAssetOwnerInvalid";
492
+ readonly type: "error";
493
+ } | {
494
+ readonly inputs: readonly [];
495
+ readonly name: "MetadataProvider__MetadataNotCompatible";
496
+ readonly type: "error";
497
+ } | {
498
+ readonly inputs: readonly [];
499
+ readonly name: "MetadataProvider__NameInvalid";
500
+ readonly type: "error";
501
+ } | {
502
+ readonly inputs: readonly [];
503
+ readonly name: "MetadataProvider__RegistrantInvalid";
504
+ readonly type: "error";
505
+ } | {
506
+ readonly inputs: readonly [];
507
+ readonly name: "MetadataProvider__RegistrationDateInvalid";
508
+ readonly type: "error";
509
+ } | {
510
+ readonly inputs: readonly [];
511
+ readonly name: "MetadataProvider__URIInvalid";
512
+ readonly type: "error";
513
+ } | {
514
+ readonly inputs: readonly [];
515
+ readonly name: "MetadataProvider__Unauthorized";
516
+ readonly type: "error";
517
+ } | {
518
+ readonly inputs: readonly [];
519
+ readonly name: "MetadataProvider__UpgradeProviderInvalid";
520
+ readonly type: "error";
521
+ } | {
522
+ readonly inputs: readonly [];
523
+ readonly name: "MetadataProvider__UpgradeUnavailable";
524
+ readonly type: "error";
525
+ } | {
526
+ readonly inputs: readonly [];
527
+ readonly name: "ModuleRegistry__InterfaceIdZero";
528
+ readonly type: "error";
529
+ } | {
530
+ readonly inputs: readonly [];
531
+ readonly name: "ModuleRegistry__ModuleAddressNotContract";
532
+ readonly type: "error";
533
+ } | {
534
+ readonly inputs: readonly [];
535
+ readonly name: "ModuleRegistry__ModuleAddressZeroAddress";
536
+ readonly type: "error";
537
+ } | {
538
+ readonly inputs: readonly [];
539
+ readonly name: "ModuleRegistry__ModuleAlreadyRegistered";
540
+ readonly type: "error";
541
+ } | {
542
+ readonly inputs: readonly [];
543
+ readonly name: "ModuleRegistry__ModuleNotRegistered";
544
+ readonly type: "error";
545
+ } | {
546
+ readonly inputs: readonly [];
547
+ readonly name: "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId";
548
+ readonly type: "error";
549
+ } | {
550
+ readonly inputs: readonly [];
551
+ readonly name: "ModuleRegistry__ModuleTypeAlreadyRegistered";
552
+ readonly type: "error";
553
+ } | {
554
+ readonly inputs: readonly [];
555
+ readonly name: "ModuleRegistry__ModuleTypeEmptyString";
556
+ readonly type: "error";
557
+ } | {
558
+ readonly inputs: readonly [];
559
+ readonly name: "ModuleRegistry__ModuleTypeNotRegistered";
560
+ readonly type: "error";
561
+ } | {
562
+ readonly inputs: readonly [];
563
+ readonly name: "ModuleRegistry__NameAlreadyRegistered";
564
+ readonly type: "error";
565
+ } | {
566
+ readonly inputs: readonly [];
567
+ readonly name: "ModuleRegistry__NameDoesNotMatch";
568
+ readonly type: "error";
569
+ } | {
570
+ readonly inputs: readonly [];
571
+ readonly name: "ModuleRegistry__NameEmptyString";
572
+ readonly type: "error";
573
+ } | {
574
+ readonly inputs: readonly [];
575
+ readonly name: "Module_Unauthorized";
576
+ readonly type: "error";
577
+ } | {
578
+ readonly inputs: readonly [{
579
+ readonly internalType: "address";
580
+ readonly name: "commercializer";
581
+ readonly type: "address";
582
+ }];
583
+ readonly name: "PolicyFrameworkManager__CommercializerCheckerDoesNotSupportHook";
584
+ readonly type: "error";
585
+ } | {
586
+ readonly inputs: readonly [];
587
+ readonly name: "PolicyFrameworkManager__GettingPolicyWrongFramework";
588
+ readonly type: "error";
589
+ } | {
590
+ readonly inputs: readonly [];
591
+ readonly name: "RegistrationModule__InvalidOwner";
592
+ readonly type: "error";
593
+ } | {
594
+ readonly inputs: readonly [];
595
+ readonly name: "RoyaltyModule__CanOnlyMintSelectedPolicy";
596
+ readonly type: "error";
597
+ } | {
598
+ readonly inputs: readonly [];
599
+ readonly name: "RoyaltyModule__IncompatibleRoyaltyPolicy";
600
+ readonly type: "error";
601
+ } | {
602
+ readonly inputs: readonly [];
603
+ readonly name: "RoyaltyModule__NoParentsOnLinking";
604
+ readonly type: "error";
605
+ } | {
606
+ readonly inputs: readonly [];
607
+ readonly name: "RoyaltyModule__NoRoyaltyPolicySet";
608
+ readonly type: "error";
609
+ } | {
610
+ readonly inputs: readonly [];
611
+ readonly name: "RoyaltyModule__NotAllowedCaller";
612
+ readonly type: "error";
613
+ } | {
614
+ readonly inputs: readonly [];
615
+ readonly name: "RoyaltyModule__NotRegisteredIpId";
616
+ readonly type: "error";
617
+ } | {
618
+ readonly inputs: readonly [];
619
+ readonly name: "RoyaltyModule__NotWhitelistedRoyaltyPolicy";
620
+ readonly type: "error";
621
+ } | {
622
+ readonly inputs: readonly [];
623
+ readonly name: "RoyaltyModule__NotWhitelistedRoyaltyToken";
624
+ readonly type: "error";
625
+ } | {
626
+ readonly inputs: readonly [];
627
+ readonly name: "RoyaltyModule__ZeroLicensingModule";
628
+ readonly type: "error";
629
+ } | {
630
+ readonly inputs: readonly [];
631
+ readonly name: "RoyaltyModule__ZeroRoyaltyPolicy";
632
+ readonly type: "error";
633
+ } | {
634
+ readonly inputs: readonly [];
635
+ readonly name: "RoyaltyModule__ZeroRoyaltyToken";
636
+ readonly type: "error";
637
+ } | {
638
+ readonly inputs: readonly [];
639
+ readonly name: "RoyaltyPolicyLAP__AboveAncestorsLimit";
640
+ readonly type: "error";
641
+ } | {
642
+ readonly inputs: readonly [];
643
+ readonly name: "RoyaltyPolicyLAP__AboveParentLimit";
644
+ readonly type: "error";
645
+ } | {
646
+ readonly inputs: readonly [];
647
+ readonly name: "RoyaltyPolicyLAP__AboveRoyaltyStackLimit";
648
+ readonly type: "error";
649
+ } | {
650
+ readonly inputs: readonly [];
651
+ readonly name: "RoyaltyPolicyLAP__ImplementationAlreadySet";
652
+ readonly type: "error";
653
+ } | {
654
+ readonly inputs: readonly [];
655
+ readonly name: "RoyaltyPolicyLAP__InvalidAncestors";
656
+ readonly type: "error";
657
+ } | {
658
+ readonly inputs: readonly [];
659
+ readonly name: "RoyaltyPolicyLAP__InvalidAncestorsHash";
660
+ readonly type: "error";
661
+ } | {
662
+ readonly inputs: readonly [];
663
+ readonly name: "RoyaltyPolicyLAP__InvalidAncestorsLength";
664
+ readonly type: "error";
665
+ } | {
666
+ readonly inputs: readonly [];
667
+ readonly name: "RoyaltyPolicyLAP__InvalidAncestorsRoyalty";
668
+ readonly type: "error";
669
+ } | {
670
+ readonly inputs: readonly [];
671
+ readonly name: "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength";
672
+ readonly type: "error";
673
+ } | {
674
+ readonly inputs: readonly [];
675
+ readonly name: "RoyaltyPolicyLAP__InvalidRoyaltyAmountLength";
676
+ readonly type: "error";
677
+ } | {
678
+ readonly inputs: readonly [];
679
+ readonly name: "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense";
680
+ readonly type: "error";
681
+ } | {
682
+ readonly inputs: readonly [];
683
+ readonly name: "RoyaltyPolicyLAP__NotFullOwnership";
684
+ readonly type: "error";
685
+ } | {
686
+ readonly inputs: readonly [];
687
+ readonly name: "RoyaltyPolicyLAP__NotRoyaltyModule";
688
+ readonly type: "error";
689
+ } | {
690
+ readonly inputs: readonly [];
691
+ readonly name: "RoyaltyPolicyLAP__TransferFailed";
692
+ readonly type: "error";
693
+ } | {
694
+ readonly inputs: readonly [];
695
+ readonly name: "RoyaltyPolicyLAP__UnlinkableToParents";
696
+ readonly type: "error";
697
+ } | {
698
+ readonly inputs: readonly [];
699
+ readonly name: "RoyaltyPolicyLAP__ZeroAncestorsVaultImpl";
700
+ readonly type: "error";
701
+ } | {
702
+ readonly inputs: readonly [];
703
+ readonly name: "RoyaltyPolicyLAP__ZeroLicensingModule";
704
+ readonly type: "error";
705
+ } | {
706
+ readonly inputs: readonly [];
707
+ readonly name: "RoyaltyPolicyLAP__ZeroLiquidSplitFactory";
708
+ readonly type: "error";
709
+ } | {
710
+ readonly inputs: readonly [];
711
+ readonly name: "RoyaltyPolicyLAP__ZeroLiquidSplitMain";
712
+ readonly type: "error";
713
+ } | {
714
+ readonly inputs: readonly [];
715
+ readonly name: "RoyaltyPolicyLAP__ZeroRoyaltyModule";
716
+ readonly type: "error";
717
+ } | {
718
+ readonly inputs: readonly [];
719
+ readonly name: "TaggingModule__DstIpIdDoesNotHaveDstTag";
720
+ readonly type: "error";
721
+ } | {
722
+ readonly inputs: readonly [];
723
+ readonly name: "TaggingModule__InvalidRelationTypeName";
724
+ readonly type: "error";
725
+ } | {
726
+ readonly inputs: readonly [];
727
+ readonly name: "TaggingModule__RelationTypeAlreadyExists";
728
+ readonly type: "error";
729
+ } | {
730
+ readonly inputs: readonly [];
731
+ readonly name: "TaggingModule__RelationTypeDoesNotExist";
732
+ readonly type: "error";
733
+ } | {
734
+ readonly inputs: readonly [];
735
+ readonly name: "TaggingModule__SrcIpIdDoesNotHaveSrcTag";
736
+ readonly type: "error";
737
+ })[];
738
+ licensingModuleConfig: {
739
+ abi: readonly [{
740
+ readonly anonymous: false;
741
+ readonly inputs: readonly [{
742
+ readonly indexed: true;
743
+ readonly internalType: "address";
744
+ readonly name: "caller";
745
+ readonly type: "address";
746
+ }, {
747
+ readonly indexed: true;
748
+ readonly internalType: "address";
749
+ readonly name: "ipId";
750
+ readonly type: "address";
751
+ }, {
752
+ readonly indexed: false;
753
+ readonly internalType: "address[]";
754
+ readonly name: "parentIpIds";
755
+ readonly type: "address[]";
756
+ }];
757
+ readonly name: "IpIdLinkedToParents";
758
+ readonly type: "event";
759
+ }, {
760
+ readonly anonymous: false;
761
+ readonly inputs: readonly [{
762
+ readonly indexed: true;
763
+ readonly internalType: "address";
764
+ readonly name: "caller";
765
+ readonly type: "address";
766
+ }, {
767
+ readonly indexed: true;
768
+ readonly internalType: "address";
769
+ readonly name: "ipId";
770
+ readonly type: "address";
771
+ }, {
772
+ readonly indexed: true;
773
+ readonly internalType: "uint256";
774
+ readonly name: "policyId";
775
+ readonly type: "uint256";
776
+ }, {
777
+ readonly indexed: false;
778
+ readonly internalType: "uint256";
779
+ readonly name: "index";
780
+ readonly type: "uint256";
781
+ }, {
782
+ readonly indexed: false;
783
+ readonly internalType: "bool";
784
+ readonly name: "isInherited";
785
+ readonly type: "bool";
786
+ }];
787
+ readonly name: "PolicyAddedToIpId";
788
+ readonly type: "event";
789
+ }, {
790
+ readonly anonymous: false;
791
+ readonly inputs: readonly [{
792
+ readonly indexed: true;
793
+ readonly internalType: "uint256";
794
+ readonly name: "policyId";
795
+ readonly type: "uint256";
796
+ }, {
797
+ readonly indexed: true;
798
+ readonly internalType: "address";
799
+ readonly name: "policyFrameworkManager";
800
+ readonly type: "address";
801
+ }, {
802
+ readonly indexed: false;
803
+ readonly internalType: "bytes";
804
+ readonly name: "frameworkData";
805
+ readonly type: "bytes";
806
+ }, {
807
+ readonly indexed: false;
808
+ readonly internalType: "address";
809
+ readonly name: "royaltyPolicy";
810
+ readonly type: "address";
811
+ }, {
812
+ readonly indexed: false;
813
+ readonly internalType: "bytes";
814
+ readonly name: "royaltyData";
815
+ readonly type: "bytes";
816
+ }, {
817
+ readonly indexed: false;
818
+ readonly internalType: "uint256";
819
+ readonly name: "mintingFee";
820
+ readonly type: "uint256";
821
+ }, {
822
+ readonly indexed: false;
823
+ readonly internalType: "address";
824
+ readonly name: "mintingFeeToken";
825
+ readonly type: "address";
826
+ }];
827
+ readonly name: "PolicyRegistered";
828
+ readonly type: "event";
829
+ }, {
830
+ readonly inputs: readonly [{
831
+ readonly internalType: "address";
832
+ readonly name: "ipId";
833
+ readonly type: "address";
834
+ }, {
835
+ readonly internalType: "uint256";
836
+ readonly name: "polId";
837
+ readonly type: "uint256";
838
+ }];
839
+ readonly name: "addPolicyToIp";
840
+ readonly outputs: readonly [{
841
+ readonly internalType: "uint256";
842
+ readonly name: "indexOnIpId";
843
+ readonly type: "uint256";
844
+ }];
845
+ readonly stateMutability: "nonpayable";
846
+ readonly type: "function";
847
+ }, {
848
+ readonly inputs: readonly [{
849
+ readonly internalType: "uint256[]";
850
+ readonly name: "licenseIds";
851
+ readonly type: "uint256[]";
852
+ }, {
853
+ readonly internalType: "address";
854
+ readonly name: "childIpId";
855
+ readonly type: "address";
856
+ }, {
857
+ readonly internalType: "bytes";
858
+ readonly name: "royaltyContext";
859
+ readonly type: "bytes";
860
+ }];
861
+ readonly name: "linkIpToParents";
862
+ readonly outputs: readonly [];
863
+ readonly stateMutability: "nonpayable";
864
+ readonly type: "function";
865
+ }, {
866
+ readonly inputs: readonly [{
867
+ readonly internalType: "uint256";
868
+ readonly name: "policyId";
869
+ readonly type: "uint256";
870
+ }, {
871
+ readonly internalType: "address";
872
+ readonly name: "licensorIpId";
873
+ readonly type: "address";
874
+ }, {
875
+ readonly internalType: "uint256";
876
+ readonly name: "amount";
877
+ readonly type: "uint256";
878
+ }, {
879
+ readonly internalType: "address";
880
+ readonly name: "receiver";
881
+ readonly type: "address";
882
+ }, {
883
+ readonly internalType: "bytes";
884
+ readonly name: "royaltyContext";
885
+ readonly type: "bytes";
886
+ }];
887
+ readonly name: "mintLicense";
888
+ readonly outputs: readonly [{
889
+ readonly internalType: "uint256";
890
+ readonly name: "licenseId";
891
+ readonly type: "uint256";
892
+ }];
893
+ readonly stateMutability: "nonpayable";
894
+ readonly type: "function";
895
+ }, {
896
+ readonly inputs: readonly [{
897
+ readonly components: readonly [{
898
+ readonly internalType: "bool";
899
+ readonly name: "isLicenseTransferable";
900
+ readonly type: "bool";
901
+ }, {
902
+ readonly internalType: "address";
903
+ readonly name: "policyFramework";
904
+ readonly type: "address";
905
+ }, {
906
+ readonly internalType: "bytes";
907
+ readonly name: "frameworkData";
908
+ readonly type: "bytes";
909
+ }, {
910
+ readonly internalType: "address";
911
+ readonly name: "royaltyPolicy";
912
+ readonly type: "address";
913
+ }, {
914
+ readonly internalType: "bytes";
915
+ readonly name: "royaltyData";
916
+ readonly type: "bytes";
917
+ }, {
918
+ readonly internalType: "uint256";
919
+ readonly name: "mintingFee";
920
+ readonly type: "uint256";
921
+ }, {
922
+ readonly internalType: "address";
923
+ readonly name: "mintingFeeToken";
924
+ readonly type: "address";
925
+ }];
926
+ readonly internalType: "struct Licensing.Policy";
927
+ readonly name: "pol";
928
+ readonly type: "tuple";
929
+ }];
930
+ readonly name: "registerPolicy";
931
+ readonly outputs: readonly [{
932
+ readonly internalType: "uint256";
933
+ readonly name: "policyId";
934
+ readonly type: "uint256";
935
+ }];
936
+ readonly stateMutability: "nonpayable";
937
+ readonly type: "function";
938
+ }];
939
+ address: `0x${string}`;
940
+ };
941
+ pilPolicyFrameworkManagerConfig: {
942
+ abi: readonly [{
943
+ readonly inputs: readonly [{
944
+ readonly components: readonly [{
945
+ readonly internalType: "bool";
946
+ readonly name: "transferable";
947
+ readonly type: "bool";
948
+ }, {
949
+ readonly internalType: "address";
950
+ readonly name: "royaltyPolicy";
951
+ readonly type: "address";
952
+ }, {
953
+ readonly internalType: "uint256";
954
+ readonly name: "mintingFee";
955
+ readonly type: "uint256";
956
+ }, {
957
+ readonly internalType: "address";
958
+ readonly name: "mintingFeeToken";
959
+ readonly type: "address";
960
+ }, {
961
+ readonly components: readonly [{
962
+ readonly internalType: "bool";
963
+ readonly name: "attribution";
964
+ readonly type: "bool";
965
+ }, {
966
+ readonly internalType: "bool";
967
+ readonly name: "commercialUse";
968
+ readonly type: "bool";
969
+ }, {
970
+ readonly internalType: "bool";
971
+ readonly name: "commercialAttribution";
972
+ readonly type: "bool";
973
+ }, {
974
+ readonly internalType: "address";
975
+ readonly name: "commercializerChecker";
976
+ readonly type: "address";
977
+ }, {
978
+ readonly internalType: "bytes";
979
+ readonly name: "commercializerCheckerData";
980
+ readonly type: "bytes";
981
+ }, {
982
+ readonly internalType: "uint32";
983
+ readonly name: "commercialRevShare";
984
+ readonly type: "uint32";
985
+ }, {
986
+ readonly internalType: "bool";
987
+ readonly name: "derivativesAllowed";
988
+ readonly type: "bool";
989
+ }, {
990
+ readonly internalType: "bool";
991
+ readonly name: "derivativesAttribution";
992
+ readonly type: "bool";
993
+ }, {
994
+ readonly internalType: "bool";
995
+ readonly name: "derivativesApproval";
996
+ readonly type: "bool";
997
+ }, {
998
+ readonly internalType: "bool";
999
+ readonly name: "derivativesReciprocal";
1000
+ readonly type: "bool";
1001
+ }, {
1002
+ readonly internalType: "string[]";
1003
+ readonly name: "territories";
1004
+ readonly type: "string[]";
1005
+ }, {
1006
+ readonly internalType: "string[]";
1007
+ readonly name: "distributionChannels";
1008
+ readonly type: "string[]";
1009
+ }, {
1010
+ readonly internalType: "string[]";
1011
+ readonly name: "contentRestrictions";
1012
+ readonly type: "string[]";
1013
+ }];
1014
+ readonly internalType: "struct PILPolicy";
1015
+ readonly name: "policy";
1016
+ readonly type: "tuple";
1017
+ }];
1018
+ readonly internalType: "struct RegisterPILPolicyParams";
1019
+ readonly name: "params";
1020
+ readonly type: "tuple";
1021
+ }];
1022
+ readonly name: "registerPolicy";
1023
+ readonly outputs: readonly [{
1024
+ readonly internalType: "uint256";
1025
+ readonly name: "policyId";
1026
+ readonly type: "uint256";
1027
+ }];
1028
+ readonly stateMutability: "nonpayable";
1029
+ readonly type: "function";
1030
+ }];
1031
+ address: `0x${string}`;
1032
+ };
1033
+ constructor(rpcClient: PublicClient, wallet: WalletClient);
1034
+ /**
1035
+ * Registers a PIL policy to the registry
1036
+ * Internally, this function must generate a Licensing.Policy struct and call registerPolicy.
1037
+ * @param request - the licensing parameters for the Programmable IP License v1 (PIL) standard.
1038
+ * @param request.transferable Whether or not the license is transferable
1039
+ * @param request.attribution Whether or not attribution is required when reproducing the work
1040
+ * @param request.commercialUse Whether or not the work can be used commercially
1041
+ * @param request.commercialAttribution Whether or not attribution is required when reproducing the work commercially
1042
+ * @param request.commercializerChecker commericializers that are allowed to commercially exploit the work. If zero address, then no restrictions is enforced.
1043
+ * @param request.commercialRevShare Percentage of revenue that must be shared with the licensor
1044
+ * @param request.derivativesAllowed Whether or not the licensee can create derivatives of his work
1045
+ * @param request.derivativesAttribution Whether or not attribution is required for derivatives of the work
1046
+ * @param request.derivativesApproval Whether or not the licensor must approve derivatives of the work before they can be linked to the licensor IP ID
1047
+ * @param request.derivativesReciprocal Whether or not the licensee must license derivatives of the work under the same terms.
1048
+ * @param request.territories List of territories where the license is valid. If empty, global.
1049
+ * @param request.distributionChannels List of distribution channels where the license is valid. Empty if no restrictions.
1050
+ * @param request.royaltyPolicy Address of a royalty policy contract (e.g. RoyaltyPolicyLS) that will handle royalty payments
1051
+ * @returns the transaction hash and the policy ID if the txOptions.waitForTransaction is set to true
1052
+ */
1053
+ registerPILPolicy(request: RegisterPILPolicyRequest): Promise<RegisterPILPolicyResponse>;
1054
+ /**
1055
+ * Adds a policy to the set of policies of an IP
1056
+ * @param request The request object containing details to add a policy to an IP
1057
+ * @param request.ipId The id of the IP
1058
+ * @param request.polId The id of the policy
1059
+ * @return the transaction hash and the index of the policy in the IP's policy set if the txOptions.waitForTransaction is set to true
1060
+ */
1061
+ addPolicyToIp(request: AddPolicyToIpRequest): Promise<AddPolicyToIpResponse>;
1062
+ }
1063
+ //# sourceMappingURL=policy.d.ts.map