@story-protocol/core-sdk 1.0.0-rc.3 → 1.0.0-rc.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/abi/generated.d.ts +1875 -0
- package/dist/declarations/src/abi/generated.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +17 -16
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/license.d.ts +30 -36
- package/dist/declarations/src/resources/license.d.ts.map +1 -1
- package/dist/declarations/src/resources/royalty.d.ts +18 -7
- package/dist/declarations/src/resources/royalty.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/royalty.d.ts +11 -1
- package/dist/declarations/src/types/resources/royalty.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +1835 -596
- package/dist/story-protocol-core-sdk.cjs.prod.js +1835 -596
- package/dist/story-protocol-core-sdk.esm.js +1835 -596
- package/package.json +1 -1
- package/dist/declarations/src/clients/storyAPI.d.ts +0 -9
- package/dist/declarations/src/clients/storyAPI.d.ts.map +0 -1
@@ -4185,6 +4185,928 @@ var licenseRegistryAddress = {
|
|
4185
4185
|
1513: "0x0c3D467537FAd845a78728CEdc3D9447338c5422"
|
4186
4186
|
};
|
4187
4187
|
|
4188
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4189
|
+
// LicenseToken
|
4190
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4191
|
+
|
4192
|
+
/**
|
4193
|
+
*
|
4194
|
+
*/
|
4195
|
+
var licenseTokenAbi = [{
|
4196
|
+
type: "constructor",
|
4197
|
+
inputs: [],
|
4198
|
+
stateMutability: "nonpayable"
|
4199
|
+
}, {
|
4200
|
+
type: "error",
|
4201
|
+
inputs: [{
|
4202
|
+
name: "target",
|
4203
|
+
internalType: "address",
|
4204
|
+
type: "address"
|
4205
|
+
}],
|
4206
|
+
name: "AddressEmptyCode"
|
4207
|
+
}, {
|
4208
|
+
type: "error",
|
4209
|
+
inputs: [{
|
4210
|
+
name: "implementation",
|
4211
|
+
internalType: "address",
|
4212
|
+
type: "address"
|
4213
|
+
}],
|
4214
|
+
name: "ERC1967InvalidImplementation"
|
4215
|
+
}, {
|
4216
|
+
type: "error",
|
4217
|
+
inputs: [],
|
4218
|
+
name: "ERC1967NonPayable"
|
4219
|
+
}, {
|
4220
|
+
type: "error",
|
4221
|
+
inputs: [],
|
4222
|
+
name: "ERC721EnumerableForbiddenBatchMint"
|
4223
|
+
}, {
|
4224
|
+
type: "error",
|
4225
|
+
inputs: [{
|
4226
|
+
name: "sender",
|
4227
|
+
internalType: "address",
|
4228
|
+
type: "address"
|
4229
|
+
}, {
|
4230
|
+
name: "tokenId",
|
4231
|
+
internalType: "uint256",
|
4232
|
+
type: "uint256"
|
4233
|
+
}, {
|
4234
|
+
name: "owner",
|
4235
|
+
internalType: "address",
|
4236
|
+
type: "address"
|
4237
|
+
}],
|
4238
|
+
name: "ERC721IncorrectOwner"
|
4239
|
+
}, {
|
4240
|
+
type: "error",
|
4241
|
+
inputs: [{
|
4242
|
+
name: "operator",
|
4243
|
+
internalType: "address",
|
4244
|
+
type: "address"
|
4245
|
+
}, {
|
4246
|
+
name: "tokenId",
|
4247
|
+
internalType: "uint256",
|
4248
|
+
type: "uint256"
|
4249
|
+
}],
|
4250
|
+
name: "ERC721InsufficientApproval"
|
4251
|
+
}, {
|
4252
|
+
type: "error",
|
4253
|
+
inputs: [{
|
4254
|
+
name: "approver",
|
4255
|
+
internalType: "address",
|
4256
|
+
type: "address"
|
4257
|
+
}],
|
4258
|
+
name: "ERC721InvalidApprover"
|
4259
|
+
}, {
|
4260
|
+
type: "error",
|
4261
|
+
inputs: [{
|
4262
|
+
name: "operator",
|
4263
|
+
internalType: "address",
|
4264
|
+
type: "address"
|
4265
|
+
}],
|
4266
|
+
name: "ERC721InvalidOperator"
|
4267
|
+
}, {
|
4268
|
+
type: "error",
|
4269
|
+
inputs: [{
|
4270
|
+
name: "owner",
|
4271
|
+
internalType: "address",
|
4272
|
+
type: "address"
|
4273
|
+
}],
|
4274
|
+
name: "ERC721InvalidOwner"
|
4275
|
+
}, {
|
4276
|
+
type: "error",
|
4277
|
+
inputs: [{
|
4278
|
+
name: "receiver",
|
4279
|
+
internalType: "address",
|
4280
|
+
type: "address"
|
4281
|
+
}],
|
4282
|
+
name: "ERC721InvalidReceiver"
|
4283
|
+
}, {
|
4284
|
+
type: "error",
|
4285
|
+
inputs: [{
|
4286
|
+
name: "sender",
|
4287
|
+
internalType: "address",
|
4288
|
+
type: "address"
|
4289
|
+
}],
|
4290
|
+
name: "ERC721InvalidSender"
|
4291
|
+
}, {
|
4292
|
+
type: "error",
|
4293
|
+
inputs: [{
|
4294
|
+
name: "tokenId",
|
4295
|
+
internalType: "uint256",
|
4296
|
+
type: "uint256"
|
4297
|
+
}],
|
4298
|
+
name: "ERC721NonexistentToken"
|
4299
|
+
}, {
|
4300
|
+
type: "error",
|
4301
|
+
inputs: [{
|
4302
|
+
name: "owner",
|
4303
|
+
internalType: "address",
|
4304
|
+
type: "address"
|
4305
|
+
}, {
|
4306
|
+
name: "index",
|
4307
|
+
internalType: "uint256",
|
4308
|
+
type: "uint256"
|
4309
|
+
}],
|
4310
|
+
name: "ERC721OutOfBoundsIndex"
|
4311
|
+
}, {
|
4312
|
+
type: "error",
|
4313
|
+
inputs: [],
|
4314
|
+
name: "FailedInnerCall"
|
4315
|
+
}, {
|
4316
|
+
type: "error",
|
4317
|
+
inputs: [],
|
4318
|
+
name: "Governance__InconsistentState"
|
4319
|
+
}, {
|
4320
|
+
type: "error",
|
4321
|
+
inputs: [],
|
4322
|
+
name: "Governance__OnlyProtocolAdmin"
|
4323
|
+
}, {
|
4324
|
+
type: "error",
|
4325
|
+
inputs: [{
|
4326
|
+
name: "interfaceName",
|
4327
|
+
internalType: "string",
|
4328
|
+
type: "string"
|
4329
|
+
}],
|
4330
|
+
name: "Governance__UnsupportedInterface"
|
4331
|
+
}, {
|
4332
|
+
type: "error",
|
4333
|
+
inputs: [],
|
4334
|
+
name: "Governance__ZeroAddress"
|
4335
|
+
}, {
|
4336
|
+
type: "error",
|
4337
|
+
inputs: [],
|
4338
|
+
name: "InvalidInitialization"
|
4339
|
+
}, {
|
4340
|
+
type: "error",
|
4341
|
+
inputs: [{
|
4342
|
+
name: "licenseTemplate",
|
4343
|
+
internalType: "address",
|
4344
|
+
type: "address"
|
4345
|
+
}, {
|
4346
|
+
name: "anotherLicenseTemplate",
|
4347
|
+
internalType: "address",
|
4348
|
+
type: "address"
|
4349
|
+
}],
|
4350
|
+
name: "LicenseToken__AllLicenseTokensMustFromSameLicenseTemplate"
|
4351
|
+
}, {
|
4352
|
+
type: "error",
|
4353
|
+
inputs: [],
|
4354
|
+
name: "LicenseToken__CallerNotLicensingModule"
|
4355
|
+
}, {
|
4356
|
+
type: "error",
|
4357
|
+
inputs: [{
|
4358
|
+
name: "tokenId",
|
4359
|
+
internalType: "uint256",
|
4360
|
+
type: "uint256"
|
4361
|
+
}, {
|
4362
|
+
name: "expiredAt",
|
4363
|
+
internalType: "uint256",
|
4364
|
+
type: "uint256"
|
4365
|
+
}, {
|
4366
|
+
name: "currentTimestamp",
|
4367
|
+
internalType: "uint256",
|
4368
|
+
type: "uint256"
|
4369
|
+
}],
|
4370
|
+
name: "LicenseToken__LicenseTokenExpired"
|
4371
|
+
}, {
|
4372
|
+
type: "error",
|
4373
|
+
inputs: [{
|
4374
|
+
name: "tokenId",
|
4375
|
+
internalType: "uint256",
|
4376
|
+
type: "uint256"
|
4377
|
+
}, {
|
4378
|
+
name: "iPowner",
|
4379
|
+
internalType: "address",
|
4380
|
+
type: "address"
|
4381
|
+
}, {
|
4382
|
+
name: "tokenOwner",
|
4383
|
+
internalType: "address",
|
4384
|
+
type: "address"
|
4385
|
+
}],
|
4386
|
+
name: "LicenseToken__NotLicenseTokenOwner"
|
4387
|
+
}, {
|
4388
|
+
type: "error",
|
4389
|
+
inputs: [],
|
4390
|
+
name: "LicenseToken__NotTransferable"
|
4391
|
+
}, {
|
4392
|
+
type: "error",
|
4393
|
+
inputs: [{
|
4394
|
+
name: "tokenId",
|
4395
|
+
internalType: "uint256",
|
4396
|
+
type: "uint256"
|
4397
|
+
}],
|
4398
|
+
name: "LicenseToken__RevokedLicense"
|
4399
|
+
}, {
|
4400
|
+
type: "error",
|
4401
|
+
inputs: [],
|
4402
|
+
name: "LicenseToken__ZeroDisputeModule"
|
4403
|
+
}, {
|
4404
|
+
type: "error",
|
4405
|
+
inputs: [],
|
4406
|
+
name: "LicenseToken__ZeroLicensingModule"
|
4407
|
+
}, {
|
4408
|
+
type: "error",
|
4409
|
+
inputs: [],
|
4410
|
+
name: "NotInitializing"
|
4411
|
+
}, {
|
4412
|
+
type: "error",
|
4413
|
+
inputs: [{
|
4414
|
+
name: "value",
|
4415
|
+
internalType: "uint256",
|
4416
|
+
type: "uint256"
|
4417
|
+
}, {
|
4418
|
+
name: "length",
|
4419
|
+
internalType: "uint256",
|
4420
|
+
type: "uint256"
|
4421
|
+
}],
|
4422
|
+
name: "StringsInsufficientHexLength"
|
4423
|
+
}, {
|
4424
|
+
type: "error",
|
4425
|
+
inputs: [],
|
4426
|
+
name: "UUPSUnauthorizedCallContext"
|
4427
|
+
}, {
|
4428
|
+
type: "error",
|
4429
|
+
inputs: [{
|
4430
|
+
name: "slot",
|
4431
|
+
internalType: "bytes32",
|
4432
|
+
type: "bytes32"
|
4433
|
+
}],
|
4434
|
+
name: "UUPSUnsupportedProxiableUUID"
|
4435
|
+
}, {
|
4436
|
+
type: "event",
|
4437
|
+
anonymous: false,
|
4438
|
+
inputs: [{
|
4439
|
+
name: "owner",
|
4440
|
+
internalType: "address",
|
4441
|
+
type: "address",
|
4442
|
+
indexed: true
|
4443
|
+
}, {
|
4444
|
+
name: "approved",
|
4445
|
+
internalType: "address",
|
4446
|
+
type: "address",
|
4447
|
+
indexed: true
|
4448
|
+
}, {
|
4449
|
+
name: "tokenId",
|
4450
|
+
internalType: "uint256",
|
4451
|
+
type: "uint256",
|
4452
|
+
indexed: true
|
4453
|
+
}],
|
4454
|
+
name: "Approval"
|
4455
|
+
}, {
|
4456
|
+
type: "event",
|
4457
|
+
anonymous: false,
|
4458
|
+
inputs: [{
|
4459
|
+
name: "owner",
|
4460
|
+
internalType: "address",
|
4461
|
+
type: "address",
|
4462
|
+
indexed: true
|
4463
|
+
}, {
|
4464
|
+
name: "operator",
|
4465
|
+
internalType: "address",
|
4466
|
+
type: "address",
|
4467
|
+
indexed: true
|
4468
|
+
}, {
|
4469
|
+
name: "approved",
|
4470
|
+
internalType: "bool",
|
4471
|
+
type: "bool",
|
4472
|
+
indexed: false
|
4473
|
+
}],
|
4474
|
+
name: "ApprovalForAll"
|
4475
|
+
}, {
|
4476
|
+
type: "event",
|
4477
|
+
anonymous: false,
|
4478
|
+
inputs: [{
|
4479
|
+
name: "_fromTokenId",
|
4480
|
+
internalType: "uint256",
|
4481
|
+
type: "uint256",
|
4482
|
+
indexed: false
|
4483
|
+
}, {
|
4484
|
+
name: "_toTokenId",
|
4485
|
+
internalType: "uint256",
|
4486
|
+
type: "uint256",
|
4487
|
+
indexed: false
|
4488
|
+
}],
|
4489
|
+
name: "BatchMetadataUpdate"
|
4490
|
+
}, {
|
4491
|
+
type: "event",
|
4492
|
+
anonymous: false,
|
4493
|
+
inputs: [{
|
4494
|
+
name: "newGovernance",
|
4495
|
+
internalType: "address",
|
4496
|
+
type: "address",
|
4497
|
+
indexed: true
|
4498
|
+
}],
|
4499
|
+
name: "GovernanceUpdated"
|
4500
|
+
}, {
|
4501
|
+
type: "event",
|
4502
|
+
anonymous: false,
|
4503
|
+
inputs: [{
|
4504
|
+
name: "version",
|
4505
|
+
internalType: "uint64",
|
4506
|
+
type: "uint64",
|
4507
|
+
indexed: false
|
4508
|
+
}],
|
4509
|
+
name: "Initialized"
|
4510
|
+
}, {
|
4511
|
+
type: "event",
|
4512
|
+
anonymous: false,
|
4513
|
+
inputs: [{
|
4514
|
+
name: "minter",
|
4515
|
+
internalType: "address",
|
4516
|
+
type: "address",
|
4517
|
+
indexed: true
|
4518
|
+
}, {
|
4519
|
+
name: "receiver",
|
4520
|
+
internalType: "address",
|
4521
|
+
type: "address",
|
4522
|
+
indexed: true
|
4523
|
+
}, {
|
4524
|
+
name: "tokenId",
|
4525
|
+
internalType: "uint256",
|
4526
|
+
type: "uint256",
|
4527
|
+
indexed: true
|
4528
|
+
}],
|
4529
|
+
name: "LicenseTokenMinted"
|
4530
|
+
}, {
|
4531
|
+
type: "event",
|
4532
|
+
anonymous: false,
|
4533
|
+
inputs: [{
|
4534
|
+
name: "from",
|
4535
|
+
internalType: "address",
|
4536
|
+
type: "address",
|
4537
|
+
indexed: true
|
4538
|
+
}, {
|
4539
|
+
name: "to",
|
4540
|
+
internalType: "address",
|
4541
|
+
type: "address",
|
4542
|
+
indexed: true
|
4543
|
+
}, {
|
4544
|
+
name: "tokenId",
|
4545
|
+
internalType: "uint256",
|
4546
|
+
type: "uint256",
|
4547
|
+
indexed: true
|
4548
|
+
}],
|
4549
|
+
name: "Transfer"
|
4550
|
+
}, {
|
4551
|
+
type: "event",
|
4552
|
+
anonymous: false,
|
4553
|
+
inputs: [{
|
4554
|
+
name: "implementation",
|
4555
|
+
internalType: "address",
|
4556
|
+
type: "address",
|
4557
|
+
indexed: true
|
4558
|
+
}],
|
4559
|
+
name: "Upgraded"
|
4560
|
+
}, {
|
4561
|
+
type: "function",
|
4562
|
+
inputs: [],
|
4563
|
+
name: "UPGRADE_INTERFACE_VERSION",
|
4564
|
+
outputs: [{
|
4565
|
+
name: "",
|
4566
|
+
internalType: "string",
|
4567
|
+
type: "string"
|
4568
|
+
}],
|
4569
|
+
stateMutability: "view"
|
4570
|
+
}, {
|
4571
|
+
type: "function",
|
4572
|
+
inputs: [{
|
4573
|
+
name: "to",
|
4574
|
+
internalType: "address",
|
4575
|
+
type: "address"
|
4576
|
+
}, {
|
4577
|
+
name: "tokenId",
|
4578
|
+
internalType: "uint256",
|
4579
|
+
type: "uint256"
|
4580
|
+
}],
|
4581
|
+
name: "approve",
|
4582
|
+
outputs: [],
|
4583
|
+
stateMutability: "nonpayable"
|
4584
|
+
}, {
|
4585
|
+
type: "function",
|
4586
|
+
inputs: [{
|
4587
|
+
name: "owner",
|
4588
|
+
internalType: "address",
|
4589
|
+
type: "address"
|
4590
|
+
}],
|
4591
|
+
name: "balanceOf",
|
4592
|
+
outputs: [{
|
4593
|
+
name: "",
|
4594
|
+
internalType: "uint256",
|
4595
|
+
type: "uint256"
|
4596
|
+
}],
|
4597
|
+
stateMutability: "view"
|
4598
|
+
}, {
|
4599
|
+
type: "function",
|
4600
|
+
inputs: [{
|
4601
|
+
name: "holder",
|
4602
|
+
internalType: "address",
|
4603
|
+
type: "address"
|
4604
|
+
}, {
|
4605
|
+
name: "tokenIds",
|
4606
|
+
internalType: "uint256[]",
|
4607
|
+
type: "uint256[]"
|
4608
|
+
}],
|
4609
|
+
name: "burnLicenseTokens",
|
4610
|
+
outputs: [],
|
4611
|
+
stateMutability: "nonpayable"
|
4612
|
+
}, {
|
4613
|
+
type: "function",
|
4614
|
+
inputs: [{
|
4615
|
+
name: "tokenId",
|
4616
|
+
internalType: "uint256",
|
4617
|
+
type: "uint256"
|
4618
|
+
}],
|
4619
|
+
name: "getApproved",
|
4620
|
+
outputs: [{
|
4621
|
+
name: "",
|
4622
|
+
internalType: "address",
|
4623
|
+
type: "address"
|
4624
|
+
}],
|
4625
|
+
stateMutability: "view"
|
4626
|
+
}, {
|
4627
|
+
type: "function",
|
4628
|
+
inputs: [{
|
4629
|
+
name: "tokenId",
|
4630
|
+
internalType: "uint256",
|
4631
|
+
type: "uint256"
|
4632
|
+
}],
|
4633
|
+
name: "getExpirationTime",
|
4634
|
+
outputs: [{
|
4635
|
+
name: "",
|
4636
|
+
internalType: "uint256",
|
4637
|
+
type: "uint256"
|
4638
|
+
}],
|
4639
|
+
stateMutability: "view"
|
4640
|
+
}, {
|
4641
|
+
type: "function",
|
4642
|
+
inputs: [],
|
4643
|
+
name: "getGovernance",
|
4644
|
+
outputs: [{
|
4645
|
+
name: "",
|
4646
|
+
internalType: "address",
|
4647
|
+
type: "address"
|
4648
|
+
}],
|
4649
|
+
stateMutability: "view"
|
4650
|
+
}, {
|
4651
|
+
type: "function",
|
4652
|
+
inputs: [{
|
4653
|
+
name: "tokenId",
|
4654
|
+
internalType: "uint256",
|
4655
|
+
type: "uint256"
|
4656
|
+
}],
|
4657
|
+
name: "getLicenseTemplate",
|
4658
|
+
outputs: [{
|
4659
|
+
name: "",
|
4660
|
+
internalType: "address",
|
4661
|
+
type: "address"
|
4662
|
+
}],
|
4663
|
+
stateMutability: "view"
|
4664
|
+
}, {
|
4665
|
+
type: "function",
|
4666
|
+
inputs: [{
|
4667
|
+
name: "tokenId",
|
4668
|
+
internalType: "uint256",
|
4669
|
+
type: "uint256"
|
4670
|
+
}],
|
4671
|
+
name: "getLicenseTermsId",
|
4672
|
+
outputs: [{
|
4673
|
+
name: "",
|
4674
|
+
internalType: "uint256",
|
4675
|
+
type: "uint256"
|
4676
|
+
}],
|
4677
|
+
stateMutability: "view"
|
4678
|
+
}, {
|
4679
|
+
type: "function",
|
4680
|
+
inputs: [{
|
4681
|
+
name: "tokenId",
|
4682
|
+
internalType: "uint256",
|
4683
|
+
type: "uint256"
|
4684
|
+
}],
|
4685
|
+
name: "getLicenseTokenMetadata",
|
4686
|
+
outputs: [{
|
4687
|
+
name: "",
|
4688
|
+
internalType: "struct ILicenseToken.LicenseTokenMetadata",
|
4689
|
+
type: "tuple",
|
4690
|
+
components: [{
|
4691
|
+
name: "licensorIpId",
|
4692
|
+
internalType: "address",
|
4693
|
+
type: "address"
|
4694
|
+
}, {
|
4695
|
+
name: "licenseTemplate",
|
4696
|
+
internalType: "address",
|
4697
|
+
type: "address"
|
4698
|
+
}, {
|
4699
|
+
name: "licenseTermsId",
|
4700
|
+
internalType: "uint256",
|
4701
|
+
type: "uint256"
|
4702
|
+
}, {
|
4703
|
+
name: "transferable",
|
4704
|
+
internalType: "bool",
|
4705
|
+
type: "bool"
|
4706
|
+
}, {
|
4707
|
+
name: "mintedAt",
|
4708
|
+
internalType: "uint256",
|
4709
|
+
type: "uint256"
|
4710
|
+
}, {
|
4711
|
+
name: "expiresAt",
|
4712
|
+
internalType: "uint256",
|
4713
|
+
type: "uint256"
|
4714
|
+
}]
|
4715
|
+
}],
|
4716
|
+
stateMutability: "view"
|
4717
|
+
}, {
|
4718
|
+
type: "function",
|
4719
|
+
inputs: [{
|
4720
|
+
name: "tokenId",
|
4721
|
+
internalType: "uint256",
|
4722
|
+
type: "uint256"
|
4723
|
+
}],
|
4724
|
+
name: "getLicensorIpId",
|
4725
|
+
outputs: [{
|
4726
|
+
name: "",
|
4727
|
+
internalType: "address",
|
4728
|
+
type: "address"
|
4729
|
+
}],
|
4730
|
+
stateMutability: "view"
|
4731
|
+
}, {
|
4732
|
+
type: "function",
|
4733
|
+
inputs: [{
|
4734
|
+
name: "governance",
|
4735
|
+
internalType: "address",
|
4736
|
+
type: "address"
|
4737
|
+
}, {
|
4738
|
+
name: "imageUrl",
|
4739
|
+
internalType: "string",
|
4740
|
+
type: "string"
|
4741
|
+
}],
|
4742
|
+
name: "initialize",
|
4743
|
+
outputs: [],
|
4744
|
+
stateMutability: "nonpayable"
|
4745
|
+
}, {
|
4746
|
+
type: "function",
|
4747
|
+
inputs: [{
|
4748
|
+
name: "owner",
|
4749
|
+
internalType: "address",
|
4750
|
+
type: "address"
|
4751
|
+
}, {
|
4752
|
+
name: "operator",
|
4753
|
+
internalType: "address",
|
4754
|
+
type: "address"
|
4755
|
+
}],
|
4756
|
+
name: "isApprovedForAll",
|
4757
|
+
outputs: [{
|
4758
|
+
name: "",
|
4759
|
+
internalType: "bool",
|
4760
|
+
type: "bool"
|
4761
|
+
}],
|
4762
|
+
stateMutability: "view"
|
4763
|
+
}, {
|
4764
|
+
type: "function",
|
4765
|
+
inputs: [{
|
4766
|
+
name: "tokenId",
|
4767
|
+
internalType: "uint256",
|
4768
|
+
type: "uint256"
|
4769
|
+
}],
|
4770
|
+
name: "isLicenseTokenRevoked",
|
4771
|
+
outputs: [{
|
4772
|
+
name: "",
|
4773
|
+
internalType: "bool",
|
4774
|
+
type: "bool"
|
4775
|
+
}],
|
4776
|
+
stateMutability: "view"
|
4777
|
+
}, {
|
4778
|
+
type: "function",
|
4779
|
+
inputs: [],
|
4780
|
+
name: "licensingModule",
|
4781
|
+
outputs: [{
|
4782
|
+
name: "",
|
4783
|
+
internalType: "contract ILicensingModule",
|
4784
|
+
type: "address"
|
4785
|
+
}],
|
4786
|
+
stateMutability: "view"
|
4787
|
+
}, {
|
4788
|
+
type: "function",
|
4789
|
+
inputs: [{
|
4790
|
+
name: "licensorIpId",
|
4791
|
+
internalType: "address",
|
4792
|
+
type: "address"
|
4793
|
+
}, {
|
4794
|
+
name: "licenseTemplate",
|
4795
|
+
internalType: "address",
|
4796
|
+
type: "address"
|
4797
|
+
}, {
|
4798
|
+
name: "licenseTermsId",
|
4799
|
+
internalType: "uint256",
|
4800
|
+
type: "uint256"
|
4801
|
+
}, {
|
4802
|
+
name: "amount",
|
4803
|
+
internalType: "uint256",
|
4804
|
+
type: "uint256"
|
4805
|
+
}, {
|
4806
|
+
name: "minter",
|
4807
|
+
internalType: "address",
|
4808
|
+
type: "address"
|
4809
|
+
}, {
|
4810
|
+
name: "receiver",
|
4811
|
+
internalType: "address",
|
4812
|
+
type: "address"
|
4813
|
+
}],
|
4814
|
+
name: "mintLicenseTokens",
|
4815
|
+
outputs: [{
|
4816
|
+
name: "startLicenseTokenId",
|
4817
|
+
internalType: "uint256",
|
4818
|
+
type: "uint256"
|
4819
|
+
}],
|
4820
|
+
stateMutability: "nonpayable"
|
4821
|
+
}, {
|
4822
|
+
type: "function",
|
4823
|
+
inputs: [],
|
4824
|
+
name: "name",
|
4825
|
+
outputs: [{
|
4826
|
+
name: "",
|
4827
|
+
internalType: "string",
|
4828
|
+
type: "string"
|
4829
|
+
}],
|
4830
|
+
stateMutability: "view"
|
4831
|
+
}, {
|
4832
|
+
type: "function",
|
4833
|
+
inputs: [{
|
4834
|
+
name: "tokenId",
|
4835
|
+
internalType: "uint256",
|
4836
|
+
type: "uint256"
|
4837
|
+
}],
|
4838
|
+
name: "ownerOf",
|
4839
|
+
outputs: [{
|
4840
|
+
name: "",
|
4841
|
+
internalType: "address",
|
4842
|
+
type: "address"
|
4843
|
+
}],
|
4844
|
+
stateMutability: "view"
|
4845
|
+
}, {
|
4846
|
+
type: "function",
|
4847
|
+
inputs: [],
|
4848
|
+
name: "proxiableUUID",
|
4849
|
+
outputs: [{
|
4850
|
+
name: "",
|
4851
|
+
internalType: "bytes32",
|
4852
|
+
type: "bytes32"
|
4853
|
+
}],
|
4854
|
+
stateMutability: "view"
|
4855
|
+
}, {
|
4856
|
+
type: "function",
|
4857
|
+
inputs: [{
|
4858
|
+
name: "from",
|
4859
|
+
internalType: "address",
|
4860
|
+
type: "address"
|
4861
|
+
}, {
|
4862
|
+
name: "to",
|
4863
|
+
internalType: "address",
|
4864
|
+
type: "address"
|
4865
|
+
}, {
|
4866
|
+
name: "tokenId",
|
4867
|
+
internalType: "uint256",
|
4868
|
+
type: "uint256"
|
4869
|
+
}],
|
4870
|
+
name: "safeTransferFrom",
|
4871
|
+
outputs: [],
|
4872
|
+
stateMutability: "nonpayable"
|
4873
|
+
}, {
|
4874
|
+
type: "function",
|
4875
|
+
inputs: [{
|
4876
|
+
name: "from",
|
4877
|
+
internalType: "address",
|
4878
|
+
type: "address"
|
4879
|
+
}, {
|
4880
|
+
name: "to",
|
4881
|
+
internalType: "address",
|
4882
|
+
type: "address"
|
4883
|
+
}, {
|
4884
|
+
name: "tokenId",
|
4885
|
+
internalType: "uint256",
|
4886
|
+
type: "uint256"
|
4887
|
+
}, {
|
4888
|
+
name: "data",
|
4889
|
+
internalType: "bytes",
|
4890
|
+
type: "bytes"
|
4891
|
+
}],
|
4892
|
+
name: "safeTransferFrom",
|
4893
|
+
outputs: [],
|
4894
|
+
stateMutability: "nonpayable"
|
4895
|
+
}, {
|
4896
|
+
type: "function",
|
4897
|
+
inputs: [{
|
4898
|
+
name: "operator",
|
4899
|
+
internalType: "address",
|
4900
|
+
type: "address"
|
4901
|
+
}, {
|
4902
|
+
name: "approved",
|
4903
|
+
internalType: "bool",
|
4904
|
+
type: "bool"
|
4905
|
+
}],
|
4906
|
+
name: "setApprovalForAll",
|
4907
|
+
outputs: [],
|
4908
|
+
stateMutability: "nonpayable"
|
4909
|
+
}, {
|
4910
|
+
type: "function",
|
4911
|
+
inputs: [{
|
4912
|
+
name: "newDisputeModule",
|
4913
|
+
internalType: "address",
|
4914
|
+
type: "address"
|
4915
|
+
}],
|
4916
|
+
name: "setDisputeModule",
|
4917
|
+
outputs: [],
|
4918
|
+
stateMutability: "nonpayable"
|
4919
|
+
}, {
|
4920
|
+
type: "function",
|
4921
|
+
inputs: [{
|
4922
|
+
name: "newGovernance",
|
4923
|
+
internalType: "address",
|
4924
|
+
type: "address"
|
4925
|
+
}],
|
4926
|
+
name: "setGovernance",
|
4927
|
+
outputs: [],
|
4928
|
+
stateMutability: "nonpayable"
|
4929
|
+
}, {
|
4930
|
+
type: "function",
|
4931
|
+
inputs: [{
|
4932
|
+
name: "url",
|
4933
|
+
internalType: "string",
|
4934
|
+
type: "string"
|
4935
|
+
}],
|
4936
|
+
name: "setLicensingImageUrl",
|
4937
|
+
outputs: [],
|
4938
|
+
stateMutability: "nonpayable"
|
4939
|
+
}, {
|
4940
|
+
type: "function",
|
4941
|
+
inputs: [{
|
4942
|
+
name: "newLicensingModule",
|
4943
|
+
internalType: "address",
|
4944
|
+
type: "address"
|
4945
|
+
}],
|
4946
|
+
name: "setLicensingModule",
|
4947
|
+
outputs: [],
|
4948
|
+
stateMutability: "nonpayable"
|
4949
|
+
}, {
|
4950
|
+
type: "function",
|
4951
|
+
inputs: [{
|
4952
|
+
name: "interfaceId",
|
4953
|
+
internalType: "bytes4",
|
4954
|
+
type: "bytes4"
|
4955
|
+
}],
|
4956
|
+
name: "supportsInterface",
|
4957
|
+
outputs: [{
|
4958
|
+
name: "",
|
4959
|
+
internalType: "bool",
|
4960
|
+
type: "bool"
|
4961
|
+
}],
|
4962
|
+
stateMutability: "view"
|
4963
|
+
}, {
|
4964
|
+
type: "function",
|
4965
|
+
inputs: [],
|
4966
|
+
name: "symbol",
|
4967
|
+
outputs: [{
|
4968
|
+
name: "",
|
4969
|
+
internalType: "string",
|
4970
|
+
type: "string"
|
4971
|
+
}],
|
4972
|
+
stateMutability: "view"
|
4973
|
+
}, {
|
4974
|
+
type: "function",
|
4975
|
+
inputs: [{
|
4976
|
+
name: "index",
|
4977
|
+
internalType: "uint256",
|
4978
|
+
type: "uint256"
|
4979
|
+
}],
|
4980
|
+
name: "tokenByIndex",
|
4981
|
+
outputs: [{
|
4982
|
+
name: "",
|
4983
|
+
internalType: "uint256",
|
4984
|
+
type: "uint256"
|
4985
|
+
}],
|
4986
|
+
stateMutability: "view"
|
4987
|
+
}, {
|
4988
|
+
type: "function",
|
4989
|
+
inputs: [{
|
4990
|
+
name: "owner",
|
4991
|
+
internalType: "address",
|
4992
|
+
type: "address"
|
4993
|
+
}, {
|
4994
|
+
name: "index",
|
4995
|
+
internalType: "uint256",
|
4996
|
+
type: "uint256"
|
4997
|
+
}],
|
4998
|
+
name: "tokenOfOwnerByIndex",
|
4999
|
+
outputs: [{
|
5000
|
+
name: "",
|
5001
|
+
internalType: "uint256",
|
5002
|
+
type: "uint256"
|
5003
|
+
}],
|
5004
|
+
stateMutability: "view"
|
5005
|
+
}, {
|
5006
|
+
type: "function",
|
5007
|
+
inputs: [{
|
5008
|
+
name: "id",
|
5009
|
+
internalType: "uint256",
|
5010
|
+
type: "uint256"
|
5011
|
+
}],
|
5012
|
+
name: "tokenURI",
|
5013
|
+
outputs: [{
|
5014
|
+
name: "",
|
5015
|
+
internalType: "string",
|
5016
|
+
type: "string"
|
5017
|
+
}],
|
5018
|
+
stateMutability: "view"
|
5019
|
+
}, {
|
5020
|
+
type: "function",
|
5021
|
+
inputs: [],
|
5022
|
+
name: "totalMintedTokens",
|
5023
|
+
outputs: [{
|
5024
|
+
name: "",
|
5025
|
+
internalType: "uint256",
|
5026
|
+
type: "uint256"
|
5027
|
+
}],
|
5028
|
+
stateMutability: "view"
|
5029
|
+
}, {
|
5030
|
+
type: "function",
|
5031
|
+
inputs: [],
|
5032
|
+
name: "totalSupply",
|
5033
|
+
outputs: [{
|
5034
|
+
name: "",
|
5035
|
+
internalType: "uint256",
|
5036
|
+
type: "uint256"
|
5037
|
+
}],
|
5038
|
+
stateMutability: "view"
|
5039
|
+
}, {
|
5040
|
+
type: "function",
|
5041
|
+
inputs: [{
|
5042
|
+
name: "from",
|
5043
|
+
internalType: "address",
|
5044
|
+
type: "address"
|
5045
|
+
}, {
|
5046
|
+
name: "to",
|
5047
|
+
internalType: "address",
|
5048
|
+
type: "address"
|
5049
|
+
}, {
|
5050
|
+
name: "tokenId",
|
5051
|
+
internalType: "uint256",
|
5052
|
+
type: "uint256"
|
5053
|
+
}],
|
5054
|
+
name: "transferFrom",
|
5055
|
+
outputs: [],
|
5056
|
+
stateMutability: "nonpayable"
|
5057
|
+
}, {
|
5058
|
+
type: "function",
|
5059
|
+
inputs: [{
|
5060
|
+
name: "newImplementation",
|
5061
|
+
internalType: "address",
|
5062
|
+
type: "address"
|
5063
|
+
}, {
|
5064
|
+
name: "data",
|
5065
|
+
internalType: "bytes",
|
5066
|
+
type: "bytes"
|
5067
|
+
}],
|
5068
|
+
name: "upgradeToAndCall",
|
5069
|
+
outputs: [],
|
5070
|
+
stateMutability: "payable"
|
5071
|
+
}, {
|
5072
|
+
type: "function",
|
5073
|
+
inputs: [{
|
5074
|
+
name: "childIpId",
|
5075
|
+
internalType: "address",
|
5076
|
+
type: "address"
|
5077
|
+
}, {
|
5078
|
+
name: "childIpOwner",
|
5079
|
+
internalType: "address",
|
5080
|
+
type: "address"
|
5081
|
+
}, {
|
5082
|
+
name: "tokenIds",
|
5083
|
+
internalType: "uint256[]",
|
5084
|
+
type: "uint256[]"
|
5085
|
+
}],
|
5086
|
+
name: "validateLicenseTokensForDerivative",
|
5087
|
+
outputs: [{
|
5088
|
+
name: "licenseTemplate",
|
5089
|
+
internalType: "address",
|
5090
|
+
type: "address"
|
5091
|
+
}, {
|
5092
|
+
name: "licensorIpIds",
|
5093
|
+
internalType: "address[]",
|
5094
|
+
type: "address[]"
|
5095
|
+
}, {
|
5096
|
+
name: "licenseTermsIds",
|
5097
|
+
internalType: "uint256[]",
|
5098
|
+
type: "uint256[]"
|
5099
|
+
}],
|
5100
|
+
stateMutability: "view"
|
5101
|
+
}];
|
5102
|
+
|
5103
|
+
/**
|
5104
|
+
*
|
5105
|
+
*/
|
5106
|
+
var licenseTokenAddress = {
|
5107
|
+
1513: "0xD40b7bCA204f96a346021e31c9ad54FF495226e7"
|
5108
|
+
};
|
5109
|
+
|
4188
5110
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4189
5111
|
// LicensingModule
|
4190
5112
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -7304,6 +8226,14 @@ var IpAssetRegistryClient = /*#__PURE__*/function (_IpAssetRegistryReadO) {
|
|
7304
8226
|
|
7305
8227
|
// Contract IpRoyaltyVaultImpl =============================================================
|
7306
8228
|
|
8229
|
+
/**
|
8230
|
+
* IpRoyaltyVaultImplRevenueTokenClaimedEvent
|
8231
|
+
*
|
8232
|
+
* @param claimer address
|
8233
|
+
* @param token address
|
8234
|
+
* @param amount uint256
|
8235
|
+
*/
|
8236
|
+
|
7307
8237
|
/**
|
7308
8238
|
* IpRoyaltyVaultImplRoyaltyTokensCollectedEvent
|
7309
8239
|
*
|
@@ -7359,15 +8289,15 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7359
8289
|
}
|
7360
8290
|
|
7361
8291
|
/**
|
7362
|
-
* event
|
8292
|
+
* event RevenueTokenClaimed for contract IpRoyaltyVaultImpl
|
7363
8293
|
*/
|
7364
8294
|
return _createClass(IpRoyaltyVaultImplEventClient, [{
|
7365
|
-
key: "
|
7366
|
-
value: function
|
8295
|
+
key: "watchRevenueTokenClaimedEvent",
|
8296
|
+
value: function watchRevenueTokenClaimedEvent(_onLogs6) {
|
7367
8297
|
return this.rpcClient.watchContractEvent({
|
7368
8298
|
abi: ipRoyaltyVaultImplAbi,
|
7369
8299
|
address: this.address,
|
7370
|
-
eventName: "
|
8300
|
+
eventName: "RevenueTokenClaimed",
|
7371
8301
|
onLogs: function onLogs(evs) {
|
7372
8302
|
evs.forEach(function (it) {
|
7373
8303
|
return _onLogs6(it.transactionHash, it.args);
|
@@ -7377,11 +8307,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7377
8307
|
}
|
7378
8308
|
|
7379
8309
|
/**
|
7380
|
-
* parse tx receipt event
|
8310
|
+
* parse tx receipt event RevenueTokenClaimed for contract IpRoyaltyVaultImpl
|
7381
8311
|
*/
|
7382
8312
|
}, {
|
7383
|
-
key: "
|
7384
|
-
value: function
|
8313
|
+
key: "parseTxRevenueTokenClaimedEvent",
|
8314
|
+
value: function parseTxRevenueTokenClaimedEvent(txReceipt) {
|
7385
8315
|
var targetLogs = [];
|
7386
8316
|
var _iterator6 = _createForOfIteratorHelper(txReceipt.logs),
|
7387
8317
|
_step6;
|
@@ -7391,11 +8321,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7391
8321
|
try {
|
7392
8322
|
var event = decodeEventLog({
|
7393
8323
|
abi: ipRoyaltyVaultImplAbi,
|
7394
|
-
eventName: "
|
8324
|
+
eventName: "RevenueTokenClaimed",
|
7395
8325
|
data: log.data,
|
7396
8326
|
topics: log.topics
|
7397
8327
|
});
|
7398
|
-
if (event.eventName === "
|
8328
|
+
if (event.eventName === "RevenueTokenClaimed") {
|
7399
8329
|
targetLogs.push(event.args);
|
7400
8330
|
}
|
7401
8331
|
} catch (e) {
|
@@ -7410,19 +8340,71 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7410
8340
|
return targetLogs;
|
7411
8341
|
}
|
7412
8342
|
|
8343
|
+
/**
|
8344
|
+
* event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
|
8345
|
+
*/
|
8346
|
+
}, {
|
8347
|
+
key: "watchRoyaltyTokensCollectedEvent",
|
8348
|
+
value: function watchRoyaltyTokensCollectedEvent(_onLogs7) {
|
8349
|
+
return this.rpcClient.watchContractEvent({
|
8350
|
+
abi: ipRoyaltyVaultImplAbi,
|
8351
|
+
address: this.address,
|
8352
|
+
eventName: "RoyaltyTokensCollected",
|
8353
|
+
onLogs: function onLogs(evs) {
|
8354
|
+
evs.forEach(function (it) {
|
8355
|
+
return _onLogs7(it.transactionHash, it.args);
|
8356
|
+
});
|
8357
|
+
}
|
8358
|
+
});
|
8359
|
+
}
|
8360
|
+
|
8361
|
+
/**
|
8362
|
+
* parse tx receipt event RoyaltyTokensCollected for contract IpRoyaltyVaultImpl
|
8363
|
+
*/
|
8364
|
+
}, {
|
8365
|
+
key: "parseTxRoyaltyTokensCollectedEvent",
|
8366
|
+
value: function parseTxRoyaltyTokensCollectedEvent(txReceipt) {
|
8367
|
+
var targetLogs = [];
|
8368
|
+
var _iterator7 = _createForOfIteratorHelper(txReceipt.logs),
|
8369
|
+
_step7;
|
8370
|
+
try {
|
8371
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
8372
|
+
var log = _step7.value;
|
8373
|
+
try {
|
8374
|
+
var event = decodeEventLog({
|
8375
|
+
abi: ipRoyaltyVaultImplAbi,
|
8376
|
+
eventName: "RoyaltyTokensCollected",
|
8377
|
+
data: log.data,
|
8378
|
+
topics: log.topics
|
8379
|
+
});
|
8380
|
+
if (event.eventName === "RoyaltyTokensCollected") {
|
8381
|
+
targetLogs.push(event.args);
|
8382
|
+
}
|
8383
|
+
} catch (e) {
|
8384
|
+
/* empty */
|
8385
|
+
}
|
8386
|
+
}
|
8387
|
+
} catch (err) {
|
8388
|
+
_iterator7.e(err);
|
8389
|
+
} finally {
|
8390
|
+
_iterator7.f();
|
8391
|
+
}
|
8392
|
+
return targetLogs;
|
8393
|
+
}
|
8394
|
+
|
7413
8395
|
/**
|
7414
8396
|
* event SnapshotCompleted for contract IpRoyaltyVaultImpl
|
7415
8397
|
*/
|
7416
8398
|
}, {
|
7417
8399
|
key: "watchSnapshotCompletedEvent",
|
7418
|
-
value: function watchSnapshotCompletedEvent(
|
8400
|
+
value: function watchSnapshotCompletedEvent(_onLogs8) {
|
7419
8401
|
return this.rpcClient.watchContractEvent({
|
7420
8402
|
abi: ipRoyaltyVaultImplAbi,
|
7421
8403
|
address: this.address,
|
7422
8404
|
eventName: "SnapshotCompleted",
|
7423
8405
|
onLogs: function onLogs(evs) {
|
7424
8406
|
evs.forEach(function (it) {
|
7425
|
-
return
|
8407
|
+
return _onLogs8(it.transactionHash, it.args);
|
7426
8408
|
});
|
7427
8409
|
}
|
7428
8410
|
});
|
@@ -7435,11 +8417,11 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7435
8417
|
key: "parseTxSnapshotCompletedEvent",
|
7436
8418
|
value: function parseTxSnapshotCompletedEvent(txReceipt) {
|
7437
8419
|
var targetLogs = [];
|
7438
|
-
var
|
7439
|
-
|
8420
|
+
var _iterator8 = _createForOfIteratorHelper(txReceipt.logs),
|
8421
|
+
_step8;
|
7440
8422
|
try {
|
7441
|
-
for (
|
7442
|
-
var log =
|
8423
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
8424
|
+
var log = _step8.value;
|
7443
8425
|
try {
|
7444
8426
|
var event = decodeEventLog({
|
7445
8427
|
abi: ipRoyaltyVaultImplAbi,
|
@@ -7455,9 +8437,9 @@ var IpRoyaltyVaultImplEventClient = /*#__PURE__*/function () {
|
|
7455
8437
|
}
|
7456
8438
|
}
|
7457
8439
|
} catch (err) {
|
7458
|
-
|
8440
|
+
_iterator8.e(err);
|
7459
8441
|
} finally {
|
7460
|
-
|
8442
|
+
_iterator8.f();
|
7461
8443
|
}
|
7462
8444
|
return targetLogs;
|
7463
8445
|
}
|
@@ -7990,14 +8972,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
7990
8972
|
*/
|
7991
8973
|
return _createClass(LicenseRegistryEventClient, [{
|
7992
8974
|
key: "watchExpirationTimeSetEvent",
|
7993
|
-
value: function watchExpirationTimeSetEvent(
|
8975
|
+
value: function watchExpirationTimeSetEvent(_onLogs9) {
|
7994
8976
|
return this.rpcClient.watchContractEvent({
|
7995
8977
|
abi: licenseRegistryAbi,
|
7996
8978
|
address: this.address,
|
7997
8979
|
eventName: "ExpirationTimeSet",
|
7998
8980
|
onLogs: function onLogs(evs) {
|
7999
8981
|
evs.forEach(function (it) {
|
8000
|
-
return
|
8982
|
+
return _onLogs9(it.transactionHash, it.args);
|
8001
8983
|
});
|
8002
8984
|
}
|
8003
8985
|
});
|
@@ -8010,11 +8992,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8010
8992
|
key: "parseTxExpirationTimeSetEvent",
|
8011
8993
|
value: function parseTxExpirationTimeSetEvent(txReceipt) {
|
8012
8994
|
var targetLogs = [];
|
8013
|
-
var
|
8014
|
-
|
8995
|
+
var _iterator9 = _createForOfIteratorHelper(txReceipt.logs),
|
8996
|
+
_step9;
|
8015
8997
|
try {
|
8016
|
-
for (
|
8017
|
-
var log =
|
8998
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
8999
|
+
var log = _step9.value;
|
8018
9000
|
try {
|
8019
9001
|
var event = decodeEventLog({
|
8020
9002
|
abi: licenseRegistryAbi,
|
@@ -8030,9 +9012,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8030
9012
|
}
|
8031
9013
|
}
|
8032
9014
|
} catch (err) {
|
8033
|
-
|
9015
|
+
_iterator9.e(err);
|
8034
9016
|
} finally {
|
8035
|
-
|
9017
|
+
_iterator9.f();
|
8036
9018
|
}
|
8037
9019
|
return targetLogs;
|
8038
9020
|
}
|
@@ -8042,14 +9024,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8042
9024
|
*/
|
8043
9025
|
}, {
|
8044
9026
|
key: "watchGovernanceUpdatedEvent",
|
8045
|
-
value: function watchGovernanceUpdatedEvent(
|
9027
|
+
value: function watchGovernanceUpdatedEvent(_onLogs10) {
|
8046
9028
|
return this.rpcClient.watchContractEvent({
|
8047
9029
|
abi: licenseRegistryAbi,
|
8048
9030
|
address: this.address,
|
8049
9031
|
eventName: "GovernanceUpdated",
|
8050
9032
|
onLogs: function onLogs(evs) {
|
8051
9033
|
evs.forEach(function (it) {
|
8052
|
-
return
|
9034
|
+
return _onLogs10(it.transactionHash, it.args);
|
8053
9035
|
});
|
8054
9036
|
}
|
8055
9037
|
});
|
@@ -8062,11 +9044,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8062
9044
|
key: "parseTxGovernanceUpdatedEvent",
|
8063
9045
|
value: function parseTxGovernanceUpdatedEvent(txReceipt) {
|
8064
9046
|
var targetLogs = [];
|
8065
|
-
var
|
8066
|
-
|
9047
|
+
var _iterator10 = _createForOfIteratorHelper(txReceipt.logs),
|
9048
|
+
_step10;
|
8067
9049
|
try {
|
8068
|
-
for (
|
8069
|
-
var log =
|
9050
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
9051
|
+
var log = _step10.value;
|
8070
9052
|
try {
|
8071
9053
|
var event = decodeEventLog({
|
8072
9054
|
abi: licenseRegistryAbi,
|
@@ -8082,9 +9064,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8082
9064
|
}
|
8083
9065
|
}
|
8084
9066
|
} catch (err) {
|
8085
|
-
|
9067
|
+
_iterator10.e(err);
|
8086
9068
|
} finally {
|
8087
|
-
|
9069
|
+
_iterator10.f();
|
8088
9070
|
}
|
8089
9071
|
return targetLogs;
|
8090
9072
|
}
|
@@ -8094,14 +9076,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8094
9076
|
*/
|
8095
9077
|
}, {
|
8096
9078
|
key: "watchInitializedEvent",
|
8097
|
-
value: function watchInitializedEvent(
|
9079
|
+
value: function watchInitializedEvent(_onLogs11) {
|
8098
9080
|
return this.rpcClient.watchContractEvent({
|
8099
9081
|
abi: licenseRegistryAbi,
|
8100
9082
|
address: this.address,
|
8101
9083
|
eventName: "Initialized",
|
8102
9084
|
onLogs: function onLogs(evs) {
|
8103
9085
|
evs.forEach(function (it) {
|
8104
|
-
return
|
9086
|
+
return _onLogs11(it.transactionHash, it.args);
|
8105
9087
|
});
|
8106
9088
|
}
|
8107
9089
|
});
|
@@ -8114,11 +9096,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8114
9096
|
key: "parseTxInitializedEvent",
|
8115
9097
|
value: function parseTxInitializedEvent(txReceipt) {
|
8116
9098
|
var targetLogs = [];
|
8117
|
-
var
|
8118
|
-
|
9099
|
+
var _iterator11 = _createForOfIteratorHelper(txReceipt.logs),
|
9100
|
+
_step11;
|
8119
9101
|
try {
|
8120
|
-
for (
|
8121
|
-
var log =
|
9102
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
|
9103
|
+
var log = _step11.value;
|
8122
9104
|
try {
|
8123
9105
|
var event = decodeEventLog({
|
8124
9106
|
abi: licenseRegistryAbi,
|
@@ -8134,9 +9116,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8134
9116
|
}
|
8135
9117
|
}
|
8136
9118
|
} catch (err) {
|
8137
|
-
|
9119
|
+
_iterator11.e(err);
|
8138
9120
|
} finally {
|
8139
|
-
|
9121
|
+
_iterator11.f();
|
8140
9122
|
}
|
8141
9123
|
return targetLogs;
|
8142
9124
|
}
|
@@ -8146,14 +9128,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8146
9128
|
*/
|
8147
9129
|
}, {
|
8148
9130
|
key: "watchLicenseTemplateRegisteredEvent",
|
8149
|
-
value: function watchLicenseTemplateRegisteredEvent(
|
9131
|
+
value: function watchLicenseTemplateRegisteredEvent(_onLogs12) {
|
8150
9132
|
return this.rpcClient.watchContractEvent({
|
8151
9133
|
abi: licenseRegistryAbi,
|
8152
9134
|
address: this.address,
|
8153
9135
|
eventName: "LicenseTemplateRegistered",
|
8154
9136
|
onLogs: function onLogs(evs) {
|
8155
9137
|
evs.forEach(function (it) {
|
8156
|
-
return
|
9138
|
+
return _onLogs12(it.transactionHash, it.args);
|
8157
9139
|
});
|
8158
9140
|
}
|
8159
9141
|
});
|
@@ -8166,11 +9148,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8166
9148
|
key: "parseTxLicenseTemplateRegisteredEvent",
|
8167
9149
|
value: function parseTxLicenseTemplateRegisteredEvent(txReceipt) {
|
8168
9150
|
var targetLogs = [];
|
8169
|
-
var
|
8170
|
-
|
9151
|
+
var _iterator12 = _createForOfIteratorHelper(txReceipt.logs),
|
9152
|
+
_step12;
|
8171
9153
|
try {
|
8172
|
-
for (
|
8173
|
-
var log =
|
9154
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
9155
|
+
var log = _step12.value;
|
8174
9156
|
try {
|
8175
9157
|
var event = decodeEventLog({
|
8176
9158
|
abi: licenseRegistryAbi,
|
@@ -8186,9 +9168,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8186
9168
|
}
|
8187
9169
|
}
|
8188
9170
|
} catch (err) {
|
8189
|
-
|
9171
|
+
_iterator12.e(err);
|
8190
9172
|
} finally {
|
8191
|
-
|
9173
|
+
_iterator12.f();
|
8192
9174
|
}
|
8193
9175
|
return targetLogs;
|
8194
9176
|
}
|
@@ -8198,14 +9180,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8198
9180
|
*/
|
8199
9181
|
}, {
|
8200
9182
|
key: "watchMintingLicenseConfigSetForIpEvent",
|
8201
|
-
value: function watchMintingLicenseConfigSetForIpEvent(
|
9183
|
+
value: function watchMintingLicenseConfigSetForIpEvent(_onLogs13) {
|
8202
9184
|
return this.rpcClient.watchContractEvent({
|
8203
9185
|
abi: licenseRegistryAbi,
|
8204
9186
|
address: this.address,
|
8205
9187
|
eventName: "MintingLicenseConfigSetForIP",
|
8206
9188
|
onLogs: function onLogs(evs) {
|
8207
9189
|
evs.forEach(function (it) {
|
8208
|
-
return
|
9190
|
+
return _onLogs13(it.transactionHash, it.args);
|
8209
9191
|
});
|
8210
9192
|
}
|
8211
9193
|
});
|
@@ -8218,11 +9200,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8218
9200
|
key: "parseTxMintingLicenseConfigSetForIpEvent",
|
8219
9201
|
value: function parseTxMintingLicenseConfigSetForIpEvent(txReceipt) {
|
8220
9202
|
var targetLogs = [];
|
8221
|
-
var
|
8222
|
-
|
9203
|
+
var _iterator13 = _createForOfIteratorHelper(txReceipt.logs),
|
9204
|
+
_step13;
|
8223
9205
|
try {
|
8224
|
-
for (
|
8225
|
-
var log =
|
9206
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
|
9207
|
+
var log = _step13.value;
|
8226
9208
|
try {
|
8227
9209
|
var event = decodeEventLog({
|
8228
9210
|
abi: licenseRegistryAbi,
|
@@ -8238,9 +9220,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8238
9220
|
}
|
8239
9221
|
}
|
8240
9222
|
} catch (err) {
|
8241
|
-
|
9223
|
+
_iterator13.e(err);
|
8242
9224
|
} finally {
|
8243
|
-
|
9225
|
+
_iterator13.f();
|
8244
9226
|
}
|
8245
9227
|
return targetLogs;
|
8246
9228
|
}
|
@@ -8250,14 +9232,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8250
9232
|
*/
|
8251
9233
|
}, {
|
8252
9234
|
key: "watchMintingLicenseConfigSetLicenseEvent",
|
8253
|
-
value: function watchMintingLicenseConfigSetLicenseEvent(
|
9235
|
+
value: function watchMintingLicenseConfigSetLicenseEvent(_onLogs14) {
|
8254
9236
|
return this.rpcClient.watchContractEvent({
|
8255
9237
|
abi: licenseRegistryAbi,
|
8256
9238
|
address: this.address,
|
8257
9239
|
eventName: "MintingLicenseConfigSetLicense",
|
8258
9240
|
onLogs: function onLogs(evs) {
|
8259
9241
|
evs.forEach(function (it) {
|
8260
|
-
return
|
9242
|
+
return _onLogs14(it.transactionHash, it.args);
|
8261
9243
|
});
|
8262
9244
|
}
|
8263
9245
|
});
|
@@ -8270,11 +9252,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8270
9252
|
key: "parseTxMintingLicenseConfigSetLicenseEvent",
|
8271
9253
|
value: function parseTxMintingLicenseConfigSetLicenseEvent(txReceipt) {
|
8272
9254
|
var targetLogs = [];
|
8273
|
-
var
|
8274
|
-
|
9255
|
+
var _iterator14 = _createForOfIteratorHelper(txReceipt.logs),
|
9256
|
+
_step14;
|
8275
9257
|
try {
|
8276
|
-
for (
|
8277
|
-
var log =
|
9258
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
|
9259
|
+
var log = _step14.value;
|
8278
9260
|
try {
|
8279
9261
|
var event = decodeEventLog({
|
8280
9262
|
abi: licenseRegistryAbi,
|
@@ -8290,9 +9272,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8290
9272
|
}
|
8291
9273
|
}
|
8292
9274
|
} catch (err) {
|
8293
|
-
|
9275
|
+
_iterator14.e(err);
|
8294
9276
|
} finally {
|
8295
|
-
|
9277
|
+
_iterator14.f();
|
8296
9278
|
}
|
8297
9279
|
return targetLogs;
|
8298
9280
|
}
|
@@ -8302,14 +9284,14 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8302
9284
|
*/
|
8303
9285
|
}, {
|
8304
9286
|
key: "watchUpgradedEvent",
|
8305
|
-
value: function watchUpgradedEvent(
|
9287
|
+
value: function watchUpgradedEvent(_onLogs15) {
|
8306
9288
|
return this.rpcClient.watchContractEvent({
|
8307
9289
|
abi: licenseRegistryAbi,
|
8308
9290
|
address: this.address,
|
8309
9291
|
eventName: "Upgraded",
|
8310
9292
|
onLogs: function onLogs(evs) {
|
8311
9293
|
evs.forEach(function (it) {
|
8312
|
-
return
|
9294
|
+
return _onLogs15(it.transactionHash, it.args);
|
8313
9295
|
});
|
8314
9296
|
}
|
8315
9297
|
});
|
@@ -8322,11 +9304,11 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8322
9304
|
key: "parseTxUpgradedEvent",
|
8323
9305
|
value: function parseTxUpgradedEvent(txReceipt) {
|
8324
9306
|
var targetLogs = [];
|
8325
|
-
var
|
8326
|
-
|
9307
|
+
var _iterator15 = _createForOfIteratorHelper(txReceipt.logs),
|
9308
|
+
_step15;
|
8327
9309
|
try {
|
8328
|
-
for (
|
8329
|
-
var log =
|
9310
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
|
9311
|
+
var log = _step15.value;
|
8330
9312
|
try {
|
8331
9313
|
var event = decodeEventLog({
|
8332
9314
|
abi: licenseRegistryAbi,
|
@@ -8342,9 +9324,9 @@ var LicenseRegistryEventClient = /*#__PURE__*/function () {
|
|
8342
9324
|
}
|
8343
9325
|
}
|
8344
9326
|
} catch (err) {
|
8345
|
-
|
9327
|
+
_iterator15.e(err);
|
8346
9328
|
} finally {
|
8347
|
-
|
9329
|
+
_iterator15.f();
|
8348
9330
|
}
|
8349
9331
|
return targetLogs;
|
8350
9332
|
}
|
@@ -9088,6 +10070,61 @@ var LicenseRegistryReadOnlyClient = /*#__PURE__*/function (_LicenseRegistryEvent
|
|
9088
10070
|
}]);
|
9089
10071
|
}(LicenseRegistryEventClient);
|
9090
10072
|
|
10073
|
+
// Contract LicenseToken =============================================================
|
10074
|
+
|
10075
|
+
/**
|
10076
|
+
* LicenseTokenOwnerOfRequest
|
10077
|
+
*
|
10078
|
+
* @param tokenId uint256
|
10079
|
+
*/
|
10080
|
+
|
10081
|
+
/**
|
10082
|
+
* contract LicenseToken readonly method
|
10083
|
+
*/
|
10084
|
+
var LicenseTokenReadOnlyClient = /*#__PURE__*/function () {
|
10085
|
+
function LicenseTokenReadOnlyClient(rpcClient, address) {
|
10086
|
+
var _rpcClient$chain7;
|
10087
|
+
_classCallCheck(this, LicenseTokenReadOnlyClient);
|
10088
|
+
this.address = address || getAddress(licenseTokenAddress, (_rpcClient$chain7 = rpcClient.chain) === null || _rpcClient$chain7 === void 0 ? void 0 : _rpcClient$chain7.id);
|
10089
|
+
this.rpcClient = rpcClient;
|
10090
|
+
}
|
10091
|
+
|
10092
|
+
/**
|
10093
|
+
* method ownerOf for contract LicenseToken
|
10094
|
+
*
|
10095
|
+
* @param request LicenseTokenOwnerOfRequest
|
10096
|
+
* @return Promise<LicenseTokenOwnerOfResponse>
|
10097
|
+
*/
|
10098
|
+
return _createClass(LicenseTokenReadOnlyClient, [{
|
10099
|
+
key: "ownerOf",
|
10100
|
+
value: (function () {
|
10101
|
+
var _ownerOf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(request) {
|
10102
|
+
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
|
10103
|
+
while (1) switch (_context49.prev = _context49.next) {
|
10104
|
+
case 0:
|
10105
|
+
_context49.next = 2;
|
10106
|
+
return this.rpcClient.readContract({
|
10107
|
+
abi: licenseTokenAbi,
|
10108
|
+
address: this.address,
|
10109
|
+
functionName: "ownerOf",
|
10110
|
+
args: [request.tokenId]
|
10111
|
+
});
|
10112
|
+
case 2:
|
10113
|
+
return _context49.abrupt("return", _context49.sent);
|
10114
|
+
case 3:
|
10115
|
+
case "end":
|
10116
|
+
return _context49.stop();
|
10117
|
+
}
|
10118
|
+
}, _callee49, this);
|
10119
|
+
}));
|
10120
|
+
function ownerOf(_x40) {
|
10121
|
+
return _ownerOf.apply(this, arguments);
|
10122
|
+
}
|
10123
|
+
return ownerOf;
|
10124
|
+
}())
|
10125
|
+
}]);
|
10126
|
+
}();
|
10127
|
+
|
9091
10128
|
// Contract LicensingModule =============================================================
|
9092
10129
|
|
9093
10130
|
/**
|
@@ -9144,9 +10181,9 @@ var LicenseRegistryReadOnlyClient = /*#__PURE__*/function (_LicenseRegistryEvent
|
|
9144
10181
|
*/
|
9145
10182
|
var LicensingModuleEventClient = /*#__PURE__*/function () {
|
9146
10183
|
function LicensingModuleEventClient(rpcClient, address) {
|
9147
|
-
var _rpcClient$
|
10184
|
+
var _rpcClient$chain8;
|
9148
10185
|
_classCallCheck(this, LicensingModuleEventClient);
|
9149
|
-
this.address = address || getAddress(licensingModuleAddress, (_rpcClient$
|
10186
|
+
this.address = address || getAddress(licensingModuleAddress, (_rpcClient$chain8 = rpcClient.chain) === null || _rpcClient$chain8 === void 0 ? void 0 : _rpcClient$chain8.id);
|
9150
10187
|
this.rpcClient = rpcClient;
|
9151
10188
|
}
|
9152
10189
|
|
@@ -9155,14 +10192,14 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
|
|
9155
10192
|
*/
|
9156
10193
|
return _createClass(LicensingModuleEventClient, [{
|
9157
10194
|
key: "watchLicenseTokensMintedEvent",
|
9158
|
-
value: function watchLicenseTokensMintedEvent(
|
10195
|
+
value: function watchLicenseTokensMintedEvent(_onLogs16) {
|
9159
10196
|
return this.rpcClient.watchContractEvent({
|
9160
10197
|
abi: licensingModuleAbi,
|
9161
10198
|
address: this.address,
|
9162
10199
|
eventName: "LicenseTokensMinted",
|
9163
10200
|
onLogs: function onLogs(evs) {
|
9164
10201
|
evs.forEach(function (it) {
|
9165
|
-
return
|
10202
|
+
return _onLogs16(it.transactionHash, it.args);
|
9166
10203
|
});
|
9167
10204
|
}
|
9168
10205
|
});
|
@@ -9175,11 +10212,11 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
|
|
9175
10212
|
key: "parseTxLicenseTokensMintedEvent",
|
9176
10213
|
value: function parseTxLicenseTokensMintedEvent(txReceipt) {
|
9177
10214
|
var targetLogs = [];
|
9178
|
-
var
|
9179
|
-
|
10215
|
+
var _iterator16 = _createForOfIteratorHelper(txReceipt.logs),
|
10216
|
+
_step16;
|
9180
10217
|
try {
|
9181
|
-
for (
|
9182
|
-
var log =
|
10218
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
|
10219
|
+
var log = _step16.value;
|
9183
10220
|
try {
|
9184
10221
|
var event = decodeEventLog({
|
9185
10222
|
abi: licensingModuleAbi,
|
@@ -9195,9 +10232,9 @@ var LicensingModuleEventClient = /*#__PURE__*/function () {
|
|
9195
10232
|
}
|
9196
10233
|
}
|
9197
10234
|
} catch (err) {
|
9198
|
-
|
10235
|
+
_iterator16.e(err);
|
9199
10236
|
} finally {
|
9200
|
-
|
10237
|
+
_iterator16.f();
|
9201
10238
|
}
|
9202
10239
|
return targetLogs;
|
9203
10240
|
}
|
@@ -9226,12 +10263,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9226
10263
|
return _createClass(LicensingModuleClient, [{
|
9227
10264
|
key: "attachLicenseTerms",
|
9228
10265
|
value: (function () {
|
9229
|
-
var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10266
|
+
var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(request) {
|
9230
10267
|
var _yield$this$rpcClient24, call;
|
9231
|
-
return _regeneratorRuntime().wrap(function
|
9232
|
-
while (1) switch (
|
10268
|
+
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
|
10269
|
+
while (1) switch (_context50.prev = _context50.next) {
|
9233
10270
|
case 0:
|
9234
|
-
|
10271
|
+
_context50.next = 2;
|
9235
10272
|
return this.rpcClient.simulateContract({
|
9236
10273
|
abi: licensingModuleAbi,
|
9237
10274
|
address: this.address,
|
@@ -9240,19 +10277,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9240
10277
|
args: [request.ipId, request.licenseTemplate, request.licenseTermsId]
|
9241
10278
|
});
|
9242
10279
|
case 2:
|
9243
|
-
_yield$this$rpcClient24 =
|
10280
|
+
_yield$this$rpcClient24 = _context50.sent;
|
9244
10281
|
call = _yield$this$rpcClient24.request;
|
9245
|
-
|
10282
|
+
_context50.next = 6;
|
9246
10283
|
return this.wallet.writeContract(call);
|
9247
10284
|
case 6:
|
9248
|
-
return
|
10285
|
+
return _context50.abrupt("return", _context50.sent);
|
9249
10286
|
case 7:
|
9250
10287
|
case "end":
|
9251
|
-
return
|
10288
|
+
return _context50.stop();
|
9252
10289
|
}
|
9253
|
-
},
|
10290
|
+
}, _callee50, this);
|
9254
10291
|
}));
|
9255
|
-
function attachLicenseTerms(
|
10292
|
+
function attachLicenseTerms(_x41) {
|
9256
10293
|
return _attachLicenseTerms.apply(this, arguments);
|
9257
10294
|
}
|
9258
10295
|
return attachLicenseTerms;
|
@@ -9267,12 +10304,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9267
10304
|
}, {
|
9268
10305
|
key: "mintLicenseTokens",
|
9269
10306
|
value: (function () {
|
9270
|
-
var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10307
|
+
var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(request) {
|
9271
10308
|
var _yield$this$rpcClient25, call;
|
9272
|
-
return _regeneratorRuntime().wrap(function
|
9273
|
-
while (1) switch (
|
10309
|
+
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
|
10310
|
+
while (1) switch (_context51.prev = _context51.next) {
|
9274
10311
|
case 0:
|
9275
|
-
|
10312
|
+
_context51.next = 2;
|
9276
10313
|
return this.rpcClient.simulateContract({
|
9277
10314
|
abi: licensingModuleAbi,
|
9278
10315
|
address: this.address,
|
@@ -9281,19 +10318,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9281
10318
|
args: [request.licensorIpId, request.licenseTemplate, request.licenseTermsId, request.amount, request.receiver, request.royaltyContext]
|
9282
10319
|
});
|
9283
10320
|
case 2:
|
9284
|
-
_yield$this$rpcClient25 =
|
10321
|
+
_yield$this$rpcClient25 = _context51.sent;
|
9285
10322
|
call = _yield$this$rpcClient25.request;
|
9286
|
-
|
10323
|
+
_context51.next = 6;
|
9287
10324
|
return this.wallet.writeContract(call);
|
9288
10325
|
case 6:
|
9289
|
-
return
|
10326
|
+
return _context51.abrupt("return", _context51.sent);
|
9290
10327
|
case 7:
|
9291
10328
|
case "end":
|
9292
|
-
return
|
10329
|
+
return _context51.stop();
|
9293
10330
|
}
|
9294
|
-
},
|
10331
|
+
}, _callee51, this);
|
9295
10332
|
}));
|
9296
|
-
function mintLicenseTokens(
|
10333
|
+
function mintLicenseTokens(_x42) {
|
9297
10334
|
return _mintLicenseTokens.apply(this, arguments);
|
9298
10335
|
}
|
9299
10336
|
return mintLicenseTokens;
|
@@ -9308,12 +10345,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9308
10345
|
}, {
|
9309
10346
|
key: "registerDerivative",
|
9310
10347
|
value: (function () {
|
9311
|
-
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10348
|
+
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(request) {
|
9312
10349
|
var _yield$this$rpcClient26, call;
|
9313
|
-
return _regeneratorRuntime().wrap(function
|
9314
|
-
while (1) switch (
|
10350
|
+
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
|
10351
|
+
while (1) switch (_context52.prev = _context52.next) {
|
9315
10352
|
case 0:
|
9316
|
-
|
10353
|
+
_context52.next = 2;
|
9317
10354
|
return this.rpcClient.simulateContract({
|
9318
10355
|
abi: licensingModuleAbi,
|
9319
10356
|
address: this.address,
|
@@ -9322,19 +10359,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9322
10359
|
args: [request.childIpId, request.parentIpIds, request.licenseTermsIds, request.licenseTemplate, request.royaltyContext]
|
9323
10360
|
});
|
9324
10361
|
case 2:
|
9325
|
-
_yield$this$rpcClient26 =
|
10362
|
+
_yield$this$rpcClient26 = _context52.sent;
|
9326
10363
|
call = _yield$this$rpcClient26.request;
|
9327
|
-
|
10364
|
+
_context52.next = 6;
|
9328
10365
|
return this.wallet.writeContract(call);
|
9329
10366
|
case 6:
|
9330
|
-
return
|
10367
|
+
return _context52.abrupt("return", _context52.sent);
|
9331
10368
|
case 7:
|
9332
10369
|
case "end":
|
9333
|
-
return
|
10370
|
+
return _context52.stop();
|
9334
10371
|
}
|
9335
|
-
},
|
10372
|
+
}, _callee52, this);
|
9336
10373
|
}));
|
9337
|
-
function registerDerivative(
|
10374
|
+
function registerDerivative(_x43) {
|
9338
10375
|
return _registerDerivative.apply(this, arguments);
|
9339
10376
|
}
|
9340
10377
|
return registerDerivative;
|
@@ -9349,12 +10386,12 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9349
10386
|
}, {
|
9350
10387
|
key: "registerDerivativeWithLicenseTokens",
|
9351
10388
|
value: (function () {
|
9352
|
-
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10389
|
+
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(request) {
|
9353
10390
|
var _yield$this$rpcClient27, call;
|
9354
|
-
return _regeneratorRuntime().wrap(function
|
9355
|
-
while (1) switch (
|
10391
|
+
return _regeneratorRuntime().wrap(function _callee53$(_context53) {
|
10392
|
+
while (1) switch (_context53.prev = _context53.next) {
|
9356
10393
|
case 0:
|
9357
|
-
|
10394
|
+
_context53.next = 2;
|
9358
10395
|
return this.rpcClient.simulateContract({
|
9359
10396
|
abi: licensingModuleAbi,
|
9360
10397
|
address: this.address,
|
@@ -9363,19 +10400,19 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9363
10400
|
args: [request.childIpId, request.licenseTokenIds, request.royaltyContext]
|
9364
10401
|
});
|
9365
10402
|
case 2:
|
9366
|
-
_yield$this$rpcClient27 =
|
10403
|
+
_yield$this$rpcClient27 = _context53.sent;
|
9367
10404
|
call = _yield$this$rpcClient27.request;
|
9368
|
-
|
10405
|
+
_context53.next = 6;
|
9369
10406
|
return this.wallet.writeContract(call);
|
9370
10407
|
case 6:
|
9371
|
-
return
|
10408
|
+
return _context53.abrupt("return", _context53.sent);
|
9372
10409
|
case 7:
|
9373
10410
|
case "end":
|
9374
|
-
return
|
10411
|
+
return _context53.stop();
|
9375
10412
|
}
|
9376
|
-
},
|
10413
|
+
}, _callee53, this);
|
9377
10414
|
}));
|
9378
|
-
function registerDerivativeWithLicenseTokens(
|
10415
|
+
function registerDerivativeWithLicenseTokens(_x44) {
|
9379
10416
|
return _registerDerivativeWithLicenseTokens.apply(this, arguments);
|
9380
10417
|
}
|
9381
10418
|
return registerDerivativeWithLicenseTokens;
|
@@ -9539,9 +10576,9 @@ var LicensingModuleClient = /*#__PURE__*/function (_LicensingModuleEvent) {
|
|
9539
10576
|
*/
|
9540
10577
|
var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
9541
10578
|
function PiLicenseTemplateEventClient(rpcClient, address) {
|
9542
|
-
var _rpcClient$
|
10579
|
+
var _rpcClient$chain10;
|
9543
10580
|
_classCallCheck(this, PiLicenseTemplateEventClient);
|
9544
|
-
this.address = address || getAddress(piLicenseTemplateAddress, (_rpcClient$
|
10581
|
+
this.address = address || getAddress(piLicenseTemplateAddress, (_rpcClient$chain10 = rpcClient.chain) === null || _rpcClient$chain10 === void 0 ? void 0 : _rpcClient$chain10.id);
|
9545
10582
|
this.rpcClient = rpcClient;
|
9546
10583
|
}
|
9547
10584
|
|
@@ -9550,14 +10587,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9550
10587
|
*/
|
9551
10588
|
return _createClass(PiLicenseTemplateEventClient, [{
|
9552
10589
|
key: "watchDerivativeApprovedEvent",
|
9553
|
-
value: function watchDerivativeApprovedEvent(
|
10590
|
+
value: function watchDerivativeApprovedEvent(_onLogs17) {
|
9554
10591
|
return this.rpcClient.watchContractEvent({
|
9555
10592
|
abi: piLicenseTemplateAbi,
|
9556
10593
|
address: this.address,
|
9557
10594
|
eventName: "DerivativeApproved",
|
9558
10595
|
onLogs: function onLogs(evs) {
|
9559
10596
|
evs.forEach(function (it) {
|
9560
|
-
return
|
10597
|
+
return _onLogs17(it.transactionHash, it.args);
|
9561
10598
|
});
|
9562
10599
|
}
|
9563
10600
|
});
|
@@ -9570,11 +10607,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9570
10607
|
key: "parseTxDerivativeApprovedEvent",
|
9571
10608
|
value: function parseTxDerivativeApprovedEvent(txReceipt) {
|
9572
10609
|
var targetLogs = [];
|
9573
|
-
var
|
9574
|
-
|
10610
|
+
var _iterator17 = _createForOfIteratorHelper(txReceipt.logs),
|
10611
|
+
_step17;
|
9575
10612
|
try {
|
9576
|
-
for (
|
9577
|
-
var log =
|
10613
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
|
10614
|
+
var log = _step17.value;
|
9578
10615
|
try {
|
9579
10616
|
var event = decodeEventLog({
|
9580
10617
|
abi: piLicenseTemplateAbi,
|
@@ -9590,9 +10627,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9590
10627
|
}
|
9591
10628
|
}
|
9592
10629
|
} catch (err) {
|
9593
|
-
|
10630
|
+
_iterator17.e(err);
|
9594
10631
|
} finally {
|
9595
|
-
|
10632
|
+
_iterator17.f();
|
9596
10633
|
}
|
9597
10634
|
return targetLogs;
|
9598
10635
|
}
|
@@ -9602,14 +10639,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9602
10639
|
*/
|
9603
10640
|
}, {
|
9604
10641
|
key: "watchInitializedEvent",
|
9605
|
-
value: function watchInitializedEvent(
|
10642
|
+
value: function watchInitializedEvent(_onLogs18) {
|
9606
10643
|
return this.rpcClient.watchContractEvent({
|
9607
10644
|
abi: piLicenseTemplateAbi,
|
9608
10645
|
address: this.address,
|
9609
10646
|
eventName: "Initialized",
|
9610
10647
|
onLogs: function onLogs(evs) {
|
9611
10648
|
evs.forEach(function (it) {
|
9612
|
-
return
|
10649
|
+
return _onLogs18(it.transactionHash, it.args);
|
9613
10650
|
});
|
9614
10651
|
}
|
9615
10652
|
});
|
@@ -9622,11 +10659,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9622
10659
|
key: "parseTxInitializedEvent",
|
9623
10660
|
value: function parseTxInitializedEvent(txReceipt) {
|
9624
10661
|
var targetLogs = [];
|
9625
|
-
var
|
9626
|
-
|
10662
|
+
var _iterator18 = _createForOfIteratorHelper(txReceipt.logs),
|
10663
|
+
_step18;
|
9627
10664
|
try {
|
9628
|
-
for (
|
9629
|
-
var log =
|
10665
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
|
10666
|
+
var log = _step18.value;
|
9630
10667
|
try {
|
9631
10668
|
var event = decodeEventLog({
|
9632
10669
|
abi: piLicenseTemplateAbi,
|
@@ -9642,9 +10679,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9642
10679
|
}
|
9643
10680
|
}
|
9644
10681
|
} catch (err) {
|
9645
|
-
|
10682
|
+
_iterator18.e(err);
|
9646
10683
|
} finally {
|
9647
|
-
|
10684
|
+
_iterator18.f();
|
9648
10685
|
}
|
9649
10686
|
return targetLogs;
|
9650
10687
|
}
|
@@ -9654,14 +10691,14 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9654
10691
|
*/
|
9655
10692
|
}, {
|
9656
10693
|
key: "watchLicenseTermsRegisteredEvent",
|
9657
|
-
value: function watchLicenseTermsRegisteredEvent(
|
10694
|
+
value: function watchLicenseTermsRegisteredEvent(_onLogs19) {
|
9658
10695
|
return this.rpcClient.watchContractEvent({
|
9659
10696
|
abi: piLicenseTemplateAbi,
|
9660
10697
|
address: this.address,
|
9661
10698
|
eventName: "LicenseTermsRegistered",
|
9662
10699
|
onLogs: function onLogs(evs) {
|
9663
10700
|
evs.forEach(function (it) {
|
9664
|
-
return
|
10701
|
+
return _onLogs19(it.transactionHash, it.args);
|
9665
10702
|
});
|
9666
10703
|
}
|
9667
10704
|
});
|
@@ -9674,11 +10711,11 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9674
10711
|
key: "parseTxLicenseTermsRegisteredEvent",
|
9675
10712
|
value: function parseTxLicenseTermsRegisteredEvent(txReceipt) {
|
9676
10713
|
var targetLogs = [];
|
9677
|
-
var
|
9678
|
-
|
10714
|
+
var _iterator19 = _createForOfIteratorHelper(txReceipt.logs),
|
10715
|
+
_step19;
|
9679
10716
|
try {
|
9680
|
-
for (
|
9681
|
-
var log =
|
10717
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
|
10718
|
+
var log = _step19.value;
|
9682
10719
|
try {
|
9683
10720
|
var event = decodeEventLog({
|
9684
10721
|
abi: piLicenseTemplateAbi,
|
@@ -9694,9 +10731,9 @@ var PiLicenseTemplateEventClient = /*#__PURE__*/function () {
|
|
9694
10731
|
}
|
9695
10732
|
}
|
9696
10733
|
} catch (err) {
|
9697
|
-
|
10734
|
+
_iterator19.e(err);
|
9698
10735
|
} finally {
|
9699
|
-
|
10736
|
+
_iterator19.f();
|
9700
10737
|
}
|
9701
10738
|
return targetLogs;
|
9702
10739
|
}
|
@@ -9722,23 +10759,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9722
10759
|
return _createClass(PiLicenseTemplateReadOnlyClient, [{
|
9723
10760
|
key: "accessController",
|
9724
10761
|
value: (function () {
|
9725
|
-
var _accessController = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9726
|
-
return _regeneratorRuntime().wrap(function
|
9727
|
-
while (1) switch (
|
10762
|
+
var _accessController = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55() {
|
10763
|
+
return _regeneratorRuntime().wrap(function _callee55$(_context55) {
|
10764
|
+
while (1) switch (_context55.prev = _context55.next) {
|
9728
10765
|
case 0:
|
9729
|
-
|
10766
|
+
_context55.next = 2;
|
9730
10767
|
return this.rpcClient.readContract({
|
9731
10768
|
abi: piLicenseTemplateAbi,
|
9732
10769
|
address: this.address,
|
9733
10770
|
functionName: "ACCESS_CONTROLLER"
|
9734
10771
|
});
|
9735
10772
|
case 2:
|
9736
|
-
return
|
10773
|
+
return _context55.abrupt("return", _context55.sent);
|
9737
10774
|
case 3:
|
9738
10775
|
case "end":
|
9739
|
-
return
|
10776
|
+
return _context55.stop();
|
9740
10777
|
}
|
9741
|
-
},
|
10778
|
+
}, _callee55, this);
|
9742
10779
|
}));
|
9743
10780
|
function accessController() {
|
9744
10781
|
return _accessController.apply(this, arguments);
|
@@ -9755,23 +10792,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9755
10792
|
}, {
|
9756
10793
|
key: "ipAccountRegistry",
|
9757
10794
|
value: (function () {
|
9758
|
-
var _ipAccountRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9759
|
-
return _regeneratorRuntime().wrap(function
|
9760
|
-
while (1) switch (
|
10795
|
+
var _ipAccountRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56() {
|
10796
|
+
return _regeneratorRuntime().wrap(function _callee56$(_context56) {
|
10797
|
+
while (1) switch (_context56.prev = _context56.next) {
|
9761
10798
|
case 0:
|
9762
|
-
|
10799
|
+
_context56.next = 2;
|
9763
10800
|
return this.rpcClient.readContract({
|
9764
10801
|
abi: piLicenseTemplateAbi,
|
9765
10802
|
address: this.address,
|
9766
10803
|
functionName: "IP_ACCOUNT_REGISTRY"
|
9767
10804
|
});
|
9768
10805
|
case 2:
|
9769
|
-
return
|
10806
|
+
return _context56.abrupt("return", _context56.sent);
|
9770
10807
|
case 3:
|
9771
10808
|
case "end":
|
9772
|
-
return
|
10809
|
+
return _context56.stop();
|
9773
10810
|
}
|
9774
|
-
},
|
10811
|
+
}, _callee56, this);
|
9775
10812
|
}));
|
9776
10813
|
function ipAccountRegistry() {
|
9777
10814
|
return _ipAccountRegistry.apply(this, arguments);
|
@@ -9788,23 +10825,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9788
10825
|
}, {
|
9789
10826
|
key: "licenseNft",
|
9790
10827
|
value: (function () {
|
9791
|
-
var _licenseNft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9792
|
-
return _regeneratorRuntime().wrap(function
|
9793
|
-
while (1) switch (
|
10828
|
+
var _licenseNft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57() {
|
10829
|
+
return _regeneratorRuntime().wrap(function _callee57$(_context57) {
|
10830
|
+
while (1) switch (_context57.prev = _context57.next) {
|
9794
10831
|
case 0:
|
9795
|
-
|
10832
|
+
_context57.next = 2;
|
9796
10833
|
return this.rpcClient.readContract({
|
9797
10834
|
abi: piLicenseTemplateAbi,
|
9798
10835
|
address: this.address,
|
9799
10836
|
functionName: "LICENSE_NFT"
|
9800
10837
|
});
|
9801
10838
|
case 2:
|
9802
|
-
return
|
10839
|
+
return _context57.abrupt("return", _context57.sent);
|
9803
10840
|
case 3:
|
9804
10841
|
case "end":
|
9805
|
-
return
|
10842
|
+
return _context57.stop();
|
9806
10843
|
}
|
9807
|
-
},
|
10844
|
+
}, _callee57, this);
|
9808
10845
|
}));
|
9809
10846
|
function licenseNft() {
|
9810
10847
|
return _licenseNft.apply(this, arguments);
|
@@ -9821,23 +10858,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9821
10858
|
}, {
|
9822
10859
|
key: "licenseRegistry",
|
9823
10860
|
value: (function () {
|
9824
|
-
var _licenseRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9825
|
-
return _regeneratorRuntime().wrap(function
|
9826
|
-
while (1) switch (
|
10861
|
+
var _licenseRegistry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58() {
|
10862
|
+
return _regeneratorRuntime().wrap(function _callee58$(_context58) {
|
10863
|
+
while (1) switch (_context58.prev = _context58.next) {
|
9827
10864
|
case 0:
|
9828
|
-
|
10865
|
+
_context58.next = 2;
|
9829
10866
|
return this.rpcClient.readContract({
|
9830
10867
|
abi: piLicenseTemplateAbi,
|
9831
10868
|
address: this.address,
|
9832
10869
|
functionName: "LICENSE_REGISTRY"
|
9833
10870
|
});
|
9834
10871
|
case 2:
|
9835
|
-
return
|
10872
|
+
return _context58.abrupt("return", _context58.sent);
|
9836
10873
|
case 3:
|
9837
10874
|
case "end":
|
9838
|
-
return
|
10875
|
+
return _context58.stop();
|
9839
10876
|
}
|
9840
|
-
},
|
10877
|
+
}, _callee58, this);
|
9841
10878
|
}));
|
9842
10879
|
function licenseRegistry() {
|
9843
10880
|
return _licenseRegistry.apply(this, arguments);
|
@@ -9854,23 +10891,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9854
10891
|
}, {
|
9855
10892
|
key: "royaltyModule",
|
9856
10893
|
value: (function () {
|
9857
|
-
var _royaltyModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9858
|
-
return _regeneratorRuntime().wrap(function
|
9859
|
-
while (1) switch (
|
10894
|
+
var _royaltyModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59() {
|
10895
|
+
return _regeneratorRuntime().wrap(function _callee59$(_context59) {
|
10896
|
+
while (1) switch (_context59.prev = _context59.next) {
|
9860
10897
|
case 0:
|
9861
|
-
|
10898
|
+
_context59.next = 2;
|
9862
10899
|
return this.rpcClient.readContract({
|
9863
10900
|
abi: piLicenseTemplateAbi,
|
9864
10901
|
address: this.address,
|
9865
10902
|
functionName: "ROYALTY_MODULE"
|
9866
10903
|
});
|
9867
10904
|
case 2:
|
9868
|
-
return
|
10905
|
+
return _context59.abrupt("return", _context59.sent);
|
9869
10906
|
case 3:
|
9870
10907
|
case "end":
|
9871
|
-
return
|
10908
|
+
return _context59.stop();
|
9872
10909
|
}
|
9873
|
-
},
|
10910
|
+
}, _callee59, this);
|
9874
10911
|
}));
|
9875
10912
|
function royaltyModule() {
|
9876
10913
|
return _royaltyModule.apply(this, arguments);
|
@@ -9887,11 +10924,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9887
10924
|
}, {
|
9888
10925
|
key: "exists",
|
9889
10926
|
value: (function () {
|
9890
|
-
var _exists2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9891
|
-
return _regeneratorRuntime().wrap(function
|
9892
|
-
while (1) switch (
|
10927
|
+
var _exists2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(request) {
|
10928
|
+
return _regeneratorRuntime().wrap(function _callee60$(_context60) {
|
10929
|
+
while (1) switch (_context60.prev = _context60.next) {
|
9893
10930
|
case 0:
|
9894
|
-
|
10931
|
+
_context60.next = 2;
|
9895
10932
|
return this.rpcClient.readContract({
|
9896
10933
|
abi: piLicenseTemplateAbi,
|
9897
10934
|
address: this.address,
|
@@ -9899,14 +10936,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9899
10936
|
args: [request.licenseTermsId]
|
9900
10937
|
});
|
9901
10938
|
case 2:
|
9902
|
-
return
|
10939
|
+
return _context60.abrupt("return", _context60.sent);
|
9903
10940
|
case 3:
|
9904
10941
|
case "end":
|
9905
|
-
return
|
10942
|
+
return _context60.stop();
|
9906
10943
|
}
|
9907
|
-
},
|
10944
|
+
}, _callee60, this);
|
9908
10945
|
}));
|
9909
|
-
function exists(
|
10946
|
+
function exists(_x46) {
|
9910
10947
|
return _exists2.apply(this, arguments);
|
9911
10948
|
}
|
9912
10949
|
return exists;
|
@@ -9921,11 +10958,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9921
10958
|
}, {
|
9922
10959
|
key: "getEarlierExpireTime",
|
9923
10960
|
value: (function () {
|
9924
|
-
var _getEarlierExpireTime = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9925
|
-
return _regeneratorRuntime().wrap(function
|
9926
|
-
while (1) switch (
|
10961
|
+
var _getEarlierExpireTime = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(request) {
|
10962
|
+
return _regeneratorRuntime().wrap(function _callee61$(_context61) {
|
10963
|
+
while (1) switch (_context61.prev = _context61.next) {
|
9927
10964
|
case 0:
|
9928
|
-
|
10965
|
+
_context61.next = 2;
|
9929
10966
|
return this.rpcClient.readContract({
|
9930
10967
|
abi: piLicenseTemplateAbi,
|
9931
10968
|
address: this.address,
|
@@ -9933,14 +10970,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9933
10970
|
args: [request.licenseTermsIds, request.start]
|
9934
10971
|
});
|
9935
10972
|
case 2:
|
9936
|
-
return
|
10973
|
+
return _context61.abrupt("return", _context61.sent);
|
9937
10974
|
case 3:
|
9938
10975
|
case "end":
|
9939
|
-
return
|
10976
|
+
return _context61.stop();
|
9940
10977
|
}
|
9941
|
-
},
|
10978
|
+
}, _callee61, this);
|
9942
10979
|
}));
|
9943
|
-
function getEarlierExpireTime(
|
10980
|
+
function getEarlierExpireTime(_x47) {
|
9944
10981
|
return _getEarlierExpireTime.apply(this, arguments);
|
9945
10982
|
}
|
9946
10983
|
return getEarlierExpireTime;
|
@@ -9955,11 +10992,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9955
10992
|
}, {
|
9956
10993
|
key: "getExpireTime",
|
9957
10994
|
value: (function () {
|
9958
|
-
var _getExpireTime2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
9959
|
-
return _regeneratorRuntime().wrap(function
|
9960
|
-
while (1) switch (
|
10995
|
+
var _getExpireTime2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(request) {
|
10996
|
+
return _regeneratorRuntime().wrap(function _callee62$(_context62) {
|
10997
|
+
while (1) switch (_context62.prev = _context62.next) {
|
9961
10998
|
case 0:
|
9962
|
-
|
10999
|
+
_context62.next = 2;
|
9963
11000
|
return this.rpcClient.readContract({
|
9964
11001
|
abi: piLicenseTemplateAbi,
|
9965
11002
|
address: this.address,
|
@@ -9967,14 +11004,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9967
11004
|
args: [request.licenseTermsId, request.start]
|
9968
11005
|
});
|
9969
11006
|
case 2:
|
9970
|
-
return
|
11007
|
+
return _context62.abrupt("return", _context62.sent);
|
9971
11008
|
case 3:
|
9972
11009
|
case "end":
|
9973
|
-
return
|
11010
|
+
return _context62.stop();
|
9974
11011
|
}
|
9975
|
-
},
|
11012
|
+
}, _callee62, this);
|
9976
11013
|
}));
|
9977
|
-
function getExpireTime(
|
11014
|
+
function getExpireTime(_x48) {
|
9978
11015
|
return _getExpireTime2.apply(this, arguments);
|
9979
11016
|
}
|
9980
11017
|
return getExpireTime;
|
@@ -9989,12 +11026,12 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
9989
11026
|
}, {
|
9990
11027
|
key: "getLicenseTermsId",
|
9991
11028
|
value: (function () {
|
9992
|
-
var _getLicenseTermsId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11029
|
+
var _getLicenseTermsId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(request) {
|
9993
11030
|
var result;
|
9994
|
-
return _regeneratorRuntime().wrap(function
|
9995
|
-
while (1) switch (
|
11031
|
+
return _regeneratorRuntime().wrap(function _callee63$(_context63) {
|
11032
|
+
while (1) switch (_context63.prev = _context63.next) {
|
9996
11033
|
case 0:
|
9997
|
-
|
11034
|
+
_context63.next = 2;
|
9998
11035
|
return this.rpcClient.readContract({
|
9999
11036
|
abi: piLicenseTemplateAbi,
|
10000
11037
|
address: this.address,
|
@@ -10002,17 +11039,17 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10002
11039
|
args: [request.terms]
|
10003
11040
|
});
|
10004
11041
|
case 2:
|
10005
|
-
result =
|
10006
|
-
return
|
11042
|
+
result = _context63.sent;
|
11043
|
+
return _context63.abrupt("return", {
|
10007
11044
|
selectedLicenseTermsId: result
|
10008
11045
|
});
|
10009
11046
|
case 4:
|
10010
11047
|
case "end":
|
10011
|
-
return
|
11048
|
+
return _context63.stop();
|
10012
11049
|
}
|
10013
|
-
},
|
11050
|
+
}, _callee63, this);
|
10014
11051
|
}));
|
10015
|
-
function getLicenseTermsId(
|
11052
|
+
function getLicenseTermsId(_x49) {
|
10016
11053
|
return _getLicenseTermsId.apply(this, arguments);
|
10017
11054
|
}
|
10018
11055
|
return getLicenseTermsId;
|
@@ -10027,23 +11064,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10027
11064
|
}, {
|
10028
11065
|
key: "getMetadataUri",
|
10029
11066
|
value: (function () {
|
10030
|
-
var _getMetadataUri = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10031
|
-
return _regeneratorRuntime().wrap(function
|
10032
|
-
while (1) switch (
|
11067
|
+
var _getMetadataUri = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64() {
|
11068
|
+
return _regeneratorRuntime().wrap(function _callee64$(_context64) {
|
11069
|
+
while (1) switch (_context64.prev = _context64.next) {
|
10033
11070
|
case 0:
|
10034
|
-
|
11071
|
+
_context64.next = 2;
|
10035
11072
|
return this.rpcClient.readContract({
|
10036
11073
|
abi: piLicenseTemplateAbi,
|
10037
11074
|
address: this.address,
|
10038
11075
|
functionName: "getMetadataURI"
|
10039
11076
|
});
|
10040
11077
|
case 2:
|
10041
|
-
return
|
11078
|
+
return _context64.abrupt("return", _context64.sent);
|
10042
11079
|
case 3:
|
10043
11080
|
case "end":
|
10044
|
-
return
|
11081
|
+
return _context64.stop();
|
10045
11082
|
}
|
10046
|
-
},
|
11083
|
+
}, _callee64, this);
|
10047
11084
|
}));
|
10048
11085
|
function getMetadataUri() {
|
10049
11086
|
return _getMetadataUri.apply(this, arguments);
|
@@ -10060,12 +11097,12 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10060
11097
|
}, {
|
10061
11098
|
key: "getRoyaltyPolicy",
|
10062
11099
|
value: (function () {
|
10063
|
-
var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11100
|
+
var _getRoyaltyPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(request) {
|
10064
11101
|
var result;
|
10065
|
-
return _regeneratorRuntime().wrap(function
|
10066
|
-
while (1) switch (
|
11102
|
+
return _regeneratorRuntime().wrap(function _callee65$(_context65) {
|
11103
|
+
while (1) switch (_context65.prev = _context65.next) {
|
10067
11104
|
case 0:
|
10068
|
-
|
11105
|
+
_context65.next = 2;
|
10069
11106
|
return this.rpcClient.readContract({
|
10070
11107
|
abi: piLicenseTemplateAbi,
|
10071
11108
|
address: this.address,
|
@@ -10073,8 +11110,8 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10073
11110
|
args: [request.licenseTermsId]
|
10074
11111
|
});
|
10075
11112
|
case 2:
|
10076
|
-
result =
|
10077
|
-
return
|
11113
|
+
result = _context65.sent;
|
11114
|
+
return _context65.abrupt("return", {
|
10078
11115
|
royaltyPolicy: result[0],
|
10079
11116
|
royaltyData: result[1],
|
10080
11117
|
mintingFee: result[2],
|
@@ -10082,11 +11119,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10082
11119
|
});
|
10083
11120
|
case 4:
|
10084
11121
|
case "end":
|
10085
|
-
return
|
11122
|
+
return _context65.stop();
|
10086
11123
|
}
|
10087
|
-
},
|
11124
|
+
}, _callee65, this);
|
10088
11125
|
}));
|
10089
|
-
function getRoyaltyPolicy(
|
11126
|
+
function getRoyaltyPolicy(_x50) {
|
10090
11127
|
return _getRoyaltyPolicy.apply(this, arguments);
|
10091
11128
|
}
|
10092
11129
|
return getRoyaltyPolicy;
|
@@ -10101,11 +11138,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10101
11138
|
}, {
|
10102
11139
|
key: "isDerivativeApproved",
|
10103
11140
|
value: (function () {
|
10104
|
-
var _isDerivativeApproved = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10105
|
-
return _regeneratorRuntime().wrap(function
|
10106
|
-
while (1) switch (
|
11141
|
+
var _isDerivativeApproved = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(request) {
|
11142
|
+
return _regeneratorRuntime().wrap(function _callee66$(_context66) {
|
11143
|
+
while (1) switch (_context66.prev = _context66.next) {
|
10107
11144
|
case 0:
|
10108
|
-
|
11145
|
+
_context66.next = 2;
|
10109
11146
|
return this.rpcClient.readContract({
|
10110
11147
|
abi: piLicenseTemplateAbi,
|
10111
11148
|
address: this.address,
|
@@ -10113,14 +11150,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10113
11150
|
args: [request.licenseTokenId, request.childIpId]
|
10114
11151
|
});
|
10115
11152
|
case 2:
|
10116
|
-
return
|
11153
|
+
return _context66.abrupt("return", _context66.sent);
|
10117
11154
|
case 3:
|
10118
11155
|
case "end":
|
10119
|
-
return
|
11156
|
+
return _context66.stop();
|
10120
11157
|
}
|
10121
|
-
},
|
11158
|
+
}, _callee66, this);
|
10122
11159
|
}));
|
10123
|
-
function isDerivativeApproved(
|
11160
|
+
function isDerivativeApproved(_x51) {
|
10124
11161
|
return _isDerivativeApproved.apply(this, arguments);
|
10125
11162
|
}
|
10126
11163
|
return isDerivativeApproved;
|
@@ -10135,11 +11172,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10135
11172
|
}, {
|
10136
11173
|
key: "isLicenseTransferable",
|
10137
11174
|
value: (function () {
|
10138
|
-
var _isLicenseTransferable = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10139
|
-
return _regeneratorRuntime().wrap(function
|
10140
|
-
while (1) switch (
|
11175
|
+
var _isLicenseTransferable = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67(request) {
|
11176
|
+
return _regeneratorRuntime().wrap(function _callee67$(_context67) {
|
11177
|
+
while (1) switch (_context67.prev = _context67.next) {
|
10141
11178
|
case 0:
|
10142
|
-
|
11179
|
+
_context67.next = 2;
|
10143
11180
|
return this.rpcClient.readContract({
|
10144
11181
|
abi: piLicenseTemplateAbi,
|
10145
11182
|
address: this.address,
|
@@ -10147,14 +11184,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10147
11184
|
args: [request.licenseTermsId]
|
10148
11185
|
});
|
10149
11186
|
case 2:
|
10150
|
-
return
|
11187
|
+
return _context67.abrupt("return", _context67.sent);
|
10151
11188
|
case 3:
|
10152
11189
|
case "end":
|
10153
|
-
return
|
11190
|
+
return _context67.stop();
|
10154
11191
|
}
|
10155
|
-
},
|
11192
|
+
}, _callee67, this);
|
10156
11193
|
}));
|
10157
|
-
function isLicenseTransferable(
|
11194
|
+
function isLicenseTransferable(_x52) {
|
10158
11195
|
return _isLicenseTransferable.apply(this, arguments);
|
10159
11196
|
}
|
10160
11197
|
return isLicenseTransferable;
|
@@ -10169,23 +11206,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10169
11206
|
}, {
|
10170
11207
|
key: "name",
|
10171
11208
|
value: (function () {
|
10172
|
-
var _name = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10173
|
-
return _regeneratorRuntime().wrap(function
|
10174
|
-
while (1) switch (
|
11209
|
+
var _name = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68() {
|
11210
|
+
return _regeneratorRuntime().wrap(function _callee68$(_context68) {
|
11211
|
+
while (1) switch (_context68.prev = _context68.next) {
|
10175
11212
|
case 0:
|
10176
|
-
|
11213
|
+
_context68.next = 2;
|
10177
11214
|
return this.rpcClient.readContract({
|
10178
11215
|
abi: piLicenseTemplateAbi,
|
10179
11216
|
address: this.address,
|
10180
11217
|
functionName: "name"
|
10181
11218
|
});
|
10182
11219
|
case 2:
|
10183
|
-
return
|
11220
|
+
return _context68.abrupt("return", _context68.sent);
|
10184
11221
|
case 3:
|
10185
11222
|
case "end":
|
10186
|
-
return
|
11223
|
+
return _context68.stop();
|
10187
11224
|
}
|
10188
|
-
},
|
11225
|
+
}, _callee68, this);
|
10189
11226
|
}));
|
10190
11227
|
function name() {
|
10191
11228
|
return _name.apply(this, arguments);
|
@@ -10202,11 +11239,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10202
11239
|
}, {
|
10203
11240
|
key: "supportsInterface",
|
10204
11241
|
value: (function () {
|
10205
|
-
var _supportsInterface = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10206
|
-
return _regeneratorRuntime().wrap(function
|
10207
|
-
while (1) switch (
|
11242
|
+
var _supportsInterface = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(request) {
|
11243
|
+
return _regeneratorRuntime().wrap(function _callee69$(_context69) {
|
11244
|
+
while (1) switch (_context69.prev = _context69.next) {
|
10208
11245
|
case 0:
|
10209
|
-
|
11246
|
+
_context69.next = 2;
|
10210
11247
|
return this.rpcClient.readContract({
|
10211
11248
|
abi: piLicenseTemplateAbi,
|
10212
11249
|
address: this.address,
|
@@ -10214,14 +11251,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10214
11251
|
args: [request.interfaceId]
|
10215
11252
|
});
|
10216
11253
|
case 2:
|
10217
|
-
return
|
11254
|
+
return _context69.abrupt("return", _context69.sent);
|
10218
11255
|
case 3:
|
10219
11256
|
case "end":
|
10220
|
-
return
|
11257
|
+
return _context69.stop();
|
10221
11258
|
}
|
10222
|
-
},
|
11259
|
+
}, _callee69, this);
|
10223
11260
|
}));
|
10224
|
-
function supportsInterface(
|
11261
|
+
function supportsInterface(_x53) {
|
10225
11262
|
return _supportsInterface.apply(this, arguments);
|
10226
11263
|
}
|
10227
11264
|
return supportsInterface;
|
@@ -10236,11 +11273,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10236
11273
|
}, {
|
10237
11274
|
key: "toJson",
|
10238
11275
|
value: (function () {
|
10239
|
-
var _toJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10240
|
-
return _regeneratorRuntime().wrap(function
|
10241
|
-
while (1) switch (
|
11276
|
+
var _toJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70(request) {
|
11277
|
+
return _regeneratorRuntime().wrap(function _callee70$(_context70) {
|
11278
|
+
while (1) switch (_context70.prev = _context70.next) {
|
10242
11279
|
case 0:
|
10243
|
-
|
11280
|
+
_context70.next = 2;
|
10244
11281
|
return this.rpcClient.readContract({
|
10245
11282
|
abi: piLicenseTemplateAbi,
|
10246
11283
|
address: this.address,
|
@@ -10248,14 +11285,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10248
11285
|
args: [request.licenseTermsId]
|
10249
11286
|
});
|
10250
11287
|
case 2:
|
10251
|
-
return
|
11288
|
+
return _context70.abrupt("return", _context70.sent);
|
10252
11289
|
case 3:
|
10253
11290
|
case "end":
|
10254
|
-
return
|
11291
|
+
return _context70.stop();
|
10255
11292
|
}
|
10256
|
-
},
|
11293
|
+
}, _callee70, this);
|
10257
11294
|
}));
|
10258
|
-
function toJson(
|
11295
|
+
function toJson(_x54) {
|
10259
11296
|
return _toJson.apply(this, arguments);
|
10260
11297
|
}
|
10261
11298
|
return toJson;
|
@@ -10270,23 +11307,23 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10270
11307
|
}, {
|
10271
11308
|
key: "totalRegisteredLicenseTerms",
|
10272
11309
|
value: (function () {
|
10273
|
-
var _totalRegisteredLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10274
|
-
return _regeneratorRuntime().wrap(function
|
10275
|
-
while (1) switch (
|
11310
|
+
var _totalRegisteredLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71() {
|
11311
|
+
return _regeneratorRuntime().wrap(function _callee71$(_context71) {
|
11312
|
+
while (1) switch (_context71.prev = _context71.next) {
|
10276
11313
|
case 0:
|
10277
|
-
|
11314
|
+
_context71.next = 2;
|
10278
11315
|
return this.rpcClient.readContract({
|
10279
11316
|
abi: piLicenseTemplateAbi,
|
10280
11317
|
address: this.address,
|
10281
11318
|
functionName: "totalRegisteredLicenseTerms"
|
10282
11319
|
});
|
10283
11320
|
case 2:
|
10284
|
-
return
|
11321
|
+
return _context71.abrupt("return", _context71.sent);
|
10285
11322
|
case 3:
|
10286
11323
|
case "end":
|
10287
|
-
return
|
11324
|
+
return _context71.stop();
|
10288
11325
|
}
|
10289
|
-
},
|
11326
|
+
}, _callee71, this);
|
10290
11327
|
}));
|
10291
11328
|
function totalRegisteredLicenseTerms() {
|
10292
11329
|
return _totalRegisteredLicenseTerms.apply(this, arguments);
|
@@ -10303,11 +11340,11 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10303
11340
|
}, {
|
10304
11341
|
key: "verifyCompatibleLicenses",
|
10305
11342
|
value: (function () {
|
10306
|
-
var _verifyCompatibleLicenses = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10307
|
-
return _regeneratorRuntime().wrap(function
|
10308
|
-
while (1) switch (
|
11343
|
+
var _verifyCompatibleLicenses = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(request) {
|
11344
|
+
return _regeneratorRuntime().wrap(function _callee72$(_context72) {
|
11345
|
+
while (1) switch (_context72.prev = _context72.next) {
|
10309
11346
|
case 0:
|
10310
|
-
|
11347
|
+
_context72.next = 2;
|
10311
11348
|
return this.rpcClient.readContract({
|
10312
11349
|
abi: piLicenseTemplateAbi,
|
10313
11350
|
address: this.address,
|
@@ -10315,14 +11352,14 @@ var PiLicenseTemplateReadOnlyClient = /*#__PURE__*/function (_PiLicenseTemplateE
|
|
10315
11352
|
args: [request.licenseTermsIds]
|
10316
11353
|
});
|
10317
11354
|
case 2:
|
10318
|
-
return
|
11355
|
+
return _context72.abrupt("return", _context72.sent);
|
10319
11356
|
case 3:
|
10320
11357
|
case "end":
|
10321
|
-
return
|
11358
|
+
return _context72.stop();
|
10322
11359
|
}
|
10323
|
-
},
|
11360
|
+
}, _callee72, this);
|
10324
11361
|
}));
|
10325
|
-
function verifyCompatibleLicenses(
|
11362
|
+
function verifyCompatibleLicenses(_x55) {
|
10326
11363
|
return _verifyCompatibleLicenses.apply(this, arguments);
|
10327
11364
|
}
|
10328
11365
|
return verifyCompatibleLicenses;
|
@@ -10352,12 +11389,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10352
11389
|
return _createClass(PiLicenseTemplateClient, [{
|
10353
11390
|
key: "initialize",
|
10354
11391
|
value: (function () {
|
10355
|
-
var _initialize2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11392
|
+
var _initialize2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(request) {
|
10356
11393
|
var _yield$this$rpcClient28, call;
|
10357
|
-
return _regeneratorRuntime().wrap(function
|
10358
|
-
while (1) switch (
|
11394
|
+
return _regeneratorRuntime().wrap(function _callee73$(_context73) {
|
11395
|
+
while (1) switch (_context73.prev = _context73.next) {
|
10359
11396
|
case 0:
|
10360
|
-
|
11397
|
+
_context73.next = 2;
|
10361
11398
|
return this.rpcClient.simulateContract({
|
10362
11399
|
abi: piLicenseTemplateAbi,
|
10363
11400
|
address: this.address,
|
@@ -10366,19 +11403,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10366
11403
|
args: [request.name, request.metadataURI]
|
10367
11404
|
});
|
10368
11405
|
case 2:
|
10369
|
-
_yield$this$rpcClient28 =
|
11406
|
+
_yield$this$rpcClient28 = _context73.sent;
|
10370
11407
|
call = _yield$this$rpcClient28.request;
|
10371
|
-
|
11408
|
+
_context73.next = 6;
|
10372
11409
|
return this.wallet.writeContract(call);
|
10373
11410
|
case 6:
|
10374
|
-
return
|
11411
|
+
return _context73.abrupt("return", _context73.sent);
|
10375
11412
|
case 7:
|
10376
11413
|
case "end":
|
10377
|
-
return
|
11414
|
+
return _context73.stop();
|
10378
11415
|
}
|
10379
|
-
},
|
11416
|
+
}, _callee73, this);
|
10380
11417
|
}));
|
10381
|
-
function initialize(
|
11418
|
+
function initialize(_x56) {
|
10382
11419
|
return _initialize2.apply(this, arguments);
|
10383
11420
|
}
|
10384
11421
|
return initialize;
|
@@ -10393,12 +11430,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10393
11430
|
}, {
|
10394
11431
|
key: "registerLicenseTerms",
|
10395
11432
|
value: (function () {
|
10396
|
-
var _registerLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11433
|
+
var _registerLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(request) {
|
10397
11434
|
var _yield$this$rpcClient29, call;
|
10398
|
-
return _regeneratorRuntime().wrap(function
|
10399
|
-
while (1) switch (
|
11435
|
+
return _regeneratorRuntime().wrap(function _callee74$(_context74) {
|
11436
|
+
while (1) switch (_context74.prev = _context74.next) {
|
10400
11437
|
case 0:
|
10401
|
-
|
11438
|
+
_context74.next = 2;
|
10402
11439
|
return this.rpcClient.simulateContract({
|
10403
11440
|
abi: piLicenseTemplateAbi,
|
10404
11441
|
address: this.address,
|
@@ -10407,19 +11444,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10407
11444
|
args: [request.terms]
|
10408
11445
|
});
|
10409
11446
|
case 2:
|
10410
|
-
_yield$this$rpcClient29 =
|
11447
|
+
_yield$this$rpcClient29 = _context74.sent;
|
10411
11448
|
call = _yield$this$rpcClient29.request;
|
10412
|
-
|
11449
|
+
_context74.next = 6;
|
10413
11450
|
return this.wallet.writeContract(call);
|
10414
11451
|
case 6:
|
10415
|
-
return
|
11452
|
+
return _context74.abrupt("return", _context74.sent);
|
10416
11453
|
case 7:
|
10417
11454
|
case "end":
|
10418
|
-
return
|
11455
|
+
return _context74.stop();
|
10419
11456
|
}
|
10420
|
-
},
|
11457
|
+
}, _callee74, this);
|
10421
11458
|
}));
|
10422
|
-
function registerLicenseTerms(
|
11459
|
+
function registerLicenseTerms(_x57) {
|
10423
11460
|
return _registerLicenseTerms.apply(this, arguments);
|
10424
11461
|
}
|
10425
11462
|
return registerLicenseTerms;
|
@@ -10434,12 +11471,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10434
11471
|
}, {
|
10435
11472
|
key: "setApproval",
|
10436
11473
|
value: (function () {
|
10437
|
-
var _setApproval = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11474
|
+
var _setApproval = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(request) {
|
10438
11475
|
var _yield$this$rpcClient30, call;
|
10439
|
-
return _regeneratorRuntime().wrap(function
|
10440
|
-
while (1) switch (
|
11476
|
+
return _regeneratorRuntime().wrap(function _callee75$(_context75) {
|
11477
|
+
while (1) switch (_context75.prev = _context75.next) {
|
10441
11478
|
case 0:
|
10442
|
-
|
11479
|
+
_context75.next = 2;
|
10443
11480
|
return this.rpcClient.simulateContract({
|
10444
11481
|
abi: piLicenseTemplateAbi,
|
10445
11482
|
address: this.address,
|
@@ -10448,19 +11485,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10448
11485
|
args: [request.licenseTokenId, request.childIpId, request.approved]
|
10449
11486
|
});
|
10450
11487
|
case 2:
|
10451
|
-
_yield$this$rpcClient30 =
|
11488
|
+
_yield$this$rpcClient30 = _context75.sent;
|
10452
11489
|
call = _yield$this$rpcClient30.request;
|
10453
|
-
|
11490
|
+
_context75.next = 6;
|
10454
11491
|
return this.wallet.writeContract(call);
|
10455
11492
|
case 6:
|
10456
|
-
return
|
11493
|
+
return _context75.abrupt("return", _context75.sent);
|
10457
11494
|
case 7:
|
10458
11495
|
case "end":
|
10459
|
-
return
|
11496
|
+
return _context75.stop();
|
10460
11497
|
}
|
10461
|
-
},
|
11498
|
+
}, _callee75, this);
|
10462
11499
|
}));
|
10463
|
-
function setApproval(
|
11500
|
+
function setApproval(_x58) {
|
10464
11501
|
return _setApproval.apply(this, arguments);
|
10465
11502
|
}
|
10466
11503
|
return setApproval;
|
@@ -10475,12 +11512,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10475
11512
|
}, {
|
10476
11513
|
key: "verifyMintLicenseToken",
|
10477
11514
|
value: (function () {
|
10478
|
-
var _verifyMintLicenseToken2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11515
|
+
var _verifyMintLicenseToken2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(request) {
|
10479
11516
|
var _yield$this$rpcClient31, call;
|
10480
|
-
return _regeneratorRuntime().wrap(function
|
10481
|
-
while (1) switch (
|
11517
|
+
return _regeneratorRuntime().wrap(function _callee76$(_context76) {
|
11518
|
+
while (1) switch (_context76.prev = _context76.next) {
|
10482
11519
|
case 0:
|
10483
|
-
|
11520
|
+
_context76.next = 2;
|
10484
11521
|
return this.rpcClient.simulateContract({
|
10485
11522
|
abi: piLicenseTemplateAbi,
|
10486
11523
|
address: this.address,
|
@@ -10489,19 +11526,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10489
11526
|
args: [request[0], request[1], request[2], request[3]]
|
10490
11527
|
});
|
10491
11528
|
case 2:
|
10492
|
-
_yield$this$rpcClient31 =
|
11529
|
+
_yield$this$rpcClient31 = _context76.sent;
|
10493
11530
|
call = _yield$this$rpcClient31.request;
|
10494
|
-
|
11531
|
+
_context76.next = 6;
|
10495
11532
|
return this.wallet.writeContract(call);
|
10496
11533
|
case 6:
|
10497
|
-
return
|
11534
|
+
return _context76.abrupt("return", _context76.sent);
|
10498
11535
|
case 7:
|
10499
11536
|
case "end":
|
10500
|
-
return
|
11537
|
+
return _context76.stop();
|
10501
11538
|
}
|
10502
|
-
},
|
11539
|
+
}, _callee76, this);
|
10503
11540
|
}));
|
10504
|
-
function verifyMintLicenseToken(
|
11541
|
+
function verifyMintLicenseToken(_x59) {
|
10505
11542
|
return _verifyMintLicenseToken2.apply(this, arguments);
|
10506
11543
|
}
|
10507
11544
|
return verifyMintLicenseToken;
|
@@ -10516,12 +11553,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10516
11553
|
}, {
|
10517
11554
|
key: "verifyRegisterDerivative",
|
10518
11555
|
value: (function () {
|
10519
|
-
var _verifyRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11556
|
+
var _verifyRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(request) {
|
10520
11557
|
var _yield$this$rpcClient32, call;
|
10521
|
-
return _regeneratorRuntime().wrap(function
|
10522
|
-
while (1) switch (
|
11558
|
+
return _regeneratorRuntime().wrap(function _callee77$(_context77) {
|
11559
|
+
while (1) switch (_context77.prev = _context77.next) {
|
10523
11560
|
case 0:
|
10524
|
-
|
11561
|
+
_context77.next = 2;
|
10525
11562
|
return this.rpcClient.simulateContract({
|
10526
11563
|
abi: piLicenseTemplateAbi,
|
10527
11564
|
address: this.address,
|
@@ -10530,19 +11567,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10530
11567
|
args: [request.childIpId, request.parentIpId, request.licenseTermsId, request.licensee]
|
10531
11568
|
});
|
10532
11569
|
case 2:
|
10533
|
-
_yield$this$rpcClient32 =
|
11570
|
+
_yield$this$rpcClient32 = _context77.sent;
|
10534
11571
|
call = _yield$this$rpcClient32.request;
|
10535
|
-
|
11572
|
+
_context77.next = 6;
|
10536
11573
|
return this.wallet.writeContract(call);
|
10537
11574
|
case 6:
|
10538
|
-
return
|
11575
|
+
return _context77.abrupt("return", _context77.sent);
|
10539
11576
|
case 7:
|
10540
11577
|
case "end":
|
10541
|
-
return
|
11578
|
+
return _context77.stop();
|
10542
11579
|
}
|
10543
|
-
},
|
11580
|
+
}, _callee77, this);
|
10544
11581
|
}));
|
10545
|
-
function verifyRegisterDerivative(
|
11582
|
+
function verifyRegisterDerivative(_x60) {
|
10546
11583
|
return _verifyRegisterDerivative.apply(this, arguments);
|
10547
11584
|
}
|
10548
11585
|
return verifyRegisterDerivative;
|
@@ -10557,12 +11594,12 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10557
11594
|
}, {
|
10558
11595
|
key: "verifyRegisterDerivativeForAllParents",
|
10559
11596
|
value: (function () {
|
10560
|
-
var _verifyRegisterDerivativeForAllParents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11597
|
+
var _verifyRegisterDerivativeForAllParents = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(request) {
|
10561
11598
|
var _yield$this$rpcClient33, call;
|
10562
|
-
return _regeneratorRuntime().wrap(function
|
10563
|
-
while (1) switch (
|
11599
|
+
return _regeneratorRuntime().wrap(function _callee78$(_context78) {
|
11600
|
+
while (1) switch (_context78.prev = _context78.next) {
|
10564
11601
|
case 0:
|
10565
|
-
|
11602
|
+
_context78.next = 2;
|
10566
11603
|
return this.rpcClient.simulateContract({
|
10567
11604
|
abi: piLicenseTemplateAbi,
|
10568
11605
|
address: this.address,
|
@@ -10571,19 +11608,19 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10571
11608
|
args: [request.childIpId, request.parentIpIds, request.licenseTermsIds, request.childIpOwner]
|
10572
11609
|
});
|
10573
11610
|
case 2:
|
10574
|
-
_yield$this$rpcClient33 =
|
11611
|
+
_yield$this$rpcClient33 = _context78.sent;
|
10575
11612
|
call = _yield$this$rpcClient33.request;
|
10576
|
-
|
11613
|
+
_context78.next = 6;
|
10577
11614
|
return this.wallet.writeContract(call);
|
10578
11615
|
case 6:
|
10579
|
-
return
|
11616
|
+
return _context78.abrupt("return", _context78.sent);
|
10580
11617
|
case 7:
|
10581
11618
|
case "end":
|
10582
|
-
return
|
11619
|
+
return _context78.stop();
|
10583
11620
|
}
|
10584
|
-
},
|
11621
|
+
}, _callee78, this);
|
10585
11622
|
}));
|
10586
|
-
function verifyRegisterDerivativeForAllParents(
|
11623
|
+
function verifyRegisterDerivativeForAllParents(_x61) {
|
10587
11624
|
return _verifyRegisterDerivativeForAllParents.apply(this, arguments);
|
10588
11625
|
}
|
10589
11626
|
return verifyRegisterDerivativeForAllParents;
|
@@ -10607,9 +11644,9 @@ var PiLicenseTemplateClient = /*#__PURE__*/function (_PiLicenseTemplateRea) {
|
|
10607
11644
|
*/
|
10608
11645
|
var RoyaltyModuleClient = /*#__PURE__*/function () {
|
10609
11646
|
function RoyaltyModuleClient(rpcClient, wallet, address) {
|
10610
|
-
var _rpcClient$
|
11647
|
+
var _rpcClient$chain11;
|
10611
11648
|
_classCallCheck(this, RoyaltyModuleClient);
|
10612
|
-
this.address = address || getAddress(royaltyModuleAddress, (_rpcClient$
|
11649
|
+
this.address = address || getAddress(royaltyModuleAddress, (_rpcClient$chain11 = rpcClient.chain) === null || _rpcClient$chain11 === void 0 ? void 0 : _rpcClient$chain11.id);
|
10613
11650
|
this.rpcClient = rpcClient;
|
10614
11651
|
this.wallet = wallet;
|
10615
11652
|
}
|
@@ -10623,12 +11660,12 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
|
|
10623
11660
|
return _createClass(RoyaltyModuleClient, [{
|
10624
11661
|
key: "payRoyaltyOnBehalf",
|
10625
11662
|
value: (function () {
|
10626
|
-
var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11663
|
+
var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(request) {
|
10627
11664
|
var _yield$this$rpcClient34, call;
|
10628
|
-
return _regeneratorRuntime().wrap(function
|
10629
|
-
while (1) switch (
|
11665
|
+
return _regeneratorRuntime().wrap(function _callee79$(_context79) {
|
11666
|
+
while (1) switch (_context79.prev = _context79.next) {
|
10630
11667
|
case 0:
|
10631
|
-
|
11668
|
+
_context79.next = 2;
|
10632
11669
|
return this.rpcClient.simulateContract({
|
10633
11670
|
abi: royaltyModuleAbi,
|
10634
11671
|
address: this.address,
|
@@ -10637,19 +11674,19 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
|
|
10637
11674
|
args: [request.receiverIpId, request.payerIpId, request.token, request.amount]
|
10638
11675
|
});
|
10639
11676
|
case 2:
|
10640
|
-
_yield$this$rpcClient34 =
|
11677
|
+
_yield$this$rpcClient34 = _context79.sent;
|
10641
11678
|
call = _yield$this$rpcClient34.request;
|
10642
|
-
|
11679
|
+
_context79.next = 6;
|
10643
11680
|
return this.wallet.writeContract(call);
|
10644
11681
|
case 6:
|
10645
|
-
return
|
11682
|
+
return _context79.abrupt("return", _context79.sent);
|
10646
11683
|
case 7:
|
10647
11684
|
case "end":
|
10648
|
-
return
|
11685
|
+
return _context79.stop();
|
10649
11686
|
}
|
10650
|
-
},
|
11687
|
+
}, _callee79, this);
|
10651
11688
|
}));
|
10652
|
-
function payRoyaltyOnBehalf(
|
11689
|
+
function payRoyaltyOnBehalf(_x62) {
|
10653
11690
|
return _payRoyaltyOnBehalf.apply(this, arguments);
|
10654
11691
|
}
|
10655
11692
|
return payRoyaltyOnBehalf;
|
@@ -10689,9 +11726,9 @@ var RoyaltyModuleClient = /*#__PURE__*/function () {
|
|
10689
11726
|
*/
|
10690
11727
|
var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
|
10691
11728
|
function RoyaltyPolicyLapReadOnlyClient(rpcClient, address) {
|
10692
|
-
var _rpcClient$
|
11729
|
+
var _rpcClient$chain12;
|
10693
11730
|
_classCallCheck(this, RoyaltyPolicyLapReadOnlyClient);
|
10694
|
-
this.address = address || getAddress(royaltyPolicyLapAddress, (_rpcClient$
|
11731
|
+
this.address = address || getAddress(royaltyPolicyLapAddress, (_rpcClient$chain12 = rpcClient.chain) === null || _rpcClient$chain12 === void 0 ? void 0 : _rpcClient$chain12.id);
|
10695
11732
|
this.rpcClient = rpcClient;
|
10696
11733
|
}
|
10697
11734
|
|
@@ -10704,11 +11741,11 @@ var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
|
|
10704
11741
|
return _createClass(RoyaltyPolicyLapReadOnlyClient, [{
|
10705
11742
|
key: "getRoyaltyData",
|
10706
11743
|
value: (function () {
|
10707
|
-
var _getRoyaltyData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
10708
|
-
return _regeneratorRuntime().wrap(function
|
10709
|
-
while (1) switch (
|
11744
|
+
var _getRoyaltyData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(request) {
|
11745
|
+
return _regeneratorRuntime().wrap(function _callee80$(_context80) {
|
11746
|
+
while (1) switch (_context80.prev = _context80.next) {
|
10710
11747
|
case 0:
|
10711
|
-
|
11748
|
+
_context80.next = 2;
|
10712
11749
|
return this.rpcClient.readContract({
|
10713
11750
|
abi: royaltyPolicyLapAbi,
|
10714
11751
|
address: this.address,
|
@@ -10716,14 +11753,14 @@ var RoyaltyPolicyLapReadOnlyClient = /*#__PURE__*/function () {
|
|
10716
11753
|
args: [request.ipId]
|
10717
11754
|
});
|
10718
11755
|
case 2:
|
10719
|
-
return
|
11756
|
+
return _context80.abrupt("return", _context80.sent);
|
10720
11757
|
case 3:
|
10721
11758
|
case "end":
|
10722
|
-
return
|
11759
|
+
return _context80.stop();
|
10723
11760
|
}
|
10724
|
-
},
|
11761
|
+
}, _callee80, this);
|
10725
11762
|
}));
|
10726
|
-
function getRoyaltyData(
|
11763
|
+
function getRoyaltyData(_x63) {
|
10727
11764
|
return _getRoyaltyData.apply(this, arguments);
|
10728
11765
|
}
|
10729
11766
|
return getRoyaltyData;
|
@@ -10753,12 +11790,12 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
|
|
10753
11790
|
return _createClass(RoyaltyPolicyLapClient, [{
|
10754
11791
|
key: "onRoyaltyPayment",
|
10755
11792
|
value: (function () {
|
10756
|
-
var _onRoyaltyPayment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
11793
|
+
var _onRoyaltyPayment = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(request) {
|
10757
11794
|
var _yield$this$rpcClient35, call;
|
10758
|
-
return _regeneratorRuntime().wrap(function
|
10759
|
-
while (1) switch (
|
11795
|
+
return _regeneratorRuntime().wrap(function _callee81$(_context81) {
|
11796
|
+
while (1) switch (_context81.prev = _context81.next) {
|
10760
11797
|
case 0:
|
10761
|
-
|
11798
|
+
_context81.next = 2;
|
10762
11799
|
return this.rpcClient.simulateContract({
|
10763
11800
|
abi: royaltyPolicyLapAbi,
|
10764
11801
|
address: this.address,
|
@@ -10767,19 +11804,19 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
|
|
10767
11804
|
args: [request.caller, request.ipId, request.token, request.amount]
|
10768
11805
|
});
|
10769
11806
|
case 2:
|
10770
|
-
_yield$this$rpcClient35 =
|
11807
|
+
_yield$this$rpcClient35 = _context81.sent;
|
10771
11808
|
call = _yield$this$rpcClient35.request;
|
10772
|
-
|
11809
|
+
_context81.next = 6;
|
10773
11810
|
return this.wallet.writeContract(call);
|
10774
11811
|
case 6:
|
10775
|
-
return
|
11812
|
+
return _context81.abrupt("return", _context81.sent);
|
10776
11813
|
case 7:
|
10777
11814
|
case "end":
|
10778
|
-
return
|
11815
|
+
return _context81.stop();
|
10779
11816
|
}
|
10780
|
-
},
|
11817
|
+
}, _callee81, this);
|
10781
11818
|
}));
|
10782
|
-
function onRoyaltyPayment(
|
11819
|
+
function onRoyaltyPayment(_x64) {
|
10783
11820
|
return _onRoyaltyPayment.apply(this, arguments);
|
10784
11821
|
}
|
10785
11822
|
return onRoyaltyPayment;
|
@@ -10790,20 +11827,21 @@ var RoyaltyPolicyLapClient = /*#__PURE__*/function (_RoyaltyPolicyLapRead) {
|
|
10790
11827
|
var IPAssetClient = /*#__PURE__*/function () {
|
10791
11828
|
function IPAssetClient(rpcClient, wallet, chainId) {
|
10792
11829
|
_classCallCheck(this, IPAssetClient);
|
11830
|
+
this.licensingModuleClient = new LicensingModuleClient(rpcClient, wallet);
|
11831
|
+
this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
|
11832
|
+
this.licenseTemplateClient = new PiLicenseTemplateClient(rpcClient, wallet);
|
11833
|
+
this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(rpcClient);
|
11834
|
+
this.licenseTokenReadOnlyClient = new LicenseTokenReadOnlyClient(rpcClient);
|
10793
11835
|
this.rpcClient = rpcClient;
|
10794
11836
|
this.chainId = chainId;
|
10795
|
-
this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
|
10796
|
-
this.licensingModuleClient = new LicensingModuleClient(this.rpcClient, wallet);
|
10797
|
-
this.licenseTemplateClient = new PiLicenseTemplateClient(this.rpcClient, wallet);
|
10798
|
-
this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(this.rpcClient);
|
10799
11837
|
}
|
10800
11838
|
|
10801
11839
|
/**
|
10802
11840
|
* Registers an NFT as IP, creating a corresponding IP record.
|
10803
11841
|
* @param request The request object that contains all data needed to register IP.
|
10804
|
-
*
|
10805
|
-
*
|
10806
|
-
*
|
11842
|
+
* @param request.tokenContract The address of the NFT.
|
11843
|
+
* @param request.tokenId The token identifier of the NFT.
|
11844
|
+
* @param request.txOptions [Optional] The transaction options.
|
10807
11845
|
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
10808
11846
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
10809
11847
|
*/
|
@@ -10880,10 +11918,10 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
10880
11918
|
* All IPs attached default license terms by default.
|
10881
11919
|
* The derivative IP owner must be the caller or an authorized operator.
|
10882
11920
|
* @param request The request object that contains all data needed to register derivative IP.
|
10883
|
-
*
|
10884
|
-
*
|
10885
|
-
*
|
10886
|
-
*
|
11921
|
+
* @param request.childIpId The derivative IP ID.
|
11922
|
+
* @param request.parentIpIds The parent IP IDs.
|
11923
|
+
* @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
11924
|
+
* @param request.txOptions [Optional] The transaction options.
|
10887
11925
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
10888
11926
|
*/
|
10889
11927
|
)
|
@@ -10891,83 +11929,85 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
10891
11929
|
key: "registerDerivative",
|
10892
11930
|
value: (function () {
|
10893
11931
|
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
10894
|
-
var _request$txOptions2, _iterator, _step, parentId, i, isAttachedLicenseTerms, txHash;
|
11932
|
+
var _request$txOptions2, isChildIpIdRegistered, _iterator, _step, parentId, isParentIpIdRegistered, i, isAttachedLicenseTerms, txHash;
|
10895
11933
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
10896
11934
|
while (1) switch (_context2.prev = _context2.next) {
|
10897
11935
|
case 0:
|
10898
11936
|
_context2.prev = 0;
|
10899
11937
|
_context2.next = 3;
|
10900
|
-
return this.
|
11938
|
+
return this.isRegistered(request.childIpId);
|
10901
11939
|
case 3:
|
10902
|
-
|
10903
|
-
|
11940
|
+
isChildIpIdRegistered = _context2.sent;
|
11941
|
+
if (isChildIpIdRegistered) {
|
11942
|
+
_context2.next = 6;
|
10904
11943
|
break;
|
10905
11944
|
}
|
10906
|
-
throw new Error("IP
|
10907
|
-
case
|
11945
|
+
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
11946
|
+
case 6:
|
10908
11947
|
_iterator = _createForOfIteratorHelper(request.parentIpIds);
|
10909
|
-
_context2.prev =
|
11948
|
+
_context2.prev = 7;
|
10910
11949
|
_iterator.s();
|
10911
|
-
case
|
11950
|
+
case 9:
|
10912
11951
|
if ((_step = _iterator.n()).done) {
|
10913
|
-
_context2.next =
|
11952
|
+
_context2.next = 18;
|
10914
11953
|
break;
|
10915
11954
|
}
|
10916
11955
|
parentId = _step.value;
|
10917
|
-
_context2.next =
|
10918
|
-
return this.
|
10919
|
-
case
|
10920
|
-
|
10921
|
-
|
11956
|
+
_context2.next = 13;
|
11957
|
+
return this.isRegistered(parentId);
|
11958
|
+
case 13:
|
11959
|
+
isParentIpIdRegistered = _context2.sent;
|
11960
|
+
if (isParentIpIdRegistered) {
|
11961
|
+
_context2.next = 16;
|
10922
11962
|
break;
|
10923
11963
|
}
|
10924
|
-
throw new Error("
|
10925
|
-
case 14:
|
10926
|
-
_context2.next = 8;
|
10927
|
-
break;
|
11964
|
+
throw new Error("The parent IP with id ".concat(parentId, " is not registered."));
|
10928
11965
|
case 16:
|
10929
|
-
_context2.next =
|
11966
|
+
_context2.next = 9;
|
10930
11967
|
break;
|
10931
11968
|
case 18:
|
10932
|
-
_context2.
|
10933
|
-
|
11969
|
+
_context2.next = 23;
|
11970
|
+
break;
|
11971
|
+
case 20:
|
11972
|
+
_context2.prev = 20;
|
11973
|
+
_context2.t0 = _context2["catch"](7);
|
10934
11974
|
_iterator.e(_context2.t0);
|
10935
|
-
case
|
10936
|
-
_context2.prev =
|
11975
|
+
case 23:
|
11976
|
+
_context2.prev = 23;
|
10937
11977
|
_iterator.f();
|
10938
|
-
return _context2.finish(
|
10939
|
-
case
|
11978
|
+
return _context2.finish(23);
|
11979
|
+
case 26:
|
10940
11980
|
if (!(request.parentIpIds.length !== request.licenseTermsIds.length)) {
|
10941
|
-
_context2.next =
|
11981
|
+
_context2.next = 28;
|
10942
11982
|
break;
|
10943
11983
|
}
|
10944
|
-
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs");
|
10945
|
-
case
|
11984
|
+
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
11985
|
+
case 28:
|
10946
11986
|
i = 0;
|
10947
|
-
case
|
11987
|
+
case 29:
|
10948
11988
|
if (!(i < request.parentIpIds.length)) {
|
10949
|
-
_context2.next =
|
11989
|
+
_context2.next = 38;
|
10950
11990
|
break;
|
10951
11991
|
}
|
10952
|
-
_context2.next =
|
11992
|
+
_context2.next = 32;
|
10953
11993
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
10954
11994
|
ipId: request.parentIpIds[i],
|
10955
11995
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
10956
11996
|
licenseTermsId: BigInt(request.licenseTermsIds[i])
|
10957
11997
|
});
|
10958
|
-
case
|
11998
|
+
case 32:
|
10959
11999
|
isAttachedLicenseTerms = _context2.sent;
|
10960
12000
|
if (isAttachedLicenseTerms) {
|
10961
|
-
_context2.next =
|
12001
|
+
_context2.next = 35;
|
10962
12002
|
break;
|
10963
12003
|
}
|
10964
|
-
throw new Error("License terms must be attached to the parent ipId before registering derivative");
|
10965
|
-
case
|
12004
|
+
throw new Error("License terms id ".concat(request.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.parentIpIds[i], " before registering derivative."));
|
12005
|
+
case 35:
|
10966
12006
|
i++;
|
10967
|
-
_context2.next =
|
12007
|
+
_context2.next = 29;
|
10968
12008
|
break;
|
10969
|
-
case
|
10970
|
-
_context2.next =
|
12009
|
+
case 38:
|
12010
|
+
_context2.next = 40;
|
10971
12011
|
return this.licensingModuleClient.registerDerivative({
|
10972
12012
|
childIpId: request.childIpId,
|
10973
12013
|
parentIpIds: request.parentIpIds,
|
@@ -10977,36 +12017,36 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
10977
12017
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
10978
12018
|
royaltyContext: zeroAddress
|
10979
12019
|
});
|
10980
|
-
case
|
12020
|
+
case 40:
|
10981
12021
|
txHash = _context2.sent;
|
10982
12022
|
if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
|
10983
|
-
_context2.next =
|
12023
|
+
_context2.next = 47;
|
10984
12024
|
break;
|
10985
12025
|
}
|
10986
|
-
_context2.next =
|
12026
|
+
_context2.next = 44;
|
10987
12027
|
return this.rpcClient.waitForTransactionReceipt({
|
10988
12028
|
hash: txHash
|
10989
12029
|
});
|
10990
|
-
case
|
12030
|
+
case 44:
|
10991
12031
|
return _context2.abrupt("return", {
|
10992
12032
|
txHash: txHash
|
10993
12033
|
});
|
10994
|
-
case
|
12034
|
+
case 47:
|
10995
12035
|
return _context2.abrupt("return", {
|
10996
12036
|
txHash: txHash
|
10997
12037
|
});
|
10998
|
-
case 46:
|
10999
|
-
_context2.next = 51;
|
11000
|
-
break;
|
11001
12038
|
case 48:
|
11002
|
-
_context2.
|
12039
|
+
_context2.next = 53;
|
12040
|
+
break;
|
12041
|
+
case 50:
|
12042
|
+
_context2.prev = 50;
|
11003
12043
|
_context2.t1 = _context2["catch"](0);
|
11004
12044
|
handleError(_context2.t1, "Failed to register derivative");
|
11005
|
-
case
|
12045
|
+
case 53:
|
11006
12046
|
case "end":
|
11007
12047
|
return _context2.stop();
|
11008
12048
|
}
|
11009
|
-
}, _callee2, this, [[0,
|
12049
|
+
}, _callee2, this, [[0, 50], [7, 20, 23, 26]]);
|
11010
12050
|
}));
|
11011
12051
|
function registerDerivative(_x2) {
|
11012
12052
|
return _registerDerivative.apply(this, arguments);
|
@@ -11019,9 +12059,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
11019
12059
|
* the license terms of the parent IPs issued with license tokens are attached to the derivative IP.
|
11020
12060
|
* the caller must be the derivative IP owner or an authorized operator.
|
11021
12061
|
* @param request The request object that contains all data needed to register derivative license tokens.
|
11022
|
-
*
|
11023
|
-
*
|
11024
|
-
*
|
12062
|
+
* @param request.childIpId The derivative IP ID.
|
12063
|
+
* @param request.licenseTokenIds The IDs of the license tokens.
|
12064
|
+
* @param request.txOptions [Optional] The transaction options.
|
11025
12065
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
11026
12066
|
*/
|
11027
12067
|
)
|
@@ -11029,21 +12069,57 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
11029
12069
|
key: "registerDerivativeWithLicenseTokens",
|
11030
12070
|
value: (function () {
|
11031
12071
|
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
11032
|
-
var _request$txOptions3, txHash;
|
12072
|
+
var _request$txOptions3, isChildIpIdRegistered, _iterator2, _step2, licenseTokenId, tokenOwnerAddress, txHash;
|
11033
12073
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
11034
12074
|
while (1) switch (_context3.prev = _context3.next) {
|
11035
12075
|
case 0:
|
11036
12076
|
_context3.prev = 0;
|
11037
12077
|
_context3.next = 3;
|
11038
|
-
return this.
|
12078
|
+
return this.isRegistered(request.childIpId);
|
11039
12079
|
case 3:
|
11040
|
-
|
11041
|
-
|
12080
|
+
isChildIpIdRegistered = _context3.sent;
|
12081
|
+
if (isChildIpIdRegistered) {
|
12082
|
+
_context3.next = 6;
|
11042
12083
|
break;
|
11043
12084
|
}
|
11044
|
-
throw new Error("
|
11045
|
-
case
|
11046
|
-
|
12085
|
+
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
12086
|
+
case 6:
|
12087
|
+
_iterator2 = _createForOfIteratorHelper(request.licenseTokenIds);
|
12088
|
+
_context3.prev = 7;
|
12089
|
+
_iterator2.s();
|
12090
|
+
case 9:
|
12091
|
+
if ((_step2 = _iterator2.n()).done) {
|
12092
|
+
_context3.next = 18;
|
12093
|
+
break;
|
12094
|
+
}
|
12095
|
+
licenseTokenId = _step2.value;
|
12096
|
+
_context3.next = 13;
|
12097
|
+
return this.licenseTokenReadOnlyClient.ownerOf({
|
12098
|
+
tokenId: BigInt(licenseTokenId)
|
12099
|
+
});
|
12100
|
+
case 13:
|
12101
|
+
tokenOwnerAddress = _context3.sent;
|
12102
|
+
if (tokenOwnerAddress) {
|
12103
|
+
_context3.next = 16;
|
12104
|
+
break;
|
12105
|
+
}
|
12106
|
+
throw new Error("License token id ".concat(licenseTokenId, " must be owned by the caller."));
|
12107
|
+
case 16:
|
12108
|
+
_context3.next = 9;
|
12109
|
+
break;
|
12110
|
+
case 18:
|
12111
|
+
_context3.next = 23;
|
12112
|
+
break;
|
12113
|
+
case 20:
|
12114
|
+
_context3.prev = 20;
|
12115
|
+
_context3.t0 = _context3["catch"](7);
|
12116
|
+
_iterator2.e(_context3.t0);
|
12117
|
+
case 23:
|
12118
|
+
_context3.prev = 23;
|
12119
|
+
_iterator2.f();
|
12120
|
+
return _context3.finish(23);
|
12121
|
+
case 26:
|
12122
|
+
_context3.next = 28;
|
11047
12123
|
return this.licensingModuleClient.registerDerivativeWithLicenseTokens({
|
11048
12124
|
childIpId: request.childIpId,
|
11049
12125
|
licenseTokenIds: request.licenseTokenIds.map(function (id) {
|
@@ -11051,36 +12127,36 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
11051
12127
|
}),
|
11052
12128
|
royaltyContext: zeroAddress
|
11053
12129
|
});
|
11054
|
-
case
|
12130
|
+
case 28:
|
11055
12131
|
txHash = _context3.sent;
|
11056
12132
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
|
11057
|
-
_context3.next =
|
12133
|
+
_context3.next = 35;
|
11058
12134
|
break;
|
11059
12135
|
}
|
11060
|
-
_context3.next =
|
12136
|
+
_context3.next = 32;
|
11061
12137
|
return this.rpcClient.waitForTransactionReceipt({
|
11062
12138
|
hash: txHash
|
11063
12139
|
});
|
11064
|
-
case
|
12140
|
+
case 32:
|
11065
12141
|
return _context3.abrupt("return", {
|
11066
12142
|
txHash: txHash
|
11067
12143
|
});
|
11068
|
-
case
|
12144
|
+
case 35:
|
11069
12145
|
return _context3.abrupt("return", {
|
11070
12146
|
txHash: txHash
|
11071
12147
|
});
|
11072
|
-
case
|
11073
|
-
_context3.next =
|
12148
|
+
case 36:
|
12149
|
+
_context3.next = 41;
|
11074
12150
|
break;
|
11075
|
-
case
|
11076
|
-
_context3.prev =
|
11077
|
-
_context3.
|
11078
|
-
handleError(_context3.
|
11079
|
-
case
|
12151
|
+
case 38:
|
12152
|
+
_context3.prev = 38;
|
12153
|
+
_context3.t1 = _context3["catch"](0);
|
12154
|
+
handleError(_context3.t1, "Failed to register derivative with license tokens");
|
12155
|
+
case 41:
|
11080
12156
|
case "end":
|
11081
12157
|
return _context3.stop();
|
11082
12158
|
}
|
11083
|
-
}, _callee3, this, [[0,
|
12159
|
+
}, _callee3, this, [[0, 38], [7, 20, 23, 26]]);
|
11084
12160
|
}));
|
11085
12161
|
function registerDerivativeWithLicenseTokens(_x3) {
|
11086
12162
|
return _registerDerivativeWithLicenseTokens.apply(this, arguments);
|
@@ -11122,9 +12198,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
11122
12198
|
return isNFTRegistered;
|
11123
12199
|
}()
|
11124
12200
|
}, {
|
11125
|
-
key: "
|
12201
|
+
key: "isRegistered",
|
11126
12202
|
value: function () {
|
11127
|
-
var
|
12203
|
+
var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ipId) {
|
11128
12204
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
11129
12205
|
while (1) switch (_context5.prev = _context5.next) {
|
11130
12206
|
case 0:
|
@@ -11140,10 +12216,10 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
11140
12216
|
}
|
11141
12217
|
}, _callee5, this);
|
11142
12218
|
}));
|
11143
|
-
function
|
11144
|
-
return
|
12219
|
+
function isRegistered(_x6) {
|
12220
|
+
return _isRegistered.apply(this, arguments);
|
11145
12221
|
}
|
11146
|
-
return
|
12222
|
+
return isRegistered;
|
11147
12223
|
}()
|
11148
12224
|
}]);
|
11149
12225
|
}();
|
@@ -11245,22 +12321,22 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
11245
12321
|
}();
|
11246
12322
|
|
11247
12323
|
var LicenseClient = /*#__PURE__*/function () {
|
11248
|
-
function LicenseClient(rpcClient, wallet
|
12324
|
+
function LicenseClient(rpcClient, wallet) {
|
11249
12325
|
_classCallCheck(this, LicenseClient);
|
11250
|
-
this.
|
11251
|
-
this.
|
11252
|
-
this.
|
11253
|
-
this.
|
11254
|
-
this.
|
11255
|
-
this.
|
11256
|
-
this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet);
|
11257
|
-
this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(this.rpcClient);
|
12326
|
+
this.licensingModuleClient = new LicensingModuleClient(rpcClient, wallet);
|
12327
|
+
this.licenseRegistryClient = new LicenseRegistryEventClient(rpcClient);
|
12328
|
+
this.piLicenseTemplateReadOnlyClient = new PiLicenseTemplateReadOnlyClient(rpcClient);
|
12329
|
+
this.licenseTemplateClient = new PiLicenseTemplateClient(rpcClient, wallet);
|
12330
|
+
this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(rpcClient, wallet);
|
12331
|
+
this.licenseRegistryReadOnlyClient = new LicenseRegistryReadOnlyClient(rpcClient);
|
11258
12332
|
this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
|
12333
|
+
this.rpcClient = rpcClient;
|
12334
|
+
this.wallet = wallet;
|
11259
12335
|
}
|
11260
12336
|
/**
|
11261
12337
|
* Convenient function to register a PIL non commercial social remix license to the registry
|
11262
|
-
* @param request The request object that contains all data needed to register a PIL non commercial social remix license.
|
11263
|
-
*
|
12338
|
+
* @param request [Optional] The request object that contains all data needed to register a PIL non commercial social remix license.
|
12339
|
+
* @param request.txOptions [Optional] The transaction options.
|
11264
12340
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
11265
12341
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
11266
12342
|
*/
|
@@ -11309,7 +12385,7 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11309
12385
|
});
|
11310
12386
|
case 9:
|
11311
12387
|
txHash = _context.sent;
|
11312
|
-
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
|
12388
|
+
if (!(request !== null && request !== void 0 && (_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
|
11313
12389
|
_context.next = 18;
|
11314
12390
|
break;
|
11315
12391
|
}
|
@@ -11349,11 +12425,10 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11349
12425
|
/**
|
11350
12426
|
* Convenient function to register a PIL commercial use license to the registry.
|
11351
12427
|
* @param request The request object that contains all data needed to register a PIL commercial use license.
|
11352
|
-
*
|
11353
|
-
*
|
11354
|
-
*
|
11355
|
-
*
|
11356
|
-
* @param request.txOptions [Optional] The transaction options.
|
12428
|
+
* @param request.mintingFee The fee to be paid when minting a license.
|
12429
|
+
* @param request.currency The ERC20 token to be used to pay the minting fee and the token must be registered in story protocol.
|
12430
|
+
* @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
12431
|
+
* @param request.txOptions [Optional] The transaction options.
|
11357
12432
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
11358
12433
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
11359
12434
|
*/
|
@@ -11443,11 +12518,11 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11443
12518
|
/**
|
11444
12519
|
* Convenient function to register a PIL commercial Remix license to the registry.
|
11445
12520
|
* @param request The request object that contains all data needed to register license.
|
11446
|
-
*
|
11447
|
-
*
|
11448
|
-
*
|
11449
|
-
*
|
11450
|
-
*
|
12521
|
+
* @param request.mintingFee The fee to be paid when minting a license.
|
12522
|
+
* @param request.commercialRevShare Percentage of revenue that must be shared with the licensor.
|
12523
|
+
* @param request.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
12524
|
+
* @param request.royaltyPolicy The address of the royalty policy contract which required to StoryProtocol in advance.
|
12525
|
+
* @param request.txOptions [Optional] The transaction options.
|
11451
12526
|
* @returns A Promise that resolves to an object containing the optional transaction hash and optional license terms Id.
|
11452
12527
|
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
|
11453
12528
|
*/
|
@@ -11537,14 +12612,10 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11537
12612
|
/**
|
11538
12613
|
* Attaches license terms to an IP.
|
11539
12614
|
* @param request The request object that contains all data needed to attach license terms.
|
11540
|
-
@param request.ipId The IP
|
11541
|
-
@param request.
|
11542
|
-
@param request.
|
11543
|
-
@param request.
|
11544
|
-
@param request.ipId The address of the IP to which the license terms are attached.
|
11545
|
-
@param request.licenseTemplate The address of the license template.
|
11546
|
-
@param request.licenseTermsId The ID of the license terms.
|
11547
|
-
* @param request.txOptions [Optional] The transaction options.
|
12615
|
+
* @param request.ipId The address of the IP to which the license terms are attached.
|
12616
|
+
* @param request.licenseTemplate The address of the license template.
|
12617
|
+
* @param request.licenseTermsId The ID of the license terms.
|
12618
|
+
* @param request.txOptions [Optional] The transaction options.
|
11548
12619
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
11549
12620
|
*/
|
11550
12621
|
)
|
@@ -11552,66 +12623,85 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11552
12623
|
key: "attachLicenseTerms",
|
11553
12624
|
value: (function () {
|
11554
12625
|
var _attachLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
|
11555
|
-
var _request$txOptions4;
|
11556
|
-
var isRegistered, isAttachedLicenseTerms, txHash;
|
12626
|
+
var _request$txOptions4, isRegistered, isExisted, isAttachedLicenseTerms, txHash;
|
11557
12627
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
11558
12628
|
while (1) switch (_context4.prev = _context4.next) {
|
11559
12629
|
case 0:
|
11560
|
-
_context4.
|
12630
|
+
_context4.prev = 0;
|
12631
|
+
_context4.next = 3;
|
11561
12632
|
return this.ipAssetRegistryClient.isRegistered({
|
11562
12633
|
id: request.ipId
|
11563
12634
|
});
|
11564
|
-
case
|
12635
|
+
case 3:
|
11565
12636
|
isRegistered = _context4.sent;
|
11566
12637
|
if (isRegistered) {
|
11567
|
-
_context4.next =
|
12638
|
+
_context4.next = 6;
|
11568
12639
|
break;
|
11569
12640
|
}
|
11570
|
-
throw new Error("IP
|
11571
|
-
case
|
11572
|
-
_context4.next =
|
12641
|
+
throw new Error("The IP with id ".concat(request.ipId, " is not registered."));
|
12642
|
+
case 6:
|
12643
|
+
_context4.next = 8;
|
12644
|
+
return this.piLicenseTemplateReadOnlyClient.exists({
|
12645
|
+
licenseTermsId: BigInt(request.licenseTermsId)
|
12646
|
+
});
|
12647
|
+
case 8:
|
12648
|
+
isExisted = _context4.sent;
|
12649
|
+
if (isExisted) {
|
12650
|
+
_context4.next = 11;
|
12651
|
+
break;
|
12652
|
+
}
|
12653
|
+
throw new Error("License terms id ".concat(request.licenseTermsId, " do not exist."));
|
12654
|
+
case 11:
|
12655
|
+
_context4.next = 13;
|
11573
12656
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
11574
12657
|
ipId: request.ipId,
|
11575
12658
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
11576
12659
|
licenseTermsId: BigInt(request.licenseTermsId)
|
11577
12660
|
});
|
11578
|
-
case
|
12661
|
+
case 13:
|
11579
12662
|
isAttachedLicenseTerms = _context4.sent;
|
11580
12663
|
if (!isAttachedLicenseTerms) {
|
11581
|
-
_context4.next =
|
12664
|
+
_context4.next = 16;
|
11582
12665
|
break;
|
11583
12666
|
}
|
11584
|
-
throw new Error("License terms
|
11585
|
-
case
|
11586
|
-
_context4.next =
|
12667
|
+
throw new Error("License terms id ".concat(request.licenseTermsId, " is already attached to the IP with id ").concat(request.ipId, "."));
|
12668
|
+
case 16:
|
12669
|
+
_context4.next = 18;
|
11587
12670
|
return this.licensingModuleClient.attachLicenseTerms({
|
11588
12671
|
ipId: request.ipId,
|
11589
12672
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
11590
12673
|
licenseTermsId: BigInt(request.licenseTermsId)
|
11591
12674
|
});
|
11592
|
-
case
|
12675
|
+
case 18:
|
11593
12676
|
txHash = _context4.sent;
|
11594
12677
|
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
11595
|
-
_context4.next =
|
12678
|
+
_context4.next = 25;
|
11596
12679
|
break;
|
11597
12680
|
}
|
11598
|
-
_context4.next =
|
12681
|
+
_context4.next = 22;
|
11599
12682
|
return this.rpcClient.waitForTransactionReceipt({
|
11600
12683
|
hash: txHash
|
11601
12684
|
});
|
11602
|
-
case
|
12685
|
+
case 22:
|
11603
12686
|
return _context4.abrupt("return", {
|
11604
12687
|
txHash: txHash
|
11605
12688
|
});
|
11606
|
-
case
|
12689
|
+
case 25:
|
11607
12690
|
return _context4.abrupt("return", {
|
11608
12691
|
txHash: txHash
|
11609
12692
|
});
|
11610
|
-
case
|
12693
|
+
case 26:
|
12694
|
+
_context4.next = 31;
|
12695
|
+
break;
|
12696
|
+
case 28:
|
12697
|
+
_context4.prev = 28;
|
12698
|
+
_context4.t0 = _context4["catch"](0);
|
12699
|
+
handleError(_context4.t0, "Failed to attach license terms");
|
12700
|
+
case 31:
|
11611
12701
|
case "end":
|
11612
12702
|
return _context4.stop();
|
11613
12703
|
}
|
11614
|
-
}, _callee4, this);
|
12704
|
+
}, _callee4, this, [[0, 28]]);
|
11615
12705
|
}));
|
11616
12706
|
function attachLicenseTerms(_x4) {
|
11617
12707
|
return _attachLicenseTerms.apply(this, arguments);
|
@@ -11631,12 +12721,12 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11631
12721
|
* IP owners can configure the minting fee of their IPs or
|
11632
12722
|
* configure the minting fee module to determine the minting fee.
|
11633
12723
|
* @param request The request object that contains all data needed to mint license tokens.
|
11634
|
-
*
|
11635
|
-
*
|
11636
|
-
*
|
11637
|
-
*
|
11638
|
-
*
|
11639
|
-
*
|
12724
|
+
* @param request.licensorIpId The licensor IP ID.
|
12725
|
+
* @param request.licenseTemplate The address of the license template.
|
12726
|
+
* @param request.licenseTermsId The ID of the license terms within the license template.
|
12727
|
+
* @param request.amount The amount of license tokens to mint.
|
12728
|
+
* @param request.receiver The address of the receiver.
|
12729
|
+
* @param request.txOptions [Optional] The transaction options.
|
11640
12730
|
* @returns A Promise that resolves to an object containing the transaction hash and optional license token ID if waitForTxn is set to true.
|
11641
12731
|
* @emits LicenseTokensMinted (msg.sender, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, startLicenseTokenId);
|
11642
12732
|
*/
|
@@ -11645,26 +12735,50 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11645
12735
|
key: "mintLicenseTokens",
|
11646
12736
|
value: (function () {
|
11647
12737
|
var _mintLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
11648
|
-
var _request$txOptions5, isAttachedLicenseTerms, txHash, txReceipt, targetLogs;
|
12738
|
+
var _request$txOptions5, isLicenseIpIdRegistered, isExisted, isAttachedLicenseTerms, txHash, txReceipt, targetLogs;
|
11649
12739
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
11650
12740
|
while (1) switch (_context5.prev = _context5.next) {
|
11651
12741
|
case 0:
|
11652
12742
|
_context5.prev = 0;
|
11653
12743
|
_context5.next = 3;
|
12744
|
+
return this.ipAssetRegistryClient.isRegistered({
|
12745
|
+
id: request.licensorIpId
|
12746
|
+
});
|
12747
|
+
case 3:
|
12748
|
+
isLicenseIpIdRegistered = _context5.sent;
|
12749
|
+
if (isLicenseIpIdRegistered) {
|
12750
|
+
_context5.next = 6;
|
12751
|
+
break;
|
12752
|
+
}
|
12753
|
+
throw new Error("The licensor IP with id ".concat(request.licensorIpId, " is not registered."));
|
12754
|
+
case 6:
|
12755
|
+
_context5.next = 8;
|
12756
|
+
return this.piLicenseTemplateReadOnlyClient.exists({
|
12757
|
+
licenseTermsId: BigInt(request.licenseTermsId)
|
12758
|
+
});
|
12759
|
+
case 8:
|
12760
|
+
isExisted = _context5.sent;
|
12761
|
+
if (isExisted) {
|
12762
|
+
_context5.next = 11;
|
12763
|
+
break;
|
12764
|
+
}
|
12765
|
+
throw new Error("License terms id ".concat(request.licenseTermsId, " do not exist."));
|
12766
|
+
case 11:
|
12767
|
+
_context5.next = 13;
|
11654
12768
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
11655
12769
|
ipId: request.licensorIpId,
|
11656
12770
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
11657
12771
|
licenseTermsId: BigInt(request.licenseTermsId)
|
11658
12772
|
});
|
11659
|
-
case
|
12773
|
+
case 13:
|
11660
12774
|
isAttachedLicenseTerms = _context5.sent;
|
11661
12775
|
if (isAttachedLicenseTerms) {
|
11662
|
-
_context5.next =
|
12776
|
+
_context5.next = 16;
|
11663
12777
|
break;
|
11664
12778
|
}
|
11665
|
-
throw new Error("License terms
|
11666
|
-
case
|
11667
|
-
_context5.next =
|
12779
|
+
throw new Error("License terms id ".concat(request.licenseTermsId, " is not attached to the IP with id ").concat(request.licensorIpId, "."));
|
12780
|
+
case 16:
|
12781
|
+
_context5.next = 18;
|
11668
12782
|
return this.licensingModuleClient.mintLicenseTokens({
|
11669
12783
|
licensorIpId: request.licensorIpId,
|
11670
12784
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
@@ -11673,39 +12787,39 @@ var LicenseClient = /*#__PURE__*/function () {
|
|
11673
12787
|
receiver: request.receiver || this.wallet.account.address,
|
11674
12788
|
royaltyContext: zeroAddress
|
11675
12789
|
});
|
11676
|
-
case
|
12790
|
+
case 18:
|
11677
12791
|
txHash = _context5.sent;
|
11678
12792
|
if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.waitForTransaction)) {
|
11679
|
-
_context5.next =
|
12793
|
+
_context5.next = 27;
|
11680
12794
|
break;
|
11681
12795
|
}
|
11682
|
-
_context5.next =
|
12796
|
+
_context5.next = 22;
|
11683
12797
|
return this.rpcClient.waitForTransactionReceipt({
|
11684
12798
|
hash: txHash
|
11685
12799
|
});
|
11686
|
-
case
|
12800
|
+
case 22:
|
11687
12801
|
txReceipt = _context5.sent;
|
11688
12802
|
targetLogs = this.licensingModuleClient.parseTxLicenseTokensMintedEvent(txReceipt);
|
11689
12803
|
return _context5.abrupt("return", {
|
11690
12804
|
txHash: txHash,
|
11691
12805
|
licenseTokenId: targetLogs[0].startLicenseTokenId.toString()
|
11692
12806
|
});
|
11693
|
-
case
|
12807
|
+
case 27:
|
11694
12808
|
return _context5.abrupt("return", {
|
11695
12809
|
txHash: txHash
|
11696
12810
|
});
|
11697
|
-
case
|
11698
|
-
_context5.next =
|
12811
|
+
case 28:
|
12812
|
+
_context5.next = 33;
|
11699
12813
|
break;
|
11700
|
-
case
|
11701
|
-
_context5.prev =
|
12814
|
+
case 30:
|
12815
|
+
_context5.prev = 30;
|
11702
12816
|
_context5.t0 = _context5["catch"](0);
|
11703
12817
|
handleError(_context5.t0, "Failed to mint license tokens");
|
11704
|
-
case
|
12818
|
+
case 33:
|
11705
12819
|
case "end":
|
11706
12820
|
return _context5.stop();
|
11707
12821
|
}
|
11708
|
-
}, _callee5, this, [[0,
|
12822
|
+
}, _callee5, this, [[0, 30]]);
|
11709
12823
|
}));
|
11710
12824
|
function mintLicenseTokens(_x5) {
|
11711
12825
|
return _mintLicenseTokens.apply(this, arguments);
|
@@ -12115,17 +13229,17 @@ var StoryAPIClient = /*#__PURE__*/function () {
|
|
12115
13229
|
var RoyaltyClient = /*#__PURE__*/function () {
|
12116
13230
|
function RoyaltyClient(rpcClient, wallet) {
|
12117
13231
|
_classCallCheck(this, RoyaltyClient);
|
13232
|
+
this.royaltyPolicyLapClient = new RoyaltyPolicyLapClient(rpcClient, wallet);
|
13233
|
+
this.royaltyModuleClient = new RoyaltyModuleClient(rpcClient, wallet);
|
13234
|
+
this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet);
|
12118
13235
|
this.rpcClient = rpcClient;
|
12119
13236
|
this.wallet = wallet;
|
12120
|
-
this.royaltyVaultImplClient = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet);
|
12121
|
-
this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet);
|
12122
|
-
this.royaltyModuleClient = new RoyaltyModuleClient(this.rpcClient, this.wallet);
|
12123
13237
|
}
|
12124
13238
|
|
12125
13239
|
/**
|
12126
13240
|
* Allows ancestors to claim the royalty tokens and any accrued revenue tokens
|
12127
13241
|
* @param request - The request object that contains all data needed to collect royalty tokens.
|
12128
|
-
* @param request.
|
13242
|
+
* @param request.parentIpId The ip id of the ancestor to whom the royalty tokens belong to.
|
12129
13243
|
* @param request.royaltyVaultIpId The id of the royalty vault.
|
12130
13244
|
* @param request.txOptions [Optional] The transaction options.
|
12131
13245
|
* @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.
|
@@ -12135,53 +13249,65 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12135
13249
|
key: "collectRoyaltyTokens",
|
12136
13250
|
value: (function () {
|
12137
13251
|
var _collectRoyaltyTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
12138
|
-
var _request$txOptions, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
|
13252
|
+
var _request$txOptions, isParentIpIdRegistered, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
|
12139
13253
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
12140
13254
|
while (1) switch (_context.prev = _context.next) {
|
12141
13255
|
case 0:
|
12142
13256
|
_context.prev = 0;
|
12143
13257
|
_context.next = 3;
|
12144
|
-
return this.
|
13258
|
+
return this.ipAssetRegistryClient.isRegistered({
|
13259
|
+
id: request.parentIpId
|
13260
|
+
});
|
12145
13261
|
case 3:
|
13262
|
+
isParentIpIdRegistered = _context.sent;
|
13263
|
+
if (isParentIpIdRegistered) {
|
13264
|
+
_context.next = 6;
|
13265
|
+
break;
|
13266
|
+
}
|
13267
|
+
throw new Error("The parent IP with id ".concat(request.parentIpId, " is not registered."));
|
13268
|
+
case 6:
|
13269
|
+
_context.next = 8;
|
13270
|
+
return this.getRoyaltyVaultProxyAddress(request.royaltyVaultIpId);
|
13271
|
+
case 8:
|
12146
13272
|
proxyAddress = _context.sent;
|
12147
13273
|
ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
|
12148
|
-
_context.next =
|
13274
|
+
_context.next = 12;
|
12149
13275
|
return ipRoyaltyVault.collectRoyaltyTokens({
|
12150
|
-
ancestorIpId: request.
|
13276
|
+
ancestorIpId: request.parentIpId
|
12151
13277
|
});
|
12152
|
-
case
|
13278
|
+
case 12:
|
12153
13279
|
txHash = _context.sent;
|
12154
13280
|
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
|
12155
|
-
_context.next =
|
13281
|
+
_context.next = 21;
|
12156
13282
|
break;
|
12157
13283
|
}
|
12158
|
-
_context.next =
|
13284
|
+
_context.next = 16;
|
12159
13285
|
return this.rpcClient.waitForTransactionReceipt({
|
12160
13286
|
hash: txHash
|
12161
13287
|
});
|
12162
|
-
case
|
13288
|
+
case 16:
|
12163
13289
|
txReceipt = _context.sent;
|
12164
13290
|
targetLogs = ipRoyaltyVault.parseTxRoyaltyTokensCollectedEvent(txReceipt);
|
12165
13291
|
return _context.abrupt("return", {
|
12166
13292
|
txHash: txHash,
|
12167
13293
|
royaltyTokensCollected: targetLogs[0].royaltyTokensCollected.toString()
|
12168
13294
|
});
|
12169
|
-
case
|
13295
|
+
case 21:
|
12170
13296
|
return _context.abrupt("return", {
|
12171
13297
|
txHash: txHash
|
12172
13298
|
});
|
12173
|
-
case
|
12174
|
-
_context.next =
|
13299
|
+
case 22:
|
13300
|
+
_context.next = 27;
|
12175
13301
|
break;
|
12176
|
-
case
|
12177
|
-
_context.prev =
|
13302
|
+
case 24:
|
13303
|
+
_context.prev = 24;
|
12178
13304
|
_context.t0 = _context["catch"](0);
|
12179
13305
|
handleError(_context.t0, "Failed to collect royalty tokens");
|
12180
|
-
case
|
13306
|
+
case 27:
|
12181
13307
|
case "end":
|
12182
13308
|
return _context.stop();
|
12183
13309
|
}
|
12184
|
-
}, _callee, this, [[0,
|
13310
|
+
}, _callee, this, [[0, 24]]);
|
12185
13311
|
}));
|
12186
13312
|
function collectRoyaltyTokens(_x) {
|
12187
13313
|
return _collectRoyaltyTokens.apply(this, arguments);
|
@@ -12203,48 +13329,72 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12203
13329
|
key: "payRoyaltyOnBehalf",
|
12204
13330
|
value: (function () {
|
12205
13331
|
var _payRoyaltyOnBehalf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
12206
|
-
var _request$txOptions2, txHash;
|
13332
|
+
var _request$txOptions2, isReceiverRegistered, isPayerRegistered, txHash;
|
12207
13333
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
12208
13334
|
while (1) switch (_context2.prev = _context2.next) {
|
12209
13335
|
case 0:
|
12210
13336
|
_context2.prev = 0;
|
12211
13337
|
_context2.next = 3;
|
13338
|
+
return this.ipAssetRegistryClient.isRegistered({
|
13339
|
+
id: request.receiverIpId
|
13340
|
+
});
|
13341
|
+
case 3:
|
13342
|
+
isReceiverRegistered = _context2.sent;
|
13343
|
+
if (isReceiverRegistered) {
|
13344
|
+
_context2.next = 6;
|
13345
|
+
break;
|
13346
|
+
}
|
13347
|
+
throw new Error("The receiver IP with id ".concat(request.receiverIpId, " is not registered"));
|
13348
|
+
case 6:
|
13349
|
+
_context2.next = 8;
|
13350
|
+
return this.ipAssetRegistryClient.isRegistered({
|
13351
|
+
id: request.payerIpId
|
13352
|
+
});
|
13353
|
+
case 8:
|
13354
|
+
isPayerRegistered = _context2.sent;
|
13355
|
+
if (isPayerRegistered) {
|
13356
|
+
_context2.next = 11;
|
13357
|
+
break;
|
13358
|
+
}
|
13359
|
+
throw new Error("The payer IP with id ".concat(request.payerIpId, " is not registered"));
|
13360
|
+
case 11:
|
13361
|
+
_context2.next = 13;
|
12212
13362
|
return this.royaltyModuleClient.payRoyaltyOnBehalf({
|
12213
13363
|
receiverIpId: request.receiverIpId,
|
12214
13364
|
payerIpId: request.payerIpId,
|
12215
13365
|
token: request.token,
|
12216
13366
|
amount: request.amount
|
12217
13367
|
});
|
12218
|
-
case
|
13368
|
+
case 13:
|
12219
13369
|
txHash = _context2.sent;
|
12220
13370
|
if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
|
12221
|
-
_context2.next =
|
13371
|
+
_context2.next = 20;
|
12222
13372
|
break;
|
12223
13373
|
}
|
12224
|
-
_context2.next =
|
13374
|
+
_context2.next = 17;
|
12225
13375
|
return this.rpcClient.waitForTransactionReceipt({
|
12226
13376
|
hash: txHash
|
12227
13377
|
});
|
12228
|
-
case
|
13378
|
+
case 17:
|
12229
13379
|
return _context2.abrupt("return", {
|
12230
13380
|
txHash: txHash
|
12231
13381
|
});
|
12232
|
-
case
|
13382
|
+
case 20:
|
12233
13383
|
return _context2.abrupt("return", {
|
12234
13384
|
txHash: txHash
|
12235
13385
|
});
|
12236
|
-
case
|
12237
|
-
_context2.next =
|
13386
|
+
case 21:
|
13387
|
+
_context2.next = 26;
|
12238
13388
|
break;
|
12239
|
-
case
|
12240
|
-
_context2.prev =
|
13389
|
+
case 23:
|
13390
|
+
_context2.prev = 23;
|
12241
13391
|
_context2.t0 = _context2["catch"](0);
|
12242
13392
|
handleError(_context2.t0, "Failed to pay royalty on behalf");
|
12243
|
-
case
|
13393
|
+
case 26:
|
12244
13394
|
case "end":
|
12245
13395
|
return _context2.stop();
|
12246
13396
|
}
|
12247
|
-
}, _callee2, this, [[0,
|
13397
|
+
}, _callee2, this, [[0, 23]]);
|
12248
13398
|
}));
|
12249
13399
|
function payRoyaltyOnBehalf(_x2) {
|
12250
13400
|
return _payRoyaltyOnBehalf.apply(this, arguments);
|
@@ -12300,18 +13450,20 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12300
13450
|
return claimableRevenue;
|
12301
13451
|
}()
|
12302
13452
|
/**
|
12303
|
-
*
|
12304
|
-
* @param request - The request object that contains all data needed to
|
13453
|
+
* Allows token holders to claim by a list of snapshot ids based on the token balance at certain snapshot
|
13454
|
+
* @param request - The request object that contains all data needed to claim revenue.
|
13455
|
+
* @param request.snapshotIds The list of snapshot ids.
|
12305
13456
|
* @param request.royaltyVaultIpId The id of the royalty vault.
|
13457
|
+
* @param request.token The revenue token to claim.
|
12306
13458
|
* @param request.txOptions [Optional] The transaction options.
|
12307
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional
|
12308
|
-
* @emits
|
13459
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional claimableToken if waitForTxn is set to true.
|
13460
|
+
* @emits RevenueTokenClaimed (claimer, token, amount).
|
12309
13461
|
*/
|
12310
13462
|
)
|
12311
13463
|
}, {
|
12312
|
-
key: "
|
13464
|
+
key: "claimRevenue",
|
12313
13465
|
value: (function () {
|
12314
|
-
var
|
13466
|
+
var _claimRevenue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
|
12315
13467
|
var _request$txOptions3, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
|
12316
13468
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
12317
13469
|
while (1) switch (_context4.prev = _context4.next) {
|
@@ -12323,7 +13475,12 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12323
13475
|
proxyAddress = _context4.sent;
|
12324
13476
|
ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
|
12325
13477
|
_context4.next = 7;
|
12326
|
-
return ipRoyaltyVault.
|
13478
|
+
return ipRoyaltyVault.claimRevenueBySnapshotBatch({
|
13479
|
+
snapshotIds: request.snapshotIds.map(function (id) {
|
13480
|
+
return BigInt(id);
|
13481
|
+
}),
|
13482
|
+
token: request.token
|
13483
|
+
});
|
12327
13484
|
case 7:
|
12328
13485
|
txHash = _context4.sent;
|
12329
13486
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
|
@@ -12336,10 +13493,10 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12336
13493
|
});
|
12337
13494
|
case 11:
|
12338
13495
|
txReceipt = _context4.sent;
|
12339
|
-
targetLogs = ipRoyaltyVault.
|
13496
|
+
targetLogs = ipRoyaltyVault.parseTxRevenueTokenClaimedEvent(txReceipt);
|
12340
13497
|
return _context4.abrupt("return", {
|
12341
13498
|
txHash: txHash,
|
12342
|
-
|
13499
|
+
claimableToken: targetLogs[0].amount
|
12343
13500
|
});
|
12344
13501
|
case 16:
|
12345
13502
|
return _context4.abrupt("return", {
|
@@ -12351,14 +13508,78 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12351
13508
|
case 19:
|
12352
13509
|
_context4.prev = 19;
|
12353
13510
|
_context4.t0 = _context4["catch"](0);
|
12354
|
-
handleError(_context4.t0, "Failed to
|
13511
|
+
handleError(_context4.t0, "Failed to claim revenue");
|
12355
13512
|
case 22:
|
12356
13513
|
case "end":
|
12357
13514
|
return _context4.stop();
|
12358
13515
|
}
|
12359
13516
|
}, _callee4, this, [[0, 19]]);
|
12360
13517
|
}));
|
12361
|
-
function
|
13518
|
+
function claimRevenue(_x4) {
|
13519
|
+
return _claimRevenue.apply(this, arguments);
|
13520
|
+
}
|
13521
|
+
return claimRevenue;
|
13522
|
+
}()
|
13523
|
+
/**
|
13524
|
+
* Snapshots the claimable revenue and royalty token amounts.
|
13525
|
+
* @param request - The request object that contains all data needed to snapshot.
|
13526
|
+
* @param request.royaltyVaultIpId The id of the royalty vault.
|
13527
|
+
* @param request.txOptions [Optional] The transaction options.
|
13528
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional snapshotId if waitForTxn is set to true.
|
13529
|
+
* @emits SnapshotCompleted (snapshotId, snapshotTimestamp, unclaimedTokens).
|
13530
|
+
*/
|
13531
|
+
)
|
13532
|
+
}, {
|
13533
|
+
key: "snapshot",
|
13534
|
+
value: (function () {
|
13535
|
+
var _snapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
13536
|
+
var _request$txOptions4, proxyAddress, ipRoyaltyVault, txHash, txReceipt, targetLogs;
|
13537
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
13538
|
+
while (1) switch (_context5.prev = _context5.next) {
|
13539
|
+
case 0:
|
13540
|
+
_context5.prev = 0;
|
13541
|
+
_context5.next = 3;
|
13542
|
+
return this.getRoyaltyVaultProxyAddress(request.royaltyVaultIpId);
|
13543
|
+
case 3:
|
13544
|
+
proxyAddress = _context5.sent;
|
13545
|
+
ipRoyaltyVault = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet, proxyAddress);
|
13546
|
+
_context5.next = 7;
|
13547
|
+
return ipRoyaltyVault.snapshot();
|
13548
|
+
case 7:
|
13549
|
+
txHash = _context5.sent;
|
13550
|
+
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
13551
|
+
_context5.next = 16;
|
13552
|
+
break;
|
13553
|
+
}
|
13554
|
+
_context5.next = 11;
|
13555
|
+
return this.rpcClient.waitForTransactionReceipt({
|
13556
|
+
hash: txHash
|
13557
|
+
});
|
13558
|
+
case 11:
|
13559
|
+
txReceipt = _context5.sent;
|
13560
|
+
targetLogs = ipRoyaltyVault.parseTxSnapshotCompletedEvent(txReceipt);
|
13561
|
+
return _context5.abrupt("return", {
|
13562
|
+
txHash: txHash,
|
13563
|
+
snapshotId: targetLogs[0].snapshotId
|
13564
|
+
});
|
13565
|
+
case 16:
|
13566
|
+
return _context5.abrupt("return", {
|
13567
|
+
txHash: txHash
|
13568
|
+
});
|
13569
|
+
case 17:
|
13570
|
+
_context5.next = 22;
|
13571
|
+
break;
|
13572
|
+
case 19:
|
13573
|
+
_context5.prev = 19;
|
13574
|
+
_context5.t0 = _context5["catch"](0);
|
13575
|
+
handleError(_context5.t0, "Failed to snapshot");
|
13576
|
+
case 22:
|
13577
|
+
case "end":
|
13578
|
+
return _context5.stop();
|
13579
|
+
}
|
13580
|
+
}, _callee5, this, [[0, 19]]);
|
13581
|
+
}));
|
13582
|
+
function snapshot(_x5) {
|
12362
13583
|
return _snapshot.apply(this, arguments);
|
12363
13584
|
}
|
12364
13585
|
return snapshot;
|
@@ -12366,25 +13587,43 @@ var RoyaltyClient = /*#__PURE__*/function () {
|
|
12366
13587
|
}, {
|
12367
13588
|
key: "getRoyaltyVaultProxyAddress",
|
12368
13589
|
value: function () {
|
12369
|
-
var _getRoyaltyVaultProxyAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
12370
|
-
var data;
|
12371
|
-
return _regeneratorRuntime().wrap(function
|
12372
|
-
while (1) switch (
|
13590
|
+
var _getRoyaltyVaultProxyAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(royaltyVaultIpId) {
|
13591
|
+
var isRoyaltyVaultIpIdRegistered, data;
|
13592
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
13593
|
+
while (1) switch (_context6.prev = _context6.next) {
|
12373
13594
|
case 0:
|
12374
|
-
|
12375
|
-
return this.
|
12376
|
-
|
13595
|
+
_context6.next = 2;
|
13596
|
+
return this.ipAssetRegistryClient.isRegistered({
|
13597
|
+
id: royaltyVaultIpId
|
12377
13598
|
});
|
12378
13599
|
case 2:
|
12379
|
-
|
12380
|
-
|
12381
|
-
|
13600
|
+
isRoyaltyVaultIpIdRegistered = _context6.sent;
|
13601
|
+
if (isRoyaltyVaultIpIdRegistered) {
|
13602
|
+
_context6.next = 5;
|
13603
|
+
break;
|
13604
|
+
}
|
13605
|
+
throw new Error("The royalty vault IP with id ".concat(royaltyVaultIpId, " is not registered."));
|
13606
|
+
case 5:
|
13607
|
+
_context6.next = 7;
|
13608
|
+
return this.royaltyPolicyLapClient.getRoyaltyData({
|
13609
|
+
ipId: royaltyVaultIpId
|
13610
|
+
});
|
13611
|
+
case 7:
|
13612
|
+
data = _context6.sent;
|
13613
|
+
if (!(!data[1] || data[1] === "0x")) {
|
13614
|
+
_context6.next = 10;
|
13615
|
+
break;
|
13616
|
+
}
|
13617
|
+
throw new Error("The royalty vault IP with id ".concat(royaltyVaultIpId, " address is not set."));
|
13618
|
+
case 10:
|
13619
|
+
return _context6.abrupt("return", data[1]);
|
13620
|
+
case 11:
|
12382
13621
|
case "end":
|
12383
|
-
return
|
13622
|
+
return _context6.stop();
|
12384
13623
|
}
|
12385
|
-
},
|
13624
|
+
}, _callee6, this);
|
12386
13625
|
}));
|
12387
|
-
function getRoyaltyVaultProxyAddress(
|
13626
|
+
function getRoyaltyVaultProxyAddress(_x6) {
|
12388
13627
|
return _getRoyaltyVaultProxyAddress.apply(this, arguments);
|
12389
13628
|
}
|
12390
13629
|
return getRoyaltyVaultProxyAddress;
|
@@ -12480,7 +13719,7 @@ var StoryClient = /*#__PURE__*/function () {
|
|
12480
13719
|
key: "license",
|
12481
13720
|
get: function get() {
|
12482
13721
|
if (this._license === null) {
|
12483
|
-
this._license = new LicenseClient(this.rpcClient, this.wallet
|
13722
|
+
this._license = new LicenseClient(this.rpcClient, this.wallet);
|
12484
13723
|
}
|
12485
13724
|
return this._license;
|
12486
13725
|
}
|