@story-protocol/core-sdk 1.2.0-rc.1 → 1.2.0-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/abi/generated.d.ts +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
@@ -558,9 +558,8 @@ var odyssey = utils.defineChain({
|
|
558
558
|
}
|
559
559
|
},
|
560
560
|
contracts: {
|
561
|
-
//TODO: need to confirm the addresses
|
562
561
|
multicall3: {
|
563
|
-
address: "
|
562
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
564
563
|
blockCreated: 5882
|
565
564
|
}
|
566
565
|
},
|
@@ -741,7 +740,13 @@ function _inherits(subClass, superClass) {
|
|
741
740
|
*
|
742
741
|
*/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"}];/**
|
743
742
|
*
|
744
|
-
*/var moduleRegistryAddress={1516:"0x9F18c5723BC4Ee447CF9B01a8543D3b08b7F09C7"};//
|
743
|
+
*/var moduleRegistryAddress={1516:"0x9F18c5723BC4Ee447CF9B01a8543D3b08b7F09C7"};// Multicall3
|
744
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
745
|
+
/**
|
746
|
+
*
|
747
|
+
*/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"}];/**
|
748
|
+
*
|
749
|
+
*/var multicall3Address={1516:"0xcA11bde05977b3631167028862bE2a173976CA11"};// PILicenseTemplate
|
745
750
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
746
751
|
/**
|
747
752
|
*
|
@@ -1070,6 +1075,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1070
1075
|
* @param ipMetadata tuple
|
1071
1076
|
* @param recipient address
|
1072
1077
|
*/ /**
|
1078
|
+
* DerivativeWorkflowsMulticallRequest
|
1079
|
+
*
|
1080
|
+
* @param data bytes[]
|
1081
|
+
*/ /**
|
1073
1082
|
* DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
1074
1083
|
*
|
1075
1084
|
* @param nftContract address
|
@@ -1111,11 +1120,21 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1111
1120
|
* @param request DerivativeWorkflowsMintAndRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
1112
1121
|
* @return EncodedTxData
|
1113
1122
|
*/)},{key:"mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode",value:function mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:derivativeWorkflowsAbi,functionName:"mintAndRegisterIpAndMakeDerivativeWithLicenseTokens",args:[request.spgNftContract,request.licenseTokenIds,request.royaltyContext,request.ipMetadata,request.recipient]})};}/**
|
1123
|
+
* method multicall for contract DerivativeWorkflows
|
1124
|
+
*
|
1125
|
+
* @param request DerivativeWorkflowsMulticallRequest
|
1126
|
+
* @return Promise<WriteContractReturnType>
|
1127
|
+
*/},{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;}()/**
|
1128
|
+
* method multicall for contract DerivativeWorkflows with only encode
|
1129
|
+
*
|
1130
|
+
* @param request DerivativeWorkflowsMulticallRequest
|
1131
|
+
* @return EncodedTxData
|
1132
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:derivativeWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
1114
1133
|
* method registerIpAndMakeDerivative for contract DerivativeWorkflows
|
1115
1134
|
*
|
1116
1135
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
1117
1136
|
* @return Promise<WriteContractReturnType>
|
1118
|
-
*/},{key:"registerIpAndMakeDerivative",value:(function(){var _registerIpAndMakeDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1137
|
+
*/},{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;}()/**
|
1119
1138
|
* method registerIpAndMakeDerivative for contract DerivativeWorkflows with only encode
|
1120
1139
|
*
|
1121
1140
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeRequest
|
@@ -1125,7 +1144,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1125
1144
|
*
|
1126
1145
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
1127
1146
|
* @return Promise<WriteContractReturnType>
|
1128
|
-
*/},{key:"registerIpAndMakeDerivativeWithLicenseTokens",value:(function(){var _registerIpAndMakeDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1147
|
+
*/},{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;}()/**
|
1129
1148
|
* method registerIpAndMakeDerivativeWithLicenseTokens for contract DerivativeWorkflows with only encode
|
1130
1149
|
*
|
1131
1150
|
* @param request DerivativeWorkflowsRegisterIpAndMakeDerivativeWithLicenseTokensRequest
|
@@ -1188,7 +1207,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1188
1207
|
*
|
1189
1208
|
* @param request DisputeModuleCancelDisputeRequest
|
1190
1209
|
* @return Promise<WriteContractReturnType>
|
1191
|
-
*/_inherits(DisputeModuleClient,_DisputeModuleEventCl);return _createClass(DisputeModuleClient,[{key:"cancelDispute",value:(function(){var _cancelDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1210
|
+
*/_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;}()/**
|
1192
1211
|
* method cancelDispute for contract DisputeModule with only encode
|
1193
1212
|
*
|
1194
1213
|
* @param request DisputeModuleCancelDisputeRequest
|
@@ -1198,7 +1217,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1198
1217
|
*
|
1199
1218
|
* @param request DisputeModuleRaiseDisputeRequest
|
1200
1219
|
* @return Promise<WriteContractReturnType>
|
1201
|
-
*/},{key:"raiseDispute",value:(function(){var _raiseDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1220
|
+
*/},{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;}()/**
|
1202
1221
|
* method raiseDispute for contract DisputeModule with only encode
|
1203
1222
|
*
|
1204
1223
|
* @param request DisputeModuleRaiseDisputeRequest
|
@@ -1208,7 +1227,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1208
1227
|
*
|
1209
1228
|
* @param request DisputeModuleResolveDisputeRequest
|
1210
1229
|
* @return Promise<WriteContractReturnType>
|
1211
|
-
*/},{key:"resolveDispute",value:(function(){var _resolveDispute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1230
|
+
*/},{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;}()/**
|
1212
1231
|
* method resolveDispute for contract DisputeModule with only encode
|
1213
1232
|
*
|
1214
1233
|
* @param request DisputeModuleResolveDisputeRequest
|
@@ -1370,84 +1389,84 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1370
1389
|
*
|
1371
1390
|
* @param request GroupingModuleAccessControllerRequest
|
1372
1391
|
* @return Promise<GroupingModuleAccessControllerResponse>
|
1373
|
-
*/_inherits(GroupingModuleReadOnlyClient,_GroupingModuleEventC);return _createClass(GroupingModuleReadOnlyClient,[{key:"accessController",value:(function(){var _accessController2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1392
|
+
*/_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;}()/**
|
1374
1393
|
* method GROUP_IP_ASSET_REGISTRY for contract GroupingModule
|
1375
1394
|
*
|
1376
1395
|
* @param request GroupingModuleGroupIpAssetRegistryRequest
|
1377
1396
|
* @return Promise<GroupingModuleGroupIpAssetRegistryResponse>
|
1378
|
-
*/)},{key:"groupIpAssetRegistry",value:(function(){var _groupIpAssetRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1397
|
+
*/)},{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;}()/**
|
1379
1398
|
* method GROUP_NFT for contract GroupingModule
|
1380
1399
|
*
|
1381
1400
|
* @param request GroupingModuleGroupNftRequest
|
1382
1401
|
* @return Promise<GroupingModuleGroupNftResponse>
|
1383
|
-
*/)},{key:"groupNft",value:(function(){var _groupNft=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1402
|
+
*/)},{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;}()/**
|
1384
1403
|
* method IP_ACCOUNT_REGISTRY for contract GroupingModule
|
1385
1404
|
*
|
1386
1405
|
* @param request GroupingModuleIpAccountRegistryRequest
|
1387
1406
|
* @return Promise<GroupingModuleIpAccountRegistryResponse>
|
1388
|
-
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1407
|
+
*/)},{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;}()/**
|
1389
1408
|
* method LICENSE_REGISTRY for contract GroupingModule
|
1390
1409
|
*
|
1391
1410
|
* @param request GroupingModuleLicenseRegistryRequest
|
1392
1411
|
* @return Promise<GroupingModuleLicenseRegistryResponse>
|
1393
|
-
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1412
|
+
*/)},{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;}()/**
|
1394
1413
|
* method LICENSE_TOKEN for contract GroupingModule
|
1395
1414
|
*
|
1396
1415
|
* @param request GroupingModuleLicenseTokenRequest
|
1397
1416
|
* @return Promise<GroupingModuleLicenseTokenResponse>
|
1398
|
-
*/)},{key:"licenseToken",value:(function(){var _licenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1417
|
+
*/)},{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;}()/**
|
1399
1418
|
* method ROYALTY_MODULE for contract GroupingModule
|
1400
1419
|
*
|
1401
1420
|
* @param request GroupingModuleRoyaltyModuleRequest
|
1402
1421
|
* @return Promise<GroupingModuleRoyaltyModuleResponse>
|
1403
|
-
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1422
|
+
*/)},{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;}()/**
|
1404
1423
|
* method UPGRADE_INTERFACE_VERSION for contract GroupingModule
|
1405
1424
|
*
|
1406
1425
|
* @param request GroupingModuleUpgradeInterfaceVersionRequest
|
1407
1426
|
* @return Promise<GroupingModuleUpgradeInterfaceVersionResponse>
|
1408
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1427
|
+
*/)},{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;}()/**
|
1409
1428
|
* method authority for contract GroupingModule
|
1410
1429
|
*
|
1411
1430
|
* @param request GroupingModuleAuthorityRequest
|
1412
1431
|
* @return Promise<GroupingModuleAuthorityResponse>
|
1413
|
-
*/)},{key:"authority",value:(function(){var _authority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1432
|
+
*/)},{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;}()/**
|
1414
1433
|
* method getClaimableReward for contract GroupingModule
|
1415
1434
|
*
|
1416
1435
|
* @param request GroupingModuleGetClaimableRewardRequest
|
1417
1436
|
* @return Promise<GroupingModuleGetClaimableRewardResponse>
|
1418
|
-
*/)},{key:"getClaimableReward",value:(function(){var _getClaimableReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1437
|
+
*/)},{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;}()/**
|
1419
1438
|
* method isConsumingScheduledOp for contract GroupingModule
|
1420
1439
|
*
|
1421
1440
|
* @param request GroupingModuleIsConsumingScheduledOpRequest
|
1422
1441
|
* @return Promise<GroupingModuleIsConsumingScheduledOpResponse>
|
1423
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1442
|
+
*/)},{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;}()/**
|
1424
1443
|
* method name for contract GroupingModule
|
1425
1444
|
*
|
1426
1445
|
* @param request GroupingModuleNameRequest
|
1427
1446
|
* @return Promise<GroupingModuleNameResponse>
|
1428
|
-
*/)},{key:"name",value:(function(){var _name2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1447
|
+
*/)},{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;}()/**
|
1429
1448
|
* method paused for contract GroupingModule
|
1430
1449
|
*
|
1431
1450
|
* @param request GroupingModulePausedRequest
|
1432
1451
|
* @return Promise<GroupingModulePausedResponse>
|
1433
|
-
*/)},{key:"paused",value:(function(){var _paused2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1452
|
+
*/)},{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;}()/**
|
1434
1453
|
* method proxiableUUID for contract GroupingModule
|
1435
1454
|
*
|
1436
1455
|
* @param request GroupingModuleProxiableUuidRequest
|
1437
1456
|
* @return Promise<GroupingModuleProxiableUuidResponse>
|
1438
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1457
|
+
*/)},{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;}()/**
|
1439
1458
|
* method supportsInterface for contract GroupingModule
|
1440
1459
|
*
|
1441
1460
|
* @param request GroupingModuleSupportsInterfaceRequest
|
1442
1461
|
* @return Promise<GroupingModuleSupportsInterfaceResponse>
|
1443
|
-
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1462
|
+
*/)},{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);/**
|
1444
1463
|
* contract GroupingModule write method
|
1445
1464
|
*/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;}/**
|
1446
1465
|
* method __ProtocolPausable_init for contract GroupingModule
|
1447
1466
|
*
|
1448
1467
|
* @param request GroupingModuleProtocolPausableInitRequest
|
1449
1468
|
* @return Promise<WriteContractReturnType>
|
1450
|
-
*/_inherits(GroupingModuleClient,_GroupingModuleReadOn);return _createClass(GroupingModuleClient,[{key:"protocolPausableInit",value:(function(){var _protocolPausableInit2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1469
|
+
*/_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;}()/**
|
1451
1470
|
* method __ProtocolPausable_init for contract GroupingModule with only encode
|
1452
1471
|
*
|
1453
1472
|
* @param request GroupingModuleProtocolPausableInitRequest
|
@@ -1457,7 +1476,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1457
1476
|
*
|
1458
1477
|
* @param request GroupingModuleAddIpRequest
|
1459
1478
|
* @return Promise<WriteContractReturnType>
|
1460
|
-
*/},{key:"addIp",value:(function(){var _addIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1479
|
+
*/},{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;}()/**
|
1461
1480
|
* method addIp for contract GroupingModule with only encode
|
1462
1481
|
*
|
1463
1482
|
* @param request GroupingModuleAddIpRequest
|
@@ -1467,7 +1486,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1467
1486
|
*
|
1468
1487
|
* @param request GroupingModuleClaimRewardRequest
|
1469
1488
|
* @return Promise<WriteContractReturnType>
|
1470
|
-
*/},{key:"claimReward",value:(function(){var _claimReward=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1489
|
+
*/},{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;}()/**
|
1471
1490
|
* method claimReward for contract GroupingModule with only encode
|
1472
1491
|
*
|
1473
1492
|
* @param request GroupingModuleClaimRewardRequest
|
@@ -1477,7 +1496,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1477
1496
|
*
|
1478
1497
|
* @param request GroupingModuleCollectRoyaltiesRequest
|
1479
1498
|
* @return Promise<WriteContractReturnType>
|
1480
|
-
*/},{key:"collectRoyalties",value:(function(){var _collectRoyalties=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1499
|
+
*/},{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;}()/**
|
1481
1500
|
* method collectRoyalties for contract GroupingModule with only encode
|
1482
1501
|
*
|
1483
1502
|
* @param request GroupingModuleCollectRoyaltiesRequest
|
@@ -1487,7 +1506,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1487
1506
|
*
|
1488
1507
|
* @param request GroupingModuleInitializeRequest
|
1489
1508
|
* @return Promise<WriteContractReturnType>
|
1490
|
-
*/},{key:"initialize",value:(function(){var _initialize3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1509
|
+
*/},{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;}()/**
|
1491
1510
|
* method initialize for contract GroupingModule with only encode
|
1492
1511
|
*
|
1493
1512
|
* @param request GroupingModuleInitializeRequest
|
@@ -1497,7 +1516,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1497
1516
|
*
|
1498
1517
|
* @param request GroupingModulePauseRequest
|
1499
1518
|
* @return Promise<WriteContractReturnType>
|
1500
|
-
*/},{key:"pause",value:(function(){var _pause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1519
|
+
*/},{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;}()/**
|
1501
1520
|
* method pause for contract GroupingModule with only encode
|
1502
1521
|
*
|
1503
1522
|
* @param request GroupingModulePauseRequest
|
@@ -1507,7 +1526,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1507
1526
|
*
|
1508
1527
|
* @param request GroupingModuleRegisterGroupRequest
|
1509
1528
|
* @return Promise<WriteContractReturnType>
|
1510
|
-
*/},{key:"registerGroup",value:(function(){var _registerGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1529
|
+
*/},{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;}()/**
|
1511
1530
|
* method registerGroup for contract GroupingModule with only encode
|
1512
1531
|
*
|
1513
1532
|
* @param request GroupingModuleRegisterGroupRequest
|
@@ -1517,7 +1536,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1517
1536
|
*
|
1518
1537
|
* @param request GroupingModuleRemoveIpRequest
|
1519
1538
|
* @return Promise<WriteContractReturnType>
|
1520
|
-
*/},{key:"removeIp",value:(function(){var _removeIp2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1539
|
+
*/},{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;}()/**
|
1521
1540
|
* method removeIp for contract GroupingModule with only encode
|
1522
1541
|
*
|
1523
1542
|
* @param request GroupingModuleRemoveIpRequest
|
@@ -1527,7 +1546,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1527
1546
|
*
|
1528
1547
|
* @param request GroupingModuleSetAuthorityRequest
|
1529
1548
|
* @return Promise<WriteContractReturnType>
|
1530
|
-
*/},{key:"setAuthority",value:(function(){var _setAuthority3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1549
|
+
*/},{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;}()/**
|
1531
1550
|
* method setAuthority for contract GroupingModule with only encode
|
1532
1551
|
*
|
1533
1552
|
* @param request GroupingModuleSetAuthorityRequest
|
@@ -1537,7 +1556,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1537
1556
|
*
|
1538
1557
|
* @param request GroupingModuleUnpauseRequest
|
1539
1558
|
* @return Promise<WriteContractReturnType>
|
1540
|
-
*/},{key:"unpause",value:(function(){var _unpause2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1559
|
+
*/},{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;}()/**
|
1541
1560
|
* method unpause for contract GroupingModule with only encode
|
1542
1561
|
*
|
1543
1562
|
* @param request GroupingModuleUnpauseRequest
|
@@ -1547,7 +1566,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1547
1566
|
*
|
1548
1567
|
* @param request GroupingModuleUpgradeToAndCallRequest
|
1549
1568
|
* @return Promise<WriteContractReturnType>
|
1550
|
-
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1569
|
+
*/},{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;}()/**
|
1551
1570
|
* method upgradeToAndCall for contract GroupingModule with only encode
|
1552
1571
|
*
|
1553
1572
|
* @param request GroupingModuleUpgradeToAndCallRequest
|
@@ -1557,7 +1576,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1557
1576
|
*
|
1558
1577
|
* @param request GroupingModuleWhitelistGroupRewardPoolRequest
|
1559
1578
|
* @return Promise<WriteContractReturnType>
|
1560
|
-
*/},{key:"whitelistGroupRewardPool",value:(function(){var _whitelistGroupRewardPool=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1579
|
+
*/},{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;}()/**
|
1561
1580
|
* method whitelistGroupRewardPool for contract GroupingModule with only encode
|
1562
1581
|
*
|
1563
1582
|
* @param request GroupingModuleWhitelistGroupRewardPoolRequest
|
@@ -1604,7 +1623,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1604
1623
|
*
|
1605
1624
|
* @param request GroupingWorkflowsMintAndRegisterIpAndAttachLicenseAndAddToGroupRequest
|
1606
1625
|
* @return Promise<WriteContractReturnType>
|
1607
|
-
*/return _createClass(GroupingWorkflowsClient,[{key:"mintAndRegisterIpAndAttachLicenseAndAddToGroup",value:(function(){var _mintAndRegisterIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1626
|
+
*/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;}()/**
|
1608
1627
|
* method mintAndRegisterIpAndAttachLicenseAndAddToGroup for contract GroupingWorkflows with only encode
|
1609
1628
|
*
|
1610
1629
|
* @param request GroupingWorkflowsMintAndRegisterIpAndAttachLicenseAndAddToGroupRequest
|
@@ -1614,7 +1633,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1614
1633
|
*
|
1615
1634
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseRequest
|
1616
1635
|
* @return Promise<WriteContractReturnType>
|
1617
|
-
*/},{key:"registerGroupAndAttachLicense",value:(function(){var _registerGroupAndAttachLicense=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1636
|
+
*/},{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;}()/**
|
1618
1637
|
* method registerGroupAndAttachLicense for contract GroupingWorkflows with only encode
|
1619
1638
|
*
|
1620
1639
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseRequest
|
@@ -1624,7 +1643,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1624
1643
|
*
|
1625
1644
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseAndAddIpsRequest
|
1626
1645
|
* @return Promise<WriteContractReturnType>
|
1627
|
-
*/},{key:"registerGroupAndAttachLicenseAndAddIps",value:(function(){var _registerGroupAndAttachLicenseAndAddIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1646
|
+
*/},{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;}()/**
|
1628
1647
|
* method registerGroupAndAttachLicenseAndAddIps for contract GroupingWorkflows with only encode
|
1629
1648
|
*
|
1630
1649
|
* @param request GroupingWorkflowsRegisterGroupAndAttachLicenseAndAddIpsRequest
|
@@ -1634,7 +1653,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1634
1653
|
*
|
1635
1654
|
* @param request GroupingWorkflowsRegisterIpAndAttachLicenseAndAddToGroupRequest
|
1636
1655
|
* @return Promise<WriteContractReturnType>
|
1637
|
-
*/},{key:"registerIpAndAttachLicenseAndAddToGroup",value:(function(){var _registerIpAndAttachLicenseAndAddToGroup=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1656
|
+
*/},{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;}()/**
|
1638
1657
|
* method registerIpAndAttachLicenseAndAddToGroup for contract GroupingWorkflows with only encode
|
1639
1658
|
*
|
1640
1659
|
* @param request GroupingWorkflowsRegisterIpAndAttachLicenseAndAddToGroupRequest
|
@@ -1679,19 +1698,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1679
1698
|
*
|
1680
1699
|
* @param request IpAccountImplStateRequest
|
1681
1700
|
* @return Promise<IpAccountImplStateResponse>
|
1682
|
-
*/return _createClass(IpAccountImplReadOnlyClient,[{key:"state",value:(function(){var _state=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1701
|
+
*/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;}()/**
|
1683
1702
|
* method token for contract IPAccountImpl
|
1684
1703
|
*
|
1685
1704
|
* @param request IpAccountImplTokenRequest
|
1686
1705
|
* @return Promise<IpAccountImplTokenResponse>
|
1687
|
-
*/)},{key:"token",value:(function(){var _token=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1706
|
+
*/)},{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;}())}]);}();/**
|
1688
1707
|
* contract IPAccountImpl write method
|
1689
1708
|
*/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;}/**
|
1690
1709
|
* method execute for contract IPAccountImpl
|
1691
1710
|
*
|
1692
1711
|
* @param request IpAccountImplExecuteRequest
|
1693
1712
|
* @return Promise<WriteContractReturnType>
|
1694
|
-
*/_inherits(IpAccountImplClient,_IpAccountImplReadOnl);return _createClass(IpAccountImplClient,[{key:"execute",value:(function(){var _execute=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1713
|
+
*/_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;}()/**
|
1695
1714
|
* method execute for contract IPAccountImpl with only encode
|
1696
1715
|
*
|
1697
1716
|
* @param request IpAccountImplExecuteRequest
|
@@ -1701,7 +1720,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1701
1720
|
*
|
1702
1721
|
* @param request IpAccountImplExecute2Request
|
1703
1722
|
* @return Promise<WriteContractReturnType>
|
1704
|
-
*/},{key:"execute2",value:(function(){var _execute2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1723
|
+
*/},{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;}()/**
|
1705
1724
|
* method execute for contract IPAccountImpl with only encode
|
1706
1725
|
*
|
1707
1726
|
* @param request IpAccountImplExecute2Request
|
@@ -1711,7 +1730,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1711
1730
|
*
|
1712
1731
|
* @param request IpAccountImplExecuteWithSigRequest
|
1713
1732
|
* @return Promise<WriteContractReturnType>
|
1714
|
-
*/},{key:"executeWithSig",value:(function(){var _executeWithSig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1733
|
+
*/},{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;}()/**
|
1715
1734
|
* method executeWithSig for contract IPAccountImpl with only encode
|
1716
1735
|
*
|
1717
1736
|
* @param request IpAccountImplExecuteWithSigRequest
|
@@ -1768,19 +1787,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1768
1787
|
*
|
1769
1788
|
* @param request IpAssetRegistryIpIdRequest
|
1770
1789
|
* @return Promise<IpAssetRegistryIpIdResponse>
|
1771
|
-
*/_inherits(IpAssetRegistryReadOnlyClient,_IpAssetRegistryEvent);return _createClass(IpAssetRegistryReadOnlyClient,[{key:"ipId",value:(function(){var _ipId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1790
|
+
*/_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;}()/**
|
1772
1791
|
* method isRegistered for contract IPAssetRegistry
|
1773
1792
|
*
|
1774
1793
|
* @param request IpAssetRegistryIsRegisteredRequest
|
1775
1794
|
* @return Promise<IpAssetRegistryIsRegisteredResponse>
|
1776
|
-
*/)},{key:"isRegistered",value:(function(){var _isRegistered=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1795
|
+
*/)},{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);/**
|
1777
1796
|
* contract IPAssetRegistry write method
|
1778
1797
|
*/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;}/**
|
1779
1798
|
* method register for contract IPAssetRegistry
|
1780
1799
|
*
|
1781
1800
|
* @param request IpAssetRegistryRegisterRequest
|
1782
1801
|
* @return Promise<WriteContractReturnType>
|
1783
|
-
*/_inherits(IpAssetRegistryClient,_IpAssetRegistryReadO);return _createClass(IpAssetRegistryClient,[{key:"register",value:(function(){var _register=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1802
|
+
*/_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;}()/**
|
1784
1803
|
* method register for contract IPAssetRegistry with only encode
|
1785
1804
|
*
|
1786
1805
|
* @param request IpAssetRegistryRegisterRequest
|
@@ -1826,19 +1845,19 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1826
1845
|
*
|
1827
1846
|
* @param request IpRoyaltyVaultImplClaimableRevenueRequest
|
1828
1847
|
* @return Promise<IpRoyaltyVaultImplClaimableRevenueResponse>
|
1829
|
-
*/_inherits(IpRoyaltyVaultImplReadOnlyClient,_IpRoyaltyVaultImplEv);return _createClass(IpRoyaltyVaultImplReadOnlyClient,[{key:"claimableRevenue",value:(function(){var _claimableRevenue=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1848
|
+
*/_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;}()/**
|
1830
1849
|
* method ipId for contract IpRoyaltyVaultImpl
|
1831
1850
|
*
|
1832
1851
|
* @param request IpRoyaltyVaultImplIpIdRequest
|
1833
1852
|
* @return Promise<IpRoyaltyVaultImplIpIdResponse>
|
1834
|
-
*/)},{key:"ipId",value:(function(){var _ipId2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1853
|
+
*/)},{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);/**
|
1835
1854
|
* contract IpRoyaltyVaultImpl write method
|
1836
1855
|
*/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;}/**
|
1837
1856
|
* method claimRevenueOnBehalfBySnapshotBatch for contract IpRoyaltyVaultImpl
|
1838
1857
|
*
|
1839
1858
|
* @param request IpRoyaltyVaultImplClaimRevenueOnBehalfBySnapshotBatchRequest
|
1840
1859
|
* @return Promise<WriteContractReturnType>
|
1841
|
-
*/_inherits(IpRoyaltyVaultImplClient,_IpRoyaltyVaultImplRe);return _createClass(IpRoyaltyVaultImplClient,[{key:"claimRevenueOnBehalfBySnapshotBatch",value:(function(){var _claimRevenueOnBehalfBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1860
|
+
*/_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;}()/**
|
1842
1861
|
* method claimRevenueOnBehalfBySnapshotBatch for contract IpRoyaltyVaultImpl with only encode
|
1843
1862
|
*
|
1844
1863
|
* @param request IpRoyaltyVaultImplClaimRevenueOnBehalfBySnapshotBatchRequest
|
@@ -1848,7 +1867,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1848
1867
|
*
|
1849
1868
|
* @param request IpRoyaltyVaultImplSnapshotRequest
|
1850
1869
|
* @return Promise<WriteContractReturnType>
|
1851
|
-
*/},{key:"snapshot",value:(function(){var _snapshot=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1870
|
+
*/},{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;}()/**
|
1852
1871
|
* method snapshot for contract IpRoyaltyVaultImpl with only encode
|
1853
1872
|
*
|
1854
1873
|
* @param request IpRoyaltyVaultImplSnapshotRequest
|
@@ -1862,6 +1881,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1862
1881
|
* @param ipMetadata tuple
|
1863
1882
|
* @param terms tuple
|
1864
1883
|
*/ /**
|
1884
|
+
* LicenseAttachmentWorkflowsMulticallRequest
|
1885
|
+
*
|
1886
|
+
* @param data bytes[]
|
1887
|
+
*/ /**
|
1865
1888
|
* LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
1866
1889
|
*
|
1867
1890
|
* @param nftContract address
|
@@ -1883,17 +1906,27 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1883
1906
|
*
|
1884
1907
|
* @param request LicenseAttachmentWorkflowsMintAndRegisterIpAndAttachPilTermsRequest
|
1885
1908
|
* @return Promise<WriteContractReturnType>
|
1886
|
-
*/return _createClass(LicenseAttachmentWorkflowsClient,[{key:"mintAndRegisterIpAndAttachPilTerms",value:(function(){var _mintAndRegisterIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1909
|
+
*/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;}()/**
|
1887
1910
|
* method mintAndRegisterIpAndAttachPILTerms for contract LicenseAttachmentWorkflows with only encode
|
1888
1911
|
*
|
1889
1912
|
* @param request LicenseAttachmentWorkflowsMintAndRegisterIpAndAttachPilTermsRequest
|
1890
1913
|
* @return EncodedTxData
|
1891
1914
|
*/)},{key:"mintAndRegisterIpAndAttachPilTermsEncode",value:function mintAndRegisterIpAndAttachPilTermsEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:licenseAttachmentWorkflowsAbi,functionName:"mintAndRegisterIpAndAttachPILTerms",args:[request.spgNftContract,request.recipient,request.ipMetadata,request.terms]})};}/**
|
1915
|
+
* method multicall for contract LicenseAttachmentWorkflows
|
1916
|
+
*
|
1917
|
+
* @param request LicenseAttachmentWorkflowsMulticallRequest
|
1918
|
+
* @return Promise<WriteContractReturnType>
|
1919
|
+
*/},{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;}()/**
|
1920
|
+
* method multicall for contract LicenseAttachmentWorkflows with only encode
|
1921
|
+
*
|
1922
|
+
* @param request LicenseAttachmentWorkflowsMulticallRequest
|
1923
|
+
* @return EncodedTxData
|
1924
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:licenseAttachmentWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
1892
1925
|
* method registerIpAndAttachPILTerms for contract LicenseAttachmentWorkflows
|
1893
1926
|
*
|
1894
1927
|
* @param request LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
1895
1928
|
* @return Promise<WriteContractReturnType>
|
1896
|
-
*/},{key:"registerIpAndAttachPilTerms",value:(function(){var _registerIpAndAttachPilTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1929
|
+
*/},{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;}()/**
|
1897
1930
|
* method registerIpAndAttachPILTerms for contract LicenseAttachmentWorkflows with only encode
|
1898
1931
|
*
|
1899
1932
|
* @param request LicenseAttachmentWorkflowsRegisterIpAndAttachPilTermsRequest
|
@@ -1903,7 +1936,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
1903
1936
|
*
|
1904
1937
|
* @param request LicenseAttachmentWorkflowsRegisterPilTermsAndAttachRequest
|
1905
1938
|
* @return Promise<WriteContractReturnType>
|
1906
|
-
*/},{key:"registerPilTermsAndAttach",value:(function(){var _registerPilTermsAndAttach=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
1939
|
+
*/},{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;}()/**
|
1907
1940
|
* method registerPILTermsAndAttach for contract LicenseAttachmentWorkflows with only encode
|
1908
1941
|
*
|
1909
1942
|
* @param request LicenseAttachmentWorkflowsRegisterPilTermsAndAttachRequest
|
@@ -2139,137 +2172,137 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2139
2172
|
*
|
2140
2173
|
* @param request LicenseRegistryDisputeModuleRequest
|
2141
2174
|
* @return Promise<LicenseRegistryDisputeModuleResponse>
|
2142
|
-
*/_inherits(LicenseRegistryReadOnlyClient,_LicenseRegistryEvent);return _createClass(LicenseRegistryReadOnlyClient,[{key:"disputeModule",value:(function(){var _disputeModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2175
|
+
*/_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;}()/**
|
2143
2176
|
* method EXPIRATION_TIME for contract LicenseRegistry
|
2144
2177
|
*
|
2145
2178
|
* @param request LicenseRegistryExpirationTimeRequest
|
2146
2179
|
* @return Promise<LicenseRegistryExpirationTimeResponse>
|
2147
|
-
*/)},{key:"expirationTime",value:(function(){var _expirationTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2180
|
+
*/)},{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;}()/**
|
2148
2181
|
* method IP_GRAPH for contract LicenseRegistry
|
2149
2182
|
*
|
2150
2183
|
* @param request LicenseRegistryIpGraphRequest
|
2151
2184
|
* @return Promise<LicenseRegistryIpGraphResponse>
|
2152
|
-
*/)},{key:"ipGraph",value:(function(){var _ipGraph=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2185
|
+
*/)},{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;}()/**
|
2153
2186
|
* method IP_GRAPH_ACL for contract LicenseRegistry
|
2154
2187
|
*
|
2155
2188
|
* @param request LicenseRegistryIpGraphAclRequest
|
2156
2189
|
* @return Promise<LicenseRegistryIpGraphAclResponse>
|
2157
|
-
*/)},{key:"ipGraphAcl",value:(function(){var _ipGraphAcl=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2190
|
+
*/)},{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;}()/**
|
2158
2191
|
* method LICENSING_MODULE for contract LicenseRegistry
|
2159
2192
|
*
|
2160
2193
|
* @param request LicenseRegistryLicensingModuleRequest
|
2161
2194
|
* @return Promise<LicenseRegistryLicensingModuleResponse>
|
2162
|
-
*/)},{key:"licensingModule",value:(function(){var _licensingModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2195
|
+
*/)},{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;}()/**
|
2163
2196
|
* method UPGRADE_INTERFACE_VERSION for contract LicenseRegistry
|
2164
2197
|
*
|
2165
2198
|
* @param request LicenseRegistryUpgradeInterfaceVersionRequest
|
2166
2199
|
* @return Promise<LicenseRegistryUpgradeInterfaceVersionResponse>
|
2167
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2200
|
+
*/)},{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;}()/**
|
2168
2201
|
* method authority for contract LicenseRegistry
|
2169
2202
|
*
|
2170
2203
|
* @param request LicenseRegistryAuthorityRequest
|
2171
2204
|
* @return Promise<LicenseRegistryAuthorityResponse>
|
2172
|
-
*/)},{key:"authority",value:(function(){var _authority4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2205
|
+
*/)},{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;}()/**
|
2173
2206
|
* method exists for contract LicenseRegistry
|
2174
2207
|
*
|
2175
2208
|
* @param request LicenseRegistryExistsRequest
|
2176
2209
|
* @return Promise<LicenseRegistryExistsResponse>
|
2177
|
-
*/)},{key:"exists",value:(function(){var _exists=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2210
|
+
*/)},{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;}()/**
|
2178
2211
|
* method getAttachedLicenseTerms for contract LicenseRegistry
|
2179
2212
|
*
|
2180
2213
|
* @param request LicenseRegistryGetAttachedLicenseTermsRequest
|
2181
2214
|
* @return Promise<LicenseRegistryGetAttachedLicenseTermsResponse>
|
2182
|
-
*/)},{key:"getAttachedLicenseTerms",value:(function(){var _getAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2215
|
+
*/)},{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;}()/**
|
2183
2216
|
* method getAttachedLicenseTermsCount for contract LicenseRegistry
|
2184
2217
|
*
|
2185
2218
|
* @param request LicenseRegistryGetAttachedLicenseTermsCountRequest
|
2186
2219
|
* @return Promise<LicenseRegistryGetAttachedLicenseTermsCountResponse>
|
2187
|
-
*/)},{key:"getAttachedLicenseTermsCount",value:(function(){var _getAttachedLicenseTermsCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2220
|
+
*/)},{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;}()/**
|
2188
2221
|
* method getDefaultLicenseTerms for contract LicenseRegistry
|
2189
2222
|
*
|
2190
2223
|
* @param request LicenseRegistryGetDefaultLicenseTermsRequest
|
2191
2224
|
* @return Promise<LicenseRegistryGetDefaultLicenseTermsResponse>
|
2192
|
-
*/)},{key:"getDefaultLicenseTerms",value:(function(){var _getDefaultLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2225
|
+
*/)},{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;}()/**
|
2193
2226
|
* method getDerivativeIp for contract LicenseRegistry
|
2194
2227
|
*
|
2195
2228
|
* @param request LicenseRegistryGetDerivativeIpRequest
|
2196
2229
|
* @return Promise<LicenseRegistryGetDerivativeIpResponse>
|
2197
|
-
*/)},{key:"getDerivativeIp",value:(function(){var _getDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2230
|
+
*/)},{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;}()/**
|
2198
2231
|
* method getDerivativeIpCount for contract LicenseRegistry
|
2199
2232
|
*
|
2200
2233
|
* @param request LicenseRegistryGetDerivativeIpCountRequest
|
2201
2234
|
* @return Promise<LicenseRegistryGetDerivativeIpCountResponse>
|
2202
|
-
*/)},{key:"getDerivativeIpCount",value:(function(){var _getDerivativeIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2235
|
+
*/)},{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;}()/**
|
2203
2236
|
* method getExpireTime for contract LicenseRegistry
|
2204
2237
|
*
|
2205
2238
|
* @param request LicenseRegistryGetExpireTimeRequest
|
2206
2239
|
* @return Promise<LicenseRegistryGetExpireTimeResponse>
|
2207
|
-
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2240
|
+
*/)},{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;}()/**
|
2208
2241
|
* method getLicensingConfig for contract LicenseRegistry
|
2209
2242
|
*
|
2210
2243
|
* @param request LicenseRegistryGetLicensingConfigRequest
|
2211
2244
|
* @return Promise<LicenseRegistryGetLicensingConfigResponse>
|
2212
|
-
*/)},{key:"getLicensingConfig",value:(function(){var _getLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2245
|
+
*/)},{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;}()/**
|
2213
2246
|
* method getParentIp for contract LicenseRegistry
|
2214
2247
|
*
|
2215
2248
|
* @param request LicenseRegistryGetParentIpRequest
|
2216
2249
|
* @return Promise<LicenseRegistryGetParentIpResponse>
|
2217
|
-
*/)},{key:"getParentIp",value:(function(){var _getParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2250
|
+
*/)},{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;}()/**
|
2218
2251
|
* method getParentIpCount for contract LicenseRegistry
|
2219
2252
|
*
|
2220
2253
|
* @param request LicenseRegistryGetParentIpCountRequest
|
2221
2254
|
* @return Promise<LicenseRegistryGetParentIpCountResponse>
|
2222
|
-
*/)},{key:"getParentIpCount",value:(function(){var _getParentIpCount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2255
|
+
*/)},{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;}()/**
|
2223
2256
|
* method getParentLicenseTerms for contract LicenseRegistry
|
2224
2257
|
*
|
2225
2258
|
* @param request LicenseRegistryGetParentLicenseTermsRequest
|
2226
2259
|
* @return Promise<LicenseRegistryGetParentLicenseTermsResponse>
|
2227
|
-
*/)},{key:"getParentLicenseTerms",value:(function(){var _getParentLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2260
|
+
*/)},{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;}()/**
|
2228
2261
|
* method hasDerivativeIps for contract LicenseRegistry
|
2229
2262
|
*
|
2230
2263
|
* @param request LicenseRegistryHasDerivativeIpsRequest
|
2231
2264
|
* @return Promise<LicenseRegistryHasDerivativeIpsResponse>
|
2232
|
-
*/)},{key:"hasDerivativeIps",value:(function(){var _hasDerivativeIps=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2265
|
+
*/)},{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;}()/**
|
2233
2266
|
* method hasIpAttachedLicenseTerms for contract LicenseRegistry
|
2234
2267
|
*
|
2235
2268
|
* @param request LicenseRegistryHasIpAttachedLicenseTermsRequest
|
2236
2269
|
* @return Promise<LicenseRegistryHasIpAttachedLicenseTermsResponse>
|
2237
|
-
*/)},{key:"hasIpAttachedLicenseTerms",value:(function(){var _hasIpAttachedLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2270
|
+
*/)},{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;}()/**
|
2238
2271
|
* method isConsumingScheduledOp for contract LicenseRegistry
|
2239
2272
|
*
|
2240
2273
|
* @param request LicenseRegistryIsConsumingScheduledOpRequest
|
2241
2274
|
* @return Promise<LicenseRegistryIsConsumingScheduledOpResponse>
|
2242
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2275
|
+
*/)},{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;}()/**
|
2243
2276
|
* method isDerivativeIp for contract LicenseRegistry
|
2244
2277
|
*
|
2245
2278
|
* @param request LicenseRegistryIsDerivativeIpRequest
|
2246
2279
|
* @return Promise<LicenseRegistryIsDerivativeIpResponse>
|
2247
|
-
*/)},{key:"isDerivativeIp",value:(function(){var _isDerivativeIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2280
|
+
*/)},{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;}()/**
|
2248
2281
|
* method isExpiredNow for contract LicenseRegistry
|
2249
2282
|
*
|
2250
2283
|
* @param request LicenseRegistryIsExpiredNowRequest
|
2251
2284
|
* @return Promise<LicenseRegistryIsExpiredNowResponse>
|
2252
|
-
*/)},{key:"isExpiredNow",value:(function(){var _isExpiredNow=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2285
|
+
*/)},{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;}()/**
|
2253
2286
|
* method isParentIp for contract LicenseRegistry
|
2254
2287
|
*
|
2255
2288
|
* @param request LicenseRegistryIsParentIpRequest
|
2256
2289
|
* @return Promise<LicenseRegistryIsParentIpResponse>
|
2257
|
-
*/)},{key:"isParentIp",value:(function(){var _isParentIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2290
|
+
*/)},{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;}()/**
|
2258
2291
|
* method isRegisteredLicenseTemplate for contract LicenseRegistry
|
2259
2292
|
*
|
2260
2293
|
* @param request LicenseRegistryIsRegisteredLicenseTemplateRequest
|
2261
2294
|
* @return Promise<LicenseRegistryIsRegisteredLicenseTemplateResponse>
|
2262
|
-
*/)},{key:"isRegisteredLicenseTemplate",value:(function(){var _isRegisteredLicenseTemplate=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2295
|
+
*/)},{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;}()/**
|
2263
2296
|
* method proxiableUUID for contract LicenseRegistry
|
2264
2297
|
*
|
2265
2298
|
* @param request LicenseRegistryProxiableUuidRequest
|
2266
2299
|
* @return Promise<LicenseRegistryProxiableUuidResponse>
|
2267
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2300
|
+
*/)},{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;}()/**
|
2268
2301
|
* method verifyMintLicenseToken for contract LicenseRegistry
|
2269
2302
|
*
|
2270
2303
|
* @param request LicenseRegistryVerifyMintLicenseTokenRequest
|
2271
2304
|
* @return Promise<LicenseRegistryVerifyMintLicenseTokenResponse>
|
2272
|
-
*/)},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2305
|
+
*/)},{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);/**
|
2273
2306
|
* LicenseTokenOwnerOfRequest
|
2274
2307
|
*
|
2275
2308
|
* @param tokenId uint256
|
@@ -2280,7 +2313,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2280
2313
|
*
|
2281
2314
|
* @param request LicenseTokenOwnerOfRequest
|
2282
2315
|
* @return Promise<LicenseTokenOwnerOfResponse>
|
2283
|
-
*/return _createClass(LicenseTokenReadOnlyClient,[{key:"ownerOf",value:(function(){var _ownerOf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2316
|
+
*/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 =============================================================
|
2284
2317
|
/**
|
2285
2318
|
* LicensingModuleLicenseTermsAttachedEvent
|
2286
2319
|
*
|
@@ -2365,14 +2398,14 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2365
2398
|
*
|
2366
2399
|
* @param request LicensingModulePredictMintingLicenseFeeRequest
|
2367
2400
|
* @return Promise<LicensingModulePredictMintingLicenseFeeResponse>
|
2368
|
-
*/_inherits(LicensingModuleReadOnlyClient,_LicensingModuleEvent);return _createClass(LicensingModuleReadOnlyClient,[{key:"predictMintingLicenseFee",value:(function(){var _predictMintingLicenseFee=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2401
|
+
*/_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);/**
|
2369
2402
|
* contract LicensingModule write method
|
2370
2403
|
*/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;}/**
|
2371
2404
|
* method attachLicenseTerms for contract LicensingModule
|
2372
2405
|
*
|
2373
2406
|
* @param request LicensingModuleAttachLicenseTermsRequest
|
2374
2407
|
* @return Promise<WriteContractReturnType>
|
2375
|
-
*/_inherits(LicensingModuleClient,_LicensingModuleReadO);return _createClass(LicensingModuleClient,[{key:"attachLicenseTerms",value:(function(){var _attachLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2408
|
+
*/_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;}()/**
|
2376
2409
|
* method attachLicenseTerms for contract LicensingModule with only encode
|
2377
2410
|
*
|
2378
2411
|
* @param request LicensingModuleAttachLicenseTermsRequest
|
@@ -2382,7 +2415,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2382
2415
|
*
|
2383
2416
|
* @param request LicensingModuleMintLicenseTokensRequest
|
2384
2417
|
* @return Promise<WriteContractReturnType>
|
2385
|
-
*/},{key:"mintLicenseTokens",value:(function(){var _mintLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2418
|
+
*/},{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;}()/**
|
2386
2419
|
* method mintLicenseTokens for contract LicensingModule with only encode
|
2387
2420
|
*
|
2388
2421
|
* @param request LicensingModuleMintLicenseTokensRequest
|
@@ -2392,7 +2425,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2392
2425
|
*
|
2393
2426
|
* @param request LicensingModuleRegisterDerivativeRequest
|
2394
2427
|
* @return Promise<WriteContractReturnType>
|
2395
|
-
*/},{key:"registerDerivative",value:(function(){var _registerDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2428
|
+
*/},{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;}()/**
|
2396
2429
|
* method registerDerivative for contract LicensingModule with only encode
|
2397
2430
|
*
|
2398
2431
|
* @param request LicensingModuleRegisterDerivativeRequest
|
@@ -2402,7 +2435,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2402
2435
|
*
|
2403
2436
|
* @param request LicensingModuleRegisterDerivativeWithLicenseTokensRequest
|
2404
2437
|
* @return Promise<WriteContractReturnType>
|
2405
|
-
*/},{key:"registerDerivativeWithLicenseTokens",value:(function(){var _registerDerivativeWithLicenseTokens=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2438
|
+
*/},{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;}()/**
|
2406
2439
|
* method registerDerivativeWithLicenseTokens for contract LicensingModule with only encode
|
2407
2440
|
*
|
2408
2441
|
* @param request LicensingModuleRegisterDerivativeWithLicenseTokensRequest
|
@@ -2412,7 +2445,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2412
2445
|
*
|
2413
2446
|
* @param request LicensingModuleSetLicensingConfigRequest
|
2414
2447
|
* @return Promise<WriteContractReturnType>
|
2415
|
-
*/},{key:"setLicensingConfig",value:(function(){var _setLicensingConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2448
|
+
*/},{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;}()/**
|
2416
2449
|
* method setLicensingConfig for contract LicensingModule with only encode
|
2417
2450
|
*
|
2418
2451
|
* @param request LicensingModuleSetLicensingConfigRequest
|
@@ -2429,7 +2462,24 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2429
2462
|
*
|
2430
2463
|
* @param request ModuleRegistryIsRegisteredRequest
|
2431
2464
|
* @return Promise<ModuleRegistryIsRegisteredResponse>
|
2432
|
-
*/return _createClass(ModuleRegistryReadOnlyClient,[{key:"isRegistered",value:(function(){var _isRegistered2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2465
|
+
*/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 =============================================================
|
2466
|
+
/**
|
2467
|
+
* Multicall3Aggregate3Request
|
2468
|
+
*
|
2469
|
+
* @param calls tuple[]
|
2470
|
+
*/ /**
|
2471
|
+
* contract Multicall3 write method
|
2472
|
+
*/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;}/**
|
2473
|
+
* method aggregate3 for contract Multicall3
|
2474
|
+
*
|
2475
|
+
* @param request Multicall3Aggregate3Request
|
2476
|
+
* @return Promise<WriteContractReturnType>
|
2477
|
+
*/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;}()/**
|
2478
|
+
* method aggregate3 for contract Multicall3 with only encode
|
2479
|
+
*
|
2480
|
+
* @param request Multicall3Aggregate3Request
|
2481
|
+
* @return EncodedTxData
|
2482
|
+
*/)},{key:"aggregate3Encode",value:function aggregate3Encode(request){return {to:this.address,data:viem.encodeFunctionData({abi:multicall3Abi,functionName:"aggregate3",args:[request.calls]})};}}]);}();// Contract PILicenseTemplate =============================================================
|
2433
2483
|
/**
|
2434
2484
|
* PiLicenseTemplateAuthorityUpdatedEvent
|
2435
2485
|
*
|
@@ -2571,7 +2621,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2571
2621
|
* @param childIpOwner address
|
2572
2622
|
*/ /**
|
2573
2623
|
* contract PILicenseTemplate event
|
2574
|
-
*/var PiLicenseTemplateEventClient=/*#__PURE__*/function(){function PiLicenseTemplateEventClient(rpcClient,address){var _rpcClient$
|
2624
|
+
*/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;}/**
|
2575
2625
|
* event AuthorityUpdated for contract PILicenseTemplate
|
2576
2626
|
*/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);});}});}/**
|
2577
2627
|
* parse tx receipt event AuthorityUpdated for contract PILicenseTemplate
|
@@ -2598,129 +2648,129 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2598
2648
|
*
|
2599
2649
|
* @param request PiLicenseTemplateAccessControllerRequest
|
2600
2650
|
* @return Promise<PiLicenseTemplateAccessControllerResponse>
|
2601
|
-
*/_inherits(PiLicenseTemplateReadOnlyClient,_PiLicenseTemplateEve);return _createClass(PiLicenseTemplateReadOnlyClient,[{key:"accessController",value:(function(){var _accessController3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2651
|
+
*/_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;}()/**
|
2602
2652
|
* method IP_ACCOUNT_REGISTRY for contract PILicenseTemplate
|
2603
2653
|
*
|
2604
2654
|
* @param request PiLicenseTemplateIpAccountRegistryRequest
|
2605
2655
|
* @return Promise<PiLicenseTemplateIpAccountRegistryResponse>
|
2606
|
-
*/)},{key:"ipAccountRegistry",value:(function(){var _ipAccountRegistry3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2656
|
+
*/)},{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;}()/**
|
2607
2657
|
* method LICENSE_REGISTRY for contract PILicenseTemplate
|
2608
2658
|
*
|
2609
2659
|
* @param request PiLicenseTemplateLicenseRegistryRequest
|
2610
2660
|
* @return Promise<PiLicenseTemplateLicenseRegistryResponse>
|
2611
|
-
*/)},{key:"licenseRegistry",value:(function(){var _licenseRegistry2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2661
|
+
*/)},{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;}()/**
|
2612
2662
|
* method ROYALTY_MODULE for contract PILicenseTemplate
|
2613
2663
|
*
|
2614
2664
|
* @param request PiLicenseTemplateRoyaltyModuleRequest
|
2615
2665
|
* @return Promise<PiLicenseTemplateRoyaltyModuleResponse>
|
2616
|
-
*/)},{key:"royaltyModule",value:(function(){var _royaltyModule3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2666
|
+
*/)},{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;}()/**
|
2617
2667
|
* method TERMS_RENDERER for contract PILicenseTemplate
|
2618
2668
|
*
|
2619
2669
|
* @param request PiLicenseTemplateTermsRendererRequest
|
2620
2670
|
* @return Promise<PiLicenseTemplateTermsRendererResponse>
|
2621
|
-
*/)},{key:"termsRenderer",value:(function(){var _termsRenderer=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2671
|
+
*/)},{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;}()/**
|
2622
2672
|
* method UPGRADE_INTERFACE_VERSION for contract PILicenseTemplate
|
2623
2673
|
*
|
2624
2674
|
* @param request PiLicenseTemplateUpgradeInterfaceVersionRequest
|
2625
2675
|
* @return Promise<PiLicenseTemplateUpgradeInterfaceVersionResponse>
|
2626
|
-
*/)},{key:"upgradeInterfaceVersion",value:(function(){var _upgradeInterfaceVersion5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2676
|
+
*/)},{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;}()/**
|
2627
2677
|
* method authority for contract PILicenseTemplate
|
2628
2678
|
*
|
2629
2679
|
* @param request PiLicenseTemplateAuthorityRequest
|
2630
2680
|
* @return Promise<PiLicenseTemplateAuthorityResponse>
|
2631
|
-
*/)},{key:"authority",value:(function(){var _authority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2681
|
+
*/)},{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;}()/**
|
2632
2682
|
* method exists for contract PILicenseTemplate
|
2633
2683
|
*
|
2634
2684
|
* @param request PiLicenseTemplateExistsRequest
|
2635
2685
|
* @return Promise<PiLicenseTemplateExistsResponse>
|
2636
|
-
*/)},{key:"exists",value:(function(){var _exists2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2686
|
+
*/)},{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;}()/**
|
2637
2687
|
* method getEarlierExpireTime for contract PILicenseTemplate
|
2638
2688
|
*
|
2639
2689
|
* @param request PiLicenseTemplateGetEarlierExpireTimeRequest
|
2640
2690
|
* @return Promise<PiLicenseTemplateGetEarlierExpireTimeResponse>
|
2641
|
-
*/)},{key:"getEarlierExpireTime",value:(function(){var _getEarlierExpireTime=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2691
|
+
*/)},{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;}()/**
|
2642
2692
|
* method getExpireTime for contract PILicenseTemplate
|
2643
2693
|
*
|
2644
2694
|
* @param request PiLicenseTemplateGetExpireTimeRequest
|
2645
2695
|
* @return Promise<PiLicenseTemplateGetExpireTimeResponse>
|
2646
|
-
*/)},{key:"getExpireTime",value:(function(){var _getExpireTime2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2696
|
+
*/)},{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;}()/**
|
2647
2697
|
* method getLicenseTerms for contract PILicenseTemplate
|
2648
2698
|
*
|
2649
2699
|
* @param request PiLicenseTemplateGetLicenseTermsRequest
|
2650
2700
|
* @return Promise<PiLicenseTemplateGetLicenseTermsResponse>
|
2651
|
-
*/)},{key:"getLicenseTerms",value:(function(){var _getLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2701
|
+
*/)},{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;}()/**
|
2652
2702
|
* method getLicenseTermsId for contract PILicenseTemplate
|
2653
2703
|
*
|
2654
2704
|
* @param request PiLicenseTemplateGetLicenseTermsIdRequest
|
2655
2705
|
* @return Promise<PiLicenseTemplateGetLicenseTermsIdResponse>
|
2656
|
-
*/)},{key:"getLicenseTermsId",value:(function(){var _getLicenseTermsId=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2706
|
+
*/)},{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;}()/**
|
2657
2707
|
* method getLicenseTermsURI for contract PILicenseTemplate
|
2658
2708
|
*
|
2659
2709
|
* @param request PiLicenseTemplateGetLicenseTermsUriRequest
|
2660
2710
|
* @return Promise<PiLicenseTemplateGetLicenseTermsUriResponse>
|
2661
|
-
*/)},{key:"getLicenseTermsUri",value:(function(){var _getLicenseTermsUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2711
|
+
*/)},{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;}()/**
|
2662
2712
|
* method getMetadataURI for contract PILicenseTemplate
|
2663
2713
|
*
|
2664
2714
|
* @param request PiLicenseTemplateGetMetadataUriRequest
|
2665
2715
|
* @return Promise<PiLicenseTemplateGetMetadataUriResponse>
|
2666
|
-
*/)},{key:"getMetadataUri",value:(function(){var _getMetadataUri=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2716
|
+
*/)},{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;}()/**
|
2667
2717
|
* method getRoyaltyPolicy for contract PILicenseTemplate
|
2668
2718
|
*
|
2669
2719
|
* @param request PiLicenseTemplateGetRoyaltyPolicyRequest
|
2670
2720
|
* @return Promise<PiLicenseTemplateGetRoyaltyPolicyResponse>
|
2671
|
-
*/)},{key:"getRoyaltyPolicy",value:(function(){var _getRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2721
|
+
*/)},{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;}()/**
|
2672
2722
|
* method isConsumingScheduledOp for contract PILicenseTemplate
|
2673
2723
|
*
|
2674
2724
|
* @param request PiLicenseTemplateIsConsumingScheduledOpRequest
|
2675
2725
|
* @return Promise<PiLicenseTemplateIsConsumingScheduledOpResponse>
|
2676
|
-
*/)},{key:"isConsumingScheduledOp",value:(function(){var _isConsumingScheduledOp5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2726
|
+
*/)},{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;}()/**
|
2677
2727
|
* method isDerivativeApproved for contract PILicenseTemplate
|
2678
2728
|
*
|
2679
2729
|
* @param request PiLicenseTemplateIsDerivativeApprovedRequest
|
2680
2730
|
* @return Promise<PiLicenseTemplateIsDerivativeApprovedResponse>
|
2681
|
-
*/)},{key:"isDerivativeApproved",value:(function(){var _isDerivativeApproved=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2731
|
+
*/)},{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;}()/**
|
2682
2732
|
* method isLicenseTransferable for contract PILicenseTemplate
|
2683
2733
|
*
|
2684
2734
|
* @param request PiLicenseTemplateIsLicenseTransferableRequest
|
2685
2735
|
* @return Promise<PiLicenseTemplateIsLicenseTransferableResponse>
|
2686
|
-
*/)},{key:"isLicenseTransferable",value:(function(){var _isLicenseTransferable=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2736
|
+
*/)},{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;}()/**
|
2687
2737
|
* method name for contract PILicenseTemplate
|
2688
2738
|
*
|
2689
2739
|
* @param request PiLicenseTemplateNameRequest
|
2690
2740
|
* @return Promise<PiLicenseTemplateNameResponse>
|
2691
|
-
*/)},{key:"name",value:(function(){var _name4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2741
|
+
*/)},{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;}()/**
|
2692
2742
|
* method proxiableUUID for contract PILicenseTemplate
|
2693
2743
|
*
|
2694
2744
|
* @param request PiLicenseTemplateProxiableUuidRequest
|
2695
2745
|
* @return Promise<PiLicenseTemplateProxiableUuidResponse>
|
2696
|
-
*/)},{key:"proxiableUuid",value:(function(){var _proxiableUuid5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2746
|
+
*/)},{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;}()/**
|
2697
2747
|
* method supportsInterface for contract PILicenseTemplate
|
2698
2748
|
*
|
2699
2749
|
* @param request PiLicenseTemplateSupportsInterfaceRequest
|
2700
2750
|
* @return Promise<PiLicenseTemplateSupportsInterfaceResponse>
|
2701
|
-
*/)},{key:"supportsInterface",value:(function(){var _supportsInterface3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2751
|
+
*/)},{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;}()/**
|
2702
2752
|
* method toJson for contract PILicenseTemplate
|
2703
2753
|
*
|
2704
2754
|
* @param request PiLicenseTemplateToJsonRequest
|
2705
2755
|
* @return Promise<PiLicenseTemplateToJsonResponse>
|
2706
|
-
*/)},{key:"toJson",value:(function(){var _toJson=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2756
|
+
*/)},{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;}()/**
|
2707
2757
|
* method totalRegisteredLicenseTerms for contract PILicenseTemplate
|
2708
2758
|
*
|
2709
2759
|
* @param request PiLicenseTemplateTotalRegisteredLicenseTermsRequest
|
2710
2760
|
* @return Promise<PiLicenseTemplateTotalRegisteredLicenseTermsResponse>
|
2711
|
-
*/)},{key:"totalRegisteredLicenseTerms",value:(function(){var _totalRegisteredLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2761
|
+
*/)},{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;}()/**
|
2712
2762
|
* method verifyCompatibleLicenses for contract PILicenseTemplate
|
2713
2763
|
*
|
2714
2764
|
* @param request PiLicenseTemplateVerifyCompatibleLicensesRequest
|
2715
2765
|
* @return Promise<PiLicenseTemplateVerifyCompatibleLicensesResponse>
|
2716
|
-
*/)},{key:"verifyCompatibleLicenses",value:(function(){var _verifyCompatibleLicenses=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2766
|
+
*/)},{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);/**
|
2717
2767
|
* contract PILicenseTemplate write method
|
2718
2768
|
*/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;}/**
|
2719
2769
|
* method initialize for contract PILicenseTemplate
|
2720
2770
|
*
|
2721
2771
|
* @param request PiLicenseTemplateInitializeRequest
|
2722
2772
|
* @return Promise<WriteContractReturnType>
|
2723
|
-
*/_inherits(PiLicenseTemplateClient,_PiLicenseTemplateRea);return _createClass(PiLicenseTemplateClient,[{key:"initialize",value:(function(){var _initialize5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2773
|
+
*/_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;}()/**
|
2724
2774
|
* method initialize for contract PILicenseTemplate with only encode
|
2725
2775
|
*
|
2726
2776
|
* @param request PiLicenseTemplateInitializeRequest
|
@@ -2730,7 +2780,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2730
2780
|
*
|
2731
2781
|
* @param request PiLicenseTemplateRegisterLicenseTermsRequest
|
2732
2782
|
* @return Promise<WriteContractReturnType>
|
2733
|
-
*/},{key:"registerLicenseTerms",value:(function(){var _registerLicenseTerms=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2783
|
+
*/},{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;}()/**
|
2734
2784
|
* method registerLicenseTerms for contract PILicenseTemplate with only encode
|
2735
2785
|
*
|
2736
2786
|
* @param request PiLicenseTemplateRegisterLicenseTermsRequest
|
@@ -2740,7 +2790,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2740
2790
|
*
|
2741
2791
|
* @param request PiLicenseTemplateSetApprovalRequest
|
2742
2792
|
* @return Promise<WriteContractReturnType>
|
2743
|
-
*/},{key:"setApproval",value:(function(){var _setApproval=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2793
|
+
*/},{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;}()/**
|
2744
2794
|
* method setApproval for contract PILicenseTemplate with only encode
|
2745
2795
|
*
|
2746
2796
|
* @param request PiLicenseTemplateSetApprovalRequest
|
@@ -2750,7 +2800,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2750
2800
|
*
|
2751
2801
|
* @param request PiLicenseTemplateSetAuthorityRequest
|
2752
2802
|
* @return Promise<WriteContractReturnType>
|
2753
|
-
*/},{key:"setAuthority",value:(function(){var _setAuthority5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2803
|
+
*/},{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;}()/**
|
2754
2804
|
* method setAuthority for contract PILicenseTemplate with only encode
|
2755
2805
|
*
|
2756
2806
|
* @param request PiLicenseTemplateSetAuthorityRequest
|
@@ -2760,7 +2810,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2760
2810
|
*
|
2761
2811
|
* @param request PiLicenseTemplateUpgradeToAndCallRequest
|
2762
2812
|
* @return Promise<WriteContractReturnType>
|
2763
|
-
*/},{key:"upgradeToAndCall",value:(function(){var _upgradeToAndCall5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2813
|
+
*/},{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;}()/**
|
2764
2814
|
* method upgradeToAndCall for contract PILicenseTemplate with only encode
|
2765
2815
|
*
|
2766
2816
|
* @param request PiLicenseTemplateUpgradeToAndCallRequest
|
@@ -2770,7 +2820,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2770
2820
|
*
|
2771
2821
|
* @param request PiLicenseTemplateVerifyMintLicenseTokenRequest
|
2772
2822
|
* @return Promise<WriteContractReturnType>
|
2773
|
-
*/},{key:"verifyMintLicenseToken",value:(function(){var _verifyMintLicenseToken2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2823
|
+
*/},{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;}()/**
|
2774
2824
|
* method verifyMintLicenseToken for contract PILicenseTemplate with only encode
|
2775
2825
|
*
|
2776
2826
|
* @param request PiLicenseTemplateVerifyMintLicenseTokenRequest
|
@@ -2780,7 +2830,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2780
2830
|
*
|
2781
2831
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeRequest
|
2782
2832
|
* @return Promise<WriteContractReturnType>
|
2783
|
-
*/},{key:"verifyRegisterDerivative",value:(function(){var _verifyRegisterDerivative=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2833
|
+
*/},{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;}()/**
|
2784
2834
|
* method verifyRegisterDerivative for contract PILicenseTemplate with only encode
|
2785
2835
|
*
|
2786
2836
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeRequest
|
@@ -2790,7 +2840,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2790
2840
|
*
|
2791
2841
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest
|
2792
2842
|
* @return Promise<WriteContractReturnType>
|
2793
|
-
*/},{key:"verifyRegisterDerivativeForAllParents",value:(function(){var _verifyRegisterDerivativeForAllParents=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2843
|
+
*/},{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;}()/**
|
2794
2844
|
* method verifyRegisterDerivativeForAllParents for contract PILicenseTemplate with only encode
|
2795
2845
|
*
|
2796
2846
|
* @param request PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest
|
@@ -2811,6 +2861,10 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2811
2861
|
* @param recipient address
|
2812
2862
|
* @param ipMetadata tuple
|
2813
2863
|
*/ /**
|
2864
|
+
* RegistrationWorkflowsMulticallRequest
|
2865
|
+
*
|
2866
|
+
* @param data bytes[]
|
2867
|
+
*/ /**
|
2814
2868
|
* RegistrationWorkflowsRegisterIpRequest
|
2815
2869
|
*
|
2816
2870
|
* @param nftContract address
|
@@ -2819,7 +2873,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2819
2873
|
* @param sigMetadata tuple
|
2820
2874
|
*/ /**
|
2821
2875
|
* contract RegistrationWorkflows event
|
2822
|
-
*/var RegistrationWorkflowsEventClient=/*#__PURE__*/function(){function RegistrationWorkflowsEventClient(rpcClient,address){var _rpcClient$
|
2876
|
+
*/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;}/**
|
2823
2877
|
* event CollectionCreated for contract RegistrationWorkflows
|
2824
2878
|
*/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);});}});}/**
|
2825
2879
|
* parse tx receipt event CollectionCreated for contract RegistrationWorkflows
|
@@ -2830,7 +2884,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2830
2884
|
*
|
2831
2885
|
* @param request RegistrationWorkflowsCreateCollectionRequest
|
2832
2886
|
* @return Promise<WriteContractReturnType>
|
2833
|
-
*/_inherits(RegistrationWorkflowsClient,_RegistrationWorkflow);return _createClass(RegistrationWorkflowsClient,[{key:"createCollection",value:(function(){var _createCollection=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2887
|
+
*/_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;}()/**
|
2834
2888
|
* method createCollection for contract RegistrationWorkflows with only encode
|
2835
2889
|
*
|
2836
2890
|
* @param request RegistrationWorkflowsCreateCollectionRequest
|
@@ -2840,17 +2894,27 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2840
2894
|
*
|
2841
2895
|
* @param request RegistrationWorkflowsMintAndRegisterIpRequest
|
2842
2896
|
* @return Promise<WriteContractReturnType>
|
2843
|
-
*/},{key:"mintAndRegisterIp",value:(function(){var _mintAndRegisterIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2897
|
+
*/},{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;}()/**
|
2844
2898
|
* method mintAndRegisterIp for contract RegistrationWorkflows with only encode
|
2845
2899
|
*
|
2846
2900
|
* @param request RegistrationWorkflowsMintAndRegisterIpRequest
|
2847
2901
|
* @return EncodedTxData
|
2848
2902
|
*/)},{key:"mintAndRegisterIpEncode",value:function mintAndRegisterIpEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:registrationWorkflowsAbi,functionName:"mintAndRegisterIp",args:[request.spgNftContract,request.recipient,request.ipMetadata]})};}/**
|
2903
|
+
* method multicall for contract RegistrationWorkflows
|
2904
|
+
*
|
2905
|
+
* @param request RegistrationWorkflowsMulticallRequest
|
2906
|
+
* @return Promise<WriteContractReturnType>
|
2907
|
+
*/},{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;}()/**
|
2908
|
+
* method multicall for contract RegistrationWorkflows with only encode
|
2909
|
+
*
|
2910
|
+
* @param request RegistrationWorkflowsMulticallRequest
|
2911
|
+
* @return EncodedTxData
|
2912
|
+
*/)},{key:"multicallEncode",value:function multicallEncode(request){return {to:this.address,data:viem.encodeFunctionData({abi:registrationWorkflowsAbi,functionName:"multicall",args:[request.data]})};}/**
|
2849
2913
|
* method registerIp for contract RegistrationWorkflows
|
2850
2914
|
*
|
2851
2915
|
* @param request RegistrationWorkflowsRegisterIpRequest
|
2852
2916
|
* @return Promise<WriteContractReturnType>
|
2853
|
-
*/},{key:"registerIp",value:(function(){var _registerIp=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2917
|
+
*/},{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;}()/**
|
2854
2918
|
* method registerIp for contract RegistrationWorkflows with only encode
|
2855
2919
|
*
|
2856
2920
|
* @param request RegistrationWorkflowsRegisterIpRequest
|
@@ -2877,29 +2941,29 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2877
2941
|
* @param amount uint256
|
2878
2942
|
*/ /**
|
2879
2943
|
* contract RoyaltyModule readonly method
|
2880
|
-
*/var RoyaltyModuleReadOnlyClient=/*#__PURE__*/function(){function RoyaltyModuleReadOnlyClient(rpcClient,address){var _rpcClient$
|
2944
|
+
*/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;}/**
|
2881
2945
|
* method ipRoyaltyVaults for contract RoyaltyModule
|
2882
2946
|
*
|
2883
2947
|
* @param request RoyaltyModuleIpRoyaltyVaultsRequest
|
2884
2948
|
* @return Promise<RoyaltyModuleIpRoyaltyVaultsResponse>
|
2885
|
-
*/return _createClass(RoyaltyModuleReadOnlyClient,[{key:"ipRoyaltyVaults",value:(function(){var _ipRoyaltyVaults=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2949
|
+
*/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;}()/**
|
2886
2950
|
* method isWhitelistedRoyaltyPolicy for contract RoyaltyModule
|
2887
2951
|
*
|
2888
2952
|
* @param request RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest
|
2889
2953
|
* @return Promise<RoyaltyModuleIsWhitelistedRoyaltyPolicyResponse>
|
2890
|
-
*/)},{key:"isWhitelistedRoyaltyPolicy",value:(function(){var _isWhitelistedRoyaltyPolicy=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2954
|
+
*/)},{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;}()/**
|
2891
2955
|
* method isWhitelistedRoyaltyToken for contract RoyaltyModule
|
2892
2956
|
*
|
2893
2957
|
* @param request RoyaltyModuleIsWhitelistedRoyaltyTokenRequest
|
2894
2958
|
* @return Promise<RoyaltyModuleIsWhitelistedRoyaltyTokenResponse>
|
2895
|
-
*/)},{key:"isWhitelistedRoyaltyToken",value:(function(){var _isWhitelistedRoyaltyToken=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2959
|
+
*/)},{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;}())}]);}();/**
|
2896
2960
|
* contract RoyaltyModule write method
|
2897
2961
|
*/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;}/**
|
2898
2962
|
* method payRoyaltyOnBehalf for contract RoyaltyModule
|
2899
2963
|
*
|
2900
2964
|
* @param request RoyaltyModulePayRoyaltyOnBehalfRequest
|
2901
2965
|
* @return Promise<WriteContractReturnType>
|
2902
|
-
*/_inherits(RoyaltyModuleClient,_RoyaltyModuleReadOnl);return _createClass(RoyaltyModuleClient,[{key:"payRoyaltyOnBehalf",value:(function(){var _payRoyaltyOnBehalf=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
2966
|
+
*/_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;}()/**
|
2903
2967
|
* method payRoyaltyOnBehalf for contract RoyaltyModule with only encode
|
2904
2968
|
*
|
2905
2969
|
* @param request RoyaltyModulePayRoyaltyOnBehalfRequest
|
@@ -2933,12 +2997,12 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2933
2997
|
* @param royaltyClaimDetails tuple[]
|
2934
2998
|
*/ /**
|
2935
2999
|
* contract RoyaltyWorkflows write method
|
2936
|
-
*/var RoyaltyWorkflowsClient=/*#__PURE__*/function(){function RoyaltyWorkflowsClient(rpcClient,wallet,address){var _rpcClient$
|
3000
|
+
*/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;}/**
|
2937
3001
|
* method snapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows
|
2938
3002
|
*
|
2939
3003
|
* @param request RoyaltyWorkflowsSnapshotAndClaimBySnapshotBatchRequest
|
2940
3004
|
* @return Promise<WriteContractReturnType>
|
2941
|
-
*/return _createClass(RoyaltyWorkflowsClient,[{key:"snapshotAndClaimBySnapshotBatch",value:(function(){var _snapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
3005
|
+
*/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;}()/**
|
2942
3006
|
* method snapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows with only encode
|
2943
3007
|
*
|
2944
3008
|
* @param request RoyaltyWorkflowsSnapshotAndClaimBySnapshotBatchRequest
|
@@ -2948,7 +3012,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2948
3012
|
*
|
2949
3013
|
* @param request RoyaltyWorkflowsSnapshotAndClaimByTokenBatchRequest
|
2950
3014
|
* @return Promise<WriteContractReturnType>
|
2951
|
-
*/},{key:"snapshotAndClaimByTokenBatch",value:(function(){var _snapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
3015
|
+
*/},{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;}()/**
|
2952
3016
|
* method snapshotAndClaimByTokenBatch for contract RoyaltyWorkflows with only encode
|
2953
3017
|
*
|
2954
3018
|
* @param request RoyaltyWorkflowsSnapshotAndClaimByTokenBatchRequest
|
@@ -2958,7 +3022,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2958
3022
|
*
|
2959
3023
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest
|
2960
3024
|
* @return Promise<WriteContractReturnType>
|
2961
|
-
*/},{key:"transferToVaultAndSnapshotAndClaimBySnapshotBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimBySnapshotBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
3025
|
+
*/},{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;}()/**
|
2962
3026
|
* method transferToVaultAndSnapshotAndClaimBySnapshotBatch for contract RoyaltyWorkflows with only encode
|
2963
3027
|
*
|
2964
3028
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimBySnapshotBatchRequest
|
@@ -2968,7 +3032,7 @@ function getAddress(address,chainId){return address[chainId||0]||"0x";}// Contra
|
|
2968
3032
|
*
|
2969
3033
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimByTokenBatchRequest
|
2970
3034
|
* @return Promise<WriteContractReturnType>
|
2971
|
-
*/},{key:"transferToVaultAndSnapshotAndClaimByTokenBatch",value:(function(){var _transferToVaultAndSnapshotAndClaimByTokenBatch=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
3035
|
+
*/},{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;}()/**
|
2972
3036
|
* method transferToVaultAndSnapshotAndClaimByTokenBatch for contract RoyaltyWorkflows with only encode
|
2973
3037
|
*
|
2974
3038
|
* @param request RoyaltyWorkflowsTransferToVaultAndSnapshotAndClaimByTokenBatchRequest
|
@@ -3173,23 +3237,11 @@ var defaultFunctionSelector = "0x00000000";
|
|
3173
3237
|
*/
|
3174
3238
|
var getPermissionSignature = /*#__PURE__*/function () {
|
3175
3239
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(param) {
|
3176
|
-
var ipId, deadline, state, wallet, chainId, permissions, permissionFunc, permissionFunction, accessAddress, data
|
3240
|
+
var ipId, deadline, state, wallet, chainId, permissions, permissionFunc, permissionFunction, accessAddress, data;
|
3177
3241
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3178
3242
|
while (1) switch (_context.prev = _context.next) {
|
3179
3243
|
case 0:
|
3180
3244
|
ipId = param.ipId, deadline = param.deadline, state = param.state, wallet = param.wallet, chainId = param.chainId, permissions = param.permissions, permissionFunc = param.permissionFunc;
|
3181
|
-
if (wallet.signTypedData) {
|
3182
|
-
_context.next = 3;
|
3183
|
-
break;
|
3184
|
-
}
|
3185
|
-
throw new Error("The wallet client does not support signTypedData, please try again.");
|
3186
|
-
case 3:
|
3187
|
-
if (wallet.account) {
|
3188
|
-
_context.next = 5;
|
3189
|
-
break;
|
3190
|
-
}
|
3191
|
-
throw new Error("The wallet client does not have an account, please try again.");
|
3192
|
-
case 5:
|
3193
3245
|
permissionFunction = permissionFunc ? permissionFunc : "setPermission";
|
3194
3246
|
accessAddress = accessControllerAddress[Number(chainId)];
|
3195
3247
|
data = viem.encodeFunctionData({
|
@@ -3205,6 +3257,66 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3205
3257
|
};
|
3206
3258
|
})]
|
3207
3259
|
});
|
3260
|
+
_context.next = 6;
|
3261
|
+
return getSignature({
|
3262
|
+
state: state,
|
3263
|
+
to: accessAddress,
|
3264
|
+
encodeData: data,
|
3265
|
+
wallet: wallet,
|
3266
|
+
verifyingContract: ipId,
|
3267
|
+
deadline: deadline,
|
3268
|
+
chainId: chainId
|
3269
|
+
});
|
3270
|
+
case 6:
|
3271
|
+
return _context.abrupt("return", _context.sent);
|
3272
|
+
case 7:
|
3273
|
+
case "end":
|
3274
|
+
return _context.stop();
|
3275
|
+
}
|
3276
|
+
}, _callee);
|
3277
|
+
}));
|
3278
|
+
return function getPermissionSignature(_x) {
|
3279
|
+
return _ref.apply(this, arguments);
|
3280
|
+
};
|
3281
|
+
}();
|
3282
|
+
var getDeadline = function getDeadline(unixTimestamp, deadline) {
|
3283
|
+
if (deadline && (isNaN(Number(deadline)) || BigInt(deadline) < 0n)) {
|
3284
|
+
throw new Error("Invalid deadline value.");
|
3285
|
+
}
|
3286
|
+
return deadline ? unixTimestamp + BigInt(deadline) : unixTimestamp + 1000n;
|
3287
|
+
};
|
3288
|
+
|
3289
|
+
/**
|
3290
|
+
* Get the signature.
|
3291
|
+
* @param param - The parameter object containing necessary data to get the signature.
|
3292
|
+
* @param param.state - The IP Account's state.
|
3293
|
+
* @param param.to - The recipient address.
|
3294
|
+
* @param param.encodeData - The encoded data.
|
3295
|
+
* @param param.wallet - The wallet client.
|
3296
|
+
* @param param.verifyingContract - The verifying contract.
|
3297
|
+
* @param param.deadline - The deadline.
|
3298
|
+
* @param param.chainId - The chain ID.
|
3299
|
+
* @returns A Promise that resolves to the signature.
|
3300
|
+
*/
|
3301
|
+
var getSignature = /*#__PURE__*/function () {
|
3302
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
3303
|
+
var state, to, encodeData, wallet, verifyingContract, deadline, chainId, nonce;
|
3304
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
3305
|
+
while (1) switch (_context2.prev = _context2.next) {
|
3306
|
+
case 0:
|
3307
|
+
state = _ref2.state, to = _ref2.to, encodeData = _ref2.encodeData, wallet = _ref2.wallet, verifyingContract = _ref2.verifyingContract, deadline = _ref2.deadline, chainId = _ref2.chainId;
|
3308
|
+
if (wallet.signTypedData) {
|
3309
|
+
_context2.next = 3;
|
3310
|
+
break;
|
3311
|
+
}
|
3312
|
+
throw new Error("The wallet client does not support signTypedData, please try again.");
|
3313
|
+
case 3:
|
3314
|
+
if (wallet.account) {
|
3315
|
+
_context2.next = 5;
|
3316
|
+
break;
|
3317
|
+
}
|
3318
|
+
throw new Error("The wallet client does not have an account, please try again.");
|
3319
|
+
case 5:
|
3208
3320
|
nonce = viem.keccak256(viem.encodeAbiParameters([{
|
3209
3321
|
name: "",
|
3210
3322
|
type: "bytes32"
|
@@ -3214,16 +3326,16 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3214
3326
|
}], [state, viem.encodeFunctionData({
|
3215
3327
|
abi: ipAccountImplAbi,
|
3216
3328
|
functionName: "execute",
|
3217
|
-
args: [
|
3329
|
+
args: [to, 0n, encodeData]
|
3218
3330
|
})]));
|
3219
|
-
|
3331
|
+
_context2.next = 8;
|
3220
3332
|
return wallet.signTypedData({
|
3221
3333
|
account: wallet.account,
|
3222
3334
|
domain: {
|
3223
3335
|
name: "Story Protocol IP Account",
|
3224
3336
|
version: "1",
|
3225
3337
|
chainId: Number(chainId),
|
3226
|
-
verifyingContract:
|
3338
|
+
verifyingContract: verifyingContract
|
3227
3339
|
},
|
3228
3340
|
types: {
|
3229
3341
|
Execute: [{
|
@@ -3245,32 +3357,25 @@ var getPermissionSignature = /*#__PURE__*/function () {
|
|
3245
3357
|
},
|
3246
3358
|
primaryType: "Execute",
|
3247
3359
|
message: {
|
3248
|
-
to:
|
3360
|
+
to: to,
|
3249
3361
|
value: BigInt(0),
|
3250
|
-
data:
|
3362
|
+
data: encodeData,
|
3251
3363
|
nonce: nonce,
|
3252
3364
|
deadline: BigInt(deadline)
|
3253
3365
|
}
|
3254
3366
|
});
|
3255
|
-
case
|
3256
|
-
return
|
3257
|
-
case
|
3367
|
+
case 8:
|
3368
|
+
return _context2.abrupt("return", _context2.sent);
|
3369
|
+
case 9:
|
3258
3370
|
case "end":
|
3259
|
-
return
|
3371
|
+
return _context2.stop();
|
3260
3372
|
}
|
3261
|
-
},
|
3373
|
+
}, _callee2);
|
3262
3374
|
}));
|
3263
|
-
return function
|
3264
|
-
return
|
3375
|
+
return function getSignature(_x2) {
|
3376
|
+
return _ref3.apply(this, arguments);
|
3265
3377
|
};
|
3266
3378
|
}();
|
3267
|
-
var getDeadline = function getDeadline(deadline) {
|
3268
|
-
if (deadline && (isNaN(Number(deadline)) || BigInt(deadline) < 0n)) {
|
3269
|
-
throw new Error("Invalid deadline value.");
|
3270
|
-
}
|
3271
|
-
var timestamp = BigInt(Date.now());
|
3272
|
-
return deadline ? timestamp + BigInt(deadline) : timestamp + 1000n;
|
3273
|
-
};
|
3274
3379
|
|
3275
3380
|
/**
|
3276
3381
|
* Permission level
|
@@ -3297,9 +3402,11 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3297
3402
|
this.registrationWorkflowsClient = new RegistrationWorkflowsClient(rpcClient, wallet);
|
3298
3403
|
this.licenseAttachmentWorkflowsClient = new LicenseAttachmentWorkflowsClient(rpcClient, wallet);
|
3299
3404
|
this.derivativeWorkflowsClient = new DerivativeWorkflowsClient(rpcClient, wallet);
|
3405
|
+
this.multicall3Client = new Multicall3Client(rpcClient, wallet);
|
3300
3406
|
this.rpcClient = rpcClient;
|
3301
3407
|
this.wallet = wallet;
|
3302
3408
|
this.chainId = chainId;
|
3409
|
+
void this.getDefaultLicenseTerms();
|
3303
3410
|
}
|
3304
3411
|
|
3305
3412
|
/**
|
@@ -3432,7 +3539,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3432
3539
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
3433
3540
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3434
3541
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3435
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
3542
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3436
3543
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3437
3544
|
* @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.
|
3438
3545
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
@@ -3441,7 +3548,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3441
3548
|
key: "register",
|
3442
3549
|
value: (function () {
|
3443
3550
|
var _register = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
3444
|
-
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions, tokenId, ipIdAddress, isRegistered, object, _request$txOptions2, txHash,
|
3551
|
+
var _request$ipMetadata, _request$ipMetadata2, _request$ipMetadata3, _request$ipMetadata4, _request$txOptions, tokenId, ipIdAddress, isRegistered, object, blockTimestamp, calculatedDeadline, signature, _request$txOptions2, txHash, txReceipt, targetLogs;
|
3445
3552
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3446
3553
|
while (1) switch (_context.prev = _context.next) {
|
3447
3554
|
case 0:
|
@@ -3478,35 +3585,16 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3478
3585
|
signature: viem.zeroHash
|
3479
3586
|
}
|
3480
3587
|
};
|
3481
|
-
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.encodedTxDataOnly)) {
|
3482
|
-
_context.next = 19;
|
3483
|
-
break;
|
3484
|
-
}
|
3485
|
-
if (!request.ipMetadata) {
|
3486
|
-
_context.next = 16;
|
3487
|
-
break;
|
3488
|
-
}
|
3489
|
-
return _context.abrupt("return", {
|
3490
|
-
encodedTxData: this.registrationWorkflowsClient.registerIpEncode(object)
|
3491
|
-
});
|
3492
|
-
case 16:
|
3493
|
-
return _context.abrupt("return", {
|
3494
|
-
encodedTxData: this.ipAssetRegistryClient.registerEncode({
|
3495
|
-
tokenContract: object.nftContract,
|
3496
|
-
tokenId: object.tokenId,
|
3497
|
-
chainid: BigInt(chain[this.chainId])
|
3498
|
-
})
|
3499
|
-
});
|
3500
|
-
case 17:
|
3501
|
-
_context.next = 42;
|
3502
|
-
break;
|
3503
|
-
case 19:
|
3504
3588
|
if (!request.ipMetadata) {
|
3505
|
-
_context.next =
|
3589
|
+
_context.next = 20;
|
3506
3590
|
break;
|
3507
3591
|
}
|
3508
|
-
|
3509
|
-
|
3592
|
+
_context.next = 14;
|
3593
|
+
return this.rpcClient.getBlock();
|
3594
|
+
case 14:
|
3595
|
+
blockTimestamp = _context.sent.timestamp;
|
3596
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
3597
|
+
_context.next = 18;
|
3510
3598
|
return getPermissionSignature({
|
3511
3599
|
ipId: ipIdAddress,
|
3512
3600
|
deadline: calculatedDeadline,
|
@@ -3523,67 +3611,217 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3523
3611
|
func: "function setAll(address,string,bytes32,bytes32)"
|
3524
3612
|
}]
|
3525
3613
|
});
|
3526
|
-
case
|
3614
|
+
case 18:
|
3527
3615
|
signature = _context.sent;
|
3528
3616
|
object.sigMetadata = {
|
3529
3617
|
signer: getAddress$1(this.wallet.account.address, "wallet.account.address"),
|
3530
3618
|
deadline: calculatedDeadline,
|
3531
3619
|
signature: signature
|
3532
3620
|
};
|
3533
|
-
|
3621
|
+
case 20:
|
3622
|
+
if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.encodedTxDataOnly)) {
|
3623
|
+
_context.next = 28;
|
3624
|
+
break;
|
3625
|
+
}
|
3626
|
+
if (!request.ipMetadata) {
|
3627
|
+
_context.next = 25;
|
3628
|
+
break;
|
3629
|
+
}
|
3630
|
+
return _context.abrupt("return", {
|
3631
|
+
encodedTxData: this.registrationWorkflowsClient.registerIpEncode(object)
|
3632
|
+
});
|
3633
|
+
case 25:
|
3634
|
+
return _context.abrupt("return", {
|
3635
|
+
encodedTxData: this.ipAssetRegistryClient.registerEncode({
|
3636
|
+
tokenContract: object.nftContract,
|
3637
|
+
tokenId: object.tokenId,
|
3638
|
+
chainid: BigInt(chain[this.chainId])
|
3639
|
+
})
|
3640
|
+
});
|
3641
|
+
case 26:
|
3642
|
+
_context.next = 46;
|
3643
|
+
break;
|
3644
|
+
case 28:
|
3645
|
+
if (!request.ipMetadata) {
|
3646
|
+
_context.next = 34;
|
3647
|
+
break;
|
3648
|
+
}
|
3649
|
+
_context.next = 31;
|
3534
3650
|
return this.registrationWorkflowsClient.registerIp(object);
|
3535
|
-
case
|
3651
|
+
case 31:
|
3536
3652
|
txHash = _context.sent;
|
3537
|
-
_context.next =
|
3653
|
+
_context.next = 37;
|
3538
3654
|
break;
|
3539
|
-
case
|
3540
|
-
_context.next =
|
3655
|
+
case 34:
|
3656
|
+
_context.next = 36;
|
3541
3657
|
return this.ipAssetRegistryClient.register({
|
3542
3658
|
tokenContract: object.nftContract,
|
3543
3659
|
tokenId: object.tokenId,
|
3544
|
-
chainid: BigInt(
|
3660
|
+
chainid: BigInt(this.chainId)
|
3545
3661
|
});
|
3546
|
-
case
|
3662
|
+
case 36:
|
3547
3663
|
txHash = _context.sent;
|
3548
|
-
case
|
3664
|
+
case 37:
|
3549
3665
|
if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
|
3550
|
-
_context.next =
|
3666
|
+
_context.next = 45;
|
3551
3667
|
break;
|
3552
3668
|
}
|
3553
|
-
_context.next =
|
3669
|
+
_context.next = 40;
|
3554
3670
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3555
3671
|
hash: txHash
|
3556
3672
|
}));
|
3557
|
-
case
|
3673
|
+
case 40:
|
3558
3674
|
txReceipt = _context.sent;
|
3559
|
-
targetLogs = this.
|
3675
|
+
targetLogs = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
3560
3676
|
return _context.abrupt("return", {
|
3561
3677
|
txHash: txHash,
|
3562
|
-
ipId: targetLogs
|
3563
|
-
tokenId: targetLogs
|
3678
|
+
ipId: targetLogs.ipId,
|
3679
|
+
tokenId: targetLogs.tokenId
|
3564
3680
|
});
|
3565
|
-
case
|
3681
|
+
case 45:
|
3566
3682
|
return _context.abrupt("return", {
|
3567
3683
|
txHash: txHash
|
3568
3684
|
});
|
3569
|
-
case
|
3570
|
-
_context.next =
|
3685
|
+
case 46:
|
3686
|
+
_context.next = 51;
|
3571
3687
|
break;
|
3572
|
-
case
|
3573
|
-
_context.prev =
|
3688
|
+
case 48:
|
3689
|
+
_context.prev = 48;
|
3574
3690
|
_context.t0 = _context["catch"](0);
|
3575
3691
|
handleError(_context.t0, "Failed to register IP");
|
3576
|
-
case
|
3692
|
+
case 51:
|
3577
3693
|
case "end":
|
3578
3694
|
return _context.stop();
|
3579
3695
|
}
|
3580
|
-
}, _callee, this, [[0,
|
3696
|
+
}, _callee, this, [[0, 48]]);
|
3581
3697
|
}));
|
3582
3698
|
function register(_x) {
|
3583
3699
|
return _register.apply(this, arguments);
|
3584
3700
|
}
|
3585
3701
|
return register;
|
3586
3702
|
}()
|
3703
|
+
/**
|
3704
|
+
* Batch registers an NFT as IP, creating a corresponding IP record.
|
3705
|
+
* @param request - The request object that contains all data needed to batch register IP.
|
3706
|
+
* @param {Array} request.args The array of objects containing the data needed to register IP.
|
3707
|
+
* @param request.args.nftContract The address of the NFT.
|
3708
|
+
* @param request.args.tokenId The token identifier of the NFT.
|
3709
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
3710
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
3711
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
3712
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3713
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3714
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3715
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes IP ID, Token ID.
|
3716
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, resolverAddr, metadataProviderAddress, metadata)
|
3717
|
+
*/
|
3718
|
+
)
|
3719
|
+
}, {
|
3720
|
+
key: "batchRegister",
|
3721
|
+
value: (function () {
|
3722
|
+
var _batchRegister = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
3723
|
+
var _request$txOptions3, contracts, encodedTxData, _iterator, _step, arg, result, isSpg, txHash, txReceipt, targetLogs, results;
|
3724
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
3725
|
+
while (1) switch (_context2.prev = _context2.next) {
|
3726
|
+
case 0:
|
3727
|
+
_context2.prev = 0;
|
3728
|
+
contracts = [];
|
3729
|
+
_iterator = _createForOfIteratorHelper(request.args);
|
3730
|
+
_context2.prev = 3;
|
3731
|
+
_iterator.s();
|
3732
|
+
case 5:
|
3733
|
+
if ((_step = _iterator.n()).done) {
|
3734
|
+
_context2.next = 21;
|
3735
|
+
break;
|
3736
|
+
}
|
3737
|
+
arg = _step.value;
|
3738
|
+
_context2.prev = 7;
|
3739
|
+
_context2.next = 10;
|
3740
|
+
return this.register(_objectSpread2(_objectSpread2({}, arg), {}, {
|
3741
|
+
txOptions: {
|
3742
|
+
encodedTxDataOnly: true
|
3743
|
+
}
|
3744
|
+
}));
|
3745
|
+
case 10:
|
3746
|
+
result = _context2.sent;
|
3747
|
+
encodedTxData = result.encodedTxData.data;
|
3748
|
+
_context2.next = 17;
|
3749
|
+
break;
|
3750
|
+
case 14:
|
3751
|
+
_context2.prev = 14;
|
3752
|
+
_context2.t0 = _context2["catch"](7);
|
3753
|
+
throw new Error(_context2.t0.message.replace("Failed to register IP:", "").trim());
|
3754
|
+
case 17:
|
3755
|
+
isSpg = !!arg.ipMetadata;
|
3756
|
+
contracts.push({
|
3757
|
+
target: isSpg ? this.registrationWorkflowsClient.address : this.ipAssetRegistryClient.address,
|
3758
|
+
allowFailure: false,
|
3759
|
+
callData: encodedTxData
|
3760
|
+
});
|
3761
|
+
case 19:
|
3762
|
+
_context2.next = 5;
|
3763
|
+
break;
|
3764
|
+
case 21:
|
3765
|
+
_context2.next = 26;
|
3766
|
+
break;
|
3767
|
+
case 23:
|
3768
|
+
_context2.prev = 23;
|
3769
|
+
_context2.t1 = _context2["catch"](3);
|
3770
|
+
_iterator.e(_context2.t1);
|
3771
|
+
case 26:
|
3772
|
+
_context2.prev = 26;
|
3773
|
+
_iterator.f();
|
3774
|
+
return _context2.finish(26);
|
3775
|
+
case 29:
|
3776
|
+
_context2.next = 31;
|
3777
|
+
return this.multicall3Client.aggregate3({
|
3778
|
+
calls: contracts
|
3779
|
+
});
|
3780
|
+
case 31:
|
3781
|
+
txHash = _context2.sent;
|
3782
|
+
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.waitForTransaction)) {
|
3783
|
+
_context2.next = 41;
|
3784
|
+
break;
|
3785
|
+
}
|
3786
|
+
_context2.next = 35;
|
3787
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3788
|
+
hash: txHash
|
3789
|
+
}));
|
3790
|
+
case 35:
|
3791
|
+
txReceipt = _context2.sent;
|
3792
|
+
targetLogs = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
3793
|
+
results = targetLogs.map(function (log) {
|
3794
|
+
return {
|
3795
|
+
ipId: log.ipId,
|
3796
|
+
tokenId: log.tokenId
|
3797
|
+
};
|
3798
|
+
});
|
3799
|
+
return _context2.abrupt("return", {
|
3800
|
+
txHash: txHash,
|
3801
|
+
results: results
|
3802
|
+
});
|
3803
|
+
case 41:
|
3804
|
+
return _context2.abrupt("return", {
|
3805
|
+
txHash: txHash
|
3806
|
+
});
|
3807
|
+
case 42:
|
3808
|
+
_context2.next = 47;
|
3809
|
+
break;
|
3810
|
+
case 44:
|
3811
|
+
_context2.prev = 44;
|
3812
|
+
_context2.t2 = _context2["catch"](0);
|
3813
|
+
handleError(_context2.t2, "Failed to batch register IP");
|
3814
|
+
case 47:
|
3815
|
+
case "end":
|
3816
|
+
return _context2.stop();
|
3817
|
+
}
|
3818
|
+
}, _callee2, this, [[0, 44], [3, 23, 26, 29], [7, 14]]);
|
3819
|
+
}));
|
3820
|
+
function batchRegister(_x2) {
|
3821
|
+
return _batchRegister.apply(this, arguments);
|
3822
|
+
}
|
3823
|
+
return batchRegister;
|
3824
|
+
}()
|
3587
3825
|
/**
|
3588
3826
|
* Registers a derivative directly with parent IP's license terms, without needing license tokens,
|
3589
3827
|
* and attaches the license terms of the parent IPs to the derivative IP.
|
@@ -3595,63 +3833,63 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3595
3833
|
* @param request.parentIpIds The parent IP IDs.
|
3596
3834
|
* @param request.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
3597
3835
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3598
|
-
* @returns A Promise that resolves to
|
3836
|
+
* @returns A Promise that resolves to a transaction hash, and if encodedTxDataOnly is true, includes encoded transaction data.
|
3599
3837
|
*/
|
3600
3838
|
)
|
3601
3839
|
}, {
|
3602
3840
|
key: "registerDerivative",
|
3603
3841
|
value: (function () {
|
3604
|
-
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3605
|
-
var _request$
|
3606
|
-
return _regeneratorRuntime().wrap(function
|
3607
|
-
while (1) switch (
|
3842
|
+
var _registerDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
3843
|
+
var _request$txOptions4, isChildIpIdRegistered, _iterator2, _step2, parentId, isParentIpIdRegistered, i, isAttachedLicenseTerms, req, _request$txOptions5, txHash;
|
3844
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
3845
|
+
while (1) switch (_context3.prev = _context3.next) {
|
3608
3846
|
case 0:
|
3609
|
-
|
3610
|
-
|
3847
|
+
_context3.prev = 0;
|
3848
|
+
_context3.next = 3;
|
3611
3849
|
return this.isRegistered(request.childIpId);
|
3612
3850
|
case 3:
|
3613
|
-
isChildIpIdRegistered =
|
3851
|
+
isChildIpIdRegistered = _context3.sent;
|
3614
3852
|
if (isChildIpIdRegistered) {
|
3615
|
-
|
3853
|
+
_context3.next = 6;
|
3616
3854
|
break;
|
3617
3855
|
}
|
3618
3856
|
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
3619
3857
|
case 6:
|
3620
|
-
|
3621
|
-
|
3622
|
-
|
3858
|
+
_iterator2 = _createForOfIteratorHelper(request.parentIpIds);
|
3859
|
+
_context3.prev = 7;
|
3860
|
+
_iterator2.s();
|
3623
3861
|
case 9:
|
3624
|
-
if ((
|
3625
|
-
|
3862
|
+
if ((_step2 = _iterator2.n()).done) {
|
3863
|
+
_context3.next = 18;
|
3626
3864
|
break;
|
3627
3865
|
}
|
3628
|
-
parentId =
|
3629
|
-
|
3866
|
+
parentId = _step2.value;
|
3867
|
+
_context3.next = 13;
|
3630
3868
|
return this.isRegistered(getAddress$1(parentId, "request.parentIpIds"));
|
3631
3869
|
case 13:
|
3632
|
-
isParentIpIdRegistered =
|
3870
|
+
isParentIpIdRegistered = _context3.sent;
|
3633
3871
|
if (isParentIpIdRegistered) {
|
3634
|
-
|
3872
|
+
_context3.next = 16;
|
3635
3873
|
break;
|
3636
3874
|
}
|
3637
3875
|
throw new Error("The parent IP with id ".concat(parentId, " is not registered."));
|
3638
3876
|
case 16:
|
3639
|
-
|
3877
|
+
_context3.next = 9;
|
3640
3878
|
break;
|
3641
3879
|
case 18:
|
3642
|
-
|
3880
|
+
_context3.next = 23;
|
3643
3881
|
break;
|
3644
3882
|
case 20:
|
3645
|
-
|
3646
|
-
|
3647
|
-
|
3883
|
+
_context3.prev = 20;
|
3884
|
+
_context3.t0 = _context3["catch"](7);
|
3885
|
+
_iterator2.e(_context3.t0);
|
3648
3886
|
case 23:
|
3649
|
-
|
3650
|
-
|
3651
|
-
return
|
3887
|
+
_context3.prev = 23;
|
3888
|
+
_iterator2.f();
|
3889
|
+
return _context3.finish(23);
|
3652
3890
|
case 26:
|
3653
3891
|
if (!(request.parentIpIds.length !== request.licenseTermsIds.length)) {
|
3654
|
-
|
3892
|
+
_context3.next = 28;
|
3655
3893
|
break;
|
3656
3894
|
}
|
3657
3895
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -3659,25 +3897,25 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3659
3897
|
i = 0;
|
3660
3898
|
case 29:
|
3661
3899
|
if (!(i < request.parentIpIds.length)) {
|
3662
|
-
|
3900
|
+
_context3.next = 38;
|
3663
3901
|
break;
|
3664
3902
|
}
|
3665
|
-
|
3903
|
+
_context3.next = 32;
|
3666
3904
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
3667
3905
|
ipId: getAddress$1(request.parentIpIds[i], "request.parentIpIds"),
|
3668
3906
|
licenseTemplate: request.licenseTemplate && getAddress$1(request.licenseTemplate, "request.licenseTemplate") || this.licenseTemplateClient.address,
|
3669
3907
|
licenseTermsId: BigInt(request.licenseTermsIds[i])
|
3670
3908
|
});
|
3671
3909
|
case 32:
|
3672
|
-
isAttachedLicenseTerms =
|
3910
|
+
isAttachedLicenseTerms = _context3.sent;
|
3673
3911
|
if (isAttachedLicenseTerms) {
|
3674
|
-
|
3912
|
+
_context3.next = 35;
|
3675
3913
|
break;
|
3676
3914
|
}
|
3677
3915
|
throw new Error("License terms id ".concat(request.licenseTermsIds[i], " must be attached to the parent ipId ").concat(request.parentIpIds[i], " before registering derivative."));
|
3678
3916
|
case 35:
|
3679
3917
|
i++;
|
3680
|
-
|
3918
|
+
_context3.next = 29;
|
3681
3919
|
break;
|
3682
3920
|
case 38:
|
3683
3921
|
req = {
|
@@ -3689,52 +3927,193 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3689
3927
|
licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address,
|
3690
3928
|
royaltyContext: viem.zeroAddress
|
3691
3929
|
};
|
3692
|
-
if (!((_request$
|
3693
|
-
|
3930
|
+
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.encodedTxDataOnly)) {
|
3931
|
+
_context3.next = 43;
|
3694
3932
|
break;
|
3695
3933
|
}
|
3696
|
-
return
|
3934
|
+
return _context3.abrupt("return", {
|
3697
3935
|
encodedTxData: this.licensingModuleClient.registerDerivativeEncode(req)
|
3698
3936
|
});
|
3699
3937
|
case 43:
|
3700
|
-
|
3938
|
+
_context3.next = 45;
|
3701
3939
|
return this.licensingModuleClient.registerDerivative(req);
|
3702
3940
|
case 45:
|
3703
|
-
txHash =
|
3704
|
-
if (!((_request$
|
3705
|
-
|
3706
|
-
break;
|
3941
|
+
txHash = _context3.sent;
|
3942
|
+
if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.waitForTransaction)) {
|
3943
|
+
_context3.next = 52;
|
3944
|
+
break;
|
3707
3945
|
}
|
3708
|
-
|
3946
|
+
_context3.next = 49;
|
3709
3947
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3710
3948
|
hash: txHash
|
3711
3949
|
}));
|
3712
3950
|
case 49:
|
3713
|
-
return
|
3951
|
+
return _context3.abrupt("return", {
|
3714
3952
|
txHash: txHash
|
3715
3953
|
});
|
3716
3954
|
case 52:
|
3717
|
-
return
|
3955
|
+
return _context3.abrupt("return", {
|
3718
3956
|
txHash: txHash
|
3719
3957
|
});
|
3720
3958
|
case 53:
|
3721
|
-
|
3959
|
+
_context3.next = 58;
|
3722
3960
|
break;
|
3723
3961
|
case 55:
|
3724
|
-
|
3725
|
-
|
3726
|
-
handleError(
|
3962
|
+
_context3.prev = 55;
|
3963
|
+
_context3.t1 = _context3["catch"](0);
|
3964
|
+
handleError(_context3.t1, "Failed to register derivative");
|
3727
3965
|
case 58:
|
3728
3966
|
case "end":
|
3729
|
-
return
|
3967
|
+
return _context3.stop();
|
3730
3968
|
}
|
3731
|
-
},
|
3969
|
+
}, _callee3, this, [[0, 55], [7, 20, 23, 26]]);
|
3732
3970
|
}));
|
3733
|
-
function registerDerivative(
|
3971
|
+
function registerDerivative(_x3) {
|
3734
3972
|
return _registerDerivative.apply(this, arguments);
|
3735
3973
|
}
|
3736
3974
|
return registerDerivative;
|
3737
3975
|
}()
|
3976
|
+
/**
|
3977
|
+
* Batch registers a derivative directly with parent IP's license terms.
|
3978
|
+
* @param request - The request object that contains all data needed to batch register derivative IP.
|
3979
|
+
* @param {Array} request.args The array of objects containing the data needed to register derivative IP.
|
3980
|
+
* @param request.args.childIpId The derivative IP ID.
|
3981
|
+
* @param request.args.parentIpIds The parent IP IDs.
|
3982
|
+
* @param request.args.licenseTermsIds The IDs of the license terms that the parent IP supports.
|
3983
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3984
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxDataOnly option.
|
3985
|
+
* @returns A Promise that resolves to a transaction hash.
|
3986
|
+
*/
|
3987
|
+
)
|
3988
|
+
}, {
|
3989
|
+
key: "batchRegisterDerivative",
|
3990
|
+
value: (function () {
|
3991
|
+
var _batchRegisterDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(request) {
|
3992
|
+
var _request$txOptions6, contracts, licenseModuleAddress, _iterator3, _step3, arg, blockTimestamp, calculatedDeadline, ipAccount, data, _yield$ipAccount$stat, state, signature, txHash;
|
3993
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
3994
|
+
while (1) switch (_context4.prev = _context4.next) {
|
3995
|
+
case 0:
|
3996
|
+
_context4.prev = 0;
|
3997
|
+
contracts = [];
|
3998
|
+
licenseModuleAddress = getAddress$1(this.licensingModuleClient.address, "licensingModuleAddress");
|
3999
|
+
_iterator3 = _createForOfIteratorHelper(request.args);
|
4000
|
+
_context4.prev = 4;
|
4001
|
+
_iterator3.s();
|
4002
|
+
case 6:
|
4003
|
+
if ((_step3 = _iterator3.n()).done) {
|
4004
|
+
_context4.next = 32;
|
4005
|
+
break;
|
4006
|
+
}
|
4007
|
+
arg = _step3.value;
|
4008
|
+
_context4.prev = 8;
|
4009
|
+
_context4.next = 11;
|
4010
|
+
return this.registerDerivative(_objectSpread2(_objectSpread2({}, arg), {}, {
|
4011
|
+
txOptions: {
|
4012
|
+
encodedTxDataOnly: true
|
4013
|
+
}
|
4014
|
+
}));
|
4015
|
+
case 11:
|
4016
|
+
_context4.next = 16;
|
4017
|
+
break;
|
4018
|
+
case 13:
|
4019
|
+
_context4.prev = 13;
|
4020
|
+
_context4.t0 = _context4["catch"](8);
|
4021
|
+
throw new Error(_context4.t0.message.replace("Failed to register derivative:", "").trim());
|
4022
|
+
case 16:
|
4023
|
+
_context4.next = 18;
|
4024
|
+
return this.rpcClient.getBlock();
|
4025
|
+
case 18:
|
4026
|
+
blockTimestamp = _context4.sent.timestamp;
|
4027
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4028
|
+
ipAccount = new IpAccountImplClient(this.rpcClient, this.wallet, getAddress$1(arg.childIpId, "arg.childIpId"));
|
4029
|
+
data = viem.encodeFunctionData({
|
4030
|
+
abi: licensingModuleAbi,
|
4031
|
+
functionName: "registerDerivative",
|
4032
|
+
args: [arg.childIpId, arg.parentIpIds, arg.licenseTermsIds.map(function (id) {
|
4033
|
+
return BigInt(id);
|
4034
|
+
}), arg.licenseTemplate || this.licenseTemplateClient.address, viem.zeroAddress]
|
4035
|
+
});
|
4036
|
+
_context4.next = 24;
|
4037
|
+
return ipAccount.state();
|
4038
|
+
case 24:
|
4039
|
+
_yield$ipAccount$stat = _context4.sent;
|
4040
|
+
state = _yield$ipAccount$stat.result;
|
4041
|
+
_context4.next = 28;
|
4042
|
+
return getSignature({
|
4043
|
+
state: state,
|
4044
|
+
to: licenseModuleAddress,
|
4045
|
+
encodeData: data,
|
4046
|
+
wallet: this.wallet,
|
4047
|
+
verifyingContract: arg.childIpId,
|
4048
|
+
deadline: calculatedDeadline,
|
4049
|
+
chainId: chain[this.chainId]
|
4050
|
+
});
|
4051
|
+
case 28:
|
4052
|
+
signature = _context4.sent;
|
4053
|
+
contracts.push({
|
4054
|
+
target: arg.childIpId,
|
4055
|
+
allowFailure: false,
|
4056
|
+
callData: viem.encodeFunctionData({
|
4057
|
+
abi: ipAccountImplAbi,
|
4058
|
+
functionName: "executeWithSig",
|
4059
|
+
args: [licenseModuleAddress, BigInt(0), data, this.wallet.account.address, calculatedDeadline, signature]
|
4060
|
+
})
|
4061
|
+
});
|
4062
|
+
case 30:
|
4063
|
+
_context4.next = 6;
|
4064
|
+
break;
|
4065
|
+
case 32:
|
4066
|
+
_context4.next = 37;
|
4067
|
+
break;
|
4068
|
+
case 34:
|
4069
|
+
_context4.prev = 34;
|
4070
|
+
_context4.t1 = _context4["catch"](4);
|
4071
|
+
_iterator3.e(_context4.t1);
|
4072
|
+
case 37:
|
4073
|
+
_context4.prev = 37;
|
4074
|
+
_iterator3.f();
|
4075
|
+
return _context4.finish(37);
|
4076
|
+
case 40:
|
4077
|
+
_context4.next = 42;
|
4078
|
+
return this.multicall3Client.aggregate3({
|
4079
|
+
calls: contracts
|
4080
|
+
});
|
4081
|
+
case 42:
|
4082
|
+
txHash = _context4.sent;
|
4083
|
+
if (!((_request$txOptions6 = request.txOptions) !== null && _request$txOptions6 !== void 0 && _request$txOptions6.waitForTransaction)) {
|
4084
|
+
_context4.next = 49;
|
4085
|
+
break;
|
4086
|
+
}
|
4087
|
+
_context4.next = 46;
|
4088
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4089
|
+
hash: txHash
|
4090
|
+
}));
|
4091
|
+
case 46:
|
4092
|
+
return _context4.abrupt("return", {
|
4093
|
+
txHash: txHash
|
4094
|
+
});
|
4095
|
+
case 49:
|
4096
|
+
return _context4.abrupt("return", {
|
4097
|
+
txHash: txHash
|
4098
|
+
});
|
4099
|
+
case 50:
|
4100
|
+
_context4.next = 55;
|
4101
|
+
break;
|
4102
|
+
case 52:
|
4103
|
+
_context4.prev = 52;
|
4104
|
+
_context4.t2 = _context4["catch"](0);
|
4105
|
+
handleError(_context4.t2, "Failed to batch register derivative");
|
4106
|
+
case 55:
|
4107
|
+
case "end":
|
4108
|
+
return _context4.stop();
|
4109
|
+
}
|
4110
|
+
}, _callee4, this, [[0, 52], [4, 34, 37, 40], [8, 13]]);
|
4111
|
+
}));
|
4112
|
+
function batchRegisterDerivative(_x4) {
|
4113
|
+
return _batchRegisterDerivative.apply(this, arguments);
|
4114
|
+
}
|
4115
|
+
return batchRegisterDerivative;
|
4116
|
+
}()
|
3738
4117
|
/**
|
3739
4118
|
* Registers a derivative with license tokens.
|
3740
4119
|
* the derivative IP is registered with license tokens minted from the parent IP's license terms.
|
@@ -3750,73 +4129,73 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3750
4129
|
}, {
|
3751
4130
|
key: "registerDerivativeWithLicenseTokens",
|
3752
4131
|
value: (function () {
|
3753
|
-
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3754
|
-
var _request$
|
3755
|
-
return _regeneratorRuntime().wrap(function
|
3756
|
-
while (1) switch (
|
4132
|
+
var _registerDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
4133
|
+
var _request$txOptions7, isChildIpIdRegistered, req, _request$txOptions8, txHash;
|
4134
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
4135
|
+
while (1) switch (_context5.prev = _context5.next) {
|
3757
4136
|
case 0:
|
3758
|
-
|
3759
|
-
|
4137
|
+
_context5.prev = 0;
|
4138
|
+
_context5.next = 3;
|
3760
4139
|
return this.isRegistered(request.childIpId);
|
3761
4140
|
case 3:
|
3762
|
-
isChildIpIdRegistered =
|
4141
|
+
isChildIpIdRegistered = _context5.sent;
|
3763
4142
|
if (isChildIpIdRegistered) {
|
3764
|
-
|
4143
|
+
_context5.next = 6;
|
3765
4144
|
break;
|
3766
4145
|
}
|
3767
4146
|
throw new Error("The child IP with id ".concat(request.childIpId, " is not registered."));
|
3768
4147
|
case 6:
|
3769
|
-
|
4148
|
+
_context5.next = 8;
|
3770
4149
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
3771
4150
|
case 8:
|
3772
|
-
request.licenseTokenIds =
|
4151
|
+
request.licenseTokenIds = _context5.sent;
|
3773
4152
|
req = {
|
3774
4153
|
childIpId: getAddress$1(request.childIpId, "request.childIpId"),
|
3775
4154
|
licenseTokenIds: request.licenseTokenIds,
|
3776
4155
|
royaltyContext: viem.zeroAddress
|
3777
4156
|
};
|
3778
|
-
if (!((_request$
|
3779
|
-
|
4157
|
+
if (!((_request$txOptions7 = request.txOptions) !== null && _request$txOptions7 !== void 0 && _request$txOptions7.encodedTxDataOnly)) {
|
4158
|
+
_context5.next = 14;
|
3780
4159
|
break;
|
3781
4160
|
}
|
3782
|
-
return
|
4161
|
+
return _context5.abrupt("return", {
|
3783
4162
|
encodedTxData: this.licensingModuleClient.registerDerivativeWithLicenseTokensEncode(req)
|
3784
4163
|
});
|
3785
4164
|
case 14:
|
3786
|
-
|
4165
|
+
_context5.next = 16;
|
3787
4166
|
return this.licensingModuleClient.registerDerivativeWithLicenseTokens(req);
|
3788
4167
|
case 16:
|
3789
|
-
txHash =
|
3790
|
-
if (!((_request$
|
3791
|
-
|
4168
|
+
txHash = _context5.sent;
|
4169
|
+
if (!((_request$txOptions8 = request.txOptions) !== null && _request$txOptions8 !== void 0 && _request$txOptions8.waitForTransaction)) {
|
4170
|
+
_context5.next = 23;
|
3792
4171
|
break;
|
3793
4172
|
}
|
3794
|
-
|
4173
|
+
_context5.next = 20;
|
3795
4174
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3796
4175
|
hash: txHash
|
3797
4176
|
}));
|
3798
4177
|
case 20:
|
3799
|
-
return
|
4178
|
+
return _context5.abrupt("return", {
|
3800
4179
|
txHash: txHash
|
3801
4180
|
});
|
3802
4181
|
case 23:
|
3803
|
-
return
|
4182
|
+
return _context5.abrupt("return", {
|
3804
4183
|
txHash: txHash
|
3805
4184
|
});
|
3806
4185
|
case 24:
|
3807
|
-
|
4186
|
+
_context5.next = 29;
|
3808
4187
|
break;
|
3809
4188
|
case 26:
|
3810
|
-
|
3811
|
-
|
3812
|
-
handleError(
|
4189
|
+
_context5.prev = 26;
|
4190
|
+
_context5.t0 = _context5["catch"](0);
|
4191
|
+
handleError(_context5.t0, "Failed to register derivative with license tokens");
|
3813
4192
|
case 29:
|
3814
4193
|
case "end":
|
3815
|
-
return
|
4194
|
+
return _context5.stop();
|
3816
4195
|
}
|
3817
|
-
},
|
4196
|
+
}, _callee5, this, [[0, 26]]);
|
3818
4197
|
}));
|
3819
|
-
function registerDerivativeWithLicenseTokens(
|
4198
|
+
function registerDerivativeWithLicenseTokens(_x5) {
|
3820
4199
|
return _registerDerivativeWithLicenseTokens.apply(this, arguments);
|
3821
4200
|
}
|
3822
4201
|
return registerDerivativeWithLicenseTokens;
|
@@ -3845,14 +4224,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3845
4224
|
}, {
|
3846
4225
|
key: "mintAndRegisterIpAssetWithPilTerms",
|
3847
4226
|
value: (function () {
|
3848
|
-
var _mintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3849
|
-
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$
|
3850
|
-
return _regeneratorRuntime().wrap(function
|
3851
|
-
while (1) switch (
|
4227
|
+
var _mintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(request) {
|
4228
|
+
var _request$ipMetadata5, _request$ipMetadata6, _request$ipMetadata7, _request$ipMetadata8, _request$txOptions9, licenseTerm, object, _request$txOptions10, txHash, txReceipt, iPRegisteredLog, licenseTermsId;
|
4229
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
4230
|
+
while (1) switch (_context6.prev = _context6.next) {
|
3852
4231
|
case 0:
|
3853
|
-
|
4232
|
+
_context6.prev = 0;
|
3854
4233
|
if (!(request.pilType === undefined || request.pilType === null)) {
|
3855
|
-
|
4234
|
+
_context6.next = 3;
|
3856
4235
|
break;
|
3857
4236
|
}
|
3858
4237
|
throw new Error("PIL type is required.");
|
@@ -3874,61 +4253,173 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3874
4253
|
nftMetadataHash: ((_request$ipMetadata8 = request.ipMetadata) === null || _request$ipMetadata8 === void 0 ? void 0 : _request$ipMetadata8.nftMetadataHash) || viem.zeroHash
|
3875
4254
|
}
|
3876
4255
|
};
|
3877
|
-
if (!((_request$
|
3878
|
-
|
4256
|
+
if (!((_request$txOptions9 = request.txOptions) !== null && _request$txOptions9 !== void 0 && _request$txOptions9.encodedTxDataOnly)) {
|
4257
|
+
_context6.next = 9;
|
3879
4258
|
break;
|
3880
4259
|
}
|
3881
|
-
return
|
4260
|
+
return _context6.abrupt("return", {
|
3882
4261
|
encodedTxData: this.licenseAttachmentWorkflowsClient.mintAndRegisterIpAndAttachPilTermsEncode(object)
|
3883
4262
|
});
|
3884
4263
|
case 9:
|
3885
|
-
|
4264
|
+
_context6.next = 11;
|
3886
4265
|
return this.licenseAttachmentWorkflowsClient.mintAndRegisterIpAndAttachPilTerms(object);
|
3887
4266
|
case 11:
|
3888
|
-
txHash =
|
3889
|
-
if (!((_request$
|
3890
|
-
|
4267
|
+
txHash = _context6.sent;
|
4268
|
+
if (!((_request$txOptions10 = request.txOptions) !== null && _request$txOptions10 !== void 0 && _request$txOptions10.waitForTransaction)) {
|
4269
|
+
_context6.next = 19;
|
3891
4270
|
break;
|
3892
4271
|
}
|
3893
|
-
|
4272
|
+
_context6.next = 15;
|
3894
4273
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
3895
4274
|
hash: txHash
|
3896
4275
|
}));
|
3897
4276
|
case 15:
|
3898
|
-
txReceipt =
|
3899
|
-
iPRegisteredLog = this.
|
3900
|
-
|
3901
|
-
return
|
3902
|
-
case 19:
|
3903
|
-
licenseTermsId = _context4.sent;
|
3904
|
-
return _context4.abrupt("return", {
|
4277
|
+
txReceipt = _context6.sent;
|
4278
|
+
iPRegisteredLog = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
4279
|
+
licenseTermsId = this.getLicenseTermsId(txReceipt);
|
4280
|
+
return _context6.abrupt("return", {
|
3905
4281
|
txHash: txHash,
|
3906
4282
|
ipId: iPRegisteredLog.ipId,
|
3907
4283
|
licenseTermsId: licenseTermsId,
|
3908
4284
|
tokenId: iPRegisteredLog.tokenId
|
3909
4285
|
});
|
3910
|
-
case
|
3911
|
-
return
|
4286
|
+
case 19:
|
4287
|
+
return _context6.abrupt("return", {
|
3912
4288
|
txHash: txHash
|
3913
4289
|
});
|
3914
|
-
case
|
3915
|
-
|
4290
|
+
case 20:
|
4291
|
+
_context6.next = 25;
|
3916
4292
|
break;
|
3917
|
-
case
|
3918
|
-
|
3919
|
-
|
3920
|
-
handleError(
|
3921
|
-
case
|
4293
|
+
case 22:
|
4294
|
+
_context6.prev = 22;
|
4295
|
+
_context6.t0 = _context6["catch"](0);
|
4296
|
+
handleError(_context6.t0, "Failed to mint and register IP and attach PIL terms");
|
4297
|
+
case 25:
|
3922
4298
|
case "end":
|
3923
|
-
return
|
4299
|
+
return _context6.stop();
|
3924
4300
|
}
|
3925
|
-
},
|
4301
|
+
}, _callee6, this, [[0, 22]]);
|
3926
4302
|
}));
|
3927
|
-
function mintAndRegisterIpAssetWithPilTerms(
|
4303
|
+
function mintAndRegisterIpAssetWithPilTerms(_x6) {
|
3928
4304
|
return _mintAndRegisterIpAssetWithPilTerms.apply(this, arguments);
|
3929
4305
|
}
|
3930
4306
|
return mintAndRegisterIpAssetWithPilTerms;
|
3931
4307
|
}()
|
4308
|
+
/**
|
4309
|
+
* Batch mint an NFT from a collection and register it as an IP.
|
4310
|
+
* @param request - The request object that contains all data needed to batch mint and register ip.
|
4311
|
+
* @param {Array} request.args The array of mint and register IP requests.
|
4312
|
+
* @param request.args.spgNftContract The address of the NFT collection.
|
4313
|
+
* @param request.args.pilType The type of the PIL.
|
4314
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4315
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4316
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4317
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4318
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4319
|
+
* @param request.args.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
4320
|
+
* @param request.args.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4321
|
+
* @param request.args.mintingFee [Optional] The fee to be paid when minting a license.
|
4322
|
+
* @param request.args.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
4323
|
+
* @param request.args.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
4324
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
4325
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes IP ID, Token ID, License Terms Id.
|
4326
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4327
|
+
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
4328
|
+
*/
|
4329
|
+
)
|
4330
|
+
}, {
|
4331
|
+
key: "batchMintAndRegisterIpAssetWithPilTerms",
|
4332
|
+
value: (function () {
|
4333
|
+
var _batchMintAndRegisterIpAssetWithPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(request) {
|
4334
|
+
var _this = this;
|
4335
|
+
var _request$txOptions11, calldata, _iterator4, _step4, arg, result, txHash, txReceipt, licenseTermsEvent, results;
|
4336
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
4337
|
+
while (1) switch (_context7.prev = _context7.next) {
|
4338
|
+
case 0:
|
4339
|
+
_context7.prev = 0;
|
4340
|
+
calldata = [];
|
4341
|
+
_iterator4 = _createForOfIteratorHelper(request.args);
|
4342
|
+
_context7.prev = 3;
|
4343
|
+
_iterator4.s();
|
4344
|
+
case 5:
|
4345
|
+
if ((_step4 = _iterator4.n()).done) {
|
4346
|
+
_context7.next = 13;
|
4347
|
+
break;
|
4348
|
+
}
|
4349
|
+
arg = _step4.value;
|
4350
|
+
_context7.next = 9;
|
4351
|
+
return this.mintAndRegisterIpAssetWithPilTerms(_objectSpread2(_objectSpread2({}, arg), {}, {
|
4352
|
+
txOptions: {
|
4353
|
+
encodedTxDataOnly: true
|
4354
|
+
}
|
4355
|
+
}));
|
4356
|
+
case 9:
|
4357
|
+
result = _context7.sent;
|
4358
|
+
calldata.push(result.encodedTxData.data);
|
4359
|
+
case 11:
|
4360
|
+
_context7.next = 5;
|
4361
|
+
break;
|
4362
|
+
case 13:
|
4363
|
+
_context7.next = 18;
|
4364
|
+
break;
|
4365
|
+
case 15:
|
4366
|
+
_context7.prev = 15;
|
4367
|
+
_context7.t0 = _context7["catch"](3);
|
4368
|
+
_iterator4.e(_context7.t0);
|
4369
|
+
case 18:
|
4370
|
+
_context7.prev = 18;
|
4371
|
+
_iterator4.f();
|
4372
|
+
return _context7.finish(18);
|
4373
|
+
case 21:
|
4374
|
+
_context7.next = 23;
|
4375
|
+
return this.licenseAttachmentWorkflowsClient.multicall({
|
4376
|
+
data: calldata
|
4377
|
+
});
|
4378
|
+
case 23:
|
4379
|
+
txHash = _context7.sent;
|
4380
|
+
if (!((_request$txOptions11 = request.txOptions) !== null && _request$txOptions11 !== void 0 && _request$txOptions11.waitForTransaction)) {
|
4381
|
+
_context7.next = 32;
|
4382
|
+
break;
|
4383
|
+
}
|
4384
|
+
_context7.next = 27;
|
4385
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4386
|
+
hash: txHash
|
4387
|
+
}));
|
4388
|
+
case 27:
|
4389
|
+
txReceipt = _context7.sent;
|
4390
|
+
licenseTermsEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
4391
|
+
results = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
4392
|
+
results = results.map(function (result) {
|
4393
|
+
var licenseTerms = licenseTermsEvent.find(function (event) {
|
4394
|
+
return event.ipId === result.ipId;
|
4395
|
+
});
|
4396
|
+
return _objectSpread2(_objectSpread2({}, result), {}, {
|
4397
|
+
licenseTermsId: (licenseTerms === null || licenseTerms === void 0 ? void 0 : licenseTerms.licenseTermsId) === undefined ? _this.defaultLicenseTermsId : licenseTerms.licenseTermsId
|
4398
|
+
});
|
4399
|
+
});
|
4400
|
+
return _context7.abrupt("return", {
|
4401
|
+
txHash: txHash,
|
4402
|
+
results: results
|
4403
|
+
});
|
4404
|
+
case 32:
|
4405
|
+
return _context7.abrupt("return", {
|
4406
|
+
txHash: txHash
|
4407
|
+
});
|
4408
|
+
case 35:
|
4409
|
+
_context7.prev = 35;
|
4410
|
+
_context7.t1 = _context7["catch"](0);
|
4411
|
+
handleError(_context7.t1, "Failed to batch mint and register IP and attach PIL terms");
|
4412
|
+
case 38:
|
4413
|
+
case "end":
|
4414
|
+
return _context7.stop();
|
4415
|
+
}
|
4416
|
+
}, _callee7, this, [[0, 35], [3, 15, 18, 21]]);
|
4417
|
+
}));
|
4418
|
+
function batchMintAndRegisterIpAssetWithPilTerms(_x7) {
|
4419
|
+
return _batchMintAndRegisterIpAssetWithPilTerms.apply(this, arguments);
|
4420
|
+
}
|
4421
|
+
return batchMintAndRegisterIpAssetWithPilTerms;
|
4422
|
+
}()
|
3932
4423
|
/**
|
3933
4424
|
* Register a given NFT as an IP and attach Programmable IP License Terms.R.
|
3934
4425
|
* @param request - The request object that contains all data needed to mint and register ip.
|
@@ -3941,41 +4432,41 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3941
4432
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
3942
4433
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
3943
4434
|
* @param request.royaltyPolicyAddress [Optional] The address of the royalty policy contract, default value is LAP.
|
3944
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
4435
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
3945
4436
|
* @param request.mintingFee [Optional] The fee to be paid when minting a license.
|
3946
4437
|
* @param request.commercialRevShare [Optional] Percentage of revenue that must be shared with the licensor.
|
3947
4438
|
* @param request.currency [Optional] The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
3948
4439
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
3949
|
-
* @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.
|
4440
|
+
* @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.
|
3950
4441
|
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
3951
4442
|
*/
|
3952
4443
|
)
|
3953
4444
|
}, {
|
3954
4445
|
key: "registerIpAndAttachPilTerms",
|
3955
4446
|
value: (function () {
|
3956
|
-
var _registerIpAndAttachPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
3957
|
-
var _request$ipMetadata9, _request$ipMetadata10, _request$ipMetadata11, _request$ipMetadata12, _request$
|
3958
|
-
return _regeneratorRuntime().wrap(function
|
3959
|
-
while (1) switch (
|
4447
|
+
var _registerIpAndAttachPilTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(request) {
|
4448
|
+
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;
|
4449
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
4450
|
+
while (1) switch (_context8.prev = _context8.next) {
|
3960
4451
|
case 0:
|
3961
|
-
|
4452
|
+
_context8.prev = 0;
|
3962
4453
|
if (!(request.pilType === undefined || request.pilType === null)) {
|
3963
|
-
|
4454
|
+
_context8.next = 3;
|
3964
4455
|
break;
|
3965
4456
|
}
|
3966
4457
|
throw new Error("PIL type is required.");
|
3967
4458
|
case 3:
|
3968
4459
|
request.tokenId = BigInt(request.tokenId);
|
3969
|
-
|
4460
|
+
_context8.next = 6;
|
3970
4461
|
return this.getIpIdAddress(request.nftContract, request.tokenId);
|
3971
4462
|
case 6:
|
3972
|
-
ipIdAddress =
|
3973
|
-
|
4463
|
+
ipIdAddress = _context8.sent;
|
4464
|
+
_context8.next = 9;
|
3974
4465
|
return this.isRegistered(ipIdAddress);
|
3975
4466
|
case 9:
|
3976
|
-
isRegistered =
|
4467
|
+
isRegistered = _context8.sent;
|
3977
4468
|
if (!isRegistered) {
|
3978
|
-
|
4469
|
+
_context8.next = 12;
|
3979
4470
|
break;
|
3980
4471
|
}
|
3981
4472
|
throw new Error("The NFT with id ".concat(request.tokenId, " is already registered as IP."));
|
@@ -3986,8 +4477,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
3986
4477
|
royaltyPolicyAddress: request.royaltyPolicyAddress && getAddress$1(request.royaltyPolicyAddress, "request.royaltyPolicyAddress") || royaltyPolicyLapAddress[chain[this.chainId]],
|
3987
4478
|
commercialRevShare: request.commercialRevShare
|
3988
4479
|
});
|
3989
|
-
|
3990
|
-
|
4480
|
+
_context8.next = 15;
|
4481
|
+
return this.rpcClient.getBlock();
|
4482
|
+
case 15:
|
4483
|
+
blockTimestamp = _context8.sent.timestamp;
|
4484
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4485
|
+
_context8.next = 19;
|
3991
4486
|
return getPermissionSignature({
|
3992
4487
|
ipId: ipIdAddress,
|
3993
4488
|
deadline: calculatedDeadline,
|
@@ -4008,9 +4503,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4008
4503
|
func: "function attachLicenseTerms(address,address,uint256)"
|
4009
4504
|
}]
|
4010
4505
|
});
|
4011
|
-
case
|
4012
|
-
sigAttachSignature =
|
4013
|
-
|
4506
|
+
case 19:
|
4507
|
+
sigAttachSignature = _context8.sent;
|
4508
|
+
_context8.next = 22;
|
4014
4509
|
return getPermissionSignature({
|
4015
4510
|
ipId: ipIdAddress,
|
4016
4511
|
deadline: calculatedDeadline,
|
@@ -4027,8 +4522,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4027
4522
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4028
4523
|
}]
|
4029
4524
|
});
|
4030
|
-
case
|
4031
|
-
sigMetadataSignature =
|
4525
|
+
case 22:
|
4526
|
+
sigMetadataSignature = _context8.sent;
|
4032
4527
|
object = {
|
4033
4528
|
nftContract: getAddress$1(request.nftContract, "request.nftContract"),
|
4034
4529
|
tokenId: request.tokenId,
|
@@ -4050,56 +4545,54 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4050
4545
|
signature: sigAttachSignature
|
4051
4546
|
}
|
4052
4547
|
};
|
4053
|
-
if (!((_request$
|
4054
|
-
|
4548
|
+
if (!((_request$txOptions12 = request.txOptions) !== null && _request$txOptions12 !== void 0 && _request$txOptions12.encodedTxDataOnly)) {
|
4549
|
+
_context8.next = 28;
|
4055
4550
|
break;
|
4056
4551
|
}
|
4057
|
-
return
|
4552
|
+
return _context8.abrupt("return", {
|
4058
4553
|
encodedTxData: this.licenseAttachmentWorkflowsClient.registerIpAndAttachPilTermsEncode(object)
|
4059
4554
|
});
|
4060
|
-
case
|
4061
|
-
|
4555
|
+
case 28:
|
4556
|
+
_context8.next = 30;
|
4062
4557
|
return this.licenseAttachmentWorkflowsClient.registerIpAndAttachPilTerms(object);
|
4063
|
-
case
|
4064
|
-
txHash =
|
4065
|
-
if (!((_request$
|
4066
|
-
|
4558
|
+
case 30:
|
4559
|
+
txHash = _context8.sent;
|
4560
|
+
if (!((_request$txOptions13 = request.txOptions) !== null && _request$txOptions13 !== void 0 && _request$txOptions13.waitForTransaction)) {
|
4561
|
+
_context8.next = 38;
|
4067
4562
|
break;
|
4068
4563
|
}
|
4069
|
-
|
4564
|
+
_context8.next = 34;
|
4070
4565
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4071
4566
|
hash: txHash
|
4072
4567
|
}));
|
4073
|
-
case
|
4074
|
-
txReceipt =
|
4075
|
-
ipRegisterEvent = this.
|
4076
|
-
|
4077
|
-
return
|
4078
|
-
case 35:
|
4079
|
-
licenseTermsId = _context5.sent;
|
4080
|
-
return _context5.abrupt("return", {
|
4568
|
+
case 34:
|
4569
|
+
txReceipt = _context8.sent;
|
4570
|
+
ipRegisterEvent = this.getIpIdAndTokenIdFromEvent(txReceipt)[0];
|
4571
|
+
licenseTermsId = this.getLicenseTermsId(txReceipt);
|
4572
|
+
return _context8.abrupt("return", {
|
4081
4573
|
txHash: txHash,
|
4082
4574
|
licenseTermsId: licenseTermsId,
|
4083
|
-
ipId: ipRegisterEvent
|
4575
|
+
ipId: ipRegisterEvent.ipId,
|
4576
|
+
tokenId: ipRegisterEvent.tokenId
|
4084
4577
|
});
|
4085
|
-
case
|
4086
|
-
return
|
4578
|
+
case 38:
|
4579
|
+
return _context8.abrupt("return", {
|
4087
4580
|
txHash: txHash
|
4088
4581
|
});
|
4089
|
-
case
|
4090
|
-
|
4582
|
+
case 39:
|
4583
|
+
_context8.next = 44;
|
4091
4584
|
break;
|
4092
|
-
case
|
4093
|
-
|
4094
|
-
|
4095
|
-
handleError(
|
4096
|
-
case
|
4585
|
+
case 41:
|
4586
|
+
_context8.prev = 41;
|
4587
|
+
_context8.t0 = _context8["catch"](0);
|
4588
|
+
handleError(_context8.t0, "Failed to register IP and attach PIL terms");
|
4589
|
+
case 44:
|
4097
4590
|
case "end":
|
4098
|
-
return
|
4591
|
+
return _context8.stop();
|
4099
4592
|
}
|
4100
|
-
},
|
4593
|
+
}, _callee8, this, [[0, 41]]);
|
4101
4594
|
}));
|
4102
|
-
function registerIpAndAttachPilTerms(
|
4595
|
+
function registerIpAndAttachPilTerms(_x8) {
|
4103
4596
|
return _registerIpAndAttachPilTerms.apply(this, arguments);
|
4104
4597
|
}
|
4105
4598
|
return registerIpAndAttachPilTerms;
|
@@ -4118,38 +4611,38 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4118
4611
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4119
4612
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4120
4613
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4121
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
4614
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
4122
4615
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4123
|
-
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID if waitForTxn is set to true.
|
4616
|
+
* @returns A Promise that resolves to an object containing the transaction hash and optional IP ID, token ID if waitForTxn is set to true.
|
4124
4617
|
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4125
4618
|
*/
|
4126
4619
|
)
|
4127
4620
|
}, {
|
4128
4621
|
key: "registerDerivativeIp",
|
4129
4622
|
value: (function () {
|
4130
|
-
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4131
|
-
var _request$ipMetadata13, _request$ipMetadata14, _request$ipMetadata15, _request$ipMetadata16, _request$
|
4132
|
-
return _regeneratorRuntime().wrap(function
|
4133
|
-
while (1) switch (
|
4623
|
+
var _registerDerivativeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(request) {
|
4624
|
+
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;
|
4625
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
4626
|
+
while (1) switch (_context9.prev = _context9.next) {
|
4134
4627
|
case 0:
|
4135
|
-
|
4628
|
+
_context9.prev = 0;
|
4136
4629
|
tokenId = BigInt(request.tokenId);
|
4137
|
-
|
4630
|
+
_context9.next = 4;
|
4138
4631
|
return this.getIpIdAddress(request.nftContract, tokenId);
|
4139
4632
|
case 4:
|
4140
|
-
ipIdAddress =
|
4141
|
-
|
4633
|
+
ipIdAddress = _context9.sent;
|
4634
|
+
_context9.next = 7;
|
4142
4635
|
return this.isRegistered(ipIdAddress);
|
4143
4636
|
case 7:
|
4144
|
-
isRegistered =
|
4637
|
+
isRegistered = _context9.sent;
|
4145
4638
|
if (!isRegistered) {
|
4146
|
-
|
4639
|
+
_context9.next = 10;
|
4147
4640
|
break;
|
4148
4641
|
}
|
4149
4642
|
throw new Error("The NFT with id ".concat(tokenId, " is already registered as IP."));
|
4150
4643
|
case 10:
|
4151
4644
|
if (!(request.derivData.parentIpIds.length !== request.derivData.licenseTermsIds.length)) {
|
4152
|
-
|
4645
|
+
_context9.next = 12;
|
4153
4646
|
break;
|
4154
4647
|
}
|
4155
4648
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -4157,29 +4650,33 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4157
4650
|
i = 0;
|
4158
4651
|
case 13:
|
4159
4652
|
if (!(i < request.derivData.parentIpIds.length)) {
|
4160
|
-
|
4653
|
+
_context9.next = 22;
|
4161
4654
|
break;
|
4162
4655
|
}
|
4163
|
-
|
4656
|
+
_context9.next = 16;
|
4164
4657
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
4165
4658
|
ipId: getAddress$1(request.derivData.parentIpIds[i], "request.derivData.parentIpIds"),
|
4166
4659
|
licenseTemplate: request.derivData.licenseTemplate && getAddress$1(request.derivData.licenseTemplate, "request.derivData.licenseTemplate") || this.licenseTemplateClient.address,
|
4167
4660
|
licenseTermsId: BigInt(request.derivData.licenseTermsIds[i])
|
4168
4661
|
});
|
4169
4662
|
case 16:
|
4170
|
-
isAttachedLicenseTerms =
|
4663
|
+
isAttachedLicenseTerms = _context9.sent;
|
4171
4664
|
if (isAttachedLicenseTerms) {
|
4172
|
-
|
4665
|
+
_context9.next = 19;
|
4173
4666
|
break;
|
4174
4667
|
}
|
4175
4668
|
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."));
|
4176
4669
|
case 19:
|
4177
4670
|
i++;
|
4178
|
-
|
4671
|
+
_context9.next = 13;
|
4179
4672
|
break;
|
4180
4673
|
case 22:
|
4181
|
-
|
4182
|
-
|
4674
|
+
_context9.next = 24;
|
4675
|
+
return this.rpcClient.getBlock();
|
4676
|
+
case 24:
|
4677
|
+
blockTimestamp = _context9.sent.timestamp;
|
4678
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4679
|
+
_context9.next = 28;
|
4183
4680
|
return getPermissionSignature({
|
4184
4681
|
ipId: ipIdAddress,
|
4185
4682
|
deadline: calculatedDeadline,
|
@@ -4200,8 +4697,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4200
4697
|
func: "function registerDerivative(address,address[],uint256[],address,bytes)"
|
4201
4698
|
}]
|
4202
4699
|
});
|
4203
|
-
case
|
4204
|
-
sigRegisterSignature =
|
4700
|
+
case 28:
|
4701
|
+
sigRegisterSignature = _context9.sent;
|
4205
4702
|
object = {
|
4206
4703
|
nftContract: getAddress$1(request.nftContract, "request.nftContract"),
|
4207
4704
|
tokenId: BigInt(request.tokenId),
|
@@ -4232,7 +4729,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4232
4729
|
signature: viem.zeroHash
|
4233
4730
|
}
|
4234
4731
|
};
|
4235
|
-
|
4732
|
+
_context9.next = 32;
|
4236
4733
|
return getPermissionSignature({
|
4237
4734
|
ipId: ipIdAddress,
|
4238
4735
|
deadline: calculatedDeadline,
|
@@ -4249,58 +4746,59 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4249
4746
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4250
4747
|
}]
|
4251
4748
|
});
|
4252
|
-
case
|
4253
|
-
sigMetadataSignature =
|
4749
|
+
case 32:
|
4750
|
+
sigMetadataSignature = _context9.sent;
|
4254
4751
|
object.sigMetadata = {
|
4255
4752
|
signer: getAddress$1(this.wallet.account.address, "wallet.account.address"),
|
4256
4753
|
deadline: calculatedDeadline,
|
4257
4754
|
signature: sigMetadataSignature
|
4258
4755
|
};
|
4259
|
-
if (!((_request$
|
4260
|
-
|
4756
|
+
if (!((_request$txOptions14 = request.txOptions) !== null && _request$txOptions14 !== void 0 && _request$txOptions14.encodedTxDataOnly)) {
|
4757
|
+
_context9.next = 38;
|
4261
4758
|
break;
|
4262
4759
|
}
|
4263
|
-
return
|
4760
|
+
return _context9.abrupt("return", {
|
4264
4761
|
encodedTxData: this.derivativeWorkflowsClient.registerIpAndMakeDerivativeEncode(object)
|
4265
4762
|
});
|
4266
|
-
case
|
4267
|
-
|
4763
|
+
case 38:
|
4764
|
+
_context9.next = 40;
|
4268
4765
|
return this.derivativeWorkflowsClient.registerIpAndMakeDerivative(object);
|
4269
|
-
case
|
4270
|
-
txHash =
|
4271
|
-
if (!((_request$
|
4272
|
-
|
4766
|
+
case 40:
|
4767
|
+
txHash = _context9.sent;
|
4768
|
+
if (!((_request$txOptions15 = request.txOptions) !== null && _request$txOptions15 !== void 0 && _request$txOptions15.waitForTransaction)) {
|
4769
|
+
_context9.next = 47;
|
4273
4770
|
break;
|
4274
4771
|
}
|
4275
|
-
|
4772
|
+
_context9.next = 44;
|
4276
4773
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4277
4774
|
hash: txHash
|
4278
4775
|
}));
|
4279
|
-
case
|
4280
|
-
receipt =
|
4281
|
-
log = this.
|
4282
|
-
return
|
4776
|
+
case 44:
|
4777
|
+
receipt = _context9.sent;
|
4778
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
4779
|
+
return _context9.abrupt("return", {
|
4283
4780
|
txHash: txHash,
|
4284
|
-
ipId: log.ipId
|
4781
|
+
ipId: log.ipId,
|
4782
|
+
tokenId: log.tokenId
|
4285
4783
|
});
|
4286
|
-
case
|
4287
|
-
return
|
4784
|
+
case 47:
|
4785
|
+
return _context9.abrupt("return", {
|
4288
4786
|
txHash: txHash
|
4289
4787
|
});
|
4290
|
-
case
|
4291
|
-
|
4788
|
+
case 48:
|
4789
|
+
_context9.next = 53;
|
4292
4790
|
break;
|
4293
|
-
case 47:
|
4294
|
-
_context6.prev = 47;
|
4295
|
-
_context6.t0 = _context6["catch"](0);
|
4296
|
-
handleError(_context6.t0, "Failed to register derivative IP");
|
4297
4791
|
case 50:
|
4792
|
+
_context9.prev = 50;
|
4793
|
+
_context9.t0 = _context9["catch"](0);
|
4794
|
+
handleError(_context9.t0, "Failed to register derivative IP");
|
4795
|
+
case 53:
|
4298
4796
|
case "end":
|
4299
|
-
return
|
4797
|
+
return _context9.stop();
|
4300
4798
|
}
|
4301
|
-
},
|
4799
|
+
}, _callee9, this, [[0, 50]]);
|
4302
4800
|
}));
|
4303
|
-
function registerDerivativeIp(
|
4801
|
+
function registerDerivativeIp(_x9) {
|
4304
4802
|
return _registerDerivativeIp.apply(this, arguments);
|
4305
4803
|
}
|
4306
4804
|
return registerDerivativeIp;
|
@@ -4310,14 +4808,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4310
4808
|
* @param request - The request object that contains all data needed to mint and register ip and make derivative.
|
4311
4809
|
* @param request.spgNftContract The address of the NFT collection.
|
4312
4810
|
* @param request.derivData The derivative data to be used for registerDerivative.
|
4313
|
-
*
|
4314
|
-
*
|
4315
|
-
*
|
4811
|
+
* @param request.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
4812
|
+
* @param request.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
4813
|
+
* @param request.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
4316
4814
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4317
|
-
*
|
4318
|
-
*
|
4319
|
-
*
|
4320
|
-
*
|
4815
|
+
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4816
|
+
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4817
|
+
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4818
|
+
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4321
4819
|
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4322
4820
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4323
4821
|
* @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.
|
@@ -4327,14 +4825,14 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4327
4825
|
}, {
|
4328
4826
|
key: "mintAndRegisterIpAndMakeDerivative",
|
4329
4827
|
value: (function () {
|
4330
|
-
var _mintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4331
|
-
var _request$ipMetadata17, _request$ipMetadata18, _request$ipMetadata19, _request$ipMetadata20, _request$
|
4332
|
-
return _regeneratorRuntime().wrap(function
|
4333
|
-
while (1) switch (
|
4828
|
+
var _mintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(request) {
|
4829
|
+
var _request$ipMetadata17, _request$ipMetadata18, _request$ipMetadata19, _request$ipMetadata20, _request$txOptions16, i, isAttachedLicenseTerms, object, _request$txOptions17, txHash, receipt, log;
|
4830
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
4831
|
+
while (1) switch (_context10.prev = _context10.next) {
|
4334
4832
|
case 0:
|
4335
|
-
|
4833
|
+
_context10.prev = 0;
|
4336
4834
|
if (!(request.derivData.parentIpIds.length !== request.derivData.licenseTermsIds.length)) {
|
4337
|
-
|
4835
|
+
_context10.next = 3;
|
4338
4836
|
break;
|
4339
4837
|
}
|
4340
4838
|
throw new Error("Parent IP IDs and License terms IDs must be provided in pairs.");
|
@@ -4342,25 +4840,25 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4342
4840
|
i = 0;
|
4343
4841
|
case 4:
|
4344
4842
|
if (!(i < request.derivData.parentIpIds.length)) {
|
4345
|
-
|
4843
|
+
_context10.next = 13;
|
4346
4844
|
break;
|
4347
4845
|
}
|
4348
|
-
|
4846
|
+
_context10.next = 7;
|
4349
4847
|
return this.licenseRegistryReadOnlyClient.hasIpAttachedLicenseTerms({
|
4350
4848
|
ipId: getAddress$1(request.derivData.parentIpIds[i], "request.derivData.parentIpIds"),
|
4351
4849
|
licenseTemplate: request.derivData.licenseTemplate && getAddress$1(request.derivData.licenseTemplate, "request.derivData.licenseTemplate") || this.licenseTemplateClient.address,
|
4352
4850
|
licenseTermsId: BigInt(request.derivData.licenseTermsIds[i])
|
4353
4851
|
});
|
4354
4852
|
case 7:
|
4355
|
-
isAttachedLicenseTerms =
|
4853
|
+
isAttachedLicenseTerms = _context10.sent;
|
4356
4854
|
if (isAttachedLicenseTerms) {
|
4357
|
-
|
4855
|
+
_context10.next = 10;
|
4358
4856
|
break;
|
4359
4857
|
}
|
4360
4858
|
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."));
|
4361
4859
|
case 10:
|
4362
4860
|
i++;
|
4363
|
-
|
4861
|
+
_context10.next = 4;
|
4364
4862
|
break;
|
4365
4863
|
case 13:
|
4366
4864
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
@@ -4379,55 +4877,164 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4379
4877
|
},
|
4380
4878
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address
|
4381
4879
|
});
|
4382
|
-
if (!((_request$
|
4383
|
-
|
4880
|
+
if (!((_request$txOptions16 = request.txOptions) !== null && _request$txOptions16 !== void 0 && _request$txOptions16.encodedTxDataOnly)) {
|
4881
|
+
_context10.next = 18;
|
4384
4882
|
break;
|
4385
4883
|
}
|
4386
|
-
return
|
4884
|
+
return _context10.abrupt("return", {
|
4387
4885
|
encodedTxData: this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeEncode(object)
|
4388
4886
|
});
|
4389
4887
|
case 18:
|
4390
|
-
|
4888
|
+
_context10.next = 20;
|
4391
4889
|
return this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivative(object);
|
4392
4890
|
case 20:
|
4393
|
-
txHash =
|
4394
|
-
if (!((_request$
|
4395
|
-
|
4891
|
+
txHash = _context10.sent;
|
4892
|
+
if (!((_request$txOptions17 = request.txOptions) !== null && _request$txOptions17 !== void 0 && _request$txOptions17.waitForTransaction)) {
|
4893
|
+
_context10.next = 27;
|
4396
4894
|
break;
|
4397
4895
|
}
|
4398
|
-
|
4896
|
+
_context10.next = 24;
|
4399
4897
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4400
4898
|
hash: txHash
|
4401
4899
|
}));
|
4402
4900
|
case 24:
|
4403
|
-
receipt =
|
4404
|
-
log = this.
|
4405
|
-
return
|
4901
|
+
receipt = _context10.sent;
|
4902
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
4903
|
+
return _context10.abrupt("return", {
|
4406
4904
|
txHash: txHash,
|
4407
4905
|
childIpId: log.ipId,
|
4408
4906
|
tokenId: log.tokenId
|
4409
4907
|
});
|
4410
4908
|
case 27:
|
4411
|
-
return
|
4909
|
+
return _context10.abrupt("return", {
|
4910
|
+
txHash: txHash
|
4911
|
+
});
|
4912
|
+
case 28:
|
4913
|
+
_context10.next = 33;
|
4914
|
+
break;
|
4915
|
+
case 30:
|
4916
|
+
_context10.prev = 30;
|
4917
|
+
_context10.t0 = _context10["catch"](0);
|
4918
|
+
handleError(_context10.t0, "Failed to mint and register IP and make derivative");
|
4919
|
+
case 33:
|
4920
|
+
case "end":
|
4921
|
+
return _context10.stop();
|
4922
|
+
}
|
4923
|
+
}, _callee10, this, [[0, 30]]);
|
4924
|
+
}));
|
4925
|
+
function mintAndRegisterIpAndMakeDerivative(_x10) {
|
4926
|
+
return _mintAndRegisterIpAndMakeDerivative.apply(this, arguments);
|
4927
|
+
}
|
4928
|
+
return mintAndRegisterIpAndMakeDerivative;
|
4929
|
+
}()
|
4930
|
+
/**
|
4931
|
+
* Batch mint an NFT from a collection and register it as a derivative IP without license tokens.
|
4932
|
+
* @param request - The request object that contains all data needed to batch mint and register ip and make derivative.
|
4933
|
+
* @param {Array} request.args The array of mint and register IP requests.
|
4934
|
+
* @param request.args.spgNftContract The address of the NFT collection.
|
4935
|
+
* @param request.args.derivData The derivative data to be used for registerDerivative.
|
4936
|
+
* @param request.args.derivData.parentIpIds The IDs of the parent IPs to link the registered derivative IP.
|
4937
|
+
* @param request.args.derivData.licenseTermsIds The IDs of the license terms to be used for the linking.
|
4938
|
+
* @param request.args.derivData.licenseTemplate [Optional] The address of the license template to be used for the linking.
|
4939
|
+
* @param request.args.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4940
|
+
* @param request.args.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4941
|
+
* @param request.args.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4942
|
+
* @param request.args.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4943
|
+
* @param request.args.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
4944
|
+
* @param request.arg.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
4945
|
+
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property, without encodedTxData option.
|
4946
|
+
* @returns A Promise that resolves to a transaction hash, if waitForTransaction is true, includes child ip id and token id.
|
4947
|
+
* @emits IPRegistered (ipId, chainId, tokenContract, tokenId, name, uri, registrationDate)
|
4948
|
+
*/
|
4949
|
+
)
|
4950
|
+
}, {
|
4951
|
+
key: "batchMintAndRegisterIpAndMakeDerivative",
|
4952
|
+
value: (function () {
|
4953
|
+
var _batchMintAndRegisterIpAndMakeDerivative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(request) {
|
4954
|
+
var _request$txOptions18, calldata, _iterator5, _step5, arg, result, txHash, txReceipt;
|
4955
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
4956
|
+
while (1) switch (_context11.prev = _context11.next) {
|
4957
|
+
case 0:
|
4958
|
+
_context11.prev = 0;
|
4959
|
+
calldata = [];
|
4960
|
+
_iterator5 = _createForOfIteratorHelper(request.args);
|
4961
|
+
_context11.prev = 3;
|
4962
|
+
_iterator5.s();
|
4963
|
+
case 5:
|
4964
|
+
if ((_step5 = _iterator5.n()).done) {
|
4965
|
+
_context11.next = 19;
|
4966
|
+
break;
|
4967
|
+
}
|
4968
|
+
arg = _step5.value;
|
4969
|
+
_context11.prev = 7;
|
4970
|
+
_context11.next = 10;
|
4971
|
+
return this.mintAndRegisterIpAndMakeDerivative(_objectSpread2(_objectSpread2({}, arg), {}, {
|
4972
|
+
txOptions: {
|
4973
|
+
encodedTxDataOnly: true
|
4974
|
+
}
|
4975
|
+
}));
|
4976
|
+
case 10:
|
4977
|
+
result = _context11.sent;
|
4978
|
+
calldata.push(result.encodedTxData.data);
|
4979
|
+
_context11.next = 17;
|
4980
|
+
break;
|
4981
|
+
case 14:
|
4982
|
+
_context11.prev = 14;
|
4983
|
+
_context11.t0 = _context11["catch"](7);
|
4984
|
+
throw new Error(_context11.t0.message.replace("Failed to mint and register IP and make derivative: ", "").trim());
|
4985
|
+
case 17:
|
4986
|
+
_context11.next = 5;
|
4987
|
+
break;
|
4988
|
+
case 19:
|
4989
|
+
_context11.next = 24;
|
4990
|
+
break;
|
4991
|
+
case 21:
|
4992
|
+
_context11.prev = 21;
|
4993
|
+
_context11.t1 = _context11["catch"](3);
|
4994
|
+
_iterator5.e(_context11.t1);
|
4995
|
+
case 24:
|
4996
|
+
_context11.prev = 24;
|
4997
|
+
_iterator5.f();
|
4998
|
+
return _context11.finish(24);
|
4999
|
+
case 27:
|
5000
|
+
_context11.next = 29;
|
5001
|
+
return this.derivativeWorkflowsClient.multicall({
|
5002
|
+
data: calldata
|
5003
|
+
});
|
5004
|
+
case 29:
|
5005
|
+
txHash = _context11.sent;
|
5006
|
+
if (!((_request$txOptions18 = request.txOptions) !== null && _request$txOptions18 !== void 0 && _request$txOptions18.waitForTransaction)) {
|
5007
|
+
_context11.next = 35;
|
5008
|
+
break;
|
5009
|
+
}
|
5010
|
+
_context11.next = 33;
|
5011
|
+
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
5012
|
+
hash: txHash
|
5013
|
+
}));
|
5014
|
+
case 33:
|
5015
|
+
txReceipt = _context11.sent;
|
5016
|
+
return _context11.abrupt("return", {
|
5017
|
+
txHash: txHash,
|
5018
|
+
results: this.getIpIdAndTokenIdFromEvent(txReceipt)
|
5019
|
+
});
|
5020
|
+
case 35:
|
5021
|
+
return _context11.abrupt("return", {
|
4412
5022
|
txHash: txHash
|
4413
5023
|
});
|
4414
|
-
case
|
4415
|
-
|
4416
|
-
|
4417
|
-
|
4418
|
-
|
4419
|
-
_context7.t0 = _context7["catch"](0);
|
4420
|
-
handleError(_context7.t0, "Failed to mint and register IP and make derivative");
|
4421
|
-
case 33:
|
5024
|
+
case 38:
|
5025
|
+
_context11.prev = 38;
|
5026
|
+
_context11.t2 = _context11["catch"](0);
|
5027
|
+
handleError(_context11.t2, "Failed to batch mint and register IP and make derivative");
|
5028
|
+
case 41:
|
4422
5029
|
case "end":
|
4423
|
-
return
|
5030
|
+
return _context11.stop();
|
4424
5031
|
}
|
4425
|
-
},
|
5032
|
+
}, _callee11, this, [[0, 38], [3, 21, 24, 27], [7, 14]]);
|
4426
5033
|
}));
|
4427
|
-
function
|
4428
|
-
return
|
5034
|
+
function batchMintAndRegisterIpAndMakeDerivative(_x11) {
|
5035
|
+
return _batchMintAndRegisterIpAndMakeDerivative.apply(this, arguments);
|
4429
5036
|
}
|
4430
|
-
return
|
5037
|
+
return batchMintAndRegisterIpAndMakeDerivative;
|
4431
5038
|
}()
|
4432
5039
|
/**
|
4433
5040
|
* Mint an NFT from a SPGNFT collection and register it with metadata as an IP.
|
@@ -4447,12 +5054,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4447
5054
|
}, {
|
4448
5055
|
key: "mintAndRegisterIp",
|
4449
5056
|
value: (function () {
|
4450
|
-
var _mintAndRegisterIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4451
|
-
var _request$ipMetadata21, _request$ipMetadata22, _request$ipMetadata23, _request$ipMetadata24, _request$
|
4452
|
-
return _regeneratorRuntime().wrap(function
|
4453
|
-
while (1) switch (
|
5057
|
+
var _mintAndRegisterIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(request) {
|
5058
|
+
var _request$ipMetadata21, _request$ipMetadata22, _request$ipMetadata23, _request$ipMetadata24, _request$txOptions19, object, _request$txOptions20, txHash, txReceipt, ipRegisterEvent;
|
5059
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
5060
|
+
while (1) switch (_context12.prev = _context12.next) {
|
4454
5061
|
case 0:
|
4455
|
-
|
5062
|
+
_context12.prev = 0;
|
4456
5063
|
object = {
|
4457
5064
|
spgNftContract: getAddress$1(request.spgNftContract, "request.spgNftContract"),
|
4458
5065
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address,
|
@@ -4463,52 +5070,52 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4463
5070
|
nftMetadataHash: ((_request$ipMetadata24 = request.ipMetadata) === null || _request$ipMetadata24 === void 0 ? void 0 : _request$ipMetadata24.nftMetadataHash) || viem.zeroHash
|
4464
5071
|
}
|
4465
5072
|
};
|
4466
|
-
if (!((_request$
|
4467
|
-
|
5073
|
+
if (!((_request$txOptions19 = request.txOptions) !== null && _request$txOptions19 !== void 0 && _request$txOptions19.encodedTxDataOnly)) {
|
5074
|
+
_context12.next = 6;
|
4468
5075
|
break;
|
4469
5076
|
}
|
4470
|
-
return
|
5077
|
+
return _context12.abrupt("return", {
|
4471
5078
|
encodedTxData: this.registrationWorkflowsClient.mintAndRegisterIpEncode(object)
|
4472
5079
|
});
|
4473
5080
|
case 6:
|
4474
|
-
|
5081
|
+
_context12.next = 8;
|
4475
5082
|
return this.registrationWorkflowsClient.mintAndRegisterIp(object);
|
4476
5083
|
case 8:
|
4477
|
-
txHash =
|
4478
|
-
if (!((_request$
|
4479
|
-
|
5084
|
+
txHash = _context12.sent;
|
5085
|
+
if (!((_request$txOptions20 = request.txOptions) !== null && _request$txOptions20 !== void 0 && _request$txOptions20.waitForTransaction)) {
|
5086
|
+
_context12.next = 15;
|
4480
5087
|
break;
|
4481
5088
|
}
|
4482
|
-
|
5089
|
+
_context12.next = 12;
|
4483
5090
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4484
5091
|
hash: txHash
|
4485
5092
|
}));
|
4486
5093
|
case 12:
|
4487
|
-
txReceipt =
|
4488
|
-
ipRegisterEvent = this.
|
4489
|
-
return
|
5094
|
+
txReceipt = _context12.sent;
|
5095
|
+
ipRegisterEvent = this.getIpIdAndTokenIdFromEvent(txReceipt);
|
5096
|
+
return _context12.abrupt("return", {
|
4490
5097
|
txHash: txHash,
|
4491
5098
|
ipId: ipRegisterEvent[0].ipId,
|
4492
5099
|
tokenId: ipRegisterEvent[0].tokenId
|
4493
5100
|
});
|
4494
5101
|
case 15:
|
4495
|
-
return
|
5102
|
+
return _context12.abrupt("return", {
|
4496
5103
|
txHash: txHash
|
4497
5104
|
});
|
4498
5105
|
case 16:
|
4499
|
-
|
5106
|
+
_context12.next = 21;
|
4500
5107
|
break;
|
4501
5108
|
case 18:
|
4502
|
-
|
4503
|
-
|
4504
|
-
handleError(
|
5109
|
+
_context12.prev = 18;
|
5110
|
+
_context12.t0 = _context12["catch"](0);
|
5111
|
+
handleError(_context12.t0, "Failed to mint and register IP");
|
4505
5112
|
case 21:
|
4506
5113
|
case "end":
|
4507
|
-
return
|
5114
|
+
return _context12.stop();
|
4508
5115
|
}
|
4509
|
-
},
|
5116
|
+
}, _callee12, this, [[0, 18]]);
|
4510
5117
|
}));
|
4511
|
-
function mintAndRegisterIp(
|
5118
|
+
function mintAndRegisterIp(_x12) {
|
4512
5119
|
return _mintAndRegisterIp.apply(this, arguments);
|
4513
5120
|
}
|
4514
5121
|
return mintAndRegisterIp;
|
@@ -4535,7 +5142,7 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4535
5142
|
* @param request.terms.derivativeRevCeiling The maximum revenue that can be generated from the derivative use of the work.
|
4536
5143
|
* @param request.terms.currency The ERC20 token to be used to pay the minting fee. the token must be registered in story protocol.
|
4537
5144
|
* @param request.terms.uri The URI of the license terms, which can be used to fetch the offchain license terms.
|
4538
|
-
* @param request.deadline [Optional] The deadline for the signature in milliseconds,default is
|
5145
|
+
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000s.
|
4539
5146
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4540
5147
|
* @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.
|
4541
5148
|
* @emits LicenseTermsAttached (caller, ipId, licenseTemplate, licenseTermsId)
|
@@ -4544,41 +5151,45 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4544
5151
|
}, {
|
4545
5152
|
key: "registerPilTermsAndAttach",
|
4546
5153
|
value: (function () {
|
4547
|
-
var _registerPilTermsAndAttach = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4548
|
-
var _request$
|
4549
|
-
return _regeneratorRuntime().wrap(function
|
4550
|
-
while (1) switch (
|
5154
|
+
var _registerPilTermsAndAttach = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(request) {
|
5155
|
+
var _request$txOptions21, ipId, terms, isRegistered, licenseTerms, licenseRes, blockTimestamp, calculatedDeadline, ipAccount, _yield$ipAccount$stat2, state, sigAttachSignature, object, _request$txOptions22, txHash;
|
5156
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
5157
|
+
while (1) switch (_context13.prev = _context13.next) {
|
4551
5158
|
case 0:
|
4552
|
-
|
5159
|
+
_context13.prev = 0;
|
4553
5160
|
ipId = request.ipId, terms = request.terms;
|
4554
|
-
|
5161
|
+
_context13.next = 4;
|
4555
5162
|
return this.isRegistered(ipId);
|
4556
5163
|
case 4:
|
4557
|
-
isRegistered =
|
5164
|
+
isRegistered = _context13.sent;
|
4558
5165
|
if (isRegistered) {
|
4559
|
-
|
5166
|
+
_context13.next = 7;
|
4560
5167
|
break;
|
4561
5168
|
}
|
4562
5169
|
throw new Error("The IP with id ".concat(ipId, " is not registered."));
|
4563
5170
|
case 7:
|
4564
|
-
|
5171
|
+
_context13.next = 9;
|
4565
5172
|
return validateLicenseTerms(terms, this.rpcClient);
|
4566
5173
|
case 9:
|
4567
|
-
licenseTerms =
|
4568
|
-
|
5174
|
+
licenseTerms = _context13.sent;
|
5175
|
+
_context13.next = 12;
|
4569
5176
|
return this.licenseTemplateClient.getLicenseTermsId({
|
4570
5177
|
terms: licenseTerms
|
4571
5178
|
});
|
4572
5179
|
case 12:
|
4573
|
-
licenseRes =
|
4574
|
-
|
5180
|
+
licenseRes = _context13.sent;
|
5181
|
+
_context13.next = 15;
|
5182
|
+
return this.rpcClient.getBlock();
|
5183
|
+
case 15:
|
5184
|
+
blockTimestamp = _context13.sent.timestamp;
|
5185
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
4575
5186
|
ipAccount = new IpAccountImplClient(this.rpcClient, this.wallet, ipId);
|
4576
|
-
|
5187
|
+
_context13.next = 20;
|
4577
5188
|
return ipAccount.state();
|
4578
|
-
case
|
4579
|
-
_yield$ipAccount$
|
4580
|
-
state = _yield$ipAccount$
|
4581
|
-
|
5189
|
+
case 20:
|
5190
|
+
_yield$ipAccount$stat2 = _context13.sent;
|
5191
|
+
state = _yield$ipAccount$stat2.result;
|
5192
|
+
_context13.next = 24;
|
4582
5193
|
return getPermissionSignature({
|
4583
5194
|
ipId: ipId,
|
4584
5195
|
deadline: calculatedDeadline,
|
@@ -4593,8 +5204,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4593
5204
|
func: "function attachLicenseTerms(address,address,uint256)"
|
4594
5205
|
}]
|
4595
5206
|
});
|
4596
|
-
case
|
4597
|
-
sigAttachSignature =
|
5207
|
+
case 24:
|
5208
|
+
sigAttachSignature = _context13.sent;
|
4598
5209
|
object = {
|
4599
5210
|
ipId: ipId,
|
4600
5211
|
terms: licenseTerms,
|
@@ -4604,49 +5215,49 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4604
5215
|
signature: sigAttachSignature
|
4605
5216
|
}
|
4606
5217
|
};
|
4607
|
-
if (!((_request$
|
4608
|
-
|
5218
|
+
if (!((_request$txOptions21 = request.txOptions) !== null && _request$txOptions21 !== void 0 && _request$txOptions21.encodedTxDataOnly)) {
|
5219
|
+
_context13.next = 30;
|
4609
5220
|
break;
|
4610
5221
|
}
|
4611
|
-
return
|
5222
|
+
return _context13.abrupt("return", {
|
4612
5223
|
encodedTxData: this.licenseAttachmentWorkflowsClient.registerPilTermsAndAttachEncode(object)
|
4613
5224
|
});
|
4614
|
-
case
|
4615
|
-
|
5225
|
+
case 30:
|
5226
|
+
_context13.next = 32;
|
4616
5227
|
return this.licenseAttachmentWorkflowsClient.registerPilTermsAndAttach(object);
|
4617
|
-
case
|
4618
|
-
txHash =
|
4619
|
-
if (!((_request$
|
4620
|
-
|
5228
|
+
case 32:
|
5229
|
+
txHash = _context13.sent;
|
5230
|
+
if (!((_request$txOptions22 = request.txOptions) !== null && _request$txOptions22 !== void 0 && _request$txOptions22.waitForTransaction)) {
|
5231
|
+
_context13.next = 39;
|
4621
5232
|
break;
|
4622
5233
|
}
|
4623
|
-
|
5234
|
+
_context13.next = 36;
|
4624
5235
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4625
5236
|
hash: txHash
|
4626
5237
|
}));
|
4627
|
-
case
|
4628
|
-
return
|
5238
|
+
case 36:
|
5239
|
+
return _context13.abrupt("return", {
|
4629
5240
|
txHash: txHash,
|
4630
5241
|
licenseTermsId: licenseRes.selectedLicenseTermsId
|
4631
5242
|
});
|
4632
|
-
case
|
4633
|
-
return
|
5243
|
+
case 39:
|
5244
|
+
return _context13.abrupt("return", {
|
4634
5245
|
txHash: txHash
|
4635
5246
|
});
|
4636
|
-
case
|
4637
|
-
|
5247
|
+
case 40:
|
5248
|
+
_context13.next = 45;
|
4638
5249
|
break;
|
4639
|
-
case 39:
|
4640
|
-
_context9.prev = 39;
|
4641
|
-
_context9.t0 = _context9["catch"](0);
|
4642
|
-
handleError(_context9.t0, "Failed to register PIL terms and attach");
|
4643
5250
|
case 42:
|
5251
|
+
_context13.prev = 42;
|
5252
|
+
_context13.t0 = _context13["catch"](0);
|
5253
|
+
handleError(_context13.t0, "Failed to register PIL terms and attach");
|
5254
|
+
case 45:
|
4644
5255
|
case "end":
|
4645
|
-
return
|
5256
|
+
return _context13.stop();
|
4646
5257
|
}
|
4647
|
-
},
|
5258
|
+
}, _callee13, this, [[0, 42]]);
|
4648
5259
|
}));
|
4649
|
-
function registerPilTermsAndAttach(
|
5260
|
+
function registerPilTermsAndAttach(_x13) {
|
4650
5261
|
return _registerPilTermsAndAttach.apply(this, arguments);
|
4651
5262
|
}
|
4652
5263
|
return registerPilTermsAndAttach;
|
@@ -4670,16 +5281,16 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4670
5281
|
}, {
|
4671
5282
|
key: "mintAndRegisterIpAndMakeDerivativeWithLicenseTokens",
|
4672
5283
|
value: (function () {
|
4673
|
-
var _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4674
|
-
var _request$ipMetadata25, _request$ipMetadata26, _request$ipMetadata27, _request$ipMetadata28, _request$
|
4675
|
-
return _regeneratorRuntime().wrap(function
|
4676
|
-
while (1) switch (
|
5284
|
+
var _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(request) {
|
5285
|
+
var _request$ipMetadata25, _request$ipMetadata26, _request$ipMetadata27, _request$ipMetadata28, _request$txOptions23, licenseTokenIds, object, _request$txOptions24, txHash, receipt, log;
|
5286
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
5287
|
+
while (1) switch (_context14.prev = _context14.next) {
|
4677
5288
|
case 0:
|
4678
|
-
|
4679
|
-
|
5289
|
+
_context14.prev = 0;
|
5290
|
+
_context14.next = 3;
|
4680
5291
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
4681
5292
|
case 3:
|
4682
|
-
licenseTokenIds =
|
5293
|
+
licenseTokenIds = _context14.sent;
|
4683
5294
|
object = {
|
4684
5295
|
spgNftContract: getAddress$1(request.spgNftContract, "request.spgNftContract"),
|
4685
5296
|
recipient: request.recipient && getAddress$1(request.recipient, "request.recipient") || this.wallet.account.address,
|
@@ -4692,52 +5303,52 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4692
5303
|
licenseTokenIds: licenseTokenIds,
|
4693
5304
|
royaltyContext: viem.zeroAddress
|
4694
5305
|
};
|
4695
|
-
if (!((_request$
|
4696
|
-
|
5306
|
+
if (!((_request$txOptions23 = request.txOptions) !== null && _request$txOptions23 !== void 0 && _request$txOptions23.encodedTxDataOnly)) {
|
5307
|
+
_context14.next = 9;
|
4697
5308
|
break;
|
4698
5309
|
}
|
4699
|
-
return
|
5310
|
+
return _context14.abrupt("return", {
|
4700
5311
|
encodedTxData: this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeWithLicenseTokensEncode(object)
|
4701
5312
|
});
|
4702
5313
|
case 9:
|
4703
|
-
|
5314
|
+
_context14.next = 11;
|
4704
5315
|
return this.derivativeWorkflowsClient.mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(object);
|
4705
5316
|
case 11:
|
4706
|
-
txHash =
|
4707
|
-
if (!((_request$
|
4708
|
-
|
5317
|
+
txHash = _context14.sent;
|
5318
|
+
if (!((_request$txOptions24 = request.txOptions) !== null && _request$txOptions24 !== void 0 && _request$txOptions24.waitForTransaction)) {
|
5319
|
+
_context14.next = 18;
|
4709
5320
|
break;
|
4710
5321
|
}
|
4711
|
-
|
5322
|
+
_context14.next = 15;
|
4712
5323
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4713
5324
|
hash: txHash
|
4714
5325
|
}));
|
4715
5326
|
case 15:
|
4716
|
-
receipt =
|
4717
|
-
log = this.
|
4718
|
-
return
|
5327
|
+
receipt = _context14.sent;
|
5328
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
5329
|
+
return _context14.abrupt("return", {
|
4719
5330
|
txHash: txHash,
|
4720
5331
|
ipId: log.ipId,
|
4721
5332
|
tokenId: log.tokenId
|
4722
5333
|
});
|
4723
5334
|
case 18:
|
4724
|
-
return
|
5335
|
+
return _context14.abrupt("return", {
|
4725
5336
|
txHash: txHash
|
4726
5337
|
});
|
4727
5338
|
case 19:
|
4728
|
-
|
5339
|
+
_context14.next = 24;
|
4729
5340
|
break;
|
4730
5341
|
case 21:
|
4731
|
-
|
4732
|
-
|
4733
|
-
handleError(
|
5342
|
+
_context14.prev = 21;
|
5343
|
+
_context14.t0 = _context14["catch"](0);
|
5344
|
+
handleError(_context14.t0, "Failed to mint and register IP and make derivative with license tokens");
|
4734
5345
|
case 24:
|
4735
5346
|
case "end":
|
4736
|
-
return
|
5347
|
+
return _context14.stop();
|
4737
5348
|
}
|
4738
|
-
},
|
5349
|
+
}, _callee14, this, [[0, 21]]);
|
4739
5350
|
}));
|
4740
|
-
function mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(
|
5351
|
+
function mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(_x14) {
|
4741
5352
|
return _mintAndRegisterIpAndMakeDerivativeWithLicenseTokens.apply(this, arguments);
|
4742
5353
|
}
|
4743
5354
|
return mintAndRegisterIpAndMakeDerivativeWithLicenseTokens;
|
@@ -4748,12 +5359,12 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4748
5359
|
* @param request.nftContract The address of the NFT collection.
|
4749
5360
|
* @param request.licenseTokenIds The IDs of the license tokens to be burned for linking the IP to parent IPs.
|
4750
5361
|
* @param request.tokenId The ID of the NFT.
|
4751
|
-
* @param request.deadline [Optional] The deadline for the signature in milliseconds, default is 1000ms.
|
4752
5362
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
4753
5363
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
4754
5364
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
4755
5365
|
* @param request.ipMetadata.nftMetadataURI [Optional] The URI of the metadata for the NFT.
|
4756
5366
|
* @param request.ipMetadata.nftMetadataHash [Optional] The hash of the metadata for the IP NFT.
|
5367
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
4757
5368
|
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
4758
5369
|
* @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.
|
4759
5370
|
*/
|
@@ -4761,33 +5372,37 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4761
5372
|
}, {
|
4762
5373
|
key: "registerIpAndMakeDerivativeWithLicenseTokens",
|
4763
5374
|
value: (function () {
|
4764
|
-
var _registerIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4765
|
-
var _request$ipMetadata29, _request$ipMetadata30, _request$ipMetadata31, _request$ipMetadata32, _request$
|
4766
|
-
return _regeneratorRuntime().wrap(function
|
4767
|
-
while (1) switch (
|
5375
|
+
var _registerIpAndMakeDerivativeWithLicenseTokens = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(request) {
|
5376
|
+
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;
|
5377
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
5378
|
+
while (1) switch (_context15.prev = _context15.next) {
|
4768
5379
|
case 0:
|
4769
|
-
|
5380
|
+
_context15.prev = 0;
|
4770
5381
|
tokenId = BigInt(request.tokenId);
|
4771
|
-
|
5382
|
+
_context15.next = 4;
|
4772
5383
|
return this.getIpIdAddress(request.nftContract, tokenId);
|
4773
5384
|
case 4:
|
4774
|
-
ipIdAddress =
|
4775
|
-
|
5385
|
+
ipIdAddress = _context15.sent;
|
5386
|
+
_context15.next = 7;
|
4776
5387
|
return this.isRegistered(ipIdAddress);
|
4777
5388
|
case 7:
|
4778
|
-
isRegistered =
|
5389
|
+
isRegistered = _context15.sent;
|
4779
5390
|
if (!isRegistered) {
|
4780
|
-
|
5391
|
+
_context15.next = 10;
|
4781
5392
|
break;
|
4782
5393
|
}
|
4783
5394
|
throw new Error("The NFT with id ".concat(tokenId, " is already registered as IP."));
|
4784
5395
|
case 10:
|
4785
|
-
|
5396
|
+
_context15.next = 12;
|
4786
5397
|
return this.validateLicenseTokenIds(request.licenseTokenIds);
|
4787
5398
|
case 12:
|
4788
|
-
licenseTokenIds =
|
4789
|
-
|
4790
|
-
|
5399
|
+
licenseTokenIds = _context15.sent;
|
5400
|
+
_context15.next = 15;
|
5401
|
+
return this.rpcClient.getBlock();
|
5402
|
+
case 15:
|
5403
|
+
blockTimestamp = _context15.sent.timestamp;
|
5404
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
5405
|
+
_context15.next = 19;
|
4791
5406
|
return getPermissionSignature({
|
4792
5407
|
ipId: ipIdAddress,
|
4793
5408
|
deadline: calculatedDeadline,
|
@@ -4804,9 +5419,9 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4804
5419
|
func: "function setAll(address,string,bytes32,bytes32)"
|
4805
5420
|
}]
|
4806
5421
|
});
|
4807
|
-
case
|
4808
|
-
sigMetadataSignature =
|
4809
|
-
|
5422
|
+
case 19:
|
5423
|
+
sigMetadataSignature = _context15.sent;
|
5424
|
+
_context15.next = 22;
|
4810
5425
|
return getPermissionSignature({
|
4811
5426
|
ipId: ipIdAddress,
|
4812
5427
|
deadline: calculatedDeadline,
|
@@ -4827,8 +5442,8 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4827
5442
|
func: "function registerDerivativeWithLicenseTokens(address,uint256[],bytes)"
|
4828
5443
|
}]
|
4829
5444
|
});
|
4830
|
-
case
|
4831
|
-
sigRegisterSignature =
|
5445
|
+
case 22:
|
5446
|
+
sigRegisterSignature = _context15.sent;
|
4832
5447
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
4833
5448
|
tokenId: tokenId,
|
4834
5449
|
licenseTokenIds: licenseTokenIds,
|
@@ -4850,51 +5465,51 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4850
5465
|
signature: sigRegisterSignature
|
4851
5466
|
}
|
4852
5467
|
});
|
4853
|
-
if (!((_request$
|
4854
|
-
|
5468
|
+
if (!((_request$txOptions25 = request.txOptions) !== null && _request$txOptions25 !== void 0 && _request$txOptions25.encodedTxDataOnly)) {
|
5469
|
+
_context15.next = 28;
|
4855
5470
|
break;
|
4856
5471
|
}
|
4857
|
-
return
|
5472
|
+
return _context15.abrupt("return", {
|
4858
5473
|
encodedTxData: this.derivativeWorkflowsClient.registerIpAndMakeDerivativeWithLicenseTokensEncode(object)
|
4859
5474
|
});
|
4860
|
-
case
|
4861
|
-
|
5475
|
+
case 28:
|
5476
|
+
_context15.next = 30;
|
4862
5477
|
return this.derivativeWorkflowsClient.registerIpAndMakeDerivativeWithLicenseTokens(object);
|
4863
|
-
case
|
4864
|
-
txHash =
|
4865
|
-
if (!((_request$
|
4866
|
-
|
5478
|
+
case 30:
|
5479
|
+
txHash = _context15.sent;
|
5480
|
+
if (!((_request$txOptions26 = request.txOptions) !== null && _request$txOptions26 !== void 0 && _request$txOptions26.waitForTransaction)) {
|
5481
|
+
_context15.next = 37;
|
4867
5482
|
break;
|
4868
5483
|
}
|
4869
|
-
|
5484
|
+
_context15.next = 34;
|
4870
5485
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
4871
5486
|
hash: txHash
|
4872
5487
|
}));
|
4873
|
-
case
|
4874
|
-
receipt =
|
4875
|
-
log = this.
|
4876
|
-
return
|
5488
|
+
case 34:
|
5489
|
+
receipt = _context15.sent;
|
5490
|
+
log = this.getIpIdAndTokenIdFromEvent(receipt)[0];
|
5491
|
+
return _context15.abrupt("return", {
|
4877
5492
|
txHash: txHash,
|
4878
5493
|
ipId: log.ipId
|
4879
5494
|
});
|
4880
|
-
case
|
4881
|
-
return
|
5495
|
+
case 37:
|
5496
|
+
return _context15.abrupt("return", {
|
4882
5497
|
txHash: txHash
|
4883
5498
|
});
|
4884
|
-
case
|
4885
|
-
|
5499
|
+
case 38:
|
5500
|
+
_context15.next = 43;
|
4886
5501
|
break;
|
4887
|
-
case 37:
|
4888
|
-
_context11.prev = 37;
|
4889
|
-
_context11.t0 = _context11["catch"](0);
|
4890
|
-
handleError(_context11.t0, "Failed to register IP and make derivative with license tokens");
|
4891
5502
|
case 40:
|
5503
|
+
_context15.prev = 40;
|
5504
|
+
_context15.t0 = _context15["catch"](0);
|
5505
|
+
handleError(_context15.t0, "Failed to register IP and make derivative with license tokens");
|
5506
|
+
case 43:
|
4892
5507
|
case "end":
|
4893
|
-
return
|
5508
|
+
return _context15.stop();
|
4894
5509
|
}
|
4895
|
-
},
|
5510
|
+
}, _callee15, this, [[0, 40]]);
|
4896
5511
|
}));
|
4897
|
-
function registerIpAndMakeDerivativeWithLicenseTokens(
|
5512
|
+
function registerIpAndMakeDerivativeWithLicenseTokens(_x15) {
|
4898
5513
|
return _registerIpAndMakeDerivativeWithLicenseTokens.apply(this, arguments);
|
4899
5514
|
}
|
4900
5515
|
return registerIpAndMakeDerivativeWithLicenseTokens;
|
@@ -4902,27 +5517,27 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4902
5517
|
}, {
|
4903
5518
|
key: "getIpIdAddress",
|
4904
5519
|
value: function () {
|
4905
|
-
var _getIpIdAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
5520
|
+
var _getIpIdAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(nftContract, tokenId) {
|
4906
5521
|
var ipId;
|
4907
|
-
return _regeneratorRuntime().wrap(function
|
4908
|
-
while (1) switch (
|
5522
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
5523
|
+
while (1) switch (_context16.prev = _context16.next) {
|
4909
5524
|
case 0:
|
4910
|
-
|
5525
|
+
_context16.next = 2;
|
4911
5526
|
return this.ipAssetRegistryClient.ipId({
|
4912
5527
|
chainId: BigInt(chain[this.chainId]),
|
4913
5528
|
tokenContract: getAddress$1(nftContract, "nftContract"),
|
4914
5529
|
tokenId: BigInt(tokenId)
|
4915
5530
|
});
|
4916
5531
|
case 2:
|
4917
|
-
ipId =
|
4918
|
-
return
|
5532
|
+
ipId = _context16.sent;
|
5533
|
+
return _context16.abrupt("return", ipId);
|
4919
5534
|
case 4:
|
4920
5535
|
case "end":
|
4921
|
-
return
|
5536
|
+
return _context16.stop();
|
4922
5537
|
}
|
4923
|
-
},
|
5538
|
+
}, _callee16, this);
|
4924
5539
|
}));
|
4925
|
-
function getIpIdAddress(
|
5540
|
+
function getIpIdAddress(_x16, _x17) {
|
4926
5541
|
return _getIpIdAddress.apply(this, arguments);
|
4927
5542
|
}
|
4928
5543
|
return getIpIdAddress;
|
@@ -4930,23 +5545,23 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4930
5545
|
}, {
|
4931
5546
|
key: "isRegistered",
|
4932
5547
|
value: function () {
|
4933
|
-
var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
4934
|
-
return _regeneratorRuntime().wrap(function
|
4935
|
-
while (1) switch (
|
5548
|
+
var _isRegistered = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(ipId) {
|
5549
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
5550
|
+
while (1) switch (_context17.prev = _context17.next) {
|
4936
5551
|
case 0:
|
4937
|
-
|
5552
|
+
_context17.next = 2;
|
4938
5553
|
return this.ipAssetRegistryClient.isRegistered({
|
4939
5554
|
id: getAddress$1(ipId, "ipId")
|
4940
5555
|
});
|
4941
5556
|
case 2:
|
4942
|
-
return
|
5557
|
+
return _context17.abrupt("return", _context17.sent);
|
4943
5558
|
case 3:
|
4944
5559
|
case "end":
|
4945
|
-
return
|
5560
|
+
return _context17.stop();
|
4946
5561
|
}
|
4947
|
-
},
|
5562
|
+
}, _callee17, this);
|
4948
5563
|
}));
|
4949
|
-
function isRegistered(
|
5564
|
+
function isRegistered(_x18) {
|
4950
5565
|
return _isRegistered.apply(this, arguments);
|
4951
5566
|
}
|
4952
5567
|
return isRegistered;
|
@@ -4976,46 +5591,21 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
4976
5591
|
}
|
4977
5592
|
}, {
|
4978
5593
|
key: "getLicenseTermsId",
|
4979
|
-
value: function () {
|
4980
|
-
var
|
4981
|
-
|
4982
|
-
|
4983
|
-
|
4984
|
-
case 0:
|
4985
|
-
licensingModuleLicenseTermsAttachedEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
4986
|
-
licenseTermsId = licensingModuleLicenseTermsAttachedEvent.length >= 1 && licensingModuleLicenseTermsAttachedEvent[0].licenseTermsId;
|
4987
|
-
if (!(licenseTermsId === false)) {
|
4988
|
-
_context14.next = 7;
|
4989
|
-
break;
|
4990
|
-
}
|
4991
|
-
_context14.next = 5;
|
4992
|
-
return this.licenseRegistryReadOnlyClient.getDefaultLicenseTerms();
|
4993
|
-
case 5:
|
4994
|
-
defaultLicenseTerms = _context14.sent;
|
4995
|
-
licenseTermsId = defaultLicenseTerms.licenseTermsId;
|
4996
|
-
case 7:
|
4997
|
-
return _context14.abrupt("return", licenseTermsId);
|
4998
|
-
case 8:
|
4999
|
-
case "end":
|
5000
|
-
return _context14.stop();
|
5001
|
-
}
|
5002
|
-
}, _callee14, this);
|
5003
|
-
}));
|
5004
|
-
function getLicenseTermsId(_x15) {
|
5005
|
-
return _getLicenseTermsId.apply(this, arguments);
|
5006
|
-
}
|
5007
|
-
return getLicenseTermsId;
|
5008
|
-
}()
|
5594
|
+
value: function getLicenseTermsId(txReceipt) {
|
5595
|
+
var licensingModuleLicenseTermsAttachedEvent = this.licensingModuleClient.parseTxLicenseTermsAttachedEvent(txReceipt);
|
5596
|
+
var licenseTermsId = licensingModuleLicenseTermsAttachedEvent.length >= 1 && licensingModuleLicenseTermsAttachedEvent[0].licenseTermsId;
|
5597
|
+
return licenseTermsId === false ? this.defaultLicenseTermsId : licenseTermsId;
|
5598
|
+
}
|
5009
5599
|
}, {
|
5010
5600
|
key: "validateLicenseTokenIds",
|
5011
5601
|
value: function () {
|
5012
|
-
var _validateLicenseTokenIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
5013
|
-
var newLicenseTokenIds,
|
5014
|
-
return _regeneratorRuntime().wrap(function
|
5015
|
-
while (1) switch (
|
5602
|
+
var _validateLicenseTokenIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(licenseTokenIds) {
|
5603
|
+
var newLicenseTokenIds, _iterator6, _step6, licenseTokenId, tokenOwnerAddress;
|
5604
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
5605
|
+
while (1) switch (_context18.prev = _context18.next) {
|
5016
5606
|
case 0:
|
5017
5607
|
if (!(licenseTokenIds.length === 0)) {
|
5018
|
-
|
5608
|
+
_context18.next = 2;
|
5019
5609
|
break;
|
5020
5610
|
}
|
5021
5611
|
throw new Error("License token IDs must be provided.");
|
@@ -5023,53 +5613,86 @@ var IPAssetClient = /*#__PURE__*/function () {
|
|
5023
5613
|
newLicenseTokenIds = licenseTokenIds.map(function (id) {
|
5024
5614
|
return BigInt(id);
|
5025
5615
|
});
|
5026
|
-
|
5027
|
-
|
5028
|
-
|
5616
|
+
_iterator6 = _createForOfIteratorHelper(newLicenseTokenIds);
|
5617
|
+
_context18.prev = 4;
|
5618
|
+
_iterator6.s();
|
5029
5619
|
case 6:
|
5030
|
-
if ((
|
5031
|
-
|
5620
|
+
if ((_step6 = _iterator6.n()).done) {
|
5621
|
+
_context18.next = 15;
|
5032
5622
|
break;
|
5033
5623
|
}
|
5034
|
-
licenseTokenId =
|
5035
|
-
|
5624
|
+
licenseTokenId = _step6.value;
|
5625
|
+
_context18.next = 10;
|
5036
5626
|
return this.licenseTokenReadOnlyClient.ownerOf({
|
5037
5627
|
tokenId: licenseTokenId
|
5038
5628
|
});
|
5039
5629
|
case 10:
|
5040
|
-
tokenOwnerAddress =
|
5630
|
+
tokenOwnerAddress = _context18.sent;
|
5041
5631
|
if (tokenOwnerAddress) {
|
5042
|
-
|
5632
|
+
_context18.next = 13;
|
5043
5633
|
break;
|
5044
5634
|
}
|
5045
5635
|
throw new Error("License token id ".concat(licenseTokenId, " must be owned by the caller."));
|
5046
5636
|
case 13:
|
5047
|
-
|
5637
|
+
_context18.next = 6;
|
5048
5638
|
break;
|
5049
5639
|
case 15:
|
5050
|
-
|
5640
|
+
_context18.next = 20;
|
5051
5641
|
break;
|
5052
5642
|
case 17:
|
5053
|
-
|
5054
|
-
|
5055
|
-
|
5643
|
+
_context18.prev = 17;
|
5644
|
+
_context18.t0 = _context18["catch"](4);
|
5645
|
+
_iterator6.e(_context18.t0);
|
5056
5646
|
case 20:
|
5057
|
-
|
5058
|
-
|
5059
|
-
return
|
5647
|
+
_context18.prev = 20;
|
5648
|
+
_iterator6.f();
|
5649
|
+
return _context18.finish(20);
|
5060
5650
|
case 23:
|
5061
|
-
return
|
5651
|
+
return _context18.abrupt("return", newLicenseTokenIds);
|
5062
5652
|
case 24:
|
5063
5653
|
case "end":
|
5064
|
-
return
|
5654
|
+
return _context18.stop();
|
5065
5655
|
}
|
5066
|
-
},
|
5656
|
+
}, _callee18, this, [[4, 17, 20, 23]]);
|
5067
5657
|
}));
|
5068
|
-
function validateLicenseTokenIds(
|
5658
|
+
function validateLicenseTokenIds(_x19) {
|
5069
5659
|
return _validateLicenseTokenIds.apply(this, arguments);
|
5070
5660
|
}
|
5071
5661
|
return validateLicenseTokenIds;
|
5072
5662
|
}()
|
5663
|
+
}, {
|
5664
|
+
key: "getIpIdAndTokenIdFromEvent",
|
5665
|
+
value: function getIpIdAndTokenIdFromEvent(txReceipt) {
|
5666
|
+
var IPRegisteredLog = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(txReceipt);
|
5667
|
+
return IPRegisteredLog.map(function (log) {
|
5668
|
+
return {
|
5669
|
+
ipId: log.ipId,
|
5670
|
+
tokenId: log.tokenId
|
5671
|
+
};
|
5672
|
+
});
|
5673
|
+
}
|
5674
|
+
}, {
|
5675
|
+
key: "getDefaultLicenseTerms",
|
5676
|
+
value: function () {
|
5677
|
+
var _getDefaultLicenseTerms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
5678
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
5679
|
+
while (1) switch (_context19.prev = _context19.next) {
|
5680
|
+
case 0:
|
5681
|
+
_context19.next = 2;
|
5682
|
+
return this.licenseRegistryReadOnlyClient.getDefaultLicenseTerms();
|
5683
|
+
case 2:
|
5684
|
+
this.defaultLicenseTermsId = _context19.sent.licenseTermsId;
|
5685
|
+
case 3:
|
5686
|
+
case "end":
|
5687
|
+
return _context19.stop();
|
5688
|
+
}
|
5689
|
+
}, _callee19, this);
|
5690
|
+
}));
|
5691
|
+
function getDefaultLicenseTerms() {
|
5692
|
+
return _getDefaultLicenseTerms.apply(this, arguments);
|
5693
|
+
}
|
5694
|
+
return getDefaultLicenseTerms;
|
5695
|
+
}()
|
5073
5696
|
}]);
|
5074
5697
|
}();
|
5075
5698
|
|
@@ -5178,7 +5801,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5178
5801
|
* @param request.to The address that can be called by the `signer` (currently only modules can be `to`)
|
5179
5802
|
* @param request.permission The new permission level.
|
5180
5803
|
* @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.
|
5181
|
-
* @param request.deadline [Optional] The deadline for the signature in
|
5804
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
5182
5805
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
5183
5806
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
5184
5807
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
@@ -5188,7 +5811,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5188
5811
|
key: "createSetPermissionSignature",
|
5189
5812
|
value: (function () {
|
5190
5813
|
var _createSetPermissionSignature = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
5191
|
-
var _request$txOptions3, ipId, signer, to, txOptions, func, permission, deadline, ipAccountClient, data, _yield$ipAccountClien, state, calculatedDeadline, signature, req, _request$txOptions4, txHash;
|
5814
|
+
var _request$txOptions3, ipId, signer, to, txOptions, func, permission, deadline, ipAccountClient, data, _yield$ipAccountClien, state, blockTimestamp, calculatedDeadline, signature, req, _request$txOptions4, txHash;
|
5192
5815
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
5193
5816
|
while (1) switch (_context2.prev = _context2.next) {
|
5194
5817
|
case 0:
|
@@ -5208,8 +5831,12 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5208
5831
|
case 8:
|
5209
5832
|
_yield$ipAccountClien = _context2.sent;
|
5210
5833
|
state = _yield$ipAccountClien.result;
|
5211
|
-
|
5212
|
-
|
5834
|
+
_context2.next = 12;
|
5835
|
+
return this.rpcClient.getBlock();
|
5836
|
+
case 12:
|
5837
|
+
blockTimestamp = _context2.sent.timestamp;
|
5838
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
5839
|
+
_context2.next = 16;
|
5213
5840
|
return getPermissionSignature({
|
5214
5841
|
ipId: ipId,
|
5215
5842
|
deadline: calculatedDeadline,
|
@@ -5224,7 +5851,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5224
5851
|
chainId: chain[this.chainId],
|
5225
5852
|
wallet: this.wallet
|
5226
5853
|
});
|
5227
|
-
case
|
5854
|
+
case 16:
|
5228
5855
|
signature = _context2.sent;
|
5229
5856
|
req = {
|
5230
5857
|
to: getAddress$1(this.accessControllerClient.address, "accessControllerClientAddress"),
|
@@ -5235,46 +5862,46 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5235
5862
|
signature: signature
|
5236
5863
|
};
|
5237
5864
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.encodedTxDataOnly)) {
|
5238
|
-
_context2.next =
|
5865
|
+
_context2.next = 22;
|
5239
5866
|
break;
|
5240
5867
|
}
|
5241
5868
|
return _context2.abrupt("return", {
|
5242
5869
|
encodedTxData: ipAccountClient.executeWithSigEncode(req)
|
5243
5870
|
});
|
5244
|
-
case
|
5245
|
-
_context2.next =
|
5871
|
+
case 22:
|
5872
|
+
_context2.next = 24;
|
5246
5873
|
return ipAccountClient.executeWithSig(req);
|
5247
|
-
case
|
5874
|
+
case 24:
|
5248
5875
|
txHash = _context2.sent;
|
5249
5876
|
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
5250
|
-
_context2.next =
|
5877
|
+
_context2.next = 31;
|
5251
5878
|
break;
|
5252
5879
|
}
|
5253
|
-
_context2.next =
|
5880
|
+
_context2.next = 28;
|
5254
5881
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, txOptions), {}, {
|
5255
5882
|
hash: txHash
|
5256
5883
|
}));
|
5257
|
-
case
|
5884
|
+
case 28:
|
5258
5885
|
return _context2.abrupt("return", {
|
5259
5886
|
txHash: txHash,
|
5260
5887
|
success: true
|
5261
5888
|
});
|
5262
|
-
case
|
5889
|
+
case 31:
|
5263
5890
|
return _context2.abrupt("return", {
|
5264
5891
|
txHash: txHash
|
5265
5892
|
});
|
5266
|
-
case
|
5267
|
-
_context2.next =
|
5893
|
+
case 32:
|
5894
|
+
_context2.next = 37;
|
5268
5895
|
break;
|
5269
|
-
case
|
5270
|
-
_context2.prev =
|
5896
|
+
case 34:
|
5897
|
+
_context2.prev = 34;
|
5271
5898
|
_context2.t0 = _context2["catch"](0);
|
5272
5899
|
handleError(_context2.t0, "Failed to create set permission signature");
|
5273
|
-
case
|
5900
|
+
case 37:
|
5274
5901
|
case "end":
|
5275
5902
|
return _context2.stop();
|
5276
5903
|
}
|
5277
|
-
}, _callee2, this, [[0,
|
5904
|
+
}, _callee2, this, [[0, 34]]);
|
5278
5905
|
}));
|
5279
5906
|
function createSetPermissionSignature(_x2) {
|
5280
5907
|
return _createSetPermissionSignature.apply(this, arguments);
|
@@ -5475,6 +6102,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5475
6102
|
* @param request.permissions[].to The address that can be called by the `signer` (currently only modules can be `to`).
|
5476
6103
|
* @param request.permissions[].permission The new permission level.
|
5477
6104
|
* @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.
|
6105
|
+
* @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
5478
6106
|
* @param request.txOptions - [Optional] transaction. This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
5479
6107
|
* @returns A Promise that resolves to an object containing the transaction hash.
|
5480
6108
|
* @emits PermissionSet (ipAccountOwner, ipAccount, signer, to, func, permission)
|
@@ -5484,7 +6112,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5484
6112
|
key: "createBatchPermissionSignature",
|
5485
6113
|
value: (function () {
|
5486
6114
|
var _createBatchPermissionSignature = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(request) {
|
5487
|
-
var _request$txOptions9, permissions, deadline, ipId, txOptions, _iterator2, _step2, permission, ipAccountClient, data, _yield$ipAccountClien2, state, calculatedDeadline, signature, req, _request$txOptions10, txHash;
|
6115
|
+
var _request$txOptions9, permissions, deadline, ipId, txOptions, _iterator2, _step2, permission, ipAccountClient, data, _yield$ipAccountClien2, state, blockTimestamp, calculatedDeadline, signature, req, _request$txOptions10, txHash;
|
5488
6116
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
5489
6117
|
while (1) switch (_context5.prev = _context5.next) {
|
5490
6118
|
case 0:
|
@@ -5535,8 +6163,12 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5535
6163
|
case 23:
|
5536
6164
|
_yield$ipAccountClien2 = _context5.sent;
|
5537
6165
|
state = _yield$ipAccountClien2.result;
|
5538
|
-
|
5539
|
-
|
6166
|
+
_context5.next = 27;
|
6167
|
+
return this.rpcClient.getBlock();
|
6168
|
+
case 27:
|
6169
|
+
blockTimestamp = _context5.sent.timestamp;
|
6170
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
6171
|
+
_context5.next = 31;
|
5540
6172
|
return getPermissionSignature({
|
5541
6173
|
ipId: ipId,
|
5542
6174
|
deadline: calculatedDeadline,
|
@@ -5546,7 +6178,7 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5546
6178
|
wallet: this.wallet,
|
5547
6179
|
permissionFunc: "setBatchPermissions"
|
5548
6180
|
});
|
5549
|
-
case
|
6181
|
+
case 31:
|
5550
6182
|
signature = _context5.sent;
|
5551
6183
|
req = {
|
5552
6184
|
to: getAddress$1(this.accessControllerClient.address, "accessControllerAddress"),
|
@@ -5557,46 +6189,46 @@ var PermissionClient = /*#__PURE__*/function () {
|
|
5557
6189
|
signature: signature
|
5558
6190
|
};
|
5559
6191
|
if (!((_request$txOptions9 = request.txOptions) !== null && _request$txOptions9 !== void 0 && _request$txOptions9.encodedTxDataOnly)) {
|
5560
|
-
_context5.next =
|
6192
|
+
_context5.next = 37;
|
5561
6193
|
break;
|
5562
6194
|
}
|
5563
6195
|
return _context5.abrupt("return", {
|
5564
6196
|
encodedTxData: ipAccountClient.executeWithSigEncode(req)
|
5565
6197
|
});
|
5566
|
-
case
|
5567
|
-
_context5.next =
|
6198
|
+
case 37:
|
6199
|
+
_context5.next = 39;
|
5568
6200
|
return ipAccountClient.executeWithSig(req);
|
5569
|
-
case
|
6201
|
+
case 39:
|
5570
6202
|
txHash = _context5.sent;
|
5571
6203
|
if (!((_request$txOptions10 = request.txOptions) !== null && _request$txOptions10 !== void 0 && _request$txOptions10.waitForTransaction)) {
|
5572
|
-
_context5.next =
|
6204
|
+
_context5.next = 46;
|
5573
6205
|
break;
|
5574
6206
|
}
|
5575
|
-
_context5.next =
|
6207
|
+
_context5.next = 43;
|
5576
6208
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, txOptions), {}, {
|
5577
6209
|
hash: txHash
|
5578
6210
|
}));
|
5579
|
-
case
|
6211
|
+
case 43:
|
5580
6212
|
return _context5.abrupt("return", {
|
5581
6213
|
txHash: txHash,
|
5582
6214
|
success: true
|
5583
6215
|
});
|
5584
|
-
case
|
6216
|
+
case 46:
|
5585
6217
|
return _context5.abrupt("return", {
|
5586
6218
|
txHash: txHash
|
5587
6219
|
});
|
5588
|
-
case
|
5589
|
-
_context5.next =
|
6220
|
+
case 47:
|
6221
|
+
_context5.next = 52;
|
5590
6222
|
break;
|
5591
|
-
case
|
5592
|
-
_context5.prev =
|
6223
|
+
case 49:
|
6224
|
+
_context5.prev = 49;
|
5593
6225
|
_context5.t1 = _context5["catch"](0);
|
5594
6226
|
handleError(_context5.t1, "Failed to create batch permission signature");
|
5595
|
-
case
|
6227
|
+
case 52:
|
5596
6228
|
case "end":
|
5597
6229
|
return _context5.stop();
|
5598
6230
|
}
|
5599
|
-
}, _callee5, this, [[0,
|
6231
|
+
}, _callee5, this, [[0, 49], [3, 13, 16, 19]]);
|
5600
6232
|
}));
|
5601
6233
|
function createBatchPermissionSignature(_x5) {
|
5602
6234
|
return _createBatchPermissionSignature.apply(this, arguments);
|
@@ -6904,12 +7536,12 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
6904
7536
|
* @param request - The request object containing necessary data to execute IP Account a transaction.
|
6905
7537
|
* @param request.ipId The Ip Id to get ip account.
|
6906
7538
|
* @param request.to The recipient of the transaction.
|
6907
|
-
* @param request.value The amount of Ether to send.
|
6908
7539
|
* @param request.data The data to send along with the transaction.
|
6909
7540
|
* @param request.signer The signer of the transaction.
|
6910
7541
|
* @param request.deadline The deadline of the transaction signature.
|
6911
7542
|
* @param request.signature The signature of the transaction, EIP-712 encoded.
|
6912
|
-
* @param request.
|
7543
|
+
* @param request.value [Optional] The amount of Ether to send.
|
7544
|
+
* @param request.txOptions [Optional] This extends `WaitForTransactionReceiptParameters` from the Viem library, excluding the `hash` property.
|
6913
7545
|
* @returns Tx hash for the transaction.
|
6914
7546
|
*/
|
6915
7547
|
)
|
@@ -6925,7 +7557,7 @@ var IPAccountClient = /*#__PURE__*/function () {
|
|
6925
7557
|
ipAccountClient = new IpAccountImplClient(this.rpcClient, this.wallet, getAddress$1(request.ipId, "request.ipId"));
|
6926
7558
|
req = {
|
6927
7559
|
to: getAddress$1(request.to, "request.to"),
|
6928
|
-
value: BigInt(0),
|
7560
|
+
value: BigInt(request.value || 0),
|
6929
7561
|
data: request.data,
|
6930
7562
|
signer: getAddress$1(request.signer, "request.signer"),
|
6931
7563
|
deadline: BigInt(request.deadline),
|
@@ -8054,7 +8686,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8054
8686
|
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
8055
8687
|
* @param request.recipient [Optional] The address of the recipient of the minted NFT,default value is your wallet address.
|
8056
8688
|
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
8057
|
-
* . @param request.deadline [Optional] The deadline for the signature in
|
8689
|
+
* . @param request.deadline [Optional] The deadline for the signature in seconds, default value is 1000s.
|
8058
8690
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
8059
8691
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
8060
8692
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
@@ -8069,7 +8701,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8069
8701
|
key: "mintAndRegisterIpAndAttachLicenseAndAddToGroup",
|
8070
8702
|
value: (function () {
|
8071
8703
|
var _mintAndRegisterIpAndAttachLicenseAndAddToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
|
8072
|
-
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;
|
8704
|
+
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;
|
8073
8705
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
8074
8706
|
while (1) switch (_context2.prev = _context2.next) {
|
8075
8707
|
case 0:
|
@@ -8093,8 +8725,12 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8093
8725
|
case 10:
|
8094
8726
|
_yield$ipAccount$stat = _context2.sent;
|
8095
8727
|
state = _yield$ipAccount$stat.result;
|
8096
|
-
|
8097
|
-
|
8728
|
+
_context2.next = 14;
|
8729
|
+
return this.rpcClient.getBlock();
|
8730
|
+
case 14:
|
8731
|
+
blockTimestamp = _context2.sent.timestamp;
|
8732
|
+
calculatedDeadline = getDeadline(blockTimestamp, deadline);
|
8733
|
+
_context2.next = 18;
|
8098
8734
|
return getPermissionSignature({
|
8099
8735
|
ipId: groupId,
|
8100
8736
|
deadline: calculatedDeadline,
|
@@ -8109,7 +8745,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8109
8745
|
func: "function addIp(address,address[])"
|
8110
8746
|
}]
|
8111
8747
|
});
|
8112
|
-
case
|
8748
|
+
case 18:
|
8113
8749
|
sigAddToGroupSignature = _context2.sent;
|
8114
8750
|
object = _objectSpread2(_objectSpread2({}, request), {}, {
|
8115
8751
|
spgNftContract: getAddress$1(spgNftContract, "request.spgNftContract"),
|
@@ -8129,26 +8765,26 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8129
8765
|
}
|
8130
8766
|
});
|
8131
8767
|
if (!((_request$txOptions3 = request.txOptions) !== null && _request$txOptions3 !== void 0 && _request$txOptions3.encodedTxDataOnly)) {
|
8132
|
-
_context2.next =
|
8768
|
+
_context2.next = 24;
|
8133
8769
|
break;
|
8134
8770
|
}
|
8135
8771
|
return _context2.abrupt("return", {
|
8136
8772
|
encodedTxData: this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroupEncode(object)
|
8137
8773
|
});
|
8138
|
-
case
|
8139
|
-
_context2.next =
|
8774
|
+
case 24:
|
8775
|
+
_context2.next = 26;
|
8140
8776
|
return this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroup(object);
|
8141
|
-
case
|
8777
|
+
case 26:
|
8142
8778
|
txHash = _context2.sent;
|
8143
8779
|
if (!((_request$txOptions4 = request.txOptions) !== null && _request$txOptions4 !== void 0 && _request$txOptions4.waitForTransaction)) {
|
8144
|
-
_context2.next =
|
8780
|
+
_context2.next = 33;
|
8145
8781
|
break;
|
8146
8782
|
}
|
8147
|
-
_context2.next =
|
8783
|
+
_context2.next = 30;
|
8148
8784
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
8149
8785
|
hash: txHash
|
8150
8786
|
}));
|
8151
|
-
case
|
8787
|
+
case 30:
|
8152
8788
|
receipt = _context2.sent;
|
8153
8789
|
log = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(receipt)[0];
|
8154
8790
|
return _context2.abrupt("return", {
|
@@ -8156,22 +8792,22 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8156
8792
|
ipId: log.ipId,
|
8157
8793
|
tokenId: log.tokenId
|
8158
8794
|
});
|
8159
|
-
case
|
8795
|
+
case 33:
|
8160
8796
|
return _context2.abrupt("return", {
|
8161
8797
|
txHash: txHash
|
8162
8798
|
});
|
8163
|
-
case
|
8164
|
-
_context2.next =
|
8799
|
+
case 34:
|
8800
|
+
_context2.next = 39;
|
8165
8801
|
break;
|
8166
|
-
case
|
8167
|
-
_context2.prev =
|
8802
|
+
case 36:
|
8803
|
+
_context2.prev = 36;
|
8168
8804
|
_context2.t0 = _context2["catch"](0);
|
8169
8805
|
handleError(_context2.t0, "Failed to mint and register IP and attach license and add to group");
|
8170
|
-
case
|
8806
|
+
case 39:
|
8171
8807
|
case "end":
|
8172
8808
|
return _context2.stop();
|
8173
8809
|
}
|
8174
|
-
}, _callee2, this, [[0,
|
8810
|
+
}, _callee2, this, [[0, 36]]);
|
8175
8811
|
}));
|
8176
8812
|
function mintAndRegisterIpAndAttachLicenseAndAddToGroup(_x2) {
|
8177
8813
|
return _mintAndRegisterIpAndAttachLicenseAndAddToGroup.apply(this, arguments);
|
@@ -8185,7 +8821,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8185
8821
|
* @param request.groupId The ID of the group IP to add the newly registered IP.
|
8186
8822
|
* @param request.licenseTermsId The ID of the registered license terms that will be attached to the new IP.
|
8187
8823
|
* @param request.licenseTemplate [Optional] The address of the license template to be attached to the new group IP,default value is Programmable IP License.
|
8188
|
-
* . @param request.deadline [Optional] The deadline for the signature in
|
8824
|
+
* . @param request.deadline [Optional] The deadline for the signature in seconds, default is 1000s.
|
8189
8825
|
* @param request.ipMetadata - [Optional] The desired metadata for the newly minted NFT and newly registered IP.
|
8190
8826
|
* @param request.ipMetadata.ipMetadataURI [Optional] The URI of the metadata for the IP.
|
8191
8827
|
* @param request.ipMetadata.ipMetadataHash [Optional] The hash of the metadata for the IP.
|
@@ -8200,7 +8836,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8200
8836
|
key: "registerIpAndAttachLicenseAndAddToGroup",
|
8201
8837
|
value: (function () {
|
8202
8838
|
var _registerIpAndAttachLicenseAndAddToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(request) {
|
8203
|
-
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;
|
8839
|
+
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;
|
8204
8840
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
8205
8841
|
while (1) switch (_context3.prev = _context3.next) {
|
8206
8842
|
case 0:
|
@@ -8231,7 +8867,11 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8231
8867
|
case 12:
|
8232
8868
|
_yield$ipAccount$stat2 = _context3.sent;
|
8233
8869
|
state = _yield$ipAccount$stat2.result;
|
8234
|
-
|
8870
|
+
_context3.next = 16;
|
8871
|
+
return this.rpcClient.getBlock();
|
8872
|
+
case 16:
|
8873
|
+
blockTimestamp = _context3.sent.timestamp;
|
8874
|
+
calculatedDeadline = getDeadline(blockTimestamp, request.deadline);
|
8235
8875
|
_context3.t0 = getAddress$1(request.nftContract, "request.nftContract");
|
8236
8876
|
_context3.t1 = request.groupId;
|
8237
8877
|
_context3.t2 = request.licenseTemplate && getAddress$1(request.licenseTemplate, "request.licenseTemplate") || this.licenseTemplateClient.address;
|
@@ -8245,7 +8885,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8245
8885
|
_context3.t5 = BigInt(request.tokenId);
|
8246
8886
|
_context3.t6 = getAddress$1(this.wallet.account.address, "wallet.account.address");
|
8247
8887
|
_context3.t7 = calculatedDeadline;
|
8248
|
-
_context3.next =
|
8888
|
+
_context3.next = 28;
|
8249
8889
|
return getPermissionSignature({
|
8250
8890
|
ipId: getAddress$1(request.groupId, "request.groupId"),
|
8251
8891
|
deadline: calculatedDeadline,
|
@@ -8260,7 +8900,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8260
8900
|
func: "function addIp(address,address[])"
|
8261
8901
|
}]
|
8262
8902
|
});
|
8263
|
-
case
|
8903
|
+
case 28:
|
8264
8904
|
_context3.t8 = _context3.sent;
|
8265
8905
|
_context3.t9 = {
|
8266
8906
|
signer: _context3.t6,
|
@@ -8269,7 +8909,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8269
8909
|
};
|
8270
8910
|
_context3.t10 = getAddress$1(this.wallet.account.address, "wallet.account.address");
|
8271
8911
|
_context3.t11 = calculatedDeadline;
|
8272
|
-
_context3.next =
|
8912
|
+
_context3.next = 34;
|
8273
8913
|
return getPermissionSignature({
|
8274
8914
|
ipId: ipIdAddress,
|
8275
8915
|
deadline: calculatedDeadline,
|
@@ -8293,7 +8933,7 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8293
8933
|
func: "function attachLicenseTerms(address,address,uint256)"
|
8294
8934
|
}]
|
8295
8935
|
});
|
8296
|
-
case
|
8936
|
+
case 34:
|
8297
8937
|
_context3.t12 = _context3.sent;
|
8298
8938
|
_context3.t13 = {
|
8299
8939
|
signer: _context3.t10,
|
@@ -8311,26 +8951,26 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8311
8951
|
sigMetadataAndAttach: _context3.t13
|
8312
8952
|
};
|
8313
8953
|
if (!((_request$txOptions5 = request.txOptions) !== null && _request$txOptions5 !== void 0 && _request$txOptions5.encodedTxDataOnly)) {
|
8314
|
-
_context3.next =
|
8954
|
+
_context3.next = 39;
|
8315
8955
|
break;
|
8316
8956
|
}
|
8317
8957
|
return _context3.abrupt("return", {
|
8318
8958
|
encodedTxData: this.groupingWorkflowsClient.registerIpAndAttachLicenseAndAddToGroupEncode(object)
|
8319
8959
|
});
|
8320
|
-
case
|
8321
|
-
_context3.next =
|
8960
|
+
case 39:
|
8961
|
+
_context3.next = 41;
|
8322
8962
|
return this.groupingWorkflowsClient.registerIpAndAttachLicenseAndAddToGroup(object);
|
8323
|
-
case
|
8963
|
+
case 41:
|
8324
8964
|
txHash = _context3.sent;
|
8325
8965
|
if (!((_request$txOptions6 = request.txOptions) !== null && _request$txOptions6 !== void 0 && _request$txOptions6.waitForTransaction)) {
|
8326
|
-
_context3.next =
|
8966
|
+
_context3.next = 48;
|
8327
8967
|
break;
|
8328
8968
|
}
|
8329
|
-
_context3.next =
|
8969
|
+
_context3.next = 45;
|
8330
8970
|
return this.rpcClient.waitForTransactionReceipt(_objectSpread2(_objectSpread2({}, request.txOptions), {}, {
|
8331
8971
|
hash: txHash
|
8332
8972
|
}));
|
8333
|
-
case
|
8973
|
+
case 45:
|
8334
8974
|
receipt = _context3.sent;
|
8335
8975
|
log = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(receipt)[0];
|
8336
8976
|
return _context3.abrupt("return", {
|
@@ -8338,19 +8978,19 @@ var GroupClient = /*#__PURE__*/function () {
|
|
8338
8978
|
ipId: log.ipId,
|
8339
8979
|
tokenId: log.tokenId
|
8340
8980
|
});
|
8341
|
-
case
|
8981
|
+
case 48:
|
8342
8982
|
return _context3.abrupt("return", {
|
8343
8983
|
txHash: txHash
|
8344
8984
|
});
|
8345
|
-
case
|
8346
|
-
_context3.prev =
|
8985
|
+
case 51:
|
8986
|
+
_context3.prev = 51;
|
8347
8987
|
_context3.t14 = _context3["catch"](0);
|
8348
8988
|
handleError(_context3.t14, "Failed to register IP and attach license and add to group");
|
8349
|
-
case
|
8989
|
+
case 54:
|
8350
8990
|
case "end":
|
8351
8991
|
return _context3.stop();
|
8352
8992
|
}
|
8353
|
-
}, _callee3, this, [[0,
|
8993
|
+
}, _callee3, this, [[0, 51]]);
|
8354
8994
|
}));
|
8355
8995
|
function registerIpAndAttachLicenseAndAddToGroup(_x3) {
|
8356
8996
|
return _registerIpAndAttachLicenseAndAddToGroup.apply(this, arguments);
|
@@ -8771,4 +9411,5 @@ exports.StoryClient = StoryClient;
|
|
8771
9411
|
exports.convertCIDtoHashIPFS = convertCIDtoHashIPFS;
|
8772
9412
|
exports.convertHashIPFStoCID = convertHashIPFStoCID;
|
8773
9413
|
exports.getPermissionSignature = getPermissionSignature;
|
9414
|
+
exports.getSignature = getSignature;
|
8774
9415
|
exports.odyssey = odyssey;
|