@story-protocol/core-sdk 1.0.0-rc.3 → 1.0.0-rc.4

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.
@@ -4212,6 +4212,928 @@ var licenseRegistryAddress = {
4212
4212
  1513: "0x0c3D467537FAd845a78728CEdc3D9447338c5422"
4213
4213
  };
4214
4214
 
4215
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4216
+ // LicenseToken
4217
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4218
+
4219
+ /**
4220
+ *
4221
+ */
4222
+ var licenseTokenAbi = [{
4223
+ type: "constructor",
4224
+ inputs: [],
4225
+ stateMutability: "nonpayable"
4226
+ }, {
4227
+ type: "error",
4228
+ inputs: [{
4229
+ name: "target",
4230
+ internalType: "address",
4231
+ type: "address"
4232
+ }],
4233
+ name: "AddressEmptyCode"
4234
+ }, {
4235
+ type: "error",
4236
+ inputs: [{
4237
+ name: "implementation",
4238
+ internalType: "address",
4239
+ type: "address"
4240
+ }],
4241
+ name: "ERC1967InvalidImplementation"
4242
+ }, {
4243
+ type: "error",
4244
+ inputs: [],
4245
+ name: "ERC1967NonPayable"
4246
+ }, {
4247
+ type: "error",
4248
+ inputs: [],
4249
+ name: "ERC721EnumerableForbiddenBatchMint"
4250
+ }, {
4251
+ type: "error",
4252
+ inputs: [{
4253
+ name: "sender",
4254
+ internalType: "address",
4255
+ type: "address"
4256
+ }, {
4257
+ name: "tokenId",
4258
+ internalType: "uint256",
4259
+ type: "uint256"
4260
+ }, {
4261
+ name: "owner",
4262
+ internalType: "address",
4263
+ type: "address"
4264
+ }],
4265
+ name: "ERC721IncorrectOwner"
4266
+ }, {
4267
+ type: "error",
4268
+ inputs: [{
4269
+ name: "operator",
4270
+ internalType: "address",
4271
+ type: "address"
4272
+ }, {
4273
+ name: "tokenId",
4274
+ internalType: "uint256",
4275
+ type: "uint256"
4276
+ }],
4277
+ name: "ERC721InsufficientApproval"
4278
+ }, {
4279
+ type: "error",
4280
+ inputs: [{
4281
+ name: "approver",
4282
+ internalType: "address",
4283
+ type: "address"
4284
+ }],
4285
+ name: "ERC721InvalidApprover"
4286
+ }, {
4287
+ type: "error",
4288
+ inputs: [{
4289
+ name: "operator",
4290
+ internalType: "address",
4291
+ type: "address"
4292
+ }],
4293
+ name: "ERC721InvalidOperator"
4294
+ }, {
4295
+ type: "error",
4296
+ inputs: [{
4297
+ name: "owner",
4298
+ internalType: "address",
4299
+ type: "address"
4300
+ }],
4301
+ name: "ERC721InvalidOwner"
4302
+ }, {
4303
+ type: "error",
4304
+ inputs: [{
4305
+ name: "receiver",
4306
+ internalType: "address",
4307
+ type: "address"
4308
+ }],
4309
+ name: "ERC721InvalidReceiver"
4310
+ }, {
4311
+ type: "error",
4312
+ inputs: [{
4313
+ name: "sender",
4314
+ internalType: "address",
4315
+ type: "address"
4316
+ }],
4317
+ name: "ERC721InvalidSender"
4318
+ }, {
4319
+ type: "error",
4320
+ inputs: [{
4321
+ name: "tokenId",
4322
+ internalType: "uint256",
4323
+ type: "uint256"
4324
+ }],
4325
+ name: "ERC721NonexistentToken"
4326
+ }, {
4327
+ type: "error",
4328
+ inputs: [{
4329
+ name: "owner",
4330
+ internalType: "address",
4331
+ type: "address"
4332
+ }, {
4333
+ name: "index",
4334
+ internalType: "uint256",
4335
+ type: "uint256"
4336
+ }],
4337
+ name: "ERC721OutOfBoundsIndex"
4338
+ }, {
4339
+ type: "error",
4340
+ inputs: [],
4341
+ name: "FailedInnerCall"
4342
+ }, {
4343
+ type: "error",
4344
+ inputs: [],
4345
+ name: "Governance__InconsistentState"
4346
+ }, {
4347
+ type: "error",
4348
+ inputs: [],
4349
+ name: "Governance__OnlyProtocolAdmin"
4350
+ }, {
4351
+ type: "error",
4352
+ inputs: [{
4353
+ name: "interfaceName",
4354
+ internalType: "string",
4355
+ type: "string"
4356
+ }],
4357
+ name: "Governance__UnsupportedInterface"
4358
+ }, {
4359
+ type: "error",
4360
+ inputs: [],
4361
+ name: "Governance__ZeroAddress"
4362
+ }, {
4363
+ type: "error",
4364
+ inputs: [],
4365
+ name: "InvalidInitialization"
4366
+ }, {
4367
+ type: "error",
4368
+ inputs: [{
4369
+ name: "licenseTemplate",
4370
+ internalType: "address",
4371
+ type: "address"
4372
+ }, {
4373
+ name: "anotherLicenseTemplate",
4374
+ internalType: "address",
4375
+ type: "address"
4376
+ }],
4377
+ name: "LicenseToken__AllLicenseTokensMustFromSameLicenseTemplate"
4378
+ }, {
4379
+ type: "error",
4380
+ inputs: [],
4381
+ name: "LicenseToken__CallerNotLicensingModule"
4382
+ }, {
4383
+ type: "error",
4384
+ inputs: [{
4385
+ name: "tokenId",
4386
+ internalType: "uint256",
4387
+ type: "uint256"
4388
+ }, {
4389
+ name: "expiredAt",
4390
+ internalType: "uint256",
4391
+ type: "uint256"
4392
+ }, {
4393
+ name: "currentTimestamp",
4394
+ internalType: "uint256",
4395
+ type: "uint256"
4396
+ }],
4397
+ name: "LicenseToken__LicenseTokenExpired"
4398
+ }, {
4399
+ type: "error",
4400
+ inputs: [{
4401
+ name: "tokenId",
4402
+ internalType: "uint256",
4403
+ type: "uint256"
4404
+ }, {
4405
+ name: "iPowner",
4406
+ internalType: "address",
4407
+ type: "address"
4408
+ }, {
4409
+ name: "tokenOwner",
4410
+ internalType: "address",
4411
+ type: "address"
4412
+ }],
4413
+ name: "LicenseToken__NotLicenseTokenOwner"
4414
+ }, {
4415
+ type: "error",
4416
+ inputs: [],
4417
+ name: "LicenseToken__NotTransferable"
4418
+ }, {
4419
+ type: "error",
4420
+ inputs: [{
4421
+ name: "tokenId",
4422
+ internalType: "uint256",
4423
+ type: "uint256"
4424
+ }],
4425
+ name: "LicenseToken__RevokedLicense"
4426
+ }, {
4427
+ type: "error",
4428
+ inputs: [],
4429
+ name: "LicenseToken__ZeroDisputeModule"
4430
+ }, {
4431
+ type: "error",
4432
+ inputs: [],
4433
+ name: "LicenseToken__ZeroLicensingModule"
4434
+ }, {
4435
+ type: "error",
4436
+ inputs: [],
4437
+ name: "NotInitializing"
4438
+ }, {
4439
+ type: "error",
4440
+ inputs: [{
4441
+ name: "value",
4442
+ internalType: "uint256",
4443
+ type: "uint256"
4444
+ }, {
4445
+ name: "length",
4446
+ internalType: "uint256",
4447
+ type: "uint256"
4448
+ }],
4449
+ name: "StringsInsufficientHexLength"
4450
+ }, {
4451
+ type: "error",
4452
+ inputs: [],
4453
+ name: "UUPSUnauthorizedCallContext"
4454
+ }, {
4455
+ type: "error",
4456
+ inputs: [{
4457
+ name: "slot",
4458
+ internalType: "bytes32",
4459
+ type: "bytes32"
4460
+ }],
4461
+ name: "UUPSUnsupportedProxiableUUID"
4462
+ }, {
4463
+ type: "event",
4464
+ anonymous: false,
4465
+ inputs: [{
4466
+ name: "owner",
4467
+ internalType: "address",
4468
+ type: "address",
4469
+ indexed: true
4470
+ }, {
4471
+ name: "approved",
4472
+ internalType: "address",
4473
+ type: "address",
4474
+ indexed: true
4475
+ }, {
4476
+ name: "tokenId",
4477
+ internalType: "uint256",
4478
+ type: "uint256",
4479
+ indexed: true
4480
+ }],
4481
+ name: "Approval"
4482
+ }, {
4483
+ type: "event",
4484
+ anonymous: false,
4485
+ inputs: [{
4486
+ name: "owner",
4487
+ internalType: "address",
4488
+ type: "address",
4489
+ indexed: true
4490
+ }, {
4491
+ name: "operator",
4492
+ internalType: "address",
4493
+ type: "address",
4494
+ indexed: true
4495
+ }, {
4496
+ name: "approved",
4497
+ internalType: "bool",
4498
+ type: "bool",
4499
+ indexed: false
4500
+ }],
4501
+ name: "ApprovalForAll"
4502
+ }, {
4503
+ type: "event",
4504
+ anonymous: false,
4505
+ inputs: [{
4506
+ name: "_fromTokenId",
4507
+ internalType: "uint256",
4508
+ type: "uint256",
4509
+ indexed: false
4510
+ }, {
4511
+ name: "_toTokenId",
4512
+ internalType: "uint256",
4513
+ type: "uint256",
4514
+ indexed: false
4515
+ }],
4516
+ name: "BatchMetadataUpdate"
4517
+ }, {
4518
+ type: "event",
4519
+ anonymous: false,
4520
+ inputs: [{
4521
+ name: "newGovernance",
4522
+ internalType: "address",
4523
+ type: "address",
4524
+ indexed: true
4525
+ }],
4526
+ name: "GovernanceUpdated"
4527
+ }, {
4528
+ type: "event",
4529
+ anonymous: false,
4530
+ inputs: [{
4531
+ name: "version",
4532
+ internalType: "uint64",
4533
+ type: "uint64",
4534
+ indexed: false
4535
+ }],
4536
+ name: "Initialized"
4537
+ }, {
4538
+ type: "event",
4539
+ anonymous: false,
4540
+ inputs: [{
4541
+ name: "minter",
4542
+ internalType: "address",
4543
+ type: "address",
4544
+ indexed: true
4545
+ }, {
4546
+ name: "receiver",
4547
+ internalType: "address",
4548
+ type: "address",
4549
+ indexed: true
4550
+ }, {
4551
+ name: "tokenId",
4552
+ internalType: "uint256",
4553
+ type: "uint256",
4554
+ indexed: true
4555
+ }],
4556
+ name: "LicenseTokenMinted"
4557
+ }, {
4558
+ type: "event",
4559
+ anonymous: false,
4560
+ inputs: [{
4561
+ name: "from",
4562
+ internalType: "address",
4563
+ type: "address",
4564
+ indexed: true
4565
+ }, {
4566
+ name: "to",
4567
+ internalType: "address",
4568
+ type: "address",
4569
+ indexed: true
4570
+ }, {
4571
+ name: "tokenId",
4572
+ internalType: "uint256",
4573
+ type: "uint256",
4574
+ indexed: true
4575
+ }],
4576
+ name: "Transfer"
4577
+ }, {
4578
+ type: "event",
4579
+ anonymous: false,
4580
+ inputs: [{
4581
+ name: "implementation",
4582
+ internalType: "address",
4583
+ type: "address",
4584
+ indexed: true
4585
+ }],
4586
+ name: "Upgraded"
4587
+ }, {
4588
+ type: "function",
4589
+ inputs: [],
4590
+ name: "UPGRADE_INTERFACE_VERSION",
4591
+ outputs: [{
4592
+ name: "",
4593
+ internalType: "string",
4594
+ type: "string"
4595
+ }],
4596
+ stateMutability: "view"
4597
+ }, {
4598
+ type: "function",
4599
+ inputs: [{
4600
+ name: "to",
4601
+ internalType: "address",
4602
+ type: "address"
4603
+ }, {
4604
+ name: "tokenId",
4605
+ internalType: "uint256",
4606
+ type: "uint256"
4607
+ }],
4608
+ name: "approve",
4609
+ outputs: [],
4610
+ stateMutability: "nonpayable"
4611
+ }, {
4612
+ type: "function",
4613
+ inputs: [{
4614
+ name: "owner",
4615
+ internalType: "address",
4616
+ type: "address"
4617
+ }],
4618
+ name: "balanceOf",
4619
+ outputs: [{
4620
+ name: "",
4621
+ internalType: "uint256",
4622
+ type: "uint256"
4623
+ }],
4624
+ stateMutability: "view"
4625
+ }, {
4626
+ type: "function",
4627
+ inputs: [{
4628
+ name: "holder",
4629
+ internalType: "address",
4630
+ type: "address"
4631
+ }, {
4632
+ name: "tokenIds",
4633
+ internalType: "uint256[]",
4634
+ type: "uint256[]"
4635
+ }],
4636
+ name: "burnLicenseTokens",
4637
+ outputs: [],
4638
+ stateMutability: "nonpayable"
4639
+ }, {
4640
+ type: "function",
4641
+ inputs: [{
4642
+ name: "tokenId",
4643
+ internalType: "uint256",
4644
+ type: "uint256"
4645
+ }],
4646
+ name: "getApproved",
4647
+ outputs: [{
4648
+ name: "",
4649
+ internalType: "address",
4650
+ type: "address"
4651
+ }],
4652
+ stateMutability: "view"
4653
+ }, {
4654
+ type: "function",
4655
+ inputs: [{
4656
+ name: "tokenId",
4657
+ internalType: "uint256",
4658
+ type: "uint256"
4659
+ }],
4660
+ name: "getExpirationTime",
4661
+ outputs: [{
4662
+ name: "",
4663
+ internalType: "uint256",
4664
+ type: "uint256"
4665
+ }],
4666
+ stateMutability: "view"
4667
+ }, {
4668
+ type: "function",
4669
+ inputs: [],
4670
+ name: "getGovernance",
4671
+ outputs: [{
4672
+ name: "",
4673
+ internalType: "address",
4674
+ type: "address"
4675
+ }],
4676
+ stateMutability: "view"
4677
+ }, {
4678
+ type: "function",
4679
+ inputs: [{
4680
+ name: "tokenId",
4681
+ internalType: "uint256",
4682
+ type: "uint256"
4683
+ }],
4684
+ name: "getLicenseTemplate",
4685
+ outputs: [{
4686
+ name: "",
4687
+ internalType: "address",
4688
+ type: "address"
4689
+ }],
4690
+ stateMutability: "view"
4691
+ }, {
4692
+ type: "function",
4693
+ inputs: [{
4694
+ name: "tokenId",
4695
+ internalType: "uint256",
4696
+ type: "uint256"
4697
+ }],
4698
+ name: "getLicenseTermsId",
4699
+ outputs: [{
4700
+ name: "",
4701
+ internalType: "uint256",
4702
+ type: "uint256"
4703
+ }],
4704
+ stateMutability: "view"
4705
+ }, {
4706
+ type: "function",
4707
+ inputs: [{
4708
+ name: "tokenId",
4709
+ internalType: "uint256",
4710
+ type: "uint256"
4711
+ }],
4712
+ name: "getLicenseTokenMetadata",
4713
+ outputs: [{
4714
+ name: "",
4715
+ internalType: "struct ILicenseToken.LicenseTokenMetadata",
4716
+ type: "tuple",
4717
+ components: [{
4718
+ name: "licensorIpId",
4719
+ internalType: "address",
4720
+ type: "address"
4721
+ }, {
4722
+ name: "licenseTemplate",
4723
+ internalType: "address",
4724
+ type: "address"
4725
+ }, {
4726
+ name: "licenseTermsId",
4727
+ internalType: "uint256",
4728
+ type: "uint256"
4729
+ }, {
4730
+ name: "transferable",
4731
+ internalType: "bool",
4732
+ type: "bool"
4733
+ }, {
4734
+ name: "mintedAt",
4735
+ internalType: "uint256",
4736
+ type: "uint256"
4737
+ }, {
4738
+ name: "expiresAt",
4739
+ internalType: "uint256",
4740
+ type: "uint256"
4741
+ }]
4742
+ }],
4743
+ stateMutability: "view"
4744
+ }, {
4745
+ type: "function",
4746
+ inputs: [{
4747
+ name: "tokenId",
4748
+ internalType: "uint256",
4749
+ type: "uint256"
4750
+ }],
4751
+ name: "getLicensorIpId",
4752
+ outputs: [{
4753
+ name: "",
4754
+ internalType: "address",
4755
+ type: "address"
4756
+ }],
4757
+ stateMutability: "view"
4758
+ }, {
4759
+ type: "function",
4760
+ inputs: [{
4761
+ name: "governance",
4762
+ internalType: "address",
4763
+ type: "address"
4764
+ }, {
4765
+ name: "imageUrl",
4766
+ internalType: "string",
4767
+ type: "string"
4768
+ }],
4769
+ name: "initialize",
4770
+ outputs: [],
4771
+ stateMutability: "nonpayable"
4772
+ }, {
4773
+ type: "function",
4774
+ inputs: [{
4775
+ name: "owner",
4776
+ internalType: "address",
4777
+ type: "address"
4778
+ }, {
4779
+ name: "operator",
4780
+ internalType: "address",
4781
+ type: "address"
4782
+ }],
4783
+ name: "isApprovedForAll",
4784
+ outputs: [{
4785
+ name: "",
4786
+ internalType: "bool",
4787
+ type: "bool"
4788
+ }],
4789
+ stateMutability: "view"
4790
+ }, {
4791
+ type: "function",
4792
+ inputs: [{
4793
+ name: "tokenId",
4794
+ internalType: "uint256",
4795
+ type: "uint256"
4796
+ }],
4797
+ name: "isLicenseTokenRevoked",
4798
+ outputs: [{
4799
+ name: "",
4800
+ internalType: "bool",
4801
+ type: "bool"
4802
+ }],
4803
+ stateMutability: "view"
4804
+ }, {
4805
+ type: "function",
4806
+ inputs: [],
4807
+ name: "licensingModule",
4808
+ outputs: [{
4809
+ name: "",
4810
+ internalType: "contract ILicensingModule",
4811
+ type: "address"
4812
+ }],
4813
+ stateMutability: "view"
4814
+ }, {
4815
+ type: "function",
4816
+ inputs: [{
4817
+ name: "licensorIpId",
4818
+ internalType: "address",
4819
+ type: "address"
4820
+ }, {
4821
+ name: "licenseTemplate",
4822
+ internalType: "address",
4823
+ type: "address"
4824
+ }, {
4825
+ name: "licenseTermsId",
4826
+ internalType: "uint256",
4827
+ type: "uint256"
4828
+ }, {
4829
+ name: "amount",
4830
+ internalType: "uint256",
4831
+ type: "uint256"
4832
+ }, {
4833
+ name: "minter",
4834
+ internalType: "address",
4835
+ type: "address"
4836
+ }, {
4837
+ name: "receiver",
4838
+ internalType: "address",
4839
+ type: "address"
4840
+ }],
4841
+ name: "mintLicenseTokens",
4842
+ outputs: [{
4843
+ name: "startLicenseTokenId",
4844
+ internalType: "uint256",
4845
+ type: "uint256"
4846
+ }],
4847
+ stateMutability: "nonpayable"
4848
+ }, {
4849
+ type: "function",
4850
+ inputs: [],
4851
+ name: "name",
4852
+ outputs: [{
4853
+ name: "",
4854
+ internalType: "string",
4855
+ type: "string"
4856
+ }],
4857
+ stateMutability: "view"
4858
+ }, {
4859
+ type: "function",
4860
+ inputs: [{
4861
+ name: "tokenId",
4862
+ internalType: "uint256",
4863
+ type: "uint256"
4864
+ }],
4865
+ name: "ownerOf",
4866
+ outputs: [{
4867
+ name: "",
4868
+ internalType: "address",
4869
+ type: "address"
4870
+ }],
4871
+ stateMutability: "view"
4872
+ }, {
4873
+ type: "function",
4874
+ inputs: [],
4875
+ name: "proxiableUUID",
4876
+ outputs: [{
4877
+ name: "",
4878
+ internalType: "bytes32",
4879
+ type: "bytes32"
4880
+ }],
4881
+ stateMutability: "view"
4882
+ }, {
4883
+ type: "function",
4884
+ inputs: [{
4885
+ name: "from",
4886
+ internalType: "address",
4887
+ type: "address"
4888
+ }, {
4889
+ name: "to",
4890
+ internalType: "address",
4891
+ type: "address"
4892
+ }, {
4893
+ name: "tokenId",
4894
+ internalType: "uint256",
4895
+ type: "uint256"
4896
+ }],
4897
+ name: "safeTransferFrom",
4898
+ outputs: [],
4899
+ stateMutability: "nonpayable"
4900
+ }, {
4901
+ type: "function",
4902
+ inputs: [{
4903
+ name: "from",
4904
+ internalType: "address",
4905
+ type: "address"
4906
+ }, {
4907
+ name: "to",
4908
+ internalType: "address",
4909
+ type: "address"
4910
+ }, {
4911
+ name: "tokenId",
4912
+ internalType: "uint256",
4913
+ type: "uint256"
4914
+ }, {
4915
+ name: "data",
4916
+ internalType: "bytes",
4917
+ type: "bytes"
4918
+ }],
4919
+ name: "safeTransferFrom",
4920
+ outputs: [],
4921
+ stateMutability: "nonpayable"
4922
+ }, {
4923
+ type: "function",
4924
+ inputs: [{
4925
+ name: "operator",
4926
+ internalType: "address",
4927
+ type: "address"
4928
+ }, {
4929
+ name: "approved",
4930
+ internalType: "bool",
4931
+ type: "bool"
4932
+ }],
4933
+ name: "setApprovalForAll",
4934
+ outputs: [],
4935
+ stateMutability: "nonpayable"
4936
+ }, {
4937
+ type: "function",
4938
+ inputs: [{
4939
+ name: "newDisputeModule",
4940
+ internalType: "address",
4941
+ type: "address"
4942
+ }],
4943
+ name: "setDisputeModule",
4944
+ outputs: [],
4945
+ stateMutability: "nonpayable"
4946
+ }, {
4947
+ type: "function",
4948
+ inputs: [{
4949
+ name: "newGovernance",
4950
+ internalType: "address",
4951
+ type: "address"
4952
+ }],
4953
+ name: "setGovernance",
4954
+ outputs: [],
4955
+ stateMutability: "nonpayable"
4956
+ }, {
4957
+ type: "function",
4958
+ inputs: [{
4959
+ name: "url",
4960
+ internalType: "string",
4961
+ type: "string"
4962
+ }],
4963
+ name: "setLicensingImageUrl",
4964
+ outputs: [],
4965
+ stateMutability: "nonpayable"
4966
+ }, {
4967
+ type: "function",
4968
+ inputs: [{
4969
+ name: "newLicensingModule",
4970
+ internalType: "address",
4971
+ type: "address"
4972
+ }],
4973
+ name: "setLicensingModule",
4974
+ outputs: [],
4975
+ stateMutability: "nonpayable"
4976
+ }, {
4977
+ type: "function",
4978
+ inputs: [{
4979
+ name: "interfaceId",
4980
+ internalType: "bytes4",
4981
+ type: "bytes4"
4982
+ }],
4983
+ name: "supportsInterface",
4984
+ outputs: [{
4985
+ name: "",
4986
+ internalType: "bool",
4987
+ type: "bool"
4988
+ }],
4989
+ stateMutability: "view"
4990
+ }, {
4991
+ type: "function",
4992
+ inputs: [],
4993
+ name: "symbol",
4994
+ outputs: [{
4995
+ name: "",
4996
+ internalType: "string",
4997
+ type: "string"
4998
+ }],
4999
+ stateMutability: "view"
5000
+ }, {
5001
+ type: "function",
5002
+ inputs: [{
5003
+ name: "index",
5004
+ internalType: "uint256",
5005
+ type: "uint256"
5006
+ }],
5007
+ name: "tokenByIndex",
5008
+ outputs: [{
5009
+ name: "",
5010
+ internalType: "uint256",
5011
+ type: "uint256"
5012
+ }],
5013
+ stateMutability: "view"
5014
+ }, {
5015
+ type: "function",
5016
+ inputs: [{
5017
+ name: "owner",
5018
+ internalType: "address",
5019
+ type: "address"
5020
+ }, {
5021
+ name: "index",
5022
+ internalType: "uint256",
5023
+ type: "uint256"
5024
+ }],
5025
+ name: "tokenOfOwnerByIndex",
5026
+ outputs: [{
5027
+ name: "",
5028
+ internalType: "uint256",
5029
+ type: "uint256"
5030
+ }],
5031
+ stateMutability: "view"
5032
+ }, {
5033
+ type: "function",
5034
+ inputs: [{
5035
+ name: "id",
5036
+ internalType: "uint256",
5037
+ type: "uint256"
5038
+ }],
5039
+ name: "tokenURI",
5040
+ outputs: [{
5041
+ name: "",
5042
+ internalType: "string",
5043
+ type: "string"
5044
+ }],
5045
+ stateMutability: "view"
5046
+ }, {
5047
+ type: "function",
5048
+ inputs: [],
5049
+ name: "totalMintedTokens",
5050
+ outputs: [{
5051
+ name: "",
5052
+ internalType: "uint256",
5053
+ type: "uint256"
5054
+ }],
5055
+ stateMutability: "view"
5056
+ }, {
5057
+ type: "function",
5058
+ inputs: [],
5059
+ name: "totalSupply",
5060
+ outputs: [{
5061
+ name: "",
5062
+ internalType: "uint256",
5063
+ type: "uint256"
5064
+ }],
5065
+ stateMutability: "view"
5066
+ }, {
5067
+ type: "function",
5068
+ inputs: [{
5069
+ name: "from",
5070
+ internalType: "address",
5071
+ type: "address"
5072
+ }, {
5073
+ name: "to",
5074
+ internalType: "address",
5075
+ type: "address"
5076
+ }, {
5077
+ name: "tokenId",
5078
+ internalType: "uint256",
5079
+ type: "uint256"
5080
+ }],
5081
+ name: "transferFrom",
5082
+ outputs: [],
5083
+ stateMutability: "nonpayable"
5084
+ }, {
5085
+ type: "function",
5086
+ inputs: [{
5087
+ name: "newImplementation",
5088
+ internalType: "address",
5089
+ type: "address"
5090
+ }, {
5091
+ name: "data",
5092
+ internalType: "bytes",
5093
+ type: "bytes"
5094
+ }],
5095
+ name: "upgradeToAndCall",
5096
+ outputs: [],
5097
+ stateMutability: "payable"
5098
+ }, {
5099
+ type: "function",
5100
+ inputs: [{
5101
+ name: "childIpId",
5102
+ internalType: "address",
5103
+ type: "address"
5104
+ }, {
5105
+ name: "childIpOwner",
5106
+ internalType: "address",
5107
+ type: "address"
5108
+ }, {
5109
+ name: "tokenIds",
5110
+ internalType: "uint256[]",
5111
+ type: "uint256[]"
5112
+ }],
5113
+ name: "validateLicenseTokensForDerivative",
5114
+ outputs: [{
5115
+ name: "licenseTemplate",
5116
+ internalType: "address",
5117
+ type: "address"
5118
+ }, {
5119
+ name: "licensorIpIds",
5120
+ internalType: "address[]",
5121
+ type: "address[]"
5122
+ }, {
5123
+ name: "licenseTermsIds",
5124
+ internalType: "uint256[]",
5125
+ type: "uint256[]"
5126
+ }],
5127
+ stateMutability: "view"
5128
+ }];
5129
+
5130
+ /**
5131
+ *
5132
+ */
5133
+ var licenseTokenAddress = {
5134
+ 1513: "0xD40b7bCA204f96a346021e31c9ad54FF495226e7"
5135
+ };
5136
+
4215
5137
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4216
5138
  // LicensingModule
4217
5139
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -7331,6 +8253,14 @@ var IpAssetRegistryClient = /*#__PURE__*/function (_IpAssetRegistryReadO) {
7331
8253
 
7332
8254
  // Contract IpRoyaltyVaultImpl =============================================================
7333
8255
 
8256
+ /**
8257
+ * IpRoyaltyVaultImplRevenueTokenClaimedEvent
8258
+ *
8259
+ * @param claimer address
8260
+ * @param token address
8261
+ * @param amount uint256
8262
+ */
8263
+
7334
8264
  /**
7335
8265
  * IpRoyaltyVaultImplRoyaltyTokensCollectedEvent
7336
8266
  *
@@ -7386,15 +8316,15 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7386
8316
  }
7387
8317
 
7388
8318
  /**
7389
- * event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
8319
+ * event RevenueTokenClaimed for contract IpRoyaltyVaultImpl
7390
8320
  */
7391
8321
  return _createClass(IpRoyaltyVaultImplEventClient, [{
7392
- key: "watchRoyaltyTokensCollectedEvent",
7393
- value: function watchRoyaltyTokensCollectedEvent(_onLogs6) {
8322
+ key: "watchRevenueTokenClaimedEvent",
8323
+ value: function watchRevenueTokenClaimedEvent(_onLogs6) {
7394
8324
  return this.rpcClient.watchContractEvent({
7395
8325
  abi: ipRoyaltyVaultImplAbi,
7396
8326
  address: this.address,
7397
- eventName: "RoyaltyTokensCollected",
8327
+ eventName: "RevenueTokenClaimed",
7398
8328
  onLogs: function onLogs(evs) {
7399
8329
  evs.forEach(function (it) {
7400
8330
  return _onLogs6(it.transactionHash, it.args);
@@ -7404,11 +8334,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7404
8334
  }
7405
8335
 
7406
8336
  /**
7407
- * parse tx receipt event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
8337
+ * parse tx receipt event RevenueTokenClaimed for contract IpRoyaltyVaultImpl
7408
8338
  */
7409
8339
  }, {
7410
- key: "parseTxRoyaltyTokensCollectedEvent",
7411
- value: function parseTxRoyaltyTokensCollectedEvent(txReceipt) {
8340
+ key: "parseTxRevenueTokenClaimedEvent",
8341
+ value: function parseTxRevenueTokenClaimedEvent(txReceipt) {
7412
8342
  var targetLogs = [];
7413
8343
  var _iterator6 = _createForOfIteratorHelper(txReceipt.logs),
7414
8344
  _step6;
@@ -7418,11 +8348,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7418
8348
  try {
7419
8349
  var event = viem.decodeEventLog({
7420
8350
  abi: ipRoyaltyVaultImplAbi,
7421
- eventName: "RoyaltyTokensCollected",
8351
+ eventName: "RevenueTokenClaimed",
7422
8352
  data: log.data,
7423
8353
  topics: log.topics
7424
8354
  });
7425
- if (event.eventName === "RoyaltyTokensCollected") {
8355
+ if (event.eventName === "RevenueTokenClaimed") {
7426
8356
  targetLogs.push(event.args);
7427
8357
  }
7428
8358
  } catch (e) {
@@ -7437,19 +8367,71 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7437
8367
  return targetLogs;
7438
8368
  }
7439
8369
 
8370
+ /**
8371
+ * event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
8372
+ */
8373
+ }, {
8374
+ key: "watchRoyaltyTokensCollectedEvent",
8375
+ value: function watchRoyaltyTokensCollectedEvent(_onLogs7) {
8376
+ return this.rpcClient.watchContractEvent({
8377
+ abi: ipRoyaltyVaultImplAbi,
8378
+ address: this.address,
8379
+ eventName: "RoyaltyTokensCollected",
8380
+ onLogs: function onLogs(evs) {
8381
+ evs.forEach(function (it) {
8382
+ return _onLogs7(it.transactionHash, it.args);
8383
+ });
8384
+ }
8385
+ });
8386
+ }
8387
+
8388
+ /**
8389
+ * parse tx receipt event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
8390
+ */
8391
+ }, {
8392
+ key: "parseTxRoyaltyTokensCollectedEvent",
8393
+ value: function parseTxRoyaltyTokensCollectedEvent(txReceipt) {
8394
+ var targetLogs = [];
8395
+ var _iterator7 = _createForOfIteratorHelper(txReceipt.logs),
8396
+ _step7;
8397
+ try {
8398
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
8399
+ var log = _step7.value;
8400
+ try {
8401
+ var event = viem.decodeEventLog({
8402
+ abi: ipRoyaltyVaultImplAbi,
8403
+ eventName: "RoyaltyTokensCollected",
8404
+ data: log.data,
8405
+ topics: log.topics
8406
+ });
8407
+ if (event.eventName === "RoyaltyTokensCollected") {
8408
+ targetLogs.push(event.args);
8409
+ }
8410
+ } catch (e) {
8411
+ /* empty */
8412
+ }
8413
+ }
8414
+ } catch (err) {
8415
+ _iterator7.e(err);
8416
+ } finally {
8417
+ _iterator7.f();
8418
+ }
8419
+ return targetLogs;
8420
+ }
8421
+
7440
8422
  /**
7441
8423
  * event SnapshotCompleted for contract IpRoyaltyVaultImpl
7442
8424
  */
7443
8425
  }, {
7444
8426
  key: "watchSnapshotCompletedEvent",
7445
- value: function watchSnapshotCompletedEvent(_onLogs7) {
8427
+ value: function watchSnapshotCompletedEvent(_onLogs8) {
7446
8428
  return this.rpcClient.watchContractEvent({
7447
8429
  abi: ipRoyaltyVaultImplAbi,
7448
8430
  address: this.address,
7449
8431
  eventName: "SnapshotCompleted",
7450
8432
  onLogs: function onLogs(evs) {
7451
8433
  evs.forEach(function (it) {
7452
- return _onLogs7(it.transactionHash, it.args);
8434
+ return _onLogs8(it.transactionHash, it.args);
7453
8435
  });
7454
8436
  }
7455
8437
  });
@@ -7462,11 +8444,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7462
8444
  key: "parseTxSnapshotCompletedEvent",
7463
8445
  value: function parseTxSnapshotCompletedEvent(txReceipt) {
7464
8446
  var targetLogs = [];
7465
- var _iterator7 = _createForOfIteratorHelper(txReceipt.logs),
7466
- _step7;
8447
+ var _iterator8 = _createForOfIteratorHelper(txReceipt.logs),
8448
+ _step8;
7467
8449
  try {
7468
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7469
- var log = _step7.value;
8450
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
8451
+ var log = _step8.value;
7470
8452
  try {
7471
8453
  var event = viem.decodeEventLog({
7472
8454
  abi: ipRoyaltyVaultImplAbi,
@@ -7482,9 +8464,9 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
7482
8464
  }
7483
8465
  }
7484
8466
  } catch (err) {
7485
- _iterator7.e(err);
8467
+ _iterator8.e(err);
7486
8468
  } finally {
7487
- _iterator7.f();
8469
+ _iterator8.f();
7488
8470
  }
7489
8471
  return targetLogs;
7490
8472
  }
@@ -8017,14 +8999,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8017
8999
  */
8018
9000
  return _createClass(LicenseRegistryEventClient, [{
8019
9001
  key: "watchExpirationTimeSetEvent",
8020
- value: function watchExpirationTimeSetEvent(_onLogs8) {
9002
+ value: function watchExpirationTimeSetEvent(_onLogs9) {
8021
9003
  return this.rpcClient.watchContractEvent({
8022
9004
  abi: licenseRegistryAbi,
8023
9005
  address: this.address,
8024
9006
  eventName: "ExpirationTimeSet",
8025
9007
  onLogs: function onLogs(evs) {
8026
9008
  evs.forEach(function (it) {
8027
- return _onLogs8(it.transactionHash, it.args);
9009
+ return _onLogs9(it.transactionHash, it.args);
8028
9010
  });
8029
9011
  }
8030
9012
  });
@@ -8037,11 +9019,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8037
9019
  key: "parseTxExpirationTimeSetEvent",
8038
9020
  value: function parseTxExpirationTimeSetEvent(txReceipt) {
8039
9021
  var targetLogs = [];
8040
- var _iterator8 = _createForOfIteratorHelper(txReceipt.logs),
8041
- _step8;
9022
+ var _iterator9 = _createForOfIteratorHelper(txReceipt.logs),
9023
+ _step9;
8042
9024
  try {
8043
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
8044
- var log = _step8.value;
9025
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
9026
+ var log = _step9.value;
8045
9027
  try {
8046
9028
  var event = viem.decodeEventLog({
8047
9029
  abi: licenseRegistryAbi,
@@ -8057,9 +9039,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8057
9039
  }
8058
9040
  }
8059
9041
  } catch (err) {
8060
- _iterator8.e(err);
9042
+ _iterator9.e(err);
8061
9043
  } finally {
8062
- _iterator8.f();
9044
+ _iterator9.f();
8063
9045
  }
8064
9046
  return targetLogs;
8065
9047
  }
@@ -8069,14 +9051,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8069
9051
  */
8070
9052
  }, {
8071
9053
  key: "watchGovernanceUpdatedEvent",
8072
- value: function watchGovernanceUpdatedEvent(_onLogs9) {
9054
+ value: function watchGovernanceUpdatedEvent(_onLogs10) {
8073
9055
  return this.rpcClient.watchContractEvent({
8074
9056
  abi: licenseRegistryAbi,
8075
9057
  address: this.address,
8076
9058
  eventName: "GovernanceUpdated",
8077
9059
  onLogs: function onLogs(evs) {
8078
9060
  evs.forEach(function (it) {
8079
- return _onLogs9(it.transactionHash, it.args);
9061
+ return _onLogs10(it.transactionHash, it.args);
8080
9062
  });
8081
9063
  }
8082
9064
  });
@@ -8089,11 +9071,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8089
9071
  key: "parseTxGovernanceUpdatedEvent",
8090
9072
  value: function parseTxGovernanceUpdatedEvent(txReceipt) {
8091
9073
  var targetLogs = [];
8092
- var _iterator9 = _createForOfIteratorHelper(txReceipt.logs),
8093
- _step9;
9074
+ var _iterator10 = _createForOfIteratorHelper(txReceipt.logs),
9075
+ _step10;
8094
9076
  try {
8095
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
8096
- var log = _step9.value;
9077
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
9078
+ var log = _step10.value;
8097
9079
  try {
8098
9080
  var event = viem.decodeEventLog({
8099
9081
  abi: licenseRegistryAbi,
@@ -8109,9 +9091,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8109
9091
  }
8110
9092
  }
8111
9093
  } catch (err) {
8112
- _iterator9.e(err);
9094
+ _iterator10.e(err);
8113
9095
  } finally {
8114
- _iterator9.f();
9096
+ _iterator10.f();
8115
9097
  }
8116
9098
  return targetLogs;
8117
9099
  }
@@ -8121,14 +9103,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8121
9103
  */
8122
9104
  }, {
8123
9105
  key: "watchInitializedEvent",
8124
- value: function watchInitializedEvent(_onLogs10) {
9106
+ value: function watchInitializedEvent(_onLogs11) {
8125
9107
  return this.rpcClient.watchContractEvent({
8126
9108
  abi: licenseRegistryAbi,
8127
9109
  address: this.address,
8128
9110
  eventName: "Initialized",
8129
9111
  onLogs: function onLogs(evs) {
8130
9112
  evs.forEach(function (it) {
8131
- return _onLogs10(it.transactionHash, it.args);
9113
+ return _onLogs11(it.transactionHash, it.args);
8132
9114
  });
8133
9115
  }
8134
9116
  });
@@ -8141,11 +9123,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8141
9123
  key: "parseTxInitializedEvent",
8142
9124
  value: function parseTxInitializedEvent(txReceipt) {
8143
9125
  var targetLogs = [];
8144
- var _iterator10 = _createForOfIteratorHelper(txReceipt.logs),
8145
- _step10;
9126
+ var _iterator11 = _createForOfIteratorHelper(txReceipt.logs),
9127
+ _step11;
8146
9128
  try {
8147
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
8148
- var log = _step10.value;
9129
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
9130
+ var log = _step11.value;
8149
9131
  try {
8150
9132
  var event = viem.decodeEventLog({
8151
9133
  abi: licenseRegistryAbi,
@@ -8161,9 +9143,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8161
9143
  }
8162
9144
  }
8163
9145
  } catch (err) {
8164
- _iterator10.e(err);
9146
+ _iterator11.e(err);
8165
9147
  } finally {
8166
- _iterator10.f();
9148
+ _iterator11.f();
8167
9149
  }
8168
9150
  return targetLogs;
8169
9151
  }
@@ -8173,14 +9155,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8173
9155
  */
8174
9156
  }, {
8175
9157
  key: "watchLicenseTemplateRegisteredEvent",
8176
- value: function watchLicenseTemplateRegisteredEvent(_onLogs11) {
9158
+ value: function watchLicenseTemplateRegisteredEvent(_onLogs12) {
8177
9159
  return this.rpcClient.watchContractEvent({
8178
9160
  abi: licenseRegistryAbi,
8179
9161
  address: this.address,
8180
9162
  eventName: "LicenseTemplateRegistered",
8181
9163
  onLogs: function onLogs(evs) {
8182
9164
  evs.forEach(function (it) {
8183
- return _onLogs11(it.transactionHash, it.args);
9165
+ return _onLogs12(it.transactionHash, it.args);
8184
9166
  });
8185
9167
  }
8186
9168
  });
@@ -8193,11 +9175,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8193
9175
  key: "parseTxLicenseTemplateRegisteredEvent",
8194
9176
  value: function parseTxLicenseTemplateRegisteredEvent(txReceipt) {
8195
9177
  var targetLogs = [];
8196
- var _iterator11 = _createForOfIteratorHelper(txReceipt.logs),
8197
- _step11;
9178
+ var _iterator12 = _createForOfIteratorHelper(txReceipt.logs),
9179
+ _step12;
8198
9180
  try {
8199
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
8200
- var log = _step11.value;
9181
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
9182
+ var log = _step12.value;
8201
9183
  try {
8202
9184
  var event = viem.decodeEventLog({
8203
9185
  abi: licenseRegistryAbi,
@@ -8213,9 +9195,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8213
9195
  }
8214
9196
  }
8215
9197
  } catch (err) {
8216
- _iterator11.e(err);
9198
+ _iterator12.e(err);
8217
9199
  } finally {
8218
- _iterator11.f();
9200
+ _iterator12.f();
8219
9201
  }
8220
9202
  return targetLogs;
8221
9203
  }
@@ -8225,14 +9207,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8225
9207
  */
8226
9208
  }, {
8227
9209
  key: "watchMintingLicenseConfigSetForIpEvent",
8228
- value: function watchMintingLicenseConfigSetForIpEvent(_onLogs12) {
9210
+ value: function watchMintingLicenseConfigSetForIpEvent(_onLogs13) {
8229
9211
  return this.rpcClient.watchContractEvent({
8230
9212
  abi: licenseRegistryAbi,
8231
9213
  address: this.address,
8232
9214
  eventName: "MintingLicenseConfigSetForIP",
8233
9215
  onLogs: function onLogs(evs) {
8234
9216
  evs.forEach(function (it) {
8235
- return _onLogs12(it.transactionHash, it.args);
9217
+ return _onLogs13(it.transactionHash, it.args);
8236
9218
  });
8237
9219
  }
8238
9220
  });
@@ -8245,11 +9227,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8245
9227
  key: "parseTxMintingLicenseConfigSetForIpEvent",
8246
9228
  value: function parseTxMintingLicenseConfigSetForIpEvent(txReceipt) {
8247
9229
  var targetLogs = [];
8248
- var _iterator12 = _createForOfIteratorHelper(txReceipt.logs),
8249
- _step12;
9230
+ var _iterator13 = _createForOfIteratorHelper(txReceipt.logs),
9231
+ _step13;
8250
9232
  try {
8251
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
8252
- var log = _step12.value;
9233
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
9234
+ var log = _step13.value;
8253
9235
  try {
8254
9236
  var event = viem.decodeEventLog({
8255
9237
  abi: licenseRegistryAbi,
@@ -8265,9 +9247,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8265
9247
  }
8266
9248
  }
8267
9249
  } catch (err) {
8268
- _iterator12.e(err);
9250
+ _iterator13.e(err);
8269
9251
  } finally {
8270
- _iterator12.f();
9252
+ _iterator13.f();
8271
9253
  }
8272
9254
  return targetLogs;
8273
9255
  }
@@ -8277,14 +9259,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8277
9259
  */
8278
9260
  }, {
8279
9261
  key: "watchMintingLicenseConfigSetLicenseEvent",
8280
- value: function watchMintingLicenseConfigSetLicenseEvent(_onLogs13) {
9262
+ value: function watchMintingLicenseConfigSetLicenseEvent(_onLogs14) {
8281
9263
  return this.rpcClient.watchContractEvent({
8282
9264
  abi: licenseRegistryAbi,
8283
9265
  address: this.address,
8284
9266
  eventName: "MintingLicenseConfigSetLicense",
8285
9267
  onLogs: function onLogs(evs) {
8286
9268
  evs.forEach(function (it) {
8287
- return _onLogs13(it.transactionHash, it.args);
9269
+ return _onLogs14(it.transactionHash, it.args);
8288
9270
  });
8289
9271
  }
8290
9272
  });
@@ -8297,11 +9279,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8297
9279
  key: "parseTxMintingLicenseConfigSetLicenseEvent",
8298
9280
  value: function parseTxMintingLicenseConfigSetLicenseEvent(txReceipt) {
8299
9281
  var targetLogs = [];
8300
- var _iterator13 = _createForOfIteratorHelper(txReceipt.logs),
8301
- _step13;
9282
+ var _iterator14 = _createForOfIteratorHelper(txReceipt.logs),
9283
+ _step14;
8302
9284
  try {
8303
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
8304
- var log = _step13.value;
9285
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
9286
+ var log = _step14.value;
8305
9287
  try {
8306
9288
  var event = viem.decodeEventLog({
8307
9289
  abi: licenseRegistryAbi,
@@ -8317,9 +9299,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8317
9299
  }
8318
9300
  }
8319
9301
  } catch (err) {
8320
- _iterator13.e(err);
9302
+ _iterator14.e(err);
8321
9303
  } finally {
8322
- _iterator13.f();
9304
+ _iterator14.f();
8323
9305
  }
8324
9306
  return targetLogs;
8325
9307
  }
@@ -8329,14 +9311,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8329
9311
  */
8330
9312
  }, {
8331
9313
  key: "watchUpgradedEvent",
8332
- value: function watchUpgradedEvent(_onLogs14) {
9314
+ value: function watchUpgradedEvent(_onLogs15) {
8333
9315
  return this.rpcClient.watchContractEvent({
8334
9316
  abi: licenseRegistryAbi,
8335
9317
  address: this.address,
8336
9318
  eventName: "Upgraded",
8337
9319
  onLogs: function onLogs(evs) {
8338
9320
  evs.forEach(function (it) {
8339
- return _onLogs14(it.transactionHash, it.args);
9321
+ return _onLogs15(it.transactionHash, it.args);
8340
9322
  });
8341
9323
  }
8342
9324
  });
@@ -8349,11 +9331,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8349
9331
  key: "parseTxUpgradedEvent",
8350
9332
  value: function parseTxUpgradedEvent(txReceipt) {
8351
9333
  var targetLogs = [];
8352
- var _iterator14 = _createForOfIteratorHelper(txReceipt.logs),
8353
- _step14;
9334
+ var _iterator15 = _createForOfIteratorHelper(txReceipt.logs),
9335
+ _step15;
8354
9336
  try {
8355
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
8356
- var log = _step14.value;
9337
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
9338
+ var log = _step15.value;
8357
9339
  try {
8358
9340
  var event = viem.decodeEventLog({
8359
9341
  abi: licenseRegistryAbi,
@@ -8369,9 +9351,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
8369
9351
  }
8370
9352
  }
8371
9353
  } catch (err) {
8372
- _iterator14.e(err);
9354
+ _iterator15.e(err);
8373
9355
  } finally {
8374
- _iterator14.f();
9356
+ _iterator15.f();
8375
9357
  }
8376
9358
  return targetLogs;
8377
9359
  }
@@ -9115,6 +10097,61 @@ var LicenseRegistryReadOnlyClient = /*#__PURE__*/function (_LicenseRegistryEvent
9115
10097
  }]);
9116
10098
  }(LicenseRegistryEventClient);
9117
10099
 
10100
+ // Contract LicenseToken =============================================================
10101
+
10102
+ /**
10103
+ * LicenseTokenOwnerOfRequest
10104
+ *
10105
+ * @param tokenId uint256
10106
+ */
10107
+
10108
+ /**
10109
+ * contract LicenseToken readonly method
10110
+ */
10111
+ var LicenseTokenReadOnlyClient = /*#__PURE__*/function () {
10112
+ function LicenseTokenReadOnlyClient(rpcClient, address) {
10113
+ var _rpcClient$chain7;
10114
+ _classCallCheck(this, LicenseTokenReadOnlyClient);
10115
+ this.address = address || getAddress(licenseTokenAddress, (_rpcClient$chain7 = rpcClient.chain) === null || _rpcClient$chain7 === void 0 ? void 0 : _rpcClient$chain7.id);
10116
+ this.rpcClient = rpcClient;
10117
+ }
10118
+
10119
+ /**
10120
+ * method ownerOf for contract LicenseToken
10121
+ *
10122
+ * @param request LicenseTokenOwnerOfRequest
10123
+ * @return Promise<LicenseTokenOwnerOfResponse>
10124
+ */
10125
+ return _createClass(LicenseTokenReadOnlyClient, [{
10126
+ key: "ownerOf",
10127
+ value: (function () {
10128
+ var _ownerOf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(request) {
10129
+ return _regeneratorRuntime().wrap(function _callee49$(_context49) {
10130
+ while (1) switch (_context49.prev = _context49.next) {
10131
+ case 0:
10132
+ _context49.next = 2;
10133
+ return this.rpcClient.readContract({
10134
+ abi: licenseTokenAbi,
10135
+ address: this.address,
10136
+ functionName: "ownerOf",
10137
+ args: [request.tokenId]
10138
+ });
10139
+ case 2:
10140
+ return _context49.abrupt("return", _context49.sent);
10141
+ case 3:
10142
+ case "end":
10143
+ return _context49.stop();
10144
+ }
10145
+ }, _callee49, this);
10146
+ }));
10147
+ function ownerOf(_x40) {
10148
+ return _ownerOf.apply(this, arguments);
10149
+ }
10150
+ return ownerOf;
10151
+ }())
10152
+ }]);
10153
+ }();
10154
+
9118
10155
  // Contract LicensingModule =============================================================
9119
10156
 
9120
10157
  /**
@@ -9171,9 +10208,9 @@ var LicenseRegistryReadOnlyClient = /*#__PURE__*/function (_LicenseRegistryEvent
9171
10208
  */
9172
10209
  var LicensingModuleEventClient = /*#__PURE__*/function () {
9173
10210
  function LicensingModuleEventClient(rpcClient, address) {
9174
- var _rpcClient$chain7;
10211
+ var _rpcClient$chain8;
9175
10212
  _classCallCheck(this, LicensingModuleEventClient);
9176
- this.address = address || getAddress(licensingModuleAddress, (_rpcClient$chain7 = rpcClient.chain) === null || _rpcClient$chain7 === void 0 ? void 0 : _rpcClient$chain7.id);
10213
+ this.address = address || getAddress(licensingModuleAddress, (_rpcClient$chain8 = rpcClient.chain) === null || _rpcClient$chain8 === void 0 ? void 0 : _rpcClient$chain8.id);
9177
10214
  this.rpcClient = rpcClient;
9178
10215
  }
9179
10216
 
@@ -9182,14 +10219,14 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
9182
10219
  */
9183
10220
  return _createClass(LicensingModuleEventClient, [{
9184
10221
  key: "watchLicenseTokensMintedEvent",
9185
- value: function watchLicenseTokensMintedEvent(_onLogs15) {
10222
+ value: function watchLicenseTokensMintedEvent(_onLogs16) {
9186
10223
  return this.rpcClient.watchContractEvent({
9187
10224
  abi: licensingModuleAbi,
9188
10225
  address: this.address,
9189
10226
  eventName: "LicenseTokensMinted",
9190
10227
  onLogs: function onLogs(evs) {
9191
10228
  evs.forEach(function (it) {
9192
- return _onLogs15(it.transactionHash, it.args);
10229
+ return _onLogs16(it.transactionHash, it.args);
9193
10230
  });
9194
10231
  }
9195
10232
  });
@@ -9202,11 +10239,11 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
9202
10239
  key: "parseTxLicenseTokensMintedEvent",
9203
10240
  value: function parseTxLicenseTokensMintedEvent(txReceipt) {
9204
10241
  var targetLogs = [];
9205
- var _iterator15 = _createForOfIteratorHelper(txReceipt.logs),
9206
- _step15;
10242
+ var _iterator16 = _createForOfIteratorHelper(txReceipt.logs),
10243
+ _step16;
9207
10244
  try {
9208
- for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
9209
- var log = _step15.value;
10245
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
10246
+ var log = _step16.value;
9210
10247
  try {
9211
10248
  var event = viem.decodeEventLog({
9212
10249
  abi: licensingModuleAbi,
@@ -9222,9 +10259,9 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
9222
10259
  }
9223
10260
  }
9224
10261
  } catch (err) {
9225
- _iterator15.e(err);
10262
+ _iterator16.e(err);
9226
10263
  } finally {
9227
- _iterator15.f();
10264
+ _iterator16.f();
9228
10265
  }
9229
10266
  return targetLogs;
9230
10267
  }
@@ -9253,12 +10290,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9253
10290
  return _createClass(LicensingModuleClient, [{
9254
10291
  key: "attachLicenseTerms",
9255
10292
  value: (function () {
9256
- var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(request) {
10293
+ var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(request) {
9257
10294
  var _yield$this$rpcClient24, call;
9258
- return _regeneratorRuntime().wrap(function _callee49$(_context49) {
9259
- while (1) switch (_context49.prev = _context49.next) {
10295
+ return _regeneratorRuntime().wrap(function _callee50$(_context50) {
10296
+ while (1) switch (_context50.prev = _context50.next) {
9260
10297
  case 0:
9261
- _context49.next = 2;
10298
+ _context50.next = 2;
9262
10299
  return this.rpcClient.simulateContract({
9263
10300
  abi: licensingModuleAbi,
9264
10301
  address: this.address,
@@ -9267,19 +10304,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9267
10304
  args: [request.ipId, request.licenseTemplate, request.licenseTermsId]
9268
10305
  });
9269
10306
  case 2:
9270
- _yield$this$rpcClient24 = _context49.sent;
10307
+ _yield$this$rpcClient24 = _context50.sent;
9271
10308
  call = _yield$this$rpcClient24.request;
9272
- _context49.next = 6;
10309
+ _context50.next = 6;
9273
10310
  return this.wallet.writeContract(call);
9274
10311
  case 6:
9275
- return _context49.abrupt("return", _context49.sent);
10312
+ return _context50.abrupt("return", _context50.sent);
9276
10313
  case 7:
9277
10314
  case "end":
9278
- return _context49.stop();
10315
+ return _context50.stop();
9279
10316
  }
9280
- }, _callee49, this);
10317
+ }, _callee50, this);
9281
10318
  }));
9282
- function attachLicenseTerms(_x40) {
10319
+ function attachLicenseTerms(_x41) {
9283
10320
  return _attachLicenseTerms.apply(this, arguments);
9284
10321
  }
9285
10322
  return attachLicenseTerms;
@@ -9294,12 +10331,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9294
10331
  }, {
9295
10332
  key: "mintLicenseTokens",
9296
10333
  value: (function () {
9297
- var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(request) {
10334
+ var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(request) {
9298
10335
  var _yield$this$rpcClient25, call;
9299
- return _regeneratorRuntime().wrap(function _callee50$(_context50) {
9300
- while (1) switch (_context50.prev = _context50.next) {
10336
+ return _regeneratorRuntime().wrap(function _callee51$(_context51) {
10337
+ while (1) switch (_context51.prev = _context51.next) {
9301
10338
  case 0:
9302
- _context50.next = 2;
10339
+ _context51.next = 2;
9303
10340
  return this.rpcClient.simulateContract({
9304
10341
  abi: licensingModuleAbi,
9305
10342
  address: this.address,
@@ -9308,19 +10345,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9308
10345
  args: [request.licensorIpId, request.licenseTemplate, request.licenseTermsId, request.amount, request.receiver, request.royaltyContext]
9309
10346
  });
9310
10347
  case 2:
9311
- _yield$this$rpcClient25 = _context50.sent;
10348
+ _yield$this$rpcClient25 = _context51.sent;
9312
10349
  call = _yield$this$rpcClient25.request;
9313
- _context50.next = 6;
10350
+ _context51.next = 6;
9314
10351
  return this.wallet.writeContract(call);
9315
10352
  case 6:
9316
- return _context50.abrupt("return", _context50.sent);
10353
+ return _context51.abrupt("return", _context51.sent);
9317
10354
  case 7:
9318
10355
  case "end":
9319
- return _context50.stop();
10356
+ return _context51.stop();
9320
10357
  }
9321
- }, _callee50, this);
10358
+ }, _callee51, this);
9322
10359
  }));
9323
- function mintLicenseTokens(_x41) {
10360
+ function mintLicenseTokens(_x42) {
9324
10361
  return _mintLicenseTokens.apply(this, arguments);
9325
10362
  }
9326
10363
  return mintLicenseTokens;
@@ -9335,12 +10372,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9335
10372
  }, {
9336
10373
  key: "registerDerivative",
9337
10374
  value: (function () {
9338
- var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(request) {
10375
+ var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(request) {
9339
10376
  var _yield$this$rpcClient26, call;
9340
- return _regeneratorRuntime().wrap(function _callee51$(_context51) {
9341
- while (1) switch (_context51.prev = _context51.next) {
10377
+ return _regeneratorRuntime().wrap(function _callee52$(_context52) {
10378
+ while (1) switch (_context52.prev = _context52.next) {
9342
10379
  case 0:
9343
- _context51.next = 2;
10380
+ _context52.next = 2;
9344
10381
  return this.rpcClient.simulateContract({
9345
10382
  abi: licensingModuleAbi,
9346
10383
  address: this.address,
@@ -9349,19 +10386,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9349
10386
  args: [request.childIpId, request.parentIpIds, request.licenseTermsIds, request.licenseTemplate, request.royaltyContext]
9350
10387
  });
9351
10388
  case 2:
9352
- _yield$this$rpcClient26 = _context51.sent;
10389
+ _yield$this$rpcClient26 = _context52.sent;
9353
10390
  call = _yield$this$rpcClient26.request;
9354
- _context51.next = 6;
10391
+ _context52.next = 6;
9355
10392
  return this.wallet.writeContract(call);
9356
10393
  case 6:
9357
- return _context51.abrupt("return", _context51.sent);
10394
+ return _context52.abrupt("return", _context52.sent);
9358
10395
  case 7:
9359
10396
  case "end":
9360
- return _context51.stop();
10397
+ return _context52.stop();
9361
10398
  }
9362
- }, _callee51, this);
10399
+ }, _callee52, this);
9363
10400
  }));
9364
- function registerDerivative(_x42) {
10401
+ function registerDerivative(_x43) {
9365
10402
  return _registerDerivative.apply(this, arguments);
9366
10403
  }
9367
10404
  return registerDerivative;
@@ -9376,12 +10413,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9376
10413
  }, {
9377
10414
  key: "registerDerivativeWithLicenseTokens",
9378
10415
  value: (function () {
9379
- var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(request) {
10416
+ var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(request) {
9380
10417
  var _yield$this$rpcClient27, call;
9381
- return _regeneratorRuntime().wrap(function _callee52$(_context52) {
9382
- while (1) switch (_context52.prev = _context52.next) {
10418
+ return _regeneratorRuntime().wrap(function _callee53$(_context53) {
10419
+ while (1) switch (_context53.prev = _context53.next) {
9383
10420
  case 0:
9384
- _context52.next = 2;
10421
+ _context53.next = 2;
9385
10422
  return this.rpcClient.simulateContract({
9386
10423
  abi: licensingModuleAbi,
9387
10424
  address: this.address,
@@ -9390,19 +10427,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9390
10427
  args: [request.childIpId, request.licenseTokenIds, request.royaltyContext]
9391
10428
  });
9392
10429
  case 2:
9393
- _yield$this$rpcClient27 = _context52.sent;
10430
+ _yield$this$rpcClient27 = _context53.sent;
9394
10431
  call = _yield$this$rpcClient27.request;
9395
- _context52.next = 6;
10432
+ _context53.next = 6;
9396
10433
  return this.wallet.writeContract(call);
9397
10434
  case 6:
9398
- return _context52.abrupt("return", _context52.sent);
10435
+ return _context53.abrupt("return", _context53.sent);
9399
10436
  case 7:
9400
10437
  case "end":
9401
- return _context52.stop();
10438
+ return _context53.stop();
9402
10439
  }
9403
- }, _callee52, this);
10440
+ }, _callee53, this);
9404
10441
  }));
9405
- function registerDerivativeWithLicenseTokens(_x43) {
10442
+ function registerDerivativeWithLicenseTokens(_x44) {
9406
10443
  return _registerDerivativeWithLicenseTokens.apply(this, arguments);
9407
10444
  }
9408
10445
  return registerDerivativeWithLicenseTokens;
@@ -9566,9 +10603,9 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
9566
10603
  */
9567
10604
  var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9568
10605
  function PiLicenseTemplateEventClient(rpcClient, address) {
9569
- var _rpcClient$chain9;
10606
+ var _rpcClient$chain10;
9570
10607
  _classCallCheck(this, PiLicenseTemplateEventClient);
9571
- this.address = address || getAddress(piLicenseTemplateAddress, (_rpcClient$chain9 = rpcClient.chain) === null || _rpcClient$chain9 === void 0 ? void 0 : _rpcClient$chain9.id);
10608
+ this.address = address || getAddress(piLicenseTemplateAddress, (_rpcClient$chain10 = rpcClient.chain) === null || _rpcClient$chain10 === void 0 ? void 0 : _rpcClient$chain10.id);
9572
10609
  this.rpcClient = rpcClient;
9573
10610
  }
9574
10611
 
@@ -9577,14 +10614,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9577
10614
  */
9578
10615
  return _createClass(PiLicenseTemplateEventClient, [{
9579
10616
  key: "watchDerivativeApprovedEvent",
9580
- value: function watchDerivativeApprovedEvent(_onLogs16) {
10617
+ value: function watchDerivativeApprovedEvent(_onLogs17) {
9581
10618
  return this.rpcClient.watchContractEvent({
9582
10619
  abi: piLicenseTemplateAbi,
9583
10620
  address: this.address,
9584
10621
  eventName: "DerivativeApproved",
9585
10622
  onLogs: function onLogs(evs) {
9586
10623
  evs.forEach(function (it) {
9587
- return _onLogs16(it.transactionHash, it.args);
10624
+ return _onLogs17(it.transactionHash, it.args);
9588
10625
  });
9589
10626
  }
9590
10627
  });
@@ -9597,11 +10634,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9597
10634
  key: "parseTxDerivativeApprovedEvent",
9598
10635
  value: function parseTxDerivativeApprovedEvent(txReceipt) {
9599
10636
  var targetLogs = [];
9600
- var _iterator16 = _createForOfIteratorHelper(txReceipt.logs),
9601
- _step16;
10637
+ var _iterator17 = _createForOfIteratorHelper(txReceipt.logs),
10638
+ _step17;
9602
10639
  try {
9603
- for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
9604
- var log = _step16.value;
10640
+ for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
10641
+ var log = _step17.value;
9605
10642
  try {
9606
10643
  var event = viem.decodeEventLog({
9607
10644
  abi: piLicenseTemplateAbi,
@@ -9617,9 +10654,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9617
10654
  }
9618
10655
  }
9619
10656
  } catch (err) {
9620
- _iterator16.e(err);
10657
+ _iterator17.e(err);
9621
10658
  } finally {
9622
- _iterator16.f();
10659
+ _iterator17.f();
9623
10660
  }
9624
10661
  return targetLogs;
9625
10662
  }
@@ -9629,14 +10666,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9629
10666
  */
9630
10667
  }, {
9631
10668
  key: "watchInitializedEvent",
9632
- value: function watchInitializedEvent(_onLogs17) {
10669
+ value: function watchInitializedEvent(_onLogs18) {
9633
10670
  return this.rpcClient.watchContractEvent({
9634
10671
  abi: piLicenseTemplateAbi,
9635
10672
  address: this.address,
9636
10673
  eventName: "Initialized",
9637
10674
  onLogs: function onLogs(evs) {
9638
10675
  evs.forEach(function (it) {
9639
- return _onLogs17(it.transactionHash, it.args);
10676
+ return _onLogs18(it.transactionHash, it.args);
9640
10677
  });
9641
10678
  }
9642
10679
  });
@@ -9649,11 +10686,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9649
10686
  key: "parseTxInitializedEvent",
9650
10687
  value: function parseTxInitializedEvent(txReceipt) {
9651
10688
  var targetLogs = [];
9652
- var _iterator17 = _createForOfIteratorHelper(txReceipt.logs),
9653
- _step17;
10689
+ var _iterator18 = _createForOfIteratorHelper(txReceipt.logs),
10690
+ _step18;
9654
10691
  try {
9655
- for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
9656
- var log = _step17.value;
10692
+ for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
10693
+ var log = _step18.value;
9657
10694
  try {
9658
10695
  var event = viem.decodeEventLog({
9659
10696
  abi: piLicenseTemplateAbi,
@@ -9669,9 +10706,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9669
10706
  }
9670
10707
  }
9671
10708
  } catch (err) {
9672
- _iterator17.e(err);
10709
+ _iterator18.e(err);
9673
10710
  } finally {
9674
- _iterator17.f();
10711
+ _iterator18.f();
9675
10712
  }
9676
10713
  return targetLogs;
9677
10714
  }
@@ -9681,14 +10718,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9681
10718
  */
9682
10719
  }, {
9683
10720
  key: "watchLicenseTermsRegisteredEvent",
9684
- value: function watchLicenseTermsRegisteredEvent(_onLogs18) {
10721
+ value: function watchLicenseTermsRegisteredEvent(_onLogs19) {
9685
10722
  return this.rpcClient.watchContractEvent({
9686
10723
  abi: piLicenseTemplateAbi,
9687
10724
  address: this.address,
9688
10725
  eventName: "LicenseTermsRegistered",
9689
10726
  onLogs: function onLogs(evs) {
9690
10727
  evs.forEach(function (it) {
9691
- return _onLogs18(it.transactionHash, it.args);
10728
+ return _onLogs19(it.transactionHash, it.args);
9692
10729
  });
9693
10730
  }
9694
10731
  });
@@ -9701,11 +10738,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9701
10738
  key: "parseTxLicenseTermsRegisteredEvent",
9702
10739
  value: function parseTxLicenseTermsRegisteredEvent(txReceipt) {
9703
10740
  var targetLogs = [];
9704
- var _iterator18 = _createForOfIteratorHelper(txReceipt.logs),
9705
- _step18;
10741
+ var _iterator19 = _createForOfIteratorHelper(txReceipt.logs),
10742
+ _step19;
9706
10743
  try {
9707
- for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
9708
- var log = _step18.value;
10744
+ for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
10745
+ var log = _step19.value;
9709
10746
  try {
9710
10747
  var event = viem.decodeEventLog({
9711
10748
  abi: piLicenseTemplateAbi,
@@ -9721,9 +10758,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
9721
10758
  }
9722
10759
  }
9723
10760
  } catch (err) {
9724
- _iterator18.e(err);
10761
+ _iterator19.e(err);
9725
10762
  } finally {
9726
- _iterator18.f();
10763
+ _iterator19.f();
9727
10764
  }
9728
10765
  return targetLogs;
9729
10766
  }
@@ -9749,23 +10786,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9749
10786
  return _createClass(PiLicenseTemplateReadOnlyClient, [{
9750
10787
  key: "accessController",
9751
10788
  value: (function () {
9752
- var _accessController = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54() {
9753
- return _regeneratorRuntime().wrap(function _callee54$(_context54) {
9754
- while (1) switch (_context54.prev = _context54.next) {
10789
+ var _accessController = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55() {
10790
+ return _regeneratorRuntime().wrap(function _callee55$(_context55) {
10791
+ while (1) switch (_context55.prev = _context55.next) {
9755
10792
  case 0:
9756
- _context54.next = 2;
10793
+ _context55.next = 2;
9757
10794
  return this.rpcClient.readContract({
9758
10795
  abi: piLicenseTemplateAbi,
9759
10796
  address: this.address,
9760
10797
  functionName: "ACCESS_CONTROLLER"
9761
10798
  });
9762
10799
  case 2:
9763
- return _context54.abrupt("return", _context54.sent);
10800
+ return _context55.abrupt("return", _context55.sent);
9764
10801
  case 3:
9765
10802
  case "end":
9766
- return _context54.stop();
10803
+ return _context55.stop();
9767
10804
  }
9768
- }, _callee54, this);
10805
+ }, _callee55, this);
9769
10806
  }));
9770
10807
  function accessController() {
9771
10808
  return _accessController.apply(this, arguments);
@@ -9782,23 +10819,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9782
10819
  }, {
9783
10820
  key: "ipAccountRegistry",
9784
10821
  value: (function () {
9785
- var _ipAccountRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55() {
9786
- return _regeneratorRuntime().wrap(function _callee55$(_context55) {
9787
- while (1) switch (_context55.prev = _context55.next) {
10822
+ var _ipAccountRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56() {
10823
+ return _regeneratorRuntime().wrap(function _callee56$(_context56) {
10824
+ while (1) switch (_context56.prev = _context56.next) {
9788
10825
  case 0:
9789
- _context55.next = 2;
10826
+ _context56.next = 2;
9790
10827
  return this.rpcClient.readContract({
9791
10828
  abi: piLicenseTemplateAbi,
9792
10829
  address: this.address,
9793
10830
  functionName: "IP_ACCOUNT_REGISTRY"
9794
10831
  });
9795
10832
  case 2:
9796
- return _context55.abrupt("return", _context55.sent);
10833
+ return _context56.abrupt("return", _context56.sent);
9797
10834
  case 3:
9798
10835
  case "end":
9799
- return _context55.stop();
10836
+ return _context56.stop();
9800
10837
  }
9801
- }, _callee55, this);
10838
+ }, _callee56, this);
9802
10839
  }));
9803
10840
  function ipAccountRegistry() {
9804
10841
  return _ipAccountRegistry.apply(this, arguments);
@@ -9815,23 +10852,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9815
10852
  }, {
9816
10853
  key: "licenseNft",
9817
10854
  value: (function () {
9818
- var _licenseNft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56() {
9819
- return _regeneratorRuntime().wrap(function _callee56$(_context56) {
9820
- while (1) switch (_context56.prev = _context56.next) {
10855
+ var _licenseNft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57() {
10856
+ return _regeneratorRuntime().wrap(function _callee57$(_context57) {
10857
+ while (1) switch (_context57.prev = _context57.next) {
9821
10858
  case 0:
9822
- _context56.next = 2;
10859
+ _context57.next = 2;
9823
10860
  return this.rpcClient.readContract({
9824
10861
  abi: piLicenseTemplateAbi,
9825
10862
  address: this.address,
9826
10863
  functionName: "LICENSE_NFT"
9827
10864
  });
9828
10865
  case 2:
9829
- return _context56.abrupt("return", _context56.sent);
10866
+ return _context57.abrupt("return", _context57.sent);
9830
10867
  case 3:
9831
10868
  case "end":
9832
- return _context56.stop();
10869
+ return _context57.stop();
9833
10870
  }
9834
- }, _callee56, this);
10871
+ }, _callee57, this);
9835
10872
  }));
9836
10873
  function licenseNft() {
9837
10874
  return _licenseNft.apply(this, arguments);
@@ -9848,23 +10885,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9848
10885
  }, {
9849
10886
  key: "licenseRegistry",
9850
10887
  value: (function () {
9851
- var _licenseRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57() {
9852
- return _regeneratorRuntime().wrap(function _callee57$(_context57) {
9853
- while (1) switch (_context57.prev = _context57.next) {
10888
+ var _licenseRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58() {
10889
+ return _regeneratorRuntime().wrap(function _callee58$(_context58) {
10890
+ while (1) switch (_context58.prev = _context58.next) {
9854
10891
  case 0:
9855
- _context57.next = 2;
10892
+ _context58.next = 2;
9856
10893
  return this.rpcClient.readContract({
9857
10894
  abi: piLicenseTemplateAbi,
9858
10895
  address: this.address,
9859
10896
  functionName: "LICENSE_REGISTRY"
9860
10897
  });
9861
10898
  case 2:
9862
- return _context57.abrupt("return", _context57.sent);
10899
+ return _context58.abrupt("return", _context58.sent);
9863
10900
  case 3:
9864
10901
  case "end":
9865
- return _context57.stop();
10902
+ return _context58.stop();
9866
10903
  }
9867
- }, _callee57, this);
10904
+ }, _callee58, this);
9868
10905
  }));
9869
10906
  function licenseRegistry() {
9870
10907
  return _licenseRegistry.apply(this, arguments);
@@ -9881,23 +10918,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9881
10918
  }, {
9882
10919
  key: "royaltyModule",
9883
10920
  value: (function () {
9884
- var _royaltyModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58() {
9885
- return _regeneratorRuntime().wrap(function _callee58$(_context58) {
9886
- while (1) switch (_context58.prev = _context58.next) {
10921
+ var _royaltyModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59() {
10922
+ return _regeneratorRuntime().wrap(function _callee59$(_context59) {
10923
+ while (1) switch (_context59.prev = _context59.next) {
9887
10924
  case 0:
9888
- _context58.next = 2;
10925
+ _context59.next = 2;
9889
10926
  return this.rpcClient.readContract({
9890
10927
  abi: piLicenseTemplateAbi,
9891
10928
  address: this.address,
9892
10929
  functionName: "ROYALTY_MODULE"
9893
10930
  });
9894
10931
  case 2:
9895
- return _context58.abrupt("return", _context58.sent);
10932
+ return _context59.abrupt("return", _context59.sent);
9896
10933
  case 3:
9897
10934
  case "end":
9898
- return _context58.stop();
10935
+ return _context59.stop();
9899
10936
  }
9900
- }, _callee58, this);
10937
+ }, _callee59, this);
9901
10938
  }));
9902
10939
  function royaltyModule() {
9903
10940
  return _royaltyModule.apply(this, arguments);
@@ -9914,11 +10951,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9914
10951
  }, {
9915
10952
  key: "exists",
9916
10953
  value: (function () {
9917
- var _exists2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59(request) {
9918
- return _regeneratorRuntime().wrap(function _callee59$(_context59) {
9919
- while (1) switch (_context59.prev = _context59.next) {
10954
+ var _exists2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(request) {
10955
+ return _regeneratorRuntime().wrap(function _callee60$(_context60) {
10956
+ while (1) switch (_context60.prev = _context60.next) {
9920
10957
  case 0:
9921
- _context59.next = 2;
10958
+ _context60.next = 2;
9922
10959
  return this.rpcClient.readContract({
9923
10960
  abi: piLicenseTemplateAbi,
9924
10961
  address: this.address,
@@ -9926,14 +10963,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9926
10963
  args: [request.licenseTermsId]
9927
10964
  });
9928
10965
  case 2:
9929
- return _context59.abrupt("return", _context59.sent);
10966
+ return _context60.abrupt("return", _context60.sent);
9930
10967
  case 3:
9931
10968
  case "end":
9932
- return _context59.stop();
10969
+ return _context60.stop();
9933
10970
  }
9934
- }, _callee59, this);
10971
+ }, _callee60, this);
9935
10972
  }));
9936
- function exists(_x45) {
10973
+ function exists(_x46) {
9937
10974
  return _exists2.apply(this, arguments);
9938
10975
  }
9939
10976
  return exists;
@@ -9948,11 +10985,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9948
10985
  }, {
9949
10986
  key: "getEarlierExpireTime",
9950
10987
  value: (function () {
9951
- var _getEarlierExpireTime = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(request) {
9952
- return _regeneratorRuntime().wrap(function _callee60$(_context60) {
9953
- while (1) switch (_context60.prev = _context60.next) {
10988
+ var _getEarlierExpireTime = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(request) {
10989
+ return _regeneratorRuntime().wrap(function _callee61$(_context61) {
10990
+ while (1) switch (_context61.prev = _context61.next) {
9954
10991
  case 0:
9955
- _context60.next = 2;
10992
+ _context61.next = 2;
9956
10993
  return this.rpcClient.readContract({
9957
10994
  abi: piLicenseTemplateAbi,
9958
10995
  address: this.address,
@@ -9960,14 +10997,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9960
10997
  args: [request.licenseTermsIds, request.start]
9961
10998
  });
9962
10999
  case 2:
9963
- return _context60.abrupt("return", _context60.sent);
11000
+ return _context61.abrupt("return", _context61.sent);
9964
11001
  case 3:
9965
11002
  case "end":
9966
- return _context60.stop();
11003
+ return _context61.stop();
9967
11004
  }
9968
- }, _callee60, this);
11005
+ }, _callee61, this);
9969
11006
  }));
9970
- function getEarlierExpireTime(_x46) {
11007
+ function getEarlierExpireTime(_x47) {
9971
11008
  return _getEarlierExpireTime.apply(this, arguments);
9972
11009
  }
9973
11010
  return getEarlierExpireTime;
@@ -9982,11 +11019,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9982
11019
  }, {
9983
11020
  key: "getExpireTime",
9984
11021
  value: (function () {
9985
- var _getExpireTime2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(request) {
9986
- return _regeneratorRuntime().wrap(function _callee61$(_context61) {
9987
- while (1) switch (_context61.prev = _context61.next) {
11022
+ var _getExpireTime2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(request) {
11023
+ return _regeneratorRuntime().wrap(function _callee62$(_context62) {
11024
+ while (1) switch (_context62.prev = _context62.next) {
9988
11025
  case 0:
9989
- _context61.next = 2;
11026
+ _context62.next = 2;
9990
11027
  return this.rpcClient.readContract({
9991
11028
  abi: piLicenseTemplateAbi,
9992
11029
  address: this.address,
@@ -9994,14 +11031,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
9994
11031
  args: [request.licenseTermsId, request.start]
9995
11032
  });
9996
11033
  case 2:
9997
- return _context61.abrupt("return", _context61.sent);
11034
+ return _context62.abrupt("return", _context62.sent);
9998
11035
  case 3:
9999
11036
  case "end":
10000
- return _context61.stop();
11037
+ return _context62.stop();
10001
11038
  }
10002
- }, _callee61, this);
11039
+ }, _callee62, this);
10003
11040
  }));
10004
- function getExpireTime(_x47) {
11041
+ function getExpireTime(_x48) {
10005
11042
  return _getExpireTime2.apply(this, arguments);
10006
11043
  }
10007
11044
  return getExpireTime;
@@ -10016,12 +11053,12 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10016
11053
  }, {
10017
11054
  key: "getLicenseTermsId",
10018
11055
  value: (function () {
10019
- var _getLicenseTermsId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(request) {
11056
+ var _getLicenseTermsId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(request) {
10020
11057
  var result;
10021
- return _regeneratorRuntime().wrap(function _callee62$(_context62) {
10022
- while (1) switch (_context62.prev = _context62.next) {
11058
+ return _regeneratorRuntime().wrap(function _callee63$(_context63) {
11059
+ while (1) switch (_context63.prev = _context63.next) {
10023
11060
  case 0:
10024
- _context62.next = 2;
11061
+ _context63.next = 2;
10025
11062
  return this.rpcClient.readContract({
10026
11063
  abi: piLicenseTemplateAbi,
10027
11064
  address: this.address,
@@ -10029,17 +11066,17 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10029
11066
  args: [request.terms]
10030
11067
  });
10031
11068
  case 2:
10032
- result = _context62.sent;
10033
- return _context62.abrupt("return", {
11069
+ result = _context63.sent;
11070
+ return _context63.abrupt("return", {
10034
11071
  selectedLicenseTermsId: result
10035
11072
  });
10036
11073
  case 4:
10037
11074
  case "end":
10038
- return _context62.stop();
11075
+ return _context63.stop();
10039
11076
  }
10040
- }, _callee62, this);
11077
+ }, _callee63, this);
10041
11078
  }));
10042
- function getLicenseTermsId(_x48) {
11079
+ function getLicenseTermsId(_x49) {
10043
11080
  return _getLicenseTermsId.apply(this, arguments);
10044
11081
  }
10045
11082
  return getLicenseTermsId;
@@ -10054,23 +11091,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10054
11091
  }, {
10055
11092
  key: "getMetadataUri",
10056
11093
  value: (function () {
10057
- var _getMetadataUri = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63() {
10058
- return _regeneratorRuntime().wrap(function _callee63$(_context63) {
10059
- while (1) switch (_context63.prev = _context63.next) {
11094
+ var _getMetadataUri = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64() {
11095
+ return _regeneratorRuntime().wrap(function _callee64$(_context64) {
11096
+ while (1) switch (_context64.prev = _context64.next) {
10060
11097
  case 0:
10061
- _context63.next = 2;
11098
+ _context64.next = 2;
10062
11099
  return this.rpcClient.readContract({
10063
11100
  abi: piLicenseTemplateAbi,
10064
11101
  address: this.address,
10065
11102
  functionName: "getMetadataURI"
10066
11103
  });
10067
11104
  case 2:
10068
- return _context63.abrupt("return", _context63.sent);
11105
+ return _context64.abrupt("return", _context64.sent);
10069
11106
  case 3:
10070
11107
  case "end":
10071
- return _context63.stop();
11108
+ return _context64.stop();
10072
11109
  }
10073
- }, _callee63, this);
11110
+ }, _callee64, this);
10074
11111
  }));
10075
11112
  function getMetadataUri() {
10076
11113
  return _getMetadataUri.apply(this, arguments);
@@ -10087,12 +11124,12 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10087
11124
  }, {
10088
11125
  key: "getRoyaltyPolicy",
10089
11126
  value: (function () {
10090
- var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64(request) {
11127
+ var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(request) {
10091
11128
  var result;
10092
- return _regeneratorRuntime().wrap(function _callee64$(_context64) {
10093
- while (1) switch (_context64.prev = _context64.next) {
11129
+ return _regeneratorRuntime().wrap(function _callee65$(_context65) {
11130
+ while (1) switch (_context65.prev = _context65.next) {
10094
11131
  case 0:
10095
- _context64.next = 2;
11132
+ _context65.next = 2;
10096
11133
  return this.rpcClient.readContract({
10097
11134
  abi: piLicenseTemplateAbi,
10098
11135
  address: this.address,
@@ -10100,8 +11137,8 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10100
11137
  args: [request.licenseTermsId]
10101
11138
  });
10102
11139
  case 2:
10103
- result = _context64.sent;
10104
- return _context64.abrupt("return", {
11140
+ result = _context65.sent;
11141
+ return _context65.abrupt("return", {
10105
11142
  royaltyPolicy: result[0],
10106
11143
  royaltyData: result[1],
10107
11144
  mintingFee: result[2],
@@ -10109,11 +11146,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10109
11146
  });
10110
11147
  case 4:
10111
11148
  case "end":
10112
- return _context64.stop();
11149
+ return _context65.stop();
10113
11150
  }
10114
- }, _callee64, this);
11151
+ }, _callee65, this);
10115
11152
  }));
10116
- function getRoyaltyPolicy(_x49) {
11153
+ function getRoyaltyPolicy(_x50) {
10117
11154
  return _getRoyaltyPolicy.apply(this, arguments);
10118
11155
  }
10119
11156
  return getRoyaltyPolicy;
@@ -10128,11 +11165,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10128
11165
  }, {
10129
11166
  key: "isDerivativeApproved",
10130
11167
  value: (function () {
10131
- var _isDerivativeApproved = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(request) {
10132
- return _regeneratorRuntime().wrap(function _callee65$(_context65) {
10133
- while (1) switch (_context65.prev = _context65.next) {
11168
+ var _isDerivativeApproved = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(request) {
11169
+ return _regeneratorRuntime().wrap(function _callee66$(_context66) {
11170
+ while (1) switch (_context66.prev = _context66.next) {
10134
11171
  case 0:
10135
- _context65.next = 2;
11172
+ _context66.next = 2;
10136
11173
  return this.rpcClient.readContract({
10137
11174
  abi: piLicenseTemplateAbi,
10138
11175
  address: this.address,
@@ -10140,14 +11177,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10140
11177
  args: [request.licenseTokenId, request.childIpId]
10141
11178
  });
10142
11179
  case 2:
10143
- return _context65.abrupt("return", _context65.sent);
11180
+ return _context66.abrupt("return", _context66.sent);
10144
11181
  case 3:
10145
11182
  case "end":
10146
- return _context65.stop();
11183
+ return _context66.stop();
10147
11184
  }
10148
- }, _callee65, this);
11185
+ }, _callee66, this);
10149
11186
  }));
10150
- function isDerivativeApproved(_x50) {
11187
+ function isDerivativeApproved(_x51) {
10151
11188
  return _isDerivativeApproved.apply(this, arguments);
10152
11189
  }
10153
11190
  return isDerivativeApproved;
@@ -10162,11 +11199,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10162
11199
  }, {
10163
11200
  key: "isLicenseTransferable",
10164
11201
  value: (function () {
10165
- var _isLicenseTransferable = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(request) {
10166
- return _regeneratorRuntime().wrap(function _callee66$(_context66) {
10167
- while (1) switch (_context66.prev = _context66.next) {
11202
+ var _isLicenseTransferable = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67(request) {
11203
+ return _regeneratorRuntime().wrap(function _callee67$(_context67) {
11204
+ while (1) switch (_context67.prev = _context67.next) {
10168
11205
  case 0:
10169
- _context66.next = 2;
11206
+ _context67.next = 2;
10170
11207
  return this.rpcClient.readContract({
10171
11208
  abi: piLicenseTemplateAbi,
10172
11209
  address: this.address,
@@ -10174,14 +11211,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10174
11211
  args: [request.licenseTermsId]
10175
11212
  });
10176
11213
  case 2:
10177
- return _context66.abrupt("return", _context66.sent);
11214
+ return _context67.abrupt("return", _context67.sent);
10178
11215
  case 3:
10179
11216
  case "end":
10180
- return _context66.stop();
11217
+ return _context67.stop();
10181
11218
  }
10182
- }, _callee66, this);
11219
+ }, _callee67, this);
10183
11220
  }));
10184
- function isLicenseTransferable(_x51) {
11221
+ function isLicenseTransferable(_x52) {
10185
11222
  return _isLicenseTransferable.apply(this, arguments);
10186
11223
  }
10187
11224
  return isLicenseTransferable;
@@ -10196,23 +11233,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10196
11233
  }, {
10197
11234
  key: "name",
10198
11235
  value: (function () {
10199
- var _name = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67() {
10200
- return _regeneratorRuntime().wrap(function _callee67$(_context67) {
10201
- while (1) switch (_context67.prev = _context67.next) {
11236
+ var _name = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68() {
11237
+ return _regeneratorRuntime().wrap(function _callee68$(_context68) {
11238
+ while (1) switch (_context68.prev = _context68.next) {
10202
11239
  case 0:
10203
- _context67.next = 2;
11240
+ _context68.next = 2;
10204
11241
  return this.rpcClient.readContract({
10205
11242
  abi: piLicenseTemplateAbi,
10206
11243
  address: this.address,
10207
11244
  functionName: "name"
10208
11245
  });
10209
11246
  case 2:
10210
- return _context67.abrupt("return", _context67.sent);
11247
+ return _context68.abrupt("return", _context68.sent);
10211
11248
  case 3:
10212
11249
  case "end":
10213
- return _context67.stop();
11250
+ return _context68.stop();
10214
11251
  }
10215
- }, _callee67, this);
11252
+ }, _callee68, this);
10216
11253
  }));
10217
11254
  function name() {
10218
11255
  return _name.apply(this, arguments);
@@ -10229,11 +11266,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10229
11266
  }, {
10230
11267
  key: "supportsInterface",
10231
11268
  value: (function () {
10232
- var _supportsInterface = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68(request) {
10233
- return _regeneratorRuntime().wrap(function _callee68$(_context68) {
10234
- while (1) switch (_context68.prev = _context68.next) {
11269
+ var _supportsInterface = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(request) {
11270
+ return _regeneratorRuntime().wrap(function _callee69$(_context69) {
11271
+ while (1) switch (_context69.prev = _context69.next) {
10235
11272
  case 0:
10236
- _context68.next = 2;
11273
+ _context69.next = 2;
10237
11274
  return this.rpcClient.readContract({
10238
11275
  abi: piLicenseTemplateAbi,
10239
11276
  address: this.address,
@@ -10241,14 +11278,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10241
11278
  args: [request.interfaceId]
10242
11279
  });
10243
11280
  case 2:
10244
- return _context68.abrupt("return", _context68.sent);
11281
+ return _context69.abrupt("return", _context69.sent);
10245
11282
  case 3:
10246
11283
  case "end":
10247
- return _context68.stop();
11284
+ return _context69.stop();
10248
11285
  }
10249
- }, _callee68, this);
11286
+ }, _callee69, this);
10250
11287
  }));
10251
- function supportsInterface(_x52) {
11288
+ function supportsInterface(_x53) {
10252
11289
  return _supportsInterface.apply(this, arguments);
10253
11290
  }
10254
11291
  return supportsInterface;
@@ -10263,11 +11300,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10263
11300
  }, {
10264
11301
  key: "toJson",
10265
11302
  value: (function () {
10266
- var _toJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(request) {
10267
- return _regeneratorRuntime().wrap(function _callee69$(_context69) {
10268
- while (1) switch (_context69.prev = _context69.next) {
11303
+ var _toJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70(request) {
11304
+ return _regeneratorRuntime().wrap(function _callee70$(_context70) {
11305
+ while (1) switch (_context70.prev = _context70.next) {
10269
11306
  case 0:
10270
- _context69.next = 2;
11307
+ _context70.next = 2;
10271
11308
  return this.rpcClient.readContract({
10272
11309
  abi: piLicenseTemplateAbi,
10273
11310
  address: this.address,
@@ -10275,14 +11312,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10275
11312
  args: [request.licenseTermsId]
10276
11313
  });
10277
11314
  case 2:
10278
- return _context69.abrupt("return", _context69.sent);
11315
+ return _context70.abrupt("return", _context70.sent);
10279
11316
  case 3:
10280
11317
  case "end":
10281
- return _context69.stop();
11318
+ return _context70.stop();
10282
11319
  }
10283
- }, _callee69, this);
11320
+ }, _callee70, this);
10284
11321
  }));
10285
- function toJson(_x53) {
11322
+ function toJson(_x54) {
10286
11323
  return _toJson.apply(this, arguments);
10287
11324
  }
10288
11325
  return toJson;
@@ -10297,23 +11334,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10297
11334
  }, {
10298
11335
  key: "totalRegisteredLicenseTerms",
10299
11336
  value: (function () {
10300
- var _totalRegisteredLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70() {
10301
- return _regeneratorRuntime().wrap(function _callee70$(_context70) {
10302
- while (1) switch (_context70.prev = _context70.next) {
11337
+ var _totalRegisteredLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71() {
11338
+ return _regeneratorRuntime().wrap(function _callee71$(_context71) {
11339
+ while (1) switch (_context71.prev = _context71.next) {
10303
11340
  case 0:
10304
- _context70.next = 2;
11341
+ _context71.next = 2;
10305
11342
  return this.rpcClient.readContract({
10306
11343
  abi: piLicenseTemplateAbi,
10307
11344
  address: this.address,
10308
11345
  functionName: "totalRegisteredLicenseTerms"
10309
11346
  });
10310
11347
  case 2:
10311
- return _context70.abrupt("return", _context70.sent);
11348
+ return _context71.abrupt("return", _context71.sent);
10312
11349
  case 3:
10313
11350
  case "end":
10314
- return _context70.stop();
11351
+ return _context71.stop();
10315
11352
  }
10316
- }, _callee70, this);
11353
+ }, _callee71, this);
10317
11354
  }));
10318
11355
  function totalRegisteredLicenseTerms() {
10319
11356
  return _totalRegisteredLicenseTerms.apply(this, arguments);
@@ -10330,11 +11367,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10330
11367
  }, {
10331
11368
  key: "verifyCompatibleLicenses",
10332
11369
  value: (function () {
10333
- var _verifyCompatibleLicenses = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(request) {
10334
- return _regeneratorRuntime().wrap(function _callee71$(_context71) {
10335
- while (1) switch (_context71.prev = _context71.next) {
11370
+ var _verifyCompatibleLicenses = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(request) {
11371
+ return _regeneratorRuntime().wrap(function _callee72$(_context72) {
11372
+ while (1) switch (_context72.prev = _context72.next) {
10336
11373
  case 0:
10337
- _context71.next = 2;
11374
+ _context72.next = 2;
10338
11375
  return this.rpcClient.readContract({
10339
11376
  abi: piLicenseTemplateAbi,
10340
11377
  address: this.address,
@@ -10342,14 +11379,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
10342
11379
  args: [request.licenseTermsIds]
10343
11380
  });
10344
11381
  case 2:
10345
- return _context71.abrupt("return", _context71.sent);
11382
+ return _context72.abrupt("return", _context72.sent);
10346
11383
  case 3:
10347
11384
  case "end":
10348
- return _context71.stop();
11385
+ return _context72.stop();
10349
11386
  }
10350
- }, _callee71, this);
11387
+ }, _callee72, this);
10351
11388
  }));
10352
- function verifyCompatibleLicenses(_x54) {
11389
+ function verifyCompatibleLicenses(_x55) {
10353
11390
  return _verifyCompatibleLicenses.apply(this, arguments);
10354
11391
  }
10355
11392
  return verifyCompatibleLicenses;
@@ -10379,12 +11416,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10379
11416
  return _createClass(PiLicenseTemplateClient, [{
10380
11417
  key: "initialize",
10381
11418
  value: (function () {
10382
- var _initialize2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(request) {
11419
+ var _initialize2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(request) {
10383
11420
  var _yield$this$rpcClient28, call;
10384
- return _regeneratorRuntime().wrap(function _callee72$(_context72) {
10385
- while (1) switch (_context72.prev = _context72.next) {
11421
+ return _regeneratorRuntime().wrap(function _callee73$(_context73) {
11422
+ while (1) switch (_context73.prev = _context73.next) {
10386
11423
  case 0:
10387
- _context72.next = 2;
11424
+ _context73.next = 2;
10388
11425
  return this.rpcClient.simulateContract({
10389
11426
  abi: piLicenseTemplateAbi,
10390
11427
  address: this.address,
@@ -10393,19 +11430,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10393
11430
  args: [request.name, request.metadataURI]
10394
11431
  });
10395
11432
  case 2:
10396
- _yield$this$rpcClient28 = _context72.sent;
11433
+ _yield$this$rpcClient28 = _context73.sent;
10397
11434
  call = _yield$this$rpcClient28.request;
10398
- _context72.next = 6;
11435
+ _context73.next = 6;
10399
11436
  return this.wallet.writeContract(call);
10400
11437
  case 6:
10401
- return _context72.abrupt("return", _context72.sent);
11438
+ return _context73.abrupt("return", _context73.sent);
10402
11439
  case 7:
10403
11440
  case "end":
10404
- return _context72.stop();
11441
+ return _context73.stop();
10405
11442
  }
10406
- }, _callee72, this);
11443
+ }, _callee73, this);
10407
11444
  }));
10408
- function initialize(_x55) {
11445
+ function initialize(_x56) {
10409
11446
  return _initialize2.apply(this, arguments);
10410
11447
  }
10411
11448
  return initialize;
@@ -10420,12 +11457,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10420
11457
  }, {
10421
11458
  key: "registerLicenseTerms",
10422
11459
  value: (function () {
10423
- var _registerLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(request) {
11460
+ var _registerLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(request) {
10424
11461
  var _yield$this$rpcClient29, call;
10425
- return _regeneratorRuntime().wrap(function _callee73$(_context73) {
10426
- while (1) switch (_context73.prev = _context73.next) {
11462
+ return _regeneratorRuntime().wrap(function _callee74$(_context74) {
11463
+ while (1) switch (_context74.prev = _context74.next) {
10427
11464
  case 0:
10428
- _context73.next = 2;
11465
+ _context74.next = 2;
10429
11466
  return this.rpcClient.simulateContract({
10430
11467
  abi: piLicenseTemplateAbi,
10431
11468
  address: this.address,
@@ -10434,19 +11471,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10434
11471
  args: [request.terms]
10435
11472
  });
10436
11473
  case 2:
10437
- _yield$this$rpcClient29 = _context73.sent;
11474
+ _yield$this$rpcClient29 = _context74.sent;
10438
11475
  call = _yield$this$rpcClient29.request;
10439
- _context73.next = 6;
11476
+ _context74.next = 6;
10440
11477
  return this.wallet.writeContract(call);
10441
11478
  case 6:
10442
- return _context73.abrupt("return", _context73.sent);
11479
+ return _context74.abrupt("return", _context74.sent);
10443
11480
  case 7:
10444
11481
  case "end":
10445
- return _context73.stop();
11482
+ return _context74.stop();
10446
11483
  }
10447
- }, _callee73, this);
11484
+ }, _callee74, this);
10448
11485
  }));
10449
- function registerLicenseTerms(_x56) {
11486
+ function registerLicenseTerms(_x57) {
10450
11487
  return _registerLicenseTerms.apply(this, arguments);
10451
11488
  }
10452
11489
  return registerLicenseTerms;
@@ -10461,12 +11498,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10461
11498
  }, {
10462
11499
  key: "setApproval",
10463
11500
  value: (function () {
10464
- var _setApproval = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(request) {
11501
+ var _setApproval = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(request) {
10465
11502
  var _yield$this$rpcClient30, call;
10466
- return _regeneratorRuntime().wrap(function _callee74$(_context74) {
10467
- while (1) switch (_context74.prev = _context74.next) {
11503
+ return _regeneratorRuntime().wrap(function _callee75$(_context75) {
11504
+ while (1) switch (_context75.prev = _context75.next) {
10468
11505
  case 0:
10469
- _context74.next = 2;
11506
+ _context75.next = 2;
10470
11507
  return this.rpcClient.simulateContract({
10471
11508
  abi: piLicenseTemplateAbi,
10472
11509
  address: this.address,
@@ -10475,19 +11512,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10475
11512
  args: [request.licenseTokenId, request.childIpId, request.approved]
10476
11513
  });
10477
11514
  case 2:
10478
- _yield$this$rpcClient30 = _context74.sent;
11515
+ _yield$this$rpcClient30 = _context75.sent;
10479
11516
  call = _yield$this$rpcClient30.request;
10480
- _context74.next = 6;
11517
+ _context75.next = 6;
10481
11518
  return this.wallet.writeContract(call);
10482
11519
  case 6:
10483
- return _context74.abrupt("return", _context74.sent);
11520
+ return _context75.abrupt("return", _context75.sent);
10484
11521
  case 7:
10485
11522
  case "end":
10486
- return _context74.stop();
11523
+ return _context75.stop();
10487
11524
  }
10488
- }, _callee74, this);
11525
+ }, _callee75, this);
10489
11526
  }));
10490
- function setApproval(_x57) {
11527
+ function setApproval(_x58) {
10491
11528
  return _setApproval.apply(this, arguments);
10492
11529
  }
10493
11530
  return setApproval;
@@ -10502,12 +11539,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10502
11539
  }, {
10503
11540
  key: "verifyMintLicenseToken",
10504
11541
  value: (function () {
10505
- var _verifyMintLicenseToken2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(request) {
11542
+ var _verifyMintLicenseToken2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(request) {
10506
11543
  var _yield$this$rpcClient31, call;
10507
- return _regeneratorRuntime().wrap(function _callee75$(_context75) {
10508
- while (1) switch (_context75.prev = _context75.next) {
11544
+ return _regeneratorRuntime().wrap(function _callee76$(_context76) {
11545
+ while (1) switch (_context76.prev = _context76.next) {
10509
11546
  case 0:
10510
- _context75.next = 2;
11547
+ _context76.next = 2;
10511
11548
  return this.rpcClient.simulateContract({
10512
11549
  abi: piLicenseTemplateAbi,
10513
11550
  address: this.address,
@@ -10516,19 +11553,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10516
11553
  args: [request[0], request[1], request[2], request[3]]
10517
11554
  });
10518
11555
  case 2:
10519
- _yield$this$rpcClient31 = _context75.sent;
11556
+ _yield$this$rpcClient31 = _context76.sent;
10520
11557
  call = _yield$this$rpcClient31.request;
10521
- _context75.next = 6;
11558
+ _context76.next = 6;
10522
11559
  return this.wallet.writeContract(call);
10523
11560
  case 6:
10524
- return _context75.abrupt("return", _context75.sent);
11561
+ return _context76.abrupt("return", _context76.sent);
10525
11562
  case 7:
10526
11563
  case "end":
10527
- return _context75.stop();
11564
+ return _context76.stop();
10528
11565
  }
10529
- }, _callee75, this);
11566
+ }, _callee76, this);
10530
11567
  }));
10531
- function verifyMintLicenseToken(_x58) {
11568
+ function verifyMintLicenseToken(_x59) {
10532
11569
  return _verifyMintLicenseToken2.apply(this, arguments);
10533
11570
  }
10534
11571
  return verifyMintLicenseToken;
@@ -10543,12 +11580,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10543
11580
  }, {
10544
11581
  key: "verifyRegisterDerivative",
10545
11582
  value: (function () {
10546
- var _verifyRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(request) {
11583
+ var _verifyRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(request) {
10547
11584
  var _yield$this$rpcClient32, call;
10548
- return _regeneratorRuntime().wrap(function _callee76$(_context76) {
10549
- while (1) switch (_context76.prev = _context76.next) {
11585
+ return _regeneratorRuntime().wrap(function _callee77$(_context77) {
11586
+ while (1) switch (_context77.prev = _context77.next) {
10550
11587
  case 0:
10551
- _context76.next = 2;
11588
+ _context77.next = 2;
10552
11589
  return this.rpcClient.simulateContract({
10553
11590
  abi: piLicenseTemplateAbi,
10554
11591
  address: this.address,
@@ -10557,19 +11594,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10557
11594
  args: [request.childIpId, request.parentIpId, request.licenseTermsId, request.licensee]
10558
11595
  });
10559
11596
  case 2:
10560
- _yield$this$rpcClient32 = _context76.sent;
11597
+ _yield$this$rpcClient32 = _context77.sent;
10561
11598
  call = _yield$this$rpcClient32.request;
10562
- _context76.next = 6;
11599
+ _context77.next = 6;
10563
11600
  return this.wallet.writeContract(call);
10564
11601
  case 6:
10565
- return _context76.abrupt("return", _context76.sent);
11602
+ return _context77.abrupt("return", _context77.sent);
10566
11603
  case 7:
10567
11604
  case "end":
10568
- return _context76.stop();
11605
+ return _context77.stop();
10569
11606
  }
10570
- }, _callee76, this);
11607
+ }, _callee77, this);
10571
11608
  }));
10572
- function verifyRegisterDerivative(_x59) {
11609
+ function verifyRegisterDerivative(_x60) {
10573
11610
  return _verifyRegisterDerivative.apply(this, arguments);
10574
11611
  }
10575
11612
  return verifyRegisterDerivative;
@@ -10584,12 +11621,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10584
11621
  }, {
10585
11622
  key: "verifyRegisterDerivativeForAllParents",
10586
11623
  value: (function () {
10587
- var _verifyRegisterDerivativeForAllParents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(request) {
11624
+ var _verifyRegisterDerivativeForAllParents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(request) {
10588
11625
  var _yield$this$rpcClient33, call;
10589
- return _regeneratorRuntime().wrap(function _callee77$(_context77) {
10590
- while (1) switch (_context77.prev = _context77.next) {
11626
+ return _regeneratorRuntime().wrap(function _callee78$(_context78) {
11627
+ while (1) switch (_context78.prev = _context78.next) {
10591
11628
  case 0:
10592
- _context77.next = 2;
11629
+ _context78.next = 2;
10593
11630
  return this.rpcClient.simulateContract({
10594
11631
  abi: piLicenseTemplateAbi,
10595
11632
  address: this.address,
@@ -10598,19 +11635,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10598
11635
  args: [request.childIpId, request.parentIpIds, request.licenseTermsIds, request.childIpOwner]
10599
11636
  });
10600
11637
  case 2:
10601
- _yield$this$rpcClient33 = _context77.sent;
11638
+ _yield$this$rpcClient33 = _context78.sent;
10602
11639
  call = _yield$this$rpcClient33.request;
10603
- _context77.next = 6;
11640
+ _context78.next = 6;
10604
11641
  return this.wallet.writeContract(call);
10605
11642
  case 6:
10606
- return _context77.abrupt("return", _context77.sent);
11643
+ return _context78.abrupt("return", _context78.sent);
10607
11644
  case 7:
10608
11645
  case "end":
10609
- return _context77.stop();
11646
+ return _context78.stop();
10610
11647
  }
10611
- }, _callee77, this);
11648
+ }, _callee78, this);
10612
11649
  }));
10613
- function verifyRegisterDerivativeForAllParents(_x60) {
11650
+ function verifyRegisterDerivativeForAllParents(_x61) {
10614
11651
  return _verifyRegisterDerivativeForAllParents.apply(this, arguments);
10615
11652
  }
10616
11653
  return verifyRegisterDerivativeForAllParents;
@@ -10634,9 +11671,9 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
10634
11671
  */
10635
11672
  var RoyaltyModuleClient = /*#__PURE__*/function () {
10636
11673
  function RoyaltyModuleClient(rpcClient, wallet, address) {
10637
- var _rpcClient$chain10;
11674
+ var _rpcClient$chain11;
10638
11675
  _classCallCheck(this, RoyaltyModuleClient);
10639
- this.address = address || getAddress(royaltyModuleAddress, (_rpcClient$chain10 = rpcClient.chain) === null || _rpcClient$chain10 === void 0 ? void 0 : _rpcClient$chain10.id);
11676
+ this.address = address || getAddress(royaltyModuleAddress, (_rpcClient$chain11 = rpcClient.chain) === null || _rpcClient$chain11 === void 0 ? void 0 : _rpcClient$chain11.id);
10640
11677
  this.rpcClient = rpcClient;
10641
11678
  this.wallet = wallet;
10642
11679
  }
@@ -10650,12 +11687,12 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
10650
11687
  return _createClass(RoyaltyModuleClient, [{
10651
11688
  key: "payRoyaltyOnBehalf",
10652
11689
  value: (function () {
10653
- var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(request) {
11690
+ var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(request) {
10654
11691
  var _yield$this$rpcClient34, call;
10655
- return _regeneratorRuntime().wrap(function _callee78$(_context78) {
10656
- while (1) switch (_context78.prev = _context78.next) {
11692
+ return _regeneratorRuntime().wrap(function _callee79$(_context79) {
11693
+ while (1) switch (_context79.prev = _context79.next) {
10657
11694
  case 0:
10658
- _context78.next = 2;
11695
+ _context79.next = 2;
10659
11696
  return this.rpcClient.simulateContract({
10660
11697
  abi: royaltyModuleAbi,
10661
11698
  address: this.address,
@@ -10664,19 +11701,19 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
10664
11701
  args: [request.receiverIpId, request.payerIpId, request.token, request.amount]
10665
11702
  });
10666
11703
  case 2:
10667
- _yield$this$rpcClient34 = _context78.sent;
11704
+ _yield$this$rpcClient34 = _context79.sent;
10668
11705
  call = _yield$this$rpcClient34.request;
10669
- _context78.next = 6;
11706
+ _context79.next = 6;
10670
11707
  return this.wallet.writeContract(call);
10671
11708
  case 6:
10672
- return _context78.abrupt("return", _context78.sent);
11709
+ return _context79.abrupt("return", _context79.sent);
10673
11710
  case 7:
10674
11711
  case "end":
10675
- return _context78.stop();
11712
+ return _context79.stop();
10676
11713
  }
10677
- }, _callee78, this);
11714
+ }, _callee79, this);
10678
11715
  }));
10679
- function payRoyaltyOnBehalf(_x61) {
11716
+ function payRoyaltyOnBehalf(_x62) {
10680
11717
  return _payRoyaltyOnBehalf.apply(this, arguments);
10681
11718
  }
10682
11719
  return payRoyaltyOnBehalf;
@@ -10716,9 +11753,9 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
10716
11753
  */
10717
11754
  var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
10718
11755
  function RoyaltyPolicyLapReadOnlyClient(rpcClient, address) {
10719
- var _rpcClient$chain11;
11756
+ var _rpcClient$chain12;
10720
11757
  _classCallCheck(this, RoyaltyPolicyLapReadOnlyClient);
10721
- this.address = address || getAddress(royaltyPolicyLapAddress, (_rpcClient$chain11 = rpcClient.chain) === null || _rpcClient$chain11 === void 0 ? void 0 : _rpcClient$chain11.id);
11758
+ this.address = address || getAddress(royaltyPolicyLapAddress, (_rpcClient$chain12 = rpcClient.chain) === null || _rpcClient$chain12 === void 0 ? void 0 : _rpcClient$chain12.id);
10722
11759
  this.rpcClient = rpcClient;
10723
11760
  }
10724
11761
 
@@ -10731,11 +11768,11 @@ var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
10731
11768
  return _createClass(RoyaltyPolicyLapReadOnlyClient, [{
10732
11769
  key: "getRoyaltyData",
10733
11770
  value: (function () {
10734
- var _getRoyaltyData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(request) {
10735
- return _regeneratorRuntime().wrap(function _callee79$(_context79) {
10736
- while (1) switch (_context79.prev = _context79.next) {
11771
+ var _getRoyaltyData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(request) {
11772
+ return _regeneratorRuntime().wrap(function _callee80$(_context80) {
11773
+ while (1) switch (_context80.prev = _context80.next) {
10737
11774
  case 0:
10738
- _context79.next = 2;
11775
+ _context80.next = 2;
10739
11776
  return this.rpcClient.readContract({
10740
11777
  abi: royaltyPolicyLapAbi,
10741
11778
  address: this.address,
@@ -10743,14 +11780,14 @@ var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
10743
11780
  args: [request.ipId]
10744
11781
  });
10745
11782
  case 2:
10746
- return _context79.abrupt("return", _context79.sent);
11783
+ return _context80.abrupt("return", _context80.sent);
10747
11784
  case 3:
10748
11785
  case "end":
10749
- return _context79.stop();
11786
+ return _context80.stop();
10750
11787
  }
10751
- }, _callee79, this);
11788
+ }, _callee80, this);
10752
11789
  }));
10753
- function getRoyaltyData(_x62) {
11790
+ function getRoyaltyData(_x63) {
10754
11791
  return _getRoyaltyData.apply(this, arguments);
10755
11792
  }
10756
11793
  return getRoyaltyData;
@@ -10780,12 +11817,12 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
10780
11817
  return _createClass(RoyaltyPolicyLapClient, [{
10781
11818
  key: "onRoyaltyPayment",
10782
11819
  value: (function () {
10783
- var _onRoyaltyPayment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(request) {
11820
+ var _onRoyaltyPayment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(request) {
10784
11821
  var _yield$this$rpcClient35, call;
10785
- return _regeneratorRuntime().wrap(function _callee80$(_context80) {
10786
- while (1) switch (_context80.prev = _context80.next) {
11822
+ return _regeneratorRuntime().wrap(function _callee81$(_context81) {
11823
+ while (1) switch (_context81.prev = _context81.next) {
10787
11824
  case 0:
10788
- _context80.next = 2;
11825
+ _context81.next = 2;
10789
11826
  return this.rpcClient.simulateContract({
10790
11827
  abi: royaltyPolicyLapAbi,
10791
11828
  address: this.address,
@@ -10794,19 +11831,19 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
10794
11831
  args: [request.caller, request.ipId, request.token, request.amount]
10795
11832
  });
10796
11833
  case 2:
10797
- _yield$this$rpcClient35 = _context80.sent;
11834
+ _yield$this$rpcClient35 = _context81.sent;
10798
11835
  call = _yield$this$rpcClient35.request;
10799
- _context80.next = 6;
11836
+ _context81.next = 6;
10800
11837
  return this.wallet.writeContract(call);
10801
11838
  case 6:
10802
- return _context80.abrupt("return", _context80.sent);
11839
+ return _context81.abrupt("return", _context81.sent);
10803
11840
  case 7:
10804
11841
  case "end":
10805
- return _context80.stop();
11842
+ return _context81.stop();
10806
11843
  }
10807
- }, _callee80, this);
11844
+ }, _callee81, this);
10808
11845
  }));
10809
- function onRoyaltyPayment(_x63) {
11846
+ function onRoyaltyPayment(_x64) {
10810
11847
  return _onRoyaltyPayment.apply(this, arguments);
10811
11848
  }
10812
11849
  return onRoyaltyPayment;
@@ -10817,20 +11854,21 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
10817
11854
  var IPAssetClient = /*#__PURE__*/function () {
10818
11855
  function IPAssetClient(rpcClient, wallet, chainId) {
10819
11856
  _classCallCheck(this, IPAssetClient);
11857
+ this.licensingModuleClient = new LicensingModuleClient(rpcClient, wallet);
11858
+ this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
11859
+ this.licenseTemplateClient = new PiLicenseTemplateClient(rpcClient, wallet);
11860
+ this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(rpcClient);
11861
+ this.licenseTokenReadOnlyClient = new LicenseTokenReadOnlyClient(rpcClient);
10820
11862
  this.rpcClient = rpcClient;
10821
11863
  this.chainId = chainId;
10822
- this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
10823
- this.licensingModuleClient = new LicensingModuleClient(this.rpcClient, wallet);
10824
- this.licenseTemplateClient = new PiLicenseTemplateClient(this.rpcClient, wallet);
10825
- this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(this.rpcClient);
10826
11864
  }
10827
11865
 
10828
11866
  /**
10829
11867
  * Registers an NFT as IP, creating a corresponding IP record.
10830
11868
  * @param request The request object that contains all data needed to register IP.
10831
- * @param request.tokenContract The address of the NFT.
10832
- * @param request.tokenId The token identifier of the NFT.
10833
- * @param request.txOptions [Optional] The transaction options.
11869
+ * @param request.tokenContract The address of the NFT.
11870
+ * @param request.tokenId The token identifier of the NFT.
11871
+ * @param request.txOptions [Optional] The transaction options.
10834
11872
  * @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
10835
11873
  * @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
10836
11874
  */
@@ -10907,10 +11945,10 @@ var IPAssetClient = /*#__PURE__*/function () {
10907
11945
  * All IPs attached default license terms by default.
10908
11946
  * The derivative IP owner must be the caller or an authorized operator.
10909
11947
  * @param request The request object that contains all data needed to register derivative IP.
10910
- * @param request.childIpId The derivative IP ID.
10911
- * @param request.parentIpIds The parent IP IDs.
10912
- * @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
10913
- * @param request.txOptions [Optional] The transaction options.
11948
+ * @param request.childIpId The derivative IP ID.
11949
+ * @param request.parentIpIds The parent IP IDs.
11950
+ * @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
11951
+ * @param request.txOptions [Optional] The transaction options.
10914
11952
  * @returns A Promise that resolves to an object containing the transaction hash.
10915
11953
  */
10916
11954
  )
@@ -10918,83 +11956,85 @@ var IPAssetClient = /*#__PURE__*/function () {
10918
11956
  key: "registerDerivative",
10919
11957
  value: (function () {
10920
11958
  var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
10921
- var _request$txOptions2, _iterator, _step, parentId, i, isAttachedLicenseTerms, txHash;
11959
+ var _request$txOptions2, isChildIpIdRegistered, _iterator, _step, parentId, isParentIpIdRegistered, i, isAttachedLicenseTerms, txHash;
10922
11960
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10923
11961
  while (1) switch (_context2.prev = _context2.next) {
10924
11962
  case 0:
10925
11963
  _context2.prev = 0;
10926
11964
  _context2.next = 3;
10927
- return this.isIpIdRegistered(request.childIpId);
11965
+ return this.isRegistered(request.childIpId);
10928
11966
  case 3:
10929
- if (_context2.sent) {
10930
- _context2.next = 5;
11967
+ isChildIpIdRegistered = _context2.sent;
11968
+ if (isChildIpIdRegistered) {
11969
+ _context2.next = 6;
10931
11970
  break;
10932
11971
  }
10933
- throw new Error("IP asset must be registered before registering derivative");
10934
- case 5:
11972
+ throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
11973
+ case 6:
10935
11974
  _iterator = _createForOfIteratorHelper(request.parentIpIds);
10936
- _context2.prev = 6;
11975
+ _context2.prev = 7;
10937
11976
  _iterator.s();
10938
- case 8:
11977
+ case 9:
10939
11978
  if ((_step = _iterator.n()).done) {
10940
- _context2.next = 16;
11979
+ _context2.next = 18;
10941
11980
  break;
10942
11981
  }
10943
11982
  parentId = _step.value;
10944
- _context2.next = 12;
10945
- return this.isIpIdRegistered(parentId);
10946
- case 12:
10947
- if (_context2.sent) {
10948
- _context2.next = 14;
11983
+ _context2.next = 13;
11984
+ return this.isRegistered(parentId);
11985
+ case 13:
11986
+ isParentIpIdRegistered = _context2.sent;
11987
+ if (isParentIpIdRegistered) {
11988
+ _context2.next = 16;
10949
11989
  break;
10950
11990
  }
10951
- throw new Error("Parent IP asset must be registered before registering derivative");
10952
- case 14:
10953
- _context2.next = 8;
10954
- break;
11991
+ throw new Error("The parent IP with id ".concat(parentId, " is not registered."));
10955
11992
  case 16:
10956
- _context2.next = 21;
11993
+ _context2.next = 9;
10957
11994
  break;
10958
11995
  case 18:
10959
- _context2.prev = 18;
10960
- _context2.t0 = _context2["catch"](6);
11996
+ _context2.next = 23;
11997
+ break;
11998
+ case 20:
11999
+ _context2.prev = 20;
12000
+ _context2.t0 = _context2["catch"](7);
10961
12001
  _iterator.e(_context2.t0);
10962
- case 21:
10963
- _context2.prev = 21;
12002
+ case 23:
12003
+ _context2.prev = 23;
10964
12004
  _iterator.f();
10965
- return _context2.finish(21);
10966
- case 24:
12005
+ return _context2.finish(23);
12006
+ case 26:
10967
12007
  if (!(request.parentIpIds.length !== request.licenseTermsIds.length)) {
10968
- _context2.next = 26;
12008
+ _context2.next = 28;
10969
12009
  break;
10970
12010
  }
10971
- throw new Error("Parent IP IDs and License terms IDs must be provided in pairs");
10972
- case 26:
12011
+ throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
12012
+ case 28:
10973
12013
  i = 0;
10974
- case 27:
12014
+ case 29:
10975
12015
  if (!(i < request.parentIpIds.length)) {
10976
- _context2.next = 36;
12016
+ _context2.next = 38;
10977
12017
  break;
10978
12018
  }
10979
- _context2.next = 30;
12019
+ _context2.next = 32;
10980
12020
  return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
10981
12021
  ipId: request.parentIpIds[i],
10982
12022
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
10983
12023
  licenseTermsId: BigInt(request.licenseTermsIds[i])
10984
12024
  });
10985
- case 30:
12025
+ case 32:
10986
12026
  isAttachedLicenseTerms = _context2.sent;
10987
12027
  if (isAttachedLicenseTerms) {
10988
- _context2.next = 33;
12028
+ _context2.next = 35;
10989
12029
  break;
10990
12030
  }
10991
- throw new Error("License terms must be attached to the parent ipId before registering derivative");
10992
- case 33:
12031
+ throw new Error("License terms id ".concat(request.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.parentIpIds[i], " before registering derivative."));
12032
+ case 35:
10993
12033
  i++;
10994
- _context2.next = 27;
12034
+ _context2.next = 29;
10995
12035
  break;
10996
- case 36:
10997
- _context2.next = 38;
12036
+ case 38:
12037
+ _context2.next = 40;
10998
12038
  return this.licensingModuleClient.registerDerivative({
10999
12039
  childIpId: request.childIpId,
11000
12040
  parentIpIds: request.parentIpIds,
@@ -11004,36 +12044,36 @@ var IPAssetClient = /*#__PURE__*/function () {
11004
12044
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
11005
12045
  royaltyContext: viem.zeroAddress
11006
12046
  });
11007
- case 38:
12047
+ case 40:
11008
12048
  txHash = _context2.sent;
11009
12049
  if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
11010
- _context2.next = 45;
12050
+ _context2.next = 47;
11011
12051
  break;
11012
12052
  }
11013
- _context2.next = 42;
12053
+ _context2.next = 44;
11014
12054
  return this.rpcClient.waitForTransactionReceipt({
11015
12055
  hash: txHash
11016
12056
  });
11017
- case 42:
12057
+ case 44:
11018
12058
  return _context2.abrupt("return", {
11019
12059
  txHash: txHash
11020
12060
  });
11021
- case 45:
12061
+ case 47:
11022
12062
  return _context2.abrupt("return", {
11023
12063
  txHash: txHash
11024
12064
  });
11025
- case 46:
11026
- _context2.next = 51;
11027
- break;
11028
12065
  case 48:
11029
- _context2.prev = 48;
12066
+ _context2.next = 53;
12067
+ break;
12068
+ case 50:
12069
+ _context2.prev = 50;
11030
12070
  _context2.t1 = _context2["catch"](0);
11031
12071
  handleError(_context2.t1, "Failed to register derivative");
11032
- case 51:
12072
+ case 53:
11033
12073
  case "end":
11034
12074
  return _context2.stop();
11035
12075
  }
11036
- }, _callee2, this, [[0, 48], [6, 18, 21, 24]]);
12076
+ }, _callee2, this, [[0, 50], [7, 20, 23, 26]]);
11037
12077
  }));
11038
12078
  function registerDerivative(_x2) {
11039
12079
  return _registerDerivative.apply(this, arguments);
@@ -11046,9 +12086,9 @@ var IPAssetClient = /*#__PURE__*/function () {
11046
12086
  * the license terms of the parent IPs issued with license tokens are attached to the derivative IP.
11047
12087
  * the caller must be the derivative IP owner or an authorized operator.
11048
12088
  * @param request The request object that contains all data needed to register derivative license tokens.
11049
- * @param request.childIpId The derivative IP ID.
11050
- * @param request.licenseTokenIds The IDs of the license tokens.
11051
- * @param request.txOptions [Optional] The transaction options.
12089
+ * @param request.childIpId The derivative IP ID.
12090
+ * @param request.licenseTokenIds The IDs of the license tokens.
12091
+ * @param request.txOptions [Optional] The transaction options.
11052
12092
  * @returns A Promise that resolves to an object containing the transaction hash.
11053
12093
  */
11054
12094
  )
@@ -11056,21 +12096,57 @@ var IPAssetClient = /*#__PURE__*/function () {
11056
12096
  key: "registerDerivativeWithLicenseTokens",
11057
12097
  value: (function () {
11058
12098
  var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
11059
- var _request$txOptions3, txHash;
12099
+ var _request$txOptions3, isChildIpIdRegistered, _iterator2, _step2, licenseTokenId, tokenOwnerAddress, txHash;
11060
12100
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11061
12101
  while (1) switch (_context3.prev = _context3.next) {
11062
12102
  case 0:
11063
12103
  _context3.prev = 0;
11064
12104
  _context3.next = 3;
11065
- return this.isIpIdRegistered(request.childIpId);
12105
+ return this.isRegistered(request.childIpId);
11066
12106
  case 3:
11067
- if (_context3.sent) {
11068
- _context3.next = 5;
12107
+ isChildIpIdRegistered = _context3.sent;
12108
+ if (isChildIpIdRegistered) {
12109
+ _context3.next = 6;
11069
12110
  break;
11070
12111
  }
11071
- throw new Error("IP asset must be registered before registering derivative with license tokens");
11072
- case 5:
11073
- _context3.next = 7;
12112
+ throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
12113
+ case 6:
12114
+ _iterator2 = _createForOfIteratorHelper(request.licenseTokenIds);
12115
+ _context3.prev = 7;
12116
+ _iterator2.s();
12117
+ case 9:
12118
+ if ((_step2 = _iterator2.n()).done) {
12119
+ _context3.next = 18;
12120
+ break;
12121
+ }
12122
+ licenseTokenId = _step2.value;
12123
+ _context3.next = 13;
12124
+ return this.licenseTokenReadOnlyClient.ownerOf({
12125
+ tokenId: BigInt(licenseTokenId)
12126
+ });
12127
+ case 13:
12128
+ tokenOwnerAddress = _context3.sent;
12129
+ if (tokenOwnerAddress) {
12130
+ _context3.next = 16;
12131
+ break;
12132
+ }
12133
+ throw new Error("License token id ".concat(licenseTokenId, " must be owned by the caller."));
12134
+ case 16:
12135
+ _context3.next = 9;
12136
+ break;
12137
+ case 18:
12138
+ _context3.next = 23;
12139
+ break;
12140
+ case 20:
12141
+ _context3.prev = 20;
12142
+ _context3.t0 = _context3["catch"](7);
12143
+ _iterator2.e(_context3.t0);
12144
+ case 23:
12145
+ _context3.prev = 23;
12146
+ _iterator2.f();
12147
+ return _context3.finish(23);
12148
+ case 26:
12149
+ _context3.next = 28;
11074
12150
  return this.licensingModuleClient.registerDerivativeWithLicenseTokens({
11075
12151
  childIpId: request.childIpId,
11076
12152
  licenseTokenIds: request.licenseTokenIds.map(function (id) {
@@ -11078,36 +12154,36 @@ var IPAssetClient = /*#__PURE__*/function () {
11078
12154
  }),
11079
12155
  royaltyContext: viem.zeroAddress
11080
12156
  });
11081
- case 7:
12157
+ case 28:
11082
12158
  txHash = _context3.sent;
11083
12159
  if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
11084
- _context3.next = 14;
12160
+ _context3.next = 35;
11085
12161
  break;
11086
12162
  }
11087
- _context3.next = 11;
12163
+ _context3.next = 32;
11088
12164
  return this.rpcClient.waitForTransactionReceipt({
11089
12165
  hash: txHash
11090
12166
  });
11091
- case 11:
12167
+ case 32:
11092
12168
  return _context3.abrupt("return", {
11093
12169
  txHash: txHash
11094
12170
  });
11095
- case 14:
12171
+ case 35:
11096
12172
  return _context3.abrupt("return", {
11097
12173
  txHash: txHash
11098
12174
  });
11099
- case 15:
11100
- _context3.next = 20;
12175
+ case 36:
12176
+ _context3.next = 41;
11101
12177
  break;
11102
- case 17:
11103
- _context3.prev = 17;
11104
- _context3.t0 = _context3["catch"](0);
11105
- handleError(_context3.t0, "Failed to register derivative with license tokens");
11106
- case 20:
12178
+ case 38:
12179
+ _context3.prev = 38;
12180
+ _context3.t1 = _context3["catch"](0);
12181
+ handleError(_context3.t1, "Failed to register derivative with license tokens");
12182
+ case 41:
11107
12183
  case "end":
11108
12184
  return _context3.stop();
11109
12185
  }
11110
- }, _callee3, this, [[0, 17]]);
12186
+ }, _callee3, this, [[0, 38], [7, 20, 23, 26]]);
11111
12187
  }));
11112
12188
  function registerDerivativeWithLicenseTokens(_x3) {
11113
12189
  return _registerDerivativeWithLicenseTokens.apply(this, arguments);
@@ -11149,9 +12225,9 @@ var IPAssetClient = /*#__PURE__*/function () {
11149
12225
  return isNFTRegistered;
11150
12226
  }()
11151
12227
  }, {
11152
- key: "isIpIdRegistered",
12228
+ key: "isRegistered",
11153
12229
  value: function () {
11154
- var _isIpIdRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ipId) {
12230
+ var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ipId) {
11155
12231
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11156
12232
  while (1) switch (_context5.prev = _context5.next) {
11157
12233
  case 0:
@@ -11167,10 +12243,10 @@ var IPAssetClient = /*#__PURE__*/function () {
11167
12243
  }
11168
12244
  }, _callee5, this);
11169
12245
  }));
11170
- function isIpIdRegistered(_x6) {
11171
- return _isIpIdRegistered.apply(this, arguments);
12246
+ function isRegistered(_x6) {
12247
+ return _isRegistered.apply(this, arguments);
11172
12248
  }
11173
- return isIpIdRegistered;
12249
+ return isRegistered;
11174
12250
  }()
11175
12251
  }]);
11176
12252
  }();
@@ -11272,22 +12348,22 @@ var PermissionClient = /*#__PURE__*/function () {
11272
12348
  }();
11273
12349
 
11274
12350
  var LicenseClient = /*#__PURE__*/function () {
11275
- function LicenseClient(rpcClient, wallet, storyClient) {
12351
+ function LicenseClient(rpcClient, wallet) {
11276
12352
  _classCallCheck(this, LicenseClient);
11277
- this.wallet = wallet;
11278
- this.rpcClient = rpcClient;
11279
- this.storyClient = storyClient;
11280
- this.licenseRegistryClient = new LicenseRegistryEventClient(this.rpcClient);
11281
- this.licenseTemplateClient = new PiLicenseTemplateClient(this.rpcClient, this.wallet);
11282
- this.licensingModuleClient = new LicensingModuleClient(this.rpcClient, this.wallet);
11283
- this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet);
11284
- this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(this.rpcClient);
12353
+ this.licensingModuleClient = new LicensingModuleClient(rpcClient, wallet);
12354
+ this.licenseRegistryClient = new LicenseRegistryEventClient(rpcClient);
12355
+ this.piLicenseTemplateReadOnlyClient = new PiLicenseTemplateReadOnlyClient(rpcClient);
12356
+ this.licenseTemplateClient = new PiLicenseTemplateClient(rpcClient, wallet);
12357
+ this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(rpcClient, wallet);
12358
+ this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(rpcClient);
11285
12359
  this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
12360
+ this.rpcClient = rpcClient;
12361
+ this.wallet = wallet;
11286
12362
  }
11287
12363
  /**
11288
12364
  * Convenient function to register a PIL non commercial social remix license to the registry
11289
- * @param request The request object that contains all data needed to register a PIL non commercial social remix license.
11290
- * @param request.txOptions [Optional] The transaction options.
12365
+ * @param request [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
12366
+ * @param request.txOptions [Optional] The transaction options.
11291
12367
  * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
11292
12368
  * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
11293
12369
  */
@@ -11336,7 +12412,7 @@ var LicenseClient = /*#__PURE__*/function () {
11336
12412
  });
11337
12413
  case 9:
11338
12414
  txHash = _context.sent;
11339
- if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
12415
+ if (!(request !== null && request !== void 0 && (_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
11340
12416
  _context.next = 18;
11341
12417
  break;
11342
12418
  }
@@ -11376,11 +12452,10 @@ var LicenseClient = /*#__PURE__*/function () {
11376
12452
  /**
11377
12453
  * Convenient function to register a PIL commercial use license to the registry.
11378
12454
  * @param request The request object that contains all data needed to register a PIL commercial use license.
11379
- * @param request.mintingFee The fee to be paid when minting a license.
11380
- * @param request.currency The ERC20 token to be used to pay the minting fee.
11381
- * the token must be registered in story protocol.
11382
- * @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
11383
- * @param request.txOptions [Optional] The transaction options.
12455
+ * @param request.mintingFee The fee to be paid when minting a license.
12456
+ * @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
12457
+ * @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
12458
+ * @param request.txOptions [Optional] The transaction options.
11384
12459
  * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
11385
12460
  * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
11386
12461
  */
@@ -11470,11 +12545,11 @@ var LicenseClient = /*#__PURE__*/function () {
11470
12545
  /**
11471
12546
  * Convenient function to register a PIL commercial Remix license to the registry.
11472
12547
  * @param request The request object that contains all data needed to register license.
11473
- * @param request.mintingFee The fee to be paid when minting a license.
11474
- * @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
11475
- * @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
11476
- * @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
11477
- * @param request.txOptions [Optional] The transaction options.
12548
+ * @param request.mintingFee The fee to be paid when minting a license.
12549
+ * @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
12550
+ * @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
12551
+ * @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
12552
+ * @param request.txOptions [Optional] The transaction options.
11478
12553
  * @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
11479
12554
  * @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
11480
12555
  */
@@ -11564,14 +12639,10 @@ var LicenseClient = /*#__PURE__*/function () {
11564
12639
  /**
11565
12640
  * Attaches license terms to an IP.
11566
12641
  * @param request The request object that contains all data needed to attach license terms.
11567
- @param request.ipId The IP ID.
11568
- @param request.tokenAddress The address of the NFT.
11569
- @param request.licenseTemplate The address of the license template.
11570
- @param request.licenseTermsId The ID of the license terms.
11571
- @param request.ipId The address of the IP to which the license terms are attached.
11572
- @param request.licenseTemplate The address of the license template.
11573
- @param request.licenseTermsId The ID of the license terms.
11574
- * @param request.txOptions [Optional] The transaction options.
12642
+ * @param request.ipId The address of the IP to which the license terms are attached.
12643
+ * @param request.licenseTemplate The address of the license template.
12644
+ * @param request.licenseTermsId The ID of the license terms.
12645
+ * @param request.txOptions [Optional] The transaction options.
11575
12646
  * @returns A Promise that resolves to an object containing the transaction hash.
11576
12647
  */
11577
12648
  )
@@ -11579,66 +12650,85 @@ var LicenseClient = /*#__PURE__*/function () {
11579
12650
  key: "attachLicenseTerms",
11580
12651
  value: (function () {
11581
12652
  var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
11582
- var _request$txOptions4;
11583
- var isRegistered, isAttachedLicenseTerms, txHash;
12653
+ var _request$txOptions4, isRegistered, isExisted, isAttachedLicenseTerms, txHash;
11584
12654
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
11585
12655
  while (1) switch (_context4.prev = _context4.next) {
11586
12656
  case 0:
11587
- _context4.next = 2;
12657
+ _context4.prev = 0;
12658
+ _context4.next = 3;
11588
12659
  return this.ipAssetRegistryClient.isRegistered({
11589
12660
  id: request.ipId
11590
12661
  });
11591
- case 2:
12662
+ case 3:
11592
12663
  isRegistered = _context4.sent;
11593
12664
  if (isRegistered) {
11594
- _context4.next = 5;
12665
+ _context4.next = 6;
11595
12666
  break;
11596
12667
  }
11597
- throw new Error("IP asset must be registered before attaching license terms");
11598
- case 5:
11599
- _context4.next = 7;
12668
+ throw new Error("The IP with id ".concat(request.ipId, " is not registered."));
12669
+ case 6:
12670
+ _context4.next = 8;
12671
+ return this.piLicenseTemplateReadOnlyClient.exists({
12672
+ licenseTermsId: BigInt(request.licenseTermsId)
12673
+ });
12674
+ case 8:
12675
+ isExisted = _context4.sent;
12676
+ if (isExisted) {
12677
+ _context4.next = 11;
12678
+ break;
12679
+ }
12680
+ throw new Error("License terms id ".concat(request.licenseTermsId, " do not exist."));
12681
+ case 11:
12682
+ _context4.next = 13;
11600
12683
  return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
11601
12684
  ipId: request.ipId,
11602
12685
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
11603
12686
  licenseTermsId: BigInt(request.licenseTermsId)
11604
12687
  });
11605
- case 7:
12688
+ case 13:
11606
12689
  isAttachedLicenseTerms = _context4.sent;
11607
12690
  if (!isAttachedLicenseTerms) {
11608
- _context4.next = 10;
12691
+ _context4.next = 16;
11609
12692
  break;
11610
12693
  }
11611
- throw new Error("License terms are already attached to the IP");
11612
- case 10:
11613
- _context4.next = 12;
12694
+ throw new Error("License terms id ".concat(request.licenseTermsId, " is already attached to the IP with id ").concat(request.ipId, "."));
12695
+ case 16:
12696
+ _context4.next = 18;
11614
12697
  return this.licensingModuleClient.attachLicenseTerms({
11615
12698
  ipId: request.ipId,
11616
12699
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
11617
12700
  licenseTermsId: BigInt(request.licenseTermsId)
11618
12701
  });
11619
- case 12:
12702
+ case 18:
11620
12703
  txHash = _context4.sent;
11621
12704
  if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
11622
- _context4.next = 19;
12705
+ _context4.next = 25;
11623
12706
  break;
11624
12707
  }
11625
- _context4.next = 16;
12708
+ _context4.next = 22;
11626
12709
  return this.rpcClient.waitForTransactionReceipt({
11627
12710
  hash: txHash
11628
12711
  });
11629
- case 16:
12712
+ case 22:
11630
12713
  return _context4.abrupt("return", {
11631
12714
  txHash: txHash
11632
12715
  });
11633
- case 19:
12716
+ case 25:
11634
12717
  return _context4.abrupt("return", {
11635
12718
  txHash: txHash
11636
12719
  });
11637
- case 20:
12720
+ case 26:
12721
+ _context4.next = 31;
12722
+ break;
12723
+ case 28:
12724
+ _context4.prev = 28;
12725
+ _context4.t0 = _context4["catch"](0);
12726
+ handleError(_context4.t0, "Failed to attach license terms");
12727
+ case 31:
11638
12728
  case "end":
11639
12729
  return _context4.stop();
11640
12730
  }
11641
- }, _callee4, this);
12731
+ }, _callee4, this, [[0, 28]]);
11642
12732
  }));
11643
12733
  function attachLicenseTerms(_x4) {
11644
12734
  return _attachLicenseTerms.apply(this, arguments);
@@ -11658,12 +12748,12 @@ var LicenseClient = /*#__PURE__*/function () {
11658
12748
  * IP owners can configure the minting fee of their IPs or
11659
12749
  * configure the minting fee module to determine the minting fee.
11660
12750
  * @param request The request object that contains all data needed to mint license tokens.
11661
- * @param request.licensorIpId The licensor IP ID.
11662
- * @param request.licenseTemplate The address of the license template.
11663
- * @param request.licenseTermsId The ID of the license terms within the license template.
11664
- * @param request.amount The amount of license tokens to mint.
11665
- * @param request.receiver The address of the receiver.
11666
- * @param request.txOptions [Optional] The transaction options.
12751
+ * @param request.licensorIpId The licensor IP ID.
12752
+ * @param request.licenseTemplate The address of the license template.
12753
+ * @param request.licenseTermsId The ID of the license terms within the license template.
12754
+ * @param request.amount The amount of license tokens to mint.
12755
+ * @param request.receiver The address of the receiver.
12756
+ * @param request.txOptions [Optional] The transaction options.
11667
12757
  * @returns A Promise that resolves to an object containing the transaction hash and optional license token ID if waitForTxn is set to true.
11668
12758
  * @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
11669
12759
  */
@@ -11672,26 +12762,50 @@ var LicenseClient = /*#__PURE__*/function () {
11672
12762
  key: "mintLicenseTokens",
11673
12763
  value: (function () {
11674
12764
  var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
11675
- var _request$txOptions5, isAttachedLicenseTerms, txHash, txReceipt, targetLogs;
12765
+ var _request$txOptions5, isLicenseIpIdRegistered, isExisted, isAttachedLicenseTerms, txHash, txReceipt, targetLogs;
11676
12766
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11677
12767
  while (1) switch (_context5.prev = _context5.next) {
11678
12768
  case 0:
11679
12769
  _context5.prev = 0;
11680
12770
  _context5.next = 3;
12771
+ return this.ipAssetRegistryClient.isRegistered({
12772
+ id: request.licensorIpId
12773
+ });
12774
+ case 3:
12775
+ isLicenseIpIdRegistered = _context5.sent;
12776
+ if (isLicenseIpIdRegistered) {
12777
+ _context5.next = 6;
12778
+ break;
12779
+ }
12780
+ throw new Error("The licensor IP with id ".concat(request.licensorIpId, " is not registered."));
12781
+ case 6:
12782
+ _context5.next = 8;
12783
+ return this.piLicenseTemplateReadOnlyClient.exists({
12784
+ licenseTermsId: BigInt(request.licenseTermsId)
12785
+ });
12786
+ case 8:
12787
+ isExisted = _context5.sent;
12788
+ if (isExisted) {
12789
+ _context5.next = 11;
12790
+ break;
12791
+ }
12792
+ throw new Error("License terms id ".concat(request.licenseTermsId, " do not exist."));
12793
+ case 11:
12794
+ _context5.next = 13;
11681
12795
  return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
11682
12796
  ipId: request.licensorIpId,
11683
12797
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
11684
12798
  licenseTermsId: BigInt(request.licenseTermsId)
11685
12799
  });
11686
- case 3:
12800
+ case 13:
11687
12801
  isAttachedLicenseTerms = _context5.sent;
11688
12802
  if (isAttachedLicenseTerms) {
11689
- _context5.next = 6;
12803
+ _context5.next = 16;
11690
12804
  break;
11691
12805
  }
11692
- throw new Error("License terms are not attached to the IP");
11693
- case 6:
11694
- _context5.next = 8;
12806
+ throw new Error("License terms id ".concat(request.licenseTermsId, " is not attached to the IP with id ").concat(request.licensorIpId, "."));
12807
+ case 16:
12808
+ _context5.next = 18;
11695
12809
  return this.licensingModuleClient.mintLicenseTokens({
11696
12810
  licensorIpId: request.licensorIpId,
11697
12811
  licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
@@ -11700,39 +12814,39 @@ var LicenseClient = /*#__PURE__*/function () {
11700
12814
  receiver: request.receiver || this.wallet.account.address,
11701
12815
  royaltyContext: viem.zeroAddress
11702
12816
  });
11703
- case 8:
12817
+ case 18:
11704
12818
  txHash = _context5.sent;
11705
12819
  if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.waitForTransaction)) {
11706
- _context5.next = 17;
12820
+ _context5.next = 27;
11707
12821
  break;
11708
12822
  }
11709
- _context5.next = 12;
12823
+ _context5.next = 22;
11710
12824
  return this.rpcClient.waitForTransactionReceipt({
11711
12825
  hash: txHash
11712
12826
  });
11713
- case 12:
12827
+ case 22:
11714
12828
  txReceipt = _context5.sent;
11715
12829
  targetLogs = this.licensingModuleClient.parseTxLicenseTokensMintedEvent(txReceipt);
11716
12830
  return _context5.abrupt("return", {
11717
12831
  txHash: txHash,
11718
12832
  licenseTokenId: targetLogs[0].startLicenseTokenId.toString()
11719
12833
  });
11720
- case 17:
12834
+ case 27:
11721
12835
  return _context5.abrupt("return", {
11722
12836
  txHash: txHash
11723
12837
  });
11724
- case 18:
11725
- _context5.next = 23;
12838
+ case 28:
12839
+ _context5.next = 33;
11726
12840
  break;
11727
- case 20:
11728
- _context5.prev = 20;
12841
+ case 30:
12842
+ _context5.prev = 30;
11729
12843
  _context5.t0 = _context5["catch"](0);
11730
12844
  handleError(_context5.t0, "Failed to mint license tokens");
11731
- case 23:
12845
+ case 33:
11732
12846
  case "end":
11733
12847
  return _context5.stop();
11734
12848
  }
11735
- }, _callee5, this, [[0, 20]]);
12849
+ }, _callee5, this, [[0, 30]]);
11736
12850
  }));
11737
12851
  function mintLicenseTokens(_x5) {
11738
12852
  return _mintLicenseTokens.apply(this, arguments);
@@ -12142,17 +13256,17 @@ var StoryAPIClient = /*#__PURE__*/function () {
12142
13256
  var RoyaltyClient = /*#__PURE__*/function () {
12143
13257
  function RoyaltyClient(rpcClient, wallet) {
12144
13258
  _classCallCheck(this, RoyaltyClient);
13259
+ this.royaltyPolicyLapClient = new RoyaltyPolicyLapClient(rpcClient, wallet);
13260
+ this.royaltyModuleClient = new RoyaltyModuleClient(rpcClient, wallet);
13261
+ this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
12145
13262
  this.rpcClient = rpcClient;
12146
13263
  this.wallet = wallet;
12147
- this.royaltyVaultImplClient = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet);
12148
- this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet);
12149
- this.royaltyModuleClient = new RoyaltyModuleClient(this.rpcClient, this.wallet);
12150
13264
  }
12151
13265
 
12152
13266
  /**
12153
13267
  * Allows ancestors to claim the royalty tokens and any accrued revenue tokens
12154
13268
  * @param request - The request object that contains all data needed to collect royalty tokens.
12155
- * @param request.ancestorIpId The ip id of the ancestor to whom the royalty tokens belong to.
13269
+ * @param request.parentIpId The ip id of the ancestor to whom the royalty tokens belong to.
12156
13270
  * @param request.royaltyVaultIpId The id of the royalty vault.
12157
13271
  * @param request.txOptions [Optional] The transaction options.
12158
13272
  * @returns A Promise that resolves to an object containing the transaction hash and optional the amount of royalty tokens collected if waitForTxn is set to true.
@@ -12162,53 +13276,65 @@ var RoyaltyClient = /*#__PURE__*/function () {
12162
13276
  key: "collectRoyaltyTokens",
12163
13277
  value: (function () {
12164
13278
  var _collectRoyaltyTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
12165
- var _request$txOptions, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
13279
+ var _request$txOptions, isParentIpIdRegistered, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
12166
13280
  return _regeneratorRuntime().wrap(function _callee$(_context) {
12167
13281
  while (1) switch (_context.prev = _context.next) {
12168
13282
  case 0:
12169
13283
  _context.prev = 0;
12170
13284
  _context.next = 3;
12171
- return this.getRoyaltyVaultProxyAddress(request.royaltyVaultIpId);
13285
+ return this.ipAssetRegistryClient.isRegistered({
13286
+ id: request.parentIpId
13287
+ });
12172
13288
  case 3:
13289
+ isParentIpIdRegistered = _context.sent;
13290
+ if (isParentIpIdRegistered) {
13291
+ _context.next = 6;
13292
+ break;
13293
+ }
13294
+ throw new Error("The parent IP with id ".concat(request.parentIpId, " is not registered."));
13295
+ case 6:
13296
+ _context.next = 8;
13297
+ return this.getRoyaltyVaultProxyAddress(request.royaltyVaultIpId);
13298
+ case 8:
12173
13299
  proxyAddress = _context.sent;
12174
13300
  ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
12175
- _context.next = 7;
13301
+ _context.next = 12;
12176
13302
  return ipRoyaltyVault.collectRoyaltyTokens({
12177
- ancestorIpId: request.ancestorIpId
13303
+ ancestorIpId: request.parentIpId
12178
13304
  });
12179
- case 7:
13305
+ case 12:
12180
13306
  txHash = _context.sent;
12181
13307
  if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
12182
- _context.next = 16;
13308
+ _context.next = 21;
12183
13309
  break;
12184
13310
  }
12185
- _context.next = 11;
13311
+ _context.next = 16;
12186
13312
  return this.rpcClient.waitForTransactionReceipt({
12187
13313
  hash: txHash
12188
13314
  });
12189
- case 11:
13315
+ case 16:
12190
13316
  txReceipt = _context.sent;
12191
13317
  targetLogs = ipRoyaltyVault.parseTxRoyaltyTokensCollectedEvent(txReceipt);
12192
13318
  return _context.abrupt("return", {
12193
13319
  txHash: txHash,
12194
13320
  royaltyTokensCollected: targetLogs[0].royaltyTokensCollected.toString()
12195
13321
  });
12196
- case 16:
13322
+ case 21:
12197
13323
  return _context.abrupt("return", {
12198
13324
  txHash: txHash
12199
13325
  });
12200
- case 17:
12201
- _context.next = 22;
13326
+ case 22:
13327
+ _context.next = 27;
12202
13328
  break;
12203
- case 19:
12204
- _context.prev = 19;
13329
+ case 24:
13330
+ _context.prev = 24;
12205
13331
  _context.t0 = _context["catch"](0);
12206
13332
  handleError(_context.t0, "Failed to collect royalty tokens");
12207
- case 22:
13333
+ case 27:
12208
13334
  case "end":
12209
13335
  return _context.stop();
12210
13336
  }
12211
- }, _callee, this, [[0, 19]]);
13337
+ }, _callee, this, [[0, 24]]);
12212
13338
  }));
12213
13339
  function collectRoyaltyTokens(_x) {
12214
13340
  return _collectRoyaltyTokens.apply(this, arguments);
@@ -12230,48 +13356,72 @@ var RoyaltyClient = /*#__PURE__*/function () {
12230
13356
  key: "payRoyaltyOnBehalf",
12231
13357
  value: (function () {
12232
13358
  var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
12233
- var _request$txOptions2, txHash;
13359
+ var _request$txOptions2, isReceiverRegistered, isPayerRegistered, txHash;
12234
13360
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
12235
13361
  while (1) switch (_context2.prev = _context2.next) {
12236
13362
  case 0:
12237
13363
  _context2.prev = 0;
12238
13364
  _context2.next = 3;
13365
+ return this.ipAssetRegistryClient.isRegistered({
13366
+ id: request.receiverIpId
13367
+ });
13368
+ case 3:
13369
+ isReceiverRegistered = _context2.sent;
13370
+ if (isReceiverRegistered) {
13371
+ _context2.next = 6;
13372
+ break;
13373
+ }
13374
+ throw new Error("The receiver IP with id ".concat(request.receiverIpId, " is not registered"));
13375
+ case 6:
13376
+ _context2.next = 8;
13377
+ return this.ipAssetRegistryClient.isRegistered({
13378
+ id: request.payerIpId
13379
+ });
13380
+ case 8:
13381
+ isPayerRegistered = _context2.sent;
13382
+ if (isPayerRegistered) {
13383
+ _context2.next = 11;
13384
+ break;
13385
+ }
13386
+ throw new Error("The payer IP with id ".concat(request.payerIpId, " is not registered"));
13387
+ case 11:
13388
+ _context2.next = 13;
12239
13389
  return this.royaltyModuleClient.payRoyaltyOnBehalf({
12240
13390
  receiverIpId: request.receiverIpId,
12241
13391
  payerIpId: request.payerIpId,
12242
13392
  token: request.token,
12243
13393
  amount: request.amount
12244
13394
  });
12245
- case 3:
13395
+ case 13:
12246
13396
  txHash = _context2.sent;
12247
13397
  if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
12248
- _context2.next = 10;
13398
+ _context2.next = 20;
12249
13399
  break;
12250
13400
  }
12251
- _context2.next = 7;
13401
+ _context2.next = 17;
12252
13402
  return this.rpcClient.waitForTransactionReceipt({
12253
13403
  hash: txHash
12254
13404
  });
12255
- case 7:
13405
+ case 17:
12256
13406
  return _context2.abrupt("return", {
12257
13407
  txHash: txHash
12258
13408
  });
12259
- case 10:
13409
+ case 20:
12260
13410
  return _context2.abrupt("return", {
12261
13411
  txHash: txHash
12262
13412
  });
12263
- case 11:
12264
- _context2.next = 16;
13413
+ case 21:
13414
+ _context2.next = 26;
12265
13415
  break;
12266
- case 13:
12267
- _context2.prev = 13;
13416
+ case 23:
13417
+ _context2.prev = 23;
12268
13418
  _context2.t0 = _context2["catch"](0);
12269
13419
  handleError(_context2.t0, "Failed to pay royalty on behalf");
12270
- case 16:
13420
+ case 26:
12271
13421
  case "end":
12272
13422
  return _context2.stop();
12273
13423
  }
12274
- }, _callee2, this, [[0, 13]]);
13424
+ }, _callee2, this, [[0, 23]]);
12275
13425
  }));
12276
13426
  function payRoyaltyOnBehalf(_x2) {
12277
13427
  return _payRoyaltyOnBehalf.apply(this, arguments);
@@ -12327,18 +13477,20 @@ var RoyaltyClient = /*#__PURE__*/function () {
12327
13477
  return claimableRevenue;
12328
13478
  }()
12329
13479
  /**
12330
- * Snapshots the claimable revenue and royalty token amounts.
12331
- * @param request - The request object that contains all data needed to snapshot.
13480
+ * Allows token holders to claim by a list of snapshot ids based on the token balance at certain snapshot
13481
+ * @param request - The request object that contains all data needed to claim revenue.
13482
+ * @param request.snapshotIds The list of snapshot ids.
12332
13483
  * @param request.royaltyVaultIpId The id of the royalty vault.
13484
+ * @param request.token The revenue token to claim.
12333
13485
  * @param request.txOptions [Optional] The transaction options.
12334
- * @returns A Promise that resolves to an object containing the transaction hash and optional snapshotId if waitForTxn is set to true.
12335
- * @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
13486
+ * @returns A Promise that resolves to an object containing the transaction hash and optional claimableToken if waitForTxn is set to true.
13487
+ * @emits RevenueTokenClaimed (claimer, token, amount).
12336
13488
  */
12337
13489
  )
12338
13490
  }, {
12339
- key: "snapshot",
13491
+ key: "claimRevenue",
12340
13492
  value: (function () {
12341
- var _snapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
13493
+ var _claimRevenue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
12342
13494
  var _request$txOptions3, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
12343
13495
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
12344
13496
  while (1) switch (_context4.prev = _context4.next) {
@@ -12350,7 +13502,12 @@ var RoyaltyClient = /*#__PURE__*/function () {
12350
13502
  proxyAddress = _context4.sent;
12351
13503
  ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
12352
13504
  _context4.next = 7;
12353
- return ipRoyaltyVault.snapshot();
13505
+ return ipRoyaltyVault.claimRevenueBySnapshotBatch({
13506
+ snapshotIds: request.snapshotIds.map(function (id) {
13507
+ return BigInt(id);
13508
+ }),
13509
+ token: request.token
13510
+ });
12354
13511
  case 7:
12355
13512
  txHash = _context4.sent;
12356
13513
  if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
@@ -12363,10 +13520,10 @@ var RoyaltyClient = /*#__PURE__*/function () {
12363
13520
  });
12364
13521
  case 11:
12365
13522
  txReceipt = _context4.sent;
12366
- targetLogs = ipRoyaltyVault.parseTxSnapshotCompletedEvent(txReceipt);
13523
+ targetLogs = ipRoyaltyVault.parseTxRevenueTokenClaimedEvent(txReceipt);
12367
13524
  return _context4.abrupt("return", {
12368
13525
  txHash: txHash,
12369
- snapshotId: targetLogs[0].snapshotId
13526
+ claimableToken: targetLogs[0].amount
12370
13527
  });
12371
13528
  case 16:
12372
13529
  return _context4.abrupt("return", {
@@ -12378,14 +13535,78 @@ var RoyaltyClient = /*#__PURE__*/function () {
12378
13535
  case 19:
12379
13536
  _context4.prev = 19;
12380
13537
  _context4.t0 = _context4["catch"](0);
12381
- handleError(_context4.t0, "Failed to snapshot");
13538
+ handleError(_context4.t0, "Failed to claim revenue");
12382
13539
  case 22:
12383
13540
  case "end":
12384
13541
  return _context4.stop();
12385
13542
  }
12386
13543
  }, _callee4, this, [[0, 19]]);
12387
13544
  }));
12388
- function snapshot(_x4) {
13545
+ function claimRevenue(_x4) {
13546
+ return _claimRevenue.apply(this, arguments);
13547
+ }
13548
+ return claimRevenue;
13549
+ }()
13550
+ /**
13551
+ * Snapshots the claimable revenue and royalty token amounts.
13552
+ * @param request - The request object that contains all data needed to snapshot.
13553
+ * @param request.royaltyVaultIpId The id of the royalty vault.
13554
+ * @param request.txOptions [Optional] The transaction options.
13555
+ * @returns A Promise that resolves to an object containing the transaction hash and optional snapshotId if waitForTxn is set to true.
13556
+ * @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
13557
+ */
13558
+ )
13559
+ }, {
13560
+ key: "snapshot",
13561
+ value: (function () {
13562
+ var _snapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
13563
+ var _request$txOptions4, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
13564
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
13565
+ while (1) switch (_context5.prev = _context5.next) {
13566
+ case 0:
13567
+ _context5.prev = 0;
13568
+ _context5.next = 3;
13569
+ return this.getRoyaltyVaultProxyAddress(request.royaltyVaultIpId);
13570
+ case 3:
13571
+ proxyAddress = _context5.sent;
13572
+ ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
13573
+ _context5.next = 7;
13574
+ return ipRoyaltyVault.snapshot();
13575
+ case 7:
13576
+ txHash = _context5.sent;
13577
+ if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
13578
+ _context5.next = 16;
13579
+ break;
13580
+ }
13581
+ _context5.next = 11;
13582
+ return this.rpcClient.waitForTransactionReceipt({
13583
+ hash: txHash
13584
+ });
13585
+ case 11:
13586
+ txReceipt = _context5.sent;
13587
+ targetLogs = ipRoyaltyVault.parseTxSnapshotCompletedEvent(txReceipt);
13588
+ return _context5.abrupt("return", {
13589
+ txHash: txHash,
13590
+ snapshotId: targetLogs[0].snapshotId
13591
+ });
13592
+ case 16:
13593
+ return _context5.abrupt("return", {
13594
+ txHash: txHash
13595
+ });
13596
+ case 17:
13597
+ _context5.next = 22;
13598
+ break;
13599
+ case 19:
13600
+ _context5.prev = 19;
13601
+ _context5.t0 = _context5["catch"](0);
13602
+ handleError(_context5.t0, "Failed to snapshot");
13603
+ case 22:
13604
+ case "end":
13605
+ return _context5.stop();
13606
+ }
13607
+ }, _callee5, this, [[0, 19]]);
13608
+ }));
13609
+ function snapshot(_x5) {
12389
13610
  return _snapshot.apply(this, arguments);
12390
13611
  }
12391
13612
  return snapshot;
@@ -12393,25 +13614,43 @@ var RoyaltyClient = /*#__PURE__*/function () {
12393
13614
  }, {
12394
13615
  key: "getRoyaltyVaultProxyAddress",
12395
13616
  value: function () {
12396
- var _getRoyaltyVaultProxyAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(royaltyVaultIpId) {
12397
- var data;
12398
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
12399
- while (1) switch (_context5.prev = _context5.next) {
13617
+ var _getRoyaltyVaultProxyAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(royaltyVaultIpId) {
13618
+ var isRoyaltyVaultIpIdRegistered, data;
13619
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
13620
+ while (1) switch (_context6.prev = _context6.next) {
12400
13621
  case 0:
12401
- _context5.next = 2;
12402
- return this.royaltyPolicyLAPClient.getRoyaltyData({
12403
- ipId: royaltyVaultIpId
13622
+ _context6.next = 2;
13623
+ return this.ipAssetRegistryClient.isRegistered({
13624
+ id: royaltyVaultIpId
12404
13625
  });
12405
13626
  case 2:
12406
- data = _context5.sent;
12407
- return _context5.abrupt("return", data[1]);
12408
- case 4:
13627
+ isRoyaltyVaultIpIdRegistered = _context6.sent;
13628
+ if (isRoyaltyVaultIpIdRegistered) {
13629
+ _context6.next = 5;
13630
+ break;
13631
+ }
13632
+ throw new Error("The royalty vault IP with id ".concat(royaltyVaultIpId, " is not registered."));
13633
+ case 5:
13634
+ _context6.next = 7;
13635
+ return this.royaltyPolicyLapClient.getRoyaltyData({
13636
+ ipId: royaltyVaultIpId
13637
+ });
13638
+ case 7:
13639
+ data = _context6.sent;
13640
+ if (!(!data[1] || data[1] === "0x")) {
13641
+ _context6.next = 10;
13642
+ break;
13643
+ }
13644
+ throw new Error("The royalty vault IP with id ".concat(royaltyVaultIpId, " address is not set."));
13645
+ case 10:
13646
+ return _context6.abrupt("return", data[1]);
13647
+ case 11:
12409
13648
  case "end":
12410
- return _context5.stop();
13649
+ return _context6.stop();
12411
13650
  }
12412
- }, _callee5, this);
13651
+ }, _callee6, this);
12413
13652
  }));
12414
- function getRoyaltyVaultProxyAddress(_x5) {
13653
+ function getRoyaltyVaultProxyAddress(_x6) {
12415
13654
  return _getRoyaltyVaultProxyAddress.apply(this, arguments);
12416
13655
  }
12417
13656
  return getRoyaltyVaultProxyAddress;
@@ -12507,7 +13746,7 @@ var StoryClient = /*#__PURE__*/function () {
12507
13746
  key: "license",
12508
13747
  get: function get() {
12509
13748
  if (this._license === null) {
12510
- this._license = new LicenseClient(this.rpcClient, this.wallet, this.storyClient);
13749
+ this._license = new LicenseClient(this.rpcClient, this.wallet);
12511
13750
  }
12512
13751
  return this._license;
12513
13752
  }