@campnetwork/origin 1.4.0-alpha.0 → 1.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +6 -3
- package/dist/core.d.ts +3 -2
- package/dist/core.esm.d.ts +3 -2
- package/dist/core.esm.js +20 -17
- package/dist/react/index.esm.d.ts +3 -2
- package/dist/react/index.esm.js +5 -3
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -557,12 +557,15 @@ let u;return u=p?yield n.getBalance({address:t}):yield n.readContract({address:o
|
|
|
557
557
|
*/function _e(e){return a(this,void 0,void 0,(function*(){return this.callContractMethod(this.environment.IP_ROYALTY_VAULT_FACTORY_CONTRACT_ADDRESS,this.environment.IP_ROYALTY_VAULT_FACTORY_ABI,"deployVaultForExistingNFT",[e],{waitForReceipt:!0})}))}const ke=[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],stateMutability:"view",type:"function"}];
|
|
558
558
|
/**
|
|
559
559
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
560
|
-
* If no holder is provided, the
|
|
560
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
561
|
+
* since RT tokens are minted to the TBA by default.
|
|
561
562
|
*
|
|
562
563
|
* @param tokenId The token ID whose vault to query.
|
|
563
|
-
* @param holder Optional holder address. Defaults to
|
|
564
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
564
565
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
565
|
-
*/function Ne(t,n){return a(this,void 0,void 0,(function*(){
|
|
566
|
+
*/function Ne(t,n){return a(this,void 0,void 0,(function*(){
|
|
567
|
+
// Default to the NFT's TBA, since RT tokens are minted there
|
|
568
|
+
const i=n||(yield this.getTokenBoundAccount(t)),a=yield this.callContractMethod(this.environment.DATANFT_CONTRACT_ADDRESS,this.environment.IPNFT_ABI,"getRoyaltyVault",[t]);
|
|
566
569
|
// Get vault address
|
|
567
570
|
if(!a||a===e.zeroAddress)throw new Error(`No royalty vault found for token ${t}. Deploy a vault first using deployVaultForExistingNFT.`);const s=C(),[r,o,p]=yield Promise.all([s.readContract({address:a,abi:ke,functionName:"balanceOf",args:[i]}),s.readContract({address:a,abi:ke,functionName:"totalSupply"}),s.readContract({address:a,abi:ke,functionName:"decimals"})]);
|
|
568
571
|
// Read balance, totalSupply, and decimals in parallel
|
package/dist/core.d.ts
CHANGED
|
@@ -763,10 +763,11 @@ interface RoyaltyTokenBalance {
|
|
|
763
763
|
}
|
|
764
764
|
/**
|
|
765
765
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
766
|
-
* If no holder is provided, the
|
|
766
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
767
|
+
* since RT tokens are minted to the TBA by default.
|
|
767
768
|
*
|
|
768
769
|
* @param tokenId The token ID whose vault to query.
|
|
769
|
-
* @param holder Optional holder address. Defaults to
|
|
770
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
770
771
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
771
772
|
*/
|
|
772
773
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
package/dist/core.esm.d.ts
CHANGED
|
@@ -763,10 +763,11 @@ interface RoyaltyTokenBalance {
|
|
|
763
763
|
}
|
|
764
764
|
/**
|
|
765
765
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
766
|
-
* If no holder is provided, the
|
|
766
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
767
|
+
* since RT tokens are minted to the TBA by default.
|
|
767
768
|
*
|
|
768
769
|
* @param tokenId The token ID whose vault to query.
|
|
769
|
-
* @param holder Optional holder address. Defaults to
|
|
770
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
770
771
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
771
772
|
*/
|
|
772
773
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
package/dist/core.esm.js
CHANGED
|
@@ -55,9 +55,9 @@ e._isSigner||e.provider&&"function"==typeof e.signMessage?new v(e):new w(e)}
|
|
|
55
55
|
* @param chain The chain to use
|
|
56
56
|
* @param rpcUrl Optional RPC URL (defaults to chain's default RPC)
|
|
57
57
|
* @returns WalletClient
|
|
58
|
-
*/function g(n,i,a){return e({account:n,chain:i,transport:t(a)})}const C={id:123420001114,name:"Basecamp",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc-campnetwork.xyz","https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Explorer",url:"https://basecamp.cloud.blockscout.com/"}}},E={id:484,name:"Camp Network",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.camp.raas.gelato.cloud/"]}},blockExplorers:{default:{name:"Explorer",url:"https://camp.cloud.blockscout.com/"}}};class P extends Error{constructor(e,t){super(e),this.name="APIError",this.statusCode=t||500,Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:this.statusCode||500}}}class S extends Error{constructor(e){super(e),this.name="ValidationError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400}}}class R extends Error{constructor(e){super(e),this.name="AuthenticationError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:401}}}class _ extends Error{constructor(e){super(e),this.name="WalletError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400}}}class x extends Error{constructor(e,t){super(e),this.name="ContractError",this.contractName=null==t?void 0:t.contractName,this.methodName=null==t?void 0:t.methodName,Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400,contractName:this.contractName,methodName:this.methodName}}}function
|
|
58
|
+
*/function g(n,i,a){return e({account:n,chain:i,transport:t(a)})}const C={id:123420001114,name:"Basecamp",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc-campnetwork.xyz","https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Explorer",url:"https://basecamp.cloud.blockscout.com/"}}},E={id:484,name:"Camp Network",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.camp.raas.gelato.cloud/"]}},blockExplorers:{default:{name:"Explorer",url:"https://camp.cloud.blockscout.com/"}}};class P extends Error{constructor(e,t){super(e),this.name="APIError",this.statusCode=t||500,Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:this.statusCode||500}}}class S extends Error{constructor(e){super(e),this.name="ValidationError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400}}}class R extends Error{constructor(e){super(e),this.name="AuthenticationError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:401}}}class _ extends Error{constructor(e){super(e),this.name="WalletError",Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400}}}class x extends Error{constructor(e,t){super(e),this.name="ContractError",this.contractName=null==t?void 0:t.contractName,this.methodName=null==t?void 0:t.methodName,Error.captureStackTrace(this,this.constructor)}toJSON(){return{error:this.name,message:this.message,statusCode:400,contractName:this.contractName,methodName:this.methodName}}}function k(e){if(e instanceof Error)return e.message;if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return String(e)}}
|
|
59
59
|
// @ts-ignore
|
|
60
|
-
let k=null,N=null,M=null;const O=e=>{var n;const a=M||C;return N&&(null===(n=N.chain)||void 0===n?void 0:n.id)===a.id||(N=i({chain:a,transport:t()})),N};var B=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidDeadline",type:"error"},{inputs:[],name:"InvalidDuration",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidPaymentToken",type:"error"},{inputs:[],name:"InvalidPrice",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[],name:"NotTokenOwner",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"TokenAlreadyExists",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"appRegistry",outputs:[{internalType:"contract AppRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"dataStatus",outputs:[{internalType:"enum IIpNFT.DataStatus",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeModule",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"erc6551Account",outputs:[{internalType:"contract IERC6551Account",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"erc6551Registry",outputs:[{internalType:"contract IERC6551Registry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"finalizeDelete",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getAccount",outputs:[{internalType:"address",name:"account",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getRoyaltyVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getTerms",outputs:[{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"uint256",name:"maxTermDuration_",type:"uint256"},{internalType:"address",name:"signer_",type:"address"},{internalType:"address",name:"wCAMP_",type:"address"},{internalType:"uint256",name:"minTermDuration_",type:"uint256"},{internalType:"uint256",name:"minPrice_",type:"uint256"},{internalType:"uint256",name:"maxRoyaltyBps_",type:"uint256"},{internalType:"contract IERC6551Registry",name:"registry_",type:"address"},{internalType:"contract IERC6551Account",name:"implementation_",type:"address"},{internalType:"contract AppRegistry",name:"appRegistry_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"markDisputed",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"marketPlace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxRoyaltyBps",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxTermDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minTermDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"mintWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltyVaultFactory",outputs:[{internalType:"contract IpRoyaltyVaultFactory",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_appRegistry",type:"address"}],name:"setAppRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_disputeModule",type:"address"}],name:"setDisputeModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_marketPlace",type:"address"}],name:"setMarketPlace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_royaltyVaultFactory",type:"address"}],name:"setRoyaltyVaultFactory",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"}],name:"setSigner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"signer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenInfo",outputs:[{components:[{internalType:"string",name:"tokenURI",type:"string"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"bytes32",name:"contentHash",type:"bytes32"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"terms",type:"tuple"},{internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"},{internalType:"string",name:"appId",type:"string"}],internalType:"struct IIpNFT.TokenInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"newTerms",type:"tuple"}],name:"updateTerms",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"wCAMP",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],F=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"FeesExceedMaximum",type:"error"},{inputs:[],name:"FeesMismatch",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidLicenseType",type:"error"},{inputs:[],name:"InvalidParentIp",type:"error"},{inputs:[],name:"InvalidPayment",type:"error"},{inputs:[],name:"InvalidPrice",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"MaxParentsExceeded",type:"error"},{inputs:[],name:"MaxRoyaltyExceeded",type:"error"},{inputs:[],name:"NoSubscriptionFound",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"ParentAlreadyExists",type:"error"},{inputs:[],name:"ParentIpAlreadyDeleted",type:"error"},{inputs:[],name:"ParentIpAlreadyDisputed",type:"error"},{inputs:[],name:"SubscriptionNotAllowed",type:"error"},{inputs:[],name:"TermsMismatch",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"VaultNotFound",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"MAX_PARENTS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],name:"buyAccess",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"revenueToken",type:"address"}],name:"claimRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address[]",name:"revenueTokens",type:"address[]"}],name:"claimRevenueBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"holder",type:"address"},{internalType:"address",name:"revenueToken",type:"address"}],name:"claimableRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getRoyaltyVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getVaultRevenueTokens",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"ipId",type:"uint256"},{internalType:"uint256",name:"parent",type:"uint256"}],name:"hasParentIp",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dataNFT_",type:"address"},{internalType:"uint16",name:"protocolFeeBps_",type:"uint16"},{internalType:"address",name:"treasury_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipToken",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"parentRoyaltyPercent",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFeeBps",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"royaltyStack",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"childIpId",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"address",name:"creator",type:"address"}],name:"setParentIpsAndRoyaltyPercents",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"subscriptionExpiry",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"updateProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"updateTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],U=[{type:"receive",stateMutability:"payable"},{type:"function",name:"execute",inputs:[{name:"to",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"},{name:"operation",type:"uint8",internalType:"uint8"}],outputs:[{name:"result",type:"bytes",internalType:"bytes"}],stateMutability:"payable"},{type:"function",name:"isValidSignature",inputs:[{name:"hash",type:"bytes32",internalType:"bytes32"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[{name:"magicValue",type:"bytes4",internalType:"bytes4"}],stateMutability:"view"},{type:"function",name:"isValidSigner",inputs:[{name:"signer",type:"address",internalType:"address"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"state",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"token",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"}],$=[{inputs:[{internalType:"address",name:"_marketplace",type:"address"},{internalType:"address",name:"_ipNFT",type:"address"},{internalType:"address",name:"_appRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"EmptyMintList",type:"error"},{inputs:[],name:"EmptyPurchaseList",type:"error"},{inputs:[],name:"InsufficientAllowance",type:"error"},{inputs:[],name:"InvalidTotalPayment",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"reason",type:"string"}],name:"MintFailed",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"reason",type:"string"}],name:"PurchaseFailed",type:"error"},{inputs:[],name:"ReentrancyGuardReentrantCall",type:"error"},{inputs:[],name:"RefundFailed",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"BulkMintExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"successCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"failureCount",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],name:"BulkMintPartial",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"},{indexed:!1,internalType:"uint256",name:"totalPaid",type:"uint256"}],name:"BulkPurchaseExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"successCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"failureCount",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],name:"BulkPurchasePartial",type:"event"},{inputs:[],name:"appRegistry",outputs:[{internalType:"contract IAppRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"buildPurchaseParams",outputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],name:"bulkBuyAccess",outputs:[{internalType:"uint256",name:"totalPaid",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],name:"bulkBuyAccessTolerant",outputs:[{components:[{internalType:"uint256",name:"successCount",type:"uint256"},{internalType:"uint256",name:"failureCount",type:"uint256"},{internalType:"uint256",name:"totalSpent",type:"uint256"},{internalType:"uint256",name:"refundAmount",type:"uint256"},{internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.TolerantResult",name:"result",type:"tuple"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint8",name:"licenseType",type:"uint8"}],internalType:"struct IBatchOperations.LicenseTermsParam",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct IBatchOperations.MintParams[]",name:"mints",type:"tuple[]"}],name:"bulkMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint8",name:"licenseType",type:"uint8"}],internalType:"struct IBatchOperations.LicenseTermsParam",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct IBatchOperations.MintParams[]",name:"mints",type:"tuple[]"}],name:"bulkMintTolerant",outputs:[{components:[{internalType:"uint256",name:"successCount",type:"uint256"},{internalType:"uint256",name:"failureCount",type:"uint256"},{internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.TolerantMintResult",name:"result",type:"tuple"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"checkActiveStatus",outputs:[{internalType:"bool[]",name:"activeFlags",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"ipNFT",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"marketplace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"previewBulkCost",outputs:[{components:[{internalType:"uint256",name:"totalNativeCost",type:"uint256"},{internalType:"uint256",name:"totalERC20Cost",type:"uint256"},{internalType:"uint256",name:"validCount",type:"uint256"},{internalType:"uint256[]",name:"invalidTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.BulkCostPreview",name:"preview",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams",name:"params",type:"tuple"}],name:"tryERC20Purchase",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],H=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"AlreadyVoted",type:"error"},{inputs:[],name:"CoolDownPeriodActive",type:"error"},{inputs:[],name:"CoolDownPeriodOver",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EvidenceAlreadyUsed",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidBondFeeBps",type:"error"},{inputs:[],name:"InvalidChildIpId",type:"error"},{inputs:[],name:"InvalidDisputeStatus",type:"error"},{inputs:[],name:"InvalidDisputeTag",type:"error"},{inputs:[],name:"InvalidEvidenceHash",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidTargetIp",type:"error"},{inputs:[],name:"NoVotingPower",type:"error"},{inputs:[],name:"NotAParentIp",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[],name:"NotInitiator",type:"error"},{inputs:[],name:"NotTokenOwner",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"ParentNotDisputed",type:"error"},{inputs:[],name:"SelfAssertionNotAllowed",type:"error"},{inputs:[],name:"StakedAfterDispute",type:"error"},{inputs:[],name:"TagNotAllowed",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"VotingPeriodActive",type:"error"},{inputs:[],name:"VotingPeriodOver",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"cancelDispute",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"bytes32",name:"_counterEvidenceHash",type:"bytes32"}],name:"disputeAssertion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disputeBond",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeCoolDownPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeCounter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeJudgementPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeQuorum",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"disputes",outputs:[{internalType:"address",name:"initiator",type:"address"},{internalType:"uint256",name:"targetId",type:"uint256"},{internalType:"bytes32",name:"disputeTag",type:"bytes32"},{internalType:"bytes32",name:"disputeEvidenceHash",type:"bytes32"},{internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"},{internalType:"uint256",name:"disputeTimestamp",type:"uint256"},{internalType:"uint256",name:"assertionTimestamp",type:"uint256"},{internalType:"uint256",name:"yesVotes",type:"uint256"},{internalType:"uint256",name:"noVotes",type:"uint256"},{internalType:"enum DisputeModule.DisputeStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"bondAmount",type:"uint256"},{internalType:"uint256",name:"protocolFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"hasVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IIpNFT",name:"_ipToken",type:"address"},{internalType:"contract IMarketplace",name:"_marketplace",type:"address"},{internalType:"contract IERC20",name:"_disputeToken",type:"address"},{internalType:"uint256",name:"_disputeBond",type:"uint256"},{internalType:"uint256",name:"_disputeCoolDownPeriod",type:"uint256"},{internalType:"uint256",name:"_disputeJudgementPeriod",type:"uint256"},{internalType:"uint16",name:"_bondFeeBPS",type:"uint16"},{internalType:"uint256",name:"_stakingThreshold",type:"uint256"},{internalType:"contract ICampStakingVault",name:"_stakingVault",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipToken",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"isUsedEvidenceHash",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"marketplace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolDisputeFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_targetIpId",type:"uint256"},{internalType:"bytes32",name:"_disputeEvidenceHash",type:"bytes32"},{internalType:"bytes32",name:"_disputeTag",type:"bytes32"}],name:"raiseDispute",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"resolveDispute",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_disputeQuorum",type:"uint256"}],name:"setDisputeQuorum",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stakingThreshold",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"stakingVault",outputs:[{internalType:"contract ICampStakingVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_childIpId",type:"uint256"},{internalType:"uint256",name:"_infringerDisputeId",type:"uint256"}],name:"tagChildIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"voteOnDispute",outputs:[],stateMutability:"nonpayable",type:"function"}],V=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"AppAlreadyActive",type:"error"},{inputs:[],name:"AppAlreadyExists",type:"error"},{inputs:[],name:"AppAlreadyInactive",type:"error"},{inputs:[],name:"AppNotFound",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidAppId",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"}],name:"AppDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"}],name:"AppReactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"},{indexed:!1,internalType:"address",name:"treasury",type:"address"},{indexed:!1,internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"AppRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"},{indexed:!1,internalType:"address",name:"treasury",type:"address"},{indexed:!1,internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"AppUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"appExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"apps",outputs:[{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"},{internalType:"bool",name:"isActive",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"deactivateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"getAppInfo",outputs:[{components:[{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"},{internalType:"bool",name:"isActive",type:"bool"}],internalType:"struct AppRegistry.AppInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"reactivateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"},{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"registerApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"},{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"updateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],j=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"FailedDeployment",type:"error"},{inputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"InsufficientBalance",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"VaultAlreadyExists",type:"error"},{inputs:[],name:"VaultNotFound",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldImplementation",type:"address"},{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"ImplementationUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"initialOwner",type:"address"}],name:"VaultDeployed",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"initialOwner",type:"address"}],name:"deployVault",outputs:[{internalType:"address",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"deployVaultForExistingNFT",outputs:[{internalType:"address",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"ipNft_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipNft",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"isVault",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"predictVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"setImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"vaults",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],L="Connect with Camp Network",z=2628e3,q=86400,J=1e15,Y=1,G=1e4;const W={DEVELOPMENT:{NAME:"DEVELOPMENT",AUTH_HUB_BASE_API:"https://origin-backend-iota.vercel.app",ORIGIN_DASHBOARD:"https://origin.campnetwork.xyz",DATANFT_CONTRACT_ADDRESS:"0x4d9aF5800701A4A686Df6b096A27B81486de36eB",MARKETPLACE_CONTRACT_ADDRESS:"0x68B202caA162C418d3A2DF92F29fA1CAF90C58c1",BATCH_OPERATIONS_CONTRACT_ADDRESS:"0xe1247F1663925B99Db62e60480B53e37f2bb8738",DISPUTE_CONTRACT_ADDRESS:"0x45719337b1450b0D105cA671972be4263E6A9380",APP_REGISTRY_CONTRACT_ADDRESS:"0x2096eb980Dd590DDF690Cb698572b80552B6F9Bb",IP_ROYALTY_VAULT_FACTORY_CONTRACT_ADDRESS:"0x16e01D1CB5de9460f8ed9D1883f5aFD377798f38",CHAIN:C,IPNFT_ABI:B,MARKETPLACE_ABI:F,TBA_ABI:U,BATCH_OPERATIONS_ABI:$,DISPUTE_ABI:H,APP_REGISTRY_ABI:V,IP_ROYALTY_VAULT_FACTORY_ABI:j},PRODUCTION:{NAME:"PRODUCTION",AUTH_HUB_BASE_API:"https://origin-backend-mainnet.vercel.app",ORIGIN_DASHBOARD:"https://origin.campnetwork.xyz",DATANFT_CONTRACT_ADDRESS:"0x39EeE1C3989f0dD543Dee60f8582F7F81F522C38",MARKETPLACE_CONTRACT_ADDRESS:"0xc69BAa987757d054455fC0f2d9797684E9FB8b9C",BATCH_OPERATIONS_CONTRACT_ADDRESS:"0x6B89810768b708465f31b6a8B8d753cc986489F1",DISPUTE_CONTRACT_ADDRESS:"0x947A3C4A45f7039e77643026A090025D5412EDa2",
|
|
60
|
+
let D=null,N=null,M=null;const O=e=>{var n;const a=M||C;return N&&(null===(n=N.chain)||void 0===n?void 0:n.id)===a.id||(N=i({chain:a,transport:t()})),N};var B=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidDeadline",type:"error"},{inputs:[],name:"InvalidDuration",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidPaymentToken",type:"error"},{inputs:[],name:"InvalidPrice",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[],name:"NotTokenOwner",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"TokenAlreadyExists",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"appRegistry",outputs:[{internalType:"contract AppRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"dataStatus",outputs:[{internalType:"enum IIpNFT.DataStatus",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeModule",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"erc6551Account",outputs:[{internalType:"contract IERC6551Account",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"erc6551Registry",outputs:[{internalType:"contract IERC6551Registry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"finalizeDelete",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getAccount",outputs:[{internalType:"address",name:"account",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getRoyaltyVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getTerms",outputs:[{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"uint256",name:"maxTermDuration_",type:"uint256"},{internalType:"address",name:"signer_",type:"address"},{internalType:"address",name:"wCAMP_",type:"address"},{internalType:"uint256",name:"minTermDuration_",type:"uint256"},{internalType:"uint256",name:"minPrice_",type:"uint256"},{internalType:"uint256",name:"maxRoyaltyBps_",type:"uint256"},{internalType:"contract IERC6551Registry",name:"registry_",type:"address"},{internalType:"contract IERC6551Account",name:"implementation_",type:"address"},{internalType:"contract AppRegistry",name:"appRegistry_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"markDisputed",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"marketPlace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxRoyaltyBps",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxTermDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minTermDuration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"mintWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"royaltyVaultFactory",outputs:[{internalType:"contract IpRoyaltyVaultFactory",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_appRegistry",type:"address"}],name:"setAppRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_disputeModule",type:"address"}],name:"setDisputeModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_marketPlace",type:"address"}],name:"setMarketPlace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_royaltyVaultFactory",type:"address"}],name:"setRoyaltyVaultFactory",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"}],name:"setSigner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"signer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenInfo",outputs:[{components:[{internalType:"string",name:"tokenURI",type:"string"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"bytes32",name:"contentHash",type:"bytes32"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"terms",type:"tuple"},{internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"},{internalType:"string",name:"appId",type:"string"}],internalType:"struct IIpNFT.TokenInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"enum IIpNFT.LicenseType",name:"licenseType",type:"uint8"}],internalType:"struct IIpNFT.LicenseTerms",name:"newTerms",type:"tuple"}],name:"updateTerms",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"wCAMP",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],F=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"FeesExceedMaximum",type:"error"},{inputs:[],name:"FeesMismatch",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidLicenseType",type:"error"},{inputs:[],name:"InvalidParentIp",type:"error"},{inputs:[],name:"InvalidPayment",type:"error"},{inputs:[],name:"InvalidPrice",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"MaxParentsExceeded",type:"error"},{inputs:[],name:"MaxRoyaltyExceeded",type:"error"},{inputs:[],name:"NoSubscriptionFound",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"ParentAlreadyExists",type:"error"},{inputs:[],name:"ParentIpAlreadyDeleted",type:"error"},{inputs:[],name:"ParentIpAlreadyDisputed",type:"error"},{inputs:[],name:"SubscriptionNotAllowed",type:"error"},{inputs:[],name:"TermsMismatch",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"VaultNotFound",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"MAX_PARENTS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],name:"buyAccess",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"revenueToken",type:"address"}],name:"claimRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address[]",name:"revenueTokens",type:"address[]"}],name:"claimRevenueBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"holder",type:"address"},{internalType:"address",name:"revenueToken",type:"address"}],name:"claimableRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getRoyaltyVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getVaultRevenueTokens",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"ipId",type:"uint256"},{internalType:"uint256",name:"parent",type:"uint256"}],name:"hasParentIp",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dataNFT_",type:"address"},{internalType:"uint16",name:"protocolFeeBps_",type:"uint16"},{internalType:"address",name:"treasury_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipToken",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"parentRoyaltyPercent",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFeeBps",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"royaltyStack",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"childIpId",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"address",name:"creator",type:"address"}],name:"setParentIpsAndRoyaltyPercents",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"subscriptionExpiry",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"updateProtocolFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"updateTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],U=[{type:"receive",stateMutability:"payable"},{type:"function",name:"execute",inputs:[{name:"to",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"},{name:"operation",type:"uint8",internalType:"uint8"}],outputs:[{name:"result",type:"bytes",internalType:"bytes"}],stateMutability:"payable"},{type:"function",name:"isValidSignature",inputs:[{name:"hash",type:"bytes32",internalType:"bytes32"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[{name:"magicValue",type:"bytes4",internalType:"bytes4"}],stateMutability:"view"},{type:"function",name:"isValidSigner",inputs:[{name:"signer",type:"address",internalType:"address"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"state",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"token",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"}],$=[{inputs:[{internalType:"address",name:"_marketplace",type:"address"},{internalType:"address",name:"_ipNFT",type:"address"},{internalType:"address",name:"_appRegistry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"EmptyMintList",type:"error"},{inputs:[],name:"EmptyPurchaseList",type:"error"},{inputs:[],name:"InsufficientAllowance",type:"error"},{inputs:[],name:"InvalidTotalPayment",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"reason",type:"string"}],name:"MintFailed",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"reason",type:"string"}],name:"PurchaseFailed",type:"error"},{inputs:[],name:"ReentrancyGuardReentrantCall",type:"error"},{inputs:[],name:"RefundFailed",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"BulkMintExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"successCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"failureCount",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],name:"BulkMintPartial",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"},{indexed:!1,internalType:"uint256",name:"totalPaid",type:"uint256"}],name:"BulkPurchaseExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"successCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"failureCount",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],name:"BulkPurchasePartial",type:"event"},{inputs:[],name:"appRegistry",outputs:[{internalType:"contract IAppRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"buildPurchaseParams",outputs:[{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],name:"bulkBuyAccess",outputs:[{internalType:"uint256",name:"totalPaid",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams[]",name:"purchases",type:"tuple[]"}],name:"bulkBuyAccessTolerant",outputs:[{components:[{internalType:"uint256",name:"successCount",type:"uint256"},{internalType:"uint256",name:"failureCount",type:"uint256"},{internalType:"uint256",name:"totalSpent",type:"uint256"},{internalType:"uint256",name:"refundAmount",type:"uint256"},{internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.TolerantResult",name:"result",type:"tuple"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint8",name:"licenseType",type:"uint8"}],internalType:"struct IBatchOperations.LicenseTermsParam",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct IBatchOperations.MintParams[]",name:"mints",type:"tuple[]"}],name:"bulkMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes32",name:"creatorContentHash",type:"bytes32"},{internalType:"string",name:"uri",type:"string"},{components:[{internalType:"uint128",name:"price",type:"uint128"},{internalType:"uint32",name:"duration",type:"uint32"},{internalType:"uint16",name:"royaltyBps",type:"uint16"},{internalType:"address",name:"paymentToken",type:"address"},{internalType:"uint8",name:"licenseType",type:"uint8"}],internalType:"struct IBatchOperations.LicenseTermsParam",name:"licenseTerms",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256[]",name:"parents",type:"uint256[]"},{internalType:"bool",name:"isIP",type:"bool"},{internalType:"string",name:"appId",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct IBatchOperations.MintParams[]",name:"mints",type:"tuple[]"}],name:"bulkMintTolerant",outputs:[{components:[{internalType:"uint256",name:"successCount",type:"uint256"},{internalType:"uint256",name:"failureCount",type:"uint256"},{internalType:"uint256[]",name:"failedTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.TolerantMintResult",name:"result",type:"tuple"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"checkActiveStatus",outputs:[{internalType:"bool[]",name:"activeFlags",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"ipNFT",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"marketplace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"previewBulkCost",outputs:[{components:[{internalType:"uint256",name:"totalNativeCost",type:"uint256"},{internalType:"uint256",name:"totalERC20Cost",type:"uint256"},{internalType:"uint256",name:"validCount",type:"uint256"},{internalType:"uint256[]",name:"invalidTokenIds",type:"uint256[]"}],internalType:"struct IBatchOperations.BulkCostPreview",name:"preview",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"buyer",type:"address"},{components:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"expectedPrice",type:"uint256"},{internalType:"uint32",name:"expectedDuration",type:"uint32"},{internalType:"address",name:"expectedPaymentToken",type:"address"},{internalType:"uint16",name:"expectedProtocolFeeBps",type:"uint16"},{internalType:"uint16",name:"expectedAppFeeBps",type:"uint16"}],internalType:"struct IBatchOperations.BuyParams",name:"params",type:"tuple"}],name:"tryERC20Purchase",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],H=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"AlreadyVoted",type:"error"},{inputs:[],name:"CoolDownPeriodActive",type:"error"},{inputs:[],name:"CoolDownPeriodOver",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EvidenceAlreadyUsed",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidBondFeeBps",type:"error"},{inputs:[],name:"InvalidChildIpId",type:"error"},{inputs:[],name:"InvalidDisputeStatus",type:"error"},{inputs:[],name:"InvalidDisputeTag",type:"error"},{inputs:[],name:"InvalidEvidenceHash",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidTargetIp",type:"error"},{inputs:[],name:"NoVotingPower",type:"error"},{inputs:[],name:"NotAParentIp",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[],name:"NotInitiator",type:"error"},{inputs:[],name:"NotTokenOwner",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"ParentNotDisputed",type:"error"},{inputs:[],name:"SelfAssertionNotAllowed",type:"error"},{inputs:[],name:"StakedAfterDispute",type:"error"},{inputs:[],name:"TagNotAllowed",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"VotingPeriodActive",type:"error"},{inputs:[],name:"VotingPeriodOver",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint32",name:"periods",type:"uint32"},{indexed:!1,internalType:"uint256",name:"newExpiry",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"AccessPurchased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"agentId",type:"uint256"},{indexed:!0,internalType:"uint256",name:"ipNftId",type:"uint256"},{indexed:!1,internalType:"address",name:"agentAddress",type:"address"}],name:"AgentRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"appRegistry",type:"address"}],name:"AppRegistryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"uint256",name:"childIp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parentIp",type:"uint256"}],name:"ChildIpTagged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"}],name:"DataDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"bytes32",name:"contentHash",type:"bytes32"},{indexed:!1,internalType:"uint256[]",name:"parents",type:"uint256[]"}],name:"DataMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"}],name:"DisputeAssertion",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"DisputeCancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"bool",name:"judgement",type:"bool"}],name:"DisputeJudged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"disputeModule",type:"address"}],name:"DisputeModuleUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"initiator",type:"address"},{indexed:!0,internalType:"uint256",name:"targetId",type:"uint256"},{indexed:!1,internalType:"bytes32",name:"disputeTag",type:"bytes32"}],name:"DisputeRaised",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"marketPlace",type:"address"}],name:"MarketPlaceUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"childIpId",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"parentIds",type:"uint256[]"},{indexed:!1,internalType:"uint16",name:"totalRoyaltyBps",type:"uint16"}],name:"ParentIpsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"newFeeBps",type:"uint16"}],name:"ProtocolFeeUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"royaltyAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"},{indexed:!1,internalType:"uint256",name:"protocolAmount",type:"uint256"}],name:"RoyaltyPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"}],name:"RoyaltyVaultDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"royaltyVaultFactory",type:"address"}],name:"RoyaltyVaultFactoryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"}],name:"SignerUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"enum IIpNFT.DataStatus",name:"status",type:"uint8"}],name:"StatusUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!1,internalType:"uint128",name:"newPrice",type:"uint128"},{indexed:!1,internalType:"uint32",name:"newDuration",type:"uint32"},{indexed:!1,internalType:"uint16",name:"newRoyaltyBps",type:"uint16"},{indexed:!1,internalType:"address",name:"paymentToken",type:"address"}],name:"TermsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTreasury",type:"address"}],name:"TreasuryUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"id",type:"uint256"},{indexed:!0,internalType:"address",name:"voter",type:"address"},{indexed:!1,internalType:"bool",name:"support",type:"bool"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"Voted",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"cancelDispute",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"bytes32",name:"_counterEvidenceHash",type:"bytes32"}],name:"disputeAssertion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disputeBond",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeCoolDownPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeCounter",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeJudgementPeriod",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeQuorum",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"disputeToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"disputes",outputs:[{internalType:"address",name:"initiator",type:"address"},{internalType:"uint256",name:"targetId",type:"uint256"},{internalType:"bytes32",name:"disputeTag",type:"bytes32"},{internalType:"bytes32",name:"disputeEvidenceHash",type:"bytes32"},{internalType:"bytes32",name:"counterEvidenceHash",type:"bytes32"},{internalType:"uint256",name:"disputeTimestamp",type:"uint256"},{internalType:"uint256",name:"assertionTimestamp",type:"uint256"},{internalType:"uint256",name:"yesVotes",type:"uint256"},{internalType:"uint256",name:"noVotes",type:"uint256"},{internalType:"enum DisputeModule.DisputeStatus",name:"status",type:"uint8"},{internalType:"uint256",name:"bondAmount",type:"uint256"},{internalType:"uint256",name:"protocolFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"address",name:"",type:"address"}],name:"hasVoted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IIpNFT",name:"_ipToken",type:"address"},{internalType:"contract IMarketplace",name:"_marketplace",type:"address"},{internalType:"contract IERC20",name:"_disputeToken",type:"address"},{internalType:"uint256",name:"_disputeBond",type:"uint256"},{internalType:"uint256",name:"_disputeCoolDownPeriod",type:"uint256"},{internalType:"uint256",name:"_disputeJudgementPeriod",type:"uint256"},{internalType:"uint16",name:"_bondFeeBPS",type:"uint16"},{internalType:"uint256",name:"_stakingThreshold",type:"uint256"},{internalType:"contract ICampStakingVault",name:"_stakingVault",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipToken",outputs:[{internalType:"contract IIpNFT",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"isUsedEvidenceHash",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"marketplace",outputs:[{internalType:"contract IMarketplace",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolDisputeFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_targetIpId",type:"uint256"},{internalType:"bytes32",name:"_disputeEvidenceHash",type:"bytes32"},{internalType:"bytes32",name:"_disputeTag",type:"bytes32"}],name:"raiseDispute",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"resolveDispute",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_disputeQuorum",type:"uint256"}],name:"setDisputeQuorum",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stakingThreshold",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"stakingVault",outputs:[{internalType:"contract ICampStakingVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_childIpId",type:"uint256"},{internalType:"uint256",name:"_infringerDisputeId",type:"uint256"}],name:"tagChildIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"bool",name:"support",type:"bool"}],name:"voteOnDispute",outputs:[],stateMutability:"nonpayable",type:"function"}],V=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[],name:"AppAlreadyActive",type:"error"},{inputs:[],name:"AppAlreadyExists",type:"error"},{inputs:[],name:"AppAlreadyInactive",type:"error"},{inputs:[],name:"AppNotFound",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidAppId",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"InvalidRoyalty",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"}],name:"AppDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"}],name:"AppReactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"},{indexed:!1,internalType:"address",name:"treasury",type:"address"},{indexed:!1,internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"AppRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"appId",type:"string"},{indexed:!1,internalType:"address",name:"treasury",type:"address"},{indexed:!1,internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"AppUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"appExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"apps",outputs:[{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"},{internalType:"bool",name:"isActive",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"deactivateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"getAppInfo",outputs:[{components:[{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"},{internalType:"bool",name:"isActive",type:"bool"}],internalType:"struct AppRegistry.AppInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"}],name:"reactivateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"},{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"registerApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"appId",type:"string"},{internalType:"address",name:"treasury",type:"address"},{internalType:"uint16",name:"revenueShareBps",type:"uint16"}],name:"updateApp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],j=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"FailedDeployment",type:"error"},{inputs:[{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"InsufficientBalance",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"VaultAlreadyExists",type:"error"},{inputs:[],name:"VaultNotFound",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldImplementation",type:"address"},{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"ImplementationUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"initialOwner",type:"address"}],name:"VaultDeployed",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"initialOwner",type:"address"}],name:"deployVault",outputs:[{internalType:"address",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"deployVaultForExistingNFT",outputs:[{internalType:"address",name:"vault",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getVault",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"ipNft_",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ipNft",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"isVault",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"predictVaultAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"setImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"vaults",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],L="Connect with Camp Network",z=2628e3,q=86400,J=1e15,Y=1,G=1e4;const W={DEVELOPMENT:{NAME:"DEVELOPMENT",AUTH_HUB_BASE_API:"https://origin-backend-iota.vercel.app",ORIGIN_DASHBOARD:"https://origin.campnetwork.xyz",DATANFT_CONTRACT_ADDRESS:"0x4d9aF5800701A4A686Df6b096A27B81486de36eB",MARKETPLACE_CONTRACT_ADDRESS:"0x68B202caA162C418d3A2DF92F29fA1CAF90C58c1",BATCH_OPERATIONS_CONTRACT_ADDRESS:"0xe1247F1663925B99Db62e60480B53e37f2bb8738",DISPUTE_CONTRACT_ADDRESS:"0x45719337b1450b0D105cA671972be4263E6A9380",APP_REGISTRY_CONTRACT_ADDRESS:"0x2096eb980Dd590DDF690Cb698572b80552B6F9Bb",IP_ROYALTY_VAULT_FACTORY_CONTRACT_ADDRESS:"0x16e01D1CB5de9460f8ed9D1883f5aFD377798f38",CHAIN:C,IPNFT_ABI:B,MARKETPLACE_ABI:F,TBA_ABI:U,BATCH_OPERATIONS_ABI:$,DISPUTE_ABI:H,APP_REGISTRY_ABI:V,IP_ROYALTY_VAULT_FACTORY_ABI:j},PRODUCTION:{NAME:"PRODUCTION",AUTH_HUB_BASE_API:"https://origin-backend-mainnet.vercel.app",ORIGIN_DASHBOARD:"https://origin.campnetwork.xyz",DATANFT_CONTRACT_ADDRESS:"0x39EeE1C3989f0dD543Dee60f8582F7F81F522C38",MARKETPLACE_CONTRACT_ADDRESS:"0xc69BAa987757d054455fC0f2d9797684E9FB8b9C",BATCH_OPERATIONS_CONTRACT_ADDRESS:"0x6B89810768b708465f31b6a8B8d753cc986489F1",DISPUTE_CONTRACT_ADDRESS:"0x947A3C4A45f7039e77643026A090025D5412EDa2",
|
|
61
61
|
// TODO: update with real factory address once deployed
|
|
62
62
|
IP_ROYALTY_VAULT_FACTORY_CONTRACT_ADDRESS:"",APP_REGISTRY_CONTRACT_ADDRESS:"0xd09F15aA280F9109aCd403cA920e67D40Cb6C3FA",CHAIN:E,IPNFT_ABI:B,MARKETPLACE_ABI:F,TBA_ABI:U,BATCH_OPERATIONS_ABI:$,DISPUTE_ABI:H,APP_REGISTRY_ABI:V,IP_ROYALTY_VAULT_FACTORY_ABI:j}};let K=[];const Q=()=>K,X=e=>{function t(t){K.some((e=>e.info.uuid===t.detail.info.uuid))||(K=[...K,t.detail],e(K))}if("undefined"!=typeof window)return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new Event("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)},Z=(e,t,n)=>{const i=[];let a=[],s=!1,r=0;const o=e.length;return new Promise(((p,d)=>{function u(){n(r/o*100)}function l(e,t,n){return m(this,arguments,void 0,(function*(e,t,n,i=0){var a;try{const i=null===(a=(yield c.put(t,e,{headers:{"Content-Type":e.type||"application/octet-stream"},timeout:3e5})).headers.etag)||void 0===a?void 0:a.replace(/"/g,"");if(!i)throw new Error(`Missing ETag for part ${n}`);return{ETag:i,PartNumber:n}}catch(a){if(i<3){const a=1e3*Math.pow(2,i);// Exponential backoff
|
|
63
63
|
return yield new Promise((e=>setTimeout(e,a))),l(e,t,n,i+1)}throw new Error(`Part ${n} failed after 3 retries: ${a.message}`)}}))}
|
|
@@ -411,7 +411,7 @@ return{initiator:n,targetId:i,disputeTag:a,disputeEvidenceHash:s,counterEvidence
|
|
|
411
411
|
* - DURATION_BASED: License expires after a set duration (subscription model).
|
|
412
412
|
* - SINGLE_PAYMENT: One-time payment for perpetual access.
|
|
413
413
|
* - X402: HTTP 402-based micropayment license (no on-chain payments).
|
|
414
|
-
*/var De,
|
|
414
|
+
*/var ke,De,Ne;!function(e){e[e.DURATION_BASED=0]="DURATION_BASED",e[e.SINGLE_PAYMENT=1]="SINGLE_PAYMENT",e[e.X402=2]="X402"}(ke||(ke={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.DELETED=1]="DELETED",e[e.DISPUTED=2]="DISPUTED"}(De||(De={})),function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Raised=1]="Raised",e[e.Asserted=2]="Asserted",e[e.Resolved=3]="Resolved",e[e.Cancelled=4]="Cancelled"}(Ne||(Ne={}));
|
|
415
415
|
/**
|
|
416
416
|
* Creates license terms for a digital asset.
|
|
417
417
|
* @param price The price of the asset in wei.
|
|
@@ -421,7 +421,7 @@ return{initiator:n,targetId:i,disputeTag:a,disputeEvidenceHash:s,counterEvidence
|
|
|
421
421
|
* @param licenseType The type of license (defaults to DURATION_BASED).
|
|
422
422
|
* @returns The created license terms.
|
|
423
423
|
*/
|
|
424
|
-
const Me=(e,t,n,i,a=
|
|
424
|
+
const Me=(e,t,n,i,a=ke.DURATION_BASED)=>{if(n<Y||n>G)throw new Error(`Royalty basis points must be between ${Y} and ${G}`);if(a===ke.DURATION_BASED){if(t<q||t>z)throw new Error(`Duration must be between ${q} and ${z} seconds for DURATION_BASED licenses`)}else if((a===ke.SINGLE_PAYMENT||a===ke.X402)&&t>0)throw new Error(`Duration must be 0 for ${ke[a]} licenses`);if(e<J)throw new Error(`Price must be at least ${J} wei`);return{price:e,duration:t,royaltyBps:n,paymentToken:i,licenseType:a}},Oe=[{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"userStakeTimestamp",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"}];
|
|
425
425
|
// minimal ABI for staking vault
|
|
426
426
|
/**
|
|
427
427
|
* Checks if a user meets the requirements to vote on a dispute.
|
|
@@ -479,11 +479,11 @@ let E=0;m>BigInt(0)&&(E=Number(b*BigInt(1e4)/m)/100);const P=b>=m;
|
|
|
479
479
|
// determine projected outcome
|
|
480
480
|
let S;S=P?A>I?"dispute_succeeds":"dispute_fails":"no_quorum";
|
|
481
481
|
// calculate timeline
|
|
482
|
-
const R=BigInt(Math.floor(Date.now()/1e3)),_=new Date(1e3*Number(v)),x=new Date(1e3*Number(v+h));let D
|
|
482
|
+
const R=BigInt(Math.floor(Date.now()/1e3)),_=new Date(1e3*Number(v)),x=new Date(1e3*Number(v+h));let k,D;f===Ne.Asserted?(
|
|
483
483
|
// for asserted disputes, voting ends relative to assertion
|
|
484
|
-
|
|
484
|
+
k=new Date(1e3*Number(w+T)),D=w+T):(
|
|
485
485
|
// for raised disputes, voting ends after cooldown + judgement
|
|
486
|
-
|
|
486
|
+
k=new Date(1e3*Number(v+h+T)),D=v+h+T);const N=(f===Ne.Raised||f===Ne.Asserted)&&R>D,M=N?0:Number(D-R);return{disputeId:e,status:f,yesVotes:A,noVotes:I,totalVotes:b,yesPercentage:g,noPercentage:C,quorum:m,quorumPercentage:E,quorumMet:P,projectedOutcome:S,timeline:{raisedAt:_,cooldownEndsAt:x,votingEndsAt:k,canResolveNow:N,timeUntilResolution:M}}}))}
|
|
487
487
|
/**
|
|
488
488
|
* Gets the requirements for raising a dispute, including balance check.
|
|
489
489
|
*
|
|
@@ -547,12 +547,15 @@ let l;return l=d?yield t.getBalance({address:e}):yield t.readContract({address:p
|
|
|
547
547
|
*/function ze(e){return m(this,void 0,void 0,(function*(){return this.callContractMethod(this.environment.IP_ROYALTY_VAULT_FACTORY_CONTRACT_ADDRESS,this.environment.IP_ROYALTY_VAULT_FACTORY_ABI,"deployVaultForExistingNFT",[e],{waitForReceipt:!0})}))}const qe=[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],stateMutability:"view",type:"function"}];
|
|
548
548
|
/**
|
|
549
549
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
550
|
-
* If no holder is provided, the
|
|
550
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
551
|
+
* since RT tokens are minted to the TBA by default.
|
|
551
552
|
*
|
|
552
553
|
* @param tokenId The token ID whose vault to query.
|
|
553
|
-
* @param holder Optional holder address. Defaults to
|
|
554
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
554
555
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
555
|
-
*/function Je(e,t){return m(this,void 0,void 0,(function*(){
|
|
556
|
+
*/function Je(e,t){return m(this,void 0,void 0,(function*(){
|
|
557
|
+
// Default to the NFT's TBA, since RT tokens are minted there
|
|
558
|
+
const n=t||(yield this.getTokenBoundAccount(e)),i=yield this.callContractMethod(this.environment.DATANFT_CONTRACT_ADDRESS,this.environment.IPNFT_ABI,"getRoyaltyVault",[e]);
|
|
556
559
|
// Get vault address
|
|
557
560
|
if(!i||i===a)throw new Error(`No royalty vault found for token ${e}. Deploy a vault first using deployVaultForExistingNFT.`);const s=O(),[r,o,p]=yield Promise.all([s.readContract({address:i,abi:qe,functionName:"balanceOf",args:[n]}),s.readContract({address:i,abi:qe,functionName:"totalSupply"}),s.readContract({address:i,abi:qe,functionName:"decimals"})]);
|
|
558
561
|
// Read balance, totalSupply, and decimals in parallel
|
|
@@ -762,7 +765,7 @@ this.getAppInfo=Ye.bind(this)}getJwt(){return this.jwt}setViemClient(e){this.vie
|
|
|
762
765
|
* @param parents Optional parent token IDs for lineage tracking.
|
|
763
766
|
* @param options Optional parameters including progress callback, preview image, and use asset as preview flag.
|
|
764
767
|
* @returns The token ID of the minted IpNFT as a string, or null if minting failed.
|
|
765
|
-
*/mintFile(e,t,n,i,a){return m(this,void 0,void 0,(function*(){let s,r=null;try{r=yield h(this,it,"m",ut).call(this)}catch(t){throw new _(`Cannot mint file "${e.name}": wallet not connected. Please connect a wallet first.`)}try{if(s=yield h(this,it,"m",ot).call(this,e,a),!s||!s.key)throw new P(`Failed to upload file "${e.name}": no upload info returned from server`)}catch(t){if(t instanceof P||t instanceof _)throw t;throw new P(`Failed to upload file "${e.name}": ${
|
|
768
|
+
*/mintFile(e,t,n,i,a){return m(this,void 0,void 0,(function*(){let s,r=null;try{r=yield h(this,it,"m",ut).call(this)}catch(t){throw new _(`Cannot mint file "${e.name}": wallet not connected. Please connect a wallet first.`)}try{if(s=yield h(this,it,"m",ot).call(this,e,a),!s||!s.key)throw new P(`Failed to upload file "${e.name}": no upload info returned from server`)}catch(t){if(t instanceof P||t instanceof _)throw t;throw new P(`Failed to upload file "${e.name}": ${k(t)}`)}e.type&&(t.mimetype=e.type);let o=null;(null==a?void 0:a.previewImage)&&(null==a?void 0:a.previewImage.type.startsWith("image/"))?o=yield h(this,it,"m",rt).call(this,a.previewImage):(null==a?void 0:a.useAssetAsPreview)&&e.type.startsWith("image/")&&(o=yield h(this,it,"m",rt).call(this,e)),o&&(t.image=`ipfs://${o}`);const p=BigInt(Date.now()+6e5);// 10 minutes from now
|
|
766
769
|
let d;this.baseParentId&&(i||(i=[]),i.unshift(this.baseParentId));try{d=yield this.registerIpNFT("file",p,n,t,!0,// isIp
|
|
767
770
|
s.key,// fileKey
|
|
768
771
|
i,this.appId)}catch(e){throw yield h(this,it,"m",st).call(this,s.key,s.uploadId,[]),new Error(`Failed to register IpNFT: ${e instanceof Error?e.message:String(e)}`)}const{tokenId:u,signerAddress:l,creatorContentHash:y,signature:c,uri:m}=d;if(!(u&&l&&y&&void 0!==c&&m))throw new Error("Failed to register IpNFT: Missing required fields in registration response.");try{const e=yield this.mintWithSignature(r,u,i||[],!0,y,m,n,p,c,this.appId);if(-1===["0x1","success"].indexOf(e.receipt.status))throw yield h(this,it,"m",st).call(this,s.key,s.uploadId,[]),new Error(`Minting failed with status: ${e.receipt.status}`)}catch(e){throw yield h(this,it,"m",st).call(this,s.key,s.uploadId,[]),new Error(`Minting transaction failed: ${e instanceof Error?e.message:String(e)}`)}return u.toString()}))}
|
|
@@ -787,7 +790,7 @@ i,this.appId)}catch(e){throw yield h(this,it,"m",st).call(this,s.key,s.uploadId,
|
|
|
787
790
|
* ```
|
|
788
791
|
*/bulkMintFile(e,t){return m(this,void 0,void 0,(function*(){var n,i;if(!e||0===e.length)throw new S("No file entries provided for bulk mint. Please provide at least one entry.");let a=null;try{a=yield h(this,it,"m",ut).call(this)}catch(e){throw new _("Cannot bulk mint files: wallet not connected. Please connect a wallet first.")}const s=[],r=[],o=[];for(let p=0;p<e.length;p++){const d=e[p],{file:u,metadata:l,license:y}=d;let c,{parents:m}=d;
|
|
789
792
|
// Upload file
|
|
790
|
-
try{if(c=yield h(this,it,"m",ot).call(this,u,{progressCallback:n=>{var i;null===(i=null==t?void 0:t.progressCallback)||void 0===i||i.call(t,{fileIndex:p,fileCount:e.length,stage:"uploading",percent:n})}}),!c||!c.key)throw new P(`Failed to upload file "${u.name}": no upload info returned from server`)}catch(e){if(e instanceof P||e instanceof _)throw e;throw new P(`Failed to upload file "${u.name}": ${
|
|
793
|
+
try{if(c=yield h(this,it,"m",ot).call(this,u,{progressCallback:n=>{var i;null===(i=null==t?void 0:t.progressCallback)||void 0===i||i.call(t,{fileIndex:p,fileCount:e.length,stage:"uploading",percent:n})}}),!c||!c.key)throw new P(`Failed to upload file "${u.name}": no upload info returned from server`)}catch(e){if(e instanceof P||e instanceof _)throw e;throw new P(`Failed to upload file "${u.name}": ${k(e)}`)}o.push(c),
|
|
791
794
|
// Set mimetype
|
|
792
795
|
u.type&&(l.mimetype=u.type);
|
|
793
796
|
// Handle preview image
|
|
@@ -823,7 +826,7 @@ r,this.appId)}catch(e){throw new Error(`Failed to register Social IpNFT: ${e ins
|
|
|
823
826
|
* @throws {Error} - Throws an error if the wallet client is not connected and the method is not a view function.
|
|
824
827
|
*/callContractMethod(e,t,n,i){return m(this,arguments,void 0,(function*(e,t,n,i,a={}){var s;let o=null;try{o=yield h(this,it,"m",ut).call(this)}catch(t){throw new _(`Cannot call "${n}" on contract ${e}: wallet not connected`)}const p=r({abi:t,name:n});if(p&&"stateMutability"in p&&("view"===p.stateMutability||"pure"===p.stateMutability)){const a=O();return(yield a.readContract({address:e,abi:t,functionName:n,args:i}))||null}yield h(this,it,"m",dt).call(this,this.environment.CHAIN);const d=O(),{result:u,request:l}=yield d.simulateContract({account:o,address:e,abi:t,functionName:n,args:i,value:a.value});
|
|
825
828
|
// simulate
|
|
826
|
-
if(a.simulate)return u;try{const t=yield null===(s=this.viemClient)||void 0===s?void 0:s.writeContract(l);if("string"!=typeof t)throw new x(`Transaction for "${n}" failed to send: no transaction hash returned`,{contractName:e,methodName:n});if(!a.waitForReceipt)return{txHash:t,simulatedResult:u};return{txHash:t,receipt:yield h(this,it,"m",pt).call(this,t),simulatedResult:u}}catch(t){if(t instanceof x||t instanceof _)throw t;throw new x(`Transaction for "${n}" failed: ${
|
|
829
|
+
if(a.simulate)return u;try{const t=yield null===(s=this.viemClient)||void 0===s?void 0:s.writeContract(l);if("string"!=typeof t)throw new x(`Transaction for "${n}" failed to send: no transaction hash returned`,{contractName:e,methodName:n});if(!a.waitForReceipt)return{txHash:t,simulatedResult:u};return{txHash:t,receipt:yield h(this,it,"m",pt).call(this,t),simulatedResult:u}}catch(t){if(t instanceof x||t instanceof _)throw t;throw new x(`Transaction for "${n}" failed: ${k(t)}`,{contractName:e,methodName:n})}}))}
|
|
827
830
|
/**
|
|
828
831
|
* Gets comprehensive token information in a single call.
|
|
829
832
|
* Combines owner, status, terms, URI, and access information.
|
|
@@ -1000,7 +1003,7 @@ h(this,Tt,"f")||X((e=>{h(this,mt,"m",wt).call(this,"providers",e)})),h(this,mt,"
|
|
|
1000
1003
|
* @param {object} options The options object. Includes the provider and the provider info.
|
|
1001
1004
|
* @returns {void}
|
|
1002
1005
|
* @throws {APIError} - Throws an error if the provider is not provided.
|
|
1003
|
-
*/setProvider({provider:t,info:i,address:a}){if(!t)throw new P("provider is required");this.viem=((t,i="window.ethereum",a,s)=>{var r,o;if(!t&&!
|
|
1006
|
+
*/setProvider({provider:t,info:i,address:a}){if(!t)throw new P("provider is required");this.viem=((t,i="window.ethereum",a,s)=>{var r,o;if(!t&&!D)return console.warn("Provider is required to create a client."),null;const p=a||C;if(!D||D.transport.name!==i&&t||s!==(null===(r=D.account)||void 0===r?void 0:r.address)&&t||(null==M?void 0:M.id)!==p.id){const a={chain:p,transport:n(t,{name:i})};s&&(a.account=l(s)),D=e(a),M=p,N&&(null===(o=N.chain)||void 0===o?void 0:o.id)!==p.id&&(N=null)}return D})(t,i.name,this.environment.CHAIN,a),this.origin&&this.origin.setViemClient(this.viem),
|
|
1004
1007
|
// TODO: only use one of these
|
|
1005
1008
|
h(this,mt,"m",wt).call(this,"viem",this.viem),h(this,mt,"m",wt).call(this,"provider",{provider:t,info:i}),h(this,vt,"f").setItem("camp-sdk:provider",JSON.stringify(i))}
|
|
1006
1009
|
/**
|
|
@@ -1033,7 +1036,7 @@ if(!T&&(m.uuid||m.name))for(const e of f)try{if(m.uuid&&(null===(d=e.info)||void
|
|
|
1033
1036
|
* Connect the user's wallet and sign the message.
|
|
1034
1037
|
* @returns {Promise<{ success: boolean; message: string; walletAddress: string }>} A promise that resolves with the authentication result.
|
|
1035
1038
|
* @throws {APIError} - Throws an error if the user cannot be authenticated.
|
|
1036
|
-
*/connect(){return m(this,void 0,void 0,(function*(){h(this,mt,"m",wt).call(this,"state","loading");try{this.walletAddress||(yield h(this,mt,"m",It).call(this)),this.walletAddress=u(this.walletAddress);const e=yield h(this,mt,"m",bt).call(this),t=h(this,mt,"m",Ct).call(this,e),n=yield this.viem.signMessage({account:this.walletAddress,message:t}),i=yield h(this,mt,"m",gt).call(this,t,n);if(i.success)return this.isAuthenticated=!0,this.userId=i.userId,this.jwt=i.token,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),yield h(this,vt,"f").setItem("camp-sdk:jwt",this.jwt),yield h(this,vt,"f").setItem("camp-sdk:wallet-address",this.walletAddress),yield h(this,vt,"f").setItem("camp-sdk:user-id",this.userId),yield h(this,vt,"f").setItem("camp-sdk:environment",this.environment.NAME),h(this,mt,"m",wt).call(this,"state","authenticated"),{success:!0,message:"Successfully authenticated",walletAddress:this.walletAddress};throw this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),new P("Failed to authenticate: signature verification failed")}catch(e){if(this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),e instanceof P||e instanceof _)throw e;throw new P(`Failed to authenticate: ${
|
|
1039
|
+
*/connect(){return m(this,void 0,void 0,(function*(){h(this,mt,"m",wt).call(this,"state","loading");try{this.walletAddress||(yield h(this,mt,"m",It).call(this)),this.walletAddress=u(this.walletAddress);const e=yield h(this,mt,"m",bt).call(this),t=h(this,mt,"m",Ct).call(this,e),n=yield this.viem.signMessage({account:this.walletAddress,message:t}),i=yield h(this,mt,"m",gt).call(this,t,n);if(i.success)return this.isAuthenticated=!0,this.userId=i.userId,this.jwt=i.token,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),yield h(this,vt,"f").setItem("camp-sdk:jwt",this.jwt),yield h(this,vt,"f").setItem("camp-sdk:wallet-address",this.walletAddress),yield h(this,vt,"f").setItem("camp-sdk:user-id",this.userId),yield h(this,vt,"f").setItem("camp-sdk:environment",this.environment.NAME),h(this,mt,"m",wt).call(this,"state","authenticated"),{success:!0,message:"Successfully authenticated",walletAddress:this.walletAddress};throw this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),new P("Failed to authenticate: signature verification failed")}catch(e){if(this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),e instanceof P||e instanceof _)throw e;throw new P(`Failed to authenticate: ${k(e)}`)}}))}
|
|
1037
1040
|
/**
|
|
1038
1041
|
* Connect with a custom signer (for Node.js or custom wallet implementations).
|
|
1039
1042
|
* This method bypasses browser wallet interactions and uses the provided signer directly.
|
|
@@ -1054,7 +1057,7 @@ if(!T&&(m.uuid||m.name))for(const e of f)try{if(m.uuid&&(null===(d=e.info)||void
|
|
|
1054
1057
|
* await auth.connectWithSigner(client);
|
|
1055
1058
|
*/connectWithSigner(e,t){return m(this,void 0,void 0,(function*(){h(this,mt,"m",wt).call(this,"state","loading");try{T(this,ft,A(e),"f"),this.walletAddress=u(yield h(this,ft,"f").getAddress()),
|
|
1056
1059
|
// store the signer as viem client if it's a viem client, otherwise keep adapter
|
|
1057
|
-
"viem"===h(this,ft,"f").type&&(this.viem=e);const n=yield h(this,mt,"m",bt).call(this),i=h(this,mt,"m",Ct).call(this,n,null==t?void 0:t.domain,null==t?void 0:t.uri),a=yield h(this,ft,"f").signMessage(i),s=yield h(this,mt,"m",gt).call(this,i,a);if(s.success)return this.isAuthenticated=!0,this.userId=s.userId,this.jwt=s.token,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),yield h(this,vt,"f").setItem("camp-sdk:jwt",this.jwt),yield h(this,vt,"f").setItem("camp-sdk:wallet-address",this.walletAddress),yield h(this,vt,"f").setItem("camp-sdk:user-id",this.userId),yield h(this,vt,"f").setItem("camp-sdk:environment",this.environment.NAME),h(this,mt,"m",wt).call(this,"state","authenticated"),{success:!0,message:"Successfully authenticated",walletAddress:this.walletAddress};throw this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),new P("Failed to authenticate: signature verification failed")}catch(e){if(this.isAuthenticated=!1,T(this,ft,void 0,"f"),h(this,mt,"m",wt).call(this,"state","unauthenticated"),e instanceof P||e instanceof _)throw e;throw new P(`Failed to authenticate: ${
|
|
1060
|
+
"viem"===h(this,ft,"f").type&&(this.viem=e);const n=yield h(this,mt,"m",bt).call(this),i=h(this,mt,"m",Ct).call(this,n,null==t?void 0:t.domain,null==t?void 0:t.uri),a=yield h(this,ft,"f").signMessage(i),s=yield h(this,mt,"m",gt).call(this,i,a);if(s.success)return this.isAuthenticated=!0,this.userId=s.userId,this.jwt=s.token,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),yield h(this,vt,"f").setItem("camp-sdk:jwt",this.jwt),yield h(this,vt,"f").setItem("camp-sdk:wallet-address",this.walletAddress),yield h(this,vt,"f").setItem("camp-sdk:user-id",this.userId),yield h(this,vt,"f").setItem("camp-sdk:environment",this.environment.NAME),h(this,mt,"m",wt).call(this,"state","authenticated"),{success:!0,message:"Successfully authenticated",walletAddress:this.walletAddress};throw this.isAuthenticated=!1,h(this,mt,"m",wt).call(this,"state","unauthenticated"),new P("Failed to authenticate: signature verification failed")}catch(e){if(this.isAuthenticated=!1,T(this,ft,void 0,"f"),h(this,mt,"m",wt).call(this,"state","unauthenticated"),e instanceof P||e instanceof _)throw e;throw new P(`Failed to authenticate: ${k(e)}`)}}))}
|
|
1058
1061
|
/**
|
|
1059
1062
|
* Get the user's linked social accounts.
|
|
1060
1063
|
* @returns {Promise<Record<string, boolean>>} A promise that resolves with the user's linked social accounts.
|
|
@@ -1128,4 +1131,4 @@ if(!T&&(m.uuid||m.name))for(const e of f)try{if(m.uuid&&(null===(d=e.info)||void
|
|
|
1128
1131
|
* @returns {Promise<any>} A promise that resolves with the unlink result.
|
|
1129
1132
|
* @throws {Error} - Throws an error if the user is not authenticated.
|
|
1130
1133
|
* @throws {APIError} - Throws an error if the request fails.
|
|
1131
|
-
*/unlinkTelegram(){return m(this,void 0,void 0,(function*(){if(!this.isAuthenticated)throw new R("User must be authenticated to unlink Telegram account");const e=yield fetch(`${this.environment.AUTH_HUB_BASE_API}/telegram/disconnect-sdk`,{method:"POST",redirect:"follow",headers:{Authorization:`Bearer ${this.jwt}`,"x-client-id":this.clientId,"Content-Type":"application/json"},body:JSON.stringify({userId:this.userId})}).then((e=>e.json()));if(e.isError)throw new P(e.message||"Failed to unlink Telegram account");return e.data}))}}ht=new WeakMap,Tt=new WeakMap,ft=new WeakMap,vt=new WeakMap,mt=new WeakSet,wt=function(e,t){h(this,ht,"f")[e]&&h(this,ht,"f")[e].forEach((e=>e(t)))},At=function(e){return m(this,void 0,void 0,(function*(){const t=yield h(this,vt,"f").getItem("camp-sdk:wallet-address"),n=yield h(this,vt,"f").getItem("camp-sdk:user-id"),i=yield h(this,vt,"f").getItem("camp-sdk:jwt"),a=yield h(this,vt,"f").getItem("camp-sdk:environment");t&&n&&i&&(a===this.environment.NAME||!a)?(this.walletAddress=t,this.userId=n,this.jwt=i,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),this.isAuthenticated=!0,e?this.setProvider({provider:e.provider,info:e.info||{name:"Unknown"},address:t}):h(this,Tt,"f")||(console.warn("No matching provider was given for the stored wallet address. Trying to recover provider."),yield this.recoverProvider())):this.isAuthenticated=!1}))},It=function(){return m(this,void 0,void 0,(function*(){try{const[e]=yield this.viem.requestAddresses();return this.walletAddress=u(e),this.walletAddress}catch(e){throw new _(`Failed to connect wallet: ${
|
|
1134
|
+
*/unlinkTelegram(){return m(this,void 0,void 0,(function*(){if(!this.isAuthenticated)throw new R("User must be authenticated to unlink Telegram account");const e=yield fetch(`${this.environment.AUTH_HUB_BASE_API}/telegram/disconnect-sdk`,{method:"POST",redirect:"follow",headers:{Authorization:`Bearer ${this.jwt}`,"x-client-id":this.clientId,"Content-Type":"application/json"},body:JSON.stringify({userId:this.userId})}).then((e=>e.json()));if(e.isError)throw new P(e.message||"Failed to unlink Telegram account");return e.data}))}}ht=new WeakMap,Tt=new WeakMap,ft=new WeakMap,vt=new WeakMap,mt=new WeakSet,wt=function(e,t){h(this,ht,"f")[e]&&h(this,ht,"f")[e].forEach((e=>e(t)))},At=function(e){return m(this,void 0,void 0,(function*(){const t=yield h(this,vt,"f").getItem("camp-sdk:wallet-address"),n=yield h(this,vt,"f").getItem("camp-sdk:user-id"),i=yield h(this,vt,"f").getItem("camp-sdk:jwt"),a=yield h(this,vt,"f").getItem("camp-sdk:environment");t&&n&&i&&(a===this.environment.NAME||!a)?(this.walletAddress=t,this.userId=n,this.jwt=i,this.origin=new Et(this.environment,this.jwt,this.viem,this.baseParentId,this.appId),this.isAuthenticated=!0,e?this.setProvider({provider:e.provider,info:e.info||{name:"Unknown"},address:t}):h(this,Tt,"f")||(console.warn("No matching provider was given for the stored wallet address. Trying to recover provider."),yield this.recoverProvider())):this.isAuthenticated=!1}))},It=function(){return m(this,void 0,void 0,(function*(){try{const[e]=yield this.viem.requestAddresses();return this.walletAddress=u(e),this.walletAddress}catch(e){throw new _(`Failed to connect wallet: ${k(e)}`)}}))},bt=function(){return m(this,void 0,void 0,(function*(){try{const e=yield fetch(`${this.environment.AUTH_HUB_BASE_API}/client-user/nonce`,{method:"POST",headers:{"Content-Type":"application/json","x-client-id":this.clientId},body:JSON.stringify({walletAddress:this.walletAddress})}),t=yield e.json();if(200!==e.status)throw new P(t.message||`Failed to fetch nonce (HTTP ${e.status})`,e.status);return t.data}catch(e){if(e instanceof P)throw e;throw new P(`Failed to fetch nonce: ${k(e)}`)}}))},gt=function(e,t){return m(this,void 0,void 0,(function*(){try{const n=yield fetch(`${this.environment.AUTH_HUB_BASE_API}/client-user/verify`,{method:"POST",headers:{"Content-Type":"application/json","x-client-id":this.clientId},body:JSON.stringify({message:e,signature:t,walletAddress:this.walletAddress})}),i=yield n.json(),a=i.data.split(".")[1],s=JSON.parse(atob(a));return{success:!i.isError,userId:s.id,token:i.data}}catch(e){throw new P(`Failed to verify signature: ${k(e)}`)}}))},Ct=function(e,t,n){return y({domain:t||(h(this,Tt,"f")?"localhost":window.location.host),address:this.walletAddress,statement:L,uri:n||(h(this,Tt,"f")?"http://localhost":window.location.origin),version:"1",chainId:this.environment.CHAIN.id,nonce:e})};export{Pt as Auth,I as BrowserStorage,w as CustomSignerAdapter,De as DataStatus,Ne as DisputeStatus,v as EthersSignerAdapter,ke as LicenseType,b as MemoryStorage,Et as Origin,f as ViemSignerAdapter,E as campMainnet,C as campTestnet,Me as createLicenseTerms,g as createNodeWalletClient,A as createSignerAdapter,Ie as decodeCidFromBytes32,Ae as encodeCidToBytes32};
|
|
@@ -613,10 +613,11 @@ interface RoyaltyTokenBalance {
|
|
|
613
613
|
}
|
|
614
614
|
/**
|
|
615
615
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
616
|
-
* If no holder is provided, the
|
|
616
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
617
|
+
* since RT tokens are minted to the TBA by default.
|
|
617
618
|
*
|
|
618
619
|
* @param tokenId The token ID whose vault to query.
|
|
619
|
-
* @param holder Optional holder address. Defaults to
|
|
620
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
620
621
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
621
622
|
*/
|
|
622
623
|
declare function getRoyaltyTokenBalance(this: Origin, tokenId: bigint, holder?: Address): Promise<RoyaltyTokenBalance>;
|
package/dist/react/index.esm.js
CHANGED
|
@@ -8113,15 +8113,17 @@ const erc20Abi = [
|
|
|
8113
8113
|
];
|
|
8114
8114
|
/**
|
|
8115
8115
|
* Gets the Royalty Token balance for a holder in a token's vault.
|
|
8116
|
-
* If no holder is provided, the
|
|
8116
|
+
* If no holder is provided, the NFT's Token Bound Account (TBA) is used,
|
|
8117
|
+
* since RT tokens are minted to the TBA by default.
|
|
8117
8118
|
*
|
|
8118
8119
|
* @param tokenId The token ID whose vault to query.
|
|
8119
|
-
* @param holder Optional holder address. Defaults to
|
|
8120
|
+
* @param holder Optional holder address. Defaults to the NFT's TBA.
|
|
8120
8121
|
* @returns The royalty token balance info including vault address, balance, total supply, percentage, and decimals.
|
|
8121
8122
|
*/
|
|
8122
8123
|
function getRoyaltyTokenBalance(tokenId, holder) {
|
|
8123
8124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8124
|
-
|
|
8125
|
+
// Default to the NFT's TBA, since RT tokens are minted there
|
|
8126
|
+
const holderAddress = holder || (yield this.getTokenBoundAccount(tokenId));
|
|
8125
8127
|
// Get vault address
|
|
8126
8128
|
const vaultAddress = yield this.callContractMethod(this.environment.DATANFT_CONTRACT_ADDRESS, this.environment.IPNFT_ABI, "getRoyaltyVault", [tokenId]);
|
|
8127
8129
|
if (!vaultAddress || vaultAddress === zeroAddress) {
|