@story-protocol/core-sdk 1.2.0-rc.1 → 1.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/src/abi/generated.d.ts +782 -0
- package/dist/declarations/src/abi/generated.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/group.d.ts +2 -2
- package/dist/declarations/src/resources/group.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAccount.d.ts +2 -2
- package/dist/declarations/src/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +94 -20
- package/dist/declarations/src/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/resources/permission.d.ts +2 -1
- package/dist/declarations/src/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAccount.d.ts +1 -1
- package/dist/declarations/src/types/resources/ipAccount.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +54 -10
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/permission.d.ts +11 -1
- package/dist/declarations/src/types/resources/permission.d.ts.map +1 -1
- package/dist/declarations/src/utils/chain.d.ts +1 -1
- package/dist/declarations/src/utils/chain.d.ts.map +1 -1
- package/dist/declarations/src/utils/sign.d.ts +15 -2
- package/dist/declarations/src/utils/sign.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +1404 -763
- package/dist/story-protocol-core-sdk.cjs.prod.js +1404 -763
- package/dist/story-protocol-core-sdk.esm.js +1404 -764
- package/package.json +1 -1
@@ -531,9 +531,8 @@ var odyssey = defineChain({
|
|
531
531
|
}
|
532
532
|
},
|
533
533
|
contracts: {
|
534
|
-
//TODO: need to confirm the addresses
|
535
534
|
multicall3: {
|
536
|
-
address: "
|
535
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
537
536
|
blockCreated: 5882
|
538
537
|
}
|
539
538
|
},
|
@@ -714,7 +713,13 @@ function _inherits(subClass, superClass) {
|
|
714
713
|
*
|
715
714
|
*/var moduleRegistryAbi=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"error",inputs:[{name:"authority",internalType:"address",type:"address"}],name:"AccessManagedInvalidAuthority"},{type:"error",inputs:[{name:"caller",internalType:"address",type:"address"},{name:"delay",internalType:"uint32",type:"uint32"}],name:"AccessManagedRequiredDelay"},{type:"error",inputs:[{name:"caller",internalType:"address",type:"address"}],name:"AccessManagedUnauthorized"},{type:"error",inputs:[{name:"target",internalType:"address",type:"address"}],name:"AddressEmptyCode"},{type:"error",inputs:[{name:"implementation",internalType:"address",type:"address"}],name:"ERC1967InvalidImplementation"},{type:"error",inputs:[],name:"ERC1967NonPayable"},{type:"error",inputs:[],name:"FailedInnerCall"},{type:"error",inputs:[],name:"InvalidInitialization"},{type:"error",inputs:[],name:"ModuleRegistry__InterfaceIdZero"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleAddressNotContract"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleAddressZeroAddress"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleAlreadyRegistered"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleNotRegistered"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleTypeAlreadyRegistered"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleTypeEmptyString"},{type:"error",inputs:[],name:"ModuleRegistry__ModuleTypeNotRegistered"},{type:"error",inputs:[],name:"ModuleRegistry__NameAlreadyRegistered"},{type:"error",inputs:[],name:"ModuleRegistry__NameDoesNotMatch"},{type:"error",inputs:[],name:"ModuleRegistry__NameEmptyString"},{type:"error",inputs:[],name:"ModuleRegistry__ZeroAccessManager"},{type:"error",inputs:[],name:"NotInitializing"},{type:"error",inputs:[],name:"UUPSUnauthorizedCallContext"},{type:"error",inputs:[{name:"slot",internalType:"bytes32",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID"},{type:"event",anonymous:false,inputs:[{name:"authority",internalType:"address",type:"address",indexed:false}],name:"AuthorityUpdated"},{type:"event",anonymous:false,inputs:[{name:"version",internalType:"uint64",type:"uint64",indexed:false}],name:"Initialized"},{type:"event",anonymous:false,inputs:[{name:"name",internalType:"string",type:"string",indexed:false},{name:"module",internalType:"address",type:"address",indexed:true},{name:"moduleTypeInterfaceId",internalType:"bytes4",type:"bytes4",indexed:true},{name:"moduleType",internalType:"string",type:"string",indexed:false}],name:"ModuleAdded"},{type:"event",anonymous:false,inputs:[{name:"name",internalType:"string",type:"string",indexed:false},{name:"module",internalType:"address",type:"address",indexed:true}],name:"ModuleRemoved"},{type:"event",anonymous:false,inputs:[{name:"implementation",internalType:"address",type:"address",indexed:true}],name:"Upgraded"},{type:"function",inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[],name:"authority",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"}],name:"getModule",outputs:[{name:"",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[{name:"moduleAddress",internalType:"address",type:"address"}],name:"getModuleType",outputs:[{name:"",internalType:"string",type:"string"}],stateMutability:"view"},{type:"function",inputs:[{name:"moduleType",internalType:"string",type:"string"}],name:"getModuleTypeInterfaceId",outputs:[{name:"",internalType:"bytes4",type:"bytes4"}],stateMutability:"view"},{type:"function",inputs:[{name:"accessManager",internalType:"address",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[],name:"isConsumingScheduledOp",outputs:[{name:"",internalType:"bytes4",type:"bytes4"}],stateMutability:"view"},{type:"function",inputs:[{name:"moduleAddress",internalType:"address",type:"address"}],name:"isRegistered",outputs:[{name:"",internalType:"bool",type:"bool"}],stateMutability:"view"},{type:"function",inputs:[],name:"proxiableUUID",outputs:[{name:"",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"},{name:"moduleAddress",internalType:"address",type:"address"}],name:"registerModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"},{name:"moduleAddress",internalType:"address",type:"address"},{name:"moduleType",internalType:"string",type:"string"}],name:"registerModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"},{name:"interfaceId",internalType:"bytes4",type:"bytes4"}],name:"registerModuleType",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"}],name:"removeModule",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"name",internalType:"string",type:"string"}],name:"removeModuleType",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newAuthority",internalType:"address",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable"},{type:"function",inputs:[{name:"newImplementation",internalType:"address",type:"address"},{name:"data",internalType:"bytes",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable"}];/**
|
716
715
|
*
|
717
|
-
*/var moduleRegistryAddress={1516:"0x9F18c5723BC4Ee447CF9B01a8543D3b08b7F09C7"};//
|
716
|
+
*/var moduleRegistryAddress={1516:"0x9F18c5723BC4Ee447CF9B01a8543D3b08b7F09C7"};// Multicall3
|
717
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
718
|
+
/**
|
719
|
+
*
|
720
|
+
*/var multicall3Abi=[{type:"function",inputs:[{name:"calls",internalType:"struct Multicall3.Call[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"aggregate",outputs:[{name:"blockNumber",internalType:"uint256",type:"uint256"},{name:"returnData",internalType:"bytes[]",type:"bytes[]"}],stateMutability:"payable"},{type:"function",inputs:[{name:"calls",internalType:"struct Multicall3.Call3[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"allowFailure",internalType:"bool",type:"bool"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"aggregate3",outputs:[{name:"returnData",internalType:"struct Multicall3.Result[]",type:"tuple[]",components:[{name:"success",internalType:"bool",type:"bool"},{name:"returnData",internalType:"bytes",type:"bytes"}]}],stateMutability:"payable"},{type:"function",inputs:[{name:"calls",internalType:"struct Multicall3.Call3Value[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"allowFailure",internalType:"bool",type:"bool"},{name:"value",internalType:"uint256",type:"uint256"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"aggregate3Value",outputs:[{name:"returnData",internalType:"struct Multicall3.Result[]",type:"tuple[]",components:[{name:"success",internalType:"bool",type:"bool"},{name:"returnData",internalType:"bytes",type:"bytes"}]}],stateMutability:"payable"},{type:"function",inputs:[{name:"calls",internalType:"struct Multicall3.Call[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"blockAndAggregate",outputs:[{name:"blockNumber",internalType:"uint256",type:"uint256"},{name:"blockHash",internalType:"bytes32",type:"bytes32"},{name:"returnData",internalType:"struct Multicall3.Result[]",type:"tuple[]",components:[{name:"success",internalType:"bool",type:"bool"},{name:"returnData",internalType:"bytes",type:"bytes"}]}],stateMutability:"payable"},{type:"function",inputs:[],name:"getBasefee",outputs:[{name:"basefee",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"blockNumber",internalType:"uint256",type:"uint256"}],name:"getBlockHash",outputs:[{name:"blockHash",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[],name:"getBlockNumber",outputs:[{name:"blockNumber",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"getChainId",outputs:[{name:"chainid",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"getCurrentBlockCoinbase",outputs:[{name:"coinbase",internalType:"address",type:"address"}],stateMutability:"view"},{type:"function",inputs:[],name:"getCurrentBlockDifficulty",outputs:[{name:"difficulty",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"getCurrentBlockGasLimit",outputs:[{name:"gaslimit",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"getCurrentBlockTimestamp",outputs:[{name:"timestamp",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[{name:"addr",internalType:"address",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",internalType:"uint256",type:"uint256"}],stateMutability:"view"},{type:"function",inputs:[],name:"getLastBlockHash",outputs:[{name:"blockHash",internalType:"bytes32",type:"bytes32"}],stateMutability:"view"},{type:"function",inputs:[{name:"requireSuccess",internalType:"bool",type:"bool"},{name:"calls",internalType:"struct Multicall3.Call[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"tryAggregate",outputs:[{name:"returnData",internalType:"struct Multicall3.Result[]",type:"tuple[]",components:[{name:"success",internalType:"bool",type:"bool"},{name:"returnData",internalType:"bytes",type:"bytes"}]}],stateMutability:"payable"},{type:"function",inputs:[{name:"requireSuccess",internalType:"bool",type:"bool"},{name:"calls",internalType:"struct Multicall3.Call[]",type:"tuple[]",components:[{name:"target",internalType:"address",type:"address"},{name:"callData",internalType:"bytes",type:"bytes"}]}],name:"tryBlockAndAggregate",outputs:[{name:"blockNumber",internalType:"uint256",type:"uint256"},{name:"blockHash",internalType:"bytes32",type:"bytes32"},{name:"returnData",internalType:"struct Multicall3.Result[]",type:"tuple[]",components:[{name:"success",internalType:"bool",type:"bool"},{name:"returnData",internalType:"bytes",type:"bytes"}]}],stateMutability:"payable"}];/**
|
721
|
+
*
|
722
|
+
*/var multicall3Address={1516:"0xcA11bde05977b3631167028862bE2a173976CA11"};// PILicenseTemplate
|
718
723
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
719
724
|
/**
|
720
725
|
*
|
@@ -1043,6 +1048,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1043
1048
|
* @param ipMetadata tuple
|
1044
1049
|
* @param recipient address
|
1045
1050
|
*/ /**
|
1051
|
+
* DerivativeWorkflowsMulticallRequest
|
1052
|
+
*
|
1053
|
+
* @param data bytes[]
|
1054
|
+
*/ /**
|
1046
1055
|
* DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
1047
1056
|
*
|
1048
1057
|
* @param nftContract address
|
@@ -1084,11 +1093,21 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1084
1093
|
* @param request DerivativeWorkflowsMintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
1085
1094
|
* @return EncodedTxData
|
1086
1095
|
*/)},{key:"mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode",value:function mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode(request){return {to:this.address,data:encodeFunctionData({abi:derivativeWorkflowsAbi,functionName:"mintAndRegisterIpAndMakeDerivativeWithLicenseTokens",args:[request.spgNftContract,request.licenseTokenIds,request.royaltyContext,request.ipMetadata,request.recipient]})};}/**
|
1096
|
+
* method multicall for contract DerivativeWorkflows
|
1097
|
+
*
|
1098
|
+
* @param request DerivativeWorkflowsMulticallRequest
|
1099
|
+
* @return Promise<WriteContractReturnType>
|
1100
|
+
*/},{key:"multicall",value:(function(){var _multicall=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(request){var _yield$this$rpcClient13,call;return _regeneratorRuntime().wrap(function _callee22$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return this.rpcClient.simulateContract({abi:derivativeWorkflowsAbi,address:this.address,functionName:"multicall",account:this.wallet.account,args:[request.data]});case 2:_yield$this$rpcClient13=_context22.sent;call=_yield$this$rpcClient13.request;_context22.next=6;return this.wallet.writeContract(call);case 6:return _context22.abrupt("return",_context22.sent);case 7:case"end":return _context22.stop();}},_callee22,this);}));function multicall(_x15){return _multicall.apply(this,arguments);}return multicall;}()/**
|
1101
|
+
* method multicall for contract DerivativeWorkflows with only encode
|
1102
|
+
*
|
1103
|
+
* @param request DerivativeWorkflowsMulticallRequest
|
1104
|
+
* @return EncodedTxData
|
1105
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:encodeFunctionData({abi:derivativeWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
1087
1106
|
* method registerIpAndMakeDerivative for contract DerivativeWorkflows
|
1088
1107
|
*
|
1089
1108
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
1090
1109
|
* @return Promise<WriteContractReturnType>
|
1091
|
-
*/},{key:"registerIpAndMakeDerivative",value:(function(){var _registerIpAndMakeDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1110
|
+
*/},{key:"registerIpAndMakeDerivative",value:(function(){var _registerIpAndMakeDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(request){var _yield$this$rpcClient14,call;return _regeneratorRuntime().wrap(function _callee23$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return this.rpcClient.simulateContract({abi:derivativeWorkflowsAbi,address:this.address,functionName:"registerIpAndMakeDerivative",account:this.wallet.account,args:[request.nftContract,request.tokenId,request.derivData,request.ipMetadata,request.sigMetadata,request.sigRegister]});case 2:_yield$this$rpcClient14=_context23.sent;call=_yield$this$rpcClient14.request;_context23.next=6;return this.wallet.writeContract(call);case 6:return _context23.abrupt("return",_context23.sent);case 7:case"end":return _context23.stop();}},_callee23,this);}));function registerIpAndMakeDerivative(_x16){return _registerIpAndMakeDerivative.apply(this,arguments);}return registerIpAndMakeDerivative;}()/**
|
1092
1111
|
* method registerIpAndMakeDerivative for contract DerivativeWorkflows with only encode
|
1093
1112
|
*
|
1094
1113
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
@@ -1098,7 +1117,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1098
1117
|
*
|
1099
1118
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
1100
1119
|
* @return Promise<WriteContractReturnType>
|
1101
|
-
*/},{key:"registerIpAndMakeDerivativeWithLicenseTokens",value:(function(){var _registerIpAndMakeDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1120
|
+
*/},{key:"registerIpAndMakeDerivativeWithLicenseTokens",value:(function(){var _registerIpAndMakeDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(request){var _yield$this$rpcClient15,call;return _regeneratorRuntime().wrap(function _callee24$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:_context24.next=2;return this.rpcClient.simulateContract({abi:derivativeWorkflowsAbi,address:this.address,functionName:"registerIpAndMakeDerivativeWithLicenseTokens",account:this.wallet.account,args:[request.nftContract,request.tokenId,request.licenseTokenIds,request.royaltyContext,request.ipMetadata,request.sigMetadata,request.sigRegister]});case 2:_yield$this$rpcClient15=_context24.sent;call=_yield$this$rpcClient15.request;_context24.next=6;return this.wallet.writeContract(call);case 6:return _context24.abrupt("return",_context24.sent);case 7:case"end":return _context24.stop();}},_callee24,this);}));function registerIpAndMakeDerivativeWithLicenseTokens(_x17){return _registerIpAndMakeDerivativeWithLicenseTokens.apply(this,arguments);}return registerIpAndMakeDerivativeWithLicenseTokens;}()/**
|
1102
1121
|
* method registerIpAndMakeDerivativeWithLicenseTokens for contract DerivativeWorkflows with only encode
|
1103
1122
|
*
|
1104
1123
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
@@ -1161,7 +1180,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1161
1180
|
*
|
1162
1181
|
* @param request DisputeModuleCancelDisputeRequest
|
1163
1182
|
* @return Promise<WriteContractReturnType>
|
1164
|
-
*/_inherits(DisputeModuleClient,_DisputeModuleEventCl);return _createClass(DisputeModuleClient,[{key:"cancelDispute",value:(function(){var _cancelDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1183
|
+
*/_inherits(DisputeModuleClient,_DisputeModuleEventCl);return _createClass(DisputeModuleClient,[{key:"cancelDispute",value:(function(){var _cancelDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25(request){var _yield$this$rpcClient16,call;return _regeneratorRuntime().wrap(function _callee25$(_context25){while(1)switch(_context25.prev=_context25.next){case 0:_context25.next=2;return this.rpcClient.simulateContract({abi:disputeModuleAbi,address:this.address,functionName:"cancelDispute",account:this.wallet.account,args:[request.disputeId,request.data]});case 2:_yield$this$rpcClient16=_context25.sent;call=_yield$this$rpcClient16.request;_context25.next=6;return this.wallet.writeContract(call);case 6:return _context25.abrupt("return",_context25.sent);case 7:case"end":return _context25.stop();}},_callee25,this);}));function cancelDispute(_x18){return _cancelDispute.apply(this,arguments);}return cancelDispute;}()/**
|
1165
1184
|
* method cancelDispute for contract DisputeModule with only encode
|
1166
1185
|
*
|
1167
1186
|
* @param request DisputeModuleCancelDisputeRequest
|
@@ -1171,7 +1190,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1171
1190
|
*
|
1172
1191
|
* @param request DisputeModuleRaiseDisputeRequest
|
1173
1192
|
* @return Promise<WriteContractReturnType>
|
1174
|
-
*/},{key:"raiseDispute",value:(function(){var _raiseDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1193
|
+
*/},{key:"raiseDispute",value:(function(){var _raiseDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(request){var _yield$this$rpcClient17,call;return _regeneratorRuntime().wrap(function _callee26$(_context26){while(1)switch(_context26.prev=_context26.next){case 0:_context26.next=2;return this.rpcClient.simulateContract({abi:disputeModuleAbi,address:this.address,functionName:"raiseDispute",account:this.wallet.account,args:[request.targetIpId,request.disputeEvidenceHash,request.targetTag,request.data]});case 2:_yield$this$rpcClient17=_context26.sent;call=_yield$this$rpcClient17.request;_context26.next=6;return this.wallet.writeContract(call);case 6:return _context26.abrupt("return",_context26.sent);case 7:case"end":return _context26.stop();}},_callee26,this);}));function raiseDispute(_x19){return _raiseDispute.apply(this,arguments);}return raiseDispute;}()/**
|
1175
1194
|
* method raiseDispute for contract DisputeModule with only encode
|
1176
1195
|
*
|
1177
1196
|
* @param request DisputeModuleRaiseDisputeRequest
|
@@ -1181,7 +1200,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1181
1200
|
*
|
1182
1201
|
* @param request DisputeModuleResolveDisputeRequest
|
1183
1202
|
* @return Promise<WriteContractReturnType>
|
1184
|
-
*/},{key:"resolveDispute",value:(function(){var _resolveDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1203
|
+
*/},{key:"resolveDispute",value:(function(){var _resolveDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27(request){var _yield$this$rpcClient18,call;return _regeneratorRuntime().wrap(function _callee27$(_context27){while(1)switch(_context27.prev=_context27.next){case 0:_context27.next=2;return this.rpcClient.simulateContract({abi:disputeModuleAbi,address:this.address,functionName:"resolveDispute",account:this.wallet.account,args:[request.disputeId,request.data]});case 2:_yield$this$rpcClient18=_context27.sent;call=_yield$this$rpcClient18.request;_context27.next=6;return this.wallet.writeContract(call);case 6:return _context27.abrupt("return",_context27.sent);case 7:case"end":return _context27.stop();}},_callee27,this);}));function resolveDispute(_x20){return _resolveDispute.apply(this,arguments);}return resolveDispute;}()/**
|
1185
1204
|
* method resolveDispute for contract DisputeModule with only encode
|
1186
1205
|
*
|
1187
1206
|
* @param request DisputeModuleResolveDisputeRequest
|
@@ -1343,84 +1362,84 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1343
1362
|
*
|
1344
1363
|
* @param request GroupingModuleAccessControllerRequest
|
1345
1364
|
* @return Promise<GroupingModuleAccessControllerResponse>
|
1346
|
-
*/_inherits(GroupingModuleReadOnlyClient,_GroupingModuleEventC);return _createClass(GroupingModuleReadOnlyClient,[{key:"accessController",value:(function(){var _accessController2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1365
|
+
*/_inherits(GroupingModuleReadOnlyClient,_GroupingModuleEventC);return _createClass(GroupingModuleReadOnlyClient,[{key:"accessController",value:(function(){var _accessController2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee51(){return _regeneratorRuntime().wrap(function _callee51$(_context51){while(1)switch(_context51.prev=_context51.next){case 0:_context51.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"ACCESS_CONTROLLER"});case 2:return _context51.abrupt("return",_context51.sent);case 3:case"end":return _context51.stop();}},_callee51,this);}));function accessController(){return _accessController2.apply(this,arguments);}return accessController;}()/**
|
1347
1366
|
* method GROUP_IP_ASSET_REGISTRY for contract GroupingModule
|
1348
1367
|
*
|
1349
1368
|
* @param request GroupingModuleGroupIpAssetRegistryRequest
|
1350
1369
|
* @return Promise<GroupingModuleGroupIpAssetRegistryResponse>
|
1351
|
-
*/)},{key:"groupIpAssetRegistry",value:(function(){var _groupIpAssetRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1370
|
+
*/)},{key:"groupIpAssetRegistry",value:(function(){var _groupIpAssetRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee52(){return _regeneratorRuntime().wrap(function _callee52$(_context52){while(1)switch(_context52.prev=_context52.next){case 0:_context52.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"GROUP_IP_ASSET_REGISTRY"});case 2:return _context52.abrupt("return",_context52.sent);case 3:case"end":return _context52.stop();}},_callee52,this);}));function groupIpAssetRegistry(){return _groupIpAssetRegistry2.apply(this,arguments);}return groupIpAssetRegistry;}()/**
|
1352
1371
|
* method GROUP_NFT for contract GroupingModule
|
1353
1372
|
*
|
1354
1373
|
* @param request GroupingModuleGroupNftRequest
|
1355
1374
|
* @return Promise<GroupingModuleGroupNftResponse>
|
1356
|
-
*/)},{key:"groupNft",value:(function(){var _groupNft=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1375
|
+
*/)},{key:"groupNft",value:(function(){var _groupNft=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee53(){return _regeneratorRuntime().wrap(function _callee53$(_context53){while(1)switch(_context53.prev=_context53.next){case 0:_context53.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"GROUP_NFT"});case 2:return _context53.abrupt("return",_context53.sent);case 3:case"end":return _context53.stop();}},_callee53,this);}));function groupNft(){return _groupNft.apply(this,arguments);}return groupNft;}()/**
|
1357
1376
|
* method IP_ACCOUNT_REGISTRY for contract GroupingModule
|
1358
1377
|
*
|
1359
1378
|
* @param request GroupingModuleIpAccountRegistryRequest
|
1360
1379
|
* @return Promise<GroupingModuleIpAccountRegistryResponse>
|
1361
|
-
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1380
|
+
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee54(){return _regeneratorRuntime().wrap(function _callee54$(_context54){while(1)switch(_context54.prev=_context54.next){case 0:_context54.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"IP_ACCOUNT_REGISTRY"});case 2:return _context54.abrupt("return",_context54.sent);case 3:case"end":return _context54.stop();}},_callee54,this);}));function ipAccountRegistry(){return _ipAccountRegistry2.apply(this,arguments);}return ipAccountRegistry;}()/**
|
1362
1381
|
* method LICENSE_REGISTRY for contract GroupingModule
|
1363
1382
|
*
|
1364
1383
|
* @param request GroupingModuleLicenseRegistryRequest
|
1365
1384
|
* @return Promise<GroupingModuleLicenseRegistryResponse>
|
1366
|
-
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1385
|
+
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee55(){return _regeneratorRuntime().wrap(function _callee55$(_context55){while(1)switch(_context55.prev=_context55.next){case 0:_context55.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"LICENSE_REGISTRY"});case 2:return _context55.abrupt("return",_context55.sent);case 3:case"end":return _context55.stop();}},_callee55,this);}));function licenseRegistry(){return _licenseRegistry.apply(this,arguments);}return licenseRegistry;}()/**
|
1367
1386
|
* method LICENSE_TOKEN for contract GroupingModule
|
1368
1387
|
*
|
1369
1388
|
* @param request GroupingModuleLicenseTokenRequest
|
1370
1389
|
* @return Promise<GroupingModuleLicenseTokenResponse>
|
1371
|
-
*/)},{key:"licenseToken",value:(function(){var _licenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1390
|
+
*/)},{key:"licenseToken",value:(function(){var _licenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee56(){return _regeneratorRuntime().wrap(function _callee56$(_context56){while(1)switch(_context56.prev=_context56.next){case 0:_context56.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"LICENSE_TOKEN"});case 2:return _context56.abrupt("return",_context56.sent);case 3:case"end":return _context56.stop();}},_callee56,this);}));function licenseToken(){return _licenseToken.apply(this,arguments);}return licenseToken;}()/**
|
1372
1391
|
* method ROYALTY_MODULE for contract GroupingModule
|
1373
1392
|
*
|
1374
1393
|
* @param request GroupingModuleRoyaltyModuleRequest
|
1375
1394
|
* @return Promise<GroupingModuleRoyaltyModuleResponse>
|
1376
|
-
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1395
|
+
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee57(){return _regeneratorRuntime().wrap(function _callee57$(_context57){while(1)switch(_context57.prev=_context57.next){case 0:_context57.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"ROYALTY_MODULE"});case 2:return _context57.abrupt("return",_context57.sent);case 3:case"end":return _context57.stop();}},_callee57,this);}));function royaltyModule(){return _royaltyModule2.apply(this,arguments);}return royaltyModule;}()/**
|
1377
1396
|
* method UPGRADE_INTERFACE_VERSION for contract GroupingModule
|
1378
1397
|
*
|
1379
1398
|
* @param request GroupingModuleUpgradeInterfaceVersionRequest
|
1380
1399
|
* @return Promise<GroupingModuleUpgradeInterfaceVersionResponse>
|
1381
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1400
|
+
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee58(){return _regeneratorRuntime().wrap(function _callee58$(_context58){while(1)switch(_context58.prev=_context58.next){case 0:_context58.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"UPGRADE_INTERFACE_VERSION"});case 2:return _context58.abrupt("return",_context58.sent);case 3:case"end":return _context58.stop();}},_callee58,this);}));function upgradeInterfaceVersion(){return _upgradeInterfaceVersion3.apply(this,arguments);}return upgradeInterfaceVersion;}()/**
|
1382
1401
|
* method authority for contract GroupingModule
|
1383
1402
|
*
|
1384
1403
|
* @param request GroupingModuleAuthorityRequest
|
1385
1404
|
* @return Promise<GroupingModuleAuthorityResponse>
|
1386
|
-
*/)},{key:"authority",value:(function(){var _authority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1405
|
+
*/)},{key:"authority",value:(function(){var _authority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee59(){return _regeneratorRuntime().wrap(function _callee59$(_context59){while(1)switch(_context59.prev=_context59.next){case 0:_context59.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"authority"});case 2:return _context59.abrupt("return",_context59.sent);case 3:case"end":return _context59.stop();}},_callee59,this);}));function authority(){return _authority3.apply(this,arguments);}return authority;}()/**
|
1387
1406
|
* method getClaimableReward for contract GroupingModule
|
1388
1407
|
*
|
1389
1408
|
* @param request GroupingModuleGetClaimableRewardRequest
|
1390
1409
|
* @return Promise<GroupingModuleGetClaimableRewardResponse>
|
1391
|
-
*/)},{key:"getClaimableReward",value:(function(){var _getClaimableReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1410
|
+
*/)},{key:"getClaimableReward",value:(function(){var _getClaimableReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee60(request){return _regeneratorRuntime().wrap(function _callee60$(_context60){while(1)switch(_context60.prev=_context60.next){case 0:_context60.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"getClaimableReward",args:[request.groupId,request.token,request.ipIds]});case 2:return _context60.abrupt("return",_context60.sent);case 3:case"end":return _context60.stop();}},_callee60,this);}));function getClaimableReward(_x34){return _getClaimableReward.apply(this,arguments);}return getClaimableReward;}()/**
|
1392
1411
|
* method isConsumingScheduledOp for contract GroupingModule
|
1393
1412
|
*
|
1394
1413
|
* @param request GroupingModuleIsConsumingScheduledOpRequest
|
1395
1414
|
* @return Promise<GroupingModuleIsConsumingScheduledOpResponse>
|
1396
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1415
|
+
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee61(){return _regeneratorRuntime().wrap(function _callee61$(_context61){while(1)switch(_context61.prev=_context61.next){case 0:_context61.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"isConsumingScheduledOp"});case 2:return _context61.abrupt("return",_context61.sent);case 3:case"end":return _context61.stop();}},_callee61,this);}));function isConsumingScheduledOp(){return _isConsumingScheduledOp3.apply(this,arguments);}return isConsumingScheduledOp;}()/**
|
1397
1416
|
* method name for contract GroupingModule
|
1398
1417
|
*
|
1399
1418
|
* @param request GroupingModuleNameRequest
|
1400
1419
|
* @return Promise<GroupingModuleNameResponse>
|
1401
|
-
*/)},{key:"name",value:(function(){var _name2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1420
|
+
*/)},{key:"name",value:(function(){var _name2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee62(){return _regeneratorRuntime().wrap(function _callee62$(_context62){while(1)switch(_context62.prev=_context62.next){case 0:_context62.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"name"});case 2:return _context62.abrupt("return",_context62.sent);case 3:case"end":return _context62.stop();}},_callee62,this);}));function name(){return _name2.apply(this,arguments);}return name;}()/**
|
1402
1421
|
* method paused for contract GroupingModule
|
1403
1422
|
*
|
1404
1423
|
* @param request GroupingModulePausedRequest
|
1405
1424
|
* @return Promise<GroupingModulePausedResponse>
|
1406
|
-
*/)},{key:"paused",value:(function(){var _paused2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1425
|
+
*/)},{key:"paused",value:(function(){var _paused2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee63(){return _regeneratorRuntime().wrap(function _callee63$(_context63){while(1)switch(_context63.prev=_context63.next){case 0:_context63.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"paused"});case 2:return _context63.abrupt("return",_context63.sent);case 3:case"end":return _context63.stop();}},_callee63,this);}));function paused(){return _paused2.apply(this,arguments);}return paused;}()/**
|
1407
1426
|
* method proxiableUUID for contract GroupingModule
|
1408
1427
|
*
|
1409
1428
|
* @param request GroupingModuleProxiableUuidRequest
|
1410
1429
|
* @return Promise<GroupingModuleProxiableUuidResponse>
|
1411
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1430
|
+
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee64(){return _regeneratorRuntime().wrap(function _callee64$(_context64){while(1)switch(_context64.prev=_context64.next){case 0:_context64.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"proxiableUUID"});case 2:return _context64.abrupt("return",_context64.sent);case 3:case"end":return _context64.stop();}},_callee64,this);}));function proxiableUuid(){return _proxiableUuid3.apply(this,arguments);}return proxiableUuid;}()/**
|
1412
1431
|
* method supportsInterface for contract GroupingModule
|
1413
1432
|
*
|
1414
1433
|
* @param request GroupingModuleSupportsInterfaceRequest
|
1415
1434
|
* @return Promise<GroupingModuleSupportsInterfaceResponse>
|
1416
|
-
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1435
|
+
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee65(request){return _regeneratorRuntime().wrap(function _callee65$(_context65){while(1)switch(_context65.prev=_context65.next){case 0:_context65.next=2;return this.rpcClient.readContract({abi:groupingModuleAbi,address:this.address,functionName:"supportsInterface",args:[request.interfaceId]});case 2:return _context65.abrupt("return",_context65.sent);case 3:case"end":return _context65.stop();}},_callee65,this);}));function supportsInterface(_x35){return _supportsInterface2.apply(this,arguments);}return supportsInterface;}())}]);}(GroupingModuleEventClient);/**
|
1417
1436
|
* contract GroupingModule write method
|
1418
1437
|
*/var GroupingModuleClient=/*#__PURE__*/function(_GroupingModuleReadOn){function GroupingModuleClient(rpcClient,wallet,address){var _this5;_classCallCheck(this,GroupingModuleClient);_this5=_callSuper(this,GroupingModuleClient,[rpcClient,address]);_this5.wallet=wallet;return _this5;}/**
|
1419
1438
|
* method __ProtocolPausable_init for contract GroupingModule
|
1420
1439
|
*
|
1421
1440
|
* @param request GroupingModuleProtocolPausableInitRequest
|
1422
1441
|
* @return Promise<WriteContractReturnType>
|
1423
|
-
*/_inherits(GroupingModuleClient,_GroupingModuleReadOn);return _createClass(GroupingModuleClient,[{key:"protocolPausableInit",value:(function(){var _protocolPausableInit2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1442
|
+
*/_inherits(GroupingModuleClient,_GroupingModuleReadOn);return _createClass(GroupingModuleClient,[{key:"protocolPausableInit",value:(function(){var _protocolPausableInit2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee66(request){var _yield$this$rpcClient29,call;return _regeneratorRuntime().wrap(function _callee66$(_context66){while(1)switch(_context66.prev=_context66.next){case 0:_context66.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"__ProtocolPausable_init",account:this.wallet.account,args:[request.accessManager]});case 2:_yield$this$rpcClient29=_context66.sent;call=_yield$this$rpcClient29.request;_context66.next=6;return this.wallet.writeContract(call);case 6:return _context66.abrupt("return",_context66.sent);case 7:case"end":return _context66.stop();}},_callee66,this);}));function protocolPausableInit(_x36){return _protocolPausableInit2.apply(this,arguments);}return protocolPausableInit;}()/**
|
1424
1443
|
* method __ProtocolPausable_init for contract GroupingModule with only encode
|
1425
1444
|
*
|
1426
1445
|
* @param request GroupingModuleProtocolPausableInitRequest
|
@@ -1430,7 +1449,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1430
1449
|
*
|
1431
1450
|
* @param request GroupingModuleAddIpRequest
|
1432
1451
|
* @return Promise<WriteContractReturnType>
|
1433
|
-
*/},{key:"addIp",value:(function(){var _addIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1452
|
+
*/},{key:"addIp",value:(function(){var _addIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee67(request){var _yield$this$rpcClient30,call;return _regeneratorRuntime().wrap(function _callee67$(_context67){while(1)switch(_context67.prev=_context67.next){case 0:_context67.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"addIp",account:this.wallet.account,args:[request.groupIpId,request.ipIds]});case 2:_yield$this$rpcClient30=_context67.sent;call=_yield$this$rpcClient30.request;_context67.next=6;return this.wallet.writeContract(call);case 6:return _context67.abrupt("return",_context67.sent);case 7:case"end":return _context67.stop();}},_callee67,this);}));function addIp(_x37){return _addIp2.apply(this,arguments);}return addIp;}()/**
|
1434
1453
|
* method addIp for contract GroupingModule with only encode
|
1435
1454
|
*
|
1436
1455
|
* @param request GroupingModuleAddIpRequest
|
@@ -1440,7 +1459,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1440
1459
|
*
|
1441
1460
|
* @param request GroupingModuleClaimRewardRequest
|
1442
1461
|
* @return Promise<WriteContractReturnType>
|
1443
|
-
*/},{key:"claimReward",value:(function(){var _claimReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1462
|
+
*/},{key:"claimReward",value:(function(){var _claimReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee68(request){var _yield$this$rpcClient31,call;return _regeneratorRuntime().wrap(function _callee68$(_context68){while(1)switch(_context68.prev=_context68.next){case 0:_context68.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"claimReward",account:this.wallet.account,args:[request.groupId,request.token,request.ipIds]});case 2:_yield$this$rpcClient31=_context68.sent;call=_yield$this$rpcClient31.request;_context68.next=6;return this.wallet.writeContract(call);case 6:return _context68.abrupt("return",_context68.sent);case 7:case"end":return _context68.stop();}},_callee68,this);}));function claimReward(_x38){return _claimReward.apply(this,arguments);}return claimReward;}()/**
|
1444
1463
|
* method claimReward for contract GroupingModule with only encode
|
1445
1464
|
*
|
1446
1465
|
* @param request GroupingModuleClaimRewardRequest
|
@@ -1450,7 +1469,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1450
1469
|
*
|
1451
1470
|
* @param request GroupingModuleCollectRoyaltiesRequest
|
1452
1471
|
* @return Promise<WriteContractReturnType>
|
1453
|
-
*/},{key:"collectRoyalties",value:(function(){var _collectRoyalties=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1472
|
+
*/},{key:"collectRoyalties",value:(function(){var _collectRoyalties=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee69(request){var _yield$this$rpcClient32,call;return _regeneratorRuntime().wrap(function _callee69$(_context69){while(1)switch(_context69.prev=_context69.next){case 0:_context69.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"collectRoyalties",account:this.wallet.account,args:[request.groupId,request.token,request.snapshotIds]});case 2:_yield$this$rpcClient32=_context69.sent;call=_yield$this$rpcClient32.request;_context69.next=6;return this.wallet.writeContract(call);case 6:return _context69.abrupt("return",_context69.sent);case 7:case"end":return _context69.stop();}},_callee69,this);}));function collectRoyalties(_x39){return _collectRoyalties.apply(this,arguments);}return collectRoyalties;}()/**
|
1454
1473
|
* method collectRoyalties for contract GroupingModule with only encode
|
1455
1474
|
*
|
1456
1475
|
* @param request GroupingModuleCollectRoyaltiesRequest
|
@@ -1460,7 +1479,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1460
1479
|
*
|
1461
1480
|
* @param request GroupingModuleInitializeRequest
|
1462
1481
|
* @return Promise<WriteContractReturnType>
|
1463
|
-
*/},{key:"initialize",value:(function(){var _initialize3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1482
|
+
*/},{key:"initialize",value:(function(){var _initialize3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(request){var _yield$this$rpcClient33,call;return _regeneratorRuntime().wrap(function _callee70$(_context70){while(1)switch(_context70.prev=_context70.next){case 0:_context70.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"initialize",account:this.wallet.account,args:[request.accessManager]});case 2:_yield$this$rpcClient33=_context70.sent;call=_yield$this$rpcClient33.request;_context70.next=6;return this.wallet.writeContract(call);case 6:return _context70.abrupt("return",_context70.sent);case 7:case"end":return _context70.stop();}},_callee70,this);}));function initialize(_x40){return _initialize3.apply(this,arguments);}return initialize;}()/**
|
1464
1483
|
* method initialize for contract GroupingModule with only encode
|
1465
1484
|
*
|
1466
1485
|
* @param request GroupingModuleInitializeRequest
|
@@ -1470,7 +1489,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1470
1489
|
*
|
1471
1490
|
* @param request GroupingModulePauseRequest
|
1472
1491
|
* @return Promise<WriteContractReturnType>
|
1473
|
-
*/},{key:"pause",value:(function(){var _pause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1492
|
+
*/},{key:"pause",value:(function(){var _pause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee71(){var _yield$this$rpcClient34,call;return _regeneratorRuntime().wrap(function _callee71$(_context71){while(1)switch(_context71.prev=_context71.next){case 0:_context71.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"pause",account:this.wallet.account});case 2:_yield$this$rpcClient34=_context71.sent;call=_yield$this$rpcClient34.request;_context71.next=6;return this.wallet.writeContract(call);case 6:return _context71.abrupt("return",_context71.sent);case 7:case"end":return _context71.stop();}},_callee71,this);}));function pause(){return _pause2.apply(this,arguments);}return pause;}()/**
|
1474
1493
|
* method pause for contract GroupingModule with only encode
|
1475
1494
|
*
|
1476
1495
|
* @param request GroupingModulePauseRequest
|
@@ -1480,7 +1499,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1480
1499
|
*
|
1481
1500
|
* @param request GroupingModuleRegisterGroupRequest
|
1482
1501
|
* @return Promise<WriteContractReturnType>
|
1483
|
-
*/},{key:"registerGroup",value:(function(){var _registerGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1502
|
+
*/},{key:"registerGroup",value:(function(){var _registerGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee72(request){var _yield$this$rpcClient35,call;return _regeneratorRuntime().wrap(function _callee72$(_context72){while(1)switch(_context72.prev=_context72.next){case 0:_context72.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"registerGroup",account:this.wallet.account,args:[request.groupPool]});case 2:_yield$this$rpcClient35=_context72.sent;call=_yield$this$rpcClient35.request;_context72.next=6;return this.wallet.writeContract(call);case 6:return _context72.abrupt("return",_context72.sent);case 7:case"end":return _context72.stop();}},_callee72,this);}));function registerGroup(_x41){return _registerGroup.apply(this,arguments);}return registerGroup;}()/**
|
1484
1503
|
* method registerGroup for contract GroupingModule with only encode
|
1485
1504
|
*
|
1486
1505
|
* @param request GroupingModuleRegisterGroupRequest
|
@@ -1490,7 +1509,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1490
1509
|
*
|
1491
1510
|
* @param request GroupingModuleRemoveIpRequest
|
1492
1511
|
* @return Promise<WriteContractReturnType>
|
1493
|
-
*/},{key:"removeIp",value:(function(){var _removeIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1512
|
+
*/},{key:"removeIp",value:(function(){var _removeIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee73(request){var _yield$this$rpcClient36,call;return _regeneratorRuntime().wrap(function _callee73$(_context73){while(1)switch(_context73.prev=_context73.next){case 0:_context73.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"removeIp",account:this.wallet.account,args:[request.groupIpId,request.ipIds]});case 2:_yield$this$rpcClient36=_context73.sent;call=_yield$this$rpcClient36.request;_context73.next=6;return this.wallet.writeContract(call);case 6:return _context73.abrupt("return",_context73.sent);case 7:case"end":return _context73.stop();}},_callee73,this);}));function removeIp(_x42){return _removeIp2.apply(this,arguments);}return removeIp;}()/**
|
1494
1513
|
* method removeIp for contract GroupingModule with only encode
|
1495
1514
|
*
|
1496
1515
|
* @param request GroupingModuleRemoveIpRequest
|
@@ -1500,7 +1519,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1500
1519
|
*
|
1501
1520
|
* @param request GroupingModuleSetAuthorityRequest
|
1502
1521
|
* @return Promise<WriteContractReturnType>
|
1503
|
-
*/},{key:"setAuthority",value:(function(){var _setAuthority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1522
|
+
*/},{key:"setAuthority",value:(function(){var _setAuthority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee74(request){var _yield$this$rpcClient37,call;return _regeneratorRuntime().wrap(function _callee74$(_context74){while(1)switch(_context74.prev=_context74.next){case 0:_context74.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"setAuthority",account:this.wallet.account,args:[request.newAuthority]});case 2:_yield$this$rpcClient37=_context74.sent;call=_yield$this$rpcClient37.request;_context74.next=6;return this.wallet.writeContract(call);case 6:return _context74.abrupt("return",_context74.sent);case 7:case"end":return _context74.stop();}},_callee74,this);}));function setAuthority(_x43){return _setAuthority3.apply(this,arguments);}return setAuthority;}()/**
|
1504
1523
|
* method setAuthority for contract GroupingModule with only encode
|
1505
1524
|
*
|
1506
1525
|
* @param request GroupingModuleSetAuthorityRequest
|
@@ -1510,7 +1529,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1510
1529
|
*
|
1511
1530
|
* @param request GroupingModuleUnpauseRequest
|
1512
1531
|
* @return Promise<WriteContractReturnType>
|
1513
|
-
*/},{key:"unpause",value:(function(){var _unpause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1532
|
+
*/},{key:"unpause",value:(function(){var _unpause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee75(){var _yield$this$rpcClient38,call;return _regeneratorRuntime().wrap(function _callee75$(_context75){while(1)switch(_context75.prev=_context75.next){case 0:_context75.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"unpause",account:this.wallet.account});case 2:_yield$this$rpcClient38=_context75.sent;call=_yield$this$rpcClient38.request;_context75.next=6;return this.wallet.writeContract(call);case 6:return _context75.abrupt("return",_context75.sent);case 7:case"end":return _context75.stop();}},_callee75,this);}));function unpause(){return _unpause2.apply(this,arguments);}return unpause;}()/**
|
1514
1533
|
* method unpause for contract GroupingModule with only encode
|
1515
1534
|
*
|
1516
1535
|
* @param request GroupingModuleUnpauseRequest
|
@@ -1520,7 +1539,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1520
1539
|
*
|
1521
1540
|
* @param request GroupingModuleUpgradeToAndCallRequest
|
1522
1541
|
* @return Promise<WriteContractReturnType>
|
1523
|
-
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1542
|
+
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee76(request){var _yield$this$rpcClient39,call;return _regeneratorRuntime().wrap(function _callee76$(_context76){while(1)switch(_context76.prev=_context76.next){case 0:_context76.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"upgradeToAndCall",account:this.wallet.account,args:[request.newImplementation,request.data]});case 2:_yield$this$rpcClient39=_context76.sent;call=_yield$this$rpcClient39.request;_context76.next=6;return this.wallet.writeContract(call);case 6:return _context76.abrupt("return",_context76.sent);case 7:case"end":return _context76.stop();}},_callee76,this);}));function upgradeToAndCall(_x44){return _upgradeToAndCall3.apply(this,arguments);}return upgradeToAndCall;}()/**
|
1524
1543
|
* method upgradeToAndCall for contract GroupingModule with only encode
|
1525
1544
|
*
|
1526
1545
|
* @param request GroupingModuleUpgradeToAndCallRequest
|
@@ -1530,7 +1549,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1530
1549
|
*
|
1531
1550
|
* @param request GroupingModuleWhitelistGroupRewardPoolRequest
|
1532
1551
|
* @return Promise<WriteContractReturnType>
|
1533
|
-
*/},{key:"whitelistGroupRewardPool",value:(function(){var _whitelistGroupRewardPool=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1552
|
+
*/},{key:"whitelistGroupRewardPool",value:(function(){var _whitelistGroupRewardPool=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee77(request){var _yield$this$rpcClient40,call;return _regeneratorRuntime().wrap(function _callee77$(_context77){while(1)switch(_context77.prev=_context77.next){case 0:_context77.next=2;return this.rpcClient.simulateContract({abi:groupingModuleAbi,address:this.address,functionName:"whitelistGroupRewardPool",account:this.wallet.account,args:[request.rewardPool]});case 2:_yield$this$rpcClient40=_context77.sent;call=_yield$this$rpcClient40.request;_context77.next=6;return this.wallet.writeContract(call);case 6:return _context77.abrupt("return",_context77.sent);case 7:case"end":return _context77.stop();}},_callee77,this);}));function whitelistGroupRewardPool(_x45){return _whitelistGroupRewardPool.apply(this,arguments);}return whitelistGroupRewardPool;}()/**
|
1534
1553
|
* method whitelistGroupRewardPool for contract GroupingModule with only encode
|
1535
1554
|
*
|
1536
1555
|
* @param request GroupingModuleWhitelistGroupRewardPoolRequest
|
@@ -1577,7 +1596,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1577
1596
|
*
|
1578
1597
|
* @param request GroupingWorkflowsMintAndRegisterIpAndAttachLicenseAndAddToGroupRequest
|
1579
1598
|
* @return Promise<WriteContractReturnType>
|
1580
|
-
*/return _createClass(GroupingWorkflowsClient,[{key:"mintAndRegisterIpAndAttachLicenseAndAddToGroup",value:(function(){var _mintAndRegisterIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1599
|
+
*/return _createClass(GroupingWorkflowsClient,[{key:"mintAndRegisterIpAndAttachLicenseAndAddToGroup",value:(function(){var _mintAndRegisterIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee78(request){var _yield$this$rpcClient41,call;return _regeneratorRuntime().wrap(function _callee78$(_context78){while(1)switch(_context78.prev=_context78.next){case 0:_context78.next=2;return this.rpcClient.simulateContract({abi:groupingWorkflowsAbi,address:this.address,functionName:"mintAndRegisterIpAndAttachLicenseAndAddToGroup",account:this.wallet.account,args:[request.spgNftContract,request.groupId,request.recipient,request.licenseTemplate,request.licenseTermsId,request.ipMetadata,request.sigAddToGroup]});case 2:_yield$this$rpcClient41=_context78.sent;call=_yield$this$rpcClient41.request;_context78.next=6;return this.wallet.writeContract(call);case 6:return _context78.abrupt("return",_context78.sent);case 7:case"end":return _context78.stop();}},_callee78,this);}));function mintAndRegisterIpAndAttachLicenseAndAddToGroup(_x46){return _mintAndRegisterIpAndAttachLicenseAndAddToGroup.apply(this,arguments);}return mintAndRegisterIpAndAttachLicenseAndAddToGroup;}()/**
|
1581
1600
|
* method mintAndRegisterIpAndAttachLicenseAndAddToGroup for contract GroupingWorkflows with only encode
|
1582
1601
|
*
|
1583
1602
|
* @param request GroupingWorkflowsMintAndRegisterIpAndAttachLicenseAndAddToGroupRequest
|
@@ -1587,7 +1606,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1587
1606
|
*
|
1588
1607
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseRequest
|
1589
1608
|
* @return Promise<WriteContractReturnType>
|
1590
|
-
*/},{key:"registerGroupAndAttachLicense",value:(function(){var _registerGroupAndAttachLicense=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1609
|
+
*/},{key:"registerGroupAndAttachLicense",value:(function(){var _registerGroupAndAttachLicense=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee79(request){var _yield$this$rpcClient42,call;return _regeneratorRuntime().wrap(function _callee79$(_context79){while(1)switch(_context79.prev=_context79.next){case 0:_context79.next=2;return this.rpcClient.simulateContract({abi:groupingWorkflowsAbi,address:this.address,functionName:"registerGroupAndAttachLicense",account:this.wallet.account,args:[request.groupPool,request.licenseTemplate,request.licenseTermsId]});case 2:_yield$this$rpcClient42=_context79.sent;call=_yield$this$rpcClient42.request;_context79.next=6;return this.wallet.writeContract(call);case 6:return _context79.abrupt("return",_context79.sent);case 7:case"end":return _context79.stop();}},_callee79,this);}));function registerGroupAndAttachLicense(_x47){return _registerGroupAndAttachLicense.apply(this,arguments);}return registerGroupAndAttachLicense;}()/**
|
1591
1610
|
* method registerGroupAndAttachLicense for contract GroupingWorkflows with only encode
|
1592
1611
|
*
|
1593
1612
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseRequest
|
@@ -1597,7 +1616,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1597
1616
|
*
|
1598
1617
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseAndAddIpsRequest
|
1599
1618
|
* @return Promise<WriteContractReturnType>
|
1600
|
-
*/},{key:"registerGroupAndAttachLicenseAndAddIps",value:(function(){var _registerGroupAndAttachLicenseAndAddIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1619
|
+
*/},{key:"registerGroupAndAttachLicenseAndAddIps",value:(function(){var _registerGroupAndAttachLicenseAndAddIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee80(request){var _yield$this$rpcClient43,call;return _regeneratorRuntime().wrap(function _callee80$(_context80){while(1)switch(_context80.prev=_context80.next){case 0:_context80.next=2;return this.rpcClient.simulateContract({abi:groupingWorkflowsAbi,address:this.address,functionName:"registerGroupAndAttachLicenseAndAddIps",account:this.wallet.account,args:[request.groupPool,request.ipIds,request.licenseTemplate,request.licenseTermsId]});case 2:_yield$this$rpcClient43=_context80.sent;call=_yield$this$rpcClient43.request;_context80.next=6;return this.wallet.writeContract(call);case 6:return _context80.abrupt("return",_context80.sent);case 7:case"end":return _context80.stop();}},_callee80,this);}));function registerGroupAndAttachLicenseAndAddIps(_x48){return _registerGroupAndAttachLicenseAndAddIps.apply(this,arguments);}return registerGroupAndAttachLicenseAndAddIps;}()/**
|
1601
1620
|
* method registerGroupAndAttachLicenseAndAddIps for contract GroupingWorkflows with only encode
|
1602
1621
|
*
|
1603
1622
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseAndAddIpsRequest
|
@@ -1607,7 +1626,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1607
1626
|
*
|
1608
1627
|
* @param request GroupingWorkflowsRegisterIpAndAttachLicenseAndAddToGroupRequest
|
1609
1628
|
* @return Promise<WriteContractReturnType>
|
1610
|
-
*/},{key:"registerIpAndAttachLicenseAndAddToGroup",value:(function(){var _registerIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1629
|
+
*/},{key:"registerIpAndAttachLicenseAndAddToGroup",value:(function(){var _registerIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee81(request){var _yield$this$rpcClient44,call;return _regeneratorRuntime().wrap(function _callee81$(_context81){while(1)switch(_context81.prev=_context81.next){case 0:_context81.next=2;return this.rpcClient.simulateContract({abi:groupingWorkflowsAbi,address:this.address,functionName:"registerIpAndAttachLicenseAndAddToGroup",account:this.wallet.account,args:[request.nftContract,request.tokenId,request.groupId,request.licenseTemplate,request.licenseTermsId,request.ipMetadata,request.sigMetadataAndAttach,request.sigAddToGroup]});case 2:_yield$this$rpcClient44=_context81.sent;call=_yield$this$rpcClient44.request;_context81.next=6;return this.wallet.writeContract(call);case 6:return _context81.abrupt("return",_context81.sent);case 7:case"end":return _context81.stop();}},_callee81,this);}));function registerIpAndAttachLicenseAndAddToGroup(_x49){return _registerIpAndAttachLicenseAndAddToGroup.apply(this,arguments);}return registerIpAndAttachLicenseAndAddToGroup;}()/**
|
1611
1630
|
* method registerIpAndAttachLicenseAndAddToGroup for contract GroupingWorkflows with only encode
|
1612
1631
|
*
|
1613
1632
|
* @param request GroupingWorkflowsRegisterIpAndAttachLicenseAndAddToGroupRequest
|
@@ -1652,19 +1671,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1652
1671
|
*
|
1653
1672
|
* @param request IpAccountImplStateRequest
|
1654
1673
|
* @return Promise<IpAccountImplStateResponse>
|
1655
|
-
*/return _createClass(IpAccountImplReadOnlyClient,[{key:"state",value:(function(){var _state=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1674
|
+
*/return _createClass(IpAccountImplReadOnlyClient,[{key:"state",value:(function(){var _state=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee82(){var result;return _regeneratorRuntime().wrap(function _callee82$(_context82){while(1)switch(_context82.prev=_context82.next){case 0:_context82.next=2;return this.rpcClient.readContract({abi:ipAccountImplAbi,address:this.address,functionName:"state"});case 2:result=_context82.sent;return _context82.abrupt("return",{result:result});case 4:case"end":return _context82.stop();}},_callee82,this);}));function state(){return _state.apply(this,arguments);}return state;}()/**
|
1656
1675
|
* method token for contract IPAccountImpl
|
1657
1676
|
*
|
1658
1677
|
* @param request IpAccountImplTokenRequest
|
1659
1678
|
* @return Promise<IpAccountImplTokenResponse>
|
1660
|
-
*/)},{key:"token",value:(function(){var _token=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1679
|
+
*/)},{key:"token",value:(function(){var _token=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee83(){return _regeneratorRuntime().wrap(function _callee83$(_context83){while(1)switch(_context83.prev=_context83.next){case 0:_context83.next=2;return this.rpcClient.readContract({abi:ipAccountImplAbi,address:this.address,functionName:"token"});case 2:return _context83.abrupt("return",_context83.sent);case 3:case"end":return _context83.stop();}},_callee83,this);}));function token(){return _token.apply(this,arguments);}return token;}())}]);}();/**
|
1661
1680
|
* contract IPAccountImpl write method
|
1662
1681
|
*/var IpAccountImplClient=/*#__PURE__*/function(_IpAccountImplReadOnl){function IpAccountImplClient(rpcClient,wallet,address){var _this6;_classCallCheck(this,IpAccountImplClient);_this6=_callSuper(this,IpAccountImplClient,[rpcClient,address]);_this6.wallet=wallet;return _this6;}/**
|
1663
1682
|
* method execute for contract IPAccountImpl
|
1664
1683
|
*
|
1665
1684
|
* @param request IpAccountImplExecuteRequest
|
1666
1685
|
* @return Promise<WriteContractReturnType>
|
1667
|
-
*/_inherits(IpAccountImplClient,_IpAccountImplReadOnl);return _createClass(IpAccountImplClient,[{key:"execute",value:(function(){var _execute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1686
|
+
*/_inherits(IpAccountImplClient,_IpAccountImplReadOnl);return _createClass(IpAccountImplClient,[{key:"execute",value:(function(){var _execute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee84(request){var _yield$this$rpcClient45,call;return _regeneratorRuntime().wrap(function _callee84$(_context84){while(1)switch(_context84.prev=_context84.next){case 0:_context84.next=2;return this.rpcClient.simulateContract({abi:ipAccountImplAbi,address:this.address,functionName:"execute",account:this.wallet.account,args:[request.to,request.value,request.data,request.operation]});case 2:_yield$this$rpcClient45=_context84.sent;call=_yield$this$rpcClient45.request;_context84.next=6;return this.wallet.writeContract(call);case 6:return _context84.abrupt("return",_context84.sent);case 7:case"end":return _context84.stop();}},_callee84,this);}));function execute(_x50){return _execute.apply(this,arguments);}return execute;}()/**
|
1668
1687
|
* method execute for contract IPAccountImpl with only encode
|
1669
1688
|
*
|
1670
1689
|
* @param request IpAccountImplExecuteRequest
|
@@ -1674,7 +1693,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1674
1693
|
*
|
1675
1694
|
* @param request IpAccountImplExecute2Request
|
1676
1695
|
* @return Promise<WriteContractReturnType>
|
1677
|
-
*/},{key:"execute2",value:(function(){var _execute2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1696
|
+
*/},{key:"execute2",value:(function(){var _execute2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee85(request){var _yield$this$rpcClient46,call;return _regeneratorRuntime().wrap(function _callee85$(_context85){while(1)switch(_context85.prev=_context85.next){case 0:_context85.next=2;return this.rpcClient.simulateContract({abi:ipAccountImplAbi,address:this.address,functionName:"execute",account:this.wallet.account,args:[request.to,request.value,request.data]});case 2:_yield$this$rpcClient46=_context85.sent;call=_yield$this$rpcClient46.request;_context85.next=6;return this.wallet.writeContract(call);case 6:return _context85.abrupt("return",_context85.sent);case 7:case"end":return _context85.stop();}},_callee85,this);}));function execute2(_x51){return _execute2.apply(this,arguments);}return execute2;}()/**
|
1678
1697
|
* method execute for contract IPAccountImpl with only encode
|
1679
1698
|
*
|
1680
1699
|
* @param request IpAccountImplExecute2Request
|
@@ -1684,7 +1703,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1684
1703
|
*
|
1685
1704
|
* @param request IpAccountImplExecuteWithSigRequest
|
1686
1705
|
* @return Promise<WriteContractReturnType>
|
1687
|
-
*/},{key:"executeWithSig",value:(function(){var _executeWithSig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1706
|
+
*/},{key:"executeWithSig",value:(function(){var _executeWithSig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee86(request){var _yield$this$rpcClient47,call;return _regeneratorRuntime().wrap(function _callee86$(_context86){while(1)switch(_context86.prev=_context86.next){case 0:_context86.next=2;return this.rpcClient.simulateContract({abi:ipAccountImplAbi,address:this.address,functionName:"executeWithSig",account:this.wallet.account,args:[request.to,request.value,request.data,request.signer,request.deadline,request.signature]});case 2:_yield$this$rpcClient47=_context86.sent;call=_yield$this$rpcClient47.request;_context86.next=6;return this.wallet.writeContract(call);case 6:return _context86.abrupt("return",_context86.sent);case 7:case"end":return _context86.stop();}},_callee86,this);}));function executeWithSig(_x52){return _executeWithSig.apply(this,arguments);}return executeWithSig;}()/**
|
1688
1707
|
* method executeWithSig for contract IPAccountImpl with only encode
|
1689
1708
|
*
|
1690
1709
|
* @param request IpAccountImplExecuteWithSigRequest
|
@@ -1741,19 +1760,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1741
1760
|
*
|
1742
1761
|
* @param request IpAssetRegistryIpIdRequest
|
1743
1762
|
* @return Promise<IpAssetRegistryIpIdResponse>
|
1744
|
-
*/_inherits(IpAssetRegistryReadOnlyClient,_IpAssetRegistryEvent);return _createClass(IpAssetRegistryReadOnlyClient,[{key:"ipId",value:(function(){var _ipId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1763
|
+
*/_inherits(IpAssetRegistryReadOnlyClient,_IpAssetRegistryEvent);return _createClass(IpAssetRegistryReadOnlyClient,[{key:"ipId",value:(function(){var _ipId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee87(request){return _regeneratorRuntime().wrap(function _callee87$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:_context87.next=2;return this.rpcClient.readContract({abi:ipAssetRegistryAbi,address:this.address,functionName:"ipId",args:[request.chainId,request.tokenContract,request.tokenId]});case 2:return _context87.abrupt("return",_context87.sent);case 3:case"end":return _context87.stop();}},_callee87,this);}));function ipId(_x53){return _ipId.apply(this,arguments);}return ipId;}()/**
|
1745
1764
|
* method isRegistered for contract IPAssetRegistry
|
1746
1765
|
*
|
1747
1766
|
* @param request IpAssetRegistryIsRegisteredRequest
|
1748
1767
|
* @return Promise<IpAssetRegistryIsRegisteredResponse>
|
1749
|
-
*/)},{key:"isRegistered",value:(function(){var _isRegistered=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1768
|
+
*/)},{key:"isRegistered",value:(function(){var _isRegistered=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee88(request){return _regeneratorRuntime().wrap(function _callee88$(_context88){while(1)switch(_context88.prev=_context88.next){case 0:_context88.next=2;return this.rpcClient.readContract({abi:ipAssetRegistryAbi,address:this.address,functionName:"isRegistered",args:[request.id]});case 2:return _context88.abrupt("return",_context88.sent);case 3:case"end":return _context88.stop();}},_callee88,this);}));function isRegistered(_x54){return _isRegistered.apply(this,arguments);}return isRegistered;}())}]);}(IpAssetRegistryEventClient);/**
|
1750
1769
|
* contract IPAssetRegistry write method
|
1751
1770
|
*/var IpAssetRegistryClient=/*#__PURE__*/function(_IpAssetRegistryReadO){function IpAssetRegistryClient(rpcClient,wallet,address){var _this7;_classCallCheck(this,IpAssetRegistryClient);_this7=_callSuper(this,IpAssetRegistryClient,[rpcClient,address]);_this7.wallet=wallet;return _this7;}/**
|
1752
1771
|
* method register for contract IPAssetRegistry
|
1753
1772
|
*
|
1754
1773
|
* @param request IpAssetRegistryRegisterRequest
|
1755
1774
|
* @return Promise<WriteContractReturnType>
|
1756
|
-
*/_inherits(IpAssetRegistryClient,_IpAssetRegistryReadO);return _createClass(IpAssetRegistryClient,[{key:"register",value:(function(){var _register=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1775
|
+
*/_inherits(IpAssetRegistryClient,_IpAssetRegistryReadO);return _createClass(IpAssetRegistryClient,[{key:"register",value:(function(){var _register=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee89(request){var _yield$this$rpcClient48,call;return _regeneratorRuntime().wrap(function _callee89$(_context89){while(1)switch(_context89.prev=_context89.next){case 0:_context89.next=2;return this.rpcClient.simulateContract({abi:ipAssetRegistryAbi,address:this.address,functionName:"register",account:this.wallet.account,args:[request.chainid,request.tokenContract,request.tokenId]});case 2:_yield$this$rpcClient48=_context89.sent;call=_yield$this$rpcClient48.request;_context89.next=6;return this.wallet.writeContract(call);case 6:return _context89.abrupt("return",_context89.sent);case 7:case"end":return _context89.stop();}},_callee89,this);}));function register(_x55){return _register.apply(this,arguments);}return register;}()/**
|
1757
1776
|
* method register for contract IPAssetRegistry with only encode
|
1758
1777
|
*
|
1759
1778
|
* @param request IpAssetRegistryRegisterRequest
|
@@ -1799,19 +1818,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1799
1818
|
*
|
1800
1819
|
* @param request IpRoyaltyVaultImplClaimableRevenueRequest
|
1801
1820
|
* @return Promise<IpRoyaltyVaultImplClaimableRevenueResponse>
|
1802
|
-
*/_inherits(IpRoyaltyVaultImplReadOnlyClient,_IpRoyaltyVaultImplEv);return _createClass(IpRoyaltyVaultImplReadOnlyClient,[{key:"claimableRevenue",value:(function(){var _claimableRevenue=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1821
|
+
*/_inherits(IpRoyaltyVaultImplReadOnlyClient,_IpRoyaltyVaultImplEv);return _createClass(IpRoyaltyVaultImplReadOnlyClient,[{key:"claimableRevenue",value:(function(){var _claimableRevenue=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee90(request){return _regeneratorRuntime().wrap(function _callee90$(_context90){while(1)switch(_context90.prev=_context90.next){case 0:_context90.next=2;return this.rpcClient.readContract({abi:ipRoyaltyVaultImplAbi,address:this.address,functionName:"claimableRevenue",args:[request.account,request.snapshotId,request.token]});case 2:return _context90.abrupt("return",_context90.sent);case 3:case"end":return _context90.stop();}},_callee90,this);}));function claimableRevenue(_x56){return _claimableRevenue.apply(this,arguments);}return claimableRevenue;}()/**
|
1803
1822
|
* method ipId for contract IpRoyaltyVaultImpl
|
1804
1823
|
*
|
1805
1824
|
* @param request IpRoyaltyVaultImplIpIdRequest
|
1806
1825
|
* @return Promise<IpRoyaltyVaultImplIpIdResponse>
|
1807
|
-
*/)},{key:"ipId",value:(function(){var _ipId2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1826
|
+
*/)},{key:"ipId",value:(function(){var _ipId2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee91(){return _regeneratorRuntime().wrap(function _callee91$(_context91){while(1)switch(_context91.prev=_context91.next){case 0:_context91.next=2;return this.rpcClient.readContract({abi:ipRoyaltyVaultImplAbi,address:this.address,functionName:"ipId"});case 2:return _context91.abrupt("return",_context91.sent);case 3:case"end":return _context91.stop();}},_callee91,this);}));function ipId(){return _ipId2.apply(this,arguments);}return ipId;}())}]);}(IpRoyaltyVaultImplEventClient);/**
|
1808
1827
|
* contract IpRoyaltyVaultImpl write method
|
1809
1828
|
*/var IpRoyaltyVaultImplClient=/*#__PURE__*/function(_IpRoyaltyVaultImplRe){function IpRoyaltyVaultImplClient(rpcClient,wallet,address){var _this8;_classCallCheck(this,IpRoyaltyVaultImplClient);_this8=_callSuper(this,IpRoyaltyVaultImplClient,[rpcClient,address]);_this8.wallet=wallet;return _this8;}/**
|
1810
1829
|
* method claimRevenueOnBehalfBySnapshotBatch for contract IpRoyaltyVaultImpl
|
1811
1830
|
*
|
1812
1831
|
* @param request IpRoyaltyVaultImplClaimRevenueOnBehalfBySnapshotBatchRequest
|
1813
1832
|
* @return Promise<WriteContractReturnType>
|
1814
|
-
*/_inherits(IpRoyaltyVaultImplClient,_IpRoyaltyVaultImplRe);return _createClass(IpRoyaltyVaultImplClient,[{key:"claimRevenueOnBehalfBySnapshotBatch",value:(function(){var _claimRevenueOnBehalfBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1833
|
+
*/_inherits(IpRoyaltyVaultImplClient,_IpRoyaltyVaultImplRe);return _createClass(IpRoyaltyVaultImplClient,[{key:"claimRevenueOnBehalfBySnapshotBatch",value:(function(){var _claimRevenueOnBehalfBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(request){var _yield$this$rpcClient49,call;return _regeneratorRuntime().wrap(function _callee92$(_context92){while(1)switch(_context92.prev=_context92.next){case 0:_context92.next=2;return this.rpcClient.simulateContract({abi:ipRoyaltyVaultImplAbi,address:this.address,functionName:"claimRevenueOnBehalfBySnapshotBatch",account:this.wallet.account,args:[request.snapshotIds,request.token,request.claimer]});case 2:_yield$this$rpcClient49=_context92.sent;call=_yield$this$rpcClient49.request;_context92.next=6;return this.wallet.writeContract(call);case 6:return _context92.abrupt("return",_context92.sent);case 7:case"end":return _context92.stop();}},_callee92,this);}));function claimRevenueOnBehalfBySnapshotBatch(_x57){return _claimRevenueOnBehalfBySnapshotBatch.apply(this,arguments);}return claimRevenueOnBehalfBySnapshotBatch;}()/**
|
1815
1834
|
* method claimRevenueOnBehalfBySnapshotBatch for contract IpRoyaltyVaultImpl with only encode
|
1816
1835
|
*
|
1817
1836
|
* @param request IpRoyaltyVaultImplClaimRevenueOnBehalfBySnapshotBatchRequest
|
@@ -1821,7 +1840,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1821
1840
|
*
|
1822
1841
|
* @param request IpRoyaltyVaultImplSnapshotRequest
|
1823
1842
|
* @return Promise<WriteContractReturnType>
|
1824
|
-
*/},{key:"snapshot",value:(function(){var _snapshot=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1843
|
+
*/},{key:"snapshot",value:(function(){var _snapshot=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(){var _yield$this$rpcClient50,call;return _regeneratorRuntime().wrap(function _callee93$(_context93){while(1)switch(_context93.prev=_context93.next){case 0:_context93.next=2;return this.rpcClient.simulateContract({abi:ipRoyaltyVaultImplAbi,address:this.address,functionName:"snapshot",account:this.wallet.account});case 2:_yield$this$rpcClient50=_context93.sent;call=_yield$this$rpcClient50.request;_context93.next=6;return this.wallet.writeContract(call);case 6:return _context93.abrupt("return",_context93.sent);case 7:case"end":return _context93.stop();}},_callee93,this);}));function snapshot(){return _snapshot.apply(this,arguments);}return snapshot;}()/**
|
1825
1844
|
* method snapshot for contract IpRoyaltyVaultImpl with only encode
|
1826
1845
|
*
|
1827
1846
|
* @param request IpRoyaltyVaultImplSnapshotRequest
|
@@ -1835,6 +1854,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1835
1854
|
* @param ipMetadata tuple
|
1836
1855
|
* @param terms tuple
|
1837
1856
|
*/ /**
|
1857
|
+
* LicenseAttachmentWorkflowsMulticallRequest
|
1858
|
+
*
|
1859
|
+
* @param data bytes[]
|
1860
|
+
*/ /**
|
1838
1861
|
* LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
1839
1862
|
*
|
1840
1863
|
* @param nftContract address
|
@@ -1856,17 +1879,27 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1856
1879
|
*
|
1857
1880
|
* @param request LicenseAttachmentWorkflowsMintAndRegisterIpAndAttachPilTermsRequest
|
1858
1881
|
* @return Promise<WriteContractReturnType>
|
1859
|
-
*/return _createClass(LicenseAttachmentWorkflowsClient,[{key:"mintAndRegisterIpAndAttachPilTerms",value:(function(){var _mintAndRegisterIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1882
|
+
*/return _createClass(LicenseAttachmentWorkflowsClient,[{key:"mintAndRegisterIpAndAttachPilTerms",value:(function(){var _mintAndRegisterIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee94(request){var _yield$this$rpcClient51,call;return _regeneratorRuntime().wrap(function _callee94$(_context94){while(1)switch(_context94.prev=_context94.next){case 0:_context94.next=2;return this.rpcClient.simulateContract({abi:licenseAttachmentWorkflowsAbi,address:this.address,functionName:"mintAndRegisterIpAndAttachPILTerms",account:this.wallet.account,args:[request.spgNftContract,request.recipient,request.ipMetadata,request.terms]});case 2:_yield$this$rpcClient51=_context94.sent;call=_yield$this$rpcClient51.request;_context94.next=6;return this.wallet.writeContract(call);case 6:return _context94.abrupt("return",_context94.sent);case 7:case"end":return _context94.stop();}},_callee94,this);}));function mintAndRegisterIpAndAttachPilTerms(_x58){return _mintAndRegisterIpAndAttachPilTerms.apply(this,arguments);}return mintAndRegisterIpAndAttachPilTerms;}()/**
|
1860
1883
|
* method mintAndRegisterIpAndAttachPILTerms for contract LicenseAttachmentWorkflows with only encode
|
1861
1884
|
*
|
1862
1885
|
* @param request LicenseAttachmentWorkflowsMintAndRegisterIpAndAttachPilTermsRequest
|
1863
1886
|
* @return EncodedTxData
|
1864
1887
|
*/)},{key:"mintAndRegisterIpAndAttachPilTermsEncode",value:function mintAndRegisterIpAndAttachPilTermsEncode(request){return {to:this.address,data:encodeFunctionData({abi:licenseAttachmentWorkflowsAbi,functionName:"mintAndRegisterIpAndAttachPILTerms",args:[request.spgNftContract,request.recipient,request.ipMetadata,request.terms]})};}/**
|
1888
|
+
* method multicall for contract LicenseAttachmentWorkflows
|
1889
|
+
*
|
1890
|
+
* @param request LicenseAttachmentWorkflowsMulticallRequest
|
1891
|
+
* @return Promise<WriteContractReturnType>
|
1892
|
+
*/},{key:"multicall",value:(function(){var _multicall2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee95(request){var _yield$this$rpcClient52,call;return _regeneratorRuntime().wrap(function _callee95$(_context95){while(1)switch(_context95.prev=_context95.next){case 0:_context95.next=2;return this.rpcClient.simulateContract({abi:licenseAttachmentWorkflowsAbi,address:this.address,functionName:"multicall",account:this.wallet.account,args:[request.data]});case 2:_yield$this$rpcClient52=_context95.sent;call=_yield$this$rpcClient52.request;_context95.next=6;return this.wallet.writeContract(call);case 6:return _context95.abrupt("return",_context95.sent);case 7:case"end":return _context95.stop();}},_callee95,this);}));function multicall(_x59){return _multicall2.apply(this,arguments);}return multicall;}()/**
|
1893
|
+
* method multicall for contract LicenseAttachmentWorkflows with only encode
|
1894
|
+
*
|
1895
|
+
* @param request LicenseAttachmentWorkflowsMulticallRequest
|
1896
|
+
* @return EncodedTxData
|
1897
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:encodeFunctionData({abi:licenseAttachmentWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
1865
1898
|
* method registerIpAndAttachPILTerms for contract LicenseAttachmentWorkflows
|
1866
1899
|
*
|
1867
1900
|
* @param request LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
1868
1901
|
* @return Promise<WriteContractReturnType>
|
1869
|
-
*/},{key:"registerIpAndAttachPilTerms",value:(function(){var _registerIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1902
|
+
*/},{key:"registerIpAndAttachPilTerms",value:(function(){var _registerIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee96(request){var _yield$this$rpcClient53,call;return _regeneratorRuntime().wrap(function _callee96$(_context96){while(1)switch(_context96.prev=_context96.next){case 0:_context96.next=2;return this.rpcClient.simulateContract({abi:licenseAttachmentWorkflowsAbi,address:this.address,functionName:"registerIpAndAttachPILTerms",account:this.wallet.account,args:[request.nftContract,request.tokenId,request.ipMetadata,request.terms,request.sigMetadata,request.sigAttach]});case 2:_yield$this$rpcClient53=_context96.sent;call=_yield$this$rpcClient53.request;_context96.next=6;return this.wallet.writeContract(call);case 6:return _context96.abrupt("return",_context96.sent);case 7:case"end":return _context96.stop();}},_callee96,this);}));function registerIpAndAttachPilTerms(_x60){return _registerIpAndAttachPilTerms.apply(this,arguments);}return registerIpAndAttachPilTerms;}()/**
|
1870
1903
|
* method registerIpAndAttachPILTerms for contract LicenseAttachmentWorkflows with only encode
|
1871
1904
|
*
|
1872
1905
|
* @param request LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
@@ -1876,7 +1909,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1876
1909
|
*
|
1877
1910
|
* @param request LicenseAttachmentWorkflowsRegisterPilTermsAndAttachRequest
|
1878
1911
|
* @return Promise<WriteContractReturnType>
|
1879
|
-
*/},{key:"registerPilTermsAndAttach",value:(function(){var _registerPilTermsAndAttach=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1912
|
+
*/},{key:"registerPilTermsAndAttach",value:(function(){var _registerPilTermsAndAttach=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee97(request){var _yield$this$rpcClient54,call;return _regeneratorRuntime().wrap(function _callee97$(_context97){while(1)switch(_context97.prev=_context97.next){case 0:_context97.next=2;return this.rpcClient.simulateContract({abi:licenseAttachmentWorkflowsAbi,address:this.address,functionName:"registerPILTermsAndAttach",account:this.wallet.account,args:[request.ipId,request.terms,request.sigAttach]});case 2:_yield$this$rpcClient54=_context97.sent;call=_yield$this$rpcClient54.request;_context97.next=6;return this.wallet.writeContract(call);case 6:return _context97.abrupt("return",_context97.sent);case 7:case"end":return _context97.stop();}},_callee97,this);}));function registerPilTermsAndAttach(_x61){return _registerPilTermsAndAttach.apply(this,arguments);}return registerPilTermsAndAttach;}()/**
|
1880
1913
|
* method registerPILTermsAndAttach for contract LicenseAttachmentWorkflows with only encode
|
1881
1914
|
*
|
1882
1915
|
* @param request LicenseAttachmentWorkflowsRegisterPilTermsAndAttachRequest
|
@@ -2112,137 +2145,137 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2112
2145
|
*
|
2113
2146
|
* @param request LicenseRegistryDisputeModuleRequest
|
2114
2147
|
* @return Promise<LicenseRegistryDisputeModuleResponse>
|
2115
|
-
*/_inherits(LicenseRegistryReadOnlyClient,_LicenseRegistryEvent);return _createClass(LicenseRegistryReadOnlyClient,[{key:"disputeModule",value:(function(){var _disputeModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2148
|
+
*/_inherits(LicenseRegistryReadOnlyClient,_LicenseRegistryEvent);return _createClass(LicenseRegistryReadOnlyClient,[{key:"disputeModule",value:(function(){var _disputeModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee98(){return _regeneratorRuntime().wrap(function _callee98$(_context98){while(1)switch(_context98.prev=_context98.next){case 0:_context98.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"DISPUTE_MODULE"});case 2:return _context98.abrupt("return",_context98.sent);case 3:case"end":return _context98.stop();}},_callee98,this);}));function disputeModule(){return _disputeModule.apply(this,arguments);}return disputeModule;}()/**
|
2116
2149
|
* method EXPIRATION_TIME for contract LicenseRegistry
|
2117
2150
|
*
|
2118
2151
|
* @param request LicenseRegistryExpirationTimeRequest
|
2119
2152
|
* @return Promise<LicenseRegistryExpirationTimeResponse>
|
2120
|
-
*/)},{key:"expirationTime",value:(function(){var _expirationTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2153
|
+
*/)},{key:"expirationTime",value:(function(){var _expirationTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee99(){return _regeneratorRuntime().wrap(function _callee99$(_context99){while(1)switch(_context99.prev=_context99.next){case 0:_context99.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"EXPIRATION_TIME"});case 2:return _context99.abrupt("return",_context99.sent);case 3:case"end":return _context99.stop();}},_callee99,this);}));function expirationTime(){return _expirationTime.apply(this,arguments);}return expirationTime;}()/**
|
2121
2154
|
* method IP_GRAPH for contract LicenseRegistry
|
2122
2155
|
*
|
2123
2156
|
* @param request LicenseRegistryIpGraphRequest
|
2124
2157
|
* @return Promise<LicenseRegistryIpGraphResponse>
|
2125
|
-
*/)},{key:"ipGraph",value:(function(){var _ipGraph=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2158
|
+
*/)},{key:"ipGraph",value:(function(){var _ipGraph=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee100(){return _regeneratorRuntime().wrap(function _callee100$(_context100){while(1)switch(_context100.prev=_context100.next){case 0:_context100.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"IP_GRAPH"});case 2:return _context100.abrupt("return",_context100.sent);case 3:case"end":return _context100.stop();}},_callee100,this);}));function ipGraph(){return _ipGraph.apply(this,arguments);}return ipGraph;}()/**
|
2126
2159
|
* method IP_GRAPH_ACL for contract LicenseRegistry
|
2127
2160
|
*
|
2128
2161
|
* @param request LicenseRegistryIpGraphAclRequest
|
2129
2162
|
* @return Promise<LicenseRegistryIpGraphAclResponse>
|
2130
|
-
*/)},{key:"ipGraphAcl",value:(function(){var _ipGraphAcl=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2163
|
+
*/)},{key:"ipGraphAcl",value:(function(){var _ipGraphAcl=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee101(){return _regeneratorRuntime().wrap(function _callee101$(_context101){while(1)switch(_context101.prev=_context101.next){case 0:_context101.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"IP_GRAPH_ACL"});case 2:return _context101.abrupt("return",_context101.sent);case 3:case"end":return _context101.stop();}},_callee101,this);}));function ipGraphAcl(){return _ipGraphAcl.apply(this,arguments);}return ipGraphAcl;}()/**
|
2131
2164
|
* method LICENSING_MODULE for contract LicenseRegistry
|
2132
2165
|
*
|
2133
2166
|
* @param request LicenseRegistryLicensingModuleRequest
|
2134
2167
|
* @return Promise<LicenseRegistryLicensingModuleResponse>
|
2135
|
-
*/)},{key:"licensingModule",value:(function(){var _licensingModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2168
|
+
*/)},{key:"licensingModule",value:(function(){var _licensingModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee102(){return _regeneratorRuntime().wrap(function _callee102$(_context102){while(1)switch(_context102.prev=_context102.next){case 0:_context102.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"LICENSING_MODULE"});case 2:return _context102.abrupt("return",_context102.sent);case 3:case"end":return _context102.stop();}},_callee102,this);}));function licensingModule(){return _licensingModule.apply(this,arguments);}return licensingModule;}()/**
|
2136
2169
|
* method UPGRADE_INTERFACE_VERSION for contract LicenseRegistry
|
2137
2170
|
*
|
2138
2171
|
* @param request LicenseRegistryUpgradeInterfaceVersionRequest
|
2139
2172
|
* @return Promise<LicenseRegistryUpgradeInterfaceVersionResponse>
|
2140
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2173
|
+
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee103(){return _regeneratorRuntime().wrap(function _callee103$(_context103){while(1)switch(_context103.prev=_context103.next){case 0:_context103.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"UPGRADE_INTERFACE_VERSION"});case 2:return _context103.abrupt("return",_context103.sent);case 3:case"end":return _context103.stop();}},_callee103,this);}));function upgradeInterfaceVersion(){return _upgradeInterfaceVersion4.apply(this,arguments);}return upgradeInterfaceVersion;}()/**
|
2141
2174
|
* method authority for contract LicenseRegistry
|
2142
2175
|
*
|
2143
2176
|
* @param request LicenseRegistryAuthorityRequest
|
2144
2177
|
* @return Promise<LicenseRegistryAuthorityResponse>
|
2145
|
-
*/)},{key:"authority",value:(function(){var _authority4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2178
|
+
*/)},{key:"authority",value:(function(){var _authority4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee104(){return _regeneratorRuntime().wrap(function _callee104$(_context104){while(1)switch(_context104.prev=_context104.next){case 0:_context104.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"authority"});case 2:return _context104.abrupt("return",_context104.sent);case 3:case"end":return _context104.stop();}},_callee104,this);}));function authority(){return _authority4.apply(this,arguments);}return authority;}()/**
|
2146
2179
|
* method exists for contract LicenseRegistry
|
2147
2180
|
*
|
2148
2181
|
* @param request LicenseRegistryExistsRequest
|
2149
2182
|
* @return Promise<LicenseRegistryExistsResponse>
|
2150
|
-
*/)},{key:"exists",value:(function(){var _exists=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2183
|
+
*/)},{key:"exists",value:(function(){var _exists=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee105(request){return _regeneratorRuntime().wrap(function _callee105$(_context105){while(1)switch(_context105.prev=_context105.next){case 0:_context105.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"exists",args:[request.licenseTemplate,request.licenseTermsId]});case 2:return _context105.abrupt("return",_context105.sent);case 3:case"end":return _context105.stop();}},_callee105,this);}));function exists(_x62){return _exists.apply(this,arguments);}return exists;}()/**
|
2151
2184
|
* method getAttachedLicenseTerms for contract LicenseRegistry
|
2152
2185
|
*
|
2153
2186
|
* @param request LicenseRegistryGetAttachedLicenseTermsRequest
|
2154
2187
|
* @return Promise<LicenseRegistryGetAttachedLicenseTermsResponse>
|
2155
|
-
*/)},{key:"getAttachedLicenseTerms",value:(function(){var _getAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2188
|
+
*/)},{key:"getAttachedLicenseTerms",value:(function(){var _getAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee106(request){var result;return _regeneratorRuntime().wrap(function _callee106$(_context106){while(1)switch(_context106.prev=_context106.next){case 0:_context106.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getAttachedLicenseTerms",args:[request.ipId,request.index]});case 2:result=_context106.sent;return _context106.abrupt("return",{licenseTemplate:result[0],licenseTermsId:result[1]});case 4:case"end":return _context106.stop();}},_callee106,this);}));function getAttachedLicenseTerms(_x63){return _getAttachedLicenseTerms.apply(this,arguments);}return getAttachedLicenseTerms;}()/**
|
2156
2189
|
* method getAttachedLicenseTermsCount for contract LicenseRegistry
|
2157
2190
|
*
|
2158
2191
|
* @param request LicenseRegistryGetAttachedLicenseTermsCountRequest
|
2159
2192
|
* @return Promise<LicenseRegistryGetAttachedLicenseTermsCountResponse>
|
2160
|
-
*/)},{key:"getAttachedLicenseTermsCount",value:(function(){var _getAttachedLicenseTermsCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2193
|
+
*/)},{key:"getAttachedLicenseTermsCount",value:(function(){var _getAttachedLicenseTermsCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee107(request){return _regeneratorRuntime().wrap(function _callee107$(_context107){while(1)switch(_context107.prev=_context107.next){case 0:_context107.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getAttachedLicenseTermsCount",args:[request.ipId]});case 2:return _context107.abrupt("return",_context107.sent);case 3:case"end":return _context107.stop();}},_callee107,this);}));function getAttachedLicenseTermsCount(_x64){return _getAttachedLicenseTermsCount.apply(this,arguments);}return getAttachedLicenseTermsCount;}()/**
|
2161
2194
|
* method getDefaultLicenseTerms for contract LicenseRegistry
|
2162
2195
|
*
|
2163
2196
|
* @param request LicenseRegistryGetDefaultLicenseTermsRequest
|
2164
2197
|
* @return Promise<LicenseRegistryGetDefaultLicenseTermsResponse>
|
2165
|
-
*/)},{key:"getDefaultLicenseTerms",value:(function(){var _getDefaultLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2198
|
+
*/)},{key:"getDefaultLicenseTerms",value:(function(){var _getDefaultLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee108(){var result;return _regeneratorRuntime().wrap(function _callee108$(_context108){while(1)switch(_context108.prev=_context108.next){case 0:_context108.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getDefaultLicenseTerms"});case 2:result=_context108.sent;return _context108.abrupt("return",{licenseTemplate:result[0],licenseTermsId:result[1]});case 4:case"end":return _context108.stop();}},_callee108,this);}));function getDefaultLicenseTerms(){return _getDefaultLicenseTerms.apply(this,arguments);}return getDefaultLicenseTerms;}()/**
|
2166
2199
|
* method getDerivativeIp for contract LicenseRegistry
|
2167
2200
|
*
|
2168
2201
|
* @param request LicenseRegistryGetDerivativeIpRequest
|
2169
2202
|
* @return Promise<LicenseRegistryGetDerivativeIpResponse>
|
2170
|
-
*/)},{key:"getDerivativeIp",value:(function(){var _getDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2203
|
+
*/)},{key:"getDerivativeIp",value:(function(){var _getDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee109(request){var result;return _regeneratorRuntime().wrap(function _callee109$(_context109){while(1)switch(_context109.prev=_context109.next){case 0:_context109.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getDerivativeIp",args:[request.parentIpId,request.index]});case 2:result=_context109.sent;return _context109.abrupt("return",{childIpId:result});case 4:case"end":return _context109.stop();}},_callee109,this);}));function getDerivativeIp(_x65){return _getDerivativeIp.apply(this,arguments);}return getDerivativeIp;}()/**
|
2171
2204
|
* method getDerivativeIpCount for contract LicenseRegistry
|
2172
2205
|
*
|
2173
2206
|
* @param request LicenseRegistryGetDerivativeIpCountRequest
|
2174
2207
|
* @return Promise<LicenseRegistryGetDerivativeIpCountResponse>
|
2175
|
-
*/)},{key:"getDerivativeIpCount",value:(function(){var _getDerivativeIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2208
|
+
*/)},{key:"getDerivativeIpCount",value:(function(){var _getDerivativeIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee110(request){return _regeneratorRuntime().wrap(function _callee110$(_context110){while(1)switch(_context110.prev=_context110.next){case 0:_context110.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getDerivativeIpCount",args:[request.parentIpId]});case 2:return _context110.abrupt("return",_context110.sent);case 3:case"end":return _context110.stop();}},_callee110,this);}));function getDerivativeIpCount(_x66){return _getDerivativeIpCount.apply(this,arguments);}return getDerivativeIpCount;}()/**
|
2176
2209
|
* method getExpireTime for contract LicenseRegistry
|
2177
2210
|
*
|
2178
2211
|
* @param request LicenseRegistryGetExpireTimeRequest
|
2179
2212
|
* @return Promise<LicenseRegistryGetExpireTimeResponse>
|
2180
|
-
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2213
|
+
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee111(request){return _regeneratorRuntime().wrap(function _callee111$(_context111){while(1)switch(_context111.prev=_context111.next){case 0:_context111.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getExpireTime",args:[request.ipId]});case 2:return _context111.abrupt("return",_context111.sent);case 3:case"end":return _context111.stop();}},_callee111,this);}));function getExpireTime(_x67){return _getExpireTime.apply(this,arguments);}return getExpireTime;}()/**
|
2181
2214
|
* method getLicensingConfig for contract LicenseRegistry
|
2182
2215
|
*
|
2183
2216
|
* @param request LicenseRegistryGetLicensingConfigRequest
|
2184
2217
|
* @return Promise<LicenseRegistryGetLicensingConfigResponse>
|
2185
|
-
*/)},{key:"getLicensingConfig",value:(function(){var _getLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2218
|
+
*/)},{key:"getLicensingConfig",value:(function(){var _getLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee112(request){return _regeneratorRuntime().wrap(function _callee112$(_context112){while(1)switch(_context112.prev=_context112.next){case 0:_context112.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getLicensingConfig",args:[request.ipId,request.licenseTemplate,request.licenseTermsId]});case 2:return _context112.abrupt("return",_context112.sent);case 3:case"end":return _context112.stop();}},_callee112,this);}));function getLicensingConfig(_x68){return _getLicensingConfig.apply(this,arguments);}return getLicensingConfig;}()/**
|
2186
2219
|
* method getParentIp for contract LicenseRegistry
|
2187
2220
|
*
|
2188
2221
|
* @param request LicenseRegistryGetParentIpRequest
|
2189
2222
|
* @return Promise<LicenseRegistryGetParentIpResponse>
|
2190
|
-
*/)},{key:"getParentIp",value:(function(){var _getParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2223
|
+
*/)},{key:"getParentIp",value:(function(){var _getParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee113(request){var result;return _regeneratorRuntime().wrap(function _callee113$(_context113){while(1)switch(_context113.prev=_context113.next){case 0:_context113.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getParentIp",args:[request.childIpId,request.index]});case 2:result=_context113.sent;return _context113.abrupt("return",{parentIpId:result});case 4:case"end":return _context113.stop();}},_callee113,this);}));function getParentIp(_x69){return _getParentIp.apply(this,arguments);}return getParentIp;}()/**
|
2191
2224
|
* method getParentIpCount for contract LicenseRegistry
|
2192
2225
|
*
|
2193
2226
|
* @param request LicenseRegistryGetParentIpCountRequest
|
2194
2227
|
* @return Promise<LicenseRegistryGetParentIpCountResponse>
|
2195
|
-
*/)},{key:"getParentIpCount",value:(function(){var _getParentIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2228
|
+
*/)},{key:"getParentIpCount",value:(function(){var _getParentIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee114(request){return _regeneratorRuntime().wrap(function _callee114$(_context114){while(1)switch(_context114.prev=_context114.next){case 0:_context114.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getParentIpCount",args:[request.childIpId]});case 2:return _context114.abrupt("return",_context114.sent);case 3:case"end":return _context114.stop();}},_callee114,this);}));function getParentIpCount(_x70){return _getParentIpCount.apply(this,arguments);}return getParentIpCount;}()/**
|
2196
2229
|
* method getParentLicenseTerms for contract LicenseRegistry
|
2197
2230
|
*
|
2198
2231
|
* @param request LicenseRegistryGetParentLicenseTermsRequest
|
2199
2232
|
* @return Promise<LicenseRegistryGetParentLicenseTermsResponse>
|
2200
|
-
*/)},{key:"getParentLicenseTerms",value:(function(){var _getParentLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2233
|
+
*/)},{key:"getParentLicenseTerms",value:(function(){var _getParentLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee115(request){var result;return _regeneratorRuntime().wrap(function _callee115$(_context115){while(1)switch(_context115.prev=_context115.next){case 0:_context115.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"getParentLicenseTerms",args:[request.childIpId,request.parentIpId]});case 2:result=_context115.sent;return _context115.abrupt("return",{licenseTemplate:result[0],licenseTermsId:result[1]});case 4:case"end":return _context115.stop();}},_callee115,this);}));function getParentLicenseTerms(_x71){return _getParentLicenseTerms.apply(this,arguments);}return getParentLicenseTerms;}()/**
|
2201
2234
|
* method hasDerivativeIps for contract LicenseRegistry
|
2202
2235
|
*
|
2203
2236
|
* @param request LicenseRegistryHasDerivativeIpsRequest
|
2204
2237
|
* @return Promise<LicenseRegistryHasDerivativeIpsResponse>
|
2205
|
-
*/)},{key:"hasDerivativeIps",value:(function(){var _hasDerivativeIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2238
|
+
*/)},{key:"hasDerivativeIps",value:(function(){var _hasDerivativeIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee116(request){return _regeneratorRuntime().wrap(function _callee116$(_context116){while(1)switch(_context116.prev=_context116.next){case 0:_context116.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"hasDerivativeIps",args:[request.parentIpId]});case 2:return _context116.abrupt("return",_context116.sent);case 3:case"end":return _context116.stop();}},_callee116,this);}));function hasDerivativeIps(_x72){return _hasDerivativeIps.apply(this,arguments);}return hasDerivativeIps;}()/**
|
2206
2239
|
* method hasIpAttachedLicenseTerms for contract LicenseRegistry
|
2207
2240
|
*
|
2208
2241
|
* @param request LicenseRegistryHasIpAttachedLicenseTermsRequest
|
2209
2242
|
* @return Promise<LicenseRegistryHasIpAttachedLicenseTermsResponse>
|
2210
|
-
*/)},{key:"hasIpAttachedLicenseTerms",value:(function(){var _hasIpAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2243
|
+
*/)},{key:"hasIpAttachedLicenseTerms",value:(function(){var _hasIpAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee117(request){return _regeneratorRuntime().wrap(function _callee117$(_context117){while(1)switch(_context117.prev=_context117.next){case 0:_context117.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"hasIpAttachedLicenseTerms",args:[request.ipId,request.licenseTemplate,request.licenseTermsId]});case 2:return _context117.abrupt("return",_context117.sent);case 3:case"end":return _context117.stop();}},_callee117,this);}));function hasIpAttachedLicenseTerms(_x73){return _hasIpAttachedLicenseTerms.apply(this,arguments);}return hasIpAttachedLicenseTerms;}()/**
|
2211
2244
|
* method isConsumingScheduledOp for contract LicenseRegistry
|
2212
2245
|
*
|
2213
2246
|
* @param request LicenseRegistryIsConsumingScheduledOpRequest
|
2214
2247
|
* @return Promise<LicenseRegistryIsConsumingScheduledOpResponse>
|
2215
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2248
|
+
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee118(){return _regeneratorRuntime().wrap(function _callee118$(_context118){while(1)switch(_context118.prev=_context118.next){case 0:_context118.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"isConsumingScheduledOp"});case 2:return _context118.abrupt("return",_context118.sent);case 3:case"end":return _context118.stop();}},_callee118,this);}));function isConsumingScheduledOp(){return _isConsumingScheduledOp4.apply(this,arguments);}return isConsumingScheduledOp;}()/**
|
2216
2249
|
* method isDerivativeIp for contract LicenseRegistry
|
2217
2250
|
*
|
2218
2251
|
* @param request LicenseRegistryIsDerivativeIpRequest
|
2219
2252
|
* @return Promise<LicenseRegistryIsDerivativeIpResponse>
|
2220
|
-
*/)},{key:"isDerivativeIp",value:(function(){var _isDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2253
|
+
*/)},{key:"isDerivativeIp",value:(function(){var _isDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee119(request){return _regeneratorRuntime().wrap(function _callee119$(_context119){while(1)switch(_context119.prev=_context119.next){case 0:_context119.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"isDerivativeIp",args:[request.childIpId]});case 2:return _context119.abrupt("return",_context119.sent);case 3:case"end":return _context119.stop();}},_callee119,this);}));function isDerivativeIp(_x74){return _isDerivativeIp.apply(this,arguments);}return isDerivativeIp;}()/**
|
2221
2254
|
* method isExpiredNow for contract LicenseRegistry
|
2222
2255
|
*
|
2223
2256
|
* @param request LicenseRegistryIsExpiredNowRequest
|
2224
2257
|
* @return Promise<LicenseRegistryIsExpiredNowResponse>
|
2225
|
-
*/)},{key:"isExpiredNow",value:(function(){var _isExpiredNow=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2258
|
+
*/)},{key:"isExpiredNow",value:(function(){var _isExpiredNow=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee120(request){return _regeneratorRuntime().wrap(function _callee120$(_context120){while(1)switch(_context120.prev=_context120.next){case 0:_context120.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"isExpiredNow",args:[request.ipId]});case 2:return _context120.abrupt("return",_context120.sent);case 3:case"end":return _context120.stop();}},_callee120,this);}));function isExpiredNow(_x75){return _isExpiredNow.apply(this,arguments);}return isExpiredNow;}()/**
|
2226
2259
|
* method isParentIp for contract LicenseRegistry
|
2227
2260
|
*
|
2228
2261
|
* @param request LicenseRegistryIsParentIpRequest
|
2229
2262
|
* @return Promise<LicenseRegistryIsParentIpResponse>
|
2230
|
-
*/)},{key:"isParentIp",value:(function(){var _isParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2263
|
+
*/)},{key:"isParentIp",value:(function(){var _isParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee121(request){return _regeneratorRuntime().wrap(function _callee121$(_context121){while(1)switch(_context121.prev=_context121.next){case 0:_context121.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"isParentIp",args:[request.parentIpId,request.childIpId]});case 2:return _context121.abrupt("return",_context121.sent);case 3:case"end":return _context121.stop();}},_callee121,this);}));function isParentIp(_x76){return _isParentIp.apply(this,arguments);}return isParentIp;}()/**
|
2231
2264
|
* method isRegisteredLicenseTemplate for contract LicenseRegistry
|
2232
2265
|
*
|
2233
2266
|
* @param request LicenseRegistryIsRegisteredLicenseTemplateRequest
|
2234
2267
|
* @return Promise<LicenseRegistryIsRegisteredLicenseTemplateResponse>
|
2235
|
-
*/)},{key:"isRegisteredLicenseTemplate",value:(function(){var _isRegisteredLicenseTemplate=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2268
|
+
*/)},{key:"isRegisteredLicenseTemplate",value:(function(){var _isRegisteredLicenseTemplate=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee122(request){return _regeneratorRuntime().wrap(function _callee122$(_context122){while(1)switch(_context122.prev=_context122.next){case 0:_context122.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"isRegisteredLicenseTemplate",args:[request.licenseTemplate]});case 2:return _context122.abrupt("return",_context122.sent);case 3:case"end":return _context122.stop();}},_callee122,this);}));function isRegisteredLicenseTemplate(_x77){return _isRegisteredLicenseTemplate.apply(this,arguments);}return isRegisteredLicenseTemplate;}()/**
|
2236
2269
|
* method proxiableUUID for contract LicenseRegistry
|
2237
2270
|
*
|
2238
2271
|
* @param request LicenseRegistryProxiableUuidRequest
|
2239
2272
|
* @return Promise<LicenseRegistryProxiableUuidResponse>
|
2240
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2273
|
+
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee123(){return _regeneratorRuntime().wrap(function _callee123$(_context123){while(1)switch(_context123.prev=_context123.next){case 0:_context123.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"proxiableUUID"});case 2:return _context123.abrupt("return",_context123.sent);case 3:case"end":return _context123.stop();}},_callee123,this);}));function proxiableUuid(){return _proxiableUuid4.apply(this,arguments);}return proxiableUuid;}()/**
|
2241
2274
|
* method verifyMintLicenseToken for contract LicenseRegistry
|
2242
2275
|
*
|
2243
2276
|
* @param request LicenseRegistryVerifyMintLicenseTokenRequest
|
2244
2277
|
* @return Promise<LicenseRegistryVerifyMintLicenseTokenResponse>
|
2245
|
-
*/)},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2278
|
+
*/)},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee124(request){return _regeneratorRuntime().wrap(function _callee124$(_context124){while(1)switch(_context124.prev=_context124.next){case 0:_context124.next=2;return this.rpcClient.readContract({abi:licenseRegistryAbi,address:this.address,functionName:"verifyMintLicenseToken",args:[request.licensorIpId,request.licenseTemplate,request.licenseTermsId,request.isMintedByIpOwner]});case 2:return _context124.abrupt("return",_context124.sent);case 3:case"end":return _context124.stop();}},_callee124,this);}));function verifyMintLicenseToken(_x78){return _verifyMintLicenseToken.apply(this,arguments);}return verifyMintLicenseToken;}())}]);}(LicenseRegistryEventClient);/**
|
2246
2279
|
* LicenseTokenOwnerOfRequest
|
2247
2280
|
*
|
2248
2281
|
* @param tokenId uint256
|
@@ -2253,7 +2286,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2253
2286
|
*
|
2254
2287
|
* @param request LicenseTokenOwnerOfRequest
|
2255
2288
|
* @return Promise<LicenseTokenOwnerOfResponse>
|
2256
|
-
*/return _createClass(LicenseTokenReadOnlyClient,[{key:"ownerOf",value:(function(){var _ownerOf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2289
|
+
*/return _createClass(LicenseTokenReadOnlyClient,[{key:"ownerOf",value:(function(){var _ownerOf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee134(request){return _regeneratorRuntime().wrap(function _callee134$(_context134){while(1)switch(_context134.prev=_context134.next){case 0:_context134.next=2;return this.rpcClient.readContract({abi:licenseTokenAbi,address:this.address,functionName:"ownerOf",args:[request.tokenId]});case 2:return _context134.abrupt("return",_context134.sent);case 3:case"end":return _context134.stop();}},_callee134,this);}));function ownerOf(_x88){return _ownerOf.apply(this,arguments);}return ownerOf;}())}]);}();// Contract LicensingModule =============================================================
|
2257
2290
|
/**
|
2258
2291
|
* LicensingModuleLicenseTermsAttachedEvent
|
2259
2292
|
*
|
@@ -2338,14 +2371,14 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2338
2371
|
*
|
2339
2372
|
* @param request LicensingModulePredictMintingLicenseFeeRequest
|
2340
2373
|
* @return Promise<LicensingModulePredictMintingLicenseFeeResponse>
|
2341
|
-
*/_inherits(LicensingModuleReadOnlyClient,_LicensingModuleEvent);return _createClass(LicensingModuleReadOnlyClient,[{key:"predictMintingLicenseFee",value:(function(){var _predictMintingLicenseFee=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2374
|
+
*/_inherits(LicensingModuleReadOnlyClient,_LicensingModuleEvent);return _createClass(LicensingModuleReadOnlyClient,[{key:"predictMintingLicenseFee",value:(function(){var _predictMintingLicenseFee=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee135(request){var result;return _regeneratorRuntime().wrap(function _callee135$(_context135){while(1)switch(_context135.prev=_context135.next){case 0:_context135.next=2;return this.rpcClient.readContract({abi:licensingModuleAbi,address:this.address,functionName:"predictMintingLicenseFee",args:[request.licensorIpId,request.licenseTemplate,request.licenseTermsId,request.amount,request.receiver,request.royaltyContext]});case 2:result=_context135.sent;return _context135.abrupt("return",{currencyToken:result[0],tokenAmount:result[1]});case 4:case"end":return _context135.stop();}},_callee135,this);}));function predictMintingLicenseFee(_x89){return _predictMintingLicenseFee.apply(this,arguments);}return predictMintingLicenseFee;}())}]);}(LicensingModuleEventClient);/**
|
2342
2375
|
* contract LicensingModule write method
|
2343
2376
|
*/var LicensingModuleClient=/*#__PURE__*/function(_LicensingModuleReadO){function LicensingModuleClient(rpcClient,wallet,address){var _this10;_classCallCheck(this,LicensingModuleClient);_this10=_callSuper(this,LicensingModuleClient,[rpcClient,address]);_this10.wallet=wallet;return _this10;}/**
|
2344
2377
|
* method attachLicenseTerms for contract LicensingModule
|
2345
2378
|
*
|
2346
2379
|
* @param request LicensingModuleAttachLicenseTermsRequest
|
2347
2380
|
* @return Promise<WriteContractReturnType>
|
2348
|
-
*/_inherits(LicensingModuleClient,_LicensingModuleReadO);return _createClass(LicensingModuleClient,[{key:"attachLicenseTerms",value:(function(){var _attachLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2381
|
+
*/_inherits(LicensingModuleClient,_LicensingModuleReadO);return _createClass(LicensingModuleClient,[{key:"attachLicenseTerms",value:(function(){var _attachLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee136(request){var _yield$this$rpcClient64,call;return _regeneratorRuntime().wrap(function _callee136$(_context136){while(1)switch(_context136.prev=_context136.next){case 0:_context136.next=2;return this.rpcClient.simulateContract({abi:licensingModuleAbi,address:this.address,functionName:"attachLicenseTerms",account:this.wallet.account,args:[request.ipId,request.licenseTemplate,request.licenseTermsId]});case 2:_yield$this$rpcClient64=_context136.sent;call=_yield$this$rpcClient64.request;_context136.next=6;return this.wallet.writeContract(call);case 6:return _context136.abrupt("return",_context136.sent);case 7:case"end":return _context136.stop();}},_callee136,this);}));function attachLicenseTerms(_x90){return _attachLicenseTerms.apply(this,arguments);}return attachLicenseTerms;}()/**
|
2349
2382
|
* method attachLicenseTerms for contract LicensingModule with only encode
|
2350
2383
|
*
|
2351
2384
|
* @param request LicensingModuleAttachLicenseTermsRequest
|
@@ -2355,7 +2388,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2355
2388
|
*
|
2356
2389
|
* @param request LicensingModuleMintLicenseTokensRequest
|
2357
2390
|
* @return Promise<WriteContractReturnType>
|
2358
|
-
*/},{key:"mintLicenseTokens",value:(function(){var _mintLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2391
|
+
*/},{key:"mintLicenseTokens",value:(function(){var _mintLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee137(request){var _yield$this$rpcClient65,call;return _regeneratorRuntime().wrap(function _callee137$(_context137){while(1)switch(_context137.prev=_context137.next){case 0:_context137.next=2;return this.rpcClient.simulateContract({abi:licensingModuleAbi,address:this.address,functionName:"mintLicenseTokens",account:this.wallet.account,args:[request.licensorIpId,request.licenseTemplate,request.licenseTermsId,request.amount,request.receiver,request.royaltyContext]});case 2:_yield$this$rpcClient65=_context137.sent;call=_yield$this$rpcClient65.request;_context137.next=6;return this.wallet.writeContract(call);case 6:return _context137.abrupt("return",_context137.sent);case 7:case"end":return _context137.stop();}},_callee137,this);}));function mintLicenseTokens(_x91){return _mintLicenseTokens.apply(this,arguments);}return mintLicenseTokens;}()/**
|
2359
2392
|
* method mintLicenseTokens for contract LicensingModule with only encode
|
2360
2393
|
*
|
2361
2394
|
* @param request LicensingModuleMintLicenseTokensRequest
|
@@ -2365,7 +2398,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2365
2398
|
*
|
2366
2399
|
* @param request LicensingModuleRegisterDerivativeRequest
|
2367
2400
|
* @return Promise<WriteContractReturnType>
|
2368
|
-
*/},{key:"registerDerivative",value:(function(){var _registerDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2401
|
+
*/},{key:"registerDerivative",value:(function(){var _registerDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee138(request){var _yield$this$rpcClient66,call;return _regeneratorRuntime().wrap(function _callee138$(_context138){while(1)switch(_context138.prev=_context138.next){case 0:_context138.next=2;return this.rpcClient.simulateContract({abi:licensingModuleAbi,address:this.address,functionName:"registerDerivative",account:this.wallet.account,args:[request.childIpId,request.parentIpIds,request.licenseTermsIds,request.licenseTemplate,request.royaltyContext]});case 2:_yield$this$rpcClient66=_context138.sent;call=_yield$this$rpcClient66.request;_context138.next=6;return this.wallet.writeContract(call);case 6:return _context138.abrupt("return",_context138.sent);case 7:case"end":return _context138.stop();}},_callee138,this);}));function registerDerivative(_x92){return _registerDerivative.apply(this,arguments);}return registerDerivative;}()/**
|
2369
2402
|
* method registerDerivative for contract LicensingModule with only encode
|
2370
2403
|
*
|
2371
2404
|
* @param request LicensingModuleRegisterDerivativeRequest
|
@@ -2375,7 +2408,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2375
2408
|
*
|
2376
2409
|
* @param request LicensingModuleRegisterDerivativeWithLicenseTokensRequest
|
2377
2410
|
* @return Promise<WriteContractReturnType>
|
2378
|
-
*/},{key:"registerDerivativeWithLicenseTokens",value:(function(){var _registerDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2411
|
+
*/},{key:"registerDerivativeWithLicenseTokens",value:(function(){var _registerDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee139(request){var _yield$this$rpcClient67,call;return _regeneratorRuntime().wrap(function _callee139$(_context139){while(1)switch(_context139.prev=_context139.next){case 0:_context139.next=2;return this.rpcClient.simulateContract({abi:licensingModuleAbi,address:this.address,functionName:"registerDerivativeWithLicenseTokens",account:this.wallet.account,args:[request.childIpId,request.licenseTokenIds,request.royaltyContext]});case 2:_yield$this$rpcClient67=_context139.sent;call=_yield$this$rpcClient67.request;_context139.next=6;return this.wallet.writeContract(call);case 6:return _context139.abrupt("return",_context139.sent);case 7:case"end":return _context139.stop();}},_callee139,this);}));function registerDerivativeWithLicenseTokens(_x93){return _registerDerivativeWithLicenseTokens.apply(this,arguments);}return registerDerivativeWithLicenseTokens;}()/**
|
2379
2412
|
* method registerDerivativeWithLicenseTokens for contract LicensingModule with only encode
|
2380
2413
|
*
|
2381
2414
|
* @param request LicensingModuleRegisterDerivativeWithLicenseTokensRequest
|
@@ -2385,7 +2418,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2385
2418
|
*
|
2386
2419
|
* @param request LicensingModuleSetLicensingConfigRequest
|
2387
2420
|
* @return Promise<WriteContractReturnType>
|
2388
|
-
*/},{key:"setLicensingConfig",value:(function(){var _setLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2421
|
+
*/},{key:"setLicensingConfig",value:(function(){var _setLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee140(request){var _yield$this$rpcClient68,call;return _regeneratorRuntime().wrap(function _callee140$(_context140){while(1)switch(_context140.prev=_context140.next){case 0:_context140.next=2;return this.rpcClient.simulateContract({abi:licensingModuleAbi,address:this.address,functionName:"setLicensingConfig",account:this.wallet.account,args:[request.ipId,request.licenseTemplate,request.licenseTermsId,request.licensingConfig]});case 2:_yield$this$rpcClient68=_context140.sent;call=_yield$this$rpcClient68.request;_context140.next=6;return this.wallet.writeContract(call);case 6:return _context140.abrupt("return",_context140.sent);case 7:case"end":return _context140.stop();}},_callee140,this);}));function setLicensingConfig(_x94){return _setLicensingConfig.apply(this,arguments);}return setLicensingConfig;}()/**
|
2389
2422
|
* method setLicensingConfig for contract LicensingModule with only encode
|
2390
2423
|
*
|
2391
2424
|
* @param request LicensingModuleSetLicensingConfigRequest
|
@@ -2402,7 +2435,24 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2402
2435
|
*
|
2403
2436
|
* @param request ModuleRegistryIsRegisteredRequest
|
2404
2437
|
* @return Promise<ModuleRegistryIsRegisteredResponse>
|
2405
|
-
*/return _createClass(ModuleRegistryReadOnlyClient,[{key:"isRegistered",value:(function(){var _isRegistered2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2438
|
+
*/return _createClass(ModuleRegistryReadOnlyClient,[{key:"isRegistered",value:(function(){var _isRegistered2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee152(request){return _regeneratorRuntime().wrap(function _callee152$(_context152){while(1)switch(_context152.prev=_context152.next){case 0:_context152.next=2;return this.rpcClient.readContract({abi:moduleRegistryAbi,address:this.address,functionName:"isRegistered",args:[request.moduleAddress]});case 2:return _context152.abrupt("return",_context152.sent);case 3:case"end":return _context152.stop();}},_callee152,this);}));function isRegistered(_x102){return _isRegistered2.apply(this,arguments);}return isRegistered;}())}]);}();// Contract Multicall3 =============================================================
|
2439
|
+
/**
|
2440
|
+
* Multicall3Aggregate3Request
|
2441
|
+
*
|
2442
|
+
* @param calls tuple[]
|
2443
|
+
*/ /**
|
2444
|
+
* contract Multicall3 write method
|
2445
|
+
*/var Multicall3Client=/*#__PURE__*/function(){function Multicall3Client(rpcClient,wallet,address){var _rpcClient$chain17;_classCallCheck(this,Multicall3Client);this.address=address||getAddress(multicall3Address,(_rpcClient$chain17=rpcClient.chain)===null||_rpcClient$chain17===void 0?void 0:_rpcClient$chain17.id);this.rpcClient=rpcClient;this.wallet=wallet;}/**
|
2446
|
+
* method aggregate3 for contract Multicall3
|
2447
|
+
*
|
2448
|
+
* @param request Multicall3Aggregate3Request
|
2449
|
+
* @return Promise<WriteContractReturnType>
|
2450
|
+
*/return _createClass(Multicall3Client,[{key:"aggregate3",value:(function(){var _aggregate=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee153(request){var _yield$this$rpcClient74,call;return _regeneratorRuntime().wrap(function _callee153$(_context153){while(1)switch(_context153.prev=_context153.next){case 0:_context153.next=2;return this.rpcClient.simulateContract({abi:multicall3Abi,address:this.address,functionName:"aggregate3",account:this.wallet.account,args:[request.calls]});case 2:_yield$this$rpcClient74=_context153.sent;call=_yield$this$rpcClient74.request;_context153.next=6;return this.wallet.writeContract(call);case 6:return _context153.abrupt("return",_context153.sent);case 7:case"end":return _context153.stop();}},_callee153,this);}));function aggregate3(_x103){return _aggregate.apply(this,arguments);}return aggregate3;}()/**
|
2451
|
+
* method aggregate3 for contract Multicall3 with only encode
|
2452
|
+
*
|
2453
|
+
* @param request Multicall3Aggregate3Request
|
2454
|
+
* @return EncodedTxData
|
2455
|
+
*/)},{key:"aggregate3Encode",value:function aggregate3Encode(request){return {to:this.address,data:encodeFunctionData({abi:multicall3Abi,functionName:"aggregate3",args:[request.calls]})};}}]);}();// Contract PILicenseTemplate =============================================================
|
2406
2456
|
/**
|
2407
2457
|
* PiLicenseTemplateAuthorityUpdatedEvent
|
2408
2458
|
*
|
@@ -2544,7 +2594,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2544
2594
|
* @param childIpOwner address
|
2545
2595
|
*/ /**
|
2546
2596
|
* contract PILicenseTemplate event
|
2547
|
-
*/var PiLicenseTemplateEventClient=/*#__PURE__*/function(){function PiLicenseTemplateEventClient(rpcClient,address){var _rpcClient$
|
2597
|
+
*/var PiLicenseTemplateEventClient=/*#__PURE__*/function(){function PiLicenseTemplateEventClient(rpcClient,address){var _rpcClient$chain18;_classCallCheck(this,PiLicenseTemplateEventClient);this.address=address||getAddress(piLicenseTemplateAddress,(_rpcClient$chain18=rpcClient.chain)===null||_rpcClient$chain18===void 0?void 0:_rpcClient$chain18.id);this.rpcClient=rpcClient;}/**
|
2548
2598
|
* event AuthorityUpdated for contract PILicenseTemplate
|
2549
2599
|
*/return _createClass(PiLicenseTemplateEventClient,[{key:"watchAuthorityUpdatedEvent",value:function watchAuthorityUpdatedEvent(_onLogs42){return this.rpcClient.watchContractEvent({abi:piLicenseTemplateAbi,address:this.address,eventName:"AuthorityUpdated",onLogs:function onLogs(evs){evs.forEach(function(it){return _onLogs42(it.transactionHash,it.args);});}});}/**
|
2550
2600
|
* parse tx receipt event AuthorityUpdated for contract PILicenseTemplate
|
@@ -2571,129 +2621,129 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2571
2621
|
*
|
2572
2622
|
* @param request PiLicenseTemplateAccessControllerRequest
|
2573
2623
|
* @return Promise<PiLicenseTemplateAccessControllerResponse>
|
2574
|
-
*/_inherits(PiLicenseTemplateReadOnlyClient,_PiLicenseTemplateEve);return _createClass(PiLicenseTemplateReadOnlyClient,[{key:"accessController",value:(function(){var _accessController3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2624
|
+
*/_inherits(PiLicenseTemplateReadOnlyClient,_PiLicenseTemplateEve);return _createClass(PiLicenseTemplateReadOnlyClient,[{key:"accessController",value:(function(){var _accessController3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee154(){return _regeneratorRuntime().wrap(function _callee154$(_context154){while(1)switch(_context154.prev=_context154.next){case 0:_context154.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"ACCESS_CONTROLLER"});case 2:return _context154.abrupt("return",_context154.sent);case 3:case"end":return _context154.stop();}},_callee154,this);}));function accessController(){return _accessController3.apply(this,arguments);}return accessController;}()/**
|
2575
2625
|
* method IP_ACCOUNT_REGISTRY for contract PILicenseTemplate
|
2576
2626
|
*
|
2577
2627
|
* @param request PiLicenseTemplateIpAccountRegistryRequest
|
2578
2628
|
* @return Promise<PiLicenseTemplateIpAccountRegistryResponse>
|
2579
|
-
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2629
|
+
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee155(){return _regeneratorRuntime().wrap(function _callee155$(_context155){while(1)switch(_context155.prev=_context155.next){case 0:_context155.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"IP_ACCOUNT_REGISTRY"});case 2:return _context155.abrupt("return",_context155.sent);case 3:case"end":return _context155.stop();}},_callee155,this);}));function ipAccountRegistry(){return _ipAccountRegistry3.apply(this,arguments);}return ipAccountRegistry;}()/**
|
2580
2630
|
* method LICENSE_REGISTRY for contract PILicenseTemplate
|
2581
2631
|
*
|
2582
2632
|
* @param request PiLicenseTemplateLicenseRegistryRequest
|
2583
2633
|
* @return Promise<PiLicenseTemplateLicenseRegistryResponse>
|
2584
|
-
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2634
|
+
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee156(){return _regeneratorRuntime().wrap(function _callee156$(_context156){while(1)switch(_context156.prev=_context156.next){case 0:_context156.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"LICENSE_REGISTRY"});case 2:return _context156.abrupt("return",_context156.sent);case 3:case"end":return _context156.stop();}},_callee156,this);}));function licenseRegistry(){return _licenseRegistry2.apply(this,arguments);}return licenseRegistry;}()/**
|
2585
2635
|
* method ROYALTY_MODULE for contract PILicenseTemplate
|
2586
2636
|
*
|
2587
2637
|
* @param request PiLicenseTemplateRoyaltyModuleRequest
|
2588
2638
|
* @return Promise<PiLicenseTemplateRoyaltyModuleResponse>
|
2589
|
-
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2639
|
+
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee157(){return _regeneratorRuntime().wrap(function _callee157$(_context157){while(1)switch(_context157.prev=_context157.next){case 0:_context157.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"ROYALTY_MODULE"});case 2:return _context157.abrupt("return",_context157.sent);case 3:case"end":return _context157.stop();}},_callee157,this);}));function royaltyModule(){return _royaltyModule3.apply(this,arguments);}return royaltyModule;}()/**
|
2590
2640
|
* method TERMS_RENDERER for contract PILicenseTemplate
|
2591
2641
|
*
|
2592
2642
|
* @param request PiLicenseTemplateTermsRendererRequest
|
2593
2643
|
* @return Promise<PiLicenseTemplateTermsRendererResponse>
|
2594
|
-
*/)},{key:"termsRenderer",value:(function(){var _termsRenderer=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2644
|
+
*/)},{key:"termsRenderer",value:(function(){var _termsRenderer=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee158(){return _regeneratorRuntime().wrap(function _callee158$(_context158){while(1)switch(_context158.prev=_context158.next){case 0:_context158.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"TERMS_RENDERER"});case 2:return _context158.abrupt("return",_context158.sent);case 3:case"end":return _context158.stop();}},_callee158,this);}));function termsRenderer(){return _termsRenderer.apply(this,arguments);}return termsRenderer;}()/**
|
2595
2645
|
* method UPGRADE_INTERFACE_VERSION for contract PILicenseTemplate
|
2596
2646
|
*
|
2597
2647
|
* @param request PiLicenseTemplateUpgradeInterfaceVersionRequest
|
2598
2648
|
* @return Promise<PiLicenseTemplateUpgradeInterfaceVersionResponse>
|
2599
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2649
|
+
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee159(){return _regeneratorRuntime().wrap(function _callee159$(_context159){while(1)switch(_context159.prev=_context159.next){case 0:_context159.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"UPGRADE_INTERFACE_VERSION"});case 2:return _context159.abrupt("return",_context159.sent);case 3:case"end":return _context159.stop();}},_callee159,this);}));function upgradeInterfaceVersion(){return _upgradeInterfaceVersion5.apply(this,arguments);}return upgradeInterfaceVersion;}()/**
|
2600
2650
|
* method authority for contract PILicenseTemplate
|
2601
2651
|
*
|
2602
2652
|
* @param request PiLicenseTemplateAuthorityRequest
|
2603
2653
|
* @return Promise<PiLicenseTemplateAuthorityResponse>
|
2604
|
-
*/)},{key:"authority",value:(function(){var _authority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2654
|
+
*/)},{key:"authority",value:(function(){var _authority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee160(){return _regeneratorRuntime().wrap(function _callee160$(_context160){while(1)switch(_context160.prev=_context160.next){case 0:_context160.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"authority"});case 2:return _context160.abrupt("return",_context160.sent);case 3:case"end":return _context160.stop();}},_callee160,this);}));function authority(){return _authority5.apply(this,arguments);}return authority;}()/**
|
2605
2655
|
* method exists for contract PILicenseTemplate
|
2606
2656
|
*
|
2607
2657
|
* @param request PiLicenseTemplateExistsRequest
|
2608
2658
|
* @return Promise<PiLicenseTemplateExistsResponse>
|
2609
|
-
*/)},{key:"exists",value:(function(){var _exists2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2659
|
+
*/)},{key:"exists",value:(function(){var _exists2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee161(request){return _regeneratorRuntime().wrap(function _callee161$(_context161){while(1)switch(_context161.prev=_context161.next){case 0:_context161.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"exists",args:[request.licenseTermsId]});case 2:return _context161.abrupt("return",_context161.sent);case 3:case"end":return _context161.stop();}},_callee161,this);}));function exists(_x104){return _exists2.apply(this,arguments);}return exists;}()/**
|
2610
2660
|
* method getEarlierExpireTime for contract PILicenseTemplate
|
2611
2661
|
*
|
2612
2662
|
* @param request PiLicenseTemplateGetEarlierExpireTimeRequest
|
2613
2663
|
* @return Promise<PiLicenseTemplateGetEarlierExpireTimeResponse>
|
2614
|
-
*/)},{key:"getEarlierExpireTime",value:(function(){var _getEarlierExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2664
|
+
*/)},{key:"getEarlierExpireTime",value:(function(){var _getEarlierExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee162(request){return _regeneratorRuntime().wrap(function _callee162$(_context162){while(1)switch(_context162.prev=_context162.next){case 0:_context162.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getEarlierExpireTime",args:[request.licenseTermsIds,request.start]});case 2:return _context162.abrupt("return",_context162.sent);case 3:case"end":return _context162.stop();}},_callee162,this);}));function getEarlierExpireTime(_x105){return _getEarlierExpireTime.apply(this,arguments);}return getEarlierExpireTime;}()/**
|
2615
2665
|
* method getExpireTime for contract PILicenseTemplate
|
2616
2666
|
*
|
2617
2667
|
* @param request PiLicenseTemplateGetExpireTimeRequest
|
2618
2668
|
* @return Promise<PiLicenseTemplateGetExpireTimeResponse>
|
2619
|
-
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2669
|
+
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee163(request){return _regeneratorRuntime().wrap(function _callee163$(_context163){while(1)switch(_context163.prev=_context163.next){case 0:_context163.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getExpireTime",args:[request.licenseTermsId,request.start]});case 2:return _context163.abrupt("return",_context163.sent);case 3:case"end":return _context163.stop();}},_callee163,this);}));function getExpireTime(_x106){return _getExpireTime2.apply(this,arguments);}return getExpireTime;}()/**
|
2620
2670
|
* method getLicenseTerms for contract PILicenseTemplate
|
2621
2671
|
*
|
2622
2672
|
* @param request PiLicenseTemplateGetLicenseTermsRequest
|
2623
2673
|
* @return Promise<PiLicenseTemplateGetLicenseTermsResponse>
|
2624
|
-
*/)},{key:"getLicenseTerms",value:(function(){var _getLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2674
|
+
*/)},{key:"getLicenseTerms",value:(function(){var _getLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee164(request){var result;return _regeneratorRuntime().wrap(function _callee164$(_context164){while(1)switch(_context164.prev=_context164.next){case 0:_context164.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getLicenseTerms",args:[request.selectedLicenseTermsId]});case 2:result=_context164.sent;return _context164.abrupt("return",{terms:result});case 4:case"end":return _context164.stop();}},_callee164,this);}));function getLicenseTerms(_x107){return _getLicenseTerms.apply(this,arguments);}return getLicenseTerms;}()/**
|
2625
2675
|
* method getLicenseTermsId for contract PILicenseTemplate
|
2626
2676
|
*
|
2627
2677
|
* @param request PiLicenseTemplateGetLicenseTermsIdRequest
|
2628
2678
|
* @return Promise<PiLicenseTemplateGetLicenseTermsIdResponse>
|
2629
|
-
*/)},{key:"getLicenseTermsId",value:(function(){var _getLicenseTermsId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2679
|
+
*/)},{key:"getLicenseTermsId",value:(function(){var _getLicenseTermsId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee165(request){var result;return _regeneratorRuntime().wrap(function _callee165$(_context165){while(1)switch(_context165.prev=_context165.next){case 0:_context165.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getLicenseTermsId",args:[request.terms]});case 2:result=_context165.sent;return _context165.abrupt("return",{selectedLicenseTermsId:result});case 4:case"end":return _context165.stop();}},_callee165,this);}));function getLicenseTermsId(_x108){return _getLicenseTermsId.apply(this,arguments);}return getLicenseTermsId;}()/**
|
2630
2680
|
* method getLicenseTermsURI for contract PILicenseTemplate
|
2631
2681
|
*
|
2632
2682
|
* @param request PiLicenseTemplateGetLicenseTermsUriRequest
|
2633
2683
|
* @return Promise<PiLicenseTemplateGetLicenseTermsUriResponse>
|
2634
|
-
*/)},{key:"getLicenseTermsUri",value:(function(){var _getLicenseTermsUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2684
|
+
*/)},{key:"getLicenseTermsUri",value:(function(){var _getLicenseTermsUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee166(request){return _regeneratorRuntime().wrap(function _callee166$(_context166){while(1)switch(_context166.prev=_context166.next){case 0:_context166.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getLicenseTermsURI",args:[request.licenseTermsId]});case 2:return _context166.abrupt("return",_context166.sent);case 3:case"end":return _context166.stop();}},_callee166,this);}));function getLicenseTermsUri(_x109){return _getLicenseTermsUri.apply(this,arguments);}return getLicenseTermsUri;}()/**
|
2635
2685
|
* method getMetadataURI for contract PILicenseTemplate
|
2636
2686
|
*
|
2637
2687
|
* @param request PiLicenseTemplateGetMetadataUriRequest
|
2638
2688
|
* @return Promise<PiLicenseTemplateGetMetadataUriResponse>
|
2639
|
-
*/)},{key:"getMetadataUri",value:(function(){var _getMetadataUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2689
|
+
*/)},{key:"getMetadataUri",value:(function(){var _getMetadataUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee167(){return _regeneratorRuntime().wrap(function _callee167$(_context167){while(1)switch(_context167.prev=_context167.next){case 0:_context167.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getMetadataURI"});case 2:return _context167.abrupt("return",_context167.sent);case 3:case"end":return _context167.stop();}},_callee167,this);}));function getMetadataUri(){return _getMetadataUri.apply(this,arguments);}return getMetadataUri;}()/**
|
2640
2690
|
* method getRoyaltyPolicy for contract PILicenseTemplate
|
2641
2691
|
*
|
2642
2692
|
* @param request PiLicenseTemplateGetRoyaltyPolicyRequest
|
2643
2693
|
* @return Promise<PiLicenseTemplateGetRoyaltyPolicyResponse>
|
2644
|
-
*/)},{key:"getRoyaltyPolicy",value:(function(){var _getRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2694
|
+
*/)},{key:"getRoyaltyPolicy",value:(function(){var _getRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee168(request){var result;return _regeneratorRuntime().wrap(function _callee168$(_context168){while(1)switch(_context168.prev=_context168.next){case 0:_context168.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"getRoyaltyPolicy",args:[request.licenseTermsId]});case 2:result=_context168.sent;return _context168.abrupt("return",{royaltyPolicy:result[0],royaltyPercent:result[1],mintingFee:result[2],currency:result[3]});case 4:case"end":return _context168.stop();}},_callee168,this);}));function getRoyaltyPolicy(_x110){return _getRoyaltyPolicy.apply(this,arguments);}return getRoyaltyPolicy;}()/**
|
2645
2695
|
* method isConsumingScheduledOp for contract PILicenseTemplate
|
2646
2696
|
*
|
2647
2697
|
* @param request PiLicenseTemplateIsConsumingScheduledOpRequest
|
2648
2698
|
* @return Promise<PiLicenseTemplateIsConsumingScheduledOpResponse>
|
2649
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2699
|
+
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee169(){return _regeneratorRuntime().wrap(function _callee169$(_context169){while(1)switch(_context169.prev=_context169.next){case 0:_context169.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"isConsumingScheduledOp"});case 2:return _context169.abrupt("return",_context169.sent);case 3:case"end":return _context169.stop();}},_callee169,this);}));function isConsumingScheduledOp(){return _isConsumingScheduledOp5.apply(this,arguments);}return isConsumingScheduledOp;}()/**
|
2650
2700
|
* method isDerivativeApproved for contract PILicenseTemplate
|
2651
2701
|
*
|
2652
2702
|
* @param request PiLicenseTemplateIsDerivativeApprovedRequest
|
2653
2703
|
* @return Promise<PiLicenseTemplateIsDerivativeApprovedResponse>
|
2654
|
-
*/)},{key:"isDerivativeApproved",value:(function(){var _isDerivativeApproved=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2704
|
+
*/)},{key:"isDerivativeApproved",value:(function(){var _isDerivativeApproved=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee170(request){return _regeneratorRuntime().wrap(function _callee170$(_context170){while(1)switch(_context170.prev=_context170.next){case 0:_context170.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"isDerivativeApproved",args:[request.parentIpId,request.licenseTermsId,request.childIpId]});case 2:return _context170.abrupt("return",_context170.sent);case 3:case"end":return _context170.stop();}},_callee170,this);}));function isDerivativeApproved(_x111){return _isDerivativeApproved.apply(this,arguments);}return isDerivativeApproved;}()/**
|
2655
2705
|
* method isLicenseTransferable for contract PILicenseTemplate
|
2656
2706
|
*
|
2657
2707
|
* @param request PiLicenseTemplateIsLicenseTransferableRequest
|
2658
2708
|
* @return Promise<PiLicenseTemplateIsLicenseTransferableResponse>
|
2659
|
-
*/)},{key:"isLicenseTransferable",value:(function(){var _isLicenseTransferable=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2709
|
+
*/)},{key:"isLicenseTransferable",value:(function(){var _isLicenseTransferable=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee171(request){return _regeneratorRuntime().wrap(function _callee171$(_context171){while(1)switch(_context171.prev=_context171.next){case 0:_context171.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"isLicenseTransferable",args:[request.licenseTermsId]});case 2:return _context171.abrupt("return",_context171.sent);case 3:case"end":return _context171.stop();}},_callee171,this);}));function isLicenseTransferable(_x112){return _isLicenseTransferable.apply(this,arguments);}return isLicenseTransferable;}()/**
|
2660
2710
|
* method name for contract PILicenseTemplate
|
2661
2711
|
*
|
2662
2712
|
* @param request PiLicenseTemplateNameRequest
|
2663
2713
|
* @return Promise<PiLicenseTemplateNameResponse>
|
2664
|
-
*/)},{key:"name",value:(function(){var _name4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2714
|
+
*/)},{key:"name",value:(function(){var _name4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee172(){return _regeneratorRuntime().wrap(function _callee172$(_context172){while(1)switch(_context172.prev=_context172.next){case 0:_context172.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"name"});case 2:return _context172.abrupt("return",_context172.sent);case 3:case"end":return _context172.stop();}},_callee172,this);}));function name(){return _name4.apply(this,arguments);}return name;}()/**
|
2665
2715
|
* method proxiableUUID for contract PILicenseTemplate
|
2666
2716
|
*
|
2667
2717
|
* @param request PiLicenseTemplateProxiableUuidRequest
|
2668
2718
|
* @return Promise<PiLicenseTemplateProxiableUuidResponse>
|
2669
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2719
|
+
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee173(){return _regeneratorRuntime().wrap(function _callee173$(_context173){while(1)switch(_context173.prev=_context173.next){case 0:_context173.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"proxiableUUID"});case 2:return _context173.abrupt("return",_context173.sent);case 3:case"end":return _context173.stop();}},_callee173,this);}));function proxiableUuid(){return _proxiableUuid5.apply(this,arguments);}return proxiableUuid;}()/**
|
2670
2720
|
* method supportsInterface for contract PILicenseTemplate
|
2671
2721
|
*
|
2672
2722
|
* @param request PiLicenseTemplateSupportsInterfaceRequest
|
2673
2723
|
* @return Promise<PiLicenseTemplateSupportsInterfaceResponse>
|
2674
|
-
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2724
|
+
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee174(request){return _regeneratorRuntime().wrap(function _callee174$(_context174){while(1)switch(_context174.prev=_context174.next){case 0:_context174.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"supportsInterface",args:[request.interfaceId]});case 2:return _context174.abrupt("return",_context174.sent);case 3:case"end":return _context174.stop();}},_callee174,this);}));function supportsInterface(_x113){return _supportsInterface3.apply(this,arguments);}return supportsInterface;}()/**
|
2675
2725
|
* method toJson for contract PILicenseTemplate
|
2676
2726
|
*
|
2677
2727
|
* @param request PiLicenseTemplateToJsonRequest
|
2678
2728
|
* @return Promise<PiLicenseTemplateToJsonResponse>
|
2679
|
-
*/)},{key:"toJson",value:(function(){var _toJson=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2729
|
+
*/)},{key:"toJson",value:(function(){var _toJson=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee175(request){return _regeneratorRuntime().wrap(function _callee175$(_context175){while(1)switch(_context175.prev=_context175.next){case 0:_context175.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"toJson",args:[request.licenseTermsId]});case 2:return _context175.abrupt("return",_context175.sent);case 3:case"end":return _context175.stop();}},_callee175,this);}));function toJson(_x114){return _toJson.apply(this,arguments);}return toJson;}()/**
|
2680
2730
|
* method totalRegisteredLicenseTerms for contract PILicenseTemplate
|
2681
2731
|
*
|
2682
2732
|
* @param request PiLicenseTemplateTotalRegisteredLicenseTermsRequest
|
2683
2733
|
* @return Promise<PiLicenseTemplateTotalRegisteredLicenseTermsResponse>
|
2684
|
-
*/)},{key:"totalRegisteredLicenseTerms",value:(function(){var _totalRegisteredLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2734
|
+
*/)},{key:"totalRegisteredLicenseTerms",value:(function(){var _totalRegisteredLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee176(){return _regeneratorRuntime().wrap(function _callee176$(_context176){while(1)switch(_context176.prev=_context176.next){case 0:_context176.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"totalRegisteredLicenseTerms"});case 2:return _context176.abrupt("return",_context176.sent);case 3:case"end":return _context176.stop();}},_callee176,this);}));function totalRegisteredLicenseTerms(){return _totalRegisteredLicenseTerms.apply(this,arguments);}return totalRegisteredLicenseTerms;}()/**
|
2685
2735
|
* method verifyCompatibleLicenses for contract PILicenseTemplate
|
2686
2736
|
*
|
2687
2737
|
* @param request PiLicenseTemplateVerifyCompatibleLicensesRequest
|
2688
2738
|
* @return Promise<PiLicenseTemplateVerifyCompatibleLicensesResponse>
|
2689
|
-
*/)},{key:"verifyCompatibleLicenses",value:(function(){var _verifyCompatibleLicenses=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2739
|
+
*/)},{key:"verifyCompatibleLicenses",value:(function(){var _verifyCompatibleLicenses=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee177(request){return _regeneratorRuntime().wrap(function _callee177$(_context177){while(1)switch(_context177.prev=_context177.next){case 0:_context177.next=2;return this.rpcClient.readContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"verifyCompatibleLicenses",args:[request.licenseTermsIds]});case 2:return _context177.abrupt("return",_context177.sent);case 3:case"end":return _context177.stop();}},_callee177,this);}));function verifyCompatibleLicenses(_x115){return _verifyCompatibleLicenses.apply(this,arguments);}return verifyCompatibleLicenses;}())}]);}(PiLicenseTemplateEventClient);/**
|
2690
2740
|
* contract PILicenseTemplate write method
|
2691
2741
|
*/var PiLicenseTemplateClient=/*#__PURE__*/function(_PiLicenseTemplateRea){function PiLicenseTemplateClient(rpcClient,wallet,address){var _this12;_classCallCheck(this,PiLicenseTemplateClient);_this12=_callSuper(this,PiLicenseTemplateClient,[rpcClient,address]);_this12.wallet=wallet;return _this12;}/**
|
2692
2742
|
* method initialize for contract PILicenseTemplate
|
2693
2743
|
*
|
2694
2744
|
* @param request PiLicenseTemplateInitializeRequest
|
2695
2745
|
* @return Promise<WriteContractReturnType>
|
2696
|
-
*/_inherits(PiLicenseTemplateClient,_PiLicenseTemplateRea);return _createClass(PiLicenseTemplateClient,[{key:"initialize",value:(function(){var _initialize5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2746
|
+
*/_inherits(PiLicenseTemplateClient,_PiLicenseTemplateRea);return _createClass(PiLicenseTemplateClient,[{key:"initialize",value:(function(){var _initialize5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee178(request){var _yield$this$rpcClient75,call;return _regeneratorRuntime().wrap(function _callee178$(_context178){while(1)switch(_context178.prev=_context178.next){case 0:_context178.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"initialize",account:this.wallet.account,args:[request.accessManager,request.name,request.metadataURI]});case 2:_yield$this$rpcClient75=_context178.sent;call=_yield$this$rpcClient75.request;_context178.next=6;return this.wallet.writeContract(call);case 6:return _context178.abrupt("return",_context178.sent);case 7:case"end":return _context178.stop();}},_callee178,this);}));function initialize(_x116){return _initialize5.apply(this,arguments);}return initialize;}()/**
|
2697
2747
|
* method initialize for contract PILicenseTemplate with only encode
|
2698
2748
|
*
|
2699
2749
|
* @param request PiLicenseTemplateInitializeRequest
|
@@ -2703,7 +2753,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2703
2753
|
*
|
2704
2754
|
* @param request PiLicenseTemplateRegisterLicenseTermsRequest
|
2705
2755
|
* @return Promise<WriteContractReturnType>
|
2706
|
-
*/},{key:"registerLicenseTerms",value:(function(){var _registerLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2756
|
+
*/},{key:"registerLicenseTerms",value:(function(){var _registerLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee179(request){var _yield$this$rpcClient76,call;return _regeneratorRuntime().wrap(function _callee179$(_context179){while(1)switch(_context179.prev=_context179.next){case 0:_context179.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"registerLicenseTerms",account:this.wallet.account,args:[request.terms]});case 2:_yield$this$rpcClient76=_context179.sent;call=_yield$this$rpcClient76.request;_context179.next=6;return this.wallet.writeContract(call);case 6:return _context179.abrupt("return",_context179.sent);case 7:case"end":return _context179.stop();}},_callee179,this);}));function registerLicenseTerms(_x117){return _registerLicenseTerms.apply(this,arguments);}return registerLicenseTerms;}()/**
|
2707
2757
|
* method registerLicenseTerms for contract PILicenseTemplate with only encode
|
2708
2758
|
*
|
2709
2759
|
* @param request PiLicenseTemplateRegisterLicenseTermsRequest
|
@@ -2713,7 +2763,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2713
2763
|
*
|
2714
2764
|
* @param request PiLicenseTemplateSetApprovalRequest
|
2715
2765
|
* @return Promise<WriteContractReturnType>
|
2716
|
-
*/},{key:"setApproval",value:(function(){var _setApproval=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2766
|
+
*/},{key:"setApproval",value:(function(){var _setApproval=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee180(request){var _yield$this$rpcClient77,call;return _regeneratorRuntime().wrap(function _callee180$(_context180){while(1)switch(_context180.prev=_context180.next){case 0:_context180.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"setApproval",account:this.wallet.account,args:[request.parentIpId,request.licenseTermsId,request.childIpId,request.approved]});case 2:_yield$this$rpcClient77=_context180.sent;call=_yield$this$rpcClient77.request;_context180.next=6;return this.wallet.writeContract(call);case 6:return _context180.abrupt("return",_context180.sent);case 7:case"end":return _context180.stop();}},_callee180,this);}));function setApproval(_x118){return _setApproval.apply(this,arguments);}return setApproval;}()/**
|
2717
2767
|
* method setApproval for contract PILicenseTemplate with only encode
|
2718
2768
|
*
|
2719
2769
|
* @param request PiLicenseTemplateSetApprovalRequest
|
@@ -2723,7 +2773,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2723
2773
|
*
|
2724
2774
|
* @param request PiLicenseTemplateSetAuthorityRequest
|
2725
2775
|
* @return Promise<WriteContractReturnType>
|
2726
|
-
*/},{key:"setAuthority",value:(function(){var _setAuthority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2776
|
+
*/},{key:"setAuthority",value:(function(){var _setAuthority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee181(request){var _yield$this$rpcClient78,call;return _regeneratorRuntime().wrap(function _callee181$(_context181){while(1)switch(_context181.prev=_context181.next){case 0:_context181.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"setAuthority",account:this.wallet.account,args:[request.newAuthority]});case 2:_yield$this$rpcClient78=_context181.sent;call=_yield$this$rpcClient78.request;_context181.next=6;return this.wallet.writeContract(call);case 6:return _context181.abrupt("return",_context181.sent);case 7:case"end":return _context181.stop();}},_callee181,this);}));function setAuthority(_x119){return _setAuthority5.apply(this,arguments);}return setAuthority;}()/**
|
2727
2777
|
* method setAuthority for contract PILicenseTemplate with only encode
|
2728
2778
|
*
|
2729
2779
|
* @param request PiLicenseTemplateSetAuthorityRequest
|
@@ -2733,7 +2783,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2733
2783
|
*
|
2734
2784
|
* @param request PiLicenseTemplateUpgradeToAndCallRequest
|
2735
2785
|
* @return Promise<WriteContractReturnType>
|
2736
|
-
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2786
|
+
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee182(request){var _yield$this$rpcClient79,call;return _regeneratorRuntime().wrap(function _callee182$(_context182){while(1)switch(_context182.prev=_context182.next){case 0:_context182.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"upgradeToAndCall",account:this.wallet.account,args:[request.newImplementation,request.data]});case 2:_yield$this$rpcClient79=_context182.sent;call=_yield$this$rpcClient79.request;_context182.next=6;return this.wallet.writeContract(call);case 6:return _context182.abrupt("return",_context182.sent);case 7:case"end":return _context182.stop();}},_callee182,this);}));function upgradeToAndCall(_x120){return _upgradeToAndCall5.apply(this,arguments);}return upgradeToAndCall;}()/**
|
2737
2787
|
* method upgradeToAndCall for contract PILicenseTemplate with only encode
|
2738
2788
|
*
|
2739
2789
|
* @param request PiLicenseTemplateUpgradeToAndCallRequest
|
@@ -2743,7 +2793,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2743
2793
|
*
|
2744
2794
|
* @param request PiLicenseTemplateVerifyMintLicenseTokenRequest
|
2745
2795
|
* @return Promise<WriteContractReturnType>
|
2746
|
-
*/},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2796
|
+
*/},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee183(request){var _yield$this$rpcClient80,call;return _regeneratorRuntime().wrap(function _callee183$(_context183){while(1)switch(_context183.prev=_context183.next){case 0:_context183.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"verifyMintLicenseToken",account:this.wallet.account,args:[request[0],request[1],request[2],request[3]]});case 2:_yield$this$rpcClient80=_context183.sent;call=_yield$this$rpcClient80.request;_context183.next=6;return this.wallet.writeContract(call);case 6:return _context183.abrupt("return",_context183.sent);case 7:case"end":return _context183.stop();}},_callee183,this);}));function verifyMintLicenseToken(_x121){return _verifyMintLicenseToken2.apply(this,arguments);}return verifyMintLicenseToken;}()/**
|
2747
2797
|
* method verifyMintLicenseToken for contract PILicenseTemplate with only encode
|
2748
2798
|
*
|
2749
2799
|
* @param request PiLicenseTemplateVerifyMintLicenseTokenRequest
|
@@ -2753,7 +2803,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2753
2803
|
*
|
2754
2804
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeRequest
|
2755
2805
|
* @return Promise<WriteContractReturnType>
|
2756
|
-
*/},{key:"verifyRegisterDerivative",value:(function(){var _verifyRegisterDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2806
|
+
*/},{key:"verifyRegisterDerivative",value:(function(){var _verifyRegisterDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee184(request){var _yield$this$rpcClient81,call;return _regeneratorRuntime().wrap(function _callee184$(_context184){while(1)switch(_context184.prev=_context184.next){case 0:_context184.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"verifyRegisterDerivative",account:this.wallet.account,args:[request.childIpId,request.parentIpId,request.licenseTermsId,request.licensee]});case 2:_yield$this$rpcClient81=_context184.sent;call=_yield$this$rpcClient81.request;_context184.next=6;return this.wallet.writeContract(call);case 6:return _context184.abrupt("return",_context184.sent);case 7:case"end":return _context184.stop();}},_callee184,this);}));function verifyRegisterDerivative(_x122){return _verifyRegisterDerivative.apply(this,arguments);}return verifyRegisterDerivative;}()/**
|
2757
2807
|
* method verifyRegisterDerivative for contract PILicenseTemplate with only encode
|
2758
2808
|
*
|
2759
2809
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeRequest
|
@@ -2763,7 +2813,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2763
2813
|
*
|
2764
2814
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest
|
2765
2815
|
* @return Promise<WriteContractReturnType>
|
2766
|
-
*/},{key:"verifyRegisterDerivativeForAllParents",value:(function(){var _verifyRegisterDerivativeForAllParents=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2816
|
+
*/},{key:"verifyRegisterDerivativeForAllParents",value:(function(){var _verifyRegisterDerivativeForAllParents=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee185(request){var _yield$this$rpcClient82,call;return _regeneratorRuntime().wrap(function _callee185$(_context185){while(1)switch(_context185.prev=_context185.next){case 0:_context185.next=2;return this.rpcClient.simulateContract({abi:piLicenseTemplateAbi,address:this.address,functionName:"verifyRegisterDerivativeForAllParents",account:this.wallet.account,args:[request.childIpId,request.parentIpIds,request.licenseTermsIds,request.childIpOwner]});case 2:_yield$this$rpcClient82=_context185.sent;call=_yield$this$rpcClient82.request;_context185.next=6;return this.wallet.writeContract(call);case 6:return _context185.abrupt("return",_context185.sent);case 7:case"end":return _context185.stop();}},_callee185,this);}));function verifyRegisterDerivativeForAllParents(_x123){return _verifyRegisterDerivativeForAllParents.apply(this,arguments);}return verifyRegisterDerivativeForAllParents;}()/**
|
2767
2817
|
* method verifyRegisterDerivativeForAllParents for contract PILicenseTemplate with only encode
|
2768
2818
|
*
|
2769
2819
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest
|
@@ -2784,6 +2834,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2784
2834
|
* @param recipient address
|
2785
2835
|
* @param ipMetadata tuple
|
2786
2836
|
*/ /**
|
2837
|
+
* RegistrationWorkflowsMulticallRequest
|
2838
|
+
*
|
2839
|
+
* @param data bytes[]
|
2840
|
+
*/ /**
|
2787
2841
|
* RegistrationWorkflowsRegisterIpRequest
|
2788
2842
|
*
|
2789
2843
|
* @param nftContract address
|
@@ -2792,7 +2846,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2792
2846
|
* @param sigMetadata tuple
|
2793
2847
|
*/ /**
|
2794
2848
|
* contract RegistrationWorkflows event
|
2795
|
-
*/var RegistrationWorkflowsEventClient=/*#__PURE__*/function(){function RegistrationWorkflowsEventClient(rpcClient,address){var _rpcClient$
|
2849
|
+
*/var RegistrationWorkflowsEventClient=/*#__PURE__*/function(){function RegistrationWorkflowsEventClient(rpcClient,address){var _rpcClient$chain19;_classCallCheck(this,RegistrationWorkflowsEventClient);this.address=address||getAddress(registrationWorkflowsAddress,(_rpcClient$chain19=rpcClient.chain)===null||_rpcClient$chain19===void 0?void 0:_rpcClient$chain19.id);this.rpcClient=rpcClient;}/**
|
2796
2850
|
* event CollectionCreated for contract RegistrationWorkflows
|
2797
2851
|
*/return _createClass(RegistrationWorkflowsEventClient,[{key:"watchCollectionCreatedEvent",value:function watchCollectionCreatedEvent(_onLogs47){return this.rpcClient.watchContractEvent({abi:registrationWorkflowsAbi,address:this.address,eventName:"CollectionCreated",onLogs:function onLogs(evs){evs.forEach(function(it){return _onLogs47(it.transactionHash,it.args);});}});}/**
|
2798
2852
|
* parse tx receipt event CollectionCreated for contract RegistrationWorkflows
|
@@ -2803,7 +2857,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2803
2857
|
*
|
2804
2858
|
* @param request RegistrationWorkflowsCreateCollectionRequest
|
2805
2859
|
* @return Promise<WriteContractReturnType>
|
2806
|
-
*/_inherits(RegistrationWorkflowsClient,_RegistrationWorkflow);return _createClass(RegistrationWorkflowsClient,[{key:"createCollection",value:(function(){var _createCollection=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2860
|
+
*/_inherits(RegistrationWorkflowsClient,_RegistrationWorkflow);return _createClass(RegistrationWorkflowsClient,[{key:"createCollection",value:(function(){var _createCollection=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee186(request){var _yield$this$rpcClient83,call;return _regeneratorRuntime().wrap(function _callee186$(_context186){while(1)switch(_context186.prev=_context186.next){case 0:_context186.next=2;return this.rpcClient.simulateContract({abi:registrationWorkflowsAbi,address:this.address,functionName:"createCollection",account:this.wallet.account,args:[request.spgNftInitParams]});case 2:_yield$this$rpcClient83=_context186.sent;call=_yield$this$rpcClient83.request;_context186.next=6;return this.wallet.writeContract(call);case 6:return _context186.abrupt("return",_context186.sent);case 7:case"end":return _context186.stop();}},_callee186,this);}));function createCollection(_x124){return _createCollection.apply(this,arguments);}return createCollection;}()/**
|
2807
2861
|
* method createCollection for contract RegistrationWorkflows with only encode
|
2808
2862
|
*
|
2809
2863
|
* @param request RegistrationWorkflowsCreateCollectionRequest
|
@@ -2813,17 +2867,27 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2813
2867
|
*
|
2814
2868
|
* @param request RegistrationWorkflowsMintAndRegisterIpRequest
|
2815
2869
|
* @return Promise<WriteContractReturnType>
|
2816
|
-
*/},{key:"mintAndRegisterIp",value:(function(){var _mintAndRegisterIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2870
|
+
*/},{key:"mintAndRegisterIp",value:(function(){var _mintAndRegisterIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee187(request){var _yield$this$rpcClient84,call;return _regeneratorRuntime().wrap(function _callee187$(_context187){while(1)switch(_context187.prev=_context187.next){case 0:_context187.next=2;return this.rpcClient.simulateContract({abi:registrationWorkflowsAbi,address:this.address,functionName:"mintAndRegisterIp",account:this.wallet.account,args:[request.spgNftContract,request.recipient,request.ipMetadata]});case 2:_yield$this$rpcClient84=_context187.sent;call=_yield$this$rpcClient84.request;_context187.next=6;return this.wallet.writeContract(call);case 6:return _context187.abrupt("return",_context187.sent);case 7:case"end":return _context187.stop();}},_callee187,this);}));function mintAndRegisterIp(_x125){return _mintAndRegisterIp.apply(this,arguments);}return mintAndRegisterIp;}()/**
|
2817
2871
|
* method mintAndRegisterIp for contract RegistrationWorkflows with only encode
|
2818
2872
|
*
|
2819
2873
|
* @param request RegistrationWorkflowsMintAndRegisterIpRequest
|
2820
2874
|
* @return EncodedTxData
|
2821
2875
|
*/)},{key:"mintAndRegisterIpEncode",value:function mintAndRegisterIpEncode(request){return {to:this.address,data:encodeFunctionData({abi:registrationWorkflowsAbi,functionName:"mintAndRegisterIp",args:[request.spgNftContract,request.recipient,request.ipMetadata]})};}/**
|
2876
|
+
* method multicall for contract RegistrationWorkflows
|
2877
|
+
*
|
2878
|
+
* @param request RegistrationWorkflowsMulticallRequest
|
2879
|
+
* @return Promise<WriteContractReturnType>
|
2880
|
+
*/},{key:"multicall",value:(function(){var _multicall3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee188(request){var _yield$this$rpcClient85,call;return _regeneratorRuntime().wrap(function _callee188$(_context188){while(1)switch(_context188.prev=_context188.next){case 0:_context188.next=2;return this.rpcClient.simulateContract({abi:registrationWorkflowsAbi,address:this.address,functionName:"multicall",account:this.wallet.account,args:[request.data]});case 2:_yield$this$rpcClient85=_context188.sent;call=_yield$this$rpcClient85.request;_context188.next=6;return this.wallet.writeContract(call);case 6:return _context188.abrupt("return",_context188.sent);case 7:case"end":return _context188.stop();}},_callee188,this);}));function multicall(_x126){return _multicall3.apply(this,arguments);}return multicall;}()/**
|
2881
|
+
* method multicall for contract RegistrationWorkflows with only encode
|
2882
|
+
*
|
2883
|
+
* @param request RegistrationWorkflowsMulticallRequest
|
2884
|
+
* @return EncodedTxData
|
2885
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:encodeFunctionData({abi:registrationWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
2822
2886
|
* method registerIp for contract RegistrationWorkflows
|
2823
2887
|
*
|
2824
2888
|
* @param request RegistrationWorkflowsRegisterIpRequest
|
2825
2889
|
* @return Promise<WriteContractReturnType>
|
2826
|
-
*/},{key:"registerIp",value:(function(){var _registerIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2890
|
+
*/},{key:"registerIp",value:(function(){var _registerIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee189(request){var _yield$this$rpcClient86,call;return _regeneratorRuntime().wrap(function _callee189$(_context189){while(1)switch(_context189.prev=_context189.next){case 0:_context189.next=2;return this.rpcClient.simulateContract({abi:registrationWorkflowsAbi,address:this.address,functionName:"registerIp",account:this.wallet.account,args:[request.nftContract,request.tokenId,request.ipMetadata,request.sigMetadata]});case 2:_yield$this$rpcClient86=_context189.sent;call=_yield$this$rpcClient86.request;_context189.next=6;return this.wallet.writeContract(call);case 6:return _context189.abrupt("return",_context189.sent);case 7:case"end":return _context189.stop();}},_callee189,this);}));function registerIp(_x127){return _registerIp.apply(this,arguments);}return registerIp;}()/**
|
2827
2891
|
* method registerIp for contract RegistrationWorkflows with only encode
|
2828
2892
|
*
|
2829
2893
|
* @param request RegistrationWorkflowsRegisterIpRequest
|
@@ -2850,29 +2914,29 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2850
2914
|
* @param amount uint256
|
2851
2915
|
*/ /**
|
2852
2916
|
* contract RoyaltyModule readonly method
|
2853
|
-
*/var RoyaltyModuleReadOnlyClient=/*#__PURE__*/function(){function RoyaltyModuleReadOnlyClient(rpcClient,address){var _rpcClient$
|
2917
|
+
*/var RoyaltyModuleReadOnlyClient=/*#__PURE__*/function(){function RoyaltyModuleReadOnlyClient(rpcClient,address){var _rpcClient$chain20;_classCallCheck(this,RoyaltyModuleReadOnlyClient);this.address=address||getAddress(royaltyModuleAddress,(_rpcClient$chain20=rpcClient.chain)===null||_rpcClient$chain20===void 0?void 0:_rpcClient$chain20.id);this.rpcClient=rpcClient;}/**
|
2854
2918
|
* method ipRoyaltyVaults for contract RoyaltyModule
|
2855
2919
|
*
|
2856
2920
|
* @param request RoyaltyModuleIpRoyaltyVaultsRequest
|
2857
2921
|
* @return Promise<RoyaltyModuleIpRoyaltyVaultsResponse>
|
2858
|
-
*/return _createClass(RoyaltyModuleReadOnlyClient,[{key:"ipRoyaltyVaults",value:(function(){var _ipRoyaltyVaults=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2922
|
+
*/return _createClass(RoyaltyModuleReadOnlyClient,[{key:"ipRoyaltyVaults",value:(function(){var _ipRoyaltyVaults=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee190(request){return _regeneratorRuntime().wrap(function _callee190$(_context190){while(1)switch(_context190.prev=_context190.next){case 0:_context190.next=2;return this.rpcClient.readContract({abi:royaltyModuleAbi,address:this.address,functionName:"ipRoyaltyVaults",args:[request.ipId]});case 2:return _context190.abrupt("return",_context190.sent);case 3:case"end":return _context190.stop();}},_callee190,this);}));function ipRoyaltyVaults(_x128){return _ipRoyaltyVaults.apply(this,arguments);}return ipRoyaltyVaults;}()/**
|
2859
2923
|
* method isWhitelistedRoyaltyPolicy for contract RoyaltyModule
|
2860
2924
|
*
|
2861
2925
|
* @param request RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest
|
2862
2926
|
* @return Promise<RoyaltyModuleIsWhitelistedRoyaltyPolicyResponse>
|
2863
|
-
*/)},{key:"isWhitelistedRoyaltyPolicy",value:(function(){var _isWhitelistedRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2927
|
+
*/)},{key:"isWhitelistedRoyaltyPolicy",value:(function(){var _isWhitelistedRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee191(request){return _regeneratorRuntime().wrap(function _callee191$(_context191){while(1)switch(_context191.prev=_context191.next){case 0:_context191.next=2;return this.rpcClient.readContract({abi:royaltyModuleAbi,address:this.address,functionName:"isWhitelistedRoyaltyPolicy",args:[request.royaltyPolicy]});case 2:return _context191.abrupt("return",_context191.sent);case 3:case"end":return _context191.stop();}},_callee191,this);}));function isWhitelistedRoyaltyPolicy(_x129){return _isWhitelistedRoyaltyPolicy.apply(this,arguments);}return isWhitelistedRoyaltyPolicy;}()/**
|
2864
2928
|
* method isWhitelistedRoyaltyToken for contract RoyaltyModule
|
2865
2929
|
*
|
2866
2930
|
* @param request RoyaltyModuleIsWhitelistedRoyaltyTokenRequest
|
2867
2931
|
* @return Promise<RoyaltyModuleIsWhitelistedRoyaltyTokenResponse>
|
2868
|
-
*/)},{key:"isWhitelistedRoyaltyToken",value:(function(){var _isWhitelistedRoyaltyToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2932
|
+
*/)},{key:"isWhitelistedRoyaltyToken",value:(function(){var _isWhitelistedRoyaltyToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee192(request){return _regeneratorRuntime().wrap(function _callee192$(_context192){while(1)switch(_context192.prev=_context192.next){case 0:_context192.next=2;return this.rpcClient.readContract({abi:royaltyModuleAbi,address:this.address,functionName:"isWhitelistedRoyaltyToken",args:[request.token]});case 2:return _context192.abrupt("return",_context192.sent);case 3:case"end":return _context192.stop();}},_callee192,this);}));function isWhitelistedRoyaltyToken(_x130){return _isWhitelistedRoyaltyToken.apply(this,arguments);}return isWhitelistedRoyaltyToken;}())}]);}();/**
|
2869
2933
|
* contract RoyaltyModule write method
|
2870
2934
|
*/var RoyaltyModuleClient=/*#__PURE__*/function(_RoyaltyModuleReadOnl){function RoyaltyModuleClient(rpcClient,wallet,address){var _this14;_classCallCheck(this,RoyaltyModuleClient);_this14=_callSuper(this,RoyaltyModuleClient,[rpcClient,address]);_this14.wallet=wallet;return _this14;}/**
|
2871
2935
|
* method payRoyaltyOnBehalf for contract RoyaltyModule
|
2872
2936
|
*
|
2873
2937
|
* @param request RoyaltyModulePayRoyaltyOnBehalfRequest
|
2874
2938
|
* @return Promise<WriteContractReturnType>
|
2875
|
-
*/_inherits(RoyaltyModuleClient,_RoyaltyModuleReadOnl);return _createClass(RoyaltyModuleClient,[{key:"payRoyaltyOnBehalf",value:(function(){var _payRoyaltyOnBehalf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2939
|
+
*/_inherits(RoyaltyModuleClient,_RoyaltyModuleReadOnl);return _createClass(RoyaltyModuleClient,[{key:"payRoyaltyOnBehalf",value:(function(){var _payRoyaltyOnBehalf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee193(request){var _yield$this$rpcClient87,call;return _regeneratorRuntime().wrap(function _callee193$(_context193){while(1)switch(_context193.prev=_context193.next){case 0:_context193.next=2;return this.rpcClient.simulateContract({abi:royaltyModuleAbi,address:this.address,functionName:"payRoyaltyOnBehalf",account:this.wallet.account,args:[request.receiverIpId,request.payerIpId,request.token,request.amount]});case 2:_yield$this$rpcClient87=_context193.sent;call=_yield$this$rpcClient87.request;_context193.next=6;return this.wallet.writeContract(call);case 6:return _context193.abrupt("return",_context193.sent);case 7:case"end":return _context193.stop();}},_callee193,this);}));function payRoyaltyOnBehalf(_x131){return _payRoyaltyOnBehalf.apply(this,arguments);}return payRoyaltyOnBehalf;}()/**
|
2876
2940
|
* method payRoyaltyOnBehalf for contract RoyaltyModule with only encode
|
2877
2941
|
*
|
2878
2942
|
* @param request RoyaltyModulePayRoyaltyOnBehalfRequest
|
@@ -2906,12 +2970,12 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2906
2970
|
* @param royaltyClaimDetails tuple[]
|
2907
2971
|
*/ /**
|
2908
2972
|
* contract RoyaltyWorkflows write method
|
2909
|
-
*/var RoyaltyWorkflowsClient=/*#__PURE__*/function(){function RoyaltyWorkflowsClient(rpcClient,wallet,address){var _rpcClient$
|
2973
|
+
*/var RoyaltyWorkflowsClient=/*#__PURE__*/function(){function RoyaltyWorkflowsClient(rpcClient,wallet,address){var _rpcClient$chain22;_classCallCheck(this,RoyaltyWorkflowsClient);this.address=address||getAddress(royaltyWorkflowsAddress,(_rpcClient$chain22=rpcClient.chain)===null||_rpcClient$chain22===void 0?void 0:_rpcClient$chain22.id);this.rpcClient=rpcClient;this.wallet=wallet;}/**
|
2910
2974
|
* method snapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows
|
2911
2975
|
*
|
2912
2976
|
* @param request RoyaltyWorkflowsSnapshotAndClaimBySnapshotBatchRequest
|
2913
2977
|
* @return Promise<WriteContractReturnType>
|
2914
|
-
*/return _createClass(RoyaltyWorkflowsClient,[{key:"snapshotAndClaimBySnapshotBatch",value:(function(){var _snapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2978
|
+
*/return _createClass(RoyaltyWorkflowsClient,[{key:"snapshotAndClaimBySnapshotBatch",value:(function(){var _snapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee215(request){var _yield$this$rpcClient98,call;return _regeneratorRuntime().wrap(function _callee215$(_context215){while(1)switch(_context215.prev=_context215.next){case 0:_context215.next=2;return this.rpcClient.simulateContract({abi:royaltyWorkflowsAbi,address:this.address,functionName:"snapshotAndClaimBySnapshotBatch",account:this.wallet.account,args:[request.ipId,request.claimer,request.unclaimedSnapshotIds,request.currencyTokens]});case 2:_yield$this$rpcClient98=_context215.sent;call=_yield$this$rpcClient98.request;_context215.next=6;return this.wallet.writeContract(call);case 6:return _context215.abrupt("return",_context215.sent);case 7:case"end":return _context215.stop();}},_callee215,this);}));function snapshotAndClaimBySnapshotBatch(_x143){return _snapshotAndClaimBySnapshotBatch.apply(this,arguments);}return snapshotAndClaimBySnapshotBatch;}()/**
|
2915
2979
|
* method snapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows with only encode
|
2916
2980
|
*
|
2917
2981
|
* @param request RoyaltyWorkflowsSnapshotAndClaimBySnapshotBatchRequest
|
@@ -2921,7 +2985,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2921
2985
|
*
|
2922
2986
|
* @param request RoyaltyWorkflowsSnapshotAndClaimByTokenBatchRequest
|
2923
2987
|
* @return Promise<WriteContractReturnType>
|
2924
|
-
*/},{key:"snapshotAndClaimByTokenBatch",value:(function(){var _snapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2988
|
+
*/},{key:"snapshotAndClaimByTokenBatch",value:(function(){var _snapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee216(request){var _yield$this$rpcClient99,call;return _regeneratorRuntime().wrap(function _callee216$(_context216){while(1)switch(_context216.prev=_context216.next){case 0:_context216.next=2;return this.rpcClient.simulateContract({abi:royaltyWorkflowsAbi,address:this.address,functionName:"snapshotAndClaimByTokenBatch",account:this.wallet.account,args:[request.ipId,request.claimer,request.currencyTokens]});case 2:_yield$this$rpcClient99=_context216.sent;call=_yield$this$rpcClient99.request;_context216.next=6;return this.wallet.writeContract(call);case 6:return _context216.abrupt("return",_context216.sent);case 7:case"end":return _context216.stop();}},_callee216,this);}));function snapshotAndClaimByTokenBatch(_x144){return _snapshotAndClaimByTokenBatch.apply(this,arguments);}return snapshotAndClaimByTokenBatch;}()/**
|
2925
2989
|
* method snapshotAndClaimByTokenBatch for contract RoyaltyWorkflows with only encode
|
2926
2990
|
*
|
2927
2991
|
* @param request RoyaltyWorkflowsSnapshotAndClaimByTokenBatchRequest
|
@@ -2931,7 +2995,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2931
2995
|
*
|
2932
2996
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest
|
2933
2997
|
* @return Promise<WriteContractReturnType>
|
2934
|
-
*/},{key:"transferToVaultAndSnapshotAndClaimBySnapshotBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2998
|
+
*/},{key:"transferToVaultAndSnapshotAndClaimBySnapshotBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee217(request){var _yield$this$rpcClient100,call;return _regeneratorRuntime().wrap(function _callee217$(_context217){while(1)switch(_context217.prev=_context217.next){case 0:_context217.next=2;return this.rpcClient.simulateContract({abi:royaltyWorkflowsAbi,address:this.address,functionName:"transferToVaultAndSnapshotAndClaimBySnapshotBatch",account:this.wallet.account,args:[request.ancestorIpId,request.claimer,request.unclaimedSnapshotIds,request.royaltyClaimDetails]});case 2:_yield$this$rpcClient100=_context217.sent;call=_yield$this$rpcClient100.request;_context217.next=6;return this.wallet.writeContract(call);case 6:return _context217.abrupt("return",_context217.sent);case 7:case"end":return _context217.stop();}},_callee217,this);}));function transferToVaultAndSnapshotAndClaimBySnapshotBatch(_x145){return _transferToVaultAndSnapshotAndClaimBySnapshotBatch.apply(this,arguments);}return transferToVaultAndSnapshotAndClaimBySnapshotBatch;}()/**
|
2935
2999
|
* method transferToVaultAndSnapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows with only encode
|
2936
3000
|
*
|
2937
3001
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest
|
@@ -2941,7 +3005,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2941
3005
|
*
|
2942
3006
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimByTokenBatchRequest
|
2943
3007
|
* @return Promise<WriteContractReturnType>
|
2944
|
-
*/},{key:"transferToVaultAndSnapshotAndClaimByTokenBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
3008
|
+
*/},{key:"transferToVaultAndSnapshotAndClaimByTokenBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee218(request){var _yield$this$rpcClient101,call;return _regeneratorRuntime().wrap(function _callee218$(_context218){while(1)switch(_context218.prev=_context218.next){case 0:_context218.next=2;return this.rpcClient.simulateContract({abi:royaltyWorkflowsAbi,address:this.address,functionName:"transferToVaultAndSnapshotAndClaimByTokenBatch",account:this.wallet.account,args:[request.ancestorIpId,request.claimer,request.royaltyClaimDetails]});case 2:_yield$this$rpcClient101=_context218.sent;call=_yield$this$rpcClient101.request;_context218.next=6;return this.wallet.writeContract(call);case 6:return _context218.abrupt("return",_context218.sent);case 7:case"end":return _context218.stop();}},_callee218,this);}));function transferToVaultAndSnapshotAndClaimByTokenBatch(_x146){return _transferToVaultAndSnapshotAndClaimByTokenBatch.apply(this,arguments);}return transferToVaultAndSnapshotAndClaimByTokenBatch;}()/**
|
2945
3009
|
* method transferToVaultAndSnapshotAndClaimByTokenBatch for contract RoyaltyWorkflows with only encode
|
2946
3010
|
*
|
2947
3011
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimByTokenBatchRequest
|
@@ -3146,23 +3210,11 @@ var defaultFunctionSelector = "0x00000000";
|
|
3146
3210
|
*/
|
3147
3211
|
var getPermissionSignature = /*#__PURE__*/function () {
|
3148
3212
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(param) {
|
3149
|
-
var ipId, deadline, state, wallet, chainId, permissions, permissionFunc, permissionFunction, accessAddress, data
|
3213
|
+
var ipId, deadline, state, wallet, chainId, permissions, permissionFunc, permissionFunction, accessAddress, data;
|
3150
3214
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3151
3215
|
while (1) switch (_context.prev = _context.next) {
|
3152
3216
|
case 0:
|
3153
3217
|
ipId = param.ipId, deadline = param.deadline, state = param.state, wallet = param.wallet, chainId = param.chainId, permissions = param.permissions, permissionFunc = param.permissionFunc;
|
3154
|
-
if (wallet.signTypedData) {
|
3155
|
-
_context.next = 3;
|
3156
|
-
break;
|
3157
|
-
}
|
3158
|
-
throw new Error("The wallet client does not support signTypedData, please try again.");
|
3159
|
-
case 3:
|
3160
|
-
if (wallet.account) {
|
3161
|
-
_context.next = 5;
|
3162
|
-
break;
|
3163
|
-
}
|
3164
|
-
throw new Error("The wallet client does not have an account, please try again.");
|
3165
|
-
case 5:
|
3166
3218
|
permissionFunction = permissionFunc ? permissionFunc : "setPermission";
|
3167
3219
|
accessAddress = accessControllerAddress[Number(chainId)];
|
3168
3220
|
data = encodeFunctionData({
|
@@ -3178,6 +3230,66 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3178
3230
|
};
|
3179
3231
|
})]
|
3180
3232
|
});
|
3233
|
+
_context.next = 6;
|
3234
|
+
return getSignature({
|
3235
|
+
state: state,
|
3236
|
+
to: accessAddress,
|
3237
|
+
encodeData: data,
|
3238
|
+
wallet: wallet,
|
3239
|
+
verifyingContract: ipId,
|
3240
|
+
deadline: deadline,
|
3241
|
+
chainId: chainId
|
3242
|
+
});
|
3243
|
+
case 6:
|
3244
|
+
return _context.abrupt("return", _context.sent);
|
3245
|
+
case 7:
|
3246
|
+
case "end":
|
3247
|
+
return _context.stop();
|
3248
|
+
}
|
3249
|
+
}, _callee);
|
3250
|
+
}));
|
3251
|
+
return function getPermissionSignature(_x) {
|
3252
|
+
return _ref.apply(this, arguments);
|
3253
|
+
};
|
3254
|
+
}();
|
3255
|
+
var getDeadline = function getDeadline(unixTimestamp, deadline) {
|
3256
|
+
if (deadline && (isNaN(Number(deadline)) || BigInt(deadline) < 0n)) {
|
3257
|
+
throw new Error("Invalid deadline value.");
|
3258
|
+
}
|
3259
|
+
return deadline ? unixTimestamp + BigInt(deadline) : unixTimestamp + 1000n;
|
3260
|
+
};
|
3261
|
+
|
3262
|
+
/**
|
3263
|
+
* Get the signature.
|
3264
|
+
* @param param - The parameter object containing necessary data to get the signature.
|
3265
|
+
* @param param.state - The IP Account's state.
|
3266
|
+
* @param param.to - The recipient address.
|
3267
|
+
* @param param.encodeData - The encoded data.
|
3268
|
+
* @param param.wallet - The wallet client.
|
3269
|
+
* @param param.verifyingContract - The verifying contract.
|
3270
|
+
* @param param.deadline - The deadline.
|
3271
|
+
* @param param.chainId - The chain ID.
|
3272
|
+
* @returns A Promise that resolves to the signature.
|
3273
|
+
*/
|
3274
|
+
var getSignature = /*#__PURE__*/function () {
|
3275
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
3276
|
+
var state, to, encodeData, wallet, verifyingContract, deadline, chainId, nonce;
|
3277
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
3278
|
+
while (1) switch (_context2.prev = _context2.next) {
|
3279
|
+
case 0:
|
3280
|
+
state = _ref2.state, to = _ref2.to, encodeData = _ref2.encodeData, wallet = _ref2.wallet, verifyingContract = _ref2.verifyingContract, deadline = _ref2.deadline, chainId = _ref2.chainId;
|
3281
|
+
if (wallet.signTypedData) {
|
3282
|
+
_context2.next = 3;
|
3283
|
+
break;
|
3284
|
+
}
|
3285
|
+
throw new Error("The wallet client does not support signTypedData, please try again.");
|
3286
|
+
case 3:
|
3287
|
+
if (wallet.account) {
|
3288
|
+
_context2.next = 5;
|
3289
|
+
break;
|
3290
|
+
}
|
3291
|
+
throw new Error("The wallet client does not have an account, please try again.");
|
3292
|
+
case 5:
|
3181
3293
|
nonce = keccak256(encodeAbiParameters([{
|
3182
3294
|
name: "",
|
3183
3295
|
type: "bytes32"
|
@@ -3187,16 +3299,16 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3187
3299
|
}], [state, encodeFunctionData({
|
3188
3300
|
abi: ipAccountImplAbi,
|
3189
3301
|
functionName: "execute",
|
3190
|
-
args: [
|
3302
|
+
args: [to, 0n, encodeData]
|
3191
3303
|
})]));
|
3192
|
-
|
3304
|
+
_context2.next = 8;
|
3193
3305
|
return wallet.signTypedData({
|
3194
3306
|
account: wallet.account,
|
3195
3307
|
domain: {
|
3196
3308
|
name: "Story Protocol IP Account",
|
3197
3309
|
version: "1",
|
3198
3310
|
chainId: Number(chainId),
|
3199
|
-
verifyingContract:
|
3311
|
+
verifyingContract: verifyingContract
|
3200
3312
|
},
|
3201
3313
|
types: {
|
3202
3314
|
Execute: [{
|
@@ -3218,32 +3330,25 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3218
3330
|
},
|
3219
3331
|
primaryType: "Execute",
|
3220
3332
|
message: {
|
3221
|
-
to:
|
3333
|
+
to: to,
|
3222
3334
|
value: BigInt(0),
|
3223
|
-
data:
|
3335
|
+
data: encodeData,
|
3224
3336
|
nonce: nonce,
|
3225
3337
|
deadline: BigInt(deadline)
|
3226
3338
|
}
|
3227
3339
|
});
|
3228
|
-
case
|
3229
|
-
return
|
3230
|
-
case
|
3340
|
+
case 8:
|
3341
|
+
return _context2.abrupt("return", _context2.sent);
|
3342
|
+
case 9:
|
3231
3343
|
case "end":
|
3232
|
-
return
|
3344
|
+
return _context2.stop();
|
3233
3345
|
}
|
3234
|
-
},
|
3346
|
+
}, _callee2);
|
3235
3347
|
}));
|
3236
|
-
return function
|
3237
|
-
return
|
3348
|
+
return function getSignature(_x2) {
|
3349
|
+
return _ref3.apply(this, arguments);
|
3238
3350
|
};
|
3239
3351
|
}();
|
3240
|
-
var getDeadline = function getDeadline(deadline) {
|
3241
|
-
if (deadline && (isNaN(Number(deadline)) || BigInt(deadline) < 0n)) {
|
3242
|
-
throw new Error("Invalid deadline value.");
|
3243
|
-
}
|
3244
|
-
var timestamp = BigInt(Date.now());
|
3245
|
-
return deadline ? timestamp + BigInt(deadline) : timestamp + 1000n;
|
3246
|
-
};
|
3247
3352
|
|
3248
3353
|
/**
|
3249
3354
|
* Permission level
|
@@ -3270,9 +3375,11 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3270
3375
|
this.registrationWorkflowsClient = new RegistrationWorkflowsClient(rpcClient, wallet);
|
3271
3376
|
this.licenseAttachmentWorkflowsClient = new LicenseAttachmentWorkflowsClient(rpcClient, wallet);
|
3272
3377
|
this.derivativeWorkflowsClient = new DerivativeWorkflowsClient(rpcClient, wallet);
|
3378
|
+
this.multicall3Client = new Multicall3Client(rpcClient, wallet);
|
3273
3379
|
this.rpcClient = rpcClient;
|
3274
3380
|
this.wallet = wallet;
|
3275
3381
|
this.chainId = chainId;
|
3382
|
+
void this.getDefaultLicenseTerms();
|
3276
3383
|
}
|
3277
3384
|
|
3278
3385
|
/**
|
@@ -3405,7 +3512,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3405
3512
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
3406
3513
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3407
3514
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3408
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
3515
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3409
3516
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3410
3517
|
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes IP ID, token ID.
|
3411
3518
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
@@ -3414,7 +3521,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3414
3521
|
key: "register",
|
3415
3522
|
value: (function () {
|
3416
3523
|
var _register = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3417
|
-
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions, tokenId, ipIdAddress, isRegistered, object, _request$txOptions2, txHash,
|
3524
|
+
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions, tokenId, ipIdAddress, isRegistered, object, blockTimestamp, calculatedDeadline, signature, _request$txOptions2, txHash, txReceipt, targetLogs;
|
3418
3525
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3419
3526
|
while (1) switch (_context.prev = _context.next) {
|
3420
3527
|
case 0:
|
@@ -3451,35 +3558,16 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3451
3558
|
signature: zeroHash
|
3452
3559
|
}
|
3453
3560
|
};
|
3454
|
-
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.encodedTxDataOnly)) {
|
3455
|
-
_context.next = 19;
|
3456
|
-
break;
|
3457
|
-
}
|
3458
|
-
if (!request.ipMetadata) {
|
3459
|
-
_context.next = 16;
|
3460
|
-
break;
|
3461
|
-
}
|
3462
|
-
return _context.abrupt("return", {
|
3463
|
-
encodedTxData: this.registrationWorkflowsClient.registerIpEncode(object)
|
3464
|
-
});
|
3465
|
-
case 16:
|
3466
|
-
return _context.abrupt("return", {
|
3467
|
-
encodedTxData: this.ipAssetRegistryClient.registerEncode({
|
3468
|
-
tokenContract: object.nftContract,
|
3469
|
-
tokenId: object.tokenId,
|
3470
|
-
chainid: BigInt(chain[this.chainId])
|
3471
|
-
})
|
3472
|
-
});
|
3473
|
-
case 17:
|
3474
|
-
_context.next = 42;
|
3475
|
-
break;
|
3476
|
-
case 19:
|
3477
3561
|
if (!request.ipMetadata) {
|
3478
|
-
_context.next =
|
3562
|
+
_context.next = 20;
|
3479
3563
|
break;
|
3480
3564
|
}
|
3481
|
-
|
3482
|
-
|
3565
|
+
_context.next = 14;
|
3566
|
+
return this.rpcClient.getBlock();
|
3567
|
+
case 14:
|
3568
|
+
blockTimestamp = _context.sent.timestamp;
|
3569
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
3570
|
+
_context.next = 18;
|
3483
3571
|
return getPermissionSignature({
|
3484
3572
|
ipId: ipIdAddress,
|
3485
3573
|
deadline: calculatedDeadline,
|
@@ -3496,67 +3584,217 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3496
3584
|
func: "function setAll(address,string,bytes32,bytes32)"
|
3497
3585
|
}]
|
3498
3586
|
});
|
3499
|
-
case
|
3587
|
+
case 18:
|
3500
3588
|
signature = _context.sent;
|
3501
3589
|
object.sigMetadata = {
|
3502
3590
|
signer: getAddress$1(this.wallet.account.address, "wallet.account.address"),
|
3503
3591
|
deadline: calculatedDeadline,
|
3504
3592
|
signature: signature
|
3505
3593
|
};
|
3506
|
-
|
3594
|
+
case 20:
|
3595
|
+
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.encodedTxDataOnly)) {
|
3596
|
+
_context.next = 28;
|
3597
|
+
break;
|
3598
|
+
}
|
3599
|
+
if (!request.ipMetadata) {
|
3600
|
+
_context.next = 25;
|
3601
|
+
break;
|
3602
|
+
}
|
3603
|
+
return _context.abrupt("return", {
|
3604
|
+
encodedTxData: this.registrationWorkflowsClient.registerIpEncode(object)
|
3605
|
+
});
|
3606
|
+
case 25:
|
3607
|
+
return _context.abrupt("return", {
|
3608
|
+
encodedTxData: this.ipAssetRegistryClient.registerEncode({
|
3609
|
+
tokenContract: object.nftContract,
|
3610
|
+
tokenId: object.tokenId,
|
3611
|
+
chainid: BigInt(chain[this.chainId])
|
3612
|
+
})
|
3613
|
+
});
|
3614
|
+
case 26:
|
3615
|
+
_context.next = 46;
|
3616
|
+
break;
|
3617
|
+
case 28:
|
3618
|
+
if (!request.ipMetadata) {
|
3619
|
+
_context.next = 34;
|
3620
|
+
break;
|
3621
|
+
}
|
3622
|
+
_context.next = 31;
|
3507
3623
|
return this.registrationWorkflowsClient.registerIp(object);
|
3508
|
-
case
|
3624
|
+
case 31:
|
3509
3625
|
txHash = _context.sent;
|
3510
|
-
_context.next =
|
3626
|
+
_context.next = 37;
|
3511
3627
|
break;
|
3512
|
-
case
|
3513
|
-
_context.next =
|
3628
|
+
case 34:
|
3629
|
+
_context.next = 36;
|
3514
3630
|
return this.ipAssetRegistryClient.register({
|
3515
3631
|
tokenContract: object.nftContract,
|
3516
3632
|
tokenId: object.tokenId,
|
3517
|
-
chainid: BigInt(
|
3633
|
+
chainid: BigInt(this.chainId)
|
3518
3634
|
});
|
3519
|
-
case
|
3635
|
+
case 36:
|
3520
3636
|
txHash = _context.sent;
|
3521
|
-
case
|
3637
|
+
case 37:
|
3522
3638
|
if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
|
3523
|
-
_context.next =
|
3639
|
+
_context.next = 45;
|
3524
3640
|
break;
|
3525
3641
|
}
|
3526
|
-
_context.next =
|
3642
|
+
_context.next = 40;
|
3527
3643
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3528
3644
|
hash: txHash
|
3529
3645
|
}));
|
3530
|
-
case
|
3646
|
+
case 40:
|
3531
3647
|
txReceipt = _context.sent;
|
3532
|
-
targetLogs = this.
|
3648
|
+
targetLogs = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
3533
3649
|
return _context.abrupt("return", {
|
3534
3650
|
txHash: txHash,
|
3535
|
-
ipId: targetLogs
|
3536
|
-
tokenId: targetLogs
|
3651
|
+
ipId: targetLogs.ipId,
|
3652
|
+
tokenId: targetLogs.tokenId
|
3537
3653
|
});
|
3538
|
-
case
|
3654
|
+
case 45:
|
3539
3655
|
return _context.abrupt("return", {
|
3540
3656
|
txHash: txHash
|
3541
3657
|
});
|
3542
|
-
case
|
3543
|
-
_context.next =
|
3658
|
+
case 46:
|
3659
|
+
_context.next = 51;
|
3544
3660
|
break;
|
3545
|
-
case
|
3546
|
-
_context.prev =
|
3661
|
+
case 48:
|
3662
|
+
_context.prev = 48;
|
3547
3663
|
_context.t0 = _context["catch"](0);
|
3548
3664
|
handleError(_context.t0, "Failed to register IP");
|
3549
|
-
case
|
3665
|
+
case 51:
|
3550
3666
|
case "end":
|
3551
3667
|
return _context.stop();
|
3552
3668
|
}
|
3553
|
-
}, _callee, this, [[0,
|
3669
|
+
}, _callee, this, [[0, 48]]);
|
3554
3670
|
}));
|
3555
3671
|
function register(_x) {
|
3556
3672
|
return _register.apply(this, arguments);
|
3557
3673
|
}
|
3558
3674
|
return register;
|
3559
3675
|
}()
|
3676
|
+
/**
|
3677
|
+
* Batch registers an NFT as IP, creating a corresponding IP record.
|
3678
|
+
* @param request - The request object that contains all data needed to batch register IP.
|
3679
|
+
* @param {Array} request.args The array of objects containing the data needed to register IP.
|
3680
|
+
* @param request.args.nftContract The address of the NFT.
|
3681
|
+
* @param request.args.tokenId The token identifier of the NFT.
|
3682
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
3683
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
3684
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
3685
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3686
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3687
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3688
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes IP ID, Token ID.
|
3689
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
3690
|
+
*/
|
3691
|
+
)
|
3692
|
+
}, {
|
3693
|
+
key: "batchRegister",
|
3694
|
+
value: (function () {
|
3695
|
+
var _batchRegister = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3696
|
+
var _request$txOptions3, contracts, encodedTxData, _iterator, _step, arg, result, isSpg, txHash, txReceipt, targetLogs, results;
|
3697
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
3698
|
+
while (1) switch (_context2.prev = _context2.next) {
|
3699
|
+
case 0:
|
3700
|
+
_context2.prev = 0;
|
3701
|
+
contracts = [];
|
3702
|
+
_iterator = _createForOfIteratorHelper(request.args);
|
3703
|
+
_context2.prev = 3;
|
3704
|
+
_iterator.s();
|
3705
|
+
case 5:
|
3706
|
+
if ((_step = _iterator.n()).done) {
|
3707
|
+
_context2.next = 21;
|
3708
|
+
break;
|
3709
|
+
}
|
3710
|
+
arg = _step.value;
|
3711
|
+
_context2.prev = 7;
|
3712
|
+
_context2.next = 10;
|
3713
|
+
return this.register(_objectSpread2(_objectSpread2({}, arg), {}, {
|
3714
|
+
txOptions: {
|
3715
|
+
encodedTxDataOnly: true
|
3716
|
+
}
|
3717
|
+
}));
|
3718
|
+
case 10:
|
3719
|
+
result = _context2.sent;
|
3720
|
+
encodedTxData = result.encodedTxData.data;
|
3721
|
+
_context2.next = 17;
|
3722
|
+
break;
|
3723
|
+
case 14:
|
3724
|
+
_context2.prev = 14;
|
3725
|
+
_context2.t0 = _context2["catch"](7);
|
3726
|
+
throw new Error(_context2.t0.message.replace("Failed to register IP:", "").trim());
|
3727
|
+
case 17:
|
3728
|
+
isSpg = !!arg.ipMetadata;
|
3729
|
+
contracts.push({
|
3730
|
+
target: isSpg ? this.registrationWorkflowsClient.address : this.ipAssetRegistryClient.address,
|
3731
|
+
allowFailure: false,
|
3732
|
+
callData: encodedTxData
|
3733
|
+
});
|
3734
|
+
case 19:
|
3735
|
+
_context2.next = 5;
|
3736
|
+
break;
|
3737
|
+
case 21:
|
3738
|
+
_context2.next = 26;
|
3739
|
+
break;
|
3740
|
+
case 23:
|
3741
|
+
_context2.prev = 23;
|
3742
|
+
_context2.t1 = _context2["catch"](3);
|
3743
|
+
_iterator.e(_context2.t1);
|
3744
|
+
case 26:
|
3745
|
+
_context2.prev = 26;
|
3746
|
+
_iterator.f();
|
3747
|
+
return _context2.finish(26);
|
3748
|
+
case 29:
|
3749
|
+
_context2.next = 31;
|
3750
|
+
return this.multicall3Client.aggregate3({
|
3751
|
+
calls: contracts
|
3752
|
+
});
|
3753
|
+
case 31:
|
3754
|
+
txHash = _context2.sent;
|
3755
|
+
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
|
3756
|
+
_context2.next = 41;
|
3757
|
+
break;
|
3758
|
+
}
|
3759
|
+
_context2.next = 35;
|
3760
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3761
|
+
hash: txHash
|
3762
|
+
}));
|
3763
|
+
case 35:
|
3764
|
+
txReceipt = _context2.sent;
|
3765
|
+
targetLogs = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
3766
|
+
results = targetLogs.map(function (log) {
|
3767
|
+
return {
|
3768
|
+
ipId: log.ipId,
|
3769
|
+
tokenId: log.tokenId
|
3770
|
+
};
|
3771
|
+
});
|
3772
|
+
return _context2.abrupt("return", {
|
3773
|
+
txHash: txHash,
|
3774
|
+
results: results
|
3775
|
+
});
|
3776
|
+
case 41:
|
3777
|
+
return _context2.abrupt("return", {
|
3778
|
+
txHash: txHash
|
3779
|
+
});
|
3780
|
+
case 42:
|
3781
|
+
_context2.next = 47;
|
3782
|
+
break;
|
3783
|
+
case 44:
|
3784
|
+
_context2.prev = 44;
|
3785
|
+
_context2.t2 = _context2["catch"](0);
|
3786
|
+
handleError(_context2.t2, "Failed to batch register IP");
|
3787
|
+
case 47:
|
3788
|
+
case "end":
|
3789
|
+
return _context2.stop();
|
3790
|
+
}
|
3791
|
+
}, _callee2, this, [[0, 44], [3, 23, 26, 29], [7, 14]]);
|
3792
|
+
}));
|
3793
|
+
function batchRegister(_x2) {
|
3794
|
+
return _batchRegister.apply(this, arguments);
|
3795
|
+
}
|
3796
|
+
return batchRegister;
|
3797
|
+
}()
|
3560
3798
|
/**
|
3561
3799
|
* Registers a derivative directly with parent IP's license terms, without needing license tokens,
|
3562
3800
|
* and attaches the license terms of the parent IPs to the derivative IP.
|
@@ -3568,63 +3806,63 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3568
3806
|
* @param request.parentIpIds The parent IP IDs.
|
3569
3807
|
* @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
3570
3808
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3571
|
-
* @returns A Promise that resolves to
|
3809
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data.
|
3572
3810
|
*/
|
3573
3811
|
)
|
3574
3812
|
}, {
|
3575
3813
|
key: "registerDerivative",
|
3576
3814
|
value: (function () {
|
3577
|
-
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3578
|
-
var _request$
|
3579
|
-
return _regeneratorRuntime().wrap(function
|
3580
|
-
while (1) switch (
|
3815
|
+
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3816
|
+
var _request$txOptions4, isChildIpIdRegistered, _iterator2, _step2, parentId, isParentIpIdRegistered, i, isAttachedLicenseTerms, req, _request$txOptions5, txHash;
|
3817
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
3818
|
+
while (1) switch (_context3.prev = _context3.next) {
|
3581
3819
|
case 0:
|
3582
|
-
|
3583
|
-
|
3820
|
+
_context3.prev = 0;
|
3821
|
+
_context3.next = 3;
|
3584
3822
|
return this.isRegistered(request.childIpId);
|
3585
3823
|
case 3:
|
3586
|
-
isChildIpIdRegistered =
|
3824
|
+
isChildIpIdRegistered = _context3.sent;
|
3587
3825
|
if (isChildIpIdRegistered) {
|
3588
|
-
|
3826
|
+
_context3.next = 6;
|
3589
3827
|
break;
|
3590
3828
|
}
|
3591
3829
|
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
3592
3830
|
case 6:
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3831
|
+
_iterator2 = _createForOfIteratorHelper(request.parentIpIds);
|
3832
|
+
_context3.prev = 7;
|
3833
|
+
_iterator2.s();
|
3596
3834
|
case 9:
|
3597
|
-
if ((
|
3598
|
-
|
3835
|
+
if ((_step2 = _iterator2.n()).done) {
|
3836
|
+
_context3.next = 18;
|
3599
3837
|
break;
|
3600
3838
|
}
|
3601
|
-
parentId =
|
3602
|
-
|
3839
|
+
parentId = _step2.value;
|
3840
|
+
_context3.next = 13;
|
3603
3841
|
return this.isRegistered(getAddress$1(parentId, "request.parentIpIds"));
|
3604
3842
|
case 13:
|
3605
|
-
isParentIpIdRegistered =
|
3843
|
+
isParentIpIdRegistered = _context3.sent;
|
3606
3844
|
if (isParentIpIdRegistered) {
|
3607
|
-
|
3845
|
+
_context3.next = 16;
|
3608
3846
|
break;
|
3609
3847
|
}
|
3610
3848
|
throw new Error("The parent IP with id ".concat(parentId, " is not registered."));
|
3611
3849
|
case 16:
|
3612
|
-
|
3850
|
+
_context3.next = 9;
|
3613
3851
|
break;
|
3614
3852
|
case 18:
|
3615
|
-
|
3853
|
+
_context3.next = 23;
|
3616
3854
|
break;
|
3617
3855
|
case 20:
|
3618
|
-
|
3619
|
-
|
3620
|
-
|
3856
|
+
_context3.prev = 20;
|
3857
|
+
_context3.t0 = _context3["catch"](7);
|
3858
|
+
_iterator2.e(_context3.t0);
|
3621
3859
|
case 23:
|
3622
|
-
|
3623
|
-
|
3624
|
-
return
|
3860
|
+
_context3.prev = 23;
|
3861
|
+
_iterator2.f();
|
3862
|
+
return _context3.finish(23);
|
3625
3863
|
case 26:
|
3626
3864
|
if (!(request.parentIpIds.length !== request.licenseTermsIds.length)) {
|
3627
|
-
|
3865
|
+
_context3.next = 28;
|
3628
3866
|
break;
|
3629
3867
|
}
|
3630
3868
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -3632,25 +3870,25 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3632
3870
|
i = 0;
|
3633
3871
|
case 29:
|
3634
3872
|
if (!(i < request.parentIpIds.length)) {
|
3635
|
-
|
3873
|
+
_context3.next = 38;
|
3636
3874
|
break;
|
3637
3875
|
}
|
3638
|
-
|
3876
|
+
_context3.next = 32;
|
3639
3877
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
3640
3878
|
ipId: getAddress$1(request.parentIpIds[i], "request.parentIpIds"),
|
3641
3879
|
licenseTemplate: request.licenseTemplate && getAddress$1(request.licenseTemplate, "request.licenseTemplate") || this.licenseTemplateClient.address,
|
3642
3880
|
licenseTermsId: BigInt(request.licenseTermsIds[i])
|
3643
3881
|
});
|
3644
3882
|
case 32:
|
3645
|
-
isAttachedLicenseTerms =
|
3883
|
+
isAttachedLicenseTerms = _context3.sent;
|
3646
3884
|
if (isAttachedLicenseTerms) {
|
3647
|
-
|
3885
|
+
_context3.next = 35;
|
3648
3886
|
break;
|
3649
3887
|
}
|
3650
3888
|
throw new Error("License terms id ".concat(request.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.parentIpIds[i], " before registering derivative."));
|
3651
3889
|
case 35:
|
3652
3890
|
i++;
|
3653
|
-
|
3891
|
+
_context3.next = 29;
|
3654
3892
|
break;
|
3655
3893
|
case 38:
|
3656
3894
|
req = {
|
@@ -3662,52 +3900,193 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3662
3900
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
3663
3901
|
royaltyContext: zeroAddress
|
3664
3902
|
};
|
3665
|
-
if (!((_request$
|
3666
|
-
|
3903
|
+
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.encodedTxDataOnly)) {
|
3904
|
+
_context3.next = 43;
|
3667
3905
|
break;
|
3668
3906
|
}
|
3669
|
-
return
|
3907
|
+
return _context3.abrupt("return", {
|
3670
3908
|
encodedTxData: this.licensingModuleClient.registerDerivativeEncode(req)
|
3671
3909
|
});
|
3672
3910
|
case 43:
|
3673
|
-
|
3911
|
+
_context3.next = 45;
|
3674
3912
|
return this.licensingModuleClient.registerDerivative(req);
|
3675
3913
|
case 45:
|
3676
|
-
txHash =
|
3677
|
-
if (!((_request$
|
3678
|
-
|
3679
|
-
break;
|
3914
|
+
txHash = _context3.sent;
|
3915
|
+
if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.waitForTransaction)) {
|
3916
|
+
_context3.next = 52;
|
3917
|
+
break;
|
3680
3918
|
}
|
3681
|
-
|
3919
|
+
_context3.next = 49;
|
3682
3920
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3683
3921
|
hash: txHash
|
3684
3922
|
}));
|
3685
3923
|
case 49:
|
3686
|
-
return
|
3924
|
+
return _context3.abrupt("return", {
|
3687
3925
|
txHash: txHash
|
3688
3926
|
});
|
3689
3927
|
case 52:
|
3690
|
-
return
|
3928
|
+
return _context3.abrupt("return", {
|
3691
3929
|
txHash: txHash
|
3692
3930
|
});
|
3693
3931
|
case 53:
|
3694
|
-
|
3932
|
+
_context3.next = 58;
|
3695
3933
|
break;
|
3696
3934
|
case 55:
|
3697
|
-
|
3698
|
-
|
3699
|
-
handleError(
|
3935
|
+
_context3.prev = 55;
|
3936
|
+
_context3.t1 = _context3["catch"](0);
|
3937
|
+
handleError(_context3.t1, "Failed to register derivative");
|
3700
3938
|
case 58:
|
3701
3939
|
case "end":
|
3702
|
-
return
|
3940
|
+
return _context3.stop();
|
3703
3941
|
}
|
3704
|
-
},
|
3942
|
+
}, _callee3, this, [[0, 55], [7, 20, 23, 26]]);
|
3705
3943
|
}));
|
3706
|
-
function registerDerivative(
|
3944
|
+
function registerDerivative(_x3) {
|
3707
3945
|
return _registerDerivative.apply(this, arguments);
|
3708
3946
|
}
|
3709
3947
|
return registerDerivative;
|
3710
3948
|
}()
|
3949
|
+
/**
|
3950
|
+
* Batch registers a derivative directly with parent IP's license terms.
|
3951
|
+
* @param request - The request object that contains all data needed to batch register derivative IP.
|
3952
|
+
* @param {Array} request.args The array of objects containing the data needed to register derivative IP.
|
3953
|
+
* @param request.args.childIpId The derivative IP ID.
|
3954
|
+
* @param request.args.parentIpIds The parent IP IDs.
|
3955
|
+
* @param request.args.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
3956
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3957
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxDataOnly option.
|
3958
|
+
* @returns A Promise that resolves to a transaction hash.
|
3959
|
+
*/
|
3960
|
+
)
|
3961
|
+
}, {
|
3962
|
+
key: "batchRegisterDerivative",
|
3963
|
+
value: (function () {
|
3964
|
+
var _batchRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
|
3965
|
+
var _request$txOptions6, contracts, licenseModuleAddress, _iterator3, _step3, arg, blockTimestamp, calculatedDeadline, ipAccount, data, _yield$ipAccount$stat, state, signature, txHash;
|
3966
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
3967
|
+
while (1) switch (_context4.prev = _context4.next) {
|
3968
|
+
case 0:
|
3969
|
+
_context4.prev = 0;
|
3970
|
+
contracts = [];
|
3971
|
+
licenseModuleAddress = getAddress$1(this.licensingModuleClient.address, "licensingModuleAddress");
|
3972
|
+
_iterator3 = _createForOfIteratorHelper(request.args);
|
3973
|
+
_context4.prev = 4;
|
3974
|
+
_iterator3.s();
|
3975
|
+
case 6:
|
3976
|
+
if ((_step3 = _iterator3.n()).done) {
|
3977
|
+
_context4.next = 32;
|
3978
|
+
break;
|
3979
|
+
}
|
3980
|
+
arg = _step3.value;
|
3981
|
+
_context4.prev = 8;
|
3982
|
+
_context4.next = 11;
|
3983
|
+
return this.registerDerivative(_objectSpread2(_objectSpread2({}, arg), {}, {
|
3984
|
+
txOptions: {
|
3985
|
+
encodedTxDataOnly: true
|
3986
|
+
}
|
3987
|
+
}));
|
3988
|
+
case 11:
|
3989
|
+
_context4.next = 16;
|
3990
|
+
break;
|
3991
|
+
case 13:
|
3992
|
+
_context4.prev = 13;
|
3993
|
+
_context4.t0 = _context4["catch"](8);
|
3994
|
+
throw new Error(_context4.t0.message.replace("Failed to register derivative:", "").trim());
|
3995
|
+
case 16:
|
3996
|
+
_context4.next = 18;
|
3997
|
+
return this.rpcClient.getBlock();
|
3998
|
+
case 18:
|
3999
|
+
blockTimestamp = _context4.sent.timestamp;
|
4000
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4001
|
+
ipAccount = new IpAccountImplClient(this.rpcClient, this.wallet, getAddress$1(arg.childIpId, "arg.childIpId"));
|
4002
|
+
data = encodeFunctionData({
|
4003
|
+
abi: licensingModuleAbi,
|
4004
|
+
functionName: "registerDerivative",
|
4005
|
+
args: [arg.childIpId, arg.parentIpIds, arg.licenseTermsIds.map(function (id) {
|
4006
|
+
return BigInt(id);
|
4007
|
+
}), arg.licenseTemplate || this.licenseTemplateClient.address, zeroAddress]
|
4008
|
+
});
|
4009
|
+
_context4.next = 24;
|
4010
|
+
return ipAccount.state();
|
4011
|
+
case 24:
|
4012
|
+
_yield$ipAccount$stat = _context4.sent;
|
4013
|
+
state = _yield$ipAccount$stat.result;
|
4014
|
+
_context4.next = 28;
|
4015
|
+
return getSignature({
|
4016
|
+
state: state,
|
4017
|
+
to: licenseModuleAddress,
|
4018
|
+
encodeData: data,
|
4019
|
+
wallet: this.wallet,
|
4020
|
+
verifyingContract: arg.childIpId,
|
4021
|
+
deadline: calculatedDeadline,
|
4022
|
+
chainId: chain[this.chainId]
|
4023
|
+
});
|
4024
|
+
case 28:
|
4025
|
+
signature = _context4.sent;
|
4026
|
+
contracts.push({
|
4027
|
+
target: arg.childIpId,
|
4028
|
+
allowFailure: false,
|
4029
|
+
callData: encodeFunctionData({
|
4030
|
+
abi: ipAccountImplAbi,
|
4031
|
+
functionName: "executeWithSig",
|
4032
|
+
args: [licenseModuleAddress, BigInt(0), data, this.wallet.account.address, calculatedDeadline, signature]
|
4033
|
+
})
|
4034
|
+
});
|
4035
|
+
case 30:
|
4036
|
+
_context4.next = 6;
|
4037
|
+
break;
|
4038
|
+
case 32:
|
4039
|
+
_context4.next = 37;
|
4040
|
+
break;
|
4041
|
+
case 34:
|
4042
|
+
_context4.prev = 34;
|
4043
|
+
_context4.t1 = _context4["catch"](4);
|
4044
|
+
_iterator3.e(_context4.t1);
|
4045
|
+
case 37:
|
4046
|
+
_context4.prev = 37;
|
4047
|
+
_iterator3.f();
|
4048
|
+
return _context4.finish(37);
|
4049
|
+
case 40:
|
4050
|
+
_context4.next = 42;
|
4051
|
+
return this.multicall3Client.aggregate3({
|
4052
|
+
calls: contracts
|
4053
|
+
});
|
4054
|
+
case 42:
|
4055
|
+
txHash = _context4.sent;
|
4056
|
+
if (!((_request$txOptions6 = request.txOptions) !== null && _request$txOptions6 !== void 0 && _request$txOptions6.waitForTransaction)) {
|
4057
|
+
_context4.next = 49;
|
4058
|
+
break;
|
4059
|
+
}
|
4060
|
+
_context4.next = 46;
|
4061
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4062
|
+
hash: txHash
|
4063
|
+
}));
|
4064
|
+
case 46:
|
4065
|
+
return _context4.abrupt("return", {
|
4066
|
+
txHash: txHash
|
4067
|
+
});
|
4068
|
+
case 49:
|
4069
|
+
return _context4.abrupt("return", {
|
4070
|
+
txHash: txHash
|
4071
|
+
});
|
4072
|
+
case 50:
|
4073
|
+
_context4.next = 55;
|
4074
|
+
break;
|
4075
|
+
case 52:
|
4076
|
+
_context4.prev = 52;
|
4077
|
+
_context4.t2 = _context4["catch"](0);
|
4078
|
+
handleError(_context4.t2, "Failed to batch register derivative");
|
4079
|
+
case 55:
|
4080
|
+
case "end":
|
4081
|
+
return _context4.stop();
|
4082
|
+
}
|
4083
|
+
}, _callee4, this, [[0, 52], [4, 34, 37, 40], [8, 13]]);
|
4084
|
+
}));
|
4085
|
+
function batchRegisterDerivative(_x4) {
|
4086
|
+
return _batchRegisterDerivative.apply(this, arguments);
|
4087
|
+
}
|
4088
|
+
return batchRegisterDerivative;
|
4089
|
+
}()
|
3711
4090
|
/**
|
3712
4091
|
* Registers a derivative with license tokens.
|
3713
4092
|
* the derivative IP is registered with license tokens minted from the parent IP's license terms.
|
@@ -3723,73 +4102,73 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3723
4102
|
}, {
|
3724
4103
|
key: "registerDerivativeWithLicenseTokens",
|
3725
4104
|
value: (function () {
|
3726
|
-
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3727
|
-
var _request$
|
3728
|
-
return _regeneratorRuntime().wrap(function
|
3729
|
-
while (1) switch (
|
4105
|
+
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
4106
|
+
var _request$txOptions7, isChildIpIdRegistered, req, _request$txOptions8, txHash;
|
4107
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
4108
|
+
while (1) switch (_context5.prev = _context5.next) {
|
3730
4109
|
case 0:
|
3731
|
-
|
3732
|
-
|
4110
|
+
_context5.prev = 0;
|
4111
|
+
_context5.next = 3;
|
3733
4112
|
return this.isRegistered(request.childIpId);
|
3734
4113
|
case 3:
|
3735
|
-
isChildIpIdRegistered =
|
4114
|
+
isChildIpIdRegistered = _context5.sent;
|
3736
4115
|
if (isChildIpIdRegistered) {
|
3737
|
-
|
4116
|
+
_context5.next = 6;
|
3738
4117
|
break;
|
3739
4118
|
}
|
3740
4119
|
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
3741
4120
|
case 6:
|
3742
|
-
|
4121
|
+
_context5.next = 8;
|
3743
4122
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
3744
4123
|
case 8:
|
3745
|
-
request.licenseTokenIds =
|
4124
|
+
request.licenseTokenIds = _context5.sent;
|
3746
4125
|
req = {
|
3747
4126
|
childIpId: getAddress$1(request.childIpId, "request.childIpId"),
|
3748
4127
|
licenseTokenIds: request.licenseTokenIds,
|
3749
4128
|
royaltyContext: zeroAddress
|
3750
4129
|
};
|
3751
|
-
if (!((_request$
|
3752
|
-
|
4130
|
+
if (!((_request$txOptions7 = request.txOptions) !== null && _request$txOptions7 !== void 0 && _request$txOptions7.encodedTxDataOnly)) {
|
4131
|
+
_context5.next = 14;
|
3753
4132
|
break;
|
3754
4133
|
}
|
3755
|
-
return
|
4134
|
+
return _context5.abrupt("return", {
|
3756
4135
|
encodedTxData: this.licensingModuleClient.registerDerivativeWithLicenseTokensEncode(req)
|
3757
4136
|
});
|
3758
4137
|
case 14:
|
3759
|
-
|
4138
|
+
_context5.next = 16;
|
3760
4139
|
return this.licensingModuleClient.registerDerivativeWithLicenseTokens(req);
|
3761
4140
|
case 16:
|
3762
|
-
txHash =
|
3763
|
-
if (!((_request$
|
3764
|
-
|
4141
|
+
txHash = _context5.sent;
|
4142
|
+
if (!((_request$txOptions8 = request.txOptions) !== null && _request$txOptions8 !== void 0 && _request$txOptions8.waitForTransaction)) {
|
4143
|
+
_context5.next = 23;
|
3765
4144
|
break;
|
3766
4145
|
}
|
3767
|
-
|
4146
|
+
_context5.next = 20;
|
3768
4147
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3769
4148
|
hash: txHash
|
3770
4149
|
}));
|
3771
4150
|
case 20:
|
3772
|
-
return
|
4151
|
+
return _context5.abrupt("return", {
|
3773
4152
|
txHash: txHash
|
3774
4153
|
});
|
3775
4154
|
case 23:
|
3776
|
-
return
|
4155
|
+
return _context5.abrupt("return", {
|
3777
4156
|
txHash: txHash
|
3778
4157
|
});
|
3779
4158
|
case 24:
|
3780
|
-
|
4159
|
+
_context5.next = 29;
|
3781
4160
|
break;
|
3782
4161
|
case 26:
|
3783
|
-
|
3784
|
-
|
3785
|
-
handleError(
|
4162
|
+
_context5.prev = 26;
|
4163
|
+
_context5.t0 = _context5["catch"](0);
|
4164
|
+
handleError(_context5.t0, "Failed to register derivative with license tokens");
|
3786
4165
|
case 29:
|
3787
4166
|
case "end":
|
3788
|
-
return
|
4167
|
+
return _context5.stop();
|
3789
4168
|
}
|
3790
|
-
},
|
4169
|
+
}, _callee5, this, [[0, 26]]);
|
3791
4170
|
}));
|
3792
|
-
function registerDerivativeWithLicenseTokens(
|
4171
|
+
function registerDerivativeWithLicenseTokens(_x5) {
|
3793
4172
|
return _registerDerivativeWithLicenseTokens.apply(this, arguments);
|
3794
4173
|
}
|
3795
4174
|
return registerDerivativeWithLicenseTokens;
|
@@ -3818,14 +4197,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3818
4197
|
}, {
|
3819
4198
|
key: "mintAndRegisterIpAssetWithPilTerms",
|
3820
4199
|
value: (function () {
|
3821
|
-
var _mintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3822
|
-
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$
|
3823
|
-
return _regeneratorRuntime().wrap(function
|
3824
|
-
while (1) switch (
|
4200
|
+
var _mintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(request) {
|
4201
|
+
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$txOptions9, licenseTerm, object, _request$txOptions10, txHash, txReceipt, iPRegisteredLog, licenseTermsId;
|
4202
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
4203
|
+
while (1) switch (_context6.prev = _context6.next) {
|
3825
4204
|
case 0:
|
3826
|
-
|
4205
|
+
_context6.prev = 0;
|
3827
4206
|
if (!(request.pilType === undefined || request.pilType === null)) {
|
3828
|
-
|
4207
|
+
_context6.next = 3;
|
3829
4208
|
break;
|
3830
4209
|
}
|
3831
4210
|
throw new Error("PIL type is required.");
|
@@ -3847,61 +4226,173 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3847
4226
|
nftMetadataHash: ((_request$ipMetadata8 = request.ipMetadata) === null || _request$ipMetadata8 === void 0 ? void 0 : _request$ipMetadata8.nftMetadataHash) || zeroHash
|
3848
4227
|
}
|
3849
4228
|
};
|
3850
|
-
if (!((_request$
|
3851
|
-
|
4229
|
+
if (!((_request$txOptions9 = request.txOptions) !== null && _request$txOptions9 !== void 0 && _request$txOptions9.encodedTxDataOnly)) {
|
4230
|
+
_context6.next = 9;
|
3852
4231
|
break;
|
3853
4232
|
}
|
3854
|
-
return
|
4233
|
+
return _context6.abrupt("return", {
|
3855
4234
|
encodedTxData: this.licenseAttachmentWorkflowsClient.mintAndRegisterIpAndAttachPilTermsEncode(object)
|
3856
4235
|
});
|
3857
4236
|
case 9:
|
3858
|
-
|
4237
|
+
_context6.next = 11;
|
3859
4238
|
return this.licenseAttachmentWorkflowsClient.mintAndRegisterIpAndAttachPilTerms(object);
|
3860
4239
|
case 11:
|
3861
|
-
txHash =
|
3862
|
-
if (!((_request$
|
3863
|
-
|
4240
|
+
txHash = _context6.sent;
|
4241
|
+
if (!((_request$txOptions10 = request.txOptions) !== null && _request$txOptions10 !== void 0 && _request$txOptions10.waitForTransaction)) {
|
4242
|
+
_context6.next = 19;
|
3864
4243
|
break;
|
3865
4244
|
}
|
3866
|
-
|
4245
|
+
_context6.next = 15;
|
3867
4246
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3868
4247
|
hash: txHash
|
3869
4248
|
}));
|
3870
4249
|
case 15:
|
3871
|
-
txReceipt =
|
3872
|
-
iPRegisteredLog = this.
|
3873
|
-
|
3874
|
-
return
|
3875
|
-
case 19:
|
3876
|
-
licenseTermsId = _context4.sent;
|
3877
|
-
return _context4.abrupt("return", {
|
4250
|
+
txReceipt = _context6.sent;
|
4251
|
+
iPRegisteredLog = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
4252
|
+
licenseTermsId = this.getLicenseTermsId(txReceipt);
|
4253
|
+
return _context6.abrupt("return", {
|
3878
4254
|
txHash: txHash,
|
3879
4255
|
ipId: iPRegisteredLog.ipId,
|
3880
4256
|
licenseTermsId: licenseTermsId,
|
3881
4257
|
tokenId: iPRegisteredLog.tokenId
|
3882
4258
|
});
|
3883
|
-
case
|
3884
|
-
return
|
4259
|
+
case 19:
|
4260
|
+
return _context6.abrupt("return", {
|
3885
4261
|
txHash: txHash
|
3886
4262
|
});
|
3887
|
-
case
|
3888
|
-
|
4263
|
+
case 20:
|
4264
|
+
_context6.next = 25;
|
3889
4265
|
break;
|
3890
|
-
case
|
3891
|
-
|
3892
|
-
|
3893
|
-
handleError(
|
3894
|
-
case
|
4266
|
+
case 22:
|
4267
|
+
_context6.prev = 22;
|
4268
|
+
_context6.t0 = _context6["catch"](0);
|
4269
|
+
handleError(_context6.t0, "Failed to mint and register IP and attach PIL terms");
|
4270
|
+
case 25:
|
3895
4271
|
case "end":
|
3896
|
-
return
|
4272
|
+
return _context6.stop();
|
3897
4273
|
}
|
3898
|
-
},
|
4274
|
+
}, _callee6, this, [[0, 22]]);
|
3899
4275
|
}));
|
3900
|
-
function mintAndRegisterIpAssetWithPilTerms(
|
4276
|
+
function mintAndRegisterIpAssetWithPilTerms(_x6) {
|
3901
4277
|
return _mintAndRegisterIpAssetWithPilTerms.apply(this, arguments);
|
3902
4278
|
}
|
3903
4279
|
return mintAndRegisterIpAssetWithPilTerms;
|
3904
4280
|
}()
|
4281
|
+
/**
|
4282
|
+
* Batch mint an NFT from a collection and register it as an IP.
|
4283
|
+
* @param request - The request object that contains all data needed to batch mint and register ip.
|
4284
|
+
* @param {Array} request.args The array of mint and register IP requests.
|
4285
|
+
* @param request.args.spgNftContract The address of the NFT collection.
|
4286
|
+
* @param request.args.pilType The type of the PIL.
|
4287
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4288
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4289
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4290
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4291
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4292
|
+
* @param request.args.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
4293
|
+
* @param request.args.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4294
|
+
* @param request.args.mintingFee [Optional] The fee to be paid when minting a license.
|
4295
|
+
* @param request.args.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
4296
|
+
* @param request.args.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
4297
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
4298
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes IP ID, Token ID, License Terms Id.
|
4299
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4300
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
4301
|
+
*/
|
4302
|
+
)
|
4303
|
+
}, {
|
4304
|
+
key: "batchMintAndRegisterIpAssetWithPilTerms",
|
4305
|
+
value: (function () {
|
4306
|
+
var _batchMintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(request) {
|
4307
|
+
var _this = this;
|
4308
|
+
var _request$txOptions11, calldata, _iterator4, _step4, arg, result, txHash, txReceipt, licenseTermsEvent, results;
|
4309
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
4310
|
+
while (1) switch (_context7.prev = _context7.next) {
|
4311
|
+
case 0:
|
4312
|
+
_context7.prev = 0;
|
4313
|
+
calldata = [];
|
4314
|
+
_iterator4 = _createForOfIteratorHelper(request.args);
|
4315
|
+
_context7.prev = 3;
|
4316
|
+
_iterator4.s();
|
4317
|
+
case 5:
|
4318
|
+
if ((_step4 = _iterator4.n()).done) {
|
4319
|
+
_context7.next = 13;
|
4320
|
+
break;
|
4321
|
+
}
|
4322
|
+
arg = _step4.value;
|
4323
|
+
_context7.next = 9;
|
4324
|
+
return this.mintAndRegisterIpAssetWithPilTerms(_objectSpread2(_objectSpread2({}, arg), {}, {
|
4325
|
+
txOptions: {
|
4326
|
+
encodedTxDataOnly: true
|
4327
|
+
}
|
4328
|
+
}));
|
4329
|
+
case 9:
|
4330
|
+
result = _context7.sent;
|
4331
|
+
calldata.push(result.encodedTxData.data);
|
4332
|
+
case 11:
|
4333
|
+
_context7.next = 5;
|
4334
|
+
break;
|
4335
|
+
case 13:
|
4336
|
+
_context7.next = 18;
|
4337
|
+
break;
|
4338
|
+
case 15:
|
4339
|
+
_context7.prev = 15;
|
4340
|
+
_context7.t0 = _context7["catch"](3);
|
4341
|
+
_iterator4.e(_context7.t0);
|
4342
|
+
case 18:
|
4343
|
+
_context7.prev = 18;
|
4344
|
+
_iterator4.f();
|
4345
|
+
return _context7.finish(18);
|
4346
|
+
case 21:
|
4347
|
+
_context7.next = 23;
|
4348
|
+
return this.licenseAttachmentWorkflowsClient.multicall({
|
4349
|
+
data: calldata
|
4350
|
+
});
|
4351
|
+
case 23:
|
4352
|
+
txHash = _context7.sent;
|
4353
|
+
if (!((_request$txOptions11 = request.txOptions) !== null && _request$txOptions11 !== void 0 && _request$txOptions11.waitForTransaction)) {
|
4354
|
+
_context7.next = 32;
|
4355
|
+
break;
|
4356
|
+
}
|
4357
|
+
_context7.next = 27;
|
4358
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4359
|
+
hash: txHash
|
4360
|
+
}));
|
4361
|
+
case 27:
|
4362
|
+
txReceipt = _context7.sent;
|
4363
|
+
licenseTermsEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
4364
|
+
results = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
4365
|
+
results = results.map(function (result) {
|
4366
|
+
var licenseTerms = licenseTermsEvent.find(function (event) {
|
4367
|
+
return event.ipId === result.ipId;
|
4368
|
+
});
|
4369
|
+
return _objectSpread2(_objectSpread2({}, result), {}, {
|
4370
|
+
licenseTermsId: (licenseTerms === null || licenseTerms === void 0 ? void 0 : licenseTerms.licenseTermsId) === undefined ? _this.defaultLicenseTermsId : licenseTerms.licenseTermsId
|
4371
|
+
});
|
4372
|
+
});
|
4373
|
+
return _context7.abrupt("return", {
|
4374
|
+
txHash: txHash,
|
4375
|
+
results: results
|
4376
|
+
});
|
4377
|
+
case 32:
|
4378
|
+
return _context7.abrupt("return", {
|
4379
|
+
txHash: txHash
|
4380
|
+
});
|
4381
|
+
case 35:
|
4382
|
+
_context7.prev = 35;
|
4383
|
+
_context7.t1 = _context7["catch"](0);
|
4384
|
+
handleError(_context7.t1, "Failed to batch mint and register IP and attach PIL terms");
|
4385
|
+
case 38:
|
4386
|
+
case "end":
|
4387
|
+
return _context7.stop();
|
4388
|
+
}
|
4389
|
+
}, _callee7, this, [[0, 35], [3, 15, 18, 21]]);
|
4390
|
+
}));
|
4391
|
+
function batchMintAndRegisterIpAssetWithPilTerms(_x7) {
|
4392
|
+
return _batchMintAndRegisterIpAssetWithPilTerms.apply(this, arguments);
|
4393
|
+
}
|
4394
|
+
return batchMintAndRegisterIpAssetWithPilTerms;
|
4395
|
+
}()
|
3905
4396
|
/**
|
3906
4397
|
* Register a given NFT as an IP and attach Programmable IP License Terms.R.
|
3907
4398
|
* @param request - The request object that contains all data needed to mint and register ip.
|
@@ -3914,41 +4405,41 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3914
4405
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3915
4406
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3916
4407
|
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
3917
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
4408
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3918
4409
|
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
3919
4410
|
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
3920
4411
|
* @param request.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
3921
4412
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3922
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID, License Terms Id if waitForTxn is set to true.
|
4413
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID,Token ID, License Terms Id if waitForTxn is set to true.
|
3923
4414
|
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
3924
4415
|
*/
|
3925
4416
|
)
|
3926
4417
|
}, {
|
3927
4418
|
key: "registerIpAndAttachPilTerms",
|
3928
4419
|
value: (function () {
|
3929
|
-
var _registerIpAndAttachPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3930
|
-
var _request$ipMetadata9, _request$ipMetadata10, _request$ipMetadata11, _request$ipMetadata12, _request$
|
3931
|
-
return _regeneratorRuntime().wrap(function
|
3932
|
-
while (1) switch (
|
4420
|
+
var _registerIpAndAttachPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(request) {
|
4421
|
+
var _request$ipMetadata9, _request$ipMetadata10, _request$ipMetadata11, _request$ipMetadata12, _request$txOptions12, ipIdAddress, isRegistered, licenseTerm, blockTimestamp, calculatedDeadline, sigAttachSignature, sigMetadataSignature, object, _request$txOptions13, txHash, txReceipt, ipRegisterEvent, licenseTermsId;
|
4422
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
4423
|
+
while (1) switch (_context8.prev = _context8.next) {
|
3933
4424
|
case 0:
|
3934
|
-
|
4425
|
+
_context8.prev = 0;
|
3935
4426
|
if (!(request.pilType === undefined || request.pilType === null)) {
|
3936
|
-
|
4427
|
+
_context8.next = 3;
|
3937
4428
|
break;
|
3938
4429
|
}
|
3939
4430
|
throw new Error("PIL type is required.");
|
3940
4431
|
case 3:
|
3941
4432
|
request.tokenId = BigInt(request.tokenId);
|
3942
|
-
|
4433
|
+
_context8.next = 6;
|
3943
4434
|
return this.getIpIdAddress(request.nftContract, request.tokenId);
|
3944
4435
|
case 6:
|
3945
|
-
ipIdAddress =
|
3946
|
-
|
4436
|
+
ipIdAddress = _context8.sent;
|
4437
|
+
_context8.next = 9;
|
3947
4438
|
return this.isRegistered(ipIdAddress);
|
3948
4439
|
case 9:
|
3949
|
-
isRegistered =
|
4440
|
+
isRegistered = _context8.sent;
|
3950
4441
|
if (!isRegistered) {
|
3951
|
-
|
4442
|
+
_context8.next = 12;
|
3952
4443
|
break;
|
3953
4444
|
}
|
3954
4445
|
throw new Error("The NFT with id ".concat(request.tokenId, " is already registered as IP."));
|
@@ -3959,8 +4450,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3959
4450
|
royaltyPolicyAddress: request.royaltyPolicyAddress && getAddress$1(request.royaltyPolicyAddress, "request.royaltyPolicyAddress") || royaltyPolicyLapAddress[chain[this.chainId]],
|
3960
4451
|
commercialRevShare: request.commercialRevShare
|
3961
4452
|
});
|
3962
|
-
|
3963
|
-
|
4453
|
+
_context8.next = 15;
|
4454
|
+
return this.rpcClient.getBlock();
|
4455
|
+
case 15:
|
4456
|
+
blockTimestamp = _context8.sent.timestamp;
|
4457
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4458
|
+
_context8.next = 19;
|
3964
4459
|
return getPermissionSignature({
|
3965
4460
|
ipId: ipIdAddress,
|
3966
4461
|
deadline: calculatedDeadline,
|
@@ -3981,9 +4476,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3981
4476
|
func: "function attachLicenseTerms(address,address,uint256)"
|
3982
4477
|
}]
|
3983
4478
|
});
|
3984
|
-
case
|
3985
|
-
sigAttachSignature =
|
3986
|
-
|
4479
|
+
case 19:
|
4480
|
+
sigAttachSignature = _context8.sent;
|
4481
|
+
_context8.next = 22;
|
3987
4482
|
return getPermissionSignature({
|
3988
4483
|
ipId: ipIdAddress,
|
3989
4484
|
deadline: calculatedDeadline,
|
@@ -4000,8 +4495,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4000
4495
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4001
4496
|
}]
|
4002
4497
|
});
|
4003
|
-
case
|
4004
|
-
sigMetadataSignature =
|
4498
|
+
case 22:
|
4499
|
+
sigMetadataSignature = _context8.sent;
|
4005
4500
|
object = {
|
4006
4501
|
nftContract: getAddress$1(request.nftContract, "request.nftContract"),
|
4007
4502
|
tokenId: request.tokenId,
|
@@ -4023,56 +4518,54 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4023
4518
|
signature: sigAttachSignature
|
4024
4519
|
}
|
4025
4520
|
};
|
4026
|
-
if (!((_request$
|
4027
|
-
|
4521
|
+
if (!((_request$txOptions12 = request.txOptions) !== null && _request$txOptions12 !== void 0 && _request$txOptions12.encodedTxDataOnly)) {
|
4522
|
+
_context8.next = 28;
|
4028
4523
|
break;
|
4029
4524
|
}
|
4030
|
-
return
|
4525
|
+
return _context8.abrupt("return", {
|
4031
4526
|
encodedTxData: this.licenseAttachmentWorkflowsClient.registerIpAndAttachPilTermsEncode(object)
|
4032
4527
|
});
|
4033
|
-
case
|
4034
|
-
|
4528
|
+
case 28:
|
4529
|
+
_context8.next = 30;
|
4035
4530
|
return this.licenseAttachmentWorkflowsClient.registerIpAndAttachPilTerms(object);
|
4036
|
-
case
|
4037
|
-
txHash =
|
4038
|
-
if (!((_request$
|
4039
|
-
|
4531
|
+
case 30:
|
4532
|
+
txHash = _context8.sent;
|
4533
|
+
if (!((_request$txOptions13 = request.txOptions) !== null && _request$txOptions13 !== void 0 && _request$txOptions13.waitForTransaction)) {
|
4534
|
+
_context8.next = 38;
|
4040
4535
|
break;
|
4041
4536
|
}
|
4042
|
-
|
4537
|
+
_context8.next = 34;
|
4043
4538
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4044
4539
|
hash: txHash
|
4045
4540
|
}));
|
4046
|
-
case
|
4047
|
-
txReceipt =
|
4048
|
-
ipRegisterEvent = this.
|
4049
|
-
|
4050
|
-
return
|
4051
|
-
case 35:
|
4052
|
-
licenseTermsId = _context5.sent;
|
4053
|
-
return _context5.abrupt("return", {
|
4541
|
+
case 34:
|
4542
|
+
txReceipt = _context8.sent;
|
4543
|
+
ipRegisterEvent = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
4544
|
+
licenseTermsId = this.getLicenseTermsId(txReceipt);
|
4545
|
+
return _context8.abrupt("return", {
|
4054
4546
|
txHash: txHash,
|
4055
4547
|
licenseTermsId: licenseTermsId,
|
4056
|
-
ipId: ipRegisterEvent
|
4548
|
+
ipId: ipRegisterEvent.ipId,
|
4549
|
+
tokenId: ipRegisterEvent.tokenId
|
4057
4550
|
});
|
4058
|
-
case
|
4059
|
-
return
|
4551
|
+
case 38:
|
4552
|
+
return _context8.abrupt("return", {
|
4060
4553
|
txHash: txHash
|
4061
4554
|
});
|
4062
|
-
case
|
4063
|
-
|
4555
|
+
case 39:
|
4556
|
+
_context8.next = 44;
|
4064
4557
|
break;
|
4065
|
-
case
|
4066
|
-
|
4067
|
-
|
4068
|
-
handleError(
|
4069
|
-
case
|
4558
|
+
case 41:
|
4559
|
+
_context8.prev = 41;
|
4560
|
+
_context8.t0 = _context8["catch"](0);
|
4561
|
+
handleError(_context8.t0, "Failed to register IP and attach PIL terms");
|
4562
|
+
case 44:
|
4070
4563
|
case "end":
|
4071
|
-
return
|
4564
|
+
return _context8.stop();
|
4072
4565
|
}
|
4073
|
-
},
|
4566
|
+
}, _callee8, this, [[0, 41]]);
|
4074
4567
|
}));
|
4075
|
-
function registerIpAndAttachPilTerms(
|
4568
|
+
function registerIpAndAttachPilTerms(_x8) {
|
4076
4569
|
return _registerIpAndAttachPilTerms.apply(this, arguments);
|
4077
4570
|
}
|
4078
4571
|
return registerIpAndAttachPilTerms;
|
@@ -4091,38 +4584,38 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4091
4584
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4092
4585
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4093
4586
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4094
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
4587
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
4095
4588
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4096
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
4589
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID, token ID if waitForTxn is set to true.
|
4097
4590
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4098
4591
|
*/
|
4099
4592
|
)
|
4100
4593
|
}, {
|
4101
4594
|
key: "registerDerivativeIp",
|
4102
4595
|
value: (function () {
|
4103
|
-
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4104
|
-
var _request$ipMetadata13, _request$ipMetadata14, _request$ipMetadata15, _request$ipMetadata16, _request$
|
4105
|
-
return _regeneratorRuntime().wrap(function
|
4106
|
-
while (1) switch (
|
4596
|
+
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(request) {
|
4597
|
+
var _request$ipMetadata13, _request$ipMetadata14, _request$ipMetadata15, _request$ipMetadata16, _request$txOptions14, tokenId, ipIdAddress, isRegistered, i, isAttachedLicenseTerms, blockTimestamp, calculatedDeadline, sigRegisterSignature, object, sigMetadataSignature, _request$txOptions15, txHash, receipt, log;
|
4598
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
4599
|
+
while (1) switch (_context9.prev = _context9.next) {
|
4107
4600
|
case 0:
|
4108
|
-
|
4601
|
+
_context9.prev = 0;
|
4109
4602
|
tokenId = BigInt(request.tokenId);
|
4110
|
-
|
4603
|
+
_context9.next = 4;
|
4111
4604
|
return this.getIpIdAddress(request.nftContract, tokenId);
|
4112
4605
|
case 4:
|
4113
|
-
ipIdAddress =
|
4114
|
-
|
4606
|
+
ipIdAddress = _context9.sent;
|
4607
|
+
_context9.next = 7;
|
4115
4608
|
return this.isRegistered(ipIdAddress);
|
4116
4609
|
case 7:
|
4117
|
-
isRegistered =
|
4610
|
+
isRegistered = _context9.sent;
|
4118
4611
|
if (!isRegistered) {
|
4119
|
-
|
4612
|
+
_context9.next = 10;
|
4120
4613
|
break;
|
4121
4614
|
}
|
4122
4615
|
throw new Error("The NFT with id ".concat(tokenId, " is already registered as IP."));
|
4123
4616
|
case 10:
|
4124
4617
|
if (!(request.derivData.parentIpIds.length !== request.derivData.licenseTermsIds.length)) {
|
4125
|
-
|
4618
|
+
_context9.next = 12;
|
4126
4619
|
break;
|
4127
4620
|
}
|
4128
4621
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -4130,29 +4623,33 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4130
4623
|
i = 0;
|
4131
4624
|
case 13:
|
4132
4625
|
if (!(i < request.derivData.parentIpIds.length)) {
|
4133
|
-
|
4626
|
+
_context9.next = 22;
|
4134
4627
|
break;
|
4135
4628
|
}
|
4136
|
-
|
4629
|
+
_context9.next = 16;
|
4137
4630
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
4138
4631
|
ipId: getAddress$1(request.derivData.parentIpIds[i], "request.derivData.parentIpIds"),
|
4139
4632
|
licenseTemplate: request.derivData.licenseTemplate && getAddress$1(request.derivData.licenseTemplate, "request.derivData.licenseTemplate") || this.licenseTemplateClient.address,
|
4140
4633
|
licenseTermsId: BigInt(request.derivData.licenseTermsIds[i])
|
4141
4634
|
});
|
4142
4635
|
case 16:
|
4143
|
-
isAttachedLicenseTerms =
|
4636
|
+
isAttachedLicenseTerms = _context9.sent;
|
4144
4637
|
if (isAttachedLicenseTerms) {
|
4145
|
-
|
4638
|
+
_context9.next = 19;
|
4146
4639
|
break;
|
4147
4640
|
}
|
4148
4641
|
throw new Error("License terms id ".concat(request.derivData.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.derivData.parentIpIds[i], " before registering derivative."));
|
4149
4642
|
case 19:
|
4150
4643
|
i++;
|
4151
|
-
|
4644
|
+
_context9.next = 13;
|
4152
4645
|
break;
|
4153
4646
|
case 22:
|
4154
|
-
|
4155
|
-
|
4647
|
+
_context9.next = 24;
|
4648
|
+
return this.rpcClient.getBlock();
|
4649
|
+
case 24:
|
4650
|
+
blockTimestamp = _context9.sent.timestamp;
|
4651
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4652
|
+
_context9.next = 28;
|
4156
4653
|
return getPermissionSignature({
|
4157
4654
|
ipId: ipIdAddress,
|
4158
4655
|
deadline: calculatedDeadline,
|
@@ -4173,8 +4670,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4173
4670
|
func: "function registerDerivative(address,address[],uint256[],address,bytes)"
|
4174
4671
|
}]
|
4175
4672
|
});
|
4176
|
-
case
|
4177
|
-
sigRegisterSignature =
|
4673
|
+
case 28:
|
4674
|
+
sigRegisterSignature = _context9.sent;
|
4178
4675
|
object = {
|
4179
4676
|
nftContract: getAddress$1(request.nftContract, "request.nftContract"),
|
4180
4677
|
tokenId: BigInt(request.tokenId),
|
@@ -4205,7 +4702,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4205
4702
|
signature: zeroHash
|
4206
4703
|
}
|
4207
4704
|
};
|
4208
|
-
|
4705
|
+
_context9.next = 32;
|
4209
4706
|
return getPermissionSignature({
|
4210
4707
|
ipId: ipIdAddress,
|
4211
4708
|
deadline: calculatedDeadline,
|
@@ -4222,58 +4719,59 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4222
4719
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4223
4720
|
}]
|
4224
4721
|
});
|
4225
|
-
case
|
4226
|
-
sigMetadataSignature =
|
4722
|
+
case 32:
|
4723
|
+
sigMetadataSignature = _context9.sent;
|
4227
4724
|
object.sigMetadata = {
|
4228
4725
|
signer: getAddress$1(this.wallet.account.address, "wallet.account.address"),
|
4229
4726
|
deadline: calculatedDeadline,
|
4230
4727
|
signature: sigMetadataSignature
|
4231
4728
|
};
|
4232
|
-
if (!((_request$
|
4233
|
-
|
4729
|
+
if (!((_request$txOptions14 = request.txOptions) !== null && _request$txOptions14 !== void 0 && _request$txOptions14.encodedTxDataOnly)) {
|
4730
|
+
_context9.next = 38;
|
4234
4731
|
break;
|
4235
4732
|
}
|
4236
|
-
return
|
4733
|
+
return _context9.abrupt("return", {
|
4237
4734
|
encodedTxData: this.derivativeWorkflowsClient.registerIpAndMakeDerivativeEncode(object)
|
4238
4735
|
});
|
4239
|
-
case
|
4240
|
-
|
4736
|
+
case 38:
|
4737
|
+
_context9.next = 40;
|
4241
4738
|
return this.derivativeWorkflowsClient.registerIpAndMakeDerivative(object);
|
4242
|
-
case
|
4243
|
-
txHash =
|
4244
|
-
if (!((_request$
|
4245
|
-
|
4739
|
+
case 40:
|
4740
|
+
txHash = _context9.sent;
|
4741
|
+
if (!((_request$txOptions15 = request.txOptions) !== null && _request$txOptions15 !== void 0 && _request$txOptions15.waitForTransaction)) {
|
4742
|
+
_context9.next = 47;
|
4246
4743
|
break;
|
4247
4744
|
}
|
4248
|
-
|
4745
|
+
_context9.next = 44;
|
4249
4746
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4250
4747
|
hash: txHash
|
4251
4748
|
}));
|
4252
|
-
case
|
4253
|
-
receipt =
|
4254
|
-
log = this.
|
4255
|
-
return
|
4749
|
+
case 44:
|
4750
|
+
receipt = _context9.sent;
|
4751
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
4752
|
+
return _context9.abrupt("return", {
|
4256
4753
|
txHash: txHash,
|
4257
|
-
ipId: log.ipId
|
4754
|
+
ipId: log.ipId,
|
4755
|
+
tokenId: log.tokenId
|
4258
4756
|
});
|
4259
|
-
case
|
4260
|
-
return
|
4757
|
+
case 47:
|
4758
|
+
return _context9.abrupt("return", {
|
4261
4759
|
txHash: txHash
|
4262
4760
|
});
|
4263
|
-
case
|
4264
|
-
|
4761
|
+
case 48:
|
4762
|
+
_context9.next = 53;
|
4265
4763
|
break;
|
4266
|
-
case 47:
|
4267
|
-
_context6.prev = 47;
|
4268
|
-
_context6.t0 = _context6["catch"](0);
|
4269
|
-
handleError(_context6.t0, "Failed to register derivative IP");
|
4270
4764
|
case 50:
|
4765
|
+
_context9.prev = 50;
|
4766
|
+
_context9.t0 = _context9["catch"](0);
|
4767
|
+
handleError(_context9.t0, "Failed to register derivative IP");
|
4768
|
+
case 53:
|
4271
4769
|
case "end":
|
4272
|
-
return
|
4770
|
+
return _context9.stop();
|
4273
4771
|
}
|
4274
|
-
},
|
4772
|
+
}, _callee9, this, [[0, 50]]);
|
4275
4773
|
}));
|
4276
|
-
function registerDerivativeIp(
|
4774
|
+
function registerDerivativeIp(_x9) {
|
4277
4775
|
return _registerDerivativeIp.apply(this, arguments);
|
4278
4776
|
}
|
4279
4777
|
return registerDerivativeIp;
|
@@ -4283,14 +4781,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4283
4781
|
* @param request - The request object that contains all data needed to mint and register ip and make derivative.
|
4284
4782
|
* @param request.spgNftContract The address of the NFT collection.
|
4285
4783
|
* @param request.derivData The derivative data to be used for registerDerivative.
|
4286
|
-
*
|
4287
|
-
*
|
4288
|
-
*
|
4784
|
+
* @param request.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
4785
|
+
* @param request.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
4786
|
+
* @param request.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
4289
4787
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4290
|
-
*
|
4291
|
-
*
|
4292
|
-
*
|
4293
|
-
*
|
4788
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4789
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4790
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4791
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4294
4792
|
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4295
4793
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4296
4794
|
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes child ip id and token id.
|
@@ -4300,14 +4798,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4300
4798
|
}, {
|
4301
4799
|
key: "mintAndRegisterIpAndMakeDerivative",
|
4302
4800
|
value: (function () {
|
4303
|
-
var _mintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4304
|
-
var _request$ipMetadata17, _request$ipMetadata18, _request$ipMetadata19, _request$ipMetadata20, _request$
|
4305
|
-
return _regeneratorRuntime().wrap(function
|
4306
|
-
while (1) switch (
|
4801
|
+
var _mintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(request) {
|
4802
|
+
var _request$ipMetadata17, _request$ipMetadata18, _request$ipMetadata19, _request$ipMetadata20, _request$txOptions16, i, isAttachedLicenseTerms, object, _request$txOptions17, txHash, receipt, log;
|
4803
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
4804
|
+
while (1) switch (_context10.prev = _context10.next) {
|
4307
4805
|
case 0:
|
4308
|
-
|
4806
|
+
_context10.prev = 0;
|
4309
4807
|
if (!(request.derivData.parentIpIds.length !== request.derivData.licenseTermsIds.length)) {
|
4310
|
-
|
4808
|
+
_context10.next = 3;
|
4311
4809
|
break;
|
4312
4810
|
}
|
4313
4811
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -4315,25 +4813,25 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4315
4813
|
i = 0;
|
4316
4814
|
case 4:
|
4317
4815
|
if (!(i < request.derivData.parentIpIds.length)) {
|
4318
|
-
|
4816
|
+
_context10.next = 13;
|
4319
4817
|
break;
|
4320
4818
|
}
|
4321
|
-
|
4819
|
+
_context10.next = 7;
|
4322
4820
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
4323
4821
|
ipId: getAddress$1(request.derivData.parentIpIds[i], "request.derivData.parentIpIds"),
|
4324
4822
|
licenseTemplate: request.derivData.licenseTemplate && getAddress$1(request.derivData.licenseTemplate, "request.derivData.licenseTemplate") || this.licenseTemplateClient.address,
|
4325
4823
|
licenseTermsId: BigInt(request.derivData.licenseTermsIds[i])
|
4326
4824
|
});
|
4327
4825
|
case 7:
|
4328
|
-
isAttachedLicenseTerms =
|
4826
|
+
isAttachedLicenseTerms = _context10.sent;
|
4329
4827
|
if (isAttachedLicenseTerms) {
|
4330
|
-
|
4828
|
+
_context10.next = 10;
|
4331
4829
|
break;
|
4332
4830
|
}
|
4333
4831
|
throw new Error("License terms id ".concat(request.derivData.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.derivData.parentIpIds[i], " before registering derivative."));
|
4334
4832
|
case 10:
|
4335
4833
|
i++;
|
4336
|
-
|
4834
|
+
_context10.next = 4;
|
4337
4835
|
break;
|
4338
4836
|
case 13:
|
4339
4837
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
@@ -4352,55 +4850,164 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4352
4850
|
},
|
4353
4851
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address
|
4354
4852
|
});
|
4355
|
-
if (!((_request$
|
4356
|
-
|
4853
|
+
if (!((_request$txOptions16 = request.txOptions) !== null && _request$txOptions16 !== void 0 && _request$txOptions16.encodedTxDataOnly)) {
|
4854
|
+
_context10.next = 18;
|
4357
4855
|
break;
|
4358
4856
|
}
|
4359
|
-
return
|
4857
|
+
return _context10.abrupt("return", {
|
4360
4858
|
encodedTxData: this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeEncode(object)
|
4361
4859
|
});
|
4362
4860
|
case 18:
|
4363
|
-
|
4861
|
+
_context10.next = 20;
|
4364
4862
|
return this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivative(object);
|
4365
4863
|
case 20:
|
4366
|
-
txHash =
|
4367
|
-
if (!((_request$
|
4368
|
-
|
4864
|
+
txHash = _context10.sent;
|
4865
|
+
if (!((_request$txOptions17 = request.txOptions) !== null && _request$txOptions17 !== void 0 && _request$txOptions17.waitForTransaction)) {
|
4866
|
+
_context10.next = 27;
|
4369
4867
|
break;
|
4370
4868
|
}
|
4371
|
-
|
4869
|
+
_context10.next = 24;
|
4372
4870
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4373
4871
|
hash: txHash
|
4374
4872
|
}));
|
4375
4873
|
case 24:
|
4376
|
-
receipt =
|
4377
|
-
log = this.
|
4378
|
-
return
|
4874
|
+
receipt = _context10.sent;
|
4875
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
4876
|
+
return _context10.abrupt("return", {
|
4379
4877
|
txHash: txHash,
|
4380
4878
|
childIpId: log.ipId,
|
4381
4879
|
tokenId: log.tokenId
|
4382
4880
|
});
|
4383
4881
|
case 27:
|
4384
|
-
return
|
4882
|
+
return _context10.abrupt("return", {
|
4883
|
+
txHash: txHash
|
4884
|
+
});
|
4885
|
+
case 28:
|
4886
|
+
_context10.next = 33;
|
4887
|
+
break;
|
4888
|
+
case 30:
|
4889
|
+
_context10.prev = 30;
|
4890
|
+
_context10.t0 = _context10["catch"](0);
|
4891
|
+
handleError(_context10.t0, "Failed to mint and register IP and make derivative");
|
4892
|
+
case 33:
|
4893
|
+
case "end":
|
4894
|
+
return _context10.stop();
|
4895
|
+
}
|
4896
|
+
}, _callee10, this, [[0, 30]]);
|
4897
|
+
}));
|
4898
|
+
function mintAndRegisterIpAndMakeDerivative(_x10) {
|
4899
|
+
return _mintAndRegisterIpAndMakeDerivative.apply(this, arguments);
|
4900
|
+
}
|
4901
|
+
return mintAndRegisterIpAndMakeDerivative;
|
4902
|
+
}()
|
4903
|
+
/**
|
4904
|
+
* Batch mint an NFT from a collection and register it as a derivative IP without license tokens.
|
4905
|
+
* @param request - The request object that contains all data needed to batch mint and register ip and make derivative.
|
4906
|
+
* @param {Array} request.args The array of mint and register IP requests.
|
4907
|
+
* @param request.args.spgNftContract The address of the NFT collection.
|
4908
|
+
* @param request.args.derivData The derivative data to be used for registerDerivative.
|
4909
|
+
* @param request.args.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
4910
|
+
* @param request.args.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
4911
|
+
* @param request.args.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
4912
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4913
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4914
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4915
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4916
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4917
|
+
* @param request.arg.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4918
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
4919
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes child ip id and token id.
|
4920
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4921
|
+
*/
|
4922
|
+
)
|
4923
|
+
}, {
|
4924
|
+
key: "batchMintAndRegisterIpAndMakeDerivative",
|
4925
|
+
value: (function () {
|
4926
|
+
var _batchMintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(request) {
|
4927
|
+
var _request$txOptions18, calldata, _iterator5, _step5, arg, result, txHash, txReceipt;
|
4928
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
4929
|
+
while (1) switch (_context11.prev = _context11.next) {
|
4930
|
+
case 0:
|
4931
|
+
_context11.prev = 0;
|
4932
|
+
calldata = [];
|
4933
|
+
_iterator5 = _createForOfIteratorHelper(request.args);
|
4934
|
+
_context11.prev = 3;
|
4935
|
+
_iterator5.s();
|
4936
|
+
case 5:
|
4937
|
+
if ((_step5 = _iterator5.n()).done) {
|
4938
|
+
_context11.next = 19;
|
4939
|
+
break;
|
4940
|
+
}
|
4941
|
+
arg = _step5.value;
|
4942
|
+
_context11.prev = 7;
|
4943
|
+
_context11.next = 10;
|
4944
|
+
return this.mintAndRegisterIpAndMakeDerivative(_objectSpread2(_objectSpread2({}, arg), {}, {
|
4945
|
+
txOptions: {
|
4946
|
+
encodedTxDataOnly: true
|
4947
|
+
}
|
4948
|
+
}));
|
4949
|
+
case 10:
|
4950
|
+
result = _context11.sent;
|
4951
|
+
calldata.push(result.encodedTxData.data);
|
4952
|
+
_context11.next = 17;
|
4953
|
+
break;
|
4954
|
+
case 14:
|
4955
|
+
_context11.prev = 14;
|
4956
|
+
_context11.t0 = _context11["catch"](7);
|
4957
|
+
throw new Error(_context11.t0.message.replace("Failed to mint and register IP and make derivative: ", "").trim());
|
4958
|
+
case 17:
|
4959
|
+
_context11.next = 5;
|
4960
|
+
break;
|
4961
|
+
case 19:
|
4962
|
+
_context11.next = 24;
|
4963
|
+
break;
|
4964
|
+
case 21:
|
4965
|
+
_context11.prev = 21;
|
4966
|
+
_context11.t1 = _context11["catch"](3);
|
4967
|
+
_iterator5.e(_context11.t1);
|
4968
|
+
case 24:
|
4969
|
+
_context11.prev = 24;
|
4970
|
+
_iterator5.f();
|
4971
|
+
return _context11.finish(24);
|
4972
|
+
case 27:
|
4973
|
+
_context11.next = 29;
|
4974
|
+
return this.derivativeWorkflowsClient.multicall({
|
4975
|
+
data: calldata
|
4976
|
+
});
|
4977
|
+
case 29:
|
4978
|
+
txHash = _context11.sent;
|
4979
|
+
if (!((_request$txOptions18 = request.txOptions) !== null && _request$txOptions18 !== void 0 && _request$txOptions18.waitForTransaction)) {
|
4980
|
+
_context11.next = 35;
|
4981
|
+
break;
|
4982
|
+
}
|
4983
|
+
_context11.next = 33;
|
4984
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4985
|
+
hash: txHash
|
4986
|
+
}));
|
4987
|
+
case 33:
|
4988
|
+
txReceipt = _context11.sent;
|
4989
|
+
return _context11.abrupt("return", {
|
4990
|
+
txHash: txHash,
|
4991
|
+
results: this.getIpIdAndTokenIdFromEvent(txReceipt)
|
4992
|
+
});
|
4993
|
+
case 35:
|
4994
|
+
return _context11.abrupt("return", {
|
4385
4995
|
txHash: txHash
|
4386
4996
|
});
|
4387
|
-
case
|
4388
|
-
|
4389
|
-
|
4390
|
-
|
4391
|
-
|
4392
|
-
_context7.t0 = _context7["catch"](0);
|
4393
|
-
handleError(_context7.t0, "Failed to mint and register IP and make derivative");
|
4394
|
-
case 33:
|
4997
|
+
case 38:
|
4998
|
+
_context11.prev = 38;
|
4999
|
+
_context11.t2 = _context11["catch"](0);
|
5000
|
+
handleError(_context11.t2, "Failed to batch mint and register IP and make derivative");
|
5001
|
+
case 41:
|
4395
5002
|
case "end":
|
4396
|
-
return
|
5003
|
+
return _context11.stop();
|
4397
5004
|
}
|
4398
|
-
},
|
5005
|
+
}, _callee11, this, [[0, 38], [3, 21, 24, 27], [7, 14]]);
|
4399
5006
|
}));
|
4400
|
-
function
|
4401
|
-
return
|
5007
|
+
function batchMintAndRegisterIpAndMakeDerivative(_x11) {
|
5008
|
+
return _batchMintAndRegisterIpAndMakeDerivative.apply(this, arguments);
|
4402
5009
|
}
|
4403
|
-
return
|
5010
|
+
return batchMintAndRegisterIpAndMakeDerivative;
|
4404
5011
|
}()
|
4405
5012
|
/**
|
4406
5013
|
* Mint an NFT from a SPGNFT collection and register it with metadata as an IP.
|
@@ -4420,12 +5027,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4420
5027
|
}, {
|
4421
5028
|
key: "mintAndRegisterIp",
|
4422
5029
|
value: (function () {
|
4423
|
-
var _mintAndRegisterIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4424
|
-
var _request$ipMetadata21, _request$ipMetadata22, _request$ipMetadata23, _request$ipMetadata24, _request$
|
4425
|
-
return _regeneratorRuntime().wrap(function
|
4426
|
-
while (1) switch (
|
5030
|
+
var _mintAndRegisterIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(request) {
|
5031
|
+
var _request$ipMetadata21, _request$ipMetadata22, _request$ipMetadata23, _request$ipMetadata24, _request$txOptions19, object, _request$txOptions20, txHash, txReceipt, ipRegisterEvent;
|
5032
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
5033
|
+
while (1) switch (_context12.prev = _context12.next) {
|
4427
5034
|
case 0:
|
4428
|
-
|
5035
|
+
_context12.prev = 0;
|
4429
5036
|
object = {
|
4430
5037
|
spgNftContract: getAddress$1(request.spgNftContract, "request.spgNftContract"),
|
4431
5038
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address,
|
@@ -4436,52 +5043,52 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4436
5043
|
nftMetadataHash: ((_request$ipMetadata24 = request.ipMetadata) === null || _request$ipMetadata24 === void 0 ? void 0 : _request$ipMetadata24.nftMetadataHash) || zeroHash
|
4437
5044
|
}
|
4438
5045
|
};
|
4439
|
-
if (!((_request$
|
4440
|
-
|
5046
|
+
if (!((_request$txOptions19 = request.txOptions) !== null && _request$txOptions19 !== void 0 && _request$txOptions19.encodedTxDataOnly)) {
|
5047
|
+
_context12.next = 6;
|
4441
5048
|
break;
|
4442
5049
|
}
|
4443
|
-
return
|
5050
|
+
return _context12.abrupt("return", {
|
4444
5051
|
encodedTxData: this.registrationWorkflowsClient.mintAndRegisterIpEncode(object)
|
4445
5052
|
});
|
4446
5053
|
case 6:
|
4447
|
-
|
5054
|
+
_context12.next = 8;
|
4448
5055
|
return this.registrationWorkflowsClient.mintAndRegisterIp(object);
|
4449
5056
|
case 8:
|
4450
|
-
txHash =
|
4451
|
-
if (!((_request$
|
4452
|
-
|
5057
|
+
txHash = _context12.sent;
|
5058
|
+
if (!((_request$txOptions20 = request.txOptions) !== null && _request$txOptions20 !== void 0 && _request$txOptions20.waitForTransaction)) {
|
5059
|
+
_context12.next = 15;
|
4453
5060
|
break;
|
4454
5061
|
}
|
4455
|
-
|
5062
|
+
_context12.next = 12;
|
4456
5063
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4457
5064
|
hash: txHash
|
4458
5065
|
}));
|
4459
5066
|
case 12:
|
4460
|
-
txReceipt =
|
4461
|
-
ipRegisterEvent = this.
|
4462
|
-
return
|
5067
|
+
txReceipt = _context12.sent;
|
5068
|
+
ipRegisterEvent = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
5069
|
+
return _context12.abrupt("return", {
|
4463
5070
|
txHash: txHash,
|
4464
5071
|
ipId: ipRegisterEvent[0].ipId,
|
4465
5072
|
tokenId: ipRegisterEvent[0].tokenId
|
4466
5073
|
});
|
4467
5074
|
case 15:
|
4468
|
-
return
|
5075
|
+
return _context12.abrupt("return", {
|
4469
5076
|
txHash: txHash
|
4470
5077
|
});
|
4471
5078
|
case 16:
|
4472
|
-
|
5079
|
+
_context12.next = 21;
|
4473
5080
|
break;
|
4474
5081
|
case 18:
|
4475
|
-
|
4476
|
-
|
4477
|
-
handleError(
|
5082
|
+
_context12.prev = 18;
|
5083
|
+
_context12.t0 = _context12["catch"](0);
|
5084
|
+
handleError(_context12.t0, "Failed to mint and register IP");
|
4478
5085
|
case 21:
|
4479
5086
|
case "end":
|
4480
|
-
return
|
5087
|
+
return _context12.stop();
|
4481
5088
|
}
|
4482
|
-
},
|
5089
|
+
}, _callee12, this, [[0, 18]]);
|
4483
5090
|
}));
|
4484
|
-
function mintAndRegisterIp(
|
5091
|
+
function mintAndRegisterIp(_x12) {
|
4485
5092
|
return _mintAndRegisterIp.apply(this, arguments);
|
4486
5093
|
}
|
4487
5094
|
return mintAndRegisterIp;
|
@@ -4508,7 +5115,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4508
5115
|
* @param request.terms.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
4509
5116
|
* @param request.terms.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
4510
5117
|
* @param request.terms.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
4511
|
-
* @param request.deadline [Optional] The deadline for the signature in milliseconds,default is
|
5118
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000s.
|
4512
5119
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4513
5120
|
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, and if waitForTransaction is true, includes license terms id.
|
4514
5121
|
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
@@ -4517,41 +5124,45 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4517
5124
|
}, {
|
4518
5125
|
key: "registerPilTermsAndAttach",
|
4519
5126
|
value: (function () {
|
4520
|
-
var _registerPilTermsAndAttach = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4521
|
-
var _request$
|
4522
|
-
return _regeneratorRuntime().wrap(function
|
4523
|
-
while (1) switch (
|
5127
|
+
var _registerPilTermsAndAttach = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(request) {
|
5128
|
+
var _request$txOptions21, ipId, terms, isRegistered, licenseTerms, licenseRes, blockTimestamp, calculatedDeadline, ipAccount, _yield$ipAccount$stat2, state, sigAttachSignature, object, _request$txOptions22, txHash;
|
5129
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
5130
|
+
while (1) switch (_context13.prev = _context13.next) {
|
4524
5131
|
case 0:
|
4525
|
-
|
5132
|
+
_context13.prev = 0;
|
4526
5133
|
ipId = request.ipId, terms = request.terms;
|
4527
|
-
|
5134
|
+
_context13.next = 4;
|
4528
5135
|
return this.isRegistered(ipId);
|
4529
5136
|
case 4:
|
4530
|
-
isRegistered =
|
5137
|
+
isRegistered = _context13.sent;
|
4531
5138
|
if (isRegistered) {
|
4532
|
-
|
5139
|
+
_context13.next = 7;
|
4533
5140
|
break;
|
4534
5141
|
}
|
4535
5142
|
throw new Error("The IP with id ".concat(ipId, " is not registered."));
|
4536
5143
|
case 7:
|
4537
|
-
|
5144
|
+
_context13.next = 9;
|
4538
5145
|
return validateLicenseTerms(terms, this.rpcClient);
|
4539
5146
|
case 9:
|
4540
|
-
licenseTerms =
|
4541
|
-
|
5147
|
+
licenseTerms = _context13.sent;
|
5148
|
+
_context13.next = 12;
|
4542
5149
|
return this.licenseTemplateClient.getLicenseTermsId({
|
4543
5150
|
terms: licenseTerms
|
4544
5151
|
});
|
4545
5152
|
case 12:
|
4546
|
-
licenseRes =
|
4547
|
-
|
5153
|
+
licenseRes = _context13.sent;
|
5154
|
+
_context13.next = 15;
|
5155
|
+
return this.rpcClient.getBlock();
|
5156
|
+
case 15:
|
5157
|
+
blockTimestamp = _context13.sent.timestamp;
|
5158
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4548
5159
|
ipAccount = new IpAccountImplClient(this.rpcClient, this.wallet, ipId);
|
4549
|
-
|
5160
|
+
_context13.next = 20;
|
4550
5161
|
return ipAccount.state();
|
4551
|
-
case
|
4552
|
-
_yield$ipAccount$
|
4553
|
-
state = _yield$ipAccount$
|
4554
|
-
|
5162
|
+
case 20:
|
5163
|
+
_yield$ipAccount$stat2 = _context13.sent;
|
5164
|
+
state = _yield$ipAccount$stat2.result;
|
5165
|
+
_context13.next = 24;
|
4555
5166
|
return getPermissionSignature({
|
4556
5167
|
ipId: ipId,
|
4557
5168
|
deadline: calculatedDeadline,
|
@@ -4566,8 +5177,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4566
5177
|
func: "function attachLicenseTerms(address,address,uint256)"
|
4567
5178
|
}]
|
4568
5179
|
});
|
4569
|
-
case
|
4570
|
-
sigAttachSignature =
|
5180
|
+
case 24:
|
5181
|
+
sigAttachSignature = _context13.sent;
|
4571
5182
|
object = {
|
4572
5183
|
ipId: ipId,
|
4573
5184
|
terms: licenseTerms,
|
@@ -4577,49 +5188,49 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4577
5188
|
signature: sigAttachSignature
|
4578
5189
|
}
|
4579
5190
|
};
|
4580
|
-
if (!((_request$
|
4581
|
-
|
5191
|
+
if (!((_request$txOptions21 = request.txOptions) !== null && _request$txOptions21 !== void 0 && _request$txOptions21.encodedTxDataOnly)) {
|
5192
|
+
_context13.next = 30;
|
4582
5193
|
break;
|
4583
5194
|
}
|
4584
|
-
return
|
5195
|
+
return _context13.abrupt("return", {
|
4585
5196
|
encodedTxData: this.licenseAttachmentWorkflowsClient.registerPilTermsAndAttachEncode(object)
|
4586
5197
|
});
|
4587
|
-
case
|
4588
|
-
|
5198
|
+
case 30:
|
5199
|
+
_context13.next = 32;
|
4589
5200
|
return this.licenseAttachmentWorkflowsClient.registerPilTermsAndAttach(object);
|
4590
|
-
case
|
4591
|
-
txHash =
|
4592
|
-
if (!((_request$
|
4593
|
-
|
5201
|
+
case 32:
|
5202
|
+
txHash = _context13.sent;
|
5203
|
+
if (!((_request$txOptions22 = request.txOptions) !== null && _request$txOptions22 !== void 0 && _request$txOptions22.waitForTransaction)) {
|
5204
|
+
_context13.next = 39;
|
4594
5205
|
break;
|
4595
5206
|
}
|
4596
|
-
|
5207
|
+
_context13.next = 36;
|
4597
5208
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4598
5209
|
hash: txHash
|
4599
5210
|
}));
|
4600
|
-
case
|
4601
|
-
return
|
5211
|
+
case 36:
|
5212
|
+
return _context13.abrupt("return", {
|
4602
5213
|
txHash: txHash,
|
4603
5214
|
licenseTermsId: licenseRes.selectedLicenseTermsId
|
4604
5215
|
});
|
4605
|
-
case
|
4606
|
-
return
|
5216
|
+
case 39:
|
5217
|
+
return _context13.abrupt("return", {
|
4607
5218
|
txHash: txHash
|
4608
5219
|
});
|
4609
|
-
case
|
4610
|
-
|
5220
|
+
case 40:
|
5221
|
+
_context13.next = 45;
|
4611
5222
|
break;
|
4612
|
-
case 39:
|
4613
|
-
_context9.prev = 39;
|
4614
|
-
_context9.t0 = _context9["catch"](0);
|
4615
|
-
handleError(_context9.t0, "Failed to register PIL terms and attach");
|
4616
5223
|
case 42:
|
5224
|
+
_context13.prev = 42;
|
5225
|
+
_context13.t0 = _context13["catch"](0);
|
5226
|
+
handleError(_context13.t0, "Failed to register PIL terms and attach");
|
5227
|
+
case 45:
|
4617
5228
|
case "end":
|
4618
|
-
return
|
5229
|
+
return _context13.stop();
|
4619
5230
|
}
|
4620
|
-
},
|
5231
|
+
}, _callee13, this, [[0, 42]]);
|
4621
5232
|
}));
|
4622
|
-
function registerPilTermsAndAttach(
|
5233
|
+
function registerPilTermsAndAttach(_x13) {
|
4623
5234
|
return _registerPilTermsAndAttach.apply(this, arguments);
|
4624
5235
|
}
|
4625
5236
|
return registerPilTermsAndAttach;
|
@@ -4643,16 +5254,16 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4643
5254
|
}, {
|
4644
5255
|
key: "mintAndRegisterIpAndMakeDerivativeWithLicenseTokens",
|
4645
5256
|
value: (function () {
|
4646
|
-
var _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4647
|
-
var _request$ipMetadata25, _request$ipMetadata26, _request$ipMetadata27, _request$ipMetadata28, _request$
|
4648
|
-
return _regeneratorRuntime().wrap(function
|
4649
|
-
while (1) switch (
|
5257
|
+
var _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(request) {
|
5258
|
+
var _request$ipMetadata25, _request$ipMetadata26, _request$ipMetadata27, _request$ipMetadata28, _request$txOptions23, licenseTokenIds, object, _request$txOptions24, txHash, receipt, log;
|
5259
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
5260
|
+
while (1) switch (_context14.prev = _context14.next) {
|
4650
5261
|
case 0:
|
4651
|
-
|
4652
|
-
|
5262
|
+
_context14.prev = 0;
|
5263
|
+
_context14.next = 3;
|
4653
5264
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
4654
5265
|
case 3:
|
4655
|
-
licenseTokenIds =
|
5266
|
+
licenseTokenIds = _context14.sent;
|
4656
5267
|
object = {
|
4657
5268
|
spgNftContract: getAddress$1(request.spgNftContract, "request.spgNftContract"),
|
4658
5269
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address,
|
@@ -4665,52 +5276,52 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4665
5276
|
licenseTokenIds: licenseTokenIds,
|
4666
5277
|
royaltyContext: zeroAddress
|
4667
5278
|
};
|
4668
|
-
if (!((_request$
|
4669
|
-
|
5279
|
+
if (!((_request$txOptions23 = request.txOptions) !== null && _request$txOptions23 !== void 0 && _request$txOptions23.encodedTxDataOnly)) {
|
5280
|
+
_context14.next = 9;
|
4670
5281
|
break;
|
4671
5282
|
}
|
4672
|
-
return
|
5283
|
+
return _context14.abrupt("return", {
|
4673
5284
|
encodedTxData: this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode(object)
|
4674
5285
|
});
|
4675
5286
|
case 9:
|
4676
|
-
|
5287
|
+
_context14.next = 11;
|
4677
5288
|
return this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(object);
|
4678
5289
|
case 11:
|
4679
|
-
txHash =
|
4680
|
-
if (!((_request$
|
4681
|
-
|
5290
|
+
txHash = _context14.sent;
|
5291
|
+
if (!((_request$txOptions24 = request.txOptions) !== null && _request$txOptions24 !== void 0 && _request$txOptions24.waitForTransaction)) {
|
5292
|
+
_context14.next = 18;
|
4682
5293
|
break;
|
4683
5294
|
}
|
4684
|
-
|
5295
|
+
_context14.next = 15;
|
4685
5296
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4686
5297
|
hash: txHash
|
4687
5298
|
}));
|
4688
5299
|
case 15:
|
4689
|
-
receipt =
|
4690
|
-
log = this.
|
4691
|
-
return
|
5300
|
+
receipt = _context14.sent;
|
5301
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
5302
|
+
return _context14.abrupt("return", {
|
4692
5303
|
txHash: txHash,
|
4693
5304
|
ipId: log.ipId,
|
4694
5305
|
tokenId: log.tokenId
|
4695
5306
|
});
|
4696
5307
|
case 18:
|
4697
|
-
return
|
5308
|
+
return _context14.abrupt("return", {
|
4698
5309
|
txHash: txHash
|
4699
5310
|
});
|
4700
5311
|
case 19:
|
4701
|
-
|
5312
|
+
_context14.next = 24;
|
4702
5313
|
break;
|
4703
5314
|
case 21:
|
4704
|
-
|
4705
|
-
|
4706
|
-
handleError(
|
5315
|
+
_context14.prev = 21;
|
5316
|
+
_context14.t0 = _context14["catch"](0);
|
5317
|
+
handleError(_context14.t0, "Failed to mint and register IP and make derivative with license tokens");
|
4707
5318
|
case 24:
|
4708
5319
|
case "end":
|
4709
|
-
return
|
5320
|
+
return _context14.stop();
|
4710
5321
|
}
|
4711
|
-
},
|
5322
|
+
}, _callee14, this, [[0, 21]]);
|
4712
5323
|
}));
|
4713
|
-
function mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(
|
5324
|
+
function mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(_x14) {
|
4714
5325
|
return _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens.apply(this, arguments);
|
4715
5326
|
}
|
4716
5327
|
return mintAndRegisterIpAndMakeDerivativeWithLicenseTokens;
|
@@ -4721,12 +5332,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4721
5332
|
* @param request.nftContract The address of the NFT collection.
|
4722
5333
|
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
4723
5334
|
* @param request.tokenId The ID of the NFT.
|
4724
|
-
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
4725
5335
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4726
5336
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4727
5337
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4728
5338
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4729
5339
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
5340
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
4730
5341
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4731
5342
|
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data, or if waitForTransaction is true, includes IP ID.
|
4732
5343
|
*/
|
@@ -4734,33 +5345,37 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4734
5345
|
}, {
|
4735
5346
|
key: "registerIpAndMakeDerivativeWithLicenseTokens",
|
4736
5347
|
value: (function () {
|
4737
|
-
var _registerIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4738
|
-
var _request$ipMetadata29, _request$ipMetadata30, _request$ipMetadata31, _request$ipMetadata32, _request$
|
4739
|
-
return _regeneratorRuntime().wrap(function
|
4740
|
-
while (1) switch (
|
5348
|
+
var _registerIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(request) {
|
5349
|
+
var _request$ipMetadata29, _request$ipMetadata30, _request$ipMetadata31, _request$ipMetadata32, _request$txOptions25, tokenId, ipIdAddress, isRegistered, licenseTokenIds, blockTimestamp, calculatedDeadline, sigMetadataSignature, sigRegisterSignature, object, _request$txOptions26, txHash, receipt, log;
|
5350
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
5351
|
+
while (1) switch (_context15.prev = _context15.next) {
|
4741
5352
|
case 0:
|
4742
|
-
|
5353
|
+
_context15.prev = 0;
|
4743
5354
|
tokenId = BigInt(request.tokenId);
|
4744
|
-
|
5355
|
+
_context15.next = 4;
|
4745
5356
|
return this.getIpIdAddress(request.nftContract, tokenId);
|
4746
5357
|
case 4:
|
4747
|
-
ipIdAddress =
|
4748
|
-
|
5358
|
+
ipIdAddress = _context15.sent;
|
5359
|
+
_context15.next = 7;
|
4749
5360
|
return this.isRegistered(ipIdAddress);
|
4750
5361
|
case 7:
|
4751
|
-
isRegistered =
|
5362
|
+
isRegistered = _context15.sent;
|
4752
5363
|
if (!isRegistered) {
|
4753
|
-
|
5364
|
+
_context15.next = 10;
|
4754
5365
|
break;
|
4755
5366
|
}
|
4756
5367
|
throw new Error("The NFT with id ".concat(tokenId, " is already registered as IP."));
|
4757
5368
|
case 10:
|
4758
|
-
|
5369
|
+
_context15.next = 12;
|
4759
5370
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
4760
5371
|
case 12:
|
4761
|
-
licenseTokenIds =
|
4762
|
-
|
4763
|
-
|
5372
|
+
licenseTokenIds = _context15.sent;
|
5373
|
+
_context15.next = 15;
|
5374
|
+
return this.rpcClient.getBlock();
|
5375
|
+
case 15:
|
5376
|
+
blockTimestamp = _context15.sent.timestamp;
|
5377
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
5378
|
+
_context15.next = 19;
|
4764
5379
|
return getPermissionSignature({
|
4765
5380
|
ipId: ipIdAddress,
|
4766
5381
|
deadline: calculatedDeadline,
|
@@ -4777,9 +5392,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4777
5392
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4778
5393
|
}]
|
4779
5394
|
});
|
4780
|
-
case
|
4781
|
-
sigMetadataSignature =
|
4782
|
-
|
5395
|
+
case 19:
|
5396
|
+
sigMetadataSignature = _context15.sent;
|
5397
|
+
_context15.next = 22;
|
4783
5398
|
return getPermissionSignature({
|
4784
5399
|
ipId: ipIdAddress,
|
4785
5400
|
deadline: calculatedDeadline,
|
@@ -4800,8 +5415,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4800
5415
|
func: "function registerDerivativeWithLicenseTokens(address,uint256[],bytes)"
|
4801
5416
|
}]
|
4802
5417
|
});
|
4803
|
-
case
|
4804
|
-
sigRegisterSignature =
|
5418
|
+
case 22:
|
5419
|
+
sigRegisterSignature = _context15.sent;
|
4805
5420
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
4806
5421
|
tokenId: tokenId,
|
4807
5422
|
licenseTokenIds: licenseTokenIds,
|
@@ -4823,51 +5438,51 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4823
5438
|
signature: sigRegisterSignature
|
4824
5439
|
}
|
4825
5440
|
});
|
4826
|
-
if (!((_request$
|
4827
|
-
|
5441
|
+
if (!((_request$txOptions25 = request.txOptions) !== null && _request$txOptions25 !== void 0 && _request$txOptions25.encodedTxDataOnly)) {
|
5442
|
+
_context15.next = 28;
|
4828
5443
|
break;
|
4829
5444
|
}
|
4830
|
-
return
|
5445
|
+
return _context15.abrupt("return", {
|
4831
5446
|
encodedTxData: this.derivativeWorkflowsClient.registerIpAndMakeDerivativeWithLicenseTokensEncode(object)
|
4832
5447
|
});
|
4833
|
-
case
|
4834
|
-
|
5448
|
+
case 28:
|
5449
|
+
_context15.next = 30;
|
4835
5450
|
return this.derivativeWorkflowsClient.registerIpAndMakeDerivativeWithLicenseTokens(object);
|
4836
|
-
case
|
4837
|
-
txHash =
|
4838
|
-
if (!((_request$
|
4839
|
-
|
5451
|
+
case 30:
|
5452
|
+
txHash = _context15.sent;
|
5453
|
+
if (!((_request$txOptions26 = request.txOptions) !== null && _request$txOptions26 !== void 0 && _request$txOptions26.waitForTransaction)) {
|
5454
|
+
_context15.next = 37;
|
4840
5455
|
break;
|
4841
5456
|
}
|
4842
|
-
|
5457
|
+
_context15.next = 34;
|
4843
5458
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4844
5459
|
hash: txHash
|
4845
5460
|
}));
|
4846
|
-
case
|
4847
|
-
receipt =
|
4848
|
-
log = this.
|
4849
|
-
return
|
5461
|
+
case 34:
|
5462
|
+
receipt = _context15.sent;
|
5463
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
5464
|
+
return _context15.abrupt("return", {
|
4850
5465
|
txHash: txHash,
|
4851
5466
|
ipId: log.ipId
|
4852
5467
|
});
|
4853
|
-
case
|
4854
|
-
return
|
5468
|
+
case 37:
|
5469
|
+
return _context15.abrupt("return", {
|
4855
5470
|
txHash: txHash
|
4856
5471
|
});
|
4857
|
-
case
|
4858
|
-
|
5472
|
+
case 38:
|
5473
|
+
_context15.next = 43;
|
4859
5474
|
break;
|
4860
|
-
case 37:
|
4861
|
-
_context11.prev = 37;
|
4862
|
-
_context11.t0 = _context11["catch"](0);
|
4863
|
-
handleError(_context11.t0, "Failed to register IP and make derivative with license tokens");
|
4864
5475
|
case 40:
|
5476
|
+
_context15.prev = 40;
|
5477
|
+
_context15.t0 = _context15["catch"](0);
|
5478
|
+
handleError(_context15.t0, "Failed to register IP and make derivative with license tokens");
|
5479
|
+
case 43:
|
4865
5480
|
case "end":
|
4866
|
-
return
|
5481
|
+
return _context15.stop();
|
4867
5482
|
}
|
4868
|
-
},
|
5483
|
+
}, _callee15, this, [[0, 40]]);
|
4869
5484
|
}));
|
4870
|
-
function registerIpAndMakeDerivativeWithLicenseTokens(
|
5485
|
+
function registerIpAndMakeDerivativeWithLicenseTokens(_x15) {
|
4871
5486
|
return _registerIpAndMakeDerivativeWithLicenseTokens.apply(this, arguments);
|
4872
5487
|
}
|
4873
5488
|
return registerIpAndMakeDerivativeWithLicenseTokens;
|
@@ -4875,27 +5490,27 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4875
5490
|
}, {
|
4876
5491
|
key: "getIpIdAddress",
|
4877
5492
|
value: function () {
|
4878
|
-
var _getIpIdAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
5493
|
+
var _getIpIdAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(nftContract, tokenId) {
|
4879
5494
|
var ipId;
|
4880
|
-
return _regeneratorRuntime().wrap(function
|
4881
|
-
while (1) switch (
|
5495
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
5496
|
+
while (1) switch (_context16.prev = _context16.next) {
|
4882
5497
|
case 0:
|
4883
|
-
|
5498
|
+
_context16.next = 2;
|
4884
5499
|
return this.ipAssetRegistryClient.ipId({
|
4885
5500
|
chainId: BigInt(chain[this.chainId]),
|
4886
5501
|
tokenContract: getAddress$1(nftContract, "nftContract"),
|
4887
5502
|
tokenId: BigInt(tokenId)
|
4888
5503
|
});
|
4889
5504
|
case 2:
|
4890
|
-
ipId =
|
4891
|
-
return
|
5505
|
+
ipId = _context16.sent;
|
5506
|
+
return _context16.abrupt("return", ipId);
|
4892
5507
|
case 4:
|
4893
5508
|
case "end":
|
4894
|
-
return
|
5509
|
+
return _context16.stop();
|
4895
5510
|
}
|
4896
|
-
},
|
5511
|
+
}, _callee16, this);
|
4897
5512
|
}));
|
4898
|
-
function getIpIdAddress(
|
5513
|
+
function getIpIdAddress(_x16, _x17) {
|
4899
5514
|
return _getIpIdAddress.apply(this, arguments);
|
4900
5515
|
}
|
4901
5516
|
return getIpIdAddress;
|
@@ -4903,23 +5518,23 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4903
5518
|
}, {
|
4904
5519
|
key: "isRegistered",
|
4905
5520
|
value: function () {
|
4906
|
-
var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4907
|
-
return _regeneratorRuntime().wrap(function
|
4908
|
-
while (1) switch (
|
5521
|
+
var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(ipId) {
|
5522
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
5523
|
+
while (1) switch (_context17.prev = _context17.next) {
|
4909
5524
|
case 0:
|
4910
|
-
|
5525
|
+
_context17.next = 2;
|
4911
5526
|
return this.ipAssetRegistryClient.isRegistered({
|
4912
5527
|
id: getAddress$1(ipId, "ipId")
|
4913
5528
|
});
|
4914
5529
|
case 2:
|
4915
|
-
return
|
5530
|
+
return _context17.abrupt("return", _context17.sent);
|
4916
5531
|
case 3:
|
4917
5532
|
case "end":
|
4918
|
-
return
|
5533
|
+
return _context17.stop();
|
4919
5534
|
}
|
4920
|
-
},
|
5535
|
+
}, _callee17, this);
|
4921
5536
|
}));
|
4922
|
-
function isRegistered(
|
5537
|
+
function isRegistered(_x18) {
|
4923
5538
|
return _isRegistered.apply(this, arguments);
|
4924
5539
|
}
|
4925
5540
|
return isRegistered;
|
@@ -4949,46 +5564,21 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4949
5564
|
}
|
4950
5565
|
}, {
|
4951
5566
|
key: "getLicenseTermsId",
|
4952
|
-
value: function () {
|
4953
|
-
var
|
4954
|
-
|
4955
|
-
|
4956
|
-
|
4957
|
-
case 0:
|
4958
|
-
licensingModuleLicenseTermsAttachedEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
4959
|
-
licenseTermsId = licensingModuleLicenseTermsAttachedEvent.length >= 1 && licensingModuleLicenseTermsAttachedEvent[0].licenseTermsId;
|
4960
|
-
if (!(licenseTermsId === false)) {
|
4961
|
-
_context14.next = 7;
|
4962
|
-
break;
|
4963
|
-
}
|
4964
|
-
_context14.next = 5;
|
4965
|
-
return this.licenseRegistryReadOnlyClient.getDefaultLicenseTerms();
|
4966
|
-
case 5:
|
4967
|
-
defaultLicenseTerms = _context14.sent;
|
4968
|
-
licenseTermsId = defaultLicenseTerms.licenseTermsId;
|
4969
|
-
case 7:
|
4970
|
-
return _context14.abrupt("return", licenseTermsId);
|
4971
|
-
case 8:
|
4972
|
-
case "end":
|
4973
|
-
return _context14.stop();
|
4974
|
-
}
|
4975
|
-
}, _callee14, this);
|
4976
|
-
}));
|
4977
|
-
function getLicenseTermsId(_x15) {
|
4978
|
-
return _getLicenseTermsId.apply(this, arguments);
|
4979
|
-
}
|
4980
|
-
return getLicenseTermsId;
|
4981
|
-
}()
|
5567
|
+
value: function getLicenseTermsId(txReceipt) {
|
5568
|
+
var licensingModuleLicenseTermsAttachedEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
5569
|
+
var licenseTermsId = licensingModuleLicenseTermsAttachedEvent.length >= 1 && licensingModuleLicenseTermsAttachedEvent[0].licenseTermsId;
|
5570
|
+
return licenseTermsId === false ? this.defaultLicenseTermsId : licenseTermsId;
|
5571
|
+
}
|
4982
5572
|
}, {
|
4983
5573
|
key: "validateLicenseTokenIds",
|
4984
5574
|
value: function () {
|
4985
|
-
var _validateLicenseTokenIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4986
|
-
var newLicenseTokenIds,
|
4987
|
-
return _regeneratorRuntime().wrap(function
|
4988
|
-
while (1) switch (
|
5575
|
+
var _validateLicenseTokenIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(licenseTokenIds) {
|
5576
|
+
var newLicenseTokenIds, _iterator6, _step6, licenseTokenId, tokenOwnerAddress;
|
5577
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
5578
|
+
while (1) switch (_context18.prev = _context18.next) {
|
4989
5579
|
case 0:
|
4990
5580
|
if (!(licenseTokenIds.length === 0)) {
|
4991
|
-
|
5581
|
+
_context18.next = 2;
|
4992
5582
|
break;
|
4993
5583
|
}
|
4994
5584
|
throw new Error("License token IDs must be provided.");
|
@@ -4996,53 +5586,86 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4996
5586
|
newLicenseTokenIds = licenseTokenIds.map(function (id) {
|
4997
5587
|
return BigInt(id);
|
4998
5588
|
});
|
4999
|
-
|
5000
|
-
|
5001
|
-
|
5589
|
+
_iterator6 = _createForOfIteratorHelper(newLicenseTokenIds);
|
5590
|
+
_context18.prev = 4;
|
5591
|
+
_iterator6.s();
|
5002
5592
|
case 6:
|
5003
|
-
if ((
|
5004
|
-
|
5593
|
+
if ((_step6 = _iterator6.n()).done) {
|
5594
|
+
_context18.next = 15;
|
5005
5595
|
break;
|
5006
5596
|
}
|
5007
|
-
licenseTokenId =
|
5008
|
-
|
5597
|
+
licenseTokenId = _step6.value;
|
5598
|
+
_context18.next = 10;
|
5009
5599
|
return this.licenseTokenReadOnlyClient.ownerOf({
|
5010
5600
|
tokenId: licenseTokenId
|
5011
5601
|
});
|
5012
5602
|
case 10:
|
5013
|
-
tokenOwnerAddress =
|
5603
|
+
tokenOwnerAddress = _context18.sent;
|
5014
5604
|
if (tokenOwnerAddress) {
|
5015
|
-
|
5605
|
+
_context18.next = 13;
|
5016
5606
|
break;
|
5017
5607
|
}
|
5018
5608
|
throw new Error("License token id ".concat(licenseTokenId, " must be owned by the caller."));
|
5019
5609
|
case 13:
|
5020
|
-
|
5610
|
+
_context18.next = 6;
|
5021
5611
|
break;
|
5022
5612
|
case 15:
|
5023
|
-
|
5613
|
+
_context18.next = 20;
|
5024
5614
|
break;
|
5025
5615
|
case 17:
|
5026
|
-
|
5027
|
-
|
5028
|
-
|
5616
|
+
_context18.prev = 17;
|
5617
|
+
_context18.t0 = _context18["catch"](4);
|
5618
|
+
_iterator6.e(_context18.t0);
|
5029
5619
|
case 20:
|
5030
|
-
|
5031
|
-
|
5032
|
-
return
|
5620
|
+
_context18.prev = 20;
|
5621
|
+
_iterator6.f();
|
5622
|
+
return _context18.finish(20);
|
5033
5623
|
case 23:
|
5034
|
-
return
|
5624
|
+
return _context18.abrupt("return", newLicenseTokenIds);
|
5035
5625
|
case 24:
|
5036
5626
|
case "end":
|
5037
|
-
return
|
5627
|
+
return _context18.stop();
|
5038
5628
|
}
|
5039
|
-
},
|
5629
|
+
}, _callee18, this, [[4, 17, 20, 23]]);
|
5040
5630
|
}));
|
5041
|
-
function validateLicenseTokenIds(
|
5631
|
+
function validateLicenseTokenIds(_x19) {
|
5042
5632
|
return _validateLicenseTokenIds.apply(this, arguments);
|
5043
5633
|
}
|
5044
5634
|
return validateLicenseTokenIds;
|
5045
5635
|
}()
|
5636
|
+
}, {
|
5637
|
+
key: "getIpIdAndTokenIdFromEvent",
|
5638
|
+
value: function getIpIdAndTokenIdFromEvent(txReceipt) {
|
5639
|
+
var IPRegisteredLog = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(txReceipt);
|
5640
|
+
return IPRegisteredLog.map(function (log) {
|
5641
|
+
return {
|
5642
|
+
ipId: log.ipId,
|
5643
|
+
tokenId: log.tokenId
|
5644
|
+
};
|
5645
|
+
});
|
5646
|
+
}
|
5647
|
+
}, {
|
5648
|
+
key: "getDefaultLicenseTerms",
|
5649
|
+
value: function () {
|
5650
|
+
var _getDefaultLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
5651
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
5652
|
+
while (1) switch (_context19.prev = _context19.next) {
|
5653
|
+
case 0:
|
5654
|
+
_context19.next = 2;
|
5655
|
+
return this.licenseRegistryReadOnlyClient.getDefaultLicenseTerms();
|
5656
|
+
case 2:
|
5657
|
+
this.defaultLicenseTermsId = _context19.sent.licenseTermsId;
|
5658
|
+
case 3:
|
5659
|
+
case "end":
|
5660
|
+
return _context19.stop();
|
5661
|
+
}
|
5662
|
+
}, _callee19, this);
|
5663
|
+
}));
|
5664
|
+
function getDefaultLicenseTerms() {
|
5665
|
+
return _getDefaultLicenseTerms.apply(this, arguments);
|
5666
|
+
}
|
5667
|
+
return getDefaultLicenseTerms;
|
5668
|
+
}()
|
5046
5669
|
}]);
|
5047
5670
|
}();
|
5048
5671
|
|
@@ -5151,7 +5774,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5151
5774
|
* @param request.to The address that can be called by the `signer` (currently only modules can be `to`)
|
5152
5775
|
* @param request.permission The new permission level.
|
5153
5776
|
* @param request.func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
5154
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
5777
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
5155
5778
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
5156
5779
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
5157
5780
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
@@ -5161,7 +5784,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5161
5784
|
key: "createSetPermissionSignature",
|
5162
5785
|
value: (function () {
|
5163
5786
|
var _createSetPermissionSignature = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
5164
|
-
var _request$txOptions3, ipId, signer, to, txOptions, func, permission, deadline, ipAccountClient, data, _yield$ipAccountClien, state, calculatedDeadline, signature, req, _request$txOptions4, txHash;
|
5787
|
+
var _request$txOptions3, ipId, signer, to, txOptions, func, permission, deadline, ipAccountClient, data, _yield$ipAccountClien, state, blockTimestamp, calculatedDeadline, signature, req, _request$txOptions4, txHash;
|
5165
5788
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
5166
5789
|
while (1) switch (_context2.prev = _context2.next) {
|
5167
5790
|
case 0:
|
@@ -5181,8 +5804,12 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5181
5804
|
case 8:
|
5182
5805
|
_yield$ipAccountClien = _context2.sent;
|
5183
5806
|
state = _yield$ipAccountClien.result;
|
5184
|
-
|
5185
|
-
|
5807
|
+
_context2.next = 12;
|
5808
|
+
return this.rpcClient.getBlock();
|
5809
|
+
case 12:
|
5810
|
+
blockTimestamp = _context2.sent.timestamp;
|
5811
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
5812
|
+
_context2.next = 16;
|
5186
5813
|
return getPermissionSignature({
|
5187
5814
|
ipId: ipId,
|
5188
5815
|
deadline: calculatedDeadline,
|
@@ -5197,7 +5824,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5197
5824
|
chainId: chain[this.chainId],
|
5198
5825
|
wallet: this.wallet
|
5199
5826
|
});
|
5200
|
-
case
|
5827
|
+
case 16:
|
5201
5828
|
signature = _context2.sent;
|
5202
5829
|
req = {
|
5203
5830
|
to: getAddress$1(this.accessControllerClient.address, "accessControllerClientAddress"),
|
@@ -5208,46 +5835,46 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5208
5835
|
signature: signature
|
5209
5836
|
};
|
5210
5837
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.encodedTxDataOnly)) {
|
5211
|
-
_context2.next =
|
5838
|
+
_context2.next = 22;
|
5212
5839
|
break;
|
5213
5840
|
}
|
5214
5841
|
return _context2.abrupt("return", {
|
5215
5842
|
encodedTxData: ipAccountClient.executeWithSigEncode(req)
|
5216
5843
|
});
|
5217
|
-
case
|
5218
|
-
_context2.next =
|
5844
|
+
case 22:
|
5845
|
+
_context2.next = 24;
|
5219
5846
|
return ipAccountClient.executeWithSig(req);
|
5220
|
-
case
|
5847
|
+
case 24:
|
5221
5848
|
txHash = _context2.sent;
|
5222
5849
|
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
5223
|
-
_context2.next =
|
5850
|
+
_context2.next = 31;
|
5224
5851
|
break;
|
5225
5852
|
}
|
5226
|
-
_context2.next =
|
5853
|
+
_context2.next = 28;
|
5227
5854
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, txOptions), {}, {
|
5228
5855
|
hash: txHash
|
5229
5856
|
}));
|
5230
|
-
case
|
5857
|
+
case 28:
|
5231
5858
|
return _context2.abrupt("return", {
|
5232
5859
|
txHash: txHash,
|
5233
5860
|
success: true
|
5234
5861
|
});
|
5235
|
-
case
|
5862
|
+
case 31:
|
5236
5863
|
return _context2.abrupt("return", {
|
5237
5864
|
txHash: txHash
|
5238
5865
|
});
|
5239
|
-
case
|
5240
|
-
_context2.next =
|
5866
|
+
case 32:
|
5867
|
+
_context2.next = 37;
|
5241
5868
|
break;
|
5242
|
-
case
|
5243
|
-
_context2.prev =
|
5869
|
+
case 34:
|
5870
|
+
_context2.prev = 34;
|
5244
5871
|
_context2.t0 = _context2["catch"](0);
|
5245
5872
|
handleError(_context2.t0, "Failed to create set permission signature");
|
5246
|
-
case
|
5873
|
+
case 37:
|
5247
5874
|
case "end":
|
5248
5875
|
return _context2.stop();
|
5249
5876
|
}
|
5250
|
-
}, _callee2, this, [[0,
|
5877
|
+
}, _callee2, this, [[0, 34]]);
|
5251
5878
|
}));
|
5252
5879
|
function createSetPermissionSignature(_x2) {
|
5253
5880
|
return _createSetPermissionSignature.apply(this, arguments);
|
@@ -5448,6 +6075,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5448
6075
|
* @param request.permissions[].to The address that can be called by the `signer` (currently only modules can be `to`).
|
5449
6076
|
* @param request.permissions[].permission The new permission level.
|
5450
6077
|
* @param request.permissions[].func [Optional] The function selector string of `to` that can be called by the `signer` on behalf of the `ipAccount`. Be default, it allows all functions.
|
6078
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
5451
6079
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
5452
6080
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
5453
6081
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
@@ -5457,7 +6085,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5457
6085
|
key: "createBatchPermissionSignature",
|
5458
6086
|
value: (function () {
|
5459
6087
|
var _createBatchPermissionSignature = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
5460
|
-
var _request$txOptions9, permissions, deadline, ipId, txOptions, _iterator2, _step2, permission, ipAccountClient, data, _yield$ipAccountClien2, state, calculatedDeadline, signature, req, _request$txOptions10, txHash;
|
6088
|
+
var _request$txOptions9, permissions, deadline, ipId, txOptions, _iterator2, _step2, permission, ipAccountClient, data, _yield$ipAccountClien2, state, blockTimestamp, calculatedDeadline, signature, req, _request$txOptions10, txHash;
|
5461
6089
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
5462
6090
|
while (1) switch (_context5.prev = _context5.next) {
|
5463
6091
|
case 0:
|
@@ -5508,8 +6136,12 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5508
6136
|
case 23:
|
5509
6137
|
_yield$ipAccountClien2 = _context5.sent;
|
5510
6138
|
state = _yield$ipAccountClien2.result;
|
5511
|
-
|
5512
|
-
|
6139
|
+
_context5.next = 27;
|
6140
|
+
return this.rpcClient.getBlock();
|
6141
|
+
case 27:
|
6142
|
+
blockTimestamp = _context5.sent.timestamp;
|
6143
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
6144
|
+
_context5.next = 31;
|
5513
6145
|
return getPermissionSignature({
|
5514
6146
|
ipId: ipId,
|
5515
6147
|
deadline: calculatedDeadline,
|
@@ -5519,7 +6151,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5519
6151
|
wallet: this.wallet,
|
5520
6152
|
permissionFunc: "setBatchPermissions"
|
5521
6153
|
});
|
5522
|
-
case
|
6154
|
+
case 31:
|
5523
6155
|
signature = _context5.sent;
|
5524
6156
|
req = {
|
5525
6157
|
to: getAddress$1(this.accessControllerClient.address, "accessControllerAddress"),
|
@@ -5530,46 +6162,46 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5530
6162
|
signature: signature
|
5531
6163
|
};
|
5532
6164
|
if (!((_request$txOptions9 = request.txOptions) !== null && _request$txOptions9 !== void 0 && _request$txOptions9.encodedTxDataOnly)) {
|
5533
|
-
_context5.next =
|
6165
|
+
_context5.next = 37;
|
5534
6166
|
break;
|
5535
6167
|
}
|
5536
6168
|
return _context5.abrupt("return", {
|
5537
6169
|
encodedTxData: ipAccountClient.executeWithSigEncode(req)
|
5538
6170
|
});
|
5539
|
-
case
|
5540
|
-
_context5.next =
|
6171
|
+
case 37:
|
6172
|
+
_context5.next = 39;
|
5541
6173
|
return ipAccountClient.executeWithSig(req);
|
5542
|
-
case
|
6174
|
+
case 39:
|
5543
6175
|
txHash = _context5.sent;
|
5544
6176
|
if (!((_request$txOptions10 = request.txOptions) !== null && _request$txOptions10 !== void 0 && _request$txOptions10.waitForTransaction)) {
|
5545
|
-
_context5.next =
|
6177
|
+
_context5.next = 46;
|
5546
6178
|
break;
|
5547
6179
|
}
|
5548
|
-
_context5.next =
|
6180
|
+
_context5.next = 43;
|
5549
6181
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, txOptions), {}, {
|
5550
6182
|
hash: txHash
|
5551
6183
|
}));
|
5552
|
-
case
|
6184
|
+
case 43:
|
5553
6185
|
return _context5.abrupt("return", {
|
5554
6186
|
txHash: txHash,
|
5555
6187
|
success: true
|
5556
6188
|
});
|
5557
|
-
case
|
6189
|
+
case 46:
|
5558
6190
|
return _context5.abrupt("return", {
|
5559
6191
|
txHash: txHash
|
5560
6192
|
});
|
5561
|
-
case
|
5562
|
-
_context5.next =
|
6193
|
+
case 47:
|
6194
|
+
_context5.next = 52;
|
5563
6195
|
break;
|
5564
|
-
case
|
5565
|
-
_context5.prev =
|
6196
|
+
case 49:
|
6197
|
+
_context5.prev = 49;
|
5566
6198
|
_context5.t1 = _context5["catch"](0);
|
5567
6199
|
handleError(_context5.t1, "Failed to create batch permission signature");
|
5568
|
-
case
|
6200
|
+
case 52:
|
5569
6201
|
case "end":
|
5570
6202
|
return _context5.stop();
|
5571
6203
|
}
|
5572
|
-
}, _callee5, this, [[0,
|
6204
|
+
}, _callee5, this, [[0, 49], [3, 13, 16, 19]]);
|
5573
6205
|
}));
|
5574
6206
|
function createBatchPermissionSignature(_x5) {
|
5575
6207
|
return _createBatchPermissionSignature.apply(this, arguments);
|
@@ -6877,12 +7509,12 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
6877
7509
|
* @param request - The request object containing necessary data to execute IP Account a transaction.
|
6878
7510
|
* @param request.ipId The Ip Id to get ip account.
|
6879
7511
|
* @param request.to The recipient of the transaction.
|
6880
|
-
* @param request.value The amount of Ether to send.
|
6881
7512
|
* @param request.data The data to send along with the transaction.
|
6882
7513
|
* @param request.signer The signer of the transaction.
|
6883
7514
|
* @param request.deadline The deadline of the transaction signature.
|
6884
7515
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
6885
|
-
* @param request.
|
7516
|
+
* @param request.value [Optional] The amount of Ether to send.
|
7517
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
6886
7518
|
* @returns Tx hash for the transaction.
|
6887
7519
|
*/
|
6888
7520
|
)
|
@@ -6898,7 +7530,7 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
6898
7530
|
ipAccountClient = new IpAccountImplClient(this.rpcClient, this.wallet, getAddress$1(request.ipId, "request.ipId"));
|
6899
7531
|
req = {
|
6900
7532
|
to: getAddress$1(request.to, "request.to"),
|
6901
|
-
value: BigInt(0),
|
7533
|
+
value: BigInt(request.value || 0),
|
6902
7534
|
data: request.data,
|
6903
7535
|
signer: getAddress$1(request.signer, "request.signer"),
|
6904
7536
|
deadline: BigInt(request.deadline),
|
@@ -8027,7 +8659,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8027
8659
|
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
8028
8660
|
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
8029
8661
|
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
8030
|
-
* . @param request.deadline [Optional] The deadline for the signature in
|
8662
|
+
* . @param request.deadline [Optional] The deadline for the signature in seconds, default value is 1000s.
|
8031
8663
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
8032
8664
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
8033
8665
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
@@ -8042,7 +8674,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8042
8674
|
key: "mintAndRegisterIpAndAttachLicenseAndAddToGroup",
|
8043
8675
|
value: (function () {
|
8044
8676
|
var _mintAndRegisterIpAndAttachLicenseAndAddToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
8045
|
-
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions3, groupId, recipient, spgNftContract, deadline, licenseTemplate, isRegistered, ipAccount, _yield$ipAccount$stat, state, calculatedDeadline, sigAddToGroupSignature, object, _request$txOptions4, txHash, receipt, log;
|
8677
|
+
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions3, groupId, recipient, spgNftContract, deadline, licenseTemplate, isRegistered, ipAccount, _yield$ipAccount$stat, state, blockTimestamp, calculatedDeadline, sigAddToGroupSignature, object, _request$txOptions4, txHash, receipt, log;
|
8046
8678
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
8047
8679
|
while (1) switch (_context2.prev = _context2.next) {
|
8048
8680
|
case 0:
|
@@ -8066,8 +8698,12 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8066
8698
|
case 10:
|
8067
8699
|
_yield$ipAccount$stat = _context2.sent;
|
8068
8700
|
state = _yield$ipAccount$stat.result;
|
8069
|
-
|
8070
|
-
|
8701
|
+
_context2.next = 14;
|
8702
|
+
return this.rpcClient.getBlock();
|
8703
|
+
case 14:
|
8704
|
+
blockTimestamp = _context2.sent.timestamp;
|
8705
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
8706
|
+
_context2.next = 18;
|
8071
8707
|
return getPermissionSignature({
|
8072
8708
|
ipId: groupId,
|
8073
8709
|
deadline: calculatedDeadline,
|
@@ -8082,7 +8718,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8082
8718
|
func: "function addIp(address,address[])"
|
8083
8719
|
}]
|
8084
8720
|
});
|
8085
|
-
case
|
8721
|
+
case 18:
|
8086
8722
|
sigAddToGroupSignature = _context2.sent;
|
8087
8723
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
8088
8724
|
spgNftContract: getAddress$1(spgNftContract, "request.spgNftContract"),
|
@@ -8102,26 +8738,26 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8102
8738
|
}
|
8103
8739
|
});
|
8104
8740
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.encodedTxDataOnly)) {
|
8105
|
-
_context2.next =
|
8741
|
+
_context2.next = 24;
|
8106
8742
|
break;
|
8107
8743
|
}
|
8108
8744
|
return _context2.abrupt("return", {
|
8109
8745
|
encodedTxData: this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroupEncode(object)
|
8110
8746
|
});
|
8111
|
-
case
|
8112
|
-
_context2.next =
|
8747
|
+
case 24:
|
8748
|
+
_context2.next = 26;
|
8113
8749
|
return this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroup(object);
|
8114
|
-
case
|
8750
|
+
case 26:
|
8115
8751
|
txHash = _context2.sent;
|
8116
8752
|
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
8117
|
-
_context2.next =
|
8753
|
+
_context2.next = 33;
|
8118
8754
|
break;
|
8119
8755
|
}
|
8120
|
-
_context2.next =
|
8756
|
+
_context2.next = 30;
|
8121
8757
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
8122
8758
|
hash: txHash
|
8123
8759
|
}));
|
8124
|
-
case
|
8760
|
+
case 30:
|
8125
8761
|
receipt = _context2.sent;
|
8126
8762
|
log = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(receipt)[0];
|
8127
8763
|
return _context2.abrupt("return", {
|
@@ -8129,22 +8765,22 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8129
8765
|
ipId: log.ipId,
|
8130
8766
|
tokenId: log.tokenId
|
8131
8767
|
});
|
8132
|
-
case
|
8768
|
+
case 33:
|
8133
8769
|
return _context2.abrupt("return", {
|
8134
8770
|
txHash: txHash
|
8135
8771
|
});
|
8136
|
-
case
|
8137
|
-
_context2.next =
|
8772
|
+
case 34:
|
8773
|
+
_context2.next = 39;
|
8138
8774
|
break;
|
8139
|
-
case
|
8140
|
-
_context2.prev =
|
8775
|
+
case 36:
|
8776
|
+
_context2.prev = 36;
|
8141
8777
|
_context2.t0 = _context2["catch"](0);
|
8142
8778
|
handleError(_context2.t0, "Failed to mint and register IP and attach license and add to group");
|
8143
|
-
case
|
8779
|
+
case 39:
|
8144
8780
|
case "end":
|
8145
8781
|
return _context2.stop();
|
8146
8782
|
}
|
8147
|
-
}, _callee2, this, [[0,
|
8783
|
+
}, _callee2, this, [[0, 36]]);
|
8148
8784
|
}));
|
8149
8785
|
function mintAndRegisterIpAndAttachLicenseAndAddToGroup(_x2) {
|
8150
8786
|
return _mintAndRegisterIpAndAttachLicenseAndAddToGroup.apply(this, arguments);
|
@@ -8158,7 +8794,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8158
8794
|
* @param request.groupId The ID of the group IP to add the newly registered IP.
|
8159
8795
|
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
8160
8796
|
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
8161
|
-
* . @param request.deadline [Optional] The deadline for the signature in
|
8797
|
+
* . @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
8162
8798
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
8163
8799
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
8164
8800
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
@@ -8173,7 +8809,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8173
8809
|
key: "registerIpAndAttachLicenseAndAddToGroup",
|
8174
8810
|
value: (function () {
|
8175
8811
|
var _registerIpAndAttachLicenseAndAddToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
8176
|
-
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$txOptions5, _request$txOptions6, ipIdAddress, isRegistered, ipAccount, _yield$ipAccount$stat2, state, calculatedDeadline, object, txHash, receipt, log;
|
8812
|
+
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$txOptions5, _request$txOptions6, ipIdAddress, isRegistered, ipAccount, _yield$ipAccount$stat2, state, blockTimestamp, calculatedDeadline, object, txHash, receipt, log;
|
8177
8813
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
8178
8814
|
while (1) switch (_context3.prev = _context3.next) {
|
8179
8815
|
case 0:
|
@@ -8204,7 +8840,11 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8204
8840
|
case 12:
|
8205
8841
|
_yield$ipAccount$stat2 = _context3.sent;
|
8206
8842
|
state = _yield$ipAccount$stat2.result;
|
8207
|
-
|
8843
|
+
_context3.next = 16;
|
8844
|
+
return this.rpcClient.getBlock();
|
8845
|
+
case 16:
|
8846
|
+
blockTimestamp = _context3.sent.timestamp;
|
8847
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
8208
8848
|
_context3.t0 = getAddress$1(request.nftContract, "request.nftContract");
|
8209
8849
|
_context3.t1 = request.groupId;
|
8210
8850
|
_context3.t2 = request.licenseTemplate && getAddress$1(request.licenseTemplate, "request.licenseTemplate") || this.licenseTemplateClient.address;
|
@@ -8218,7 +8858,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8218
8858
|
_context3.t5 = BigInt(request.tokenId);
|
8219
8859
|
_context3.t6 = getAddress$1(this.wallet.account.address, "wallet.account.address");
|
8220
8860
|
_context3.t7 = calculatedDeadline;
|
8221
|
-
_context3.next =
|
8861
|
+
_context3.next = 28;
|
8222
8862
|
return getPermissionSignature({
|
8223
8863
|
ipId: getAddress$1(request.groupId, "request.groupId"),
|
8224
8864
|
deadline: calculatedDeadline,
|
@@ -8233,7 +8873,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8233
8873
|
func: "function addIp(address,address[])"
|
8234
8874
|
}]
|
8235
8875
|
});
|
8236
|
-
case
|
8876
|
+
case 28:
|
8237
8877
|
_context3.t8 = _context3.sent;
|
8238
8878
|
_context3.t9 = {
|
8239
8879
|
signer: _context3.t6,
|
@@ -8242,7 +8882,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8242
8882
|
};
|
8243
8883
|
_context3.t10 = getAddress$1(this.wallet.account.address, "wallet.account.address");
|
8244
8884
|
_context3.t11 = calculatedDeadline;
|
8245
|
-
_context3.next =
|
8885
|
+
_context3.next = 34;
|
8246
8886
|
return getPermissionSignature({
|
8247
8887
|
ipId: ipIdAddress,
|
8248
8888
|
deadline: calculatedDeadline,
|
@@ -8266,7 +8906,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8266
8906
|
func: "function attachLicenseTerms(address,address,uint256)"
|
8267
8907
|
}]
|
8268
8908
|
});
|
8269
|
-
case
|
8909
|
+
case 34:
|
8270
8910
|
_context3.t12 = _context3.sent;
|
8271
8911
|
_context3.t13 = {
|
8272
8912
|
signer: _context3.t10,
|
@@ -8284,26 +8924,26 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8284
8924
|
sigMetadataAndAttach: _context3.t13
|
8285
8925
|
};
|
8286
8926
|
if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.encodedTxDataOnly)) {
|
8287
|
-
_context3.next =
|
8927
|
+
_context3.next = 39;
|
8288
8928
|
break;
|
8289
8929
|
}
|
8290
8930
|
return _context3.abrupt("return", {
|
8291
8931
|
encodedTxData: this.groupingWorkflowsClient.registerIpAndAttachLicenseAndAddToGroupEncode(object)
|
8292
8932
|
});
|
8293
|
-
case
|
8294
|
-
_context3.next =
|
8933
|
+
case 39:
|
8934
|
+
_context3.next = 41;
|
8295
8935
|
return this.groupingWorkflowsClient.registerIpAndAttachLicenseAndAddToGroup(object);
|
8296
|
-
case
|
8936
|
+
case 41:
|
8297
8937
|
txHash = _context3.sent;
|
8298
8938
|
if (!((_request$txOptions6 = request.txOptions) !== null && _request$txOptions6 !== void 0 && _request$txOptions6.waitForTransaction)) {
|
8299
|
-
_context3.next =
|
8939
|
+
_context3.next = 48;
|
8300
8940
|
break;
|
8301
8941
|
}
|
8302
|
-
_context3.next =
|
8942
|
+
_context3.next = 45;
|
8303
8943
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
8304
8944
|
hash: txHash
|
8305
8945
|
}));
|
8306
|
-
case
|
8946
|
+
case 45:
|
8307
8947
|
receipt = _context3.sent;
|
8308
8948
|
log = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(receipt)[0];
|
8309
8949
|
return _context3.abrupt("return", {
|
@@ -8311,19 +8951,19 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8311
8951
|
ipId: log.ipId,
|
8312
8952
|
tokenId: log.tokenId
|
8313
8953
|
});
|
8314
|
-
case
|
8954
|
+
case 48:
|
8315
8955
|
return _context3.abrupt("return", {
|
8316
8956
|
txHash: txHash
|
8317
8957
|
});
|
8318
|
-
case
|
8319
|
-
_context3.prev =
|
8958
|
+
case 51:
|
8959
|
+
_context3.prev = 51;
|
8320
8960
|
_context3.t14 = _context3["catch"](0);
|
8321
8961
|
handleError(_context3.t14, "Failed to register IP and attach license and add to group");
|
8322
|
-
case
|
8962
|
+
case 54:
|
8323
8963
|
case "end":
|
8324
8964
|
return _context3.stop();
|
8325
8965
|
}
|
8326
|
-
}, _callee3, this, [[0,
|
8966
|
+
}, _callee3, this, [[0, 51]]);
|
8327
8967
|
}));
|
8328
8968
|
function registerIpAndAttachLicenseAndAddToGroup(_x3) {
|
8329
8969
|
return _registerIpAndAttachLicenseAndAddToGroup.apply(this, arguments);
|
@@ -8728,4 +9368,4 @@ var StoryClient = /*#__PURE__*/function () {
|
|
8728
9368
|
}]);
|
8729
9369
|
}();
|
8730
9370
|
|
8731
|
-
export { AccessPermission, AddressZero, DisputeClient, GroupClient, HashZero, IPAccountClient, IPAssetClient, LicenseClient, NftClient, PIL_TYPE, PermissionClient, RoyaltyClient, StoryClient, convertCIDtoHashIPFS, convertHashIPFStoCID, getPermissionSignature, odyssey };
|
9371
|
+
export { AccessPermission, AddressZero, DisputeClient, GroupClient, HashZero, IPAccountClient, IPAssetClient, LicenseClient, NftClient, PIL_TYPE, PermissionClient, RoyaltyClient, StoryClient, convertCIDtoHashIPFS, convertHashIPFStoCID, getPermissionSignature, getSignature, odyssey };
|