@meshsdk/contract 1.9.0-beta.104 → 1.9.0-beta.105
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/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ var ie=Object.defineProperty;var re=(o,r,c)=>r in o?ie(o,r,{enumerable:!0,config
|
|
|
13
13
|
in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).`,anyOf:[{title:"Address",dataType:"constructor",index:0,fields:[{title:"payment_credential",$ref:"#/definitions/PaymentCredential"},{title:"stake_credential",$ref:"#/definitions/Option$StakeCredential"}]}]},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
14
14
|
|
|
15
15
|
Credentials are always one of two kinds: a direct public/private key
|
|
16
|
-
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"content_ownership/types/ContentRegistryDatum":{title:"ContentRegistryDatum",anyOf:[{title:"ContentRegistryDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"registry",$ref:"#/definitions/List$ByteArray"}]}]},"content_ownership/types/ContentRegistryRedeemer":{title:"ContentRegistryRedeemer",anyOf:[{title:"CreateContent",dataType:"constructor",index:0,fields:[{title:"content_hash",$ref:"#/definitions/ByteArray"},{title:"owner",$ref:"#/definitions/List$ByteArray"}]},{title:"UpdateContent",dataType:"constructor",index:1,fields:[{title:"new_content_hash",$ref:"#/definitions/ByteArray"},{title:"content_number",$ref:"#/definitions/Int"}]},{title:"StopContentRegistry",dataType:"constructor",index:2,fields:[]}]},"content_ownership/types/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]},"content_ownership/types/OracleDatum":{title:"OracleDatum",anyOf:[{title:"OracleDatum",dataType:"constructor",index:0,fields:[{title:"oracle_nft",$ref:"#/definitions/PolicyId"},{title:"oracle_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"content_registry_ref_token",$ref:"#/definitions/PolicyId"},{title:"content_registry_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"content_registry_count",$ref:"#/definitions/Int"},{title:"ownership_registry_ref_token",$ref:"#/definitions/PolicyId"},{title:"ownership_registry_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"ownership_registry_count",$ref:"#/definitions/Int"},{title:"operation_key",$ref:"#/definitions/ByteArray"},{title:"stop_key",$ref:"#/definitions/ByteArray"}]}]},"content_ownership/types/OracleRedeemer":{title:"OracleRedeemer",anyOf:[{title:"CreateContentRegistry",dataType:"constructor",index:0,fields:[]},{title:"CreateOwnershipRegistry",dataType:"constructor",index:1,fields:[]},{title:"RotateKey",dataType:"constructor",index:2,fields:[{title:"new_operation_key",$ref:"#/definitions/ByteArray"},{title:"new_stop_key",$ref:"#/definitions/ByteArray"}]},{title:"StopApp",dataType:"constructor",index:3,fields:[]}]},"content_ownership/types/OwnershipRegistryDatum":{title:"OwnershipRegistryDatum",anyOf:[{title:"OwnershipRegistryDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"registry",$ref:"#/definitions/List$List$ByteArray"}]}]},"content_ownership/types/OwnershipRegistryRedeemer":{title:"OwnershipRegistryRedeemer",anyOf:[{title:"CreateOwnershipRecord",dataType:"constructor",index:0,fields:[]},{title:"TransferOwnership",dataType:"constructor",index:1,fields:[{title:"new_owner_token",$ref:"#/definitions/List$ByteArray"},{title:"content_number",$ref:"#/definitions/Int"}]},{title:"StopOwnershipRegistry",dataType:"constructor",index:2,fields:[]}]}}};var K=(o,r)=>{let c=u0.validators,e=c0(c[4].compiledCode,[oe(o.txHash,o.outputIndex)],"JSON"),a=ne(Q0(e,"V3"));switch(r){case"OracleNFT":return e;case"OracleValidator":return c0(c[6].compiledCode,[],"JSON");case"ContentRegistry":return c0(c[0].compiledCode,[a],"JSON");case"ContentRefToken":return c0(c[2].compiledCode,[a],"JSON");case"OwnershipRegistry":return c0(c[8].compiledCode,[a],"JSON");case"OwnershipRefToken":return c0(c[10].compiledCode,[a],"JSON")}},e0=(o,r)=>{let c=K(o,r);return Q0(c,"V3")},h0=(o,r,c=0)=>{let e={oracleNFT:{hash:e0(o,"OracleNFT"),cbor:K(o,"OracleNFT")},oracleValidator:{hash:e0(o,"OracleValidator"),cbor:K(o,"OracleValidator"),address:""},contentRegistry:{hash:e0(o,"ContentRegistry"),cbor:K(o,"ContentRegistry"),address:""},contentRefToken:{hash:e0(o,"ContentRefToken"),cbor:K(o,"ContentRefToken")},ownershipRegistry:{hash:e0(o,"OwnershipRegistry"),cbor:K(o,"OwnershipRegistry"),address:""},ownershipRefToken:{hash:e0(o,"OwnershipRefToken"),cbor:K(o,"OwnershipRefToken")}},a=R0({code:e.oracleValidator.cbor,version:"V3"},r,c).address,t=R0({code:e.contentRegistry.cbor,version:"V3"},r,c).address,d=R0({code:e.ownershipRegistry.cbor,version:"V3"},r,c).address;return e.oracleValidator.address=a,e.contentRegistry.address=t,e.ownershipRegistry.address=d,e};var Z0=class extends _{constructor(c,e){super(c);i(this,"paramUtxo",{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0});i(this,"scriptInfo",h0({outputIndex:0,txHash:"0000000000000000000000000000000000000000000000000000000000000000"}));i(this,"refScriptUtxos",{contentRefToken:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},ownershipRefToken:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},contentRegistry:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},ownershipRegistry:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0}});i(this,"operationAddress");i(this,"opsKey");i(this,"getOwnerNativeScript",()=>{let{pubKeyHash:c}=$0(this.operationAddress),e={type:"all",scripts:[{type:"sig",keyHash:c}]},{address:a}=fe(e,void 0,this.networkId);return{nativeScript:e,scriptAddress:a}});i(this,"mintOneTimeMintingPolicy",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx();if(c?.length<=0)throw new Error("No UTxOs found");let t=c[0],d=u0.validators[4].compiledCode,s=le(t.input.txHash,t.input.outputIndex),n=ue(d,[s]),b=Y0(n,"V3"),f=await this.mesh.txIn(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).mintPlutusScriptV3().mint("1",b,"").mintingScript(n).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete();return this.scriptInfo=h0(t.input,this.stakeCredential,this.networkId),this.paramUtxo=t.input,{tx:f,paramUtxo:t.input}});i(this,"setupOracleUtxo",async()=>{let{utxos:c,walletAddress:e}=await this.getWalletInfoForTx(),a=this.getOracleDatum(0,0);return await this.mesh.txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(a).changeAddress(e).selectUtxosFrom(c).complete()});i(this,"sendRefScriptOnchain",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx(),{scriptAddress:t}=this.getOwnerNativeScript();return await this.mesh.txOut(t,[]).txOutReferenceScript(K(this.paramUtxo,c)).changeAddress(a).selectUtxosFrom(e).complete()});i(this,"createContentRegistry",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx(),t=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),d=await this.getCurrentOracleDatum(t),s=d.fields[4].int,n=d.fields[7].int,b=W(`Registry (${s})`),{input:{txHash:l,outputIndex:f},output:{address:p,amount:u}}=t[0],h=this.getOracleDatum(s+1,n);return console.log("Oracle Datum",h),console.log("this.refScriptUtxos",this.refScriptUtxos),await this.mesh.spendingPlutusScriptV3().txIn(l,f,u,p).txInInlineDatumPresent().txInRedeemerValue(L([])).txInScript(this.scriptInfo.oracleValidator.cbor).txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(h).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(L([0,[]])).mintPlutusScriptV3().mint("1",this.scriptInfo.contentRefToken.hash,b).mintTxInReference(this.refScriptUtxos.contentRefToken.txHash,this.refScriptUtxos.contentRefToken.outputIndex,(this.scriptInfo.contentRefToken.cbor.length/2).toString(),this.scriptInfo.contentRefToken.hash).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete()});i(this,"createOwnershipRegistry",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx(),t=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),d=await this.getCurrentOracleDatum(t),s=d.fields[4].int,n=d.fields[7].int,b=W(`Registry (${n})`),{input:{txHash:l,outputIndex:f},output:{address:p,amount:u}}=t[0],h=this.getOracleDatum(s,n+1);return console.log("Oracle Datum",h),await this.mesh.spendingPlutusScriptV3().txIn(l,f,u,p).txInInlineDatumPresent().txInRedeemerValue(m0([])).txInScript(this.scriptInfo.oracleValidator.cbor).txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(h).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(L([0,[]])).mintPlutusScriptV3().mint("1",this.scriptInfo.ownershipRefToken.hash,b).mintTxInReference(this.refScriptUtxos.ownershipRefToken.txHash,this.refScriptUtxos.ownershipRefToken.outputIndex,(this.scriptInfo.ownershipRefToken.cbor.length/2).toString(),this.scriptInfo.ownershipRefToken.hash).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete()});i(this,"getOracleData",async()=>{let c=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),e=await this.getCurrentOracleDatum(c),a=e.fields[4].int,t=e.fields[7].int;return{contentNumber:a,ownershipNumber:t}});i(this,"mintUserToken",async(c,e={})=>{let{utxos:a,walletAddress:t}=await this.getWalletInfoForTx(),{pubKeyHash:d}=$0(t),s={type:"all",scripts:[{type:"sig",keyHash:d}]},n=be.fromNativeScript(s),b=Y0(n),l=W(c),f={[b]:{[c]:{...e}}};return await this.mesh.mint("1",b,l).mintingScript(n).metadataValue(721,f).changeAddress(t).selectUtxosFrom(a).complete()});i(this,"createContent",async(c,e,a=0)=>{let{utxos:t,collateral:d,walletAddress:s}=await this.getWalletInfoForTx(),n=W(`Registry (${a})`),b=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),l=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+n),f=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+n),{txHash:p,outputIndex:u}=b[0].input,{input:{txHash:h,outputIndex:w},output:{address:S,amount:O}}=l[0],{input:{txHash:C,outputIndex:A},output:{amount:T,address:x}}=f[0],B=[c.slice(0,56),c.slice(56)],U=this.insertContentRegistry(l[0].output.plutusData,e),V=this.insertOwnershipRegistry(f[0].output.plutusData,B);return await this.mesh.spendingPlutusScriptV3().txIn(h,w,O,this.scriptInfo.contentRegistry.address).txInInlineDatumPresent().txInRedeemerValue(X(0,[e,B])).spendingTxInReference(this.refScriptUtxos.contentRegistry.txHash,this.refScriptUtxos.contentRegistry.outputIndex,(this.scriptInfo.contentRegistry.cbor.length/2).toString(),this.scriptInfo.contentRegistry.hash).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+n,quantity:"1"}]).txOutInlineDatumValue(U).spendingPlutusScriptV3().txIn(C,A,T,x).txInInlineDatumPresent().txInRedeemerValue(X(0,[])).spendingTxInReference(this.refScriptUtxos.ownershipRegistry.txHash,this.refScriptUtxos.ownershipRegistry.outputIndex,(this.scriptInfo.ownershipRegistry.cbor.length/2).toString(),this.scriptInfo.ownershipRegistry.hash).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+n,quantity:"1"}]).txOutInlineDatumValue(V).readOnlyTxInReference(p,u).changeAddress(s).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(t).complete()});i(this,"getContent",async(c,e)=>{let[a]=await this.getScriptUtxos(c,["content"]);if(a===void 0)throw new Error("Content registry not found");let d=he(a.output.plutusData).fields[1].list;if(d.length<=e)throw new Error("Content not found");return pe(d[e]?.bytes)});i(this,"updateContent",async({ownerTokenUtxo:c,registryNumber:e,newContentHashHex:a,contentNumber:t})=>{let{utxos:d,collateral:s,walletAddress:n}=await this.getWalletInfoForTx(),b=W(`Registry (${e})`),[l,f,p]=await this.getScriptUtxos(e),u=this.updateContentRegistry(f.output.plutusData,t,a);return await this.mesh.txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingPlutusScriptV3().txIn(f.input.txHash,f.input.outputIndex,f.output.amount,f.output.address).txInInlineDatumPresent().txInRedeemerValue(X(1,[a,t])).spendingTxInReference(this.refScriptUtxos.contentRegistry.txHash,this.refScriptUtxos.contentRegistry.outputIndex,(this.scriptInfo.contentRegistry.cbor.length/2).toString(),this.scriptInfo.contentRegistry.hash).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(u).readOnlyTxInReference(l.input.txHash,l.input.outputIndex).readOnlyTxInReference(p.input.txHash,p.input.outputIndex).changeAddress(n).txInCollateral(s.input.txHash,s.input.outputIndex,s.output.amount,s.output.address).selectUtxosFrom(d).complete(),this.mesh.completeSigning()});i(this,"transferContent",async({ownerTokenUtxo:c,registryNumber:e,newOwnerAssetHex:a,contentNumber:t})=>{let{utxos:d,collateral:s,walletAddress:n}=await this.getWalletInfoForTx(),b=W(`Registry (${e})`),[l,f]=await this.getScriptUtxos(e,["oracle","ownership"]),p=[a.slice(0,56),a.slice(56)],u=this.updateOwnershipRegistry(f.output.plutusData,t,p);return await this.mesh.txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingPlutusScriptV3().txIn(f.input.txHash,f.input.outputIndex,f.output.amount,f.output.address).txInInlineDatumPresent().txInRedeemerValue(X(1,[p,t])).spendingTxInReference(this.refScriptUtxos.ownershipRegistry.txHash,this.refScriptUtxos.ownershipRegistry.outputIndex,(this.scriptInfo.ownershipRegistry.cbor.length/2).toString(),this.scriptInfo.ownershipRegistry.hash).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(u).readOnlyTxInReference(l.input.txHash,l.input.outputIndex).changeAddress(n).txInCollateral(s.input.txHash,s.input.outputIndex,s.output.amount,s.output.address).selectUtxosFrom(d).complete(),this.mesh.completeSigning()});i(this,"stopContentRegistry",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx(),d=W(`Registry (${c})`),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+d),n=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:b,outputIndex:l}=n[0].input,{input:{txHash:f,outputIndex:p},output:{amount:u,address:h}}=s[0];return await this.mesh.spendingPlutusScriptV3().txIn(f,p,u,h).txInInlineDatumPresent().txInRedeemerValue(X(2,[])).txInScript(this.scriptInfo.contentRegistry.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.contentRefToken.hash,d).mintTxInReference(this.refScriptUtxos.contentRefToken.txHash,this.refScriptUtxos.contentRefToken.outputIndex,(this.scriptInfo.contentRefToken.cbor.length/2).toString(),this.scriptInfo.contentRefToken.hash).mintRedeemerValue(m0([])).readOnlyTxInReference(b,l).changeAddress(t).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).requiredSignerHash(this.opsKey).selectUtxosFrom(e).complete()});i(this,"stopOwnershipRegistry",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx(),d=W(`Registry (${c})`),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+d),n=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:b,outputIndex:l}=n[0].input,{input:{txHash:f,outputIndex:p},output:{amount:u,address:h}}=s[0];return await this.mesh.spendingPlutusScriptV3().txIn(f,p,u,h).txInInlineDatumPresent().txInRedeemerValue(X(2,[])).txInScript(this.scriptInfo.ownershipRegistry.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.ownershipRefToken.hash,d).mintTxInReference(this.refScriptUtxos.ownershipRefToken.txHash,this.refScriptUtxos.ownershipRefToken.outputIndex,(this.scriptInfo.ownershipRefToken.cbor.length/2).toString(),this.scriptInfo.ownershipRefToken.hash).mintRedeemerValue(m0([])).readOnlyTxInReference(b,l).changeAddress(t).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).requiredSignerHash(this.opsKey).selectUtxosFrom(e).complete()});i(this,"stopOracle",async(c,e)=>{let{utxos:a,collateral:t,walletAddress:d}=await this.getWalletInfoForTx(),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:n,outputIndex:b}=s[0].input;return await this.mesh.txIn(c,e).spendingPlutusScriptV3().txIn(n,b).txInInlineDatumPresent().txInRedeemerValue(X(3,[])).txInScript(this.scriptInfo.oracleValidator.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.oracleNFT.hash,"").mintingScript(this.scriptInfo.oracleNFT.cbor).mintRedeemerValue(m0([])).changeAddress(d).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).requiredSignerHash(this.opsKey).requiredSignerHash(this.opsKey).selectUtxosFrom(a).complete()});i(this,"getCurrentOracleDatum",async c=>{let e=c||[];return e.length===0&&(e=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash)),s0({inline_datum:e[0].output.plutusData})});i(this,"getOracleDatum",(c,e)=>{let a=P0(this.scriptInfo.oracleValidator.hash,this.stakeCredential),t=P0(this.scriptInfo.contentRegistry.hash,this.stakeCredential),d=P0(this.scriptInfo.ownershipRegistry.hash,this.stakeCredential);return L([this.scriptInfo.oracleNFT.hash,a,this.scriptInfo.contentRefToken.hash,t,c,this.scriptInfo.ownershipRefToken.hash,d,e,this.opsKey,this.opsKey])});i(this,"getContentDatum",c=>L([c.length,c]));i(this,"getOwnershipDatum",c=>L([c.length,c]));i(this,"getScriptUtxos",async(c,e=["oracle","content","ownership"])=>{let a=W(`Registry (${c})`),t=[];return e.forEach(s=>{switch(s){case"oracle":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash));break;case"content":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+a));case"ownership":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+a));break}}),(await Promise.all(t)).map(s=>s[0])});i(this,"insertContentRegistry",(c,e)=>{let a=s0({inline_datum:c}).fields[1].list.map(d=>d.bytes);return this.getContentDatum([...a,e])});i(this,"insertOwnershipRegistry",(c,e)=>{let a=s0({inline_datum:c}).fields[1].list.map(d=>[d.list[0].bytes,d.list[1].bytes]);return this.getOwnershipDatum([...a,e])});i(this,"updateContentRegistry",(c,e,a)=>{let t=s0({inline_datum:c}).fields[1].list.map(s=>s.bytes);return t[e]=a,this.getContentDatum(t)});i(this,"updateOwnershipRegistry",(c,e,a)=>{let t=s0({inline_datum:c}).fields[1].list.map(s=>[s.list[0].bytes,s.list[1].bytes]);return t[e]=a,this.getOwnershipDatum(t)});this.paramUtxo=e.paramUtxo||this.paramUtxo,this.refScriptUtxos=e.refScriptUtxos||this.refScriptUtxos,this.scriptInfo=h0(this.paramUtxo,this.stakeCredential,this.networkId),this.operationAddress=e.operationAddress;let a=$0(this.operationAddress);this.opsKey=a.pubKeyHash}};import{conStr0 as ge,conStr1 as Ie,DEFAULT_REDEEMER_BUDGET as we,mConStr1 as Te,mConStr2 as Ae,MeshValue as n0,pubKeyAddress as dc,value as ic}from"@meshsdk/common";import{deserializeAddress as o0,deserializeDatum as H0,mergeAssets as ke,serializeAddressObj as y0}from"@meshsdk/core";import{applyParamsToScript as v0}from"@meshsdk/core-cst";var cc={preamble:{title:"meshjs/escrow",description:"Aiken contracts for project 'meshjs/escrow'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"escrow.escrow",datum:{title:"_datum",schema:{$ref:"#/definitions/escrow~1types~1EscrowDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/escrow~1types~1EscrowRedeemer"}},compiledCode:"590c2f01000032323232323232232323232323232232322533300d3232533300f300c3010375400226464646464646464a66602e602a60306ea80044c8c8c8c8c8c8c8c8c8c94ccc084c07c0244c8c8c8c8c8c8c94ccc0acc0b800c4c94ccc0b0c0bc00c4c94ccc0a8c080c0acdd5000899192999816181118169baa001132533302d302b302e3754006264646464a666068606e004264646464a66606a66ebc024cdd2a40046607200e660726e98014cc0e404ccc0e4dd300925eb8040045281980b9bab302730363754018660326eacc09cc0d8dd51813981b1baa00d301a011302c0073302c0022323302e3756606c0044646eb4c0e0008dd7181b0009bae3034001302c003163756606a002606a0046066002605e6ea800c58c0c4c0b8dd50008b180798169baa003302f302c37540022c601a60566ea8c070c0acdd50010b18168010b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb80dd598141814801181380098119baa01813232325333024302100c132323232533302b302e0031533302b0021325333029301f302a375400226464a666056605260586ea80084c94ccc0b0c0a8c0b4dd500089980500c1bae3031302e37540022c60106060605a6ea80084c8c8c8c8c8c8c8c94ccc0ccc0c4c0d0dd500089919299981a9819981b1baa0011533303532330010013303a375200666074607660706ea80092f5c044a66607400229404c94ccc0e0cc058090dd7181e8010a51133003003001303d00115333035005100414a0294058c044014dd7181c181a9baa00116300f006330143301001e00230173756606c606e006660266601e03a008602c6eacc0d400cc0d0004c0d0004c0cc008c0c4004c0b4dd50011811800981718159baa00116300c302a3754603660546ea80045858c0b0008dd6181598160011bac302a00133028374e6600802601a660506e9ccc0140440352f5c0264646464a666056605c0062a666056004264a666052603e60546ea80044c94ccc0a8c09cc0acdd500089919191919191919299981a981c001099191919191919299981c981b981d1baa00113232533303b3039303c37540022a6660766466002002660806ea400ccc100c104c0f8dd500125eb80894ccc100004528899299981f1980e0151bae304300213300300300114a060860022a66607600a200829405280b180b8059bae303e303b37540022c602a01a660346602c048010603a014660326602a046016603800a6605e008464660626eacc0e40088c8dd6981d8011bae3039001375c606e002605e00a6605a00c4646605e6eacc0dc0088c8dd6981c8011bae3037001375c606a002605a00e2c6eacc0d8004c0d8008c0d0004c0d0008dd598190009819001181800098161baa00116302e302b37540022c601860546ea8c06cc0a8dd50008b0b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb808c94ccc094c08cc098dd50008980819814981518139baa0014bd700a6103d87a800030153026375400244646600200200644a66605200229404c94ccc09ccdc79bae302c00200414a2266006006002605800244646600200200644a666050002297adef6c601332253330273375e603060526ea80080144cc030004dd5980d18149baa0021001302a00133002002302b001223300400223375e6028604a6ea8c058c094dd50008011119801801119baf30133024375400200444646600200200644a66604a002297ae013232533302430050021330280023300400400113300400400130290023027001223233001001323300100100322533302500114bd7009919991119198008008019129998158008801899198169ba73302d375200c6605a60540026605a605600297ae033003003302f002302d001375c60480026eacc094004cc00c00cc0a4008c09c004894ccc09000452889929998111919b89375a600e002664464a66604c6046604e6ea8004520001375a605660506ea8004c94ccc098c08cc09cdd50008a60103d87a8000132330010013756605860526ea8008894ccc0ac004530103d87a8000132323232533302c337220100042a66605866e3c0200084c05ccc0c0dd4000a5eb80530103d87a8000133006006003375a605a0066eb8c0ac008c0bc008c0b4004c8cc004004024894ccc0a80045300103d87a8000132323232533302b337220100042a66605666e3c0200084c058cc0bcdd3000a5eb80530103d87a8000133006006003375660580066eb8c0a8008c0b8008c0b0004dd7180a0009bae30160013758604e0042660060060022940c09c0048c088c08cc08c00488c8ccc00400400c0088894ccc08c00840044c8ccc010010c09c00ccccc020008dd718110009bab3023001222325333025533302800114a229405300103d87a80001301033029374c00297ae032333001001003002222533302a0021001132333004004302e0033322323300100100522533302f001133030337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0c0cdc800400109981a19bb037520106ea001c01454ccc0c0cdc78040010992999818981798191baa001133035337606ea4024c0d8c0ccdd5000802080219299981898178008a60103d87a80001301c33035375000297ae03370000e00226606866ec0dd48011ba800133006006003375a60620066eb8c0bc008c0cc008c0c4004dd718148009bad302a001302c00230250022323300100100222533302000114bd6f7b6300999119191999804001801000911319190011919198008008019129998138008a4c264a6660500022a66604a60086eb4c09cc0a8008526161323232325333029337206eb8c0a8010dd718150018a9998149804000899803803998168018010b0b1bad302a003302d003302b002302a002302a001233302230200014a0944dd598110019bae3020002302200133002002302300122223233001001005225333022001133023337606ea4014dd300225eb7bdb1804c8c8c8c94ccc08ccdc800480109981399bb037520126e9802001454ccc08ccdc78048010992999812181118129baa001133028337606ea4028c0a4c098dd5000802080219980380480400089981399bb037520046e98004cc01801800cdd598120019bae3022002302600230240013019375401e601060326ea8c028c064dd5180e180c9baa0011632323300100100722533301c00114c0103d87a800013232533301b3375e6018603a6ea80080144c018cc07c0092f5c02660080080026040004603c002603660306ea8020dd2a40006eb0c064c068c068c068c068c068c068008dd6180c000980c180c0011bac301600130123754600260246ea80108c054004528180098081baa00223013301400114984d958c94ccc030c0280044c8c8c8c94ccc04cc0580084c8c9263300b0022323300d3756602a0044646eb4c05c008dd7180a8009bae3013001300b003163756602800260280046024002601c6ea800c54ccc030c02400454ccc03cc038dd50018a4c2c2a66601860040022a66601e601c6ea800c5261616300c37540046e1d20043001007232533300930070011323232325333010301300213232498cc0200088c8cc028dd598090011191bad3014002375c60240026eb8c040004c02000c58dd598088009808801180780098059baa0021533300930060011323232323232323253330143017002132323232498cc0380108c8cc040dd5980c0011191bad301a002375c60300026eb8c058004c038014cc0300188c8cc038dd5980b0011191bad3018002375c602c0026eb8c050004c03001c58dd5980a800980a801180980098098011bab30110013011002300f001300b37540042c60126ea800488c8cc00400400c894ccc0340045261323300300330110023003300f00125333006300430073754002264646464a66601a602000426464931929998061805000899192999808980a00109924c64a66601e601a00226464a666028602e0042649318068008b180a80098089baa0021533300f300c00113232323232325333018301b002149858dd6980c800980c8011bad30170013017002375a602a00260226ea800858c03cdd50008b180900098071baa0031533300c30090011533300f300e37540062930b0b18061baa002300600316300e001300e002300c001300837540022c464a66600c600800226464a666016601c0042930b1bae300c001300837540042a66600c600600226464a666016601c0042930b1bae300c001300837540042c600c6ea8004dc3a40046e1d20005734aae7555cf2ab9f5740ae855d101",hash:"8fa9284f5889972d7260c10e940a2e1acb2114bdcea845da3d52de7d"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/Int"}},List$Pair$ByteArray_List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/List$Pair$ByteArray_Int"}},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
16
|
+
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"content_ownership/types/ContentRegistryDatum":{title:"ContentRegistryDatum",anyOf:[{title:"ContentRegistryDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"registry",$ref:"#/definitions/List$ByteArray"}]}]},"content_ownership/types/ContentRegistryRedeemer":{title:"ContentRegistryRedeemer",anyOf:[{title:"CreateContent",dataType:"constructor",index:0,fields:[{title:"content_hash",$ref:"#/definitions/ByteArray"},{title:"owner",$ref:"#/definitions/List$ByteArray"}]},{title:"UpdateContent",dataType:"constructor",index:1,fields:[{title:"new_content_hash",$ref:"#/definitions/ByteArray"},{title:"content_number",$ref:"#/definitions/Int"}]},{title:"StopContentRegistry",dataType:"constructor",index:2,fields:[]}]},"content_ownership/types/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]},"content_ownership/types/OracleDatum":{title:"OracleDatum",anyOf:[{title:"OracleDatum",dataType:"constructor",index:0,fields:[{title:"oracle_nft",$ref:"#/definitions/PolicyId"},{title:"oracle_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"content_registry_ref_token",$ref:"#/definitions/PolicyId"},{title:"content_registry_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"content_registry_count",$ref:"#/definitions/Int"},{title:"ownership_registry_ref_token",$ref:"#/definitions/PolicyId"},{title:"ownership_registry_address",$ref:"#/definitions/cardano~1address~1Address"},{title:"ownership_registry_count",$ref:"#/definitions/Int"},{title:"operation_key",$ref:"#/definitions/ByteArray"},{title:"stop_key",$ref:"#/definitions/ByteArray"}]}]},"content_ownership/types/OracleRedeemer":{title:"OracleRedeemer",anyOf:[{title:"CreateContentRegistry",dataType:"constructor",index:0,fields:[]},{title:"CreateOwnershipRegistry",dataType:"constructor",index:1,fields:[]},{title:"RotateKey",dataType:"constructor",index:2,fields:[{title:"new_operation_key",$ref:"#/definitions/ByteArray"},{title:"new_stop_key",$ref:"#/definitions/ByteArray"}]},{title:"StopApp",dataType:"constructor",index:3,fields:[]}]},"content_ownership/types/OwnershipRegistryDatum":{title:"OwnershipRegistryDatum",anyOf:[{title:"OwnershipRegistryDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"registry",$ref:"#/definitions/List$List$ByteArray"}]}]},"content_ownership/types/OwnershipRegistryRedeemer":{title:"OwnershipRegistryRedeemer",anyOf:[{title:"CreateOwnershipRecord",dataType:"constructor",index:0,fields:[]},{title:"TransferOwnership",dataType:"constructor",index:1,fields:[{title:"new_owner_token",$ref:"#/definitions/List$ByteArray"},{title:"content_number",$ref:"#/definitions/Int"}]},{title:"StopOwnershipRegistry",dataType:"constructor",index:2,fields:[]}]}}};var K=(o,r)=>{let c=u0.validators,e=c0(c[4].compiledCode,[oe(o.txHash,o.outputIndex)],"JSON"),a=ne(Q0(e,"V3"));switch(r){case"OracleNFT":return e;case"OracleValidator":return c0(c[6].compiledCode,[],"JSON");case"ContentRegistry":return c0(c[0].compiledCode,[a],"JSON");case"ContentRefToken":return c0(c[2].compiledCode,[a],"JSON");case"OwnershipRegistry":return c0(c[8].compiledCode,[a],"JSON");case"OwnershipRefToken":return c0(c[10].compiledCode,[a],"JSON")}},e0=(o,r)=>{let c=K(o,r);return Q0(c,"V3")},h0=(o,r,c=0)=>{let e={oracleNFT:{hash:e0(o,"OracleNFT"),cbor:K(o,"OracleNFT")},oracleValidator:{hash:e0(o,"OracleValidator"),cbor:K(o,"OracleValidator"),address:""},contentRegistry:{hash:e0(o,"ContentRegistry"),cbor:K(o,"ContentRegistry"),address:""},contentRefToken:{hash:e0(o,"ContentRefToken"),cbor:K(o,"ContentRefToken")},ownershipRegistry:{hash:e0(o,"OwnershipRegistry"),cbor:K(o,"OwnershipRegistry"),address:""},ownershipRefToken:{hash:e0(o,"OwnershipRefToken"),cbor:K(o,"OwnershipRefToken")}},a=R0({code:e.oracleValidator.cbor,version:"V3"},r,c).address,t=R0({code:e.contentRegistry.cbor,version:"V3"},r,c).address,d=R0({code:e.ownershipRegistry.cbor,version:"V3"},r,c).address;return e.oracleValidator.address=a,e.contentRegistry.address=t,e.ownershipRegistry.address=d,e};var Z0=class extends _{constructor(c,e){super(c);i(this,"paramUtxo",{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0});i(this,"scriptInfo",h0({outputIndex:0,txHash:"0000000000000000000000000000000000000000000000000000000000000000"}));i(this,"refScriptUtxos",{contentRefToken:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},ownershipRefToken:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},contentRegistry:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0},ownershipRegistry:{txHash:"0000000000000000000000000000000000000000000000000000000000000000",outputIndex:0}});i(this,"operationAddress");i(this,"opsKey");i(this,"getOwnerNativeScript",()=>{let{pubKeyHash:c}=$0(this.operationAddress),e={type:"all",scripts:[{type:"sig",keyHash:c}]},{address:a}=fe(e,void 0,this.networkId);return{nativeScript:e,scriptAddress:a}});i(this,"mintOneTimeMintingPolicy",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx();if(c?.length<=0)throw new Error("No UTxOs found");let t=c[0],d=u0.validators[4].compiledCode,s=le(t.input.txHash,t.input.outputIndex),n=ue(d,[s]),b=Y0(n,"V3"),f=await this.mesh.txIn(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).mintPlutusScriptV3().mint("1",b,"").mintingScript(n).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete();return this.scriptInfo=h0(t.input,this.stakeCredential,this.networkId),this.paramUtxo=t.input,{tx:f,paramUtxo:t.input}});i(this,"setupOracleUtxo",async()=>{let{utxos:c,walletAddress:e}=await this.getWalletInfoForTx(),a=this.getOracleDatum(0,0);return await this.mesh.txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(a).changeAddress(e).selectUtxosFrom(c).complete()});i(this,"sendRefScriptOnchain",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx(),{scriptAddress:t}=this.getOwnerNativeScript();return await this.mesh.txOut(t,[]).txOutReferenceScript(K(this.paramUtxo,c)).changeAddress(a).selectUtxosFrom(e).complete()});i(this,"createContentRegistry",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx(),t=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),d=await this.getCurrentOracleDatum(t),s=d.fields[4].int,n=d.fields[7].int,b=W(`Registry (${s})`),{input:{txHash:l,outputIndex:f},output:{address:p,amount:u}}=t[0],h=this.getOracleDatum(s+1,n);return console.log("Oracle Datum",h),console.log("this.refScriptUtxos",this.refScriptUtxos),await this.mesh.spendingPlutusScriptV3().txIn(l,f,u,p).txInInlineDatumPresent().txInRedeemerValue(L([])).txInScript(this.scriptInfo.oracleValidator.cbor).txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(h).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(L([0,[]])).mintPlutusScriptV3().mint("1",this.scriptInfo.contentRefToken.hash,b).mintTxInReference(this.refScriptUtxos.contentRefToken.txHash,this.refScriptUtxos.contentRefToken.outputIndex,(this.scriptInfo.contentRefToken.cbor.length/2).toString(),this.scriptInfo.contentRefToken.hash).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete()});i(this,"createOwnershipRegistry",async()=>{let{utxos:c,collateral:e,walletAddress:a}=await this.getWalletInfoForTx(),t=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),d=await this.getCurrentOracleDatum(t),s=d.fields[4].int,n=d.fields[7].int,b=W(`Registry (${n})`),{input:{txHash:l,outputIndex:f},output:{address:p,amount:u}}=t[0],h=this.getOracleDatum(s,n+1);return console.log("Oracle Datum",h),await this.mesh.spendingPlutusScriptV3().txIn(l,f,u,p).txInInlineDatumPresent().txInRedeemerValue(m0([])).txInScript(this.scriptInfo.oracleValidator.cbor).txOut(this.scriptInfo.oracleValidator.address,[{unit:this.scriptInfo.oracleNFT.hash+"",quantity:"1"}]).txOutInlineDatumValue(h).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(L([0,[]])).mintPlutusScriptV3().mint("1",this.scriptInfo.ownershipRefToken.hash,b).mintTxInReference(this.refScriptUtxos.ownershipRefToken.txHash,this.refScriptUtxos.ownershipRefToken.outputIndex,(this.scriptInfo.ownershipRefToken.cbor.length/2).toString(),this.scriptInfo.ownershipRefToken.hash).mintRedeemerValue(L([])).txInCollateral(e.input.txHash,e.input.outputIndex,e.output.amount,e.output.address).changeAddress(a).selectUtxosFrom(c).complete()});i(this,"getOracleData",async()=>{let c=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),e=await this.getCurrentOracleDatum(c),a=e.fields[4].int,t=e.fields[7].int;return{contentNumber:a,ownershipNumber:t}});i(this,"mintUserToken",async(c,e={})=>{let{utxos:a,walletAddress:t}=await this.getWalletInfoForTx(),{pubKeyHash:d}=$0(t),s={type:"all",scripts:[{type:"sig",keyHash:d}]},n=be.fromNativeScript(s),b=Y0(n),l=W(c),f={[b]:{[c]:{...e}}};return await this.mesh.mint("1",b,l).mintingScript(n).metadataValue(721,f).changeAddress(t).selectUtxosFrom(a).complete()});i(this,"createContent",async(c,e,a=0)=>{let{utxos:t,collateral:d,walletAddress:s}=await this.getWalletInfoForTx(),n=W(`Registry (${a})`),b=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),l=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+n),f=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+n),{txHash:p,outputIndex:u}=b[0].input,{input:{txHash:h,outputIndex:w},output:{address:S,amount:O}}=l[0],{input:{txHash:C,outputIndex:A},output:{amount:T,address:x}}=f[0],B=[c.slice(0,56),c.slice(56)],U=this.insertContentRegistry(l[0].output.plutusData,e),V=this.insertOwnershipRegistry(f[0].output.plutusData,B);return await this.mesh.spendingPlutusScriptV3().txIn(h,w,O,this.scriptInfo.contentRegistry.address).txInInlineDatumPresent().txInRedeemerValue(X(0,[e,B])).spendingTxInReference(this.refScriptUtxos.contentRegistry.txHash,this.refScriptUtxos.contentRegistry.outputIndex,(this.scriptInfo.contentRegistry.cbor.length/2).toString(),this.scriptInfo.contentRegistry.hash).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+n,quantity:"1"}]).txOutInlineDatumValue(U).spendingPlutusScriptV3().txIn(C,A,T,x).txInInlineDatumPresent().txInRedeemerValue(X(0,[])).spendingTxInReference(this.refScriptUtxos.ownershipRegistry.txHash,this.refScriptUtxos.ownershipRegistry.outputIndex,(this.scriptInfo.ownershipRegistry.cbor.length/2).toString(),this.scriptInfo.ownershipRegistry.hash).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+n,quantity:"1"}]).txOutInlineDatumValue(V).readOnlyTxInReference(p,u).changeAddress(s).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(t).complete()});i(this,"getContent",async(c,e)=>{let[a]=await this.getScriptUtxos(c,["content"]);if(a===void 0)throw new Error("Content registry not found");let d=he(a.output.plutusData).fields[1].list;if(d.length<=e)throw new Error("Content not found");return pe(d[e]?.bytes)});i(this,"updateContent",async({ownerTokenUtxo:c,registryNumber:e,newContentHashHex:a,contentNumber:t})=>{let{utxos:d,collateral:s,walletAddress:n}=await this.getWalletInfoForTx(),b=W(`Registry (${e})`),[l,f,p]=await this.getScriptUtxos(e),u=this.updateContentRegistry(f.output.plutusData,t,a);return await this.mesh.txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingPlutusScriptV3().txIn(f.input.txHash,f.input.outputIndex,f.output.amount,f.output.address).txInInlineDatumPresent().txInRedeemerValue(X(1,[a,t])).spendingTxInReference(this.refScriptUtxos.contentRegistry.txHash,this.refScriptUtxos.contentRegistry.outputIndex,(this.scriptInfo.contentRegistry.cbor.length/2).toString(),this.scriptInfo.contentRegistry.hash).txOut(this.scriptInfo.contentRegistry.address,[{unit:this.scriptInfo.contentRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(u).readOnlyTxInReference(l.input.txHash,l.input.outputIndex).readOnlyTxInReference(p.input.txHash,p.input.outputIndex).changeAddress(n).txInCollateral(s.input.txHash,s.input.outputIndex,s.output.amount,s.output.address).selectUtxosFrom(d).complete(),this.mesh.completeSigning()});i(this,"transferContent",async({ownerTokenUtxo:c,registryNumber:e,newOwnerAssetHex:a,contentNumber:t})=>{let{utxos:d,collateral:s,walletAddress:n}=await this.getWalletInfoForTx(),b=W(`Registry (${e})`),[l,f]=await this.getScriptUtxos(e,["oracle","ownership"]),p=[a.slice(0,56),a.slice(56)],u=this.updateOwnershipRegistry(f.output.plutusData,t,p);return await this.mesh.txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingPlutusScriptV3().txIn(f.input.txHash,f.input.outputIndex,f.output.amount,f.output.address).txInInlineDatumPresent().txInRedeemerValue(X(1,[p,t])).spendingTxInReference(this.refScriptUtxos.ownershipRegistry.txHash,this.refScriptUtxos.ownershipRegistry.outputIndex,(this.scriptInfo.ownershipRegistry.cbor.length/2).toString(),this.scriptInfo.ownershipRegistry.hash).txOut(this.scriptInfo.ownershipRegistry.address,[{unit:this.scriptInfo.ownershipRefToken.hash+b,quantity:"1"}]).txOutInlineDatumValue(u).readOnlyTxInReference(l.input.txHash,l.input.outputIndex).changeAddress(n).txInCollateral(s.input.txHash,s.input.outputIndex,s.output.amount,s.output.address).selectUtxosFrom(d).complete(),this.mesh.completeSigning()});i(this,"stopContentRegistry",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx(),d=W(`Registry (${c})`),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+d),n=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:b,outputIndex:l}=n[0].input,{input:{txHash:f,outputIndex:p},output:{amount:u,address:h}}=s[0];return await this.mesh.spendingPlutusScriptV3().txIn(f,p,u,h).txInInlineDatumPresent().txInRedeemerValue(X(2,[])).txInScript(this.scriptInfo.contentRegistry.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.contentRefToken.hash,d).mintTxInReference(this.refScriptUtxos.contentRefToken.txHash,this.refScriptUtxos.contentRefToken.outputIndex,(this.scriptInfo.contentRefToken.cbor.length/2).toString(),this.scriptInfo.contentRefToken.hash).mintRedeemerValue(m0([])).readOnlyTxInReference(b,l).changeAddress(t).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).requiredSignerHash(this.opsKey).selectUtxosFrom(e).complete()});i(this,"stopOwnershipRegistry",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx(),d=W(`Registry (${c})`),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+d),n=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:b,outputIndex:l}=n[0].input,{input:{txHash:f,outputIndex:p},output:{amount:u,address:h}}=s[0];return await this.mesh.spendingPlutusScriptV3().txIn(f,p,u,h).txInInlineDatumPresent().txInRedeemerValue(X(2,[])).txInScript(this.scriptInfo.ownershipRegistry.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.ownershipRefToken.hash,d).mintTxInReference(this.refScriptUtxos.ownershipRefToken.txHash,this.refScriptUtxos.ownershipRefToken.outputIndex,(this.scriptInfo.ownershipRefToken.cbor.length/2).toString(),this.scriptInfo.ownershipRefToken.hash).mintRedeemerValue(m0([])).readOnlyTxInReference(b,l).changeAddress(t).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).requiredSignerHash(this.opsKey).selectUtxosFrom(e).complete()});i(this,"stopOracle",async(c,e)=>{let{utxos:a,collateral:t,walletAddress:d}=await this.getWalletInfoForTx(),s=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash),{txHash:n,outputIndex:b}=s[0].input;return await this.mesh.txIn(c,e).spendingPlutusScriptV3().txIn(n,b).txInInlineDatumPresent().txInRedeemerValue(X(3,[])).txInScript(this.scriptInfo.oracleValidator.cbor).mintPlutusScriptV2().mint("-1",this.scriptInfo.oracleNFT.hash,"").mintingScript(this.scriptInfo.oracleNFT.cbor).mintRedeemerValue(m0([])).changeAddress(d).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).requiredSignerHash(this.opsKey).requiredSignerHash(this.opsKey).selectUtxosFrom(a).complete()});i(this,"getCurrentOracleDatum",async c=>{let e=c||[];return e.length===0&&(e=await this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash)),s0({inline_datum:e[0].output.plutusData})});i(this,"getOracleDatum",(c,e)=>{let a=P0(this.scriptInfo.oracleValidator.hash,this.stakeCredential),t=P0(this.scriptInfo.contentRegistry.hash,this.stakeCredential),d=P0(this.scriptInfo.ownershipRegistry.hash,this.stakeCredential);return L([this.scriptInfo.oracleNFT.hash,a,this.scriptInfo.contentRefToken.hash,t,c,this.scriptInfo.ownershipRefToken.hash,d,e,this.opsKey,this.opsKey])});i(this,"getContentDatum",c=>L([c.length,c]));i(this,"getOwnershipDatum",c=>L([c.length,c]));i(this,"getScriptUtxos",async(c,e=["oracle","content","ownership"])=>{let a=W(`Registry (${c})`),t=[];return e.forEach(s=>{switch(s){case"oracle":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.oracleValidator.address,this.scriptInfo.oracleNFT.hash));break;case"content":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.contentRegistry.address,this.scriptInfo.contentRefToken.hash+a));case"ownership":t.push(this.fetcher.fetchAddressUTxOs(this.scriptInfo.ownershipRegistry.address,this.scriptInfo.ownershipRefToken.hash+a));break}}),(await Promise.all(t)).map(s=>s[0])});i(this,"insertContentRegistry",(c,e)=>{let a=s0({inline_datum:c}).fields[1].list.map(d=>d.bytes);return this.getContentDatum([...a,e])});i(this,"insertOwnershipRegistry",(c,e)=>{let a=s0({inline_datum:c}).fields[1].list.map(d=>[d.list[0].bytes,d.list[1].bytes]);return this.getOwnershipDatum([...a,e])});i(this,"updateContentRegistry",(c,e,a)=>{let t=s0({inline_datum:c}).fields[1].list.map(s=>s.bytes);return t[e]=a,this.getContentDatum(t)});i(this,"updateOwnershipRegistry",(c,e,a)=>{let t=s0({inline_datum:c}).fields[1].list.map(s=>[s.list[0].bytes,s.list[1].bytes]);return t[e]=a,this.getOwnershipDatum(t)});this.paramUtxo=e.paramUtxo||this.paramUtxo,this.refScriptUtxos=e.refScriptUtxos||this.refScriptUtxos,this.scriptInfo=h0(this.paramUtxo,this.stakeCredential,this.networkId),this.operationAddress=e.operationAddress;let a=$0(this.operationAddress);this.opsKey=a.pubKeyHash}};import{conStr0 as ge,conStr1 as Ie,DEFAULT_REDEEMER_BUDGET as we,mConStr1 as Te,mConStr2 as Ae,MeshValue as n0,pubKeyAddress as dc,value as ic}from"@meshsdk/common";import{deserializeAddress as o0,deserializeDatum as v0,mergeAssets as ke,serializeAddressObj as y0}from"@meshsdk/core";import{applyParamsToScript as H0}from"@meshsdk/core-cst";var cc={preamble:{title:"meshjs/escrow",description:"Aiken contracts for project 'meshjs/escrow'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"escrow.escrow",datum:{title:"_datum",schema:{$ref:"#/definitions/escrow~1types~1EscrowDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/escrow~1types~1EscrowRedeemer"}},compiledCode:"590c2f01000032323232323232232323232323232232322533300d3232533300f300c3010375400226464646464646464a66602e602a60306ea80044c8c8c8c8c8c8c8c8c8c94ccc084c07c0244c8c8c8c8c8c8c94ccc0acc0b800c4c94ccc0b0c0bc00c4c94ccc0a8c080c0acdd5000899192999816181118169baa001132533302d302b302e3754006264646464a666068606e004264646464a66606a66ebc024cdd2a40046607200e660726e98014cc0e404ccc0e4dd300925eb8040045281980b9bab302730363754018660326eacc09cc0d8dd51813981b1baa00d301a011302c0073302c0022323302e3756606c0044646eb4c0e0008dd7181b0009bae3034001302c003163756606a002606a0046066002605e6ea800c58c0c4c0b8dd50008b180798169baa003302f302c37540022c601a60566ea8c070c0acdd50010b18168010b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb80dd598141814801181380098119baa01813232325333024302100c132323232533302b302e0031533302b0021325333029301f302a375400226464a666056605260586ea80084c94ccc0b0c0a8c0b4dd500089980500c1bae3031302e37540022c60106060605a6ea80084c8c8c8c8c8c8c8c94ccc0ccc0c4c0d0dd500089919299981a9819981b1baa0011533303532330010013303a375200666074607660706ea80092f5c044a66607400229404c94ccc0e0cc058090dd7181e8010a51133003003001303d00115333035005100414a0294058c044014dd7181c181a9baa00116300f006330143301001e00230173756606c606e006660266601e03a008602c6eacc0d400cc0d0004c0d0004c0cc008c0c4004c0b4dd50011811800981718159baa00116300c302a3754603660546ea80045858c0b0008dd6181598160011bac302a00133028374e6600802601a660506e9ccc0140440352f5c0264646464a666056605c0062a666056004264a666052603e60546ea80044c94ccc0a8c09cc0acdd500089919191919191919299981a981c001099191919191919299981c981b981d1baa00113232533303b3039303c37540022a6660766466002002660806ea400ccc100c104c0f8dd500125eb80894ccc100004528899299981f1980e0151bae304300213300300300114a060860022a66607600a200829405280b180b8059bae303e303b37540022c602a01a660346602c048010603a014660326602a046016603800a6605e008464660626eacc0e40088c8dd6981d8011bae3039001375c606e002605e00a6605a00c4646605e6eacc0dc0088c8dd6981c8011bae3037001375c606a002605a00e2c6eacc0d8004c0d8008c0d0004c0d0008dd598190009819001181800098161baa00116302e302b37540022c601860546ea8c06cc0a8dd50008b0b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb808c94ccc094c08cc098dd50008980819814981518139baa0014bd700a6103d87a800030153026375400244646600200200644a66605200229404c94ccc09ccdc79bae302c00200414a2266006006002605800244646600200200644a666050002297adef6c601332253330273375e603060526ea80080144cc030004dd5980d18149baa0021001302a00133002002302b001223300400223375e6028604a6ea8c058c094dd50008011119801801119baf30133024375400200444646600200200644a66604a002297ae013232533302430050021330280023300400400113300400400130290023027001223233001001323300100100322533302500114bd7009919991119198008008019129998158008801899198169ba73302d375200c6605a60540026605a605600297ae033003003302f002302d001375c60480026eacc094004cc00c00cc0a4008c09c004894ccc09000452889929998111919b89375a600e002664464a66604c6046604e6ea8004520001375a605660506ea8004c94ccc098c08cc09cdd50008a60103d87a8000132330010013756605860526ea8008894ccc0ac004530103d87a8000132323232533302c337220100042a66605866e3c0200084c05ccc0c0dd4000a5eb80530103d87a8000133006006003375a605a0066eb8c0ac008c0bc008c0b4004c8cc004004024894ccc0a80045300103d87a8000132323232533302b337220100042a66605666e3c0200084c058cc0bcdd3000a5eb80530103d87a8000133006006003375660580066eb8c0a8008c0b8008c0b0004dd7180a0009bae30160013758604e0042660060060022940c09c0048c088c08cc08c00488c8ccc00400400c0088894ccc08c00840044c8ccc010010c09c00ccccc020008dd718110009bab3023001222325333025533302800114a229405300103d87a80001301033029374c00297ae032333001001003002222533302a0021001132333004004302e0033322323300100100522533302f001133030337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0c0cdc800400109981a19bb037520106ea001c01454ccc0c0cdc78040010992999818981798191baa001133035337606ea4024c0d8c0ccdd5000802080219299981898178008a60103d87a80001301c33035375000297ae03370000e00226606866ec0dd48011ba800133006006003375a60620066eb8c0bc008c0cc008c0c4004dd718148009bad302a001302c00230250022323300100100222533302000114bd6f7b6300999119191999804001801000911319190011919198008008019129998138008a4c264a6660500022a66604a60086eb4c09cc0a8008526161323232325333029337206eb8c0a8010dd718150018a9998149804000899803803998168018010b0b1bad302a003302d003302b002302a002302a001233302230200014a0944dd598110019bae3020002302200133002002302300122223233001001005225333022001133023337606ea4014dd300225eb7bdb1804c8c8c8c94ccc08ccdc800480109981399bb037520126e9802001454ccc08ccdc78048010992999812181118129baa001133028337606ea4028c0a4c098dd5000802080219980380480400089981399bb037520046e98004cc01801800cdd598120019bae3022002302600230240013019375401e601060326ea8c028c064dd5180e180c9baa0011632323300100100722533301c00114c0103d87a800013232533301b3375e6018603a6ea80080144c018cc07c0092f5c02660080080026040004603c002603660306ea8020dd2a40006eb0c064c068c068c068c068c068c068008dd6180c000980c180c0011bac301600130123754600260246ea80108c054004528180098081baa00223013301400114984d958c94ccc030c0280044c8c8c8c94ccc04cc0580084c8c9263300b0022323300d3756602a0044646eb4c05c008dd7180a8009bae3013001300b003163756602800260280046024002601c6ea800c54ccc030c02400454ccc03cc038dd50018a4c2c2a66601860040022a66601e601c6ea800c5261616300c37540046e1d20043001007232533300930070011323232325333010301300213232498cc0200088c8cc028dd598090011191bad3014002375c60240026eb8c040004c02000c58dd598088009808801180780098059baa0021533300930060011323232323232323253330143017002132323232498cc0380108c8cc040dd5980c0011191bad301a002375c60300026eb8c058004c038014cc0300188c8cc038dd5980b0011191bad3018002375c602c0026eb8c050004c03001c58dd5980a800980a801180980098098011bab30110013011002300f001300b37540042c60126ea800488c8cc00400400c894ccc0340045261323300300330110023003300f00125333006300430073754002264646464a66601a602000426464931929998061805000899192999808980a00109924c64a66601e601a00226464a666028602e0042649318068008b180a80098089baa0021533300f300c00113232323232325333018301b002149858dd6980c800980c8011bad30170013017002375a602a00260226ea800858c03cdd50008b180900098071baa0031533300c30090011533300f300e37540062930b0b18061baa002300600316300e001300e002300c001300837540022c464a66600c600800226464a666016601c0042930b1bae300c001300837540042a66600c600600226464a666016601c0042930b1bae300c001300837540042c600c6ea8004dc3a40046e1d20005734aae7555cf2ab9f5740ae855d101",hash:"8fa9284f5889972d7260c10e940a2e1acb2114bdcea845da3d52de7d"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/Int"}},List$Pair$ByteArray_List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/List$Pair$ByteArray_Int"}},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
17
17
|
|
|
18
18
|
Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are
|
|
19
19
|
completely excluded from Plutus contexts. Thus, from an on-chain
|
|
@@ -55,7 +55,7 @@ var ie=Object.defineProperty;var re=(o,r,c)=>r in o?ie(o,r,{enumerable:!0,config
|
|
|
55
55
|
in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).`,anyOf:[{title:"Address",dataType:"constructor",index:0,fields:[{title:"payment_credential",$ref:"#/definitions/PaymentCredential"},{title:"stake_credential",$ref:"#/definitions/Option$StakeCredential"}]}]},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
56
56
|
|
|
57
57
|
Credentials are always one of two kinds: a direct public/private key
|
|
58
|
-
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"escrow/EscrowDatum":{title:"EscrowDatum",anyOf:[{title:"Initiation",dataType:"constructor",index:0,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"initiator_assets",$ref:"#/definitions/MValue"}]},{title:"ActiveEscrow",dataType:"constructor",index:1,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"initiator_assets",$ref:"#/definitions/MValue"},{title:"recipient",$ref:"#/definitions/cardano~1address~1Address"},{title:"recipient_assets",$ref:"#/definitions/MValue"}]}]},"escrow/EscrowRedeemer":{title:"EscrowRedeemer",anyOf:[{title:"RecipientDeposit",dataType:"constructor",index:0,fields:[{title:"recipient",$ref:"#/definitions/cardano~1address~1Address"},{title:"recipient_assets",$ref:"#/definitions/MValue"}]},{title:"CancelTrade",dataType:"constructor",index:1,fields:[]},{title:"CompleteTrade",dataType:"constructor",index:2,fields:[]}]}}};var rc=(o,r)=>{let{pubKeyHash:c,stakeCredentialHash:e}=o0(o);return ge([dc(c,e),ic(r)])},Se=(o,r,c)=>{let{pubKeyHash:e,stakeCredentialHash:a}=o0(r),[t,d]=o.fields;return Ie([t,d,dc(e,a),ic(c)])},Ce=(o,r)=>rc(o,r),tc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>{switch(this.version){case 3:return v0(ac.validators[0].compiledCode,[]);case 2:return v0(ec.validators[0].compiledCode,[]);default:return v0(cc.validators[0].compiledCode,[])}});i(this,"initiateEscrow",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx();return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(rc(a,c),"JSON").changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"cancelEscrow",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=H0(c.output.plutusData);if(d.constructor===1){let[s,n,b,l]=d.fields,f=y0(s,this.networkId),p=y0(b,this.networkId),u=n0.fromValue(n).toAssets(),h=n0.fromValue(l).toAssets();this.mesh.txOut(f,u).txOut(p,h)}return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(Te([])).txInScript(this.scriptCbor).requiredSignerHash(o0(a).pubKeyHash).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"recipientDeposit",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=H0(c.output.plutusData),n=Se(s,t,e),b=n0.fromValue(s.fields[1]).toAssets(),l=ke([...e,...b]);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().txInRedeemerValue(Ce(t,e),"JSON",we).txInScript(this.scriptCbor).txOut(this.scriptAddress,l).txOutInlineDatumValue(n,"JSON").changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"completeEscrow",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=H0(c.output.plutusData),[s,n,b,l]=d.fields,f=y0(s,this.networkId),p=y0(b,this.networkId),u=n0.fromValue(l).toAssets(),h=n0.fromValue(n).toAssets();return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(Ae([])).txInScript(this.scriptCbor).txOut(f,u).txOut(p,h).requiredSignerHash(o0(p).pubKeyHash).requiredSignerHash(o0(f).pubKeyHash).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{builtinByteString as Re,mConStr0 as $e,mConStr1 as Pe,outputReference as He,stringToHex as ve,txOutRef as Ve}from"@meshsdk/common";import{deserializeDatum as De,resolveScriptHash as sc}from"@meshsdk/core";import{applyParamsToScript as nc}from"@meshsdk/core-cst";var V0={preamble:{title:"meshjs/giftcard",description:"Aiken contracts for project 'meshjs/giftcard'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"oneshot.gift_card",redeemer:{title:"rdmr",schema:{$ref:"#/definitions/oneshot~1Action"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/aiken~1transaction~1OutputReference"}}],compiledCode:"5901f5010000323232323232322322232323225333009323232533300c3007300d3754002264646464a666026602c00426464a666024601a60266ea803854ccc048c034c04cdd5191980080080311299980b8008a60103d87a80001323253330163375e603660306ea800804c4cdd2a40006603400497ae0133004004001301b002301900115333012300c00113371e00402029405854ccc048cdc3800a4002266e3c0080405281bad3013002375c60220022c602800264a66601e601260206ea800452f5bded8c026eacc050c044dd500099191980080099198008009bab3016301730173017301700522533301500114bd6f7b630099191919299980b19b91488100002153330163371e9101000021003100513301a337606ea4008dd3000998030030019bab3017003375c602a0046032004602e00244a666028002298103d87a800013232323253330153372200e0042a66602a66e3c01c0084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd7180998081baa00337586024002601c6ea800858c040c044008c03c004c02cdd50008a4c26cac64a66601060060022a66601660146ea8010526161533300830020011533300b300a37540082930b0b18041baa003370e90011b8748000dd7000ab9a5573aaae7955cfaba05742ae89",hash:"0c0d17d9095fe6b07a2727403e2c6f2dff8042ed7c300cb67a2577a2"},{title:"oneshot.redeem",datum:{title:"_d",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_r",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"5901320100003232323232323223223222253330083232533300d3010002132533300b3370e6eb4c034009200113371e0020122940dd718058008b180700099299980499b8748008c028dd50008a5eb7bdb1804dd5980718059baa001323300100132330010013756601e602060206020602060186ea8c03cc030dd50019129998070008a5eb7bdb1804c8c8c8c94ccc03ccdc8a45000021533300f3371e91010000210031005133013337606ea4008dd3000998030030019bab3010003375c601c0046024004602000244a66601a002298103d87a8000132323232533300e337220140042a66601c66e3c0280084cdd2a4000660246e980052f5c02980103d87a80001330060060033756601e0066eb8c034008c044008c03c00452613656375c0026eb80055cd2ab9d5573caae7d5d02ba157441",hash:"39faa048196bb6b30f50815475e9d16b22e7a0ef6de5935b408ca617"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"aiken/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/aiken~1transaction~1TransactionId"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"aiken/transaction/TransactionId":{title:"TransactionId",description:"A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.",anyOf:[{title:"TransactionId",dataType:"constructor",index:0,fields:[{title:"hash",$ref:"#/definitions/ByteArray"}]}]},"oneshot/Action":{title:"Action",anyOf:[{title:"Mint",dataType:"constructor",index:0,fields:[]},{title:"Burn",dataType:"constructor",index:1,fields:[]}]}}};var D0={preamble:{title:"meshjs/giftcard",description:"Aiken contracts for project 'meshjs/giftcard'",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"oneshot.gift_card.mint",redeemer:{title:"rdmr",schema:{$ref:"#/definitions/oneshot~1Action"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}}],compiledCode:"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11",hash:"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195"},{title:"oneshot.gift_card.else",parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}}],compiledCode:"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11",hash:"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195"},{title:"oneshot.redeem.spend",datum:{title:"_d",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_r",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101",hash:"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f"},{title:"oneshot.redeem.else",parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101",hash:"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"oneshot/Action":{title:"Action",anyOf:[{title:"Mint",dataType:"constructor",index:0,fields:[]},{title:"Burn",dataType:"constructor",index:1,fields:[]}]}}};var oc=class extends _{constructor(c,e,a){super(c);i(this,"tokenNameHex","");i(this,"paramUtxo",{outputIndex:0,txHash:""});i(this,"giftCardCbor",(c,e,a)=>{let t,d;return this.version===2?(t=D0.validators[0].compiledCode,d=He(e,a)):(t=V0.validators[0].compiledCode,d=Ve(e,a)),nc(t,[Re(c),d],"JSON")});i(this,"redeemCbor",(c,e)=>{let a;return this.version===2?a=D0.validators[2].compiledCode:a=V0.validators[1].compiledCode,nc(a,[c,e])});i(this,"createGiftCard",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=ve(c),n=a[0];if(n===void 0)throw new Error("No UTXOs available");let b=a.slice(1),l=this.giftCardCbor(s,n.input.txHash,n.input.outputIndex),f=sc(l,this.languageVersion),p={code:this.redeemCbor(s,f),version:this.languageVersion},u=this.getScriptAddress(p.code);return await this.mesh.txIn(n.input.txHash,n.input.outputIndex,n.output.amount,n.output.address).mintPlutusScript(this.languageVersion).mint("1",f,s).mintingScript(l).mintRedeemerValue($e([])).txOut(u,[...e,{unit:f+s,quantity:"1"}]).txOutInlineDatumValue([n.input.txHash,n.input.outputIndex,s]).changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(b).complete(),this.tokenNameHex=s,this.paramUtxo=n.input,this.mesh.txHex});i(this,"redeemGiftCard",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=De(c.output.plutusData).list,s=d[0].bytes,n=d[1].int,b=d[2].bytes,l=this.giftCardCbor(b,s,n),f=sc(l,this.languageVersion),p=this.redeemCbor(b,f);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue("").txInScript(p).mintPlutusScript(this.languageVersion).mint("-1",f,b).mintingScript(l).mintRedeemerValue(Pe([])).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c));e&&(this.tokenNameHex=e),a&&(this.paramUtxo=a)}};import{deserializeAddress as fc,mConStr0 as B0,stringToHex as Ne}from"@meshsdk/core";import{applyParamsToScript as pc}from"@meshsdk/core-cst";var bc={preamble:{title:"meshjs/aiken",description:"Aiken on MeshJS",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"hello_world.hello_world",datum:{title:"datum",schema:{$ref:"#/definitions/hello_world~1Datum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/hello_world~1Redeemer"}},compiledCode:"58e901000032323232323223223225333006323253330083371e6eb8c008c028dd5002a4410d48656c6c6f2c20576f726c642100100114a06644646600200200644a66601c00229404c94ccc030cdc79bae301000200414a226600600600260200026eb0c02cc030c030c030c030c030c030c030c030c024dd5180098049baa002375c600260126ea80188c02c0045261365653330043370e900018029baa001132325333009300b002149858dd7180480098031baa0011653330023370e900018019baa0011323253330073009002149858dd7180380098021baa001165734aae7555cf2ab9f5742ae881",hash:"c1fe430f19ac248a8a7ea47db106002c4327e542c3fdc60ad6481103"}],definitions:{ByteArray:{dataType:"bytes"},"hello_world/Datum":{title:"Datum",anyOf:[{title:"Datum",dataType:"constructor",index:0,fields:[{title:"owner",$ref:"#/definitions/ByteArray"}]}]},"hello_world/Redeemer":{title:"Redeemer",anyOf:[{title:"Redeemer",dataType:"constructor",index:0,fields:[{title:"msg",$ref:"#/definitions/ByteArray"}]}]}}};var lc={preamble:{title:"meshjs/aiken",description:"Aiken on MeshJS",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"hello_world.hello_world.spend",datum:{title:"datum_opt",schema:{$ref:"#/definitions/hello_world~1Datum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/hello_world~1Redeemer"}},compiledCode:"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",hash:"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe"},{title:"hello_world.hello_world.else",compiledCode:"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",hash:"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe"}],definitions:{ByteArray:{dataType:"bytes"},VerificationKeyHash:{title:"VerificationKeyHash",dataType:"bytes"},"hello_world/Datum":{title:"Datum",anyOf:[{title:"Datum",dataType:"constructor",index:0,fields:[{title:"owner",$ref:"#/definitions/VerificationKeyHash"}]}]},"hello_world/Redeemer":{title:"Redeemer",anyOf:[{title:"Redeemer",dataType:"constructor",index:0,fields:[{title:"msg",$ref:"#/definitions/ByteArray"}]}]}}};var uc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?pc(lc.validators[0].compiledCode,[]):pc(bc.validators[0].compiledCode,[]));i(this,"lockAsset",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx(),t=fc(a).pubKeyHash;return await this.mesh.txOut(this.scriptAddress,c).txOutDatumHashValue(B0([t])).changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"unlockAsset",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=fc(t).pubKeyHash;return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).txInScript(this.scriptCbor).txInRedeemerValue(B0([Ne(e)])).txInDatumValue(B0([s])).requiredSignerHash(s).changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{conStr0 as Ee,currencySymbol as Ke,integer as F0,mConStr0 as Le,mConStr1 as hc,parseAssetUnit as We,pubKeyAddress as E0,tokenName as qe}from"@meshsdk/common";import{deserializeAddress as x0,deserializeDatum as je,serializeAddressObj as ze}from"@meshsdk/core";import{applyParamsToScript as mc}from"@meshsdk/core-cst";var U0={preamble:{title:"meshjs/marketplace",description:"Aiken contracts for project 'meshjs/marketplace'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"marketplace.marketplace",datum:{title:"datum",schema:{$ref:"#/definitions/marketplace~1types~1MarketplaceDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/marketplace~1types~1MarketplaceRedeemer"}},parameters:[{title:"owner",schema:{$ref:"#/definitions/aiken~1transaction~1credential~1Address"}},{title:"fee_percentage_basis_point",schema:{$ref:"#/definitions/Int"}}],compiledCode:"59082f01000032323232323232223223232322322533300b3232533300d3007300e375400226464a64666020601660226ea80204c94ccc044c030c048dd500089919191919191919299980c99299980e8008a501533301d302000114a22940cc88c8cc00400400c894ccc08000452f5c026464a66603e66ebcc044c084dd5180a18109baa00200513302300233004004001133004004001302400230220013758601660366ea8c02cc06cdd50079805980d9baa300e301b37540102a6660320022004294052819801998011bac3004301a3754601460346ea803805cc018cdc199b82375a601a60346ea805005520a09c0133002330013758600660326ea8c024c064dd50069804980c9baa0133005337006eb4c030c064dd50099998021bab300c30193754601860326ea801922010048810022323300100100322533301d00114bd6f7b63009991299980e19baf300e301e375400400a2646660020020046eacc048c07cdd50019112999811001080089919980200218130019991191980080080291299981380089981419bb037520086e9800d2f5bded8c0264646464a66605066e400200084cc0b0cdd81ba9008374c00e00a2a66605066e3c0200084c94ccc0a4c090c0a8dd500089981699bb03752012605c60566ea80040104010c94ccc0a54ccc0b00045288a5014c0103d87a80001301a3302d374c00297ae032333001001008002222533302e0021001132333004004303200333223233001001005225333033001133034337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0d0cdc800400109981c19bb037520106ea001c01454ccc0d0cdc7804001099299981a9818181b1baa001133039337606ea4024c0e8c0dcdd5000802080219299981a98180008a60103d87a80001302633039375000297ae03370000e00226607066ec0dd48011ba800133006006003375a606a0066eb8c0cc008c0dc008c0d4004dd718168009bad302e001303000213302c337606ea4008dd3000998030030019bab3029003375c604e004605600460520026eb8c084004dd5981100098120010800980f800998010011810000911919800800991980080080191299980e8008a5eb804c8ccc888c8cc00400400c894ccc08c004400c4c8cc094dd3998129ba90063302530220013302530230014bd7019801801981380118128009bae301c0013756603a002660060066042004603e00244a66603800229444c94ccc068c8cdc49bad3007001333008006375c601a0026eb8c040004dd6180f8010998018018008a50301f0012301a301b301b0012223253330173011301837540022900009bad301c3019375400264a66602e602260306ea8004530103d87a8000132330010013756603a60346ea8008894ccc070004530103d87a8000132323232533301d337220100042a66603a66e3c0200084c038cc084dd4000a5eb80530103d87a8000133006006003375a603c0066eb8c070008c080008c078004c8cc004004010894ccc06c0045300103d87a8000132323232533301c337220100042a66603866e3c0200084c034cc080dd3000a5eb80530103d87a80001330060060033756603a0066eb8c06c008c07c008c07400494ccc04cc03800452f5bded8c0264646600200297adef6c6022533301900113301a337609801014000374c00697adef6c60132323232533301a3372091010000213301e337609801014000374c00e00a2a66603466e3d2210000213301e337609801014000374c00e00626603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc0040052f5bded8c044a66603000226603266ec13001014000375000697adef6c6013232323253330193372091010000213301d337609801014000375000e00a2a66603266e3d2210000213301d337609801014000375000e00626603a66ec0dd48011ba800133006006003375a60340066eb8c060008c070008c068004c058c04cdd50008b19198008009bac300330133754600660266ea801c894ccc054004530103d87a80001323253330143375e600c602c6ea800801c4c014cc0600092f5c02660080080026032004602e002264a666022601860246ea80044cc88c8cc00400400c894ccc060004528099299980b19b8f375c603600400829444cc00c00c004c06c004dd6180b180b980b980b980b980b980b980b980b98099baa30033013375400e6eb8c058c04cdd50008b192999808980618091baa001130023301530163013375400297ae014c0103d87a8000300230123754600460246ea8030dd2a4000460280026024601e6ea8004528180098071baa00223011301200114984d958c94ccc028c01400454ccc034c030dd50010a4c2c2a66601460080022a66601a60186ea80085261616300a375400264a666010600660126ea80104c8c8c8c8c8c8c8c94ccc04cc0580084c9265333010300b3011375400e264646464a66602e6034004264649319299980b180880089919299980d980f00109924c64a666032602800226464a66603c604200426493180a0008b180f800980d9baa002153330193013001132323232323253330223025002149858dd6981180098118011bad30210013021002375a603e00260366ea800858c064dd50008b180e000980c1baa00315333016301000115333019301837540062930b0b180b1baa002300d003163018001301800230160013012375400e2c2c6eb8c050004c050008dd7180900098090011bad30100013010002300e001300a37540082c464a666012600800226464a66601c60220042930b1bae300f001300b37540042a666012600600226464a66601c60220042930b1bae300f001300b37540042c60126ea8004dc3a40046e1d2000375a002ae6955ceaab9e5573eae815d0aba21",hash:"96dbc09c69d812e157d42967587c459b60f5dd21b1902312045586c4"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
58
|
+
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"escrow/EscrowDatum":{title:"EscrowDatum",anyOf:[{title:"Initiation",dataType:"constructor",index:0,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"initiator_assets",$ref:"#/definitions/MValue"}]},{title:"ActiveEscrow",dataType:"constructor",index:1,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"initiator_assets",$ref:"#/definitions/MValue"},{title:"recipient",$ref:"#/definitions/cardano~1address~1Address"},{title:"recipient_assets",$ref:"#/definitions/MValue"}]}]},"escrow/EscrowRedeemer":{title:"EscrowRedeemer",anyOf:[{title:"RecipientDeposit",dataType:"constructor",index:0,fields:[{title:"recipient",$ref:"#/definitions/cardano~1address~1Address"},{title:"recipient_assets",$ref:"#/definitions/MValue"}]},{title:"CancelTrade",dataType:"constructor",index:1,fields:[]},{title:"CompleteTrade",dataType:"constructor",index:2,fields:[]}]}}};var rc=(o,r)=>{let{pubKeyHash:c,stakeCredentialHash:e}=o0(o);return ge([dc(c,e),ic(r)])},Se=(o,r,c)=>{let{pubKeyHash:e,stakeCredentialHash:a}=o0(r),[t,d]=o.fields;return Ie([t,d,dc(e,a),ic(c)])},Ce=(o,r)=>rc(o,r),tc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>{switch(this.version){case 3:return H0(ac.validators[0].compiledCode,[]);case 2:return H0(ec.validators[0].compiledCode,[]);default:return H0(cc.validators[0].compiledCode,[])}});i(this,"initiateEscrow",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx();return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(rc(a,c),"JSON").changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"cancelEscrow",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=v0(c.output.plutusData);if(d.constructor===1){let[s,n,b,l]=d.fields,f=y0(s,this.networkId),p=y0(b,this.networkId),u=n0.fromValue(n).toAssets(),h=n0.fromValue(l).toAssets();this.mesh.txOut(f,u).txOut(p,h)}return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(Te([])).txInScript(this.scriptCbor).requiredSignerHash(o0(a).pubKeyHash).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"recipientDeposit",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=v0(c.output.plutusData),n=Se(s,t,e),b=n0.fromValue(s.fields[1]).toAssets(),l=ke([...e,...b]);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().txInRedeemerValue(Ce(t,e),"JSON",we).txInScript(this.scriptCbor).txOut(this.scriptAddress,l).txOutInlineDatumValue(n,"JSON").changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"completeEscrow",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=v0(c.output.plutusData),[s,n,b,l]=d.fields,f=y0(s,this.networkId),p=y0(b,this.networkId),u=n0.fromValue(l).toAssets(),h=n0.fromValue(n).toAssets();return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(Ae([])).txInScript(this.scriptCbor).txOut(f,u).txOut(p,h).requiredSignerHash(o0(p).pubKeyHash).requiredSignerHash(o0(f).pubKeyHash).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{builtinByteString as Re,mConStr0 as $e,mConStr1 as Pe,outputReference as ve,stringToHex as He,txOutRef as Ve}from"@meshsdk/common";import{deserializeDatum as De,resolveScriptHash as sc}from"@meshsdk/core";import{applyParamsToScript as nc}from"@meshsdk/core-cst";var V0={preamble:{title:"meshjs/giftcard",description:"Aiken contracts for project 'meshjs/giftcard'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"oneshot.gift_card",redeemer:{title:"rdmr",schema:{$ref:"#/definitions/oneshot~1Action"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/aiken~1transaction~1OutputReference"}}],compiledCode:"5901f5010000323232323232322322232323225333009323232533300c3007300d3754002264646464a666026602c00426464a666024601a60266ea803854ccc048c034c04cdd5191980080080311299980b8008a60103d87a80001323253330163375e603660306ea800804c4cdd2a40006603400497ae0133004004001301b002301900115333012300c00113371e00402029405854ccc048cdc3800a4002266e3c0080405281bad3013002375c60220022c602800264a66601e601260206ea800452f5bded8c026eacc050c044dd500099191980080099198008009bab3016301730173017301700522533301500114bd6f7b630099191919299980b19b91488100002153330163371e9101000021003100513301a337606ea4008dd3000998030030019bab3017003375c602a0046032004602e00244a666028002298103d87a800013232323253330153372200e0042a66602a66e3c01c0084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd7180998081baa00337586024002601c6ea800858c040c044008c03c004c02cdd50008a4c26cac64a66601060060022a66601660146ea8010526161533300830020011533300b300a37540082930b0b18041baa003370e90011b8748000dd7000ab9a5573aaae7955cfaba05742ae89",hash:"0c0d17d9095fe6b07a2727403e2c6f2dff8042ed7c300cb67a2577a2"},{title:"oneshot.redeem",datum:{title:"_d",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_r",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"5901320100003232323232323223223222253330083232533300d3010002132533300b3370e6eb4c034009200113371e0020122940dd718058008b180700099299980499b8748008c028dd50008a5eb7bdb1804dd5980718059baa001323300100132330010013756601e602060206020602060186ea8c03cc030dd50019129998070008a5eb7bdb1804c8c8c8c94ccc03ccdc8a45000021533300f3371e91010000210031005133013337606ea4008dd3000998030030019bab3010003375c601c0046024004602000244a66601a002298103d87a8000132323232533300e337220140042a66601c66e3c0280084cdd2a4000660246e980052f5c02980103d87a80001330060060033756601e0066eb8c034008c044008c03c00452613656375c0026eb80055cd2ab9d5573caae7d5d02ba157441",hash:"39faa048196bb6b30f50815475e9d16b22e7a0ef6de5935b408ca617"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"aiken/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/aiken~1transaction~1TransactionId"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"aiken/transaction/TransactionId":{title:"TransactionId",description:"A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.",anyOf:[{title:"TransactionId",dataType:"constructor",index:0,fields:[{title:"hash",$ref:"#/definitions/ByteArray"}]}]},"oneshot/Action":{title:"Action",anyOf:[{title:"Mint",dataType:"constructor",index:0,fields:[]},{title:"Burn",dataType:"constructor",index:1,fields:[]}]}}};var D0={preamble:{title:"meshjs/giftcard",description:"Aiken contracts for project 'meshjs/giftcard'",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"oneshot.gift_card.mint",redeemer:{title:"rdmr",schema:{$ref:"#/definitions/oneshot~1Action"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}}],compiledCode:"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11",hash:"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195"},{title:"oneshot.gift_card.else",parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}}],compiledCode:"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11",hash:"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195"},{title:"oneshot.redeem.spend",datum:{title:"_d",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_r",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101",hash:"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f"},{title:"oneshot.redeem.else",parameters:[{title:"token_name",schema:{$ref:"#/definitions/ByteArray"}},{title:"policy_id",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101",hash:"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"oneshot/Action":{title:"Action",anyOf:[{title:"Mint",dataType:"constructor",index:0,fields:[]},{title:"Burn",dataType:"constructor",index:1,fields:[]}]}}};var oc=class extends _{constructor(c,e,a){super(c);i(this,"tokenNameHex","");i(this,"paramUtxo",{outputIndex:0,txHash:""});i(this,"giftCardCbor",(c,e,a)=>{let t,d;return this.version===2?(t=D0.validators[0].compiledCode,d=ve(e,a)):(t=V0.validators[0].compiledCode,d=Ve(e,a)),nc(t,[Re(c),d],"JSON")});i(this,"redeemCbor",(c,e)=>{let a;return this.version===2?a=D0.validators[2].compiledCode:a=V0.validators[1].compiledCode,nc(a,[c,e])});i(this,"createGiftCard",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=He(c),n=a[0];if(n===void 0)throw new Error("No UTXOs available");let b=a.slice(1),l=this.giftCardCbor(s,n.input.txHash,n.input.outputIndex),f=sc(l,this.languageVersion),p={code:this.redeemCbor(s,f),version:this.languageVersion},u=this.getScriptAddress(p.code);return await this.mesh.txIn(n.input.txHash,n.input.outputIndex,n.output.amount,n.output.address).mintPlutusScript(this.languageVersion).mint("1",f,s).mintingScript(l).mintRedeemerValue($e([])).txOut(u,[...e,{unit:f+s,quantity:"1"}]).txOutInlineDatumValue([n.input.txHash,n.input.outputIndex,s]).changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(b).complete(),this.tokenNameHex=s,this.paramUtxo=n.input,this.mesh.txHex});i(this,"redeemGiftCard",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=De(c.output.plutusData).list,s=d[0].bytes,n=d[1].int,b=d[2].bytes,l=this.giftCardCbor(b,s,n),f=sc(l,this.languageVersion),p=this.redeemCbor(b,f);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue("").txInScript(p).mintPlutusScript(this.languageVersion).mint("-1",f,b).mintingScript(l).mintRedeemerValue(Pe([])).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c));e&&(this.tokenNameHex=e),a&&(this.paramUtxo=a)}};import{deserializeAddress as fc,mConStr0 as B0,stringToHex as Ne}from"@meshsdk/core";import{applyParamsToScript as pc}from"@meshsdk/core-cst";var bc={preamble:{title:"meshjs/aiken",description:"Aiken on MeshJS",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"hello_world.hello_world",datum:{title:"datum",schema:{$ref:"#/definitions/hello_world~1Datum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/hello_world~1Redeemer"}},compiledCode:"58e901000032323232323223223225333006323253330083371e6eb8c008c028dd5002a4410d48656c6c6f2c20576f726c642100100114a06644646600200200644a66601c00229404c94ccc030cdc79bae301000200414a226600600600260200026eb0c02cc030c030c030c030c030c030c030c030c024dd5180098049baa002375c600260126ea80188c02c0045261365653330043370e900018029baa001132325333009300b002149858dd7180480098031baa0011653330023370e900018019baa0011323253330073009002149858dd7180380098021baa001165734aae7555cf2ab9f5742ae881",hash:"c1fe430f19ac248a8a7ea47db106002c4327e542c3fdc60ad6481103"}],definitions:{ByteArray:{dataType:"bytes"},"hello_world/Datum":{title:"Datum",anyOf:[{title:"Datum",dataType:"constructor",index:0,fields:[{title:"owner",$ref:"#/definitions/ByteArray"}]}]},"hello_world/Redeemer":{title:"Redeemer",anyOf:[{title:"Redeemer",dataType:"constructor",index:0,fields:[{title:"msg",$ref:"#/definitions/ByteArray"}]}]}}};var lc={preamble:{title:"meshjs/aiken",description:"Aiken on MeshJS",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"hello_world.hello_world.spend",datum:{title:"datum_opt",schema:{$ref:"#/definitions/hello_world~1Datum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/hello_world~1Redeemer"}},compiledCode:"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",hash:"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe"},{title:"hello_world.hello_world.else",compiledCode:"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",hash:"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe"}],definitions:{ByteArray:{dataType:"bytes"},VerificationKeyHash:{title:"VerificationKeyHash",dataType:"bytes"},"hello_world/Datum":{title:"Datum",anyOf:[{title:"Datum",dataType:"constructor",index:0,fields:[{title:"owner",$ref:"#/definitions/VerificationKeyHash"}]}]},"hello_world/Redeemer":{title:"Redeemer",anyOf:[{title:"Redeemer",dataType:"constructor",index:0,fields:[{title:"msg",$ref:"#/definitions/ByteArray"}]}]}}};var uc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?pc(lc.validators[0].compiledCode,[]):pc(bc.validators[0].compiledCode,[]));i(this,"lockAsset",async c=>{let{utxos:e,walletAddress:a}=await this.getWalletInfoForTx(),t=fc(a).pubKeyHash;return await this.mesh.txOut(this.scriptAddress,c).txOutDatumHashValue(B0([t])).changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"unlockAsset",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),s=fc(t).pubKeyHash;return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).txInScript(this.scriptCbor).txInRedeemerValue(B0([Ne(e)])).txInDatumValue(B0([s])).requiredSignerHash(s).changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{conStr0 as Ee,currencySymbol as Ke,integer as F0,mConStr0 as Le,mConStr1 as hc,parseAssetUnit as We,pubKeyAddress as E0,tokenName as qe}from"@meshsdk/common";import{deserializeAddress as x0,deserializeDatum as je,serializeAddressObj as ze}from"@meshsdk/core";import{applyParamsToScript as mc}from"@meshsdk/core-cst";var U0={preamble:{title:"meshjs/marketplace",description:"Aiken contracts for project 'meshjs/marketplace'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"marketplace.marketplace",datum:{title:"datum",schema:{$ref:"#/definitions/marketplace~1types~1MarketplaceDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/marketplace~1types~1MarketplaceRedeemer"}},parameters:[{title:"owner",schema:{$ref:"#/definitions/aiken~1transaction~1credential~1Address"}},{title:"fee_percentage_basis_point",schema:{$ref:"#/definitions/Int"}}],compiledCode:"59082f01000032323232323232223223232322322533300b3232533300d3007300e375400226464a64666020601660226ea80204c94ccc044c030c048dd500089919191919191919299980c99299980e8008a501533301d302000114a22940cc88c8cc00400400c894ccc08000452f5c026464a66603e66ebcc044c084dd5180a18109baa00200513302300233004004001133004004001302400230220013758601660366ea8c02cc06cdd50079805980d9baa300e301b37540102a6660320022004294052819801998011bac3004301a3754601460346ea803805cc018cdc199b82375a601a60346ea805005520a09c0133002330013758600660326ea8c024c064dd50069804980c9baa0133005337006eb4c030c064dd50099998021bab300c30193754601860326ea801922010048810022323300100100322533301d00114bd6f7b63009991299980e19baf300e301e375400400a2646660020020046eacc048c07cdd50019112999811001080089919980200218130019991191980080080291299981380089981419bb037520086e9800d2f5bded8c0264646464a66605066e400200084cc0b0cdd81ba9008374c00e00a2a66605066e3c0200084c94ccc0a4c090c0a8dd500089981699bb03752012605c60566ea80040104010c94ccc0a54ccc0b00045288a5014c0103d87a80001301a3302d374c00297ae032333001001008002222533302e0021001132333004004303200333223233001001005225333033001133034337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0d0cdc800400109981c19bb037520106ea001c01454ccc0d0cdc7804001099299981a9818181b1baa001133039337606ea4024c0e8c0dcdd5000802080219299981a98180008a60103d87a80001302633039375000297ae03370000e00226607066ec0dd48011ba800133006006003375a606a0066eb8c0cc008c0dc008c0d4004dd718168009bad302e001303000213302c337606ea4008dd3000998030030019bab3029003375c604e004605600460520026eb8c084004dd5981100098120010800980f800998010011810000911919800800991980080080191299980e8008a5eb804c8ccc888c8cc00400400c894ccc08c004400c4c8cc094dd3998129ba90063302530220013302530230014bd7019801801981380118128009bae301c0013756603a002660060066042004603e00244a66603800229444c94ccc068c8cdc49bad3007001333008006375c601a0026eb8c040004dd6180f8010998018018008a50301f0012301a301b301b0012223253330173011301837540022900009bad301c3019375400264a66602e602260306ea8004530103d87a8000132330010013756603a60346ea8008894ccc070004530103d87a8000132323232533301d337220100042a66603a66e3c0200084c038cc084dd4000a5eb80530103d87a8000133006006003375a603c0066eb8c070008c080008c078004c8cc004004010894ccc06c0045300103d87a8000132323232533301c337220100042a66603866e3c0200084c034cc080dd3000a5eb80530103d87a80001330060060033756603a0066eb8c06c008c07c008c07400494ccc04cc03800452f5bded8c0264646600200297adef6c6022533301900113301a337609801014000374c00697adef6c60132323232533301a3372091010000213301e337609801014000374c00e00a2a66603466e3d2210000213301e337609801014000374c00e00626603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc0040052f5bded8c044a66603000226603266ec13001014000375000697adef6c6013232323253330193372091010000213301d337609801014000375000e00a2a66603266e3d2210000213301d337609801014000375000e00626603a66ec0dd48011ba800133006006003375a60340066eb8c060008c070008c068004c058c04cdd50008b19198008009bac300330133754600660266ea801c894ccc054004530103d87a80001323253330143375e600c602c6ea800801c4c014cc0600092f5c02660080080026032004602e002264a666022601860246ea80044cc88c8cc00400400c894ccc060004528099299980b19b8f375c603600400829444cc00c00c004c06c004dd6180b180b980b980b980b980b980b980b980b98099baa30033013375400e6eb8c058c04cdd50008b192999808980618091baa001130023301530163013375400297ae014c0103d87a8000300230123754600460246ea8030dd2a4000460280026024601e6ea8004528180098071baa00223011301200114984d958c94ccc028c01400454ccc034c030dd50010a4c2c2a66601460080022a66601a60186ea80085261616300a375400264a666010600660126ea80104c8c8c8c8c8c8c8c94ccc04cc0580084c9265333010300b3011375400e264646464a66602e6034004264649319299980b180880089919299980d980f00109924c64a666032602800226464a66603c604200426493180a0008b180f800980d9baa002153330193013001132323232323253330223025002149858dd6981180098118011bad30210013021002375a603e00260366ea800858c064dd50008b180e000980c1baa00315333016301000115333019301837540062930b0b180b1baa002300d003163018001301800230160013012375400e2c2c6eb8c050004c050008dd7180900098090011bad30100013010002300e001300a37540082c464a666012600800226464a66601c60220042930b1bae300f001300b37540042a666012600600226464a66601c60220042930b1bae300f001300b37540042c60126ea8004dc3a40046e1d2000375a002ae6955ceaab9e5573eae815d0aba21",hash:"96dbc09c69d812e157d42967587c459b60f5dd21b1902312045586c4"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
59
59
|
|
|
60
60
|
Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are
|
|
61
61
|
completely excluded from Plutus contexts. Thus, from an on-chain
|
|
@@ -97,7 +97,7 @@ var ie=Object.defineProperty;var re=(o,r,c)=>r in o?ie(o,r,{enumerable:!0,config
|
|
|
97
97
|
in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).`,anyOf:[{title:"Address",dataType:"constructor",index:0,fields:[{title:"payment_credential",$ref:"#/definitions/PaymentCredential"},{title:"stake_credential",$ref:"#/definitions/Option$StakeCredential"}]}]},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
98
98
|
|
|
99
99
|
Credentials are always one of two kinds: a direct public/private key
|
|
100
|
-
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"oracle/OracleDatum":{title:"OracleDatum",anyOf:[{title:"OracleDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"lovelace_price",$ref:"#/definitions/Int"},{title:"fee_address",$ref:"#/definitions/cardano~1address~1Address"}]}]},"oracle/OracleRedeemer":{title:"OracleRedeemer",anyOf:[{title:"MintPlutusNFT",dataType:"constructor",index:0,fields:[]},{title:"StopOracle",dataType:"constructor",index:1,fields:[]}]},"oracle_nft/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]},"plutus_nft/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]}}};var _c=class extends _{constructor(c,e){super(c);i(this,"collectionName");i(this,"paramUtxo",{outputIndex:0,txHash:""});i(this,"oracleAddress");i(this,"getOracleCbor",()=>Cc(a0.validators[0].compiledCode));i(this,"getOracleNFTCbor",()=>L0(a0.validators[2].compiledCode,[kc(this.paramUtxo.txHash,this.paramUtxo.outputIndex)]));i(this,"getNFTCbor",()=>{let c=I0(this.getOracleNFTCbor(),"V3");return L0(a0.validators[4].compiledCode,[Sc(this.collectionName),c])});i(this,"setupOracle",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx();if(e?.length<=0)throw new Error("No UTxOs found");let d=e[0],s=a0.validators[2].compiledCode,n=kc(d.input.txHash,d.input.outputIndex),b=L0(s,[n]),l=I0(b,"V3"),f="",{pubKeyHash:p,stakeCredentialHash:u}=e1(t),h=await this.mesh.txIn(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).mintPlutusScriptV3().mint("1",l,f).mintingScript(b).mintRedeemerValue(g0([])).txOut(this.oracleAddress,[{unit:l,quantity:"1"}]).txOutInlineDatumValue(g0([0,c,c1(p,u)])).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).changeAddress(t).selectUtxosFrom(e).complete();return this.paramUtxo=d.input,{tx:h,paramUtxo:d.input}});i(this,"mintPlutusNFT",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx();if(e?.length<=0)throw new Error("No UTxOs found");let{nftIndex:d,policyId:s,lovelacePrice:n,oracleUtxo:b,oracleNftPolicyId:l,feeCollectorAddress:f,feeCollectorAddressObj:p}=await this.getOracleData(),u=`${this.collectionName} (${d})`,h=Sc(u),w=Ze([Ac(d+1),Ac(n),p]),S=this.mesh.spendingPlutusScriptV3().txIn(b.input.txHash,b.input.outputIndex,b.output.amount,b.output.address).txInRedeemerValue(g0([])).txInScript(this.getOracleCbor()).txInInlineDatumPresent().txOut(this.oracleAddress,[{unit:l,quantity:"1"}]).txOutInlineDatumValue(w,"JSON").mintPlutusScriptV3().mint("1",s,h).mintingScript(this.getNFTCbor());if(c){let C={[s]:{[u]:{...c}}};S.metadataValue(721,C)}return S.mintRedeemerValue(g0([])).txOut(f,[{unit:"lovelace",quantity:n.toString()}]).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).changeAddress(t).selectUtxosFrom(e),await S.complete()});i(this,"getOracleData",async()=>{let c=I0(this.getOracleNFTCbor(),"V3"),e=(await this.getAddressUtxosWithToken(this.oracleAddress,c))[0],a=d1(e.output.plutusData),t=a.fields[0].int,d=a.fields[1].int,s=a.fields[2],n=a1(s,this.networkId),b=I0(this.getNFTCbor(),"V3");return{nftIndex:t,policyId:b,lovelacePrice:d,oracleUtxo:e,oracleNftPolicyId:c,feeCollectorAddress:n,feeCollectorAddressObj:s}});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c));this.collectionName=e.collectionName,e.paramUtxo&&(this.paramUtxo=e.paramUtxo),this.oracleAddress=t1({code:Cc(a0.validators[0].compiledCode),version:"V3"},c.stakeCredential,c.networkId).address}};import{conStr0 as s1,mConStr0 as n1,mConStr1 as o1,MeshValue as b1,pubKeyAddress as l1,value as $c}from"@meshsdk/common";import{deserializeAddress as Pc,deserializeDatum as Hc,serializeAddressObj as vc}from"@meshsdk/core";import{applyParamsToScript as Vc}from"@meshsdk/core-cst";var Oc={preamble:{title:"meshjs/swap",description:"Aiken contracts for project 'meshjs/swap'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"swap.swap",datum:{title:"datum",schema:{$ref:"#/definitions/swap~1SwapDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/swap~1SwapRedeemer"}},compiledCode:"590827010000323232323232322323232232253330083232533300a3007300b375400226464a6466601a6014601c6ea80204c94ccc038c030c03cdd5000899191919191919191919299980c299980d8048a501533301b301e00914a2294054ccc06000440085280a50330043330030084bd6f7b63011299980c99baf300e301b3754602260366ea800802c4cc010004dd59808980d9baa3011301b37540042002600c6eacc03cc064dd500b19801999119980200125eb7bdb180894ccc068cdd79807980e1baa0020031330050013756602460386ea80084004dd61802180c1baa300b3018375401e601660306ea8054c014dd59802180c1baa0152232333001001003002222533301d00210011323330040043021003333300b002375c60380026eacc074004888c94ccc07d4ccc0880045288a5014c103d87a80001301333023374c00297ae0323330010010030022225333024002100113233300400430280033322323300100100522533302900113302a337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0a8cdc800400109981719bb037520106ea001c01454ccc0a8cdc78040010992999815981498161baa00113302f337606ea4024c0c0c0b4dd5000802080219299981598148008a60103d87a80001301f3302f375000297ae03370000e00226605c66ec0dd48011ba800133006006003375a60560066eb8c0a4008c0b4008c0ac004dd718118009bad30240013026002301f002222323300100100422533301c0011004133003301e00133002002301f001223233001001323300100100322533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004894ccc068004528899299980c1919b89375a600e002664464a6660386032603a6ea8004520001375a6042603c6ea8004c94ccc070c064c074dd50008a6103d87a80001323300100137566044603e6ea8008894ccc084004530103d87a80001323232325333022337220100042a66604466e3c0200084c058cc098dd4000a5eb80530103d87a8000133006006003375a60460066eb8c084008c094008c08c004c8cc004004024894ccc0800045300103d87a80001323232325333021337220100042a66604266e3c0200084c054cc094dd3000a5eb80530103d87a8000133006006003375660440066eb8c080008c090008c088004dd718070009bae30110013758603a0042660060060022940c0740048c060c064c0640048c8cc004004008894ccc05c00452f5bded8c02664464646666010006004002444c646400464646600200200644a66603c002293099299980f8008a99980e18021bad301e30210021498584c8c8c8c94ccc080cdc81bae3021004375c60420062a666040601000226600e00e660480060042c2c6eb4c08400cc09000cc088008c084008c0840048ccc064c05c00528251375660320066eb8c05c008c064004cc008008c0680048888c8cc004004014894ccc0640044cc068cdd81ba9005374c00897adef6c60132323232533301a3372001200426603c66ec0dd48049ba60080051533301a3371e012004264a666036603260386ea80044cc07ccdd81ba900a3020301d3754002008200866600e01201000226603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc004004dd6180298091baa30053012375401244a666028002297ae01323253330133375e6010602a6ea8c02cc054dd500100289980b80119802002000899802002000980c001180b000980198081baa300630103754602660206ea800458c8cc004004dd6180198081baa30033010375400e44a666024002298103d87a80001323253330113375e600c60266ea800801c4c014cc0540092f5c0266008008002602c0046028002264a66601c6018601e6ea80044cc88c8cc00400400c894ccc054004528099299980999b8f375c603000400829444cc00c00c004c060004dd61809980a180a180a180a180a180a180a180a18081baa30033010375400e6eb8c04cc040dd50008b192999807180618079baa001130023301230133010375400297ae014c0103d87a80003002300f37546004601e6ea8030dd2a400046022002601e60186ea8004528180098059baa0022300e300f00114984d958c94ccc01cc01400454ccc028c024dd50010a4c2c2a66600e60080022a66601460126ea80085261616300737540026464a66600c6008600e6ea80144c8c8c8c8c8c94ccc03cc0480084c8c8c926330090032323300b375660240044646eb4c050008dd718090009bae3010001330080042323300a375660220044646eb4c04c008dd718088009bae300f001533300c300a300d375400a264646464a666026602c0042646493192999809180800089919299980b980d00109924c64a66602a602600226464a666034603a0042649318098008b180d800980b9baa0021533301530120011323232323232533301e3021002149858dd6980f800980f8011bad301d001301d002375a6036002602e6ea800858c054dd50008b180c000980a1baa00315333012300f00115333015301437540062930b0b18091baa002300c00316301400130140023012001300e375400a2c2c6eacc040004c040008dd598070009807001180600098041baa0051622323300100100322533300c00114984c8cc00c00cc040008c00cc0380048c94ccc018c0100044c8c94ccc02cc03800852616375c601800260106ea800854ccc018c00c0044c8c94ccc02cc03800852616375c601800260106ea800858c018dd50009b8748008dc3a4000ae6955ceaab9e5573eae815d0aba201",hash:"5db0485a71b88eb31dec330bcf994509ea24b709498f90f9b1863902"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/Int"}},List$Pair$ByteArray_List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/List$Pair$ByteArray_Int"}},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
100
|
+
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"oracle/OracleDatum":{title:"OracleDatum",anyOf:[{title:"OracleDatum",dataType:"constructor",index:0,fields:[{title:"count",$ref:"#/definitions/Int"},{title:"lovelace_price",$ref:"#/definitions/Int"},{title:"fee_address",$ref:"#/definitions/cardano~1address~1Address"}]}]},"oracle/OracleRedeemer":{title:"OracleRedeemer",anyOf:[{title:"MintPlutusNFT",dataType:"constructor",index:0,fields:[]},{title:"StopOracle",dataType:"constructor",index:1,fields:[]}]},"oracle_nft/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]},"plutus_nft/MintPolarity":{title:"MintPolarity",anyOf:[{title:"RMint",dataType:"constructor",index:0,fields:[]},{title:"RBurn",dataType:"constructor",index:1,fields:[]}]}}};var _c=class extends _{constructor(c,e){super(c);i(this,"collectionName");i(this,"paramUtxo",{outputIndex:0,txHash:""});i(this,"oracleAddress");i(this,"getOracleCbor",()=>Cc(a0.validators[0].compiledCode));i(this,"getOracleNFTCbor",()=>L0(a0.validators[2].compiledCode,[kc(this.paramUtxo.txHash,this.paramUtxo.outputIndex)]));i(this,"getNFTCbor",()=>{let c=I0(this.getOracleNFTCbor(),"V3");return L0(a0.validators[4].compiledCode,[Sc(this.collectionName),c])});i(this,"setupOracle",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx();if(e?.length<=0)throw new Error("No UTxOs found");let d=e[0],s=a0.validators[2].compiledCode,n=kc(d.input.txHash,d.input.outputIndex),b=L0(s,[n]),l=I0(b,"V3"),f="",{pubKeyHash:p,stakeCredentialHash:u}=e1(t),h=await this.mesh.txIn(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).mintPlutusScriptV3().mint("1",l,f).mintingScript(b).mintRedeemerValue(g0([])).txOut(this.oracleAddress,[{unit:l,quantity:"1"}]).txOutInlineDatumValue(g0([0,c,c1(p,u)])).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).changeAddress(t).selectUtxosFrom(e).complete();return this.paramUtxo=d.input,{tx:h,paramUtxo:d.input}});i(this,"mintPlutusNFT",async c=>{let{utxos:e,collateral:a,walletAddress:t}=await this.getWalletInfoForTx();if(e?.length<=0)throw new Error("No UTxOs found");let{nftIndex:d,policyId:s,lovelacePrice:n,oracleUtxo:b,oracleNftPolicyId:l,feeCollectorAddress:f,feeCollectorAddressObj:p}=await this.getOracleData(),u=`${this.collectionName} (${d})`,h=Sc(u),w=Ze([Ac(d+1),Ac(n),p]),S=this.mesh.spendingPlutusScriptV3().txIn(b.input.txHash,b.input.outputIndex,b.output.amount,b.output.address).txInRedeemerValue(g0([])).txInScript(this.getOracleCbor()).txInInlineDatumPresent().txOut(this.oracleAddress,[{unit:l,quantity:"1"}]).txOutInlineDatumValue(w,"JSON").mintPlutusScriptV3().mint("1",s,h).mintingScript(this.getNFTCbor());if(c){let C={[s]:{[u]:{...c}}};S.metadataValue(721,C)}return S.mintRedeemerValue(g0([])).txOut(f,[{unit:"lovelace",quantity:n.toString()}]).txInCollateral(a.input.txHash,a.input.outputIndex,a.output.amount,a.output.address).changeAddress(t).selectUtxosFrom(e),await S.complete()});i(this,"getOracleData",async()=>{let c=I0(this.getOracleNFTCbor(),"V3"),e=(await this.getAddressUtxosWithToken(this.oracleAddress,c))[0],a=d1(e.output.plutusData),t=a.fields[0].int,d=a.fields[1].int,s=a.fields[2],n=a1(s,this.networkId),b=I0(this.getNFTCbor(),"V3");return{nftIndex:t,policyId:b,lovelacePrice:d,oracleUtxo:e,oracleNftPolicyId:c,feeCollectorAddress:n,feeCollectorAddressObj:s}});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c));this.collectionName=e.collectionName,e.paramUtxo&&(this.paramUtxo=e.paramUtxo),this.oracleAddress=t1({code:Cc(a0.validators[0].compiledCode),version:"V3"},c.stakeCredential,c.networkId).address}};import{conStr0 as s1,mConStr0 as n1,mConStr1 as o1,MeshValue as b1,pubKeyAddress as l1,value as $c}from"@meshsdk/common";import{deserializeAddress as Pc,deserializeDatum as vc,serializeAddressObj as Hc}from"@meshsdk/core";import{applyParamsToScript as Vc}from"@meshsdk/core-cst";var Oc={preamble:{title:"meshjs/swap",description:"Aiken contracts for project 'meshjs/swap'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"swap.swap",datum:{title:"datum",schema:{$ref:"#/definitions/swap~1SwapDatum"}},redeemer:{title:"redeemer",schema:{$ref:"#/definitions/swap~1SwapRedeemer"}},compiledCode:"590827010000323232323232322323232232253330083232533300a3007300b375400226464a6466601a6014601c6ea80204c94ccc038c030c03cdd5000899191919191919191919299980c299980d8048a501533301b301e00914a2294054ccc06000440085280a50330043330030084bd6f7b63011299980c99baf300e301b3754602260366ea800802c4cc010004dd59808980d9baa3011301b37540042002600c6eacc03cc064dd500b19801999119980200125eb7bdb180894ccc068cdd79807980e1baa0020031330050013756602460386ea80084004dd61802180c1baa300b3018375401e601660306ea8054c014dd59802180c1baa0152232333001001003002222533301d00210011323330040043021003333300b002375c60380026eacc074004888c94ccc07d4ccc0880045288a5014c103d87a80001301333023374c00297ae0323330010010030022225333024002100113233300400430280033322323300100100522533302900113302a337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0a8cdc800400109981719bb037520106ea001c01454ccc0a8cdc78040010992999815981498161baa00113302f337606ea4024c0c0c0b4dd5000802080219299981598148008a60103d87a80001301f3302f375000297ae03370000e00226605c66ec0dd48011ba800133006006003375a60560066eb8c0a4008c0b4008c0ac004dd718118009bad30240013026002301f002222323300100100422533301c0011004133003301e00133002002301f001223233001001323300100100322533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004894ccc068004528899299980c1919b89375a600e002664464a6660386032603a6ea8004520001375a6042603c6ea8004c94ccc070c064c074dd50008a6103d87a80001323300100137566044603e6ea8008894ccc084004530103d87a80001323232325333022337220100042a66604466e3c0200084c058cc098dd4000a5eb80530103d87a8000133006006003375a60460066eb8c084008c094008c08c004c8cc004004024894ccc0800045300103d87a80001323232325333021337220100042a66604266e3c0200084c054cc094dd3000a5eb80530103d87a8000133006006003375660440066eb8c080008c090008c088004dd718070009bae30110013758603a0042660060060022940c0740048c060c064c0640048c8cc004004008894ccc05c00452f5bded8c02664464646666010006004002444c646400464646600200200644a66603c002293099299980f8008a99980e18021bad301e30210021498584c8c8c8c94ccc080cdc81bae3021004375c60420062a666040601000226600e00e660480060042c2c6eb4c08400cc09000cc088008c084008c0840048ccc064c05c00528251375660320066eb8c05c008c064004cc008008c0680048888c8cc004004014894ccc0640044cc068cdd81ba9005374c00897adef6c60132323232533301a3372001200426603c66ec0dd48049ba60080051533301a3371e012004264a666036603260386ea80044cc07ccdd81ba900a3020301d3754002008200866600e01201000226603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc004004dd6180298091baa30053012375401244a666028002297ae01323253330133375e6010602a6ea8c02cc054dd500100289980b80119802002000899802002000980c001180b000980198081baa300630103754602660206ea800458c8cc004004dd6180198081baa30033010375400e44a666024002298103d87a80001323253330113375e600c60266ea800801c4c014cc0540092f5c0266008008002602c0046028002264a66601c6018601e6ea80044cc88c8cc00400400c894ccc054004528099299980999b8f375c603000400829444cc00c00c004c060004dd61809980a180a180a180a180a180a180a180a18081baa30033010375400e6eb8c04cc040dd50008b192999807180618079baa001130023301230133010375400297ae014c0103d87a80003002300f37546004601e6ea8030dd2a400046022002601e60186ea8004528180098059baa0022300e300f00114984d958c94ccc01cc01400454ccc028c024dd50010a4c2c2a66600e60080022a66601460126ea80085261616300737540026464a66600c6008600e6ea80144c8c8c8c8c8c94ccc03cc0480084c8c8c926330090032323300b375660240044646eb4c050008dd718090009bae3010001330080042323300a375660220044646eb4c04c008dd718088009bae300f001533300c300a300d375400a264646464a666026602c0042646493192999809180800089919299980b980d00109924c64a66602a602600226464a666034603a0042649318098008b180d800980b9baa0021533301530120011323232323232533301e3021002149858dd6980f800980f8011bad301d001301d002375a6036002602e6ea800858c054dd50008b180c000980a1baa00315333012300f00115333015301437540062930b0b18091baa002300c00316301400130140023012001300e375400a2c2c6eacc040004c040008dd598070009807001180600098041baa0051622323300100100322533300c00114984c8cc00c00cc040008c00cc0380048c94ccc018c0100044c8c94ccc02cc03800852616375c601800260106ea800854ccc018c00c0044c8c94ccc02cc03800852616375c601800260106ea800858c018dd50009b8748008dc3a4000ae6955ceaab9e5573eae815d0aba201",hash:"5db0485a71b88eb31dec330bcf994509ea24b709498f90f9b1863902"}],definitions:{ByteArray:{dataType:"bytes"},Int:{dataType:"integer"},List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/Int"}},List$Pair$ByteArray_List$Pair$ByteArray_Int:{dataType:"map",keys:{$ref:"#/definitions/ByteArray"},values:{$ref:"#/definitions/List$Pair$ByteArray_Int"}},"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential":{title:"Optional",anyOf:[{title:"Some",description:"An optional value.",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"}]},{title:"None",description:"Nothing.",dataType:"constructor",index:1,fields:[]}]},"aiken/transaction/credential/Address":{title:"Address",description:`A Cardano \`Address\` typically holding one or two credential references.
|
|
101
101
|
|
|
102
102
|
Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are
|
|
103
103
|
completely excluded from Plutus contexts. Thus, from an on-chain
|
|
@@ -124,12 +124,12 @@ var ie=Object.defineProperty;var re=(o,r,c)=>r in o?ie(o,r,{enumerable:!0,config
|
|
|
124
124
|
in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).`,anyOf:[{title:"Address",dataType:"constructor",index:0,fields:[{title:"payment_credential",$ref:"#/definitions/PaymentCredential"},{title:"stake_credential",$ref:"#/definitions/Option$StakeCredential"}]}]},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
125
125
|
|
|
126
126
|
Credentials are always one of two kinds: a direct public/private key
|
|
127
|
-
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"swap/SwapDatum":{title:"SwapDatum",anyOf:[{title:"SwapDatum",dataType:"constructor",index:0,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"to_provide",$ref:"#/definitions/MValue"},{title:"to_receive",$ref:"#/definitions/MValue"}]}]},"swap/SwapRedeemer":{title:"SwapRedeemer",anyOf:[{title:"Cancel",dataType:"constructor",index:0,fields:[]},{title:"Swap",dataType:"constructor",index:1,fields:[]}]}}};var Dc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?Vc(Rc.validators[0].compiledCode,[]):Vc(Oc.validators[0].compiledCode,[]));i(this,"initiateSwap",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),{pubKeyHash:s,stakeCredentialHash:n}=Pc(t),b=s1([l1(s,n),$c(c),$c(e)]);return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(b,"JSON").changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"acceptSwap",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=Hc(c.output.plutusData),s=vc(d.fields[0],this.networkId),n=d.fields[2];return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(o1([])).txInScript(this.scriptCbor).txOut(s,b1.fromValue(n).toAssets()).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"cancelSwap",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=Hc(c.output.plutusData),s=vc(d.fields[0],this.networkId);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(n1([])).txInScript(this.scriptCbor).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).requiredSignerHash(Pc(s).pubKeyHash).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{mConStr0 as u1,SLOT_CONFIG_NETWORK as Nc,unixTimeToEnclosingSlot as h1}from"@meshsdk/common";import{deserializeAddress as W0,deserializeDatum as m1}from"@meshsdk/core";import{applyParamsToScript as Mc}from"@meshsdk/core-cst";var Bc={preamble:{title:"meshjs/vesting",description:"Aiken contracts for project 'meshjs/vesting'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"vesting.vesting",datum:{title:"datum",schema:{$ref:"#/definitions/vesting~1types~1VestingDatum"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},compiledCode:"5901c40100003232323232323223222533300532533233007300130083754600460126ea800c4c8c8c94ccc028cc004dd6180118061baa3003300c375400c6eb8c014c030dd50048a511533300a330013758600460186ea8c00cc030dd50031bae300f30103010300c3754012266446464646464a666022601660246ea80084c94ccc0480104cdc40038008011bad301630133754004002264a666022601660246ea80084c94ccc0480100084cdc48038009bad3016301337540040022940c050008cdc424000601e6ea8c04cc050004cc044c048004cc044ccc034cdc424000601c6ea8c048c04c00530103d87a80004c0103d87980004bd7018071baa3005300e3754004601e602060206020602060206020602060186ea8c00cc030dd50031bad3003300c3754012294088c8cc00400400c894ccc040004528099299980719b8f375c602600400829444cc00c00c004c04c0048c038c03cc03cc03cc03cc03cc03cc03cc03c0048c034004dc3a400429408c02cc0300045261365653330023370e900018019baa0011323232323232533300b300e002149858dd7180600098060011bae300a001300a002375a601000260086ea8004595cd2ab9d5573caae7d5d02ba157441",hash:"ac96a3fa3cabf670268a88720402c715ed5fd73ffb3276e6092ead00"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"vesting/types/VestingDatum":{title:"VestingDatum",anyOf:[{title:"VestingDatum",dataType:"constructor",index:0,fields:[{title:"lock_until",description:"POSIX time in second, e.g. 1672843961000",$ref:"#/definitions/Int"},{title:"owner",description:"Owner's credentials",$ref:"#/definitions/ByteArray"},{title:"beneficiary",description:"Beneficiary's credentials",$ref:"#/definitions/ByteArray"}]}]}}};var Uc={preamble:{title:"meshjs/vesting",description:"Aiken contracts for project 'meshjs/vesting'",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"vesting.vesting.spend",datum:{title:"datum_opt",schema:{$ref:"#/definitions/vesting~1VestingDatum"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},compiledCode:"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21",hash:"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb"},{title:"vesting.vesting.else",compiledCode:"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21",hash:"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"vesting/VestingDatum":{title:"VestingDatum",anyOf:[{title:"VestingDatum",dataType:"constructor",index:0,fields:[{title:"lock_until",description:"POSIX time in milliseconds, e.g. 1672843961000",$ref:"#/definitions/Int"},{title:"owner",description:"Owner's credentials",$ref:"#/definitions/ByteArray"},{title:"beneficiary",description:"Beneficiary's credentials",$ref:"#/definitions/ByteArray"}]}]}}};var Fc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?Mc(Uc.validators[0].compiledCode,[]):Mc(Bc.validators[0].compiledCode,[]));i(this,"depositFund",async(c,e,a)=>{let{utxos:t,walletAddress:d}=await this.getWalletInfoForTx(),{pubKeyHash:s}=W0(d),{pubKeyHash:n}=W0(a);return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(u1([e,s,n])).changeAddress(d).selectUtxosFrom(t).complete(),this.mesh.txHex});i(this,"withdrawFund",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),{input:d,output:s}=t,{pubKeyHash:n}=W0(a),b=m1(c.output.plutusData),l=h1(Math.min(Number(b.fields[0].int),Date.now()-15e3),this.networkId===0?Nc.preprod:Nc.mainnet)+1;return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue("").txInScript(this.scriptCbor).txOut(a,[]).txInCollateral(d.txHash,d.outputIndex,s.amount,s.address).invalidBefore(l).requiredSignerHash(n).changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{byteString as D,conStr0 as k,conStr1 as l0,conStr2 as A1,integer as G,list as Qc,POLICY_ID_LENGTH as Yc,stringToHex as f0}from"@meshsdk/common";import{deserializeDatum as d0}from"@meshsdk/core";import{byteString as v,conStr as q0,conStr1 as C0,integer as Jc}from"@meshsdk/common";import{applyParamsToScript as Gc,resolveScriptHash as j,serializePlutusScript as Xc}from"@meshsdk/core";import{scriptHashToRewardAddress as j0}from"@meshsdk/core-cst";import T1 from"cbor";var Ec={preamble:{title:"cip113/freeze-unfreeze",description:"CIP113 Sub Standard for freeze/unfreeze capabilities",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.21+42babe5"},license:"Apache-2.0"},validators:[{title:"blacklist_mint.blacklist_mint.mint",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/types~1BlacklistRedeemer"}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"manager_pkh",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281",hash:"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe"},{title:"blacklist_mint.blacklist_mint.else",redeemer:{schema:{}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"manager_pkh",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281",hash:"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe"},{title:"blacklist_spend.blacklist_spend.spend",datum:{title:"_datum",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"blacklist_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081",hash:"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66"},{title:"blacklist_spend.blacklist_spend.else",redeemer:{schema:{}},parameters:[{title:"blacklist_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081",hash:"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66"},{title:"example_transfer_logic.issuer_admin_contract.withdraw",redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"permitted_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041",hash:"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4"},{title:"example_transfer_logic.issuer_admin_contract.else",redeemer:{schema:{}},parameters:[{title:"permitted_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041",hash:"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4"},{title:"example_transfer_logic.transfer.withdraw",redeemer:{title:"proofs",schema:{$ref:"#/definitions/List<types~1BlacklistProof>"}},parameters:[{title:"programmable_logic_base_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"blacklist_node_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601",hash:"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c"},{title:"example_transfer_logic.transfer.else",redeemer:{schema:{}},parameters:[{title:"programmable_logic_base_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"blacklist_node_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601",hash:"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c"}],definitions:{ByteArray:{title:"ByteArray",dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"List<types/BlacklistProof>":{dataType:"list",items:{$ref:"#/definitions/types~1BlacklistProof"}},"aiken/crypto/ScriptHash":{title:"ScriptHash",dataType:"bytes"},"aiken/crypto/VerificationKeyHash":{title:"VerificationKeyHash",dataType:"bytes"},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
127
|
+
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/ScriptHash"}]}]},"swap/SwapDatum":{title:"SwapDatum",anyOf:[{title:"SwapDatum",dataType:"constructor",index:0,fields:[{title:"initiator",$ref:"#/definitions/cardano~1address~1Address"},{title:"to_provide",$ref:"#/definitions/MValue"},{title:"to_receive",$ref:"#/definitions/MValue"}]}]},"swap/SwapRedeemer":{title:"SwapRedeemer",anyOf:[{title:"Cancel",dataType:"constructor",index:0,fields:[]},{title:"Swap",dataType:"constructor",index:1,fields:[]}]}}};var Dc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?Vc(Rc.validators[0].compiledCode,[]):Vc(Oc.validators[0].compiledCode,[]));i(this,"initiateSwap",async(c,e)=>{let{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx(),{pubKeyHash:s,stakeCredentialHash:n}=Pc(t),b=s1([l1(s,n),$c(c),$c(e)]);return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(b,"JSON").changeAddress(t).txInCollateral(d.input.txHash,d.input.outputIndex,d.output.amount,d.output.address).selectUtxosFrom(a).complete(),this.mesh.txHex});i(this,"acceptSwap",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=vc(c.output.plutusData),s=Hc(d.fields[0],this.networkId),n=d.fields[2];return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(o1([])).txInScript(this.scriptCbor).txOut(s,b1.fromValue(n).toAssets()).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"cancelSwap",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),d=vc(c.output.plutusData),s=Hc(d.fields[0],this.networkId);return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,c.output.address).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue(n1([])).txInScript(this.scriptCbor).changeAddress(a).txInCollateral(t.input.txHash,t.input.outputIndex,t.output.amount,t.output.address).requiredSignerHash(Pc(s).pubKeyHash).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{mConStr0 as u1,SLOT_CONFIG_NETWORK as Nc,unixTimeToEnclosingSlot as h1}from"@meshsdk/common";import{deserializeAddress as W0,deserializeDatum as m1}from"@meshsdk/core";import{applyParamsToScript as Mc}from"@meshsdk/core-cst";var Bc={preamble:{title:"meshjs/vesting",description:"Aiken contracts for project 'meshjs/vesting'",version:"0.0.0",plutusVersion:"v2",compiler:{name:"Aiken",version:"v1.0.29-alpha+unknown"},license:"Apache-2.0"},validators:[{title:"vesting.vesting",datum:{title:"datum",schema:{$ref:"#/definitions/vesting~1types~1VestingDatum"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},compiledCode:"5901c40100003232323232323223222533300532533233007300130083754600460126ea800c4c8c8c94ccc028cc004dd6180118061baa3003300c375400c6eb8c014c030dd50048a511533300a330013758600460186ea8c00cc030dd50031bae300f30103010300c3754012266446464646464a666022601660246ea80084c94ccc0480104cdc40038008011bad301630133754004002264a666022601660246ea80084c94ccc0480100084cdc48038009bad3016301337540040022940c050008cdc424000601e6ea8c04cc050004cc044c048004cc044ccc034cdc424000601c6ea8c048c04c00530103d87a80004c0103d87980004bd7018071baa3005300e3754004601e602060206020602060206020602060186ea8c00cc030dd50031bad3003300c3754012294088c8cc00400400c894ccc040004528099299980719b8f375c602600400829444cc00c00c004c04c0048c038c03cc03cc03cc03cc03cc03cc03cc03c0048c034004dc3a400429408c02cc0300045261365653330023370e900018019baa0011323232323232533300b300e002149858dd7180600098060011bae300a001300a002375a601000260086ea8004595cd2ab9d5573caae7d5d02ba157441",hash:"ac96a3fa3cabf670268a88720402c715ed5fd73ffb3276e6092ead00"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"vesting/types/VestingDatum":{title:"VestingDatum",anyOf:[{title:"VestingDatum",dataType:"constructor",index:0,fields:[{title:"lock_until",description:"POSIX time in second, e.g. 1672843961000",$ref:"#/definitions/Int"},{title:"owner",description:"Owner's credentials",$ref:"#/definitions/ByteArray"},{title:"beneficiary",description:"Beneficiary's credentials",$ref:"#/definitions/ByteArray"}]}]}}};var Uc={preamble:{title:"meshjs/vesting",description:"Aiken contracts for project 'meshjs/vesting'",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.0+unknown"},license:"Apache-2.0"},validators:[{title:"vesting.vesting.spend",datum:{title:"datum_opt",schema:{$ref:"#/definitions/vesting~1VestingDatum"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},compiledCode:"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21",hash:"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb"},{title:"vesting.vesting.else",compiledCode:"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21",hash:"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb"}],definitions:{ByteArray:{dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"vesting/VestingDatum":{title:"VestingDatum",anyOf:[{title:"VestingDatum",dataType:"constructor",index:0,fields:[{title:"lock_until",description:"POSIX time in milliseconds, e.g. 1672843961000",$ref:"#/definitions/Int"},{title:"owner",description:"Owner's credentials",$ref:"#/definitions/ByteArray"},{title:"beneficiary",description:"Beneficiary's credentials",$ref:"#/definitions/ByteArray"}]}]}}};var Fc=class extends _{constructor(c){super(c);i(this,"scriptCbor");i(this,"scriptAddress");i(this,"getScriptCbor",()=>this.version===2?Mc(Uc.validators[0].compiledCode,[]):Mc(Bc.validators[0].compiledCode,[]));i(this,"depositFund",async(c,e,a)=>{let{utxos:t,walletAddress:d}=await this.getWalletInfoForTx(),{pubKeyHash:s}=W0(d),{pubKeyHash:n}=W0(a);return await this.mesh.txOut(this.scriptAddress,c).txOutInlineDatumValue(u1([e,s,n])).changeAddress(d).selectUtxosFrom(t).complete(),this.mesh.txHex});i(this,"withdrawFund",async c=>{let{utxos:e,walletAddress:a,collateral:t}=await this.getWalletInfoForTx(),{input:d,output:s}=t,{pubKeyHash:n}=W0(a),b=m1(c.output.plutusData),l=h1(Math.min(Number(b.fields[0].int),Date.now()-15e3),this.networkId===0?Nc.preprod:Nc.mainnet)+1;return await this.mesh.spendingPlutusScript(this.languageVersion).txIn(c.input.txHash,c.input.outputIndex,c.output.amount,this.scriptAddress).spendingReferenceTxInInlineDatumPresent().spendingReferenceTxInRedeemerValue("").txInScript(this.scriptCbor).txOut(a,[]).txInCollateral(d.txHash,d.outputIndex,s.amount,s.address).invalidBefore(l).requiredSignerHash(n).changeAddress(a).selectUtxosFrom(e).complete(),this.mesh.txHex});i(this,"getUtxoByTxHash",async c=>await this._getUtxoByTxHash(c,this.scriptCbor));this.scriptCbor=this.getScriptCbor(),this.scriptAddress=this.getScriptAddress(this.scriptCbor)}};import{byteString as D,conStr0 as k,conStr1 as l0,conStr2 as A1,integer as G,list as Qc,POLICY_ID_LENGTH as Yc,stringToHex as f0}from"@meshsdk/common";import{deserializeDatum as d0}from"@meshsdk/core";import{byteString as H,conStr as q0,conStr1 as C0,integer as Jc}from"@meshsdk/common";import{applyParamsToScript as Gc,resolveScriptHash as j,serializePlutusScript as Xc}from"@meshsdk/core";import{scriptHashToRewardAddress as j0}from"@meshsdk/core-cst";import T1 from"cbor";var Ec={preamble:{title:"cip113/freeze-unfreeze",description:"CIP113 Sub Standard for freeze/unfreeze capabilities",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.21+42babe5"},license:"Apache-2.0"},validators:[{title:"blacklist_mint.blacklist_mint.mint",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/types~1BlacklistRedeemer"}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"manager_pkh",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281",hash:"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe"},{title:"blacklist_mint.blacklist_mint.else",redeemer:{schema:{}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"manager_pkh",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281",hash:"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe"},{title:"blacklist_spend.blacklist_spend.spend",datum:{title:"_datum",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"blacklist_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081",hash:"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66"},{title:"blacklist_spend.blacklist_spend.else",redeemer:{schema:{}},parameters:[{title:"blacklist_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081",hash:"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66"},{title:"example_transfer_logic.issuer_admin_contract.withdraw",redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"permitted_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041",hash:"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4"},{title:"example_transfer_logic.issuer_admin_contract.else",redeemer:{schema:{}},parameters:[{title:"permitted_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041",hash:"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4"},{title:"example_transfer_logic.transfer.withdraw",redeemer:{title:"proofs",schema:{$ref:"#/definitions/List<types~1BlacklistProof>"}},parameters:[{title:"programmable_logic_base_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"blacklist_node_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601",hash:"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c"},{title:"example_transfer_logic.transfer.else",redeemer:{schema:{}},parameters:[{title:"programmable_logic_base_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"blacklist_node_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601",hash:"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c"}],definitions:{ByteArray:{title:"ByteArray",dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"List<types/BlacklistProof>":{dataType:"list",items:{$ref:"#/definitions/types~1BlacklistProof"}},"aiken/crypto/ScriptHash":{title:"ScriptHash",dataType:"bytes"},"aiken/crypto/VerificationKeyHash":{title:"VerificationKeyHash",dataType:"bytes"},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
128
128
|
|
|
129
129
|
Credentials are always one of two kinds: a direct public/private key
|
|
130
130
|
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1crypto~1VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/aiken~1crypto~1ScriptHash"}]}]},"cardano/assets/PolicyId":{title:"PolicyId",dataType:"bytes"},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"types/BlacklistProof":{title:"BlacklistProof",description:"Proof of blacklist membership or non-membership",anyOf:[{title:"NonmembershipProof",description:"Proof of non-membership via covering node",dataType:"constructor",index:0,fields:[{title:"node_idx",$ref:"#/definitions/Int"}]}]},"types/BlacklistRedeemer":{title:"BlacklistRedeemer",description:"Redeemer for blacklist minting policy (linked list operations)",anyOf:[{title:"BlacklistInit",description:"Initialize the blacklist with the origin node",dataType:"constructor",index:0,fields:[]},{title:"BlacklistInsert",description:"Insert a credential into the blacklist",dataType:"constructor",index:1,fields:[{title:"key",$ref:"#/definitions/ByteArray"}]},{title:"BlacklistRemove",description:"Remove a credential from the blacklist",dataType:"constructor",index:2,fields:[{title:"key",$ref:"#/definitions/ByteArray"}]}]}}};var Kc={preamble:{title:"wsc-poc/aiken-policy",description:"Aiken contracts for project 'wsc-poc/aiken-policy'",version:"0.0.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.19+e525483"},license:"Apache-2.0"},validators:[{title:"transfer.issue.withdraw",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/Int"}},compiledCode:"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",hash:"a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950"},{title:"transfer.issue.else",redeemer:{schema:{}},compiledCode:"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",hash:"a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950"},{title:"transfer.transfer.withdraw",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/Int"}},compiledCode:"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",hash:"93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd"},{title:"transfer.transfer.else",redeemer:{schema:{}},compiledCode:"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011",hash:"93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd"}],definitions:{Int:{dataType:"integer"}}};var Lc={preamble:{title:"iohk/programmable-tokens",description:"Aiken implementation of CIP-0143 programmable tokens (migrated from Plutarch)",version:"0.3.0",plutusVersion:"v3",compiler:{name:"Aiken",version:"v1.1.21+42babe5"},license:"Apache-2.0"},validators:[{title:"always_fail.always_fail.spend",datum:{title:"_d",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_r",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"_nonce",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"585f010100229800aba2aba1aab9eaab9dab9a9bae00248888896600264653001300700198039804000cc01c0092225980099b8748008c020dd500144c8cc898c02c004c02cc030004c024dd50014590070c01c004c010dd5003c52689b2b20041",hash:"e9d8d9c7fc531f0b179d502c86bffee829613c537794dab053ae28fe"},{title:"always_fail.always_fail.else",redeemer:{schema:{}},parameters:[{title:"_nonce",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"585f010100229800aba2aba1aab9eaab9dab9a9bae00248888896600264653001300700198039804000cc01c0092225980099b8748008c020dd500144c8cc898c02c004c02cc030004c024dd50014590070c01c004c010dd5003c52689b2b20041",hash:"e9d8d9c7fc531f0b179d502c86bffee829613c537794dab053ae28fe"},{title:"issuance_cbor_hex_mint.issuance_cbor_hex_mint.mint",redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"always_fail_hash",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"5903d30101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d20043011375400313259800980598091baa0018991919912cc004c06c00e2b300132330010013758603660306ea803c896600200314a115980099baf301c30193754603800204314a3133002002301d001405c80d22b30013371e6eb8c0680212210f49737375616e636543626f72486578008acc004cdc39bad301a301b0084800a266ebcc068c05cdd500398051980c99ba548008cc064dd480a25eb80cc065300103d87a80004bd704528202a8a50405514a080aa2c80c0dd7180c0009bae3018002301800130133754003164044602a60246ea80062c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c1104f49737375616e636543626f72486578004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401",hash:"7a52b5d9171439e64fa0df2d49ca7487d369e146f697553feba95426"},{title:"issuance_cbor_hex_mint.issuance_cbor_hex_mint.else",redeemer:{schema:{}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"always_fail_hash",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"5903d30101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d20043011375400313259800980598091baa0018991919912cc004c06c00e2b300132330010013758603660306ea803c896600200314a115980099baf301c30193754603800204314a3133002002301d001405c80d22b30013371e6eb8c0680212210f49737375616e636543626f72486578008acc004cdc39bad301a301b0084800a266ebcc068c05cdd500398051980c99ba548008cc064dd480a25eb80cc065300103d87a80004bd704528202a8a50405514a080aa2c80c0dd7180c0009bae3018002301800130133754003164044602a60246ea80062c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c1104f49737375616e636543626f72486578004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401",hash:"7a52b5d9171439e64fa0df2d49ca7487d369e146f697553feba95426"},{title:"issuance_mint.issuance_mint.mint",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/types~1SmartTokenMintingAction"}},parameters:[{title:"programmable_logic_base",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"minting_logic_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"5903b30101002229800aba2aba1aba0aab9faab9eaab9dab9a488888896600264653001300800198041804800cdc3a400130080024888966002600460106ea800e2664464b30013005300b375400f132598009808800c4c8c96600260100031323259800980a801401a2c8090dd7180980098079baa0028acc004c01400626464b300130150028034590121bae3013001300f37540051640348068c034dd50009808000c5900e18061baa0078b2014132598009808000c4c8c96600266ebcc044c038dd500480a4566002646600200264660020026eacc04cc050c050c050c050c050c050c040dd5004112cc004006297ae08998099808180a00099801001180a800a0242259800800c528456600266ebcc04c00405a294626600400460280028071011456600260086530010019bab3012301330133013301330133013301330133013300f375400f480010011112cc00400a200319800801cc05400a64b3001300b30113754602200315980099baf301200100d899b800024800a2004808220048080c05000900320248acc004c010c8cc0040040108966002003148002266e012002330020023014001404515980099b88480000062664464b3001300a30103754003159800980518081baa30143011375400315980099baf301430113754602860226ea800c062266e1e60026eacc008c044dd5001cdd7180a002c520004888cc88cc004004008c8c8cc004004014896600200300389919912cc004cdc8808801456600266e3c04400a20030064061133005005301e00440606eb8c05c004dd5980c000980d000a03014bd6f7b630112cc00400600713233225980099b910070028acc004cdc78038014400600c80ba26600a00a603a00880b8dd7180b0009bad30170013019001405c0048a50403d16403d16403c600260206ea8c04cc040dd500118089bac301130123012300e375400c46024602600315980099b880014800229462c806100c452820188a50403114a08062294100c1bad3010301100130103758601e003164034646600200264660020026eacc040c044c044c044c044c034dd5002912cc004006297ae08991991199119801001000912cc004006200713233016374e6602c6ea4014cc058c04c004cc058c0500052f5c0660060066030004602c00280a0dd598088019bae300e0013300300330130023011001403c44b30010018a5eb8226644b30013371e6eb8c04800801a2660226e9c008cc0100100062660080080028068dd618080009808800a01c375c601860126ea800cdc3a400516401c300800130033754011149a26cac80081",hash:"a5ed4b4e7813e17eec3b66f64dc5f2c6d11d62e7120d90a0f0acf450"},{title:"issuance_mint.issuance_mint.else",redeemer:{schema:{}},parameters:[{title:"programmable_logic_base",schema:{$ref:"#/definitions/cardano~1address~1Credential"}},{title:"minting_logic_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"5903b30101002229800aba2aba1aba0aab9faab9eaab9dab9a488888896600264653001300800198041804800cdc3a400130080024888966002600460106ea800e2664464b30013005300b375400f132598009808800c4c8c96600260100031323259800980a801401a2c8090dd7180980098079baa0028acc004c01400626464b300130150028034590121bae3013001300f37540051640348068c034dd50009808000c5900e18061baa0078b2014132598009808000c4c8c96600266ebcc044c038dd500480a4566002646600200264660020026eacc04cc050c050c050c050c050c050c040dd5004112cc004006297ae08998099808180a00099801001180a800a0242259800800c528456600266ebcc04c00405a294626600400460280028071011456600260086530010019bab3012301330133013301330133013301330133013300f375400f480010011112cc00400a200319800801cc05400a64b3001300b30113754602200315980099baf301200100d899b800024800a2004808220048080c05000900320248acc004c010c8cc0040040108966002003148002266e012002330020023014001404515980099b88480000062664464b3001300a30103754003159800980518081baa30143011375400315980099baf301430113754602860226ea800c062266e1e60026eacc008c044dd5001cdd7180a002c520004888cc88cc004004008c8c8cc004004014896600200300389919912cc004cdc8808801456600266e3c04400a20030064061133005005301e00440606eb8c05c004dd5980c000980d000a03014bd6f7b630112cc00400600713233225980099b910070028acc004cdc78038014400600c80ba26600a00a603a00880b8dd7180b0009bad30170013019001405c0048a50403d16403d16403c600260206ea8c04cc040dd500118089bac301130123012300e375400c46024602600315980099b880014800229462c806100c452820188a50403114a08062294100c1bad3010301100130103758601e003164034646600200264660020026eacc040c044c044c044c044c034dd5002912cc004006297ae08991991199119801001000912cc004006200713233016374e6602c6ea4014cc058c04c004cc058c0500052f5c0660060066030004602c00280a0dd598088019bae300e0013300300330130023011001403c44b30010018a5eb8226644b30013371e6eb8c04800801a2660226e9c008cc0100100062660080080028068dd618080009808800a01c375c601860126ea800cdc3a400516401c300800130033754011149a26cac80081",hash:"a5ed4b4e7813e17eec3b66f64dc5f2c6d11d62e7120d90a0f0acf450"},{title:"programmable_logic_base.programmable_logic_base.spend",datum:{title:"_datum",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"stake_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"588b010100229800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900118031baa0018994c004c02400660126014003225980099baf3009300b00100e8a518998010011806000a0104888cc004004dd5980618069806980698069806980698059baa300c00818039baa0018b200a30060013006300700130060013003375400d149a26cac8009",hash:"be1e5967da54825149611a725eddea8664c1898a98bcf54f05f6728a"},{title:"programmable_logic_base.programmable_logic_base.else",redeemer:{schema:{}},parameters:[{title:"stake_cred",schema:{$ref:"#/definitions/cardano~1address~1Credential"}}],compiledCode:"588b010100229800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900118031baa0018994c004c02400660126014003225980099baf3009300b00100e8a518998010011806000a0104888cc004004dd5980618069806980698069806980698059baa300c00818039baa0018b200a30060013006300700130060013003375400d149a26cac8009",hash:"be1e5967da54825149611a725eddea8664c1898a98bcf54f05f6728a"},{title:"programmable_logic_global.programmable_logic_global.withdraw",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/types~1ProgrammableLogicGlobalRedeemer"}},parameters:[{title:"params_policy",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"590a58010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400930090024888966002600460126ea800e33001300d300a3754007370e90004dc3a4005300937540089111192cc004c01000a264b30013014001899198008009bac301400222325980080140162646644b3001300b002899192cc004c07000a0071640646eb4c068004c058dd5001c56600260140051323259800980e001400e2c80c8dd6980d000980b1baa0038b2028405060266ea80044c008c06000cc058009014180100145901118079baa0098acc004c00c00a26464653001375a602a003375a602a007375a602a0049112cc004c06401200f16405830150013014001300f375401316403480686600246024602660260032300f37540032232598009803000c4c8c966002602e0050048b2028375c602a00260226ea800e2b30013005001899192cc004c05c00a0091640506eb8c054004c044dd5001c5900f201e300f375400523012301300148888c8c966002601860266ea800626466446600e00233001329800800d20009bac30073018375401f2640044444b30010028800c4ca600200b3370000890014c08000e4b30013370e00a00315980099b8f300b300c301d375400401113259800980b180e9baa00189810980f1baa0018b2038300f301d37546018603a6ea800a2c80da2600600280d9005180f00120389180d980e180e180e180e180e180e000c8c06cc070c070c070c070006444b30010018a5189991191980080080291192cc004cdc79bae301e005375c603c00315980099b89375a603e00a6eb4c07c00633001008981180140110084528203a8998018019811801203a3021001301d001301e001406d222329800800c012006800888966002005100189919914c00401a604800b32330010010052259800800c4cc090cdd81ba9004375000697adef6c608994c004dd71811000cdd69811800cc09c0092225980099b9000800389981419bb037520106ea001c0162b30013371e01000719800804401e005233029337606ea4024dd40008014400500d44cc0a0cdd81ba900337500046600c00c00281210240c094005023200c375c603a0026eb4c078004c08000901e24444464b30013012301c375402f198009112cc00400a2003132332298008034c09c016646600200200a44b300100189981399bb037520086e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001000713302b337606ea4020dd3003802c56600266e3c02000e26605666ec0dd48041ba69800803c00a44444600466e0001000d00e000c4cc0accdd81ba9003374c0046600c00c00281390270c0a0005026200c375c60400026eacc084004c08c00902148896600200310028994c0040124b30013375e00400314a313004001408130250024010603e6046002810a603860406eacc014c074dd500a244464664466ebd3001018000374e6530010019bac30273024375403d98009bac3027302437540373756601660486ea806e44464b30013375e605660506ea8c0acc0a0dd500080944c966002603c60506ea8006264b3001301f3029375400313232300700559800981018151baa0018992cc004c8cc004004dd618181818981898189818981898189818981898169baa024225980099b8f375c606200200714a3133002002303200140b1149a2c8150dd7181718159baa0018acc004c0240062934590292052302d302a37540031640a0605860526ea80062c8138c05cc0a0dd5181598141baa001801204c301630273754006801b30013758602c60486ea806e97adef6c609112cc004cdd7981518139baa302a3027375400602313259800980e98139baa0018acc004c074c09cdd5181598141baa00189801802459026459026180b18139baa302a302737540070014094801900111112cc00400a200713298009bae30270019bab302800198158024c0b000d222259800981098159baa00289919911980f8008acc004cdc7801003c566002601a0031323300100100a22325980099b8f00a375c60620031598009980b1bab30320010098cc00403e606c01d007981b001201e8b2060899801801981b001206030340018b205a8b205a375c6060002606060626062002603a602a6eb4c0bcc0b0dd500144c96600266e40dd71818000802c56600266e40014dd718181818800c660020153031009801401d00a45902b45902b180e980a9bad302f302c3754004815060540048140888ca6002003004801a0022225980080144006330010039815801660026054005233008002302c3756602e60506ea80062002802100320509800801c8cdd7800801cc094dd5980498109baa018400c60060068cc004c074dd500bc888ca6002003004a5eb7bdb1810011112cc00400a33001001a5eb7bdb18297adef6c60401113233225980099b900020088cc00401a00333028003004401915980099b8f0020088cc0040126eacc09800e002803a33001004a5eb7bdb18200a80390242048375c60460026050006604c00481224464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204689980280298148022046375c60440026eacc08c004c0940050230a5eb7bdb182453001002800c88888c966002603400300289801800a046337000080068021222233223298009bae30270019813981418141814000cdd698139814001cdd69813801a4444660300062b300132330010013756602260526ea8080896600266ebcc0a4c0b40040162946266004004605c002814226530010019bac301b30293754041002a5eb7bdb1810011111192cc004cdc4801a40011329800800cdd6181898171baa02580440166601e6eacc054c0b8dd5012805400d0011111112cc004cdc48022400115980099baf4c1018000374e00b133017329800800c01200480088896600200510018cc00400e6074005325980099baf303a303737546074606e6ea800408626602e660306eacc098c0dcdd500080980144009035181c801200640dc0051640c51325980099baf303730343754606e60686ea800407a264b30013375e6070606a6ea8004c0e0c0d4dd5001456600266ebcc09cc0d4dd50009813981a9baa0028cc004dd59812181a9baa002808c88a60026eacc09cc0e0dd50024052444b30015980099baf374c00c6e9800e2b30013375e6e98010dd3000c6600266ebcdd30029ba6002a50a5140e514a081ca294103946600201d303f00d98078064c0fc02e6603601400b3301b00200940391640e480d1017459033459033181b80246600200f30380069804002c012007002401c8190c0d8c0dcc0ccdd5181b002a06289919912cc004cdd7981998181baa3033303037540020351300233010005330113756603e60606ea80040322600400a8170a600200f0029801802c00500718188029818802205637009000c590260c050c030004c094010dd69812002101b18010010dd7180c000980c180c8009802980b980a1baa0018b2024300530133754600460266ea8c8cc004004dd61801980a1baa00b22325980099b8f30043005301637540020271001899801801980d001202830180012375c6024602c602e6eacc008c04cdd50009164020300900130043754013149a26cac8011",hash:"da609c9b93fee7a2cce156f879aa1f800ad05e86c587478026540231"},{title:"programmable_logic_global.programmable_logic_global.else",redeemer:{schema:{}},parameters:[{title:"params_policy",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"590a58010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400930090024888966002600460126ea800e33001300d300a3754007370e90004dc3a4005300937540089111192cc004c01000a264b30013014001899198008009bac301400222325980080140162646644b3001300b002899192cc004c07000a0071640646eb4c068004c058dd5001c56600260140051323259800980e001400e2c80c8dd6980d000980b1baa0038b2028405060266ea80044c008c06000cc058009014180100145901118079baa0098acc004c00c00a26464653001375a602a003375a602a007375a602a0049112cc004c06401200f16405830150013014001300f375401316403480686600246024602660260032300f37540032232598009803000c4c8c966002602e0050048b2028375c602a00260226ea800e2b30013005001899192cc004c05c00a0091640506eb8c054004c044dd5001c5900f201e300f375400523012301300148888c8c966002601860266ea800626466446600e00233001329800800d20009bac30073018375401f2640044444b30010028800c4ca600200b3370000890014c08000e4b30013370e00a00315980099b8f300b300c301d375400401113259800980b180e9baa00189810980f1baa0018b2038300f301d37546018603a6ea800a2c80da2600600280d9005180f00120389180d980e180e180e180e180e180e000c8c06cc070c070c070c070006444b30010018a5189991191980080080291192cc004cdc79bae301e005375c603c00315980099b89375a603e00a6eb4c07c00633001008981180140110084528203a8998018019811801203a3021001301d001301e001406d222329800800c012006800888966002005100189919914c00401a604800b32330010010052259800800c4cc090cdd81ba9004375000697adef6c608994c004dd71811000cdd69811800cc09c0092225980099b9000800389981419bb037520106ea001c0162b30013371e01000719800804401e005233029337606ea4024dd40008014400500d44cc0a0cdd81ba900337500046600c00c00281210240c094005023200c375c603a0026eb4c078004c08000901e24444464b30013012301c375402f198009112cc00400a2003132332298008034c09c016646600200200a44b300100189981399bb037520086e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001000713302b337606ea4020dd3003802c56600266e3c02000e26605666ec0dd48041ba69800803c00a44444600466e0001000d00e000c4cc0accdd81ba9003374c0046600c00c00281390270c0a0005026200c375c60400026eacc084004c08c00902148896600200310028994c0040124b30013375e00400314a313004001408130250024010603e6046002810a603860406eacc014c074dd500a244464664466ebd3001018000374e6530010019bac30273024375403d98009bac3027302437540373756601660486ea806e44464b30013375e605660506ea8c0acc0a0dd500080944c966002603c60506ea8006264b3001301f3029375400313232300700559800981018151baa0018992cc004c8cc004004dd618181818981898189818981898189818981898169baa024225980099b8f375c606200200714a3133002002303200140b1149a2c8150dd7181718159baa0018acc004c0240062934590292052302d302a37540031640a0605860526ea80062c8138c05cc0a0dd5181598141baa001801204c301630273754006801b30013758602c60486ea806e97adef6c609112cc004cdd7981518139baa302a3027375400602313259800980e98139baa0018acc004c074c09cdd5181598141baa00189801802459026459026180b18139baa302a302737540070014094801900111112cc00400a200713298009bae30270019bab302800198158024c0b000d222259800981098159baa00289919911980f8008acc004cdc7801003c566002601a0031323300100100a22325980099b8f00a375c60620031598009980b1bab30320010098cc00403e606c01d007981b001201e8b2060899801801981b001206030340018b205a8b205a375c6060002606060626062002603a602a6eb4c0bcc0b0dd500144c96600266e40dd71818000802c56600266e40014dd718181818800c660020153031009801401d00a45902b45902b180e980a9bad302f302c3754004815060540048140888ca6002003004801a0022225980080144006330010039815801660026054005233008002302c3756602e60506ea80062002802100320509800801c8cdd7800801cc094dd5980498109baa018400c60060068cc004c074dd500bc888ca6002003004a5eb7bdb1810011112cc00400a33001001a5eb7bdb18297adef6c60401113233225980099b900020088cc00401a00333028003004401915980099b8f0020088cc0040126eacc09800e002803a33001004a5eb7bdb18200a80390242048375c60460026050006604c00481224464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204689980280298148022046375c60440026eacc08c004c0940050230a5eb7bdb182453001002800c88888c966002603400300289801800a046337000080068021222233223298009bae30270019813981418141814000cdd698139814001cdd69813801a4444660300062b300132330010013756602260526ea8080896600266ebcc0a4c0b40040162946266004004605c002814226530010019bac301b30293754041002a5eb7bdb1810011111192cc004cdc4801a40011329800800cdd6181898171baa02580440166601e6eacc054c0b8dd5012805400d0011111112cc004cdc48022400115980099baf4c1018000374e00b133017329800800c01200480088896600200510018cc00400e6074005325980099baf303a303737546074606e6ea800408626602e660306eacc098c0dcdd500080980144009035181c801200640dc0051640c51325980099baf303730343754606e60686ea800407a264b30013375e6070606a6ea8004c0e0c0d4dd5001456600266ebcc09cc0d4dd50009813981a9baa0028cc004dd59812181a9baa002808c88a60026eacc09cc0e0dd50024052444b30015980099baf374c00c6e9800e2b30013375e6e98010dd3000c6600266ebcdd30029ba6002a50a5140e514a081ca294103946600201d303f00d98078064c0fc02e6603601400b3301b00200940391640e480d1017459033459033181b80246600200f30380069804002c012007002401c8190c0d8c0dcc0ccdd5181b002a06289919912cc004cdd7981998181baa3033303037540020351300233010005330113756603e60606ea80040322600400a8170a600200f0029801802c00500718188029818802205637009000c590260c050c030004c094010dd69812002101b18010010dd7180c000980c180c8009802980b980a1baa0018b2024300530133754600460266ea8c8cc004004dd61801980a1baa00b22325980099b8f30043005301637540020271001899801801980d001202830180012375c6024602c602e6eacc008c04cdd50009164020300900130043754013149a26cac8011",hash:"da609c9b93fee7a2cce156f879aa1f800ad05e86c587478026540231"},{title:"protocol_params_mint.protocol_params_mint.mint",redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"always_fail_hash",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59041c0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d2004301137540031332259800980618099baa00289919912cc004c06c00626464b30013011001899192cc004c07c00a0111640706eb8c074004c064dd5001456600266e1d2002001899192cc004c07c00a0111640706eb8c074004c064dd5001459017202e3017375400260340031640606eb8c060004c064004c050dd5001459012180a98091baa00115980099198008009bac30163013375401444b30010018a508acc004cdd7980b980a1baa301700101c8a51899801001180c000a024405515980099b8f375c602a00691010e50726f746f636f6c506172616d73008acc004cdc39bad301530160034800a266ebcc054c048dd500118029980a19ba548008cc050dd4807a5eb80cc051300103d87a80004bd70452820208a50404114a080822c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c10f4e50726f746f636f6c506172616d73004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401",hash:"b35a80517d8fd4bd767e7b20516fbd913b7a4961383ab29cc4a7d92c"},{title:"protocol_params_mint.protocol_params_mint.else",redeemer:{schema:{}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"always_fail_hash",schema:{$ref:"#/definitions/ByteArray"}}],compiledCode:"59041c0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d2004301137540031332259800980618099baa00289919912cc004c06c00626464b30013011001899192cc004c07c00a0111640706eb8c074004c064dd5001456600266e1d2002001899192cc004c07c00a0111640706eb8c074004c064dd5001459017202e3017375400260340031640606eb8c060004c064004c050dd5001459012180a98091baa00115980099198008009bac30163013375401444b30010018a508acc004cdd7980b980a1baa301700101c8a51899801001180c000a024405515980099b8f375c602a00691010e50726f746f636f6c506172616d73008acc004cdc39bad301530160034800a266ebcc054c048dd500118029980a19ba548008cc050dd4807a5eb80cc051300103d87a80004bd70452820208a50404114a080822c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c10f4e50726f746f636f6c506172616d73004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401",hash:"b35a80517d8fd4bd767e7b20516fbd913b7a4961383ab29cc4a7d92c"},{title:"registry_mint.registry_mint.mint",redeemer:{title:"redeemer",schema:{$ref:"#/definitions/types~1RegistryRedeemer"}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"issuance_cbor_hex_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"5908ea0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e266446644b300130060018acc004c038dd5004400a2c807a2b300130030018991919912cc004c05800e00d16404c6eb8c04c004dd71809801180980098071baa0088b20184030330012301030110019180818089808800c88c8cc00400400c896600200314a115980098019809800c528c4cc008008c05000500e20229b804800a4464b30013007001899192cc004c05400a0091640486eb8c04c004c03cdd5001c56600260080031323259800980a80140122c8090dd7180980098079baa0038b201a4034601a6ea800a6e1d200491191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c809226600a00a60300088090dd718088009bab301200130140014048297adef6c609b8f48900918081808980898089808800c8c040c044c044c04400522222222229800999119912cc00400a26603898010180003301c374e00297ae08992cc004c8cc00400400c896600200314a315980099baf3020301d3754604000200713300200230210018a50406c80f226603a6e9c00ccc074dd380125eb822c80c8c074c068dd51807180d1baa301d002406c660046eb0c06cc060dd50079198011bab300d30193754601a60326ea800403ccc008dd61805980c1baa00f2330023756601a60326ea800403c88c8cc00400400c896600200314bd7044cc8966002600a00513301e00233004004001899802002000a034301d001301e001406c446466002002603a00644b30010018a508acc004cdc79bae3019301d0010038a51899801001180f000a030406d2259800800c520008980499801001180e000a0329192cc004c01cc05cdd5000c4c06cc060dd5000c590161805180b9baa001912cc004c040c05cdd500144c8c8c8c8ca60026eb8c0800066eb8c0800166eb8c080012604000491112cc004c094016266022604800e2660220020151640883020001301f001301e001301d00130183754005164059222300e323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901d44cc014014c08c01101d1bae301c001375a603a002603e00280e8cc02001000c52000488888ca60024464b3001300e32330010010022259800800c52000899914c004dd718110014dd598118014896600200310038991991180c9980280298160021bae3025001375a604c00260500028131222330010010021812000998010011812800a0448992cc004c054c014006264660100022b3001337206eb8c090c084dd50009bae301530213754003159800981280144c8c96600260306eb4c08c00a2b30015980099b8f001375c604c60466ea800e294626020002810a20071640851640846eb8c084004c09000a2c81122c80f8c0200122c80f0cc03400400a2c80e8dd59809180f1baa0029bac301f30200069bac301f006488966002602e603c6ea80662b30013301137586044603e6ea80588cdd7981198101baa0010278acc004c08c00a264b3001598008014528c52820428acc004c034dd7181198101baa0018acc004cdc79bae3014302037540029111effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008acc004cdd7980998101baa0014c0105d8799f40ff008acc004cdd7980598101baa0014c0105d8799f40ff008acc004c034dd7180618101baa0018cc004dd5980618101baa01780b522100401914a080f2294101e4528203c8a50407914a080f2294101e19801981100100ac590204528203a89919912cc004c068c084dd5000c4c966002603660446ea8006264646644b3001302b0038992cc004c0b002a26466020002264b30010038992cc004c004dc6805c56600266e40dd7181718159baa00300b8acc004cdc80059bae301f302b3754007159800cc004dd5980b98159baa022810c02d01145660026034646600200200644b30010018a40011301e33002002303100140b91598009980e80112cc004cdc79bae302f302c37540026eb8c0bcc0b0dd5002456600266e3cdd7181018161baa00100c8acc004cdd7980f98161baa001301f302c375400915980099baf3017302c3754002602e60586ea8012266e3cdd7180c18161baa001375c603060586ea8012294102a452820548a5040a914a0815226603a00446464b30013371e6eb8c0c4c0b8dd5001807456600266e3cdd7181118171baa003375c6044605c6ea801a2b300130013021302e37540071598009800980c98171baa0038acc004c098dc69bae301a302e375400714a313004371a6eb8c068c0b8dd5001a0588a5040b114a08162294102c45282058259800981318169baa001898011bae3031302e375400313002375c6062605c6ea800502c1192cc004c01000629462604c0028160dc6800c52820528a5040a514a0814a2941029452820528a5040a46e1d20388a5040a0646600200201a44b30010018a5eb8226605a6601e605c00204266004004605e0028160c040c070c0a0dd518158054590292cc004c8cc004004c8cc004004dd5980a98149baa0202259800800c52f5c113233223322330020020012259800800c400e264660646e9ccc0c8dd4802998191817800998191818000a5eb80cc00c00cc0d0008c0c80050301bab302d003375c605400266006006605e004605a0028158896600200314a1159800992cc004cdc79bae302d00100a899b8848000dd6981698171817000c52820503758605800314a3133002002302d001409c8152266e3cde419b8a4881010300337146eb8c0a8c09cdd500299b8a375c605460560106eb8c06cc09cdd5002803c528204a8b2050375c60500026eb8c0a0008c0a0004c08cdd5000c590211805180b18111baa3025302237540031640806eb8c08c004c8cc004004dd6180a98109baa0182259800800c530103d87a80008992cc0066002b3001330113756602e60466ea8c05cc08cdd50008104528c5282048a50a51408513374a900019812800a5eb82266006006604e0048108c094005023180f9baa019407430040040c02cdd50031bae300d300a37540066e1d20028b2010180480098021baa0098a4d1365640081",hash:"7caba74f4f7d0b7f813a05552ba48bbcd3b49f6d6b4fda9c22a3fe06"},{title:"registry_mint.registry_mint.else",redeemer:{schema:{}},parameters:[{title:"utxo_ref",schema:{$ref:"#/definitions/cardano~1transaction~1OutputReference"}},{title:"issuance_cbor_hex_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"5908ea0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e266446644b300130060018acc004c038dd5004400a2c807a2b300130030018991919912cc004c05800e00d16404c6eb8c04c004dd71809801180980098071baa0088b20184030330012301030110019180818089808800c88c8cc00400400c896600200314a115980098019809800c528c4cc008008c05000500e20229b804800a4464b30013007001899192cc004c05400a0091640486eb8c04c004c03cdd5001c56600260080031323259800980a80140122c8090dd7180980098079baa0038b201a4034601a6ea800a6e1d200491191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c809226600a00a60300088090dd718088009bab301200130140014048297adef6c609b8f48900918081808980898089808800c8c040c044c044c04400522222222229800999119912cc00400a26603898010180003301c374e00297ae08992cc004c8cc00400400c896600200314a315980099baf3020301d3754604000200713300200230210018a50406c80f226603a6e9c00ccc074dd380125eb822c80c8c074c068dd51807180d1baa301d002406c660046eb0c06cc060dd50079198011bab300d30193754601a60326ea800403ccc008dd61805980c1baa00f2330023756601a60326ea800403c88c8cc00400400c896600200314bd7044cc8966002600a00513301e00233004004001899802002000a034301d001301e001406c446466002002603a00644b30010018a508acc004cdc79bae3019301d0010038a51899801001180f000a030406d2259800800c520008980499801001180e000a0329192cc004c01cc05cdd5000c4c06cc060dd5000c590161805180b9baa001912cc004c040c05cdd500144c8c8c8c8ca60026eb8c0800066eb8c0800166eb8c080012604000491112cc004c094016266022604800e2660220020151640883020001301f001301e001301d00130183754005164059222300e323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901d44cc014014c08c01101d1bae301c001375a603a002603e00280e8cc02001000c52000488888ca60024464b3001300e32330010010022259800800c52000899914c004dd718110014dd598118014896600200310038991991180c9980280298160021bae3025001375a604c00260500028131222330010010021812000998010011812800a0448992cc004c054c014006264660100022b3001337206eb8c090c084dd50009bae301530213754003159800981280144c8c96600260306eb4c08c00a2b30015980099b8f001375c604c60466ea800e294626020002810a20071640851640846eb8c084004c09000a2c81122c80f8c0200122c80f0cc03400400a2c80e8dd59809180f1baa0029bac301f30200069bac301f006488966002602e603c6ea80662b30013301137586044603e6ea80588cdd7981198101baa0010278acc004c08c00a264b3001598008014528c52820428acc004c034dd7181198101baa0018acc004cdc79bae3014302037540029111effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008acc004cdd7980998101baa0014c0105d8799f40ff008acc004cdd7980598101baa0014c0105d8799f40ff008acc004c034dd7180618101baa0018cc004dd5980618101baa01780b522100401914a080f2294101e4528203c8a50407914a080f2294101e19801981100100ac590204528203a89919912cc004c068c084dd5000c4c966002603660446ea8006264646644b3001302b0038992cc004c0b002a26466020002264b30010038992cc004c004dc6805c56600266e40dd7181718159baa00300b8acc004cdc80059bae301f302b3754007159800cc004dd5980b98159baa022810c02d01145660026034646600200200644b30010018a40011301e33002002303100140b91598009980e80112cc004cdc79bae302f302c37540026eb8c0bcc0b0dd5002456600266e3cdd7181018161baa00100c8acc004cdd7980f98161baa001301f302c375400915980099baf3017302c3754002602e60586ea8012266e3cdd7180c18161baa001375c603060586ea8012294102a452820548a5040a914a0815226603a00446464b30013371e6eb8c0c4c0b8dd5001807456600266e3cdd7181118171baa003375c6044605c6ea801a2b300130013021302e37540071598009800980c98171baa0038acc004c098dc69bae301a302e375400714a313004371a6eb8c068c0b8dd5001a0588a5040b114a08162294102c45282058259800981318169baa001898011bae3031302e375400313002375c6062605c6ea800502c1192cc004c01000629462604c0028160dc6800c52820528a5040a514a0814a2941029452820528a5040a46e1d20388a5040a0646600200201a44b30010018a5eb8226605a6601e605c00204266004004605e0028160c040c070c0a0dd518158054590292cc004c8cc004004c8cc004004dd5980a98149baa0202259800800c52f5c113233223322330020020012259800800c400e264660646e9ccc0c8dd4802998191817800998191818000a5eb80cc00c00cc0d0008c0c80050301bab302d003375c605400266006006605e004605a0028158896600200314a1159800992cc004cdc79bae302d00100a899b8848000dd6981698171817000c52820503758605800314a3133002002302d001409c8152266e3cde419b8a4881010300337146eb8c0a8c09cdd500299b8a375c605460560106eb8c06cc09cdd5002803c528204a8b2050375c60500026eb8c0a0008c0a0004c08cdd5000c590211805180b18111baa3025302237540031640806eb8c08c004c8cc004004dd6180a98109baa0182259800800c530103d87a80008992cc0066002b3001330113756602e60466ea8c05cc08cdd50008104528c5282048a50a51408513374a900019812800a5eb82266006006604e0048108c094005023180f9baa019407430040040c02cdd50031bae300d300a37540066e1d20028b2010180480098021baa0098a4d1365640081",hash:"7caba74f4f7d0b7f813a05552ba48bbcd3b49f6d6b4fda9c22a3fe06"},{title:"registry_spend.registry_spend.spend",datum:{title:"_datum",schema:{$ref:"#/definitions/Data"}},redeemer:{title:"_redeemer",schema:{$ref:"#/definitions/Data"}},parameters:[{title:"protocol_params_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59025f010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c020dd500144cc8a6002601c005300e300f00299198008009bac3002300c375400844b30010018a60103d87a80008992cc004c8cc004004c04cdd5980298079baa3005300f375400444b30010018a508acc004cdc79bae300f301300100d8a51899801001180a000a01c404513374a900019808000a5eb8226600600660240048060c04000500e4dc3a400091112cc004c004c038dd500144c8c966002600660206ea800a2646644b30013018001899192cc004c02000626464b3001301c0028044590191bae301a0013016375400515980099b874800800626464b3001301c0028044590191bae301a0013016375400516405080a0c050dd5000980b800c590151bae301500130160013011375400516403c264646600200264660020026eacc058c05cc05cc05cc05cc04cdd5005912cc004006297ae08991991199119801001000912cc00400620071323301c374e660386ea4014cc070c064004cc070c0680052f5c066006006603c004603800280d0dd5980b8019bae30140013300300330190023017001405444b30010018a508acc004c96600266e3cdd7180b800802466002600c6eb4c05cc060c060006942945012452820243758602c00314a31330020023017001404480a0dd7180998081baa001325980099b8748010c03cdd5000c4c04cc040dd5000c5900e18091809980998079baa3005300f37546024601e6ea800a2c806860126ea80088c034c0380062c8038601200260086ea802629344d95900201",hash:"d38270f68cf6138cc7815cce73342378701cc6352f6f15f65235f6b5"},{title:"registry_spend.registry_spend.else",redeemer:{schema:{}},parameters:[{title:"protocol_params_cs",schema:{$ref:"#/definitions/cardano~1assets~1PolicyId"}}],compiledCode:"59025f010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c020dd500144cc8a6002601c005300e300f00299198008009bac3002300c375400844b30010018a60103d87a80008992cc004c8cc004004c04cdd5980298079baa3005300f375400444b30010018a508acc004cdc79bae300f301300100d8a51899801001180a000a01c404513374a900019808000a5eb8226600600660240048060c04000500e4dc3a400091112cc004c004c038dd500144c8c966002600660206ea800a2646644b30013018001899192cc004c02000626464b3001301c0028044590191bae301a0013016375400515980099b874800800626464b3001301c0028044590191bae301a0013016375400516405080a0c050dd5000980b800c590151bae301500130160013011375400516403c264646600200264660020026eacc058c05cc05cc05cc05cc04cdd5005912cc004006297ae08991991199119801001000912cc00400620071323301c374e660386ea4014cc070c064004cc070c0680052f5c066006006603c004603800280d0dd5980b8019bae30140013300300330190023017001405444b30010018a508acc004c96600266e3cdd7180b800802466002600c6eb4c05cc060c060006942945012452820243758602c00314a31330020023017001404480a0dd7180998081baa001325980099b8748010c03cdd5000c4c04cc040dd5000c5900e18091809980998079baa3005300f37546024601e6ea800a2c806860126ea80088c034c0380062c8038601200260086ea802629344d95900201",hash:"d38270f68cf6138cc7815cce73342378701cc6352f6f15f65235f6b5"}],definitions:{ByteArray:{title:"ByteArray",dataType:"bytes"},Data:{title:"Data",description:"Any Plutus data."},Int:{dataType:"integer"},"List<types/RegistryProof>":{dataType:"list",items:{$ref:"#/definitions/types~1RegistryProof"}},"aiken/crypto/ScriptHash":{title:"ScriptHash",dataType:"bytes"},"aiken/crypto/VerificationKeyHash":{title:"VerificationKeyHash",dataType:"bytes"},"cardano/address/Credential":{title:"Credential",description:`A general structure for representing an on-chain \`Credential\`.
|
|
131
131
|
|
|
132
132
|
Credentials are always one of two kinds: a direct public/private key
|
|
133
133
|
pair, or a script (native or Plutus).`,anyOf:[{title:"VerificationKey",dataType:"constructor",index:0,fields:[{$ref:"#/definitions/aiken~1crypto~1VerificationKeyHash"}]},{title:"Script",dataType:"constructor",index:1,fields:[{$ref:"#/definitions/aiken~1crypto~1ScriptHash"}]}]},"cardano/assets/PolicyId":{title:"PolicyId",dataType:"bytes"},"cardano/transaction/OutputReference":{title:"OutputReference",description:"An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",anyOf:[{title:"OutputReference",dataType:"constructor",index:0,fields:[{title:"transaction_id",$ref:"#/definitions/ByteArray"},{title:"output_index",$ref:"#/definitions/Int"}]}]},"types/ProgrammableLogicGlobalRedeemer":{title:"ProgrammableLogicGlobalRedeemer",description:"Redeemer for the global programmable logic stake validator",anyOf:[{title:"TransferAct",description:"Transfer action with proofs for each token type",dataType:"constructor",index:0,fields:[{title:"proofs",$ref:"#/definitions/List<types~1RegistryProof>"}]},{title:"ThirdPartyAct",description:`Third party action for admin operations (seizure, freeze, etc.)
|
|
134
|
-
Supports multiple UTxOs in a single transaction`,dataType:"constructor",index:1,fields:[{title:"registry_node_idx",description:"Index of the registry node in reference inputs",$ref:"#/definitions/Int"},{title:"outputs_start_idx",description:"Starting index in outputs where processed outputs begin",$ref:"#/definitions/Int"},{title:"length_inputs",description:"Length of input_idxs list (for validation)",$ref:"#/definitions/Int"}]}]},"types/RegistryProof":{title:"RegistryProof",description:"Proof that a token is (or is not) in the registry",anyOf:[{title:"TokenExists",description:"Token exists in the registry at this reference input index",dataType:"constructor",index:0,fields:[{title:"node_idx",$ref:"#/definitions/Int"}]},{title:"TokenDoesNotExist",description:"Token does not exist (proof via covering node at this index)",dataType:"constructor",index:1,fields:[{title:"node_idx",$ref:"#/definitions/Int"}]}]},"types/RegistryRedeemer":{title:"RegistryRedeemer",description:"Redeemer for registry minting policy (linked list operations)",anyOf:[{title:"RegistryInit",description:"Initialize the registry with the origin node",dataType:"constructor",index:0,fields:[]},{title:"RegistryInsert",description:"Insert a new programmable token policy into the registry",dataType:"constructor",index:1,fields:[{title:"key",$ref:"#/definitions/ByteArray"},{title:"hashed_param",$ref:"#/definitions/ByteArray"}]}]},"types/SmartTokenMintingAction":{title:"SmartTokenMintingAction",description:"Action for the minting policy",anyOf:[{title:"SmartTokenMintingAction",dataType:"constructor",index:0,fields:[{title:"minting_logic_cred",description:"The credential of the minting logic script that must be invoked",$ref:"#/definitions/cardano~1address~1Credential"}]}]}}};import{deserializeAddress as g2}from"@meshsdk/core-cst";import{deserializeDatum as w2}from"@meshsdk/core";import{deserializeAddress as qc,buildBaseAddress as w1,CredentialType as Wc}from"@meshsdk/core-cst";var w0={txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",protocolParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:0},scriptHash:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",alwaysFailScriptHash:"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99"},programmableLogicGlobalParams:{protocolParamsScriptHash:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",scriptHash:"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046"},programmableLogicBaseParams:{programmableLogicGlobalScriptHash:"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046",scriptHash:"3a7ce34145cbc597a85ac83db88c029ff9e909d92e04a7b2376b31ff"},issuanceParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:1},scriptHash:"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1",alwaysFailScriptHash:"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99"},directoryMintParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:0},issuanceScriptHash:"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1",scriptHash:"91b403111a7fab9ffbf5a3c7485d3f9a79d5bf65f38c8d48359be4c0"},directorySpendParams:{protocolParamsPolicyId:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",scriptHash:"b672f3b03d19cd40c59c447aabd6c26ca296bbc78b205e5227317638"},programmableBaseRefInput:{txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",outputIndex:3},programmableGlobalRefInput:{txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",outputIndex:4}};var b2=async(o,r)=>{let c=qc(o).asBase()?.getStakeCredential().hash;if(!c)throw new Error("Address missing stake credential");let a=await new q(r).programmableLogicBase(w0);return w1(r,a.policyId,c,Wc.ScriptHash,Wc.KeyHash).toAddress().toBech32()},b0=o=>{let r=qc(o).asBase()?.getStakeCredential().hash;if(!r)throw new Error("Address missing stake credential");return r};async function T0(o,r,c){let e=new N(o),a=await e.blacklistMint(r,c),t=await e.blacklistSpend(a.policyId);return{blacklistMint:a,blacklistSpend:t}}var l2=async(o,r)=>(await new N(r).blacklistSpend(o)).address;var A0=(o,r=!0)=>{let c=r?[Lc]:[Ec,Kc];for(let e of c){let a=e.validators.find(({title:t})=>t===o);if(a)return a.compiledCode}throw new Error(`Validator ${o} not found`)},jc=o=>T1.encode(Buffer.from(o,"hex")).toString("hex");function t0(o){if(!o)return"";if(typeof o=="string")return o;if(o.bytes)return o.bytes;if(o.fields&&o.fields.length>0){let r=o.fields[0];if(typeof r=="string")return r;if(r?.bytes)return r.bytes}return""}function k0(o){if(!o?.fields||o.fields.length<5)return null;let r=c=>({hash:t0(c),index:c.constructor??0});return{key:t0(o.fields[0]),next:t0(o.fields[1]),transferScript:r(o.fields[2]),thirdPartyScript:r(o.fields[3]),metadata:t0(o.fields[4])}}function S0(o){return!o?.fields||o.fields.length<2?null:{key:t0(o.fields[0]),next:t0(o.fields[1])}}var zc=async(o,r,c)=>{let e=[],a=0;for(let d of o){if(a>=c)break;let s=d.output.amount.find(n=>n.unit===r);s&&(e.push(d),a+=Number(s.quantity))}let t=a-c;return{selectedUtxos:e,returningAmount:t}};var q=class{constructor(r){i(this,"networkID",r)}build(r,c){let e=Gc(A0(r),c,"JSON");return{cbor:e,plutusScript:{code:e,version:"V3"}}}txRef(r){return q0(0,[v(r.txHash),Jc(r.outputIndex)])}resolveParam(r,c,e){let a=typeof r=="string"?r:c(r);if(!a)throw new Error(e);return a}toAddress(r,c=void 0){return Xc(r,c,this.networkID,!1).address}async issuanceMint(r,c){let e=this.resolveParam(c,d=>d.programmableLogicBaseParams.scriptHash,"could not resolve issuance mint parameters"),{cbor:a,plutusScript:t}=this.build("issuance_mint.issuance_mint.mint",[C0([v(e)]),C0([v(r)])]);return{cbor:a,plutusScript:t,policyId:j(a,"V3"),address:this.toAddress(t)}}async issuanceCborHexMint(r){let{cbor:c,plutusScript:e}=this.build("issuance_cbor_hex_mint.issuance_cbor_hex_mint.mint",[this.txRef(r)]);return{cbor:c,plutusScript:e,policyId:j(c,"V3"),address:this.toAddress(e)}}async programmableLogicBase(r){let c=this.resolveParam(r,t=>t.programmableLogicGlobalParams.scriptHash,"could not resolve logic base parameter"),{cbor:e,plutusScript:a}=this.build("programmable_logic_base.programmable_logic_base.spend",[C0([v(c)])]);return{cbor:e,plutusScript:a,policyId:j(e,"V3")}}async programmableLogicGlobal(r){let c=this.resolveParam(r,d=>d.protocolParams.scriptHash,"could not resolve logic global parameter"),{cbor:e,plutusScript:a}=this.build("programmable_logic_global.programmable_logic_global.withdraw",[v(c)]),t=j(e,"V3");return{cbor:e,plutusScript:a,scriptHash:t,rewardAddress:j0(t,this.networkID)}}async protocolParamMint(r){let{cbor:c,plutusScript:e}=this.build("protocol_params_mint.protocol_params_mint.mint",[this.txRef(r)]),a=j(c,"V3");return{cbor:c,plutusScript:e,scriptHash:a,address:this.toAddress(e)}}async registryMint(r,c){let e=typeof r=="string"?r:r.directoryMintParams.issuanceScriptHash,a=typeof r=="string"?c:r.directoryMintParams.txInput;if(!a)throw new Error("register mint utxo parameter could not resolve");if(!e)throw new Error("registry mint param script hash could not resolve");let{cbor:t,plutusScript:d}=this.build("registry_mint.registry_mint.mint",[this.txRef(a),v(e)]);return{cbor:t,plutusScript:d,policyId:j(t,"V3")}}async registrySpend(r){let c=this.resolveParam(r,t=>t.protocolParams.scriptHash,"could not resolve params for registry spend"),{cbor:e,plutusScript:a}=this.build("registry_spend.registry_spend.spend",[v(c)]);return{cbor:e,plutusScript:a,policyId:j(e,"V3"),address:this.toAddress(a,"")}}},N=class{constructor(r){i(this,"networkID",r)}buildRaw(r){let c=jc(A0(r,!1)),e={code:c,version:"V3"},a=j(c,"V3"),t=j0(a,this.networkID);return{_cbor:c,plutusScript:e,policyId:a,rewardAddress:t}}buildWithParams(r,c){let e=A0(r,!1),a=Gc(e,c,"JSON"),t={code:a,version:"V3"},d=j(a,"V3"),s=j0(d,this.networkID);return{cbor:a,plutusScript:t,policyId:d,rewardAddress:s}}txRef(r){return q0(0,[v(r.txHash),Jc(r.outputIndex)])}async issue(){return this.buildRaw("transfer.issue.withdraw")}async transfer(){return this.buildRaw("transfer.transfer.withdraw")}async blacklistSpend(r){let{cbor:c,plutusScript:e,policyId:a}=this.buildWithParams("blacklist_spend.blacklist_spend.spend",[v(r)]),t=Xc(e,"",this.networkID,!1).address;return{cbor:c,plutusScript:e,address:t,policyId:a}}async blacklistMint(r,c){return this.buildWithParams("blacklist_mint.blacklist_mint.mint",[this.txRef(r),v(c)])}async issuerAdmin(r){return this.buildWithParams("example_transfer_logic.issuer_admin_contract.withdraw",[q0(0,[v(r)])])}async customTransfer(r,c){let{cbor:e,plutusScript:a,policyId:t,rewardAddress:d}=this.buildWithParams("example_transfer_logic.transfer.withdraw",[C0([v(r)]),v(c)]);return{cbor:e,plutusScript:a,policyId:t,rewardAddress:d}}};var Zc=class extends _{constructor(c,e){super(c);i(this,"inputs",c);i(this,"_blacklistBootstrap");i(this,"_params");i(this,"mintToken",async(c,e,a,t)=>{let d=this._params,s=this.fetcher,n=this.wallet;if(!d||!s||!n)throw new Error("Contract parameters, fetcher, or wallet not initialized");let{utxos:b,walletAddress:l,collateral:f}=await this.getWalletInfoForTx(),p=new q(this.networkId),h=await new N(this.networkId).issuerAdmin(a),w=h.cbor,S=h.policyId,O=await p.issuanceMint(S,d),C=k([l0([D(S)])]),A=[{unit:"lovelace",quantity:"1300000"},{unit:O.policyId+f0(c),quantity:e}],T=k([]);return this.mesh.txEvaluationMultiplier=1.3,this.mesh.withdrawalPlutusScriptV3().withdrawal(h.rewardAddress,"0").withdrawalScript(w).withdrawalRedeemerValue(k([]),"JSON").mintPlutusScriptV3().mint(e,O.policyId,f0(c)).mintingScript(O.cbor).mintRedeemerValue(C,"JSON").txOut(t,A).txOutInlineDatumValue(T,"JSON").requiredSignerHash(a).txInCollateral(f.input.txHash,f.input.outputIndex).selectUtxosFrom(b).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(l),await this.mesh.complete()});i(this,"burnToken",async(c,e,a,t,d)=>{let s=this._params,n=this.fetcher,b=this.wallet;if(!s||!n||!b)throw new Error("Contract parameters, fetcher, or wallet not initialized");let{utxos:l,walletAddress:f,collateral:p}=await this.getWalletInfoForTx(),u=new q(this.networkId),h=new N(this.networkId),w=await u.programmableLogicBase(s),S=await u.programmableLogicGlobal(s),O=await u.registrySpend(s),C=await h.issuerAdmin(d),A=await u.issuanceMint(C.policyId,s),T=(await n.fetchUTxOs(a,t))?.[0];if(!T)throw new Error("Token UTxO not found");let x=A.policyId+f0(c),B=T.output.amount.find(m=>m.unit===x)?.quantity??"0";if(Number(e)>Number(B))throw new Error("Not enough tokens to burn");let V=(await n.fetchAddressUTxOs(O.address)).find(m=>m.output.plutusData?k0(d0(m.output.plutusData))?.key===A.policyId:!1);if(!V)throw new Error("Registry entry not found, token not registered");let H=l.find(m=>BigInt(m.output.amount.find(P=>P.unit==="lovelace")?.quantity??"0")>5000000n);if(!H)throw new Error("No UTXO with enough ADA for fees found");let z=(await n.fetchUTxOs(s.txHash,0))?.[0];if(!z)throw new Error("Protocol params missing");let Q=[H,T].length,M=(m,P)=>m.input.txHash!==P.input.txHash?m.input.txHash.localeCompare(P.input.txHash):m.input.outputIndex-P.input.outputIndex,F=[z,V].sort(M),J=F.findIndex(m=>m.input.txHash===V.input.txHash&&m.input.outputIndex===V.input.outputIndex);if(J===-1)throw new Error("Could not find registry in sorted reference inputs");let i0=k([l0([D(C.policyId)])]),Y=l0([G(J),G(0),G(Q)]),E=T.output.amount.map(m=>m.unit===x?{unit:m.unit,quantity:String(BigInt(m.quantity)-BigInt(e))}:m).filter(m=>BigInt(m.quantity)>0n);this.mesh.txEvaluationMultiplier=1.3,this.mesh.txIn(H.input.txHash,H.input.outputIndex).spendingPlutusScriptV3().txIn(T.input.txHash,T.input.outputIndex).txInScript(w.cbor).txInInlineDatumPresent().txInRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(C.rewardAddress,"0").withdrawalScript(C.cbor).withdrawalRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(S.rewardAddress,"0").withdrawalScript(S.cbor).withdrawalRedeemerValue(Y,"JSON").mintPlutusScriptV3().mint(`-${e}`,A.policyId,f0(c)).mintingScript(A.cbor).mintRedeemerValue(i0,"JSON"),E.length>0&&this.mesh.txOut(T.output.address,E).txOutInlineDatumValue(k([]),"JSON");for(let m of F)this.mesh.readOnlyTxInReference(m.input.txHash,m.input.outputIndex);return this.mesh.requiredSignerHash(d).txInCollateral(p.input.txHash,p.input.outputIndex).selectUtxosFrom(l).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(f),await this.mesh.complete()});i(this,"transferToken",async(c,e,a,t)=>{let d=this._params,s=this.fetcher,n=this.wallet;if(!d||!s||!n)throw new Error("Contract parameters, fetcher, or wallet not initialized");let b=c.substring(0,Yc),{utxos:l,walletAddress:f,collateral:p}=await this.getWalletInfoForTx(),u=new q(this.networkId),h=new N(this.networkId),w=await u.programmableLogicBase(d),S=await u.programmableLogicGlobal(d),O=await u.registrySpend(d);if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let C=this._blacklistBootstrap.blacklistMintBootstrap.scriptHash,A=await h.customTransfer(d.programmableLogicBaseParams.scriptHash,C),T=A.cbor;if(!(await s.fetchAddressUTxOs(O.address)).find(y=>y.output.plutusData?k0(d0(y.output.plutusData))?.key===b:!1))throw new Error("Could not find registry entry for token");let B=(await s.fetchUTxOs(d.txHash,0))?.[0];if(!B)throw new Error("Could not resolve protocol params");let U=await s.fetchAddressUTxOs(a);if(!U?.length)throw new Error("No programmable tokens found at sender address");let{selectedUtxos:V}=await zc(U,c,Number(e));if(!V.length)throw new Error("Not enough funds");let H=(y,R)=>y.input.txHash!==R.input.txHash?y.input.txHash.localeCompare(R.input.txHash):y.input.outputIndex-R.input.outputIndex,z=[...V].sort(H),Q=[],M=[];for(let y of z){Q.push(y);for(let R of y.output.amount){if(R.unit==="lovelace")continue;let $=R.unit.substring(0,56);M.includes($)||M.push($)}}M.sort();let F=[];if(C){let y=await h.blacklistSpend(C),R=await s.fetchAddressUTxOs(y.address);for(let $ of Q){let Z=b0($.output.address);if(!Z)throw new Error("UTXO missing stake credential");let p0=R.find(G0=>{if(!G0.output.plutusData)return!1;let r0=S0(d0(G0.output.plutusData));if(!r0)return!1;let te=r0.key===""||Z>r0.key,de=r0.next===""||Z<r0.next;return te&&de});if(!p0)throw new Error(`Blacklist proof not found for wallet ${Z}`);F.push(p0)}}let J=[],i0=await s.fetchAddressUTxOs(O.address);for(let y of M){let R=d.directoryMintParams.scriptHash+y,$=i0.find(Z=>Z.output.amount.find(p0=>p0.unit===R));if(!$)throw new Error(`Registry node not found for policy ${y}`);J.push($)}let E=[...[...new Map(F.map(y=>[`${y.input.txHash}#${y.input.outputIndex}`,y])).values()],...J,B].sort(H),m=Qc(F.map(y=>{let R=E.findIndex($=>$.input.txHash===y.input.txHash&&$.input.outputIndex===y.input.outputIndex);return k([G(R)])})),P=k([Qc(J.map(y=>{let R=E.findIndex($=>$.input.txHash===y.input.txHash&&$.input.outputIndex===y.input.outputIndex);return k([G(R)])}))]),z0=V.reduce((y,R)=>y+BigInt(R.output.amount.find($=>$.unit===c)?.quantity??"0"),0n),ce=V.reduce((y,R)=>y+BigInt(R.output.amount.find($=>$.unit==="lovelace")?.quantity??"0"),0n);if(z0<BigInt(e))throw new Error("Not enough funds");let J0=1500000n,_0=z0-BigInt(e),ee=[{unit:"lovelace",quantity:J0.toString()},{unit:c,quantity:e}],O0=ce-J0,ae=[{unit:"lovelace",quantity:(O0>1000000n?O0:1500000n).toString()},..._0>0n?[{unit:c,quantity:_0.toString()}]:[]];this.mesh.verbose=!0,this.mesh.evaluator=this.inputs.mesh.evaluator;for(let y of z)this.mesh.spendingPlutusScriptV3().txIn(y.input.txHash,y.input.outputIndex).txInScript(w.cbor).txInRedeemerValue(k([]),"JSON").txInInlineDatumPresent();this.mesh.withdrawalPlutusScriptV3().withdrawal(A.rewardAddress,"0").withdrawalScript(T).withdrawalRedeemerValue(m,"JSON").withdrawalPlutusScriptV3().withdrawal(S.rewardAddress,"0").withdrawalScript(S.cbor).withdrawalRedeemerValue(P,"JSON"),(_0>0n||O0>1000000n)&&this.mesh.txOut(a,ae).txOutInlineDatumValue(k([]),"JSON"),this.mesh.txOut(t,ee).txOutInlineDatumValue(k([]),"JSON");for(let y of E)this.mesh.readOnlyTxInReference(y.input.txHash,y.input.outputIndex);return this.mesh.requiredSignerHash(b0(a)).setFee("600000").txInCollateral(p.input.txHash,p.input.outputIndex).selectUtxosFrom(l).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(f),await this.mesh.complete()});i(this,"blacklistSmartWalletAddress",async c=>{let e=this.fetcher,a=this.wallet;if(!e||!a)throw new Error("Fetcher or wallet not initialized");let{utxos:t,walletAddress:d,collateral:s}=await this.getWalletInfoForTx();if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let n=this._blacklistBootstrap.blacklistMintBootstrap,{blacklistMint:b,blacklistSpend:l}=await T0(this.networkId,n.txInput,n.adminPubKeyHash);if(!this.fetcher)throw new Error("Fetcher not initialized");let f=await e.fetchAddressUTxOs(l.address);if(!f?.length)throw new Error("No blacklist UTxOs found");let p=b0(c),u=null,h=null;for(let T of f){if(!T.output.plutusData)continue;let x=S0(d0(T.output.plutusData));if(x){if(x.key===p)throw new Error("Target address is already blacklisted");if(x.key.localeCompare(p)<0&&p.localeCompare(x.next)<0){u=T,h=x;break}}}if(!u||!h)throw new Error("Could not find blacklist node to replace");let w=k([D(h.key),D(p)]),S=k([D(p),D(h.next)]),O=l0([D(p)]),C=k([]),A=[{unit:b.policyId+p,quantity:"1"}];return this.mesh.txEvaluationMultiplier=1.3,this.mesh.spendingPlutusScriptV3().txIn(u.input.txHash,u.input.outputIndex).txInScript(l.cbor).txInRedeemerValue(C,"JSON").txInInlineDatumPresent().mintPlutusScriptV3().mint("1",b.policyId,p).mintingScript(b.cbor).mintRedeemerValue(O,"JSON").txOut(l.address,u.output.amount).txOutInlineDatumValue(w,"JSON").txOut(l.address,A).txOutInlineDatumValue(S,"JSON").requiredSignerHash(this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash).txInCollateral(s.input.txHash,s.input.outputIndex).selectUtxosFrom(t).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(d),await this.mesh.complete()});i(this,"whitelistSmartWalletAddress",async c=>{let e=this.fetcher,{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx();if(!e)throw new Error("Fetcher or wallet not initialized");let s=b0(c);if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let n=this._blacklistBootstrap.blacklistMintBootstrap,{blacklistMint:b,blacklistSpend:l}=await T0(this.networkId,n.txInput,n.adminPubKeyHash);if(!this.fetcher)throw new Error("Fetcher not initialized");let f=await e.fetchAddressUTxOs(l.address);if(!f?.length)throw new Error("No blacklist UTxOs found");let p=null,u=null,h=null,w=null;for(let T of f){if(!T.output.plutusData)continue;let x=S0(d0(T.output.plutusData));if(x&&(x.key===s&&(p=T,u=x),x.next===s&&(h=T,w=x),p&&h))break}if(!p||!u)throw new Error("Could not resolve relevant blacklist nodes (node to remove)");if(!h||!w)throw new Error("Could not resolve relevant blacklist nodes (node to update)");let S=u.next,O=k([D(w.key),D(S)]),C=A1([D(s)]),A=k([]);return this.mesh.txEvaluationMultiplier=1.3,this.mesh.spendingPlutusScriptV3().txIn(p.input.txHash,p.input.outputIndex).txInScript(l.cbor).txInInlineDatumPresent().txInRedeemerValue(A,"JSON").spendingPlutusScriptV3().txIn(h.input.txHash,h.input.outputIndex).txInScript(l.cbor).txInInlineDatumPresent().txInRedeemerValue(A,"JSON").mintPlutusScriptV3().mint("-1",b.policyId,s).mintingScript(b.cbor).mintRedeemerValue(C,"JSON").txOut(l.address,h.output.amount).txOutInlineDatumValue(O,"JSON").requiredSignerHash(this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash).txInCollateral(d.input.txHash,d.input.outputIndex).selectUtxosFrom(a).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(t),await this.mesh.complete()});i(this,"seizeToken",async(c,e,a,t,d)=>{let s=this._params,n=this.fetcher,b=this.wallet;if(!s||!n||!b)throw new Error("Contract parameters, fetcher, or wallet not initialized");let l=c.substring(0,Yc),{utxos:f,walletAddress:p,collateral:u}=await this.getWalletInfoForTx(),h=new q(this.networkId),w=new N(this.networkId),S=await h.programmableLogicBase(s),O=await h.programmableLogicGlobal(s),C=await h.registrySpend(s),A=f.find(m=>BigInt(m.output.amount.find(P=>P.unit==="lovelace")?.quantity??"0")>10000000n);if(!A)throw new Error("No UTXO with enough ADA for fees found");let x=(await n.fetchUTxOs(e,a))?.[0];if(!x)throw new Error("Could not find utxo to seize");if(!x.output.plutusData)throw new Error("UTXO to seize must have inline datum");let B=[A,x].length,U=x.output.amount.find(m=>m.unit===c);if(!U)throw new Error("UTXO does not contain the specified token");if(Number(U.quantity)<=0)throw new Error("UTXO token quantity must be greater than zero");let H=(await n.fetchAddressUTxOs(C.address)).find(m=>m.output.plutusData?k0(d0(m.output.plutusData))?.key===l:!1);if(!H)throw new Error("Could not find registry entry for token");let z=(await n.fetchUTxOs(s.txHash,0))?.[0];if(!z)throw new Error("Could not resolve protocol params");let Q=(m,P)=>m.input.txHash!==P.input.txHash?m.input.txHash.localeCompare(P.input.txHash):m.input.outputIndex-P.input.outputIndex,M=[z,H].sort(Q),F=M.findIndex(m=>m.input.txHash===H.input.txHash&&m.input.outputIndex===H.input.outputIndex);if(F===-1)throw new Error("Could not find registry in sorted reference inputs");let J=l0([G(F),G(1),G(B)]),i0=[{unit:"lovelace",quantity:"1500000"},{unit:c,quantity:U.quantity}],Y=x.output.amount.filter(m=>m.unit!==c);Y.length===0&&Y.push({unit:"lovelace",quantity:"1000000"});let E=await w.issuerAdmin(t);this.mesh.txEvaluationMultiplier=1.3,this.mesh.txIn(A.input.txHash,A.input.outputIndex).spendingPlutusScriptV3().txIn(x.input.txHash,x.input.outputIndex).txInScript(S.cbor).txInRedeemerValue(k([]),"JSON").txInInlineDatumPresent().withdrawalPlutusScriptV3().withdrawal(E.rewardAddress,"0").withdrawalScript(E.cbor).withdrawalRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(O.rewardAddress,"0").withdrawalScript(O.cbor).withdrawalRedeemerValue(J,"JSON").txOut(d,i0).txOutInlineDatumValue(k([]),"JSON").txOut(x.output.address,Y).txOutInlineDatumValue(k([]),"JSON");for(let m of M)this.mesh.readOnlyTxInReference(m.input.txHash,m.input.outputIndex);return this.mesh.requiredSignerHash(t).txInCollateral(u.input.txHash,u.input.outputIndex).selectUtxosFrom(f).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(p),await this.mesh.complete()});i(this,"initializeBlacklist",async c=>{let e=this._params,a=this.wallet;if(!e||!a)throw new Error("Contract parameters or wallet not initialized");let{utxos:t,walletAddress:d,collateral:s}=await this.getWalletInfoForTx(),n=t.filter(A=>{let T=A.output.amount.find(U=>U.unit==="lovelace");if(!T)return!1;let x=A.output.amount.length===1,B=Number(T.quantity)>=1e7;return x&&B});if(n.length===0)throw new Error("No suitable UTxOs found for bootstrap");let b=n[0].input,l=new N(this.networkId),f=await l.blacklistMint(b,c),p=f.policyId,u=await l.blacklistSpend(p),h=u.address,w=k([D(""),D("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")]),S=[{unit:p,quantity:"1"}];this.mesh.txEvaluationMultiplier=1.3,this.mesh.txIn(b.txHash,b.outputIndex).mintPlutusScriptV3().mint("1",p,f0("")).mintingScript(f.cbor).mintRedeemerValue(k([]),"JSON").txOut(h,S).txOutInlineDatumValue(w,"JSON").txInCollateral(s.input.txHash,s.input.outputIndex).setNetwork(this.networkId===0?"preview":"mainnet").selectUtxosFrom(n).changeAddress(d);let O=await this.mesh.complete(),C={blacklistMintBootstrap:{txInput:b,adminPubKeyHash:c,scriptHash:p},blacklistSpendBootstrap:{blacklistMintScriptHash:p,scriptHash:u.policyId}};return{txHex:O,bootstrap:C}});this._params=w0,this._blacklistBootstrap=e}get protocolParams(){return this._params}};export{Z0 as MeshContentOwnershipContract,tc as MeshEscrowContract,oc as MeshGiftCardContract,uc as MeshHelloWorldContract,M0 as MeshMarketplaceContract,Tc as MeshPaymentSplitterContract,_c as MeshPlutusNFTContract,Dc as MeshSwapContract,Fc as MeshVestingContract,Zc as ProgrammableTokenContract,Se as activeEscrowDatum,rc as initiateEscrowDatum,yc as marketplaceDatum,Ce as recipientDepositRedeemer,l2 as resolveBlacklistAddress,T0 as resolveBlacklistScripts,b2 as resolveSmartWalletAddress,b0 as resolveStakeCredential};
|
|
134
|
+
Supports multiple UTxOs in a single transaction`,dataType:"constructor",index:1,fields:[{title:"registry_node_idx",description:"Index of the registry node in reference inputs",$ref:"#/definitions/Int"},{title:"outputs_start_idx",description:"Starting index in outputs where processed outputs begin",$ref:"#/definitions/Int"},{title:"length_inputs",description:"Length of input_idxs list (for validation)",$ref:"#/definitions/Int"}]}]},"types/RegistryProof":{title:"RegistryProof",description:"Proof that a token is (or is not) in the registry",anyOf:[{title:"TokenExists",description:"Token exists in the registry at this reference input index",dataType:"constructor",index:0,fields:[{title:"node_idx",$ref:"#/definitions/Int"}]},{title:"TokenDoesNotExist",description:"Token does not exist (proof via covering node at this index)",dataType:"constructor",index:1,fields:[{title:"node_idx",$ref:"#/definitions/Int"}]}]},"types/RegistryRedeemer":{title:"RegistryRedeemer",description:"Redeemer for registry minting policy (linked list operations)",anyOf:[{title:"RegistryInit",description:"Initialize the registry with the origin node",dataType:"constructor",index:0,fields:[]},{title:"RegistryInsert",description:"Insert a new programmable token policy into the registry",dataType:"constructor",index:1,fields:[{title:"key",$ref:"#/definitions/ByteArray"},{title:"hashed_param",$ref:"#/definitions/ByteArray"}]}]},"types/SmartTokenMintingAction":{title:"SmartTokenMintingAction",description:"Action for the minting policy",anyOf:[{title:"SmartTokenMintingAction",dataType:"constructor",index:0,fields:[{title:"minting_logic_cred",description:"The credential of the minting logic script that must be invoked",$ref:"#/definitions/cardano~1address~1Credential"}]}]}}};import{deserializeAddress as ga}from"@meshsdk/core-cst";import{deserializeDatum as wa}from"@meshsdk/core";import{deserializeAddress as qc,buildBaseAddress as w1,CredentialType as Wc}from"@meshsdk/core-cst";var w0={txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",protocolParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:0},scriptHash:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",alwaysFailScriptHash:"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99"},programmableLogicGlobalParams:{protocolParamsScriptHash:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",scriptHash:"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046"},programmableLogicBaseParams:{programmableLogicGlobalScriptHash:"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046",scriptHash:"3a7ce34145cbc597a85ac83db88c029ff9e909d92e04a7b2376b31ff"},issuanceParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:1},scriptHash:"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1",alwaysFailScriptHash:"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99"},directoryMintParams:{txInput:{txHash:"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973",outputIndex:0},issuanceScriptHash:"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1",scriptHash:"91b403111a7fab9ffbf5a3c7485d3f9a79d5bf65f38c8d48359be4c0"},directorySpendParams:{protocolParamsPolicyId:"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214",scriptHash:"b672f3b03d19cd40c59c447aabd6c26ca296bbc78b205e5227317638"},programmableBaseRefInput:{txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",outputIndex:3},programmableGlobalRefInput:{txHash:"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7",outputIndex:4}};var ba=async(o,r)=>{let c=qc(o).asBase()?.getStakeCredential().hash;if(!c)throw new Error("Address missing stake credential");let a=await new q(r).programmableLogicBase(w0);return w1(r,a.policyId,c,Wc.ScriptHash,Wc.KeyHash).toAddress().toBech32()},b0=o=>{let r=qc(o).asBase()?.getStakeCredential().hash;if(!r)throw new Error("Address missing stake credential");return r};async function T0(o,r,c){let e=new N(o),a=await e.blacklistMint(r,c),t=await e.blacklistSpend(a.policyId);return{blacklistMint:a,blacklistSpend:t}}var la=async(o,r)=>(await new N(r).blacklistSpend(o)).address;var A0=(o,r=!0)=>{let c=r?[Lc]:[Ec,Kc];for(let e of c){let a=e.validators.find(({title:t})=>t===o);if(a)return a.compiledCode}throw new Error(`Validator ${o} not found`)},jc=o=>T1.encode(Buffer.from(o,"hex")).toString("hex");function t0(o){if(!o)return"";if(typeof o=="string")return o;if(o.bytes)return o.bytes;if(o.fields&&o.fields.length>0){let r=o.fields[0];if(typeof r=="string")return r;if(r?.bytes)return r.bytes}return""}function k0(o){if(!o?.fields||o.fields.length<5)return null;let r=c=>({hash:t0(c),index:c.constructor??0});return{key:t0(o.fields[0]),next:t0(o.fields[1]),transferScript:r(o.fields[2]),thirdPartyScript:r(o.fields[3]),metadata:t0(o.fields[4])}}function S0(o){return!o?.fields||o.fields.length<2?null:{key:t0(o.fields[0]),next:t0(o.fields[1])}}var zc=async(o,r,c)=>{let e=[],a=0;for(let d of o){if(a>=c)break;let s=d.output.amount.find(n=>n.unit===r);s&&(e.push(d),a+=Number(s.quantity))}let t=a-c;return{selectedUtxos:e,returningAmount:t}};var q=class{constructor(r){i(this,"networkID",r)}build(r,c){let e=Gc(A0(r),c,"JSON");return{cbor:e,plutusScript:{code:e,version:"V3"}}}txRef(r){return q0(0,[H(r.txHash),Jc(r.outputIndex)])}resolveParam(r,c,e){let a=typeof r=="string"?r:c(r);if(!a)throw new Error(e);return a}toAddress(r,c=void 0){return Xc(r,c,this.networkID,!1).address}async issuanceMint(r,c){let e=this.resolveParam(c,d=>d.programmableLogicBaseParams.scriptHash,"could not resolve issuance mint parameters"),{cbor:a,plutusScript:t}=this.build("issuance_mint.issuance_mint.mint",[C0([H(e)]),C0([H(r)])]);return{cbor:a,plutusScript:t,policyId:j(a,"V3"),address:this.toAddress(t)}}async issuanceCborHexMint(r){let{cbor:c,plutusScript:e}=this.build("issuance_cbor_hex_mint.issuance_cbor_hex_mint.mint",[this.txRef(r)]);return{cbor:c,plutusScript:e,policyId:j(c,"V3"),address:this.toAddress(e)}}async programmableLogicBase(r){let c=this.resolveParam(r,t=>t.programmableLogicGlobalParams.scriptHash,"could not resolve logic base parameter"),{cbor:e,plutusScript:a}=this.build("programmable_logic_base.programmable_logic_base.spend",[C0([H(c)])]);return{cbor:e,plutusScript:a,policyId:j(e,"V3")}}async programmableLogicGlobal(r){let c=this.resolveParam(r,d=>d.protocolParams.scriptHash,"could not resolve logic global parameter"),{cbor:e,plutusScript:a}=this.build("programmable_logic_global.programmable_logic_global.withdraw",[H(c)]),t=j(e,"V3");return{cbor:e,plutusScript:a,scriptHash:t,rewardAddress:j0(t,this.networkID)}}async protocolParamMint(r){let{cbor:c,plutusScript:e}=this.build("protocol_params_mint.protocol_params_mint.mint",[this.txRef(r)]),a=j(c,"V3");return{cbor:c,plutusScript:e,scriptHash:a,address:this.toAddress(e)}}async registryMint(r,c){let e=typeof r=="string"?r:r.directoryMintParams.issuanceScriptHash,a=typeof r=="string"?c:r.directoryMintParams.txInput;if(!a)throw new Error("register mint utxo parameter could not resolve");if(!e)throw new Error("registry mint param script hash could not resolve");let{cbor:t,plutusScript:d}=this.build("registry_mint.registry_mint.mint",[this.txRef(a),H(e)]);return{cbor:t,plutusScript:d,policyId:j(t,"V3")}}async registrySpend(r){let c=this.resolveParam(r,t=>t.protocolParams.scriptHash,"could not resolve params for registry spend"),{cbor:e,plutusScript:a}=this.build("registry_spend.registry_spend.spend",[H(c)]);return{cbor:e,plutusScript:a,policyId:j(e,"V3"),address:this.toAddress(a,"")}}},N=class{constructor(r){i(this,"networkID",r)}buildRaw(r){let c=jc(A0(r,!1)),e={code:c,version:"V3"},a=j(c,"V3"),t=j0(a,this.networkID);return{_cbor:c,plutusScript:e,policyId:a,rewardAddress:t}}buildWithParams(r,c){let e=A0(r,!1),a=Gc(e,c,"JSON"),t={code:a,version:"V3"},d=j(a,"V3"),s=j0(d,this.networkID);return{cbor:a,plutusScript:t,policyId:d,rewardAddress:s}}txRef(r){return q0(0,[H(r.txHash),Jc(r.outputIndex)])}async issue(){return this.buildRaw("transfer.issue.withdraw")}async transfer(){return this.buildRaw("transfer.transfer.withdraw")}async blacklistSpend(r){let{cbor:c,plutusScript:e,policyId:a}=this.buildWithParams("blacklist_spend.blacklist_spend.spend",[H(r)]),t=Xc(e,"",this.networkID,!1).address;return{cbor:c,plutusScript:e,address:t,policyId:a}}async blacklistMint(r,c){return this.buildWithParams("blacklist_mint.blacklist_mint.mint",[this.txRef(r),H(c)])}async issuerAdmin(r){return this.buildWithParams("example_transfer_logic.issuer_admin_contract.withdraw",[q0(0,[H(r)])])}async customTransfer(r,c){let{cbor:e,plutusScript:a,policyId:t,rewardAddress:d}=this.buildWithParams("example_transfer_logic.transfer.withdraw",[C0([H(r)]),H(c)]);return{cbor:e,plutusScript:a,policyId:t,rewardAddress:d}}};var Zc=class extends _{constructor(c,e){super(c);i(this,"inputs",c);i(this,"_blacklistBootstrap");i(this,"_params");i(this,"mintToken",async(c,e,a,t)=>{let d=this._params,s=this.fetcher,n=this.wallet;if(!d||!s||!n)throw new Error("Contract parameters, fetcher, or wallet not initialized");let{utxos:b,walletAddress:l,collateral:f}=await this.getWalletInfoForTx(),p=new q(this.networkId),h=await new N(this.networkId).issuerAdmin(a),w=h.cbor,S=h.policyId,O=await p.issuanceMint(S,d),C=k([l0([D(S)])]),A=[{unit:"lovelace",quantity:"1300000"},{unit:O.policyId+f0(c),quantity:e}],T=k([]);return this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.withdrawalPlutusScriptV3().withdrawal(h.rewardAddress,"0").withdrawalScript(w).withdrawalRedeemerValue(k([]),"JSON").mintPlutusScriptV3().mint(e,O.policyId,f0(c)).mintingScript(O.cbor).mintRedeemerValue(C,"JSON").txOut(t,A).txOutInlineDatumValue(T,"JSON").requiredSignerHash(a).txInCollateral(f.input.txHash,f.input.outputIndex).selectUtxosFrom(b).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(l),await this.mesh.complete()});i(this,"burnToken",async(c,e,a,t,d)=>{let s=this._params,n=this.fetcher,b=this.wallet;if(!s||!n||!b)throw new Error("Contract parameters, fetcher, or wallet not initialized");let{utxos:l,walletAddress:f,collateral:p}=await this.getWalletInfoForTx(),u=new q(this.networkId),h=new N(this.networkId),w=await u.programmableLogicBase(s),S=await u.programmableLogicGlobal(s),O=await u.registrySpend(s),C=await h.issuerAdmin(d),A=await u.issuanceMint(C.policyId,s),T=(await n.fetchUTxOs(a,t))?.[0];if(!T)throw new Error("Token UTxO not found");let x=A.policyId+f0(c),B=T.output.amount.find(m=>m.unit===x)?.quantity??"0";if(Number(e)>Number(B))throw new Error("Not enough tokens to burn");let V=(await n.fetchAddressUTxOs(O.address)).find(m=>m.output.plutusData?k0(d0(m.output.plutusData))?.key===A.policyId:!1);if(!V)throw new Error("Registry entry not found, token not registered");let v=l.find(m=>BigInt(m.output.amount.find(P=>P.unit==="lovelace")?.quantity??"0")>5000000n);if(!v)throw new Error("No UTXO with enough ADA for fees found");let z=(await n.fetchUTxOs(s.txHash,0))?.[0];if(!z)throw new Error("Protocol params missing");let Q=[v,T].length,M=(m,P)=>m.input.txHash!==P.input.txHash?m.input.txHash.localeCompare(P.input.txHash):m.input.outputIndex-P.input.outputIndex,F=[z,V].sort(M),J=F.findIndex(m=>m.input.txHash===V.input.txHash&&m.input.outputIndex===V.input.outputIndex);if(J===-1)throw new Error("Could not find registry in sorted reference inputs");let i0=k([l0([D(C.policyId)])]),Y=l0([G(J),G(0),G(Q)]),E=T.output.amount.map(m=>m.unit===x?{unit:m.unit,quantity:String(BigInt(m.quantity)-BigInt(e))}:m).filter(m=>BigInt(m.quantity)>0n);this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.txIn(v.input.txHash,v.input.outputIndex).spendingPlutusScriptV3().txIn(T.input.txHash,T.input.outputIndex).txInScript(w.cbor).txInInlineDatumPresent().txInRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(C.rewardAddress,"0").withdrawalScript(C.cbor).withdrawalRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(S.rewardAddress,"0").withdrawalScript(S.cbor).withdrawalRedeemerValue(Y,"JSON").mintPlutusScriptV3().mint(`-${e}`,A.policyId,f0(c)).mintingScript(A.cbor).mintRedeemerValue(i0,"JSON"),E.length>0&&this.mesh.txOut(T.output.address,E).txOutInlineDatumValue(k([]),"JSON");for(let m of F)this.mesh.readOnlyTxInReference(m.input.txHash,m.input.outputIndex);return this.mesh.requiredSignerHash(d).txInCollateral(p.input.txHash,p.input.outputIndex).selectUtxosFrom(l).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(f),await this.mesh.complete()});i(this,"transferToken",async(c,e,a,t)=>{let d=this._params,s=this.fetcher,n=this.wallet;if(!d||!s||!n)throw new Error("Contract parameters, fetcher, or wallet not initialized");let b=c.substring(0,Yc),{utxos:l,walletAddress:f,collateral:p}=await this.getWalletInfoForTx(),u=new q(this.networkId),h=new N(this.networkId),w=await u.programmableLogicBase(d),S=await u.programmableLogicGlobal(d),O=await u.registrySpend(d);if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let C=this._blacklistBootstrap.blacklistMintBootstrap.scriptHash,A=await h.customTransfer(d.programmableLogicBaseParams.scriptHash,C),T=A.cbor;if(!(await s.fetchAddressUTxOs(O.address)).find(y=>y.output.plutusData?k0(d0(y.output.plutusData))?.key===b:!1))throw new Error("Could not find registry entry for token");let B=(await s.fetchUTxOs(d.txHash,0))?.[0];if(!B)throw new Error("Could not resolve protocol params");let U=await s.fetchAddressUTxOs(a);if(!U?.length)throw new Error("No programmable tokens found at sender address");let{selectedUtxos:V}=await zc(U,c,Number(e));if(!V.length)throw new Error("Not enough funds");let v=(y,R)=>y.input.txHash!==R.input.txHash?y.input.txHash.localeCompare(R.input.txHash):y.input.outputIndex-R.input.outputIndex,z=[...V].sort(v),Q=[],M=[];for(let y of z){Q.push(y);for(let R of y.output.amount){if(R.unit==="lovelace")continue;let $=R.unit.substring(0,56);M.includes($)||M.push($)}}M.sort();let F=[];if(C){let y=await h.blacklistSpend(C),R=await s.fetchAddressUTxOs(y.address);for(let $ of Q){let Z=b0($.output.address);if(!Z)throw new Error("UTXO missing stake credential");let p0=R.find(G0=>{if(!G0.output.plutusData)return!1;let r0=S0(d0(G0.output.plutusData));if(!r0)return!1;let te=r0.key===""||Z>r0.key,de=r0.next===""||Z<r0.next;return te&&de});if(!p0)throw new Error(`Blacklist proof not found for wallet ${Z}`);F.push(p0)}}let J=[],i0=await s.fetchAddressUTxOs(O.address);for(let y of M){let R=d.directoryMintParams.scriptHash+y,$=i0.find(Z=>Z.output.amount.find(p0=>p0.unit===R));if(!$)throw new Error(`Registry node not found for policy ${y}`);J.push($)}let E=[...[...new Map(F.map(y=>[`${y.input.txHash}#${y.input.outputIndex}`,y])).values()],...J,B].sort(v),m=Qc(F.map(y=>{let R=E.findIndex($=>$.input.txHash===y.input.txHash&&$.input.outputIndex===y.input.outputIndex);return k([G(R)])})),P=k([Qc(J.map(y=>{let R=E.findIndex($=>$.input.txHash===y.input.txHash&&$.input.outputIndex===y.input.outputIndex);return k([G(R)])}))]),z0=V.reduce((y,R)=>y+BigInt(R.output.amount.find($=>$.unit===c)?.quantity??"0"),0n),ce=V.reduce((y,R)=>y+BigInt(R.output.amount.find($=>$.unit==="lovelace")?.quantity??"0"),0n);if(z0<BigInt(e))throw new Error("Not enough funds");let J0=1500000n,_0=z0-BigInt(e),ee=[{unit:"lovelace",quantity:J0.toString()},{unit:c,quantity:e}],O0=ce-J0,ae=[{unit:"lovelace",quantity:(O0>1000000n?O0:1500000n).toString()},..._0>0n?[{unit:c,quantity:_0.toString()}]:[]];this.mesh.verbose=!0,this.mesh.evaluator=this.inputs.mesh.evaluator;for(let y of z)this.mesh.spendingPlutusScriptV3().txIn(y.input.txHash,y.input.outputIndex).txInScript(w.cbor).txInRedeemerValue(k([]),"JSON").txInInlineDatumPresent();this.mesh.withdrawalPlutusScriptV3().withdrawal(A.rewardAddress,"0").withdrawalScript(T).withdrawalRedeemerValue(m,"JSON").withdrawalPlutusScriptV3().withdrawal(S.rewardAddress,"0").withdrawalScript(S.cbor).withdrawalRedeemerValue(P,"JSON"),(_0>0n||O0>1000000n)&&this.mesh.txOut(a,ae).txOutInlineDatumValue(k([]),"JSON"),this.mesh.txOut(t,ee).txOutInlineDatumValue(k([]),"JSON");for(let y of E)this.mesh.readOnlyTxInReference(y.input.txHash,y.input.outputIndex);return this.mesh.requiredSignerHash(b0(a)).setFee("600000").txInCollateral(p.input.txHash,p.input.outputIndex).selectUtxosFrom(l).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(f),await this.mesh.complete()});i(this,"blacklistSmartWalletAddress",async c=>{let e=this.fetcher,a=this.wallet;if(!e||!a)throw new Error("Fetcher or wallet not initialized");let{utxos:t,walletAddress:d,collateral:s}=await this.getWalletInfoForTx();if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let n=this._blacklistBootstrap.blacklistMintBootstrap,{blacklistMint:b,blacklistSpend:l}=await T0(this.networkId,n.txInput,n.adminPubKeyHash);if(!this.fetcher)throw new Error("Fetcher not initialized");let f=await e.fetchAddressUTxOs(l.address);if(!f?.length)throw new Error("No blacklist UTxOs found");let p=b0(c),u=null,h=null;for(let T of f){if(!T.output.plutusData)continue;let x=S0(d0(T.output.plutusData));if(x){if(x.key===p)throw new Error("Target address is already blacklisted");if(x.key.localeCompare(p)<0&&p.localeCompare(x.next)<0){u=T,h=x;break}}}if(!u||!h)throw new Error("Could not find blacklist node to replace");let w=k([D(h.key),D(p)]),S=k([D(p),D(h.next)]),O=l0([D(p)]),C=k([]),A=[{unit:b.policyId+p,quantity:"1"}];return this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.spendingPlutusScriptV3().txIn(u.input.txHash,u.input.outputIndex).txInScript(l.cbor).txInRedeemerValue(C,"JSON").txInInlineDatumPresent().mintPlutusScriptV3().mint("1",b.policyId,p).mintingScript(b.cbor).mintRedeemerValue(O,"JSON").txOut(l.address,u.output.amount).txOutInlineDatumValue(w,"JSON").txOut(l.address,A).txOutInlineDatumValue(S,"JSON").requiredSignerHash(this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash).txInCollateral(s.input.txHash,s.input.outputIndex).selectUtxosFrom(t).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(d),await this.mesh.complete()});i(this,"whitelistSmartWalletAddress",async c=>{let e=this.fetcher,{utxos:a,walletAddress:t,collateral:d}=await this.getWalletInfoForTx();if(!e)throw new Error("Fetcher or wallet not initialized");let s=b0(c);if(!this._blacklistBootstrap)throw new Error("Blacklist bootstrap not initialized");let n=this._blacklistBootstrap.blacklistMintBootstrap,{blacklistMint:b,blacklistSpend:l}=await T0(this.networkId,n.txInput,n.adminPubKeyHash);if(!this.fetcher)throw new Error("Fetcher not initialized");let f=await e.fetchAddressUTxOs(l.address);if(!f?.length)throw new Error("No blacklist UTxOs found");let p=null,u=null,h=null,w=null;for(let T of f){if(!T.output.plutusData)continue;let x=S0(d0(T.output.plutusData));if(x&&(x.key===s&&(p=T,u=x),x.next===s&&(h=T,w=x),p&&h))break}if(!p||!u)throw new Error("Could not resolve relevant blacklist nodes (node to remove)");if(!h||!w)throw new Error("Could not resolve relevant blacklist nodes (node to update)");let S=u.next,O=k([D(w.key),D(S)]),C=A1([D(s)]),A=k([]);return this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.spendingPlutusScriptV3().txIn(p.input.txHash,p.input.outputIndex).txInScript(l.cbor).txInInlineDatumPresent().txInRedeemerValue(A,"JSON").spendingPlutusScriptV3().txIn(h.input.txHash,h.input.outputIndex).txInScript(l.cbor).txInInlineDatumPresent().txInRedeemerValue(A,"JSON").mintPlutusScriptV3().mint("-1",b.policyId,s).mintingScript(b.cbor).mintRedeemerValue(C,"JSON").txOut(l.address,h.output.amount).txOutInlineDatumValue(O,"JSON").requiredSignerHash(this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash).txInCollateral(d.input.txHash,d.input.outputIndex).selectUtxosFrom(a).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(t),await this.mesh.complete()});i(this,"seizeToken",async(c,e,a,t,d)=>{let s=this._params,n=this.fetcher,b=this.wallet;if(!s||!n||!b)throw new Error("Contract parameters, fetcher, or wallet not initialized");let l=c.substring(0,Yc),{utxos:f,walletAddress:p,collateral:u}=await this.getWalletInfoForTx(),h=new q(this.networkId),w=new N(this.networkId),S=await h.programmableLogicBase(s),O=await h.programmableLogicGlobal(s),C=await h.registrySpend(s),A=f.find(m=>BigInt(m.output.amount.find(P=>P.unit==="lovelace")?.quantity??"0")>10000000n);if(!A)throw new Error("No UTXO with enough ADA for fees found");let x=(await n.fetchUTxOs(e,a))?.[0];if(!x)throw new Error("Could not find utxo to seize");if(!x.output.plutusData)throw new Error("UTXO to seize must have inline datum");let B=[A,x].length,U=x.output.amount.find(m=>m.unit===c);if(!U)throw new Error("UTXO does not contain the specified token");if(Number(U.quantity)<=0)throw new Error("UTXO token quantity must be greater than zero");let v=(await n.fetchAddressUTxOs(C.address)).find(m=>m.output.plutusData?k0(d0(m.output.plutusData))?.key===l:!1);if(!v)throw new Error("Could not find registry entry for token");let z=(await n.fetchUTxOs(s.txHash,0))?.[0];if(!z)throw new Error("Could not resolve protocol params");let Q=(m,P)=>m.input.txHash!==P.input.txHash?m.input.txHash.localeCompare(P.input.txHash):m.input.outputIndex-P.input.outputIndex,M=[z,v].sort(Q),F=M.findIndex(m=>m.input.txHash===v.input.txHash&&m.input.outputIndex===v.input.outputIndex);if(F===-1)throw new Error("Could not find registry in sorted reference inputs");let J=l0([G(F),G(1),G(B)]),i0=[{unit:"lovelace",quantity:"1500000"},{unit:c,quantity:U.quantity}],Y=x.output.amount.filter(m=>m.unit!==c);Y.length===0&&Y.push({unit:"lovelace",quantity:"1000000"});let E=await w.issuerAdmin(t);this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.txIn(A.input.txHash,A.input.outputIndex).spendingPlutusScriptV3().txIn(x.input.txHash,x.input.outputIndex).txInScript(S.cbor).txInRedeemerValue(k([]),"JSON").txInInlineDatumPresent().withdrawalPlutusScriptV3().withdrawal(E.rewardAddress,"0").withdrawalScript(E.cbor).withdrawalRedeemerValue(k([]),"JSON").withdrawalPlutusScriptV3().withdrawal(O.rewardAddress,"0").withdrawalScript(O.cbor).withdrawalRedeemerValue(J,"JSON").txOut(d,i0).txOutInlineDatumValue(k([]),"JSON").txOut(x.output.address,Y).txOutInlineDatumValue(k([]),"JSON");for(let m of M)this.mesh.readOnlyTxInReference(m.input.txHash,m.input.outputIndex);return this.mesh.requiredSignerHash(t).txInCollateral(u.input.txHash,u.input.outputIndex).selectUtxosFrom(f).setNetwork(this.networkId===0?"preview":"mainnet").changeAddress(p),await this.mesh.complete()});i(this,"initializeBlacklist",async c=>{let e=this._params,a=this.wallet;if(!e||!a)throw new Error("Contract parameters or wallet not initialized");let{utxos:t,walletAddress:d,collateral:s}=await this.getWalletInfoForTx(),n=t.filter(A=>{let T=A.output.amount.find(U=>U.unit==="lovelace");if(!T)return!1;let x=A.output.amount.length===1,B=Number(T.quantity)>=1e7;return x&&B});if(n.length===0)throw new Error("No suitable UTxOs found for bootstrap");let b=n[0].input,l=new N(this.networkId),f=await l.blacklistMint(b,c),p=f.policyId,u=await l.blacklistSpend(p),h=u.address,w=k([D(""),D("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")]),S=[{unit:p,quantity:"1"}];this.mesh.txEvaluationMultiplier=1.3,this.mesh.evaluator=this.inputs.mesh.evaluator,this.mesh.txIn(b.txHash,b.outputIndex).mintPlutusScriptV3().mint("1",p,f0("")).mintingScript(f.cbor).mintRedeemerValue(k([]),"JSON").txOut(h,S).txOutInlineDatumValue(w,"JSON").txInCollateral(s.input.txHash,s.input.outputIndex).setNetwork(this.networkId===0?"preview":"mainnet").selectUtxosFrom(n).changeAddress(d);let O=await this.mesh.complete(),C={blacklistMintBootstrap:{txInput:b,adminPubKeyHash:c,scriptHash:p},blacklistSpendBootstrap:{blacklistMintScriptHash:p,scriptHash:u.policyId}};return{txHex:O,bootstrap:C}});this._params=w0,this._blacklistBootstrap=e}get protocolParams(){return this._params}};export{Z0 as MeshContentOwnershipContract,tc as MeshEscrowContract,oc as MeshGiftCardContract,uc as MeshHelloWorldContract,M0 as MeshMarketplaceContract,Tc as MeshPaymentSplitterContract,_c as MeshPlutusNFTContract,Dc as MeshSwapContract,Fc as MeshVestingContract,Zc as ProgrammableTokenContract,Se as activeEscrowDatum,rc as initiateEscrowDatum,yc as marketplaceDatum,Ce as recipientDepositRedeemer,la as resolveBlacklistAddress,T0 as resolveBlacklistScripts,ba as resolveSmartWalletAddress,b0 as resolveStakeCredential};
|
|
135
135
|
//# sourceMappingURL=index.mjs.map
|