@meshsdk/contract 1.9.0-beta.103 → 1.9.0-beta.104

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/content-ownership/offchain/offchain.ts","../src/common.ts","../src/content-ownership/offchain/common.ts","../src/content-ownership/aiken-workspace/plutus.json","../src/escrow/offchain.ts","../src/escrow/aiken-workspace-v1/plutus.json","../src/escrow/aiken-workspace-v2/plutus.json","../src/escrow/aiken-workspace-v3/plutus.json","../src/giftcard/offchain.ts","../src/giftcard/aiken-workspace-v1/plutus.json","../src/giftcard/aiken-workspace-v2/plutus.json","../src/hello-world/offchain.ts","../src/hello-world/aiken-workspace-v1/plutus.json","../src/hello-world/aiken-workspace-v2/plutus.json","../src/marketplace/offchain.ts","../src/marketplace/aiken-workspace-v1/plutus.json","../src/marketplace/aiken-workspace-v2/plutus.json","../src/payment-splitter/offchain.ts","../src/payment-splitter/aiken-workspace-v1/plutus.json","../src/payment-splitter/aiken-workspace-v2/plutus.json","../src/plutus-nft/offchain.ts","../src/plutus-nft/aiken-workspace/plutus.json","../src/swap/offchain.ts","../src/swap/aiken-workspace-v1/plutus.json","../src/swap/aiken-workspace-v2/plutus.json","../src/vesting/offchain.ts","../src/vesting/aiken-workspace-v1/plutus.json","../src/vesting/aiken-workspace-v2/plutus.json","../src/programmable-tokens/offchain/offchain.ts","../src/programmable-tokens/offchain/common.ts","../src/programmable-tokens/offchain/utils.ts","../src/programmable-tokens/aiken-workspace-subStandard/freeze-and-seize/plutus.json","../src/programmable-tokens/aiken-workspace-subStandard/dummy/plutus.json","../src/programmable-tokens/aiken-workspace-standard/plutus.json","../src/programmable-tokens/offchain/resolvers.ts","../src/programmable-tokens/offchain/protocolParams.json"],"sourcesContent":["import {\n Data,\n deserializeAddress,\n ForgeScript,\n mConStr,\n mConStr0,\n mConStr1,\n mOutputReference,\n mScriptAddress,\n NativeScript,\n resolveScriptHash,\n serializeNativeScript,\n stringToHex,\n toUTF8,\n UTxO,\n} from \"@meshsdk/core\";\nimport {\n applyParamsToScript,\n parseDatumCbor,\n parseInlineDatum,\n} from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../../common\";\nimport { blueprint, getScriptCbor, getScriptInfo, ScriptIndex } from \"./common\";\nimport {\n ContentRegistryDatum,\n OracleDatum,\n OwnershipRegistryDatum,\n TransferContent,\n UpdateContent,\n} from \"./type\";\n\n/**\n * Mesh Content Ownership Contract\n *\n * This contract is used to manage the ownership of content.\n * It facilitates on-chain record of content (i.e. file on IPFS) ownership and transfer.\n * While one cannot prefer others from obtaining a copy of the content, the app owner of the\n * contract can serve the single source of truth of who owns the content. With the blockchain\n * trace and record in place, it provides a trustless way to verify the ownership of the content\n * and facilitates further application logics such as royalties, licensing, etc.\n *\n * @example\n * ```typescript\n * const meshTxBuilder = new MeshTxBuilder({\n * fetcher: provider, // one of the Providers\n * submitter: provider,\n * verbose: true,\n * });\n *\n * const contract = new MeshContentOwnershipContract(\n * {\n * mesh: meshTxBuilder,\n * fetcher: provider,\n * wallet: wallet,\n * networkId: 0,\n * },\n * {\n * operationAddress: operationAddress, // the address of the app owner, where most of the actions should be signed by the spending key of this address\n * paramUtxo: { outputIndex: 0, txHash: \"0000000000000000000000000000000000000000000000000000000000000000\" }, // you can get this from the output of `mintOneTimeMintingPolicy()` transaction\n * refScriptUtxos?: { // you can get these from the output of `sendRefScriptOnchain()` transactions\n * contentRegistry: { outputIndex: 0, txHash: \"0000000000000000000000000000000000000000000000000000000000000000\" },\n * contentRefToken: { outputIndex: 0, txHash: \"0000000000000000000000000000000000000000000000000000000000000000\" },\n * ownershipRegistry: { outputIndex: 0, txHash: \"0000000000000000000000000000000000000000000000000000000000000000\" },\n * ownershipRefToken: { outputIndex: 0, txHash: \"0000000000000000000000000000000000000000000000000000000000000000\" },\n * },\n * },\n * );\n * ```\n */\nexport class MeshContentOwnershipContract extends MeshTxInitiator {\n paramUtxo = {\n txHash: \"0000000000000000000000000000000000000000000000000000000000000000\",\n outputIndex: 0,\n };\n scriptInfo = getScriptInfo({\n outputIndex: 0,\n txHash: \"0000000000000000000000000000000000000000000000000000000000000000\",\n });\n refScriptUtxos = {\n contentRefToken: {\n txHash:\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n outputIndex: 0,\n },\n ownershipRefToken: {\n txHash:\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n outputIndex: 0,\n },\n contentRegistry: {\n txHash:\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n outputIndex: 0,\n },\n ownershipRegistry: {\n txHash:\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n outputIndex: 0,\n },\n };\n operationAddress: string;\n opsKey: string;\n\n constructor(\n inputs: MeshTxInitiatorInput,\n contract: {\n operationAddress: string;\n paramUtxo?: UTxO[\"input\"];\n refScriptUtxos?: {\n contentRegistry: UTxO[\"input\"];\n contentRefToken: UTxO[\"input\"];\n ownershipRegistry: UTxO[\"input\"];\n ownershipRefToken: UTxO[\"input\"];\n };\n },\n ) {\n super(inputs);\n\n this.paramUtxo = contract.paramUtxo || this.paramUtxo;\n this.refScriptUtxos = contract.refScriptUtxos || this.refScriptUtxos;\n\n this.scriptInfo = getScriptInfo(\n this.paramUtxo,\n this.stakeCredential,\n this.networkId,\n );\n\n this.operationAddress = contract.operationAddress;\n\n const serializedOpsPlutusAddr = deserializeAddress(this.operationAddress);\n this.opsKey = serializedOpsPlutusAddr.pubKeyHash;\n }\n\n getOwnerNativeScript = () => {\n const { pubKeyHash: keyHash } = deserializeAddress(this.operationAddress);\n const nativeScript: NativeScript = {\n type: \"all\",\n scripts: [\n {\n type: \"sig\",\n keyHash: keyHash,\n },\n ],\n };\n\n const { address: scriptAddress } = serializeNativeScript(\n nativeScript,\n undefined,\n this.networkId,\n );\n\n return {\n nativeScript,\n scriptAddress,\n };\n };\n\n /**\n * [Setup phase]\n * This is the first transaction you need to setup the contract.\n *\n * This transaction mints the one-time minting policy (a NFT) for the contract.\n * It will be attached with the datum which serves as the single source of truth for the contract oracle.\n *\n * Note: You must save the `paramUtxo` for future transactions.\n *\n * @returns {Promise<{ txHexMintOneTimeMintingPolicy: string, txHexSetupOracleUtxo: string, paramUtxo: UTxO[\"input\"] }>}\n *\n * @example\n * ```typescript\n * const { tx, paramUtxo } = await contract.mintOneTimeMintingPolicy();\n * const signedTx = await wallet.signTx(tx);\n * const txHash = await wallet.submitTx(signedTx);\n * ```\n */\n mintOneTimeMintingPolicy = async () => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n if (utxos?.length <= 0) {\n throw new Error(\"No UTxOs found\");\n }\n const paramUtxo = utxos[0]!;\n const script = blueprint.validators[4]!.compiledCode;\n const param: Data = mOutputReference(\n paramUtxo.input.txHash,\n paramUtxo.input.outputIndex,\n );\n const paramScript = applyParamsToScript(script, [param]);\n const policyId = resolveScriptHash(paramScript, \"V3\");\n const tokenName = \"\";\n\n const txHex = await this.mesh\n .txIn(\n paramUtxo.input.txHash,\n paramUtxo.input.outputIndex,\n paramUtxo.output.amount,\n paramUtxo.output.address,\n )\n .mintPlutusScriptV3()\n .mint(\"1\", policyId, tokenName)\n .mintingScript(paramScript)\n .mintRedeemerValue(mConStr0([]))\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n this.scriptInfo = getScriptInfo(\n paramUtxo.input,\n this.stakeCredential,\n this.networkId,\n );\n\n this.paramUtxo = paramUtxo.input;\n\n return { tx: txHex, paramUtxo: paramUtxo.input };\n };\n\n /**\n * [Setup phase]\n * This is the second transaction you need to setup the contract.\n *\n * This transaction send the NFT to a oracle contract locking the datum,\n * which serves as the single source of truth for the contract oracle with data integrity.\n *\n * Note: You must provide the `paramUtxo` from the `mintOneTimeMintingPolicy` transaction.\n *\n * @returns {Promise<string>}\n *\n * @example\n * ```typescript\n * const txHex = await contract.setupOracleUtxo();\n * const signedTx = await wallet.signTx(txHex);\n * const txHash = await wallet.submitTx(signedTx);\n * ```\n */\n setupOracleUtxo = async () => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n const datumValue = this.getOracleDatum(0, 0);\n const txHex = await this.mesh\n .txOut(this.scriptInfo.oracleValidator.address, [\n { unit: this.scriptInfo.oracleNFT.hash + \"\", quantity: \"1\" },\n ])\n .txOutInlineDatumValue(datumValue)\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return txHex;\n };\n\n /**\n * [Setup phase]\n * This are the next transactions you need to setup the contract.\n * You need to run once for each script, and you would likely have to run one after the previous one is confirmed.\n *\n * This transaction sends the reference scripts to the blockchain for later transactions,\n * boosting efficiency and avoid exceeding 16kb of transaction size limits enforced by protocol parameter.\n *\n * Note: You must provide the `paramUtxo` from the `mintOneTimeMintingPolicy` transaction.\n * Note: You must save txHash (after signed and submitted) for `ContentRegistry`, `ContentRefToken`, `OwnershipRegistry`, `OwnershipRefToken` transactions for future transactions.\n *\n * @param scriptIndex - \"OracleNFT\" | \"OracleValidator\" | \"ContentRegistry\" | \"ContentRefToken\" | \"OwnershipRegistry\" | \"OwnershipRefToken\"\n * @returns {Promise<string>}\n *\n * @example\n * ```typescript\n * const txHexOracleNFT = await contract.sendRefScriptOnchain(\"OracleNFT\");\n * const signedTxOracleNFT = await wallet.signTx(txHexOracleNFT);\n * const txHashOracleNFT = await wallet.submitTx(signedTxOracleNFT);\n *\n * const txHexOracleValidator = await contract.sendRefScriptOnchain(\"OracleValidator\");\n * ... // repeat for each script\n *\n * const txHexOwnershipRefToken = await contract.sendRefScriptOnchain(\"OwnershipRefToken\");\n * const signedTxOwnershipRefToken = await wallet.signTx(txHexOwnershipRefToken);\n * const txHashOwnershipRefToken = await wallet.submitTx(signedTxOwnershipRefToken);\n * ```\n */\n sendRefScriptOnchain = async (scriptIndex: ScriptIndex) => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n const { scriptAddress } = this.getOwnerNativeScript();\n const txHex = await this.mesh\n .txOut(scriptAddress, [])\n .txOutReferenceScript(getScriptCbor(this.paramUtxo, scriptIndex))\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return txHex;\n };\n\n /**\n * [Setup phase]\n * This is the next transaction you need to setup the contract after completing all the `sendRefScriptOnchain` transactions.\n *\n * This transaction creates one content registry. Each registry should comes in pair with one ownership registry and\n * each pair of registry serves around 50 records of content ownership. The application can be scaled indefinitely\n * according to the number of parallelization needed and volumes of content expected to be managed.\n *\n * Note: You must provide the `paramUtxo` from the `mintOneTimeMintingPolicy` transaction.\n * Note: You must provide the txHash for `ContentRegistry`, `ContentRefToken`, `OwnershipRegistry`, `OwnershipRefToken`\n *\n * @returns {Promise<string>}\n *\n * @example\n * ```typescript\n * const txHex = await contract.createContentRegistry();\n * const signedTx = await wallet.signTx(txHex);\n * const txHash = await wallet.submitTx(signedTx);\n * ```\n */\n createContentRegistry = async () => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const scriptUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const currentOracleDatum = await this.getCurrentOracleDatum(scriptUtxo);\n const contentNumber = currentOracleDatum.fields[4].int as number;\n const ownershipNumber = currentOracleDatum.fields[7].int as number;\n const contentTokenName = stringToHex(`Registry (${contentNumber})`);\n const {\n input: { txHash: oracleTxHash, outputIndex: oracleTxId },\n output: { address: oracleAddress, amount: oracleValue },\n } = scriptUtxo[0]!;\n const oracleDatumValue = this.getOracleDatum(\n contentNumber + 1,\n ownershipNumber,\n );\n console.log(\"Oracle Datum\", oracleDatumValue);\n console.log(\"this.refScriptUtxos\", this.refScriptUtxos);\n\n const txHex = await this.mesh\n .spendingPlutusScriptV3()\n .txIn(oracleTxHash, oracleTxId, oracleValue, oracleAddress)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr0([]))\n .txInScript(this.scriptInfo.oracleValidator.cbor)\n .txOut(this.scriptInfo.oracleValidator.address, [\n { unit: this.scriptInfo.oracleNFT.hash + \"\", quantity: \"1\" },\n ])\n .txOutInlineDatumValue(oracleDatumValue)\n .txOut(this.scriptInfo.contentRegistry.address, [\n {\n unit: this.scriptInfo.contentRefToken.hash + contentTokenName,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(mConStr0([0, []]))\n .mintPlutusScriptV3()\n .mint(\"1\", this.scriptInfo.contentRefToken.hash, contentTokenName)\n .mintTxInReference(\n this.refScriptUtxos.contentRefToken.txHash,\n this.refScriptUtxos.contentRefToken.outputIndex,\n (this.scriptInfo.contentRefToken.cbor.length / 2).toString(),\n this.scriptInfo.contentRefToken.hash,\n )\n .mintRedeemerValue(mConStr0([]))\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n /**\n * [Setup phase]\n * This is the last transaction you need to setup the contract after completing all the `sendRefScriptOnchain` transactions.\n *\n * This transaction creates one content registry. Each registry should comes in pair with one content registry and\n * each pair of registry serves around 50 records of content ownership. The application can be scaled indefinitely\n * according to the number of parallelization needed and volumes of content expected to be managed.\n *\n * Note: You must provide the `paramUtxo` from the `mintOneTimeMintingPolicy` transaction.\n * Note: You must provide the txHash for `ContentRegistry`, `ContentRefToken`, `OwnershipRegistry`, `OwnershipRefToken`\n *\n * @returns {Promise<string>}\n *\n * @example\n * ```typescript\n * const txHex = await contract.createOwnershipRegistry();\n * const signedTx = await wallet.signTx(txHex);\n * const txHash = await wallet.submitTx(signedTx);\n * ```\n */\n createOwnershipRegistry = async () => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const scriptUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const currentOracleDatum = await this.getCurrentOracleDatum(scriptUtxo);\n const contentNumber = currentOracleDatum.fields[4].int as number;\n const ownershipNumber = currentOracleDatum.fields[7].int as number;\n const ownershipTokenName = stringToHex(`Registry (${ownershipNumber})`);\n const {\n input: { txHash: oracleTxHash, outputIndex: oracleTxId },\n output: { address: oracleAddress, amount: oracleValue },\n } = scriptUtxo[0]!;\n const oracleDatumValue = this.getOracleDatum(\n contentNumber,\n ownershipNumber + 1,\n );\n console.log(\"Oracle Datum\", oracleDatumValue);\n\n const txHex = await this.mesh\n .spendingPlutusScriptV3()\n .txIn(oracleTxHash, oracleTxId, oracleValue, oracleAddress)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr1([]))\n .txInScript(this.scriptInfo.oracleValidator.cbor)\n .txOut(this.scriptInfo.oracleValidator.address, [\n { unit: this.scriptInfo.oracleNFT.hash + \"\", quantity: \"1\" },\n ])\n .txOutInlineDatumValue(oracleDatumValue)\n .txOut(this.scriptInfo.ownershipRegistry.address, [\n {\n unit: this.scriptInfo.ownershipRefToken.hash + ownershipTokenName,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(mConStr0([0, []]))\n .mintPlutusScriptV3()\n .mint(\"1\", this.scriptInfo.ownershipRefToken.hash, ownershipTokenName)\n .mintTxInReference(\n this.refScriptUtxos.ownershipRefToken.txHash,\n this.refScriptUtxos.ownershipRefToken.outputIndex,\n (this.scriptInfo.ownershipRefToken.cbor.length / 2).toString(),\n this.scriptInfo.ownershipRefToken.hash,\n )\n .mintRedeemerValue(mConStr0([]))\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n /**\n * Get the current oracle data.\n *\n * @returns {Promise<{\n * contentNumber: number,\n * ownershipNumber: number,\n * }>}\n *\n * @example\n * ```typescript\n * const oracleData = await contract.getOracleData();\n * ```\n */\n getOracleData = async () => {\n const scriptUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const currentOracleDatum = await this.getCurrentOracleDatum(scriptUtxo);\n\n const contentNumber = currentOracleDatum.fields[4].int as number;\n const ownershipNumber = currentOracleDatum.fields[7].int as number;\n\n return {\n contentNumber,\n ownershipNumber,\n };\n };\n\n /**\n * [User]\n *\n * This transaction mints a user token which can be used to represent the ownership of the content. This token is used in `createContent()` transaction.\n *\n * @param tokenName - The name of the token that you can specify.\n * @param tokenMetadata - The metadata of the token that you can specify.\n * @returns {Promise<string>}\n *\n * @example\n * ```typescript\n * const tx = await contract.mintUserToken(\"MeshContentOwnership\", {\n * name: \"Mesh Content Ownership\",\n * description: \"Demo at https://meshjs.dev/smart-contracts/content-ownership\",\n * });\n * const signedTx = await wallet.signTx(tx, true);\n * const txHash = await wallet.submitTx(signedTx);\n */\n mintUserToken = async (tokenName: string, tokenMetadata = {}) => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n\n const { pubKeyHash: keyHash } = deserializeAddress(walletAddress);\n const nativeScript: NativeScript = {\n type: \"all\",\n scripts: [\n {\n type: \"sig\",\n keyHash: keyHash,\n },\n ],\n };\n\n const forgingScript = ForgeScript.fromNativeScript(nativeScript);\n\n const policyId = resolveScriptHash(forgingScript);\n const tokenNameHex = stringToHex(tokenName);\n const metadata = { [policyId]: { [tokenName]: { ...tokenMetadata } } };\n\n const txHex = await this.mesh\n .mint(\"1\", policyId, tokenNameHex)\n .mintingScript(forgingScript)\n .metadataValue(721, metadata)\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n /**\n *\n * @param ownerAssetHex\n * @param contentHashHex\n * @param registryNumber\n * @returns\n */\n createContent = async (\n ownerAssetHex: string,\n contentHashHex: string,\n registryNumber = 0,\n ) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const registryName = stringToHex(`Registry (${registryNumber})`);\n const oracleUtxo: UTxO[] = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const contentUtxo: UTxO[] = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.contentRegistry.address,\n this.scriptInfo.contentRefToken.hash + registryName,\n );\n const ownershipUtxo: UTxO[] = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.ownershipRegistry.address,\n this.scriptInfo.ownershipRefToken.hash + registryName,\n );\n const { txHash: oracleTxHash, outputIndex: oracleTxId } =\n oracleUtxo[0]!.input;\n\n const {\n input: { txHash: contentTxHash, outputIndex: contentTxId },\n output: { address: _contentAddress, amount: contentAmount },\n } = contentUtxo[0]!;\n const {\n input: { txHash: ownershipTxHash, outputIndex: ownershipTxId },\n output: { amount: ownershipValue, address: ownershipAddress },\n } = ownershipUtxo[0]!;\n const ownerAssetClass: [string, string] = [\n ownerAssetHex.slice(0, 56),\n ownerAssetHex.slice(56),\n ];\n const newContentRegistry = this.insertContentRegistry(\n contentUtxo[0]!.output.plutusData!,\n contentHashHex,\n );\n const newOwnershipRegistry = this.insertOwnershipRegistry(\n ownershipUtxo[0]!.output.plutusData!,\n ownerAssetClass,\n );\n\n const txHex = await this.mesh\n .spendingPlutusScriptV3()\n .txIn(\n contentTxHash,\n contentTxId,\n contentAmount,\n this.scriptInfo.contentRegistry.address,\n )\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(0, [contentHashHex, ownerAssetClass]))\n .spendingTxInReference(\n this.refScriptUtxos.contentRegistry.txHash,\n this.refScriptUtxos.contentRegistry.outputIndex,\n (this.scriptInfo.contentRegistry.cbor.length / 2).toString(),\n this.scriptInfo.contentRegistry.hash,\n )\n .txOut(this.scriptInfo.contentRegistry.address, [\n {\n unit: this.scriptInfo.contentRefToken.hash + registryName,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(newContentRegistry)\n .spendingPlutusScriptV3()\n .txIn(ownershipTxHash, ownershipTxId, ownershipValue, ownershipAddress)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(0, []))\n .spendingTxInReference(\n this.refScriptUtxos.ownershipRegistry.txHash,\n this.refScriptUtxos.ownershipRegistry.outputIndex,\n (this.scriptInfo.ownershipRegistry.cbor.length / 2).toString(),\n this.scriptInfo.ownershipRegistry.hash,\n )\n .txOut(this.scriptInfo.ownershipRegistry.address, [\n {\n unit: this.scriptInfo.ownershipRefToken.hash + registryName,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(newOwnershipRegistry)\n .readOnlyTxInReference(oracleTxHash, oracleTxId)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n /**\n * Get the content at the registry given the registry number and content number.\n * @param registryNumber\n * @param contentNumber\n * @returns\n */\n getContent = async (registryNumber: number, contentNumber: number) => {\n const [content] = await this.getScriptUtxos(registryNumber, [\"content\"]);\n\n if (content === undefined) throw new Error(\"Content registry not found\");\n\n const contentDatam: ContentRegistryDatum = parseDatumCbor(\n content.output.plutusData!,\n );\n\n const contentAtRegistry = contentDatam.fields[1].list;\n\n if (contentAtRegistry.length <= contentNumber)\n throw new Error(\"Content not found\");\n\n const decoded = toUTF8(contentAtRegistry[contentNumber]?.bytes!);\n\n return decoded;\n };\n\n updateContent = async ({\n ownerTokenUtxo,\n registryNumber,\n newContentHashHex,\n contentNumber,\n }: UpdateContent) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const registryTokenNameHex = stringToHex(`Registry (${registryNumber})`);\n const [oracle, content, ownership] =\n await this.getScriptUtxos(registryNumber);\n const newContentRegistry = this.updateContentRegistry(\n content!.output.plutusData!,\n contentNumber,\n newContentHashHex,\n );\n\n await this.mesh\n .txIn(\n ownerTokenUtxo.input.txHash,\n ownerTokenUtxo.input.outputIndex,\n ownerTokenUtxo.output.amount,\n ownerTokenUtxo.output.address,\n )\n .spendingPlutusScriptV3()\n .txIn(\n content!.input.txHash,\n content!.input.outputIndex,\n content!.output.amount,\n content!.output.address,\n )\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(1, [newContentHashHex, contentNumber]))\n .spendingTxInReference(\n this.refScriptUtxos.contentRegistry.txHash,\n this.refScriptUtxos.contentRegistry.outputIndex,\n (this.scriptInfo.contentRegistry.cbor.length / 2).toString(),\n this.scriptInfo.contentRegistry.hash,\n )\n .txOut(this.scriptInfo.contentRegistry.address, [\n {\n unit: this.scriptInfo.contentRefToken.hash + registryTokenNameHex,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(newContentRegistry)\n .readOnlyTxInReference(oracle!.input.txHash, oracle!.input.outputIndex)\n .readOnlyTxInReference(\n ownership!.input.txHash,\n ownership!.input.outputIndex,\n )\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n const txBody = this.mesh.completeSigning();\n return txBody;\n };\n\n transferContent = async ({\n ownerTokenUtxo,\n registryNumber,\n newOwnerAssetHex,\n contentNumber,\n }: TransferContent) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const registryTokenNameHex = stringToHex(`Registry (${registryNumber})`);\n const [oracle, ownership] = await this.getScriptUtxos(registryNumber, [\n \"oracle\",\n \"ownership\",\n ]);\n const newOwnerAssetClass: [string, string] = [\n newOwnerAssetHex.slice(0, 56),\n newOwnerAssetHex.slice(56),\n ];\n const newOwnershipRegistry = this.updateOwnershipRegistry(\n ownership!.output.plutusData!,\n contentNumber,\n newOwnerAssetClass,\n );\n\n await this.mesh\n .txIn(\n ownerTokenUtxo.input.txHash,\n ownerTokenUtxo.input.outputIndex,\n ownerTokenUtxo.output.amount,\n ownerTokenUtxo.output.address,\n )\n .spendingPlutusScriptV3()\n .txIn(\n ownership!.input.txHash,\n ownership!.input.outputIndex,\n ownership!.output.amount,\n ownership!.output.address,\n )\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(1, [newOwnerAssetClass, contentNumber]))\n .spendingTxInReference(\n this.refScriptUtxos.ownershipRegistry.txHash,\n this.refScriptUtxos.ownershipRegistry.outputIndex,\n (this.scriptInfo.ownershipRegistry.cbor.length / 2).toString(),\n this.scriptInfo.ownershipRegistry.hash,\n )\n .txOut(this.scriptInfo.ownershipRegistry.address, [\n {\n unit: this.scriptInfo.ownershipRefToken.hash + registryTokenNameHex,\n quantity: \"1\",\n },\n ])\n .txOutInlineDatumValue(newOwnershipRegistry)\n .readOnlyTxInReference(oracle!.input.txHash, oracle!.input.outputIndex)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n const txBody = this.mesh.completeSigning();\n return txBody;\n };\n\n // Admin\n\n stopContentRegistry = async (registryNumber: number) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const registryTokenNameHex = stringToHex(`Registry (${registryNumber})`);\n const scriptUtxos = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.contentRegistry.address,\n this.scriptInfo.contentRefToken.hash + registryTokenNameHex,\n );\n const oracleUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const { txHash: oracleTxHash, outputIndex: oracleTxId } =\n oracleUtxo[0]!.input;\n const {\n input: { txHash: validatorTxHash, outputIndex: validatorTxId },\n output: { amount: scriptValue, address: scriptAddress },\n } = scriptUtxos[0]!;\n\n const txHex = await this.mesh\n .spendingPlutusScriptV3()\n .txIn(validatorTxHash, validatorTxId, scriptValue, scriptAddress)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(2, []))\n .txInScript(this.scriptInfo.contentRegistry.cbor)\n .mintPlutusScriptV2()\n .mint(\"-1\", this.scriptInfo.contentRefToken.hash, registryTokenNameHex)\n .mintTxInReference(\n this.refScriptUtxos.contentRefToken.txHash,\n this.refScriptUtxos.contentRefToken.outputIndex,\n (this.scriptInfo.contentRefToken.cbor.length / 2).toString(),\n this.scriptInfo.contentRefToken.hash,\n )\n .mintRedeemerValue(mConStr1([]))\n .readOnlyTxInReference(oracleTxHash, oracleTxId)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .requiredSignerHash(this.opsKey)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n stopOwnershipRegistry = async (registryNumber: number) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n const registryTokenNameHex = stringToHex(`Registry (${registryNumber})`);\n const scriptUtxos = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.ownershipRegistry.address,\n this.scriptInfo.ownershipRefToken.hash + registryTokenNameHex,\n );\n const oracleUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const { txHash: oracleTxHash, outputIndex: oracleTxId } =\n oracleUtxo[0]!.input;\n const {\n input: { txHash: validatorTxHash, outputIndex: validatorTxId },\n output: { amount: scriptValue, address: scriptAddress },\n } = scriptUtxos[0]!;\n\n const txHex = await this.mesh\n .spendingPlutusScriptV3()\n .txIn(validatorTxHash, validatorTxId, scriptValue, scriptAddress)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(2, []))\n .txInScript(this.scriptInfo.ownershipRegistry.cbor)\n .mintPlutusScriptV2()\n .mint(\"-1\", this.scriptInfo.ownershipRefToken.hash, registryTokenNameHex)\n .mintTxInReference(\n this.refScriptUtxos.ownershipRefToken.txHash,\n this.refScriptUtxos.ownershipRefToken.outputIndex,\n (this.scriptInfo.ownershipRefToken.cbor.length / 2).toString(),\n this.scriptInfo.ownershipRefToken.hash,\n )\n .mintRedeemerValue(mConStr1([]))\n .readOnlyTxInReference(oracleTxHash, oracleTxId)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .requiredSignerHash(this.opsKey)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n stopOracle = async (txInHash: string, txInId: number) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n\n const oracleUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n const { txHash, outputIndex } = oracleUtxo[0]!.input;\n\n const txHex = await this.mesh\n .txIn(txInHash, txInId)\n .spendingPlutusScriptV3()\n .txIn(txHash, outputIndex)\n .txInInlineDatumPresent()\n .txInRedeemerValue(mConStr(3, []))\n .txInScript(this.scriptInfo.oracleValidator.cbor)\n .mintPlutusScriptV2()\n .mint(\"-1\", this.scriptInfo.oracleNFT.hash, \"\")\n .mintingScript(this.scriptInfo.oracleNFT.cbor)\n .mintRedeemerValue(mConStr1([]))\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .requiredSignerHash(this.opsKey)\n .requiredSignerHash(this.opsKey)\n .selectUtxosFrom(utxos)\n .complete();\n\n return txHex;\n };\n\n // Helpers\n\n protected getCurrentOracleDatum = async (utxos?: UTxO[]) => {\n let oracleUtxo: UTxO[] = utxos || [];\n if (oracleUtxo.length === 0) {\n oracleUtxo = await this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n );\n }\n const oracleDatum = parseInlineDatum<any, OracleDatum>({\n inline_datum: oracleUtxo[0]!.output.plutusData!,\n });\n return oracleDatum;\n };\n\n protected getOracleDatum = (\n contentRegistryCount: number,\n ownershipRegistryCount: number,\n ) => {\n const oracleAddr = mScriptAddress(\n this.scriptInfo.oracleValidator.hash,\n this.stakeCredential,\n );\n const contentRegistryAddr = mScriptAddress(\n this.scriptInfo.contentRegistry.hash,\n this.stakeCredential,\n );\n const ownershipRegistryAddr = mScriptAddress(\n this.scriptInfo.ownershipRegistry.hash,\n this.stakeCredential,\n );\n\n return mConStr0([\n this.scriptInfo.oracleNFT.hash,\n oracleAddr,\n this.scriptInfo.contentRefToken.hash,\n contentRegistryAddr,\n contentRegistryCount,\n this.scriptInfo.ownershipRefToken.hash,\n ownershipRegistryAddr,\n ownershipRegistryCount,\n this.opsKey,\n this.opsKey,\n ]);\n };\n\n protected getContentDatum = (contentArray: string[]) => {\n return mConStr0([contentArray.length, contentArray]);\n };\n\n protected getOwnershipDatum = (ownershipArray: [string, string][]) => {\n return mConStr0([ownershipArray.length, ownershipArray]);\n };\n\n getScriptUtxos = async (\n registryNumber: number,\n toFetch: (\"oracle\" | \"content\" | \"ownership\")[] = [\n \"oracle\",\n \"content\",\n \"ownership\",\n ],\n ) => {\n const registryTokenNameHex = stringToHex(`Registry (${registryNumber})`);\n const promises: Promise<UTxO[]>[] = [];\n toFetch.forEach((script) => {\n switch (script) {\n case \"oracle\":\n promises.push(\n this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.oracleValidator.address,\n this.scriptInfo.oracleNFT.hash,\n ),\n );\n break;\n case \"content\":\n promises.push(\n this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.contentRegistry.address,\n this.scriptInfo.contentRefToken.hash + registryTokenNameHex,\n ),\n );\n case \"ownership\":\n promises.push(\n this.fetcher!.fetchAddressUTxOs(\n this.scriptInfo.ownershipRegistry.address,\n this.scriptInfo.ownershipRefToken.hash + registryTokenNameHex,\n ),\n );\n break;\n }\n });\n const scriptsInput = await Promise.all(promises);\n return scriptsInput.map((utxos) => utxos[0]);\n };\n\n private insertContentRegistry = (\n plutusData: string,\n newContentHash: string,\n ): Data => {\n const contentRegistry = parseInlineDatum<any, ContentRegistryDatum>({\n inline_datum: plutusData,\n }).fields[1].list.map((plutusBytes) => plutusBytes.bytes);\n const newContentRegistry = this.getContentDatum([\n ...contentRegistry,\n newContentHash,\n ]);\n return newContentRegistry;\n };\n\n private insertOwnershipRegistry = (\n plutusData: string,\n ownerAssetClass: [string, string],\n ): Data => {\n const ownershipRegistry = parseInlineDatum<any, OwnershipRegistryDatum>({\n inline_datum: plutusData,\n }).fields[1].list.map((plutusBytesArray): [string, string] => [\n plutusBytesArray.list[0].bytes,\n plutusBytesArray.list[1].bytes,\n ]);\n const newContentRegistry = this.getOwnershipDatum([\n ...ownershipRegistry,\n ownerAssetClass,\n ]);\n return newContentRegistry;\n };\n\n private updateContentRegistry = (\n plutusData: string,\n contentNumber: number,\n newContentHash: string,\n ): Data => {\n const contentRegistry = parseInlineDatum<any, ContentRegistryDatum>({\n inline_datum: plutusData,\n }).fields[1].list.map((plutusBytes) => plutusBytes.bytes);\n contentRegistry[contentNumber] = newContentHash;\n const newContentRegistry = this.getContentDatum(contentRegistry);\n return newContentRegistry;\n };\n\n private updateOwnershipRegistry = (\n plutusData: string,\n contentNumber: number,\n ownerAssetClass: [string, string],\n ): Data => {\n const ownershipRegistry = parseInlineDatum<any, OwnershipRegistryDatum>({\n inline_datum: plutusData,\n }).fields[1].list.map((plutusBytesArray): [string, string] => [\n plutusBytesArray.list[0].bytes,\n plutusBytesArray.list[1].bytes,\n ]);\n ownershipRegistry[contentNumber] = ownerAssetClass;\n const newContentRegistry = this.getOwnershipDatum(ownershipRegistry);\n return newContentRegistry;\n };\n}\n","import {\n BrowserWallet,\n IFetcher,\n IWallet,\n LanguageVersion,\n MeshTxBuilder,\n MeshWallet,\n serializePlutusScript,\n UTxO,\n} from \"@meshsdk/core\";\n\nexport type MeshTxInitiatorInput = {\n mesh: MeshTxBuilder;\n fetcher?: IFetcher;\n wallet?: IWallet;\n networkId?: number;\n stakeCredential?: string;\n version?: number;\n};\n\nexport class MeshTxInitiator {\n mesh: MeshTxBuilder;\n fetcher?: IFetcher;\n wallet?: IWallet;\n stakeCredential?: string;\n networkId = 0;\n version = 2;\n languageVersion: LanguageVersion = \"V2\";\n\n constructor({\n mesh,\n fetcher,\n wallet,\n networkId = 0,\n stakeCredential = \"c08f0294ead5ab7ae0ce5471dd487007919297ba95230af22f25e575\",\n version = 2,\n }: MeshTxInitiatorInput) {\n this.mesh = mesh;\n if (fetcher) {\n this.fetcher = fetcher;\n }\n if (wallet) {\n this.wallet = wallet;\n }\n\n this.networkId = networkId;\n switch (this.networkId) {\n case 1:\n this.mesh.setNetwork(\"mainnet\");\n break;\n default:\n this.mesh.setNetwork(\"preprod\");\n }\n\n this.version = version;\n switch (this.version) {\n case 1:\n this.languageVersion = \"V2\";\n break;\n default:\n this.languageVersion = \"V3\";\n }\n\n if (stakeCredential) {\n this.stakeCredential = stakeCredential;\n }\n }\n\n getScriptAddress = (scriptCbor: string) => {\n const { address } = serializePlutusScript(\n { code: scriptCbor, version: this.languageVersion },\n this.stakeCredential,\n this.networkId,\n );\n return address;\n };\n\n protected signSubmitReset = async () => {\n const signedTx = this.mesh.completeSigning();\n const txHash = await this.mesh.submitTx(signedTx);\n this.mesh.reset();\n return txHash;\n };\n\n protected queryUtxos = async (walletAddress: string): Promise<UTxO[]> => {\n if (this.fetcher) {\n const utxos = await this.fetcher.fetchAddressUTxOs(walletAddress);\n return utxos;\n }\n return [];\n };\n\n protected getWalletDappAddress = async () => {\n if (this.wallet) {\n const usedAddresses = await this.wallet.getUsedAddresses();\n if (usedAddresses.length > 0) {\n return usedAddresses[0];\n }\n const unusedAddresses = await this.wallet.getUnusedAddresses();\n if (unusedAddresses.length > 0) {\n return unusedAddresses[0];\n }\n }\n return \"\";\n };\n\n protected getWalletCollateral = async (): Promise<UTxO | undefined> => {\n if (this.wallet) {\n const utxos = await this.wallet.getCollateral();\n return utxos[0];\n }\n return undefined;\n };\n\n protected getWalletUtxosWithMinLovelace = async (\n lovelace: number,\n providedUtxos: UTxO[] = [],\n ) => {\n let utxos: UTxO[] = providedUtxos;\n if (this.wallet && (!providedUtxos || providedUtxos.length === 0)) {\n utxos = await this.wallet.getUtxos();\n }\n return utxos.filter((u) => {\n const lovelaceAmount = u.output.amount.find(\n (a: any) => a.unit === \"lovelace\",\n )?.quantity;\n return Number(lovelaceAmount) > lovelace;\n });\n };\n\n protected getWalletUtxosWithToken = async (\n assetHex: string,\n userUtxos: UTxO[] = [],\n ) => {\n let utxos: UTxO[] = userUtxos;\n if (this.wallet && userUtxos.length === 0) {\n utxos = await this.wallet.getUtxos();\n }\n return utxos.filter((u) => {\n const assetAmount = u.output.amount.find(\n (a: any) => a.unit === assetHex,\n )?.quantity;\n return Number(assetAmount) >= 1;\n });\n };\n\n protected getAddressUtxosWithMinLovelace = async (\n walletAddress: string,\n lovelace: number,\n providedUtxos: UTxO[] = [],\n ) => {\n let utxos: UTxO[] = providedUtxos;\n if (this.fetcher && (!providedUtxos || providedUtxos.length === 0)) {\n utxos = await this.fetcher.fetchAddressUTxOs(walletAddress);\n }\n return utxos.filter((u) => {\n const lovelaceAmount = u.output.amount.find(\n (a: any) => a.unit === \"lovelace\",\n )?.quantity;\n return Number(lovelaceAmount) > lovelace;\n });\n };\n\n protected getAddressUtxosWithToken = async (\n walletAddress: string,\n assetHex: string,\n userUtxos: UTxO[] = [],\n ) => {\n let utxos: UTxO[] = userUtxos;\n if (this.fetcher && userUtxos.length === 0) {\n utxos = await this.fetcher.fetchAddressUTxOs(walletAddress);\n }\n return utxos.filter((u) => {\n const assetAmount = u.output.amount.find(\n (a: any) => a.unit === assetHex,\n )?.quantity;\n return Number(assetAmount) >= 1;\n });\n };\n\n protected getWalletInfoForTx = async () => {\n const utxos = await this.wallet?.getUtxos();\n const collateral = await this.getWalletCollateral();\n const walletAddress = await this.getWalletDappAddress();\n if (!utxos || utxos?.length === 0) {\n throw new Error(\"No utxos found\");\n }\n if (!collateral) {\n throw new Error(\"No collateral found\");\n }\n if (!walletAddress) {\n throw new Error(\"No wallet address found\");\n }\n return { utxos, collateral, walletAddress };\n };\n\n protected _getUtxoByTxHash = async (\n txHash: string,\n scriptCbor?: string,\n ): Promise<UTxO | undefined> => {\n if (this.fetcher) {\n const utxos = await this.fetcher?.fetchUTxOs(txHash);\n let scriptUtxo = utxos[0];\n\n if (scriptCbor) {\n const scriptAddr = serializePlutusScript(\n { code: scriptCbor, version: this.languageVersion },\n this.stakeCredential,\n this.networkId,\n ).address;\n scriptUtxo =\n utxos.filter((utxo) => utxo.output.address === scriptAddr)[0] ||\n utxos[0];\n }\n\n return scriptUtxo;\n }\n\n return undefined;\n };\n}\n","import {\n builtinByteString,\n outputReference,\n resolveScriptHash,\n serializePlutusScript,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport blueprint from \"../aiken-workspace/plutus.json\";\n\nexport { blueprint };\n\nexport type InputUTxO = UTxO[\"input\"];\n\nexport type ScriptIndex =\n | \"OracleNFT\"\n | \"OracleValidator\"\n | \"ContentRegistry\"\n | \"ContentRefToken\"\n | \"OwnershipRegistry\"\n | \"OwnershipRefToken\";\n\nexport const getScriptCbor = (\n oracleParamUtxo: UTxO[\"input\"],\n scriptIndex: ScriptIndex,\n) => {\n const validators = blueprint.validators;\n const oracleNFTCbor = applyParamsToScript(\n validators[4]!.compiledCode,\n [outputReference(oracleParamUtxo.txHash, oracleParamUtxo.outputIndex)],\n \"JSON\",\n );\n const oracleNFTToParam = builtinByteString(\n resolveScriptHash(oracleNFTCbor, \"V3\"),\n );\n switch (scriptIndex) {\n case \"OracleNFT\":\n return oracleNFTCbor;\n case \"OracleValidator\":\n return applyParamsToScript(validators[6]!.compiledCode, [], \"JSON\");\n case \"ContentRegistry\":\n return applyParamsToScript(\n validators[0]!.compiledCode,\n [oracleNFTToParam],\n \"JSON\",\n );\n case \"ContentRefToken\":\n return applyParamsToScript(\n validators[2]!.compiledCode,\n [oracleNFTToParam],\n \"JSON\",\n );\n case \"OwnershipRegistry\":\n return applyParamsToScript(\n validators[8]!.compiledCode,\n [oracleNFTToParam],\n \"JSON\",\n );\n case \"OwnershipRefToken\":\n return applyParamsToScript(\n validators[10]!.compiledCode,\n [oracleNFTToParam],\n \"JSON\",\n );\n }\n};\n\nexport const getScriptHash = (\n oracleParamUtxo: UTxO[\"input\"],\n scriptIndex: ScriptIndex,\n) => {\n const scriptCbor = getScriptCbor(oracleParamUtxo, scriptIndex);\n return resolveScriptHash(scriptCbor, \"V3\");\n};\n\nexport const getScriptInfo = (\n oracleParamUtxo: UTxO[\"input\"],\n stakeCredential?: string,\n networkId = 0,\n) => {\n const info = {\n oracleNFT: {\n hash: getScriptHash(oracleParamUtxo, \"OracleNFT\"),\n cbor: getScriptCbor(oracleParamUtxo, \"OracleNFT\"),\n },\n oracleValidator: {\n hash: getScriptHash(oracleParamUtxo, \"OracleValidator\"),\n cbor: getScriptCbor(oracleParamUtxo, \"OracleValidator\"),\n address: \"\",\n },\n contentRegistry: {\n hash: getScriptHash(oracleParamUtxo, \"ContentRegistry\"),\n cbor: getScriptCbor(oracleParamUtxo, \"ContentRegistry\"),\n address: \"\",\n },\n contentRefToken: {\n hash: getScriptHash(oracleParamUtxo, \"ContentRefToken\"),\n cbor: getScriptCbor(oracleParamUtxo, \"ContentRefToken\"),\n },\n ownershipRegistry: {\n hash: getScriptHash(oracleParamUtxo, \"OwnershipRegistry\"),\n cbor: getScriptCbor(oracleParamUtxo, \"OwnershipRegistry\"),\n address: \"\",\n },\n ownershipRefToken: {\n hash: getScriptHash(oracleParamUtxo, \"OwnershipRefToken\"),\n cbor: getScriptCbor(oracleParamUtxo, \"OwnershipRefToken\"),\n },\n };\n\n const oracleAddress = serializePlutusScript(\n { code: info.oracleValidator.cbor, version: \"V3\" },\n stakeCredential,\n networkId,\n ).address;\n const contentRegistryAddress = serializePlutusScript(\n { code: info.contentRegistry.cbor, version: \"V3\" },\n stakeCredential,\n networkId,\n ).address;\n const ownershipRegistryAddress = serializePlutusScript(\n { code: info.ownershipRegistry.cbor, version: \"V3\" },\n stakeCredential,\n networkId,\n ).address;\n info.oracleValidator.address = oracleAddress;\n info.contentRegistry.address = contentRegistryAddress;\n info.ownershipRegistry.address = ownershipRegistryAddress;\n\n return info;\n};\n","{\n \"preamble\": {\n \"title\": \"meshjs/content-ownership\",\n \"description\": \"Aiken contracts for project 'meshjs/content-ownership'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.3+3d77b5c\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"content_registry.content_registry.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1ContentRegistryDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1ContentRegistryRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590d4c0101003232323232323223225333004323232323253323300a3001300b375400426464646464646464a6660246006002264646464a666032603800426601200244a6660360042a0102646004603e0066eb8c07400858dd6180d000980d0011bae3018001301437540162a6660246012002264646464a66603260380042a00c2c6eb4c068004c068008dd7180c000980a1baa00b15333012300400115333015301437540162a0042c2c60246ea80284c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc0840045280a9998109812000899192999810180918109baa001132533302130123022375400226464646464646464646464646464646464646464a6660706076004264646600202626600201e26600201226464646464646464646464a6660846066016264646464646464a6660980040022a666098609e004264a66609a0080042a66609a60a00082646464a66609a607c609c6ea80044c8c94ccc13cc100c140dd500089919191919299982b982d001899299982c182d801899299982b1824182b9baa001132325333058304a305937540022646603a00626603c002264a6660b4609860b66ea80044c8c94ccc170c138c174dd50008991981080189981100089919191919299983119b8f01501315333062005153330620021533306200115333062004100314a029405280a5014a060a6604e60446eacc118c18cdd50069829181318109bab30453062375401a66ebc00cc118cc18cdd418139bad30223061375400e660c66e9ccc88c8cc00400400c894ccc198004400c4cc19cc1a0004cc008008c1a4004dd6182218309baa00733063374e03697ae04bd7019baf0043045330623750604c6eb4c084c180dd5004198311ba73301d3758608660c06ea8020cc188dd480da5eb812f5c066e1cdd69810182f9baa007375a604060be6ea8014c184c178dd50008b181e982e9baa007305f305c37540022c607660b66ea8018c174c168dd50008b181c982c9baa303c3059375401a60b660b06ea800458c0dcc15cdd5181d182b9baa00c163059002163058002375860ae60b00046eb0c158004cc150dd3999980901d8140150019982a1ba7333301203b0220240014bd701bae30543055375860a860a26ea800458cc00cc03cdd5981998281baa303330503754008466e3cdd718090008119bae30523053375860a4609e6ea800458cc004c034dd5981898271baa3031304e3754006466e3cdd718080008139119198008008019129998290008a60103d87a800013232533305130050021303833055374e00497ae01330040040013056002375860a8002609e008004609c0040022940dd618260011bac304b304c00133049374e66600a06803a03e660926e9cccc0140d005c0652f5c06eb0c124c128008dd7182400098221baa03b1325333043303a00c13232323232533304b304e0021325333049303a304a375400226464646464a6660a260a8006264a6660a460aa00626464a6660a2608660a46ea80044c8cc05c0044c94ccc14cc110c150dd500089919299982a8030a99982a80108008a5014a0608c6034602a6eacc0e4c158dd500319b8848000c8c8c8c94ccc168c1740084c8cc004004c8cc004004120894ccc17400452f5c02660bc6ea0ccc100dd5981f982e1baa303f305c375460be00200c0086600400460c000244a6660b800229000099b80375a60bc0026600400460be0022c6eb8c16c004c16c008dd7182c8009bac3058305537540022c66646002002444a6660b00042980103d87a800013232533305730480031303e3305b374e00497ae01333005005001337000069000982e0019bac305a0023758606e60a86ea8004034c158c14cdd50008b181918291baa30353052375401266646444a6660a6608a60a86ea80084c8cc06000454ccc150c118c154dd50010991980c800899baf001303c33059301830573754004660b26e9cc8c94ccc15cc120c160dd500089980b1bac301a0023305b37520266eb0c170c164dd50008b19299982d0008a60103d87a80001303e3305b374e60ba00297ae0375860760026600a6eb0c0e8c15cdd500100825eb80c164c158dd50010b182c182a9baa002163001001222533305500214bd70810180008101800009919299982a19b89003480004cc16130101800033058374e00897ae013233059374e660b26ea400cdd6182d0009982c982d182d800a5eb80ccc014014004cdc0001a400260b20066eb8c15c008c0c4c144dd5181a18289baa0023031305137540022c60a60042c60a40046eb0c144c148008dd61828000998271ba7323302f03a2533304c3375e601e609c6ea8c0c4c138dd5000812098219998191bab3031304e37546062609c6ea80040980085281bae302f0013304e374e666601806a0440486eb8c0bc0052f5c06eb0c138c12cdd50008b1929998260008a60103d87a8000130303304d304e0014bd70180498031bab302d304a3754605a60946ea800458c130004cc0a80cc8cdd7980518249baa302c304937540020326eb4c128c12c008dd7182480098229baa03c132533304700114a02a66608e6094002264a66608a646600200205c44a66609400229404c94ccc120cdc79bae304d00201414a2266006006002609a00220022940cdd79ba602d374c646600200260066eacc0a8c11cdd5181518239baa304a00222533304900114bd6f7b6300991982599bb03048001374c64660020026eacc128008894ccc13000452f5bded8c02646609c66ec0c12c004dd419b8148000dd69826000998018019828001182700099801801982680118258008a5033300303201b01d2323300100100222533304800114bd6f7b630099191919299982499b9148900002153330493371e9101000021003100513304d337606ea4008dd3000998030030019bab304a003375c60900046098004609400244646600200200644a666090002200626609260940026600400460960024446604e0064a66608866ebcc01cc118dd5181498231baa00100313233001001300637566054608e6ea8c0a8c11cdd50011129998248008a5013253330473371e6eb8c028dd618260010028a51133003003001304c00114a04646600200200444a66608a002297ae0132333222323300100100322533304b00110031323304d374e6609a6ea4018cc134c128004cc134c12c0052f5c066006006609e004609a0026eb8c110004dd5982280099801801982480118238009111198130021299982199baf300630453754002008260746660526eacc0a0c114dd50008018010a502304300122533303e302f303f3754004264646464a66608a609000426606a00244a66608e0042a00e264600460960066eb8c12400858dd6182300098230011bad3044001304037540042c44a66607a605c607c6ea80084c8c8c8c94ccc110c11c0084cc0d0004894ccc1180085401c4cc0d8dd61824001112999824001098019825802099180118260019bae304a002163758608a002608a0046eb4c10c004c0fcdd50010b180080091299981f0008a4000260066600400460820026e0120023038375406044a666070605260726ea80084c8c8c8c94ccc0fcc1080084cc01c00c4c8c94ccc0f8c0bc0044c8c94ccc10cc1180084c8c94ccc108c0cc0044c8c94ccc11cc1280084cc03c0045401058c120004c110dd50018a999821181c8008991919191919299982598270010a8040b1bad304c001304c002375a609400260940046eb4c120004c110dd50018b18211baa00215004163044001304037540062a66607c606a0022a66608260806ea800c540085858c0f8dd50010a8028b18200009820001181f000981d1baa0021622325333038302900113232533303d30400021500416375c607c00260746ea800c54ccc0e0c0bc0044c8c94ccc0f4c1000085401058dd7181f000981d1baa00316303837540042c6eb8c0e4004c0e4008dd7181b800981b8011bad3035001303500230330013033002375c606200260620046eb4c0bc004c0bc008c0b4004c0b4008dd718158009815801181480098148011bae3027001302337540022c604a60446ea800458c004c084dd5180218109baa3024002230243025302500114a0660020144602a6660086eacc00cc080dd5180198101baa00101c4890022323300100100322533302300114bd700991929998111802801099813001198020020008998020020009813801181280091810981100091119299980f180a980f9baa0011480004dd6981198101baa00132533301e3015301f3754002298103d87a8000132330010013756604860426ea8008894ccc08c004530103d87a80001323232325333024337220100042a66604866e3c0200084c02ccc0a0dd4000a5eb80530103d87a8000133006006003375a604a0066eb8c08c008c09c008c094004c8cc004004010894ccc0880045300103d87a80001323232325333023337220100042a66604666e3c0200084c028cc09cdd3000a5eb80530103d87a8000133006006003375660480066eb8c088008c098008c090004dd2a40006eb0c074c078c078c078c078008dd5980e000980e180e0011bac301a001301a0023758603000260300046eb0c058004c048dd50059b8748000dc3a40084464660020020064466006002600400460226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea800452613656375c002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"f940075f7ed85d5f5c5045aef04e4c946e831be31b28e25bd90aab6c\"\n },\n {\n \"title\": \"content_registry.content_registry.else\",\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590d4c0101003232323232323223225333004323232323253323300a3001300b375400426464646464646464a6660246006002264646464a666032603800426601200244a6660360042a0102646004603e0066eb8c07400858dd6180d000980d0011bae3018001301437540162a6660246012002264646464a66603260380042a00c2c6eb4c068004c068008dd7180c000980a1baa00b15333012300400115333015301437540162a0042c2c60246ea80284c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc0840045280a9998109812000899192999810180918109baa001132533302130123022375400226464646464646464646464646464646464646464a6660706076004264646600202626600201e26600201226464646464646464646464a6660846066016264646464646464a6660980040022a666098609e004264a66609a0080042a66609a60a00082646464a66609a607c609c6ea80044c8c94ccc13cc100c140dd500089919191919299982b982d001899299982c182d801899299982b1824182b9baa001132325333058304a305937540022646603a00626603c002264a6660b4609860b66ea80044c8c94ccc170c138c174dd50008991981080189981100089919191919299983119b8f01501315333062005153330620021533306200115333062004100314a029405280a5014a060a6604e60446eacc118c18cdd50069829181318109bab30453062375401a66ebc00cc118cc18cdd418139bad30223061375400e660c66e9ccc88c8cc00400400c894ccc198004400c4cc19cc1a0004cc008008c1a4004dd6182218309baa00733063374e03697ae04bd7019baf0043045330623750604c6eb4c084c180dd5004198311ba73301d3758608660c06ea8020cc188dd480da5eb812f5c066e1cdd69810182f9baa007375a604060be6ea8014c184c178dd50008b181e982e9baa007305f305c37540022c607660b66ea8018c174c168dd50008b181c982c9baa303c3059375401a60b660b06ea800458c0dcc15cdd5181d182b9baa00c163059002163058002375860ae60b00046eb0c158004cc150dd3999980901d8140150019982a1ba7333301203b0220240014bd701bae30543055375860a860a26ea800458cc00cc03cdd5981998281baa303330503754008466e3cdd718090008119bae30523053375860a4609e6ea800458cc004c034dd5981898271baa3031304e3754006466e3cdd718080008139119198008008019129998290008a60103d87a800013232533305130050021303833055374e00497ae01330040040013056002375860a8002609e008004609c0040022940dd618260011bac304b304c00133049374e66600a06803a03e660926e9cccc0140d005c0652f5c06eb0c124c128008dd7182400098221baa03b1325333043303a00c13232323232533304b304e0021325333049303a304a375400226464646464a6660a260a8006264a6660a460aa00626464a6660a2608660a46ea80044c8cc05c0044c94ccc14cc110c150dd500089919299982a8030a99982a80108008a5014a0608c6034602a6eacc0e4c158dd500319b8848000c8c8c8c94ccc168c1740084c8cc004004c8cc004004120894ccc17400452f5c02660bc6ea0ccc100dd5981f982e1baa303f305c375460be00200c0086600400460c000244a6660b800229000099b80375a60bc0026600400460be0022c6eb8c16c004c16c008dd7182c8009bac3058305537540022c66646002002444a6660b00042980103d87a800013232533305730480031303e3305b374e00497ae01333005005001337000069000982e0019bac305a0023758606e60a86ea8004034c158c14cdd50008b181918291baa30353052375401266646444a6660a6608a60a86ea80084c8cc06000454ccc150c118c154dd50010991980c800899baf001303c33059301830573754004660b26e9cc8c94ccc15cc120c160dd500089980b1bac301a0023305b37520266eb0c170c164dd50008b19299982d0008a60103d87a80001303e3305b374e60ba00297ae0375860760026600a6eb0c0e8c15cdd500100825eb80c164c158dd50010b182c182a9baa002163001001222533305500214bd70810180008101800009919299982a19b89003480004cc16130101800033058374e00897ae013233059374e660b26ea400cdd6182d0009982c982d182d800a5eb80ccc014014004cdc0001a400260b20066eb8c15c008c0c4c144dd5181a18289baa0023031305137540022c60a60042c60a40046eb0c144c148008dd61828000998271ba7323302f03a2533304c3375e601e609c6ea8c0c4c138dd5000812098219998191bab3031304e37546062609c6ea80040980085281bae302f0013304e374e666601806a0440486eb8c0bc0052f5c06eb0c138c12cdd50008b1929998260008a60103d87a8000130303304d304e0014bd70180498031bab302d304a3754605a60946ea800458c130004cc0a80cc8cdd7980518249baa302c304937540020326eb4c128c12c008dd7182480098229baa03c132533304700114a02a66608e6094002264a66608a646600200205c44a66609400229404c94ccc120cdc79bae304d00201414a2266006006002609a00220022940cdd79ba602d374c646600200260066eacc0a8c11cdd5181518239baa304a00222533304900114bd6f7b6300991982599bb03048001374c64660020026eacc128008894ccc13000452f5bded8c02646609c66ec0c12c004dd419b8148000dd69826000998018019828001182700099801801982680118258008a5033300303201b01d2323300100100222533304800114bd6f7b630099191919299982499b9148900002153330493371e9101000021003100513304d337606ea4008dd3000998030030019bab304a003375c60900046098004609400244646600200200644a666090002200626609260940026600400460960024446604e0064a66608866ebcc01cc118dd5181498231baa00100313233001001300637566054608e6ea8c0a8c11cdd50011129998248008a5013253330473371e6eb8c028dd618260010028a51133003003001304c00114a04646600200200444a66608a002297ae0132333222323300100100322533304b00110031323304d374e6609a6ea4018cc134c128004cc134c12c0052f5c066006006609e004609a0026eb8c110004dd5982280099801801982480118238009111198130021299982199baf300630453754002008260746660526eacc0a0c114dd50008018010a502304300122533303e302f303f3754004264646464a66608a609000426606a00244a66608e0042a00e264600460960066eb8c12400858dd6182300098230011bad3044001304037540042c44a66607a605c607c6ea80084c8c8c8c94ccc110c11c0084cc0d0004894ccc1180085401c4cc0d8dd61824001112999824001098019825802099180118260019bae304a002163758608a002608a0046eb4c10c004c0fcdd50010b180080091299981f0008a4000260066600400460820026e0120023038375406044a666070605260726ea80084c8c8c8c94ccc0fcc1080084cc01c00c4c8c94ccc0f8c0bc0044c8c94ccc10cc1180084c8c94ccc108c0cc0044c8c94ccc11cc1280084cc03c0045401058c120004c110dd50018a999821181c8008991919191919299982598270010a8040b1bad304c001304c002375a609400260940046eb4c120004c110dd50018b18211baa00215004163044001304037540062a66607c606a0022a66608260806ea800c540085858c0f8dd50010a8028b18200009820001181f000981d1baa0021622325333038302900113232533303d30400021500416375c607c00260746ea800c54ccc0e0c0bc0044c8c94ccc0f4c1000085401058dd7181f000981d1baa00316303837540042c6eb8c0e4004c0e4008dd7181b800981b8011bad3035001303500230330013033002375c606200260620046eb4c0bc004c0bc008c0b4004c0b4008dd718158009815801181480098148011bae3027001302337540022c604a60446ea800458c004c084dd5180218109baa3024002230243025302500114a0660020144602a6660086eacc00cc080dd5180198101baa00101c4890022323300100100322533302300114bd700991929998111802801099813001198020020008998020020009813801181280091810981100091119299980f180a980f9baa0011480004dd6981198101baa00132533301e3015301f3754002298103d87a8000132330010013756604860426ea8008894ccc08c004530103d87a80001323232325333024337220100042a66604866e3c0200084c02ccc0a0dd4000a5eb80530103d87a8000133006006003375a604a0066eb8c08c008c09c008c094004c8cc004004010894ccc0880045300103d87a80001323232325333023337220100042a66604666e3c0200084c028cc09cdd3000a5eb80530103d87a8000133006006003375660480066eb8c088008c098008c090004dd2a40006eb0c074c078c078c078c078008dd5980e000980e180e0011bac301a001301a0023758603000260300046eb0c058004c048dd50059b8748000dc3a40084464660020020064466006002600400460226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea800452613656375c002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"f940075f7ed85d5f5c5045aef04e4c946e831be31b28e25bd90aab6c\"\n },\n {\n \"title\": \"content_registry_ref_token.content_registry_ref_token.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1MintPolarity\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5907090101003232323232323223225333004323232323253323300a3001300b3754004264646464a66601c600a0022a66602260206ea801c540085854ccc038c00c00454ccc044c040dd50038a8010b0b18071baa0061323232323232323232323232323232533301b3012301c37540042a66603c0060022a66603c6042006264a6646603a6002603c6ea80084c8c8c8c8cc0040104c8c8c8c8c8c8c8c94ccc0b000800454ccc0b0c0bc0084c94ccc0b401000854ccc0b4c0c00104c8c94ccc0b0c040c0b4dd5000899192999817180918179baa0011323300f0031533302f302630303754002264646464a66606c6072004264660020020044464a6660720042646464646464a66607866ebc040c8c8c8c8c0bccc110c114010cc110c11400ccc110c114008cc110c114004cc110dd419b8001c48008c118c118004c114004c110004c10c004c0f8dd500f8a99981e0030a99981e00108008a5014a02940c07cc008dd59814181e9baa011301e30013756604e60786ea80448c008c094004c004004894ccc0f000452000133700900119801001181f800a99981b1816803099baf374e00898101800014a02646004607a0066eb8c0ec008c00800858dd6181b800981b8011bad3035001303137540022c606660606ea800458c058c0bcdd5001981898171baa001163014302d3754004605e008004605c0040022940dd618160011bac302b302c001323302a374e6666002030605600a0489101003302a374e666600203060560066eb8c0ac010c8c8c8c8c8cdc5000a441012900337149110a5265676973747279202800330010063300300648008c0040048894ccc0acc0800044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66605266e2000920141001133300300333706004900a19b82001480512f5c04444660320084a66605466ebcc050c0b0dd50008020980f99980c1bab3017302c37540020060042940dd69814981500098148009814000981398119baa00422533302230193023375400426464646464646464646464646464646464646464a666072607800426602e02226602e01a26602e00e2a02a2c6eb8c0e8004c0e8008dd7181c000981c0011bad3036001303600230340013034002375c606400260640046eb4c0c0004c0c0008c0b8004c0b8008dd718160009816001181500098150011bae3028001302437540042c44a666042603060446ea80084c8c8c8c94ccc0a0c0ac0084cc01c00c4c8c94ccc09cc0780044c8c94ccc0b0c0bc0084c8c94ccc0acc0880044c8c94ccc0c0c0cc0084cc03c0045401058c0c4004c0b4dd50018a99981598100008991919191919299981a181b8010a8040b1bad30350013035002375a606600260660046eb4c0c4004c0b4dd50018b18159baa0021500416302d001302937540062a66604e60380022a66605460526ea800c540085858c09cdd50010a8028b18148009814801181380098119baa0021622325333021301800113232533302630290021500416375c604e00260466ea800c54ccc084c0580044c8c94ccc098c0a40085401058dd7181380098119baa00316302137540046044603e6ea8008dc3a40082c6008603a6ea8c020c074dd518100018008008a99980d1807980d9baa00113233001001300600c22533301f00114a2264a66603a64a66603c66e3cdd7180400080a099b88375a600e00290000a51375860440042660060060022940c088004528180f0029bac301d301e0042301d301e301e0012301c0012323300100100222533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004cc060034cc060dd3998021bac30190082300a33300337566004602e6ea8c008c05cdd5000809a45004bd701180c980d00091119299980b1805980b9baa0011480004dd6980d980c1baa001325333016300b301737540022980103d87a8000132330010013756603860326ea8008894ccc06c004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc080dd4000a5eb80530103d87a8000133006006003375a603a0066eb8c06c008c07c008c074004c8cc004004010894ccc0680045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc07cdd3000a5eb80530103d87a8000133006006003375660380066eb8c068008c078008c070004dd2a400044646600200200644a66602e002297ae0132325333016300500213301a00233004004001133004004001301b002301900137566028602a602a0046eb0c04c004c04cc04c004c038dd50039b8748008dd7180798061baa002370e90000b1806980700118060009806001180500098031baa00114984d958dd7000ab9a5573aaae7955cfaba05742ae89\",\n \"hash\": \"5b692922e6ea97bd96497fb96c7a6e03f8a8d3544e85d4815e74b6e3\"\n },\n {\n \"title\": \"content_registry_ref_token.content_registry_ref_token.else\",\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5907090101003232323232323223225333004323232323253323300a3001300b3754004264646464a66601c600a0022a66602260206ea801c540085854ccc038c00c00454ccc044c040dd50038a8010b0b18071baa0061323232323232323232323232323232533301b3012301c37540042a66603c0060022a66603c6042006264a6646603a6002603c6ea80084c8c8c8c8cc0040104c8c8c8c8c8c8c8c94ccc0b000800454ccc0b0c0bc0084c94ccc0b401000854ccc0b4c0c00104c8c94ccc0b0c040c0b4dd5000899192999817180918179baa0011323300f0031533302f302630303754002264646464a66606c6072004264660020020044464a6660720042646464646464a66607866ebc040c8c8c8c8c0bccc110c114010cc110c11400ccc110c114008cc110c114004cc110dd419b8001c48008c118c118004c114004c110004c10c004c0f8dd500f8a99981e0030a99981e00108008a5014a02940c07cc008dd59814181e9baa011301e30013756604e60786ea80448c008c094004c004004894ccc0f000452000133700900119801001181f800a99981b1816803099baf374e00898101800014a02646004607a0066eb8c0ec008c00800858dd6181b800981b8011bad3035001303137540022c606660606ea800458c058c0bcdd5001981898171baa001163014302d3754004605e008004605c0040022940dd618160011bac302b302c001323302a374e6666002030605600a0489101003302a374e666600203060560066eb8c0ac010c8c8c8c8c8cdc5000a441012900337149110a5265676973747279202800330010063300300648008c0040048894ccc0acc0800044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66605266e2000920141001133300300333706004900a19b82001480512f5c04444660320084a66605466ebcc050c0b0dd50008020980f99980c1bab3017302c37540020060042940dd69814981500098148009814000981398119baa00422533302230193023375400426464646464646464646464646464646464646464a666072607800426602e02226602e01a26602e00e2a02a2c6eb8c0e8004c0e8008dd7181c000981c0011bad3036001303600230340013034002375c606400260640046eb4c0c0004c0c0008c0b8004c0b8008dd718160009816001181500098150011bae3028001302437540042c44a666042603060446ea80084c8c8c8c94ccc0a0c0ac0084cc01c00c4c8c94ccc09cc0780044c8c94ccc0b0c0bc0084c8c94ccc0acc0880044c8c94ccc0c0c0cc0084cc03c0045401058c0c4004c0b4dd50018a99981598100008991919191919299981a181b8010a8040b1bad30350013035002375a606600260660046eb4c0c4004c0b4dd50018b18159baa0021500416302d001302937540062a66604e60380022a66605460526ea800c540085858c09cdd50010a8028b18148009814801181380098119baa0021622325333021301800113232533302630290021500416375c604e00260466ea800c54ccc084c0580044c8c94ccc098c0a40085401058dd7181380098119baa00316302137540046044603e6ea8008dc3a40082c6008603a6ea8c020c074dd518100018008008a99980d1807980d9baa00113233001001300600c22533301f00114a2264a66603a64a66603c66e3cdd7180400080a099b88375a600e00290000a51375860440042660060060022940c088004528180f0029bac301d301e0042301d301e301e0012301c0012323300100100222533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004cc060034cc060dd3998021bac30190082300a33300337566004602e6ea8c008c05cdd5000809a45004bd701180c980d00091119299980b1805980b9baa0011480004dd6980d980c1baa001325333016300b301737540022980103d87a8000132330010013756603860326ea8008894ccc06c004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc080dd4000a5eb80530103d87a8000133006006003375a603a0066eb8c06c008c07c008c074004c8cc004004010894ccc0680045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc07cdd3000a5eb80530103d87a8000133006006003375660380066eb8c068008c078008c070004dd2a400044646600200200644a66602e002297ae0132325333016300500213301a00233004004001133004004001301b002301900137566028602a602a0046eb0c04c004c04cc04c004c038dd50039b8748008dd7180798061baa002370e90000b1806980700118060009806001180500098031baa00114984d958dd7000ab9a5573aaae7955cfaba05742ae89\",\n \"hash\": \"5b692922e6ea97bd96497fb96c7a6e03f8a8d3544e85d4815e74b6e3\"\n },\n {\n \"title\": \"one_time_minting_policy.one_time_minting_policy.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1MintPolarity\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"59019e0101003232323232323222533300332323232325332330093001300a37540042646464a66601860080022a66601e601c6ea8018540085854ccc030cdc3a40040022a66601e601c6ea8018540085858c030dd50028992999805980198061baa0051533300b3003300c375464660020026eb0c044c038dd50041129998080008a60103d87a800013232533300f3375e01c600a60226ea80084cdd2a40006602600497ae01330040040013014002301200114a229404c8cc004004c8cc004004dd59809180998099809980998079baa00922533301100114bd70099199911191980080080191299980b80088018991980c9ba733019375200c66032602c00266032602e00297ae033003003301b0023019001375c60200026eacc044004cc00c00cc054008c04c004894ccc040004528899299980719299980799b8f375c600a00200c266e20dd6980a180a980a800a40002944dd618098010998018018008a50301300123010001375c601c60166ea8008dc3a40002c6018601a004601600260160046012002600a6ea8004526136565734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"55ada3bfe32c4ff89d50cfdd86956e013a011fa28279112e424e596a\"\n },\n {\n \"title\": \"one_time_minting_policy.one_time_minting_policy.else\",\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"59019e0101003232323232323222533300332323232325332330093001300a37540042646464a66601860080022a66601e601c6ea8018540085854ccc030cdc3a40040022a66601e601c6ea8018540085858c030dd50028992999805980198061baa0051533300b3003300c375464660020026eb0c044c038dd50041129998080008a60103d87a800013232533300f3375e01c600a60226ea80084cdd2a40006602600497ae01330040040013014002301200114a229404c8cc004004c8cc004004dd59809180998099809980998079baa00922533301100114bd70099199911191980080080191299980b80088018991980c9ba733019375200c66032602c00266032602e00297ae033003003301b0023019001375c60200026eacc044004cc00c00cc054008c04c004894ccc040004528899299980719299980799b8f375c600a00200c266e20dd6980a180a980a800a40002944dd618098010998018018008a50301300123010001375c601c60166ea8008dc3a40002c6018601a004601600260160046012002600a6ea8004526136565734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"55ada3bfe32c4ff89d50cfdd86956e013a011fa28279112e424e596a\"\n },\n {\n \"title\": \"oracle_validator.oracle_validator.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1OracleDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1OracleRedeemer\"\n }\n },\n \"compiledCode\": \"5906cd01010032323232323232253330023232323232533233008300130093754004264646464646464a66601e60060022a66602460226ea8028540085854ccc03cc02000454ccc048c044dd50050a8010b0a9998079802000899191919299980b180c8010a8030b1bae30170013017002375c602a00260226ea802854ccc03ccdc3a400c0022a66602460226ea8028540085858c03cdd5004899191919192999809180318099baa008132323232323232323232323232323232323232323232325333029301d00713333001019011300200f4800854ccc0a4c08801c4cccc004064034c00802d2002132533302a301f00813232323232325333033303600213253330313026303237540022646464a6660686050606a6ea800c4c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc12cc1380084cc0540444cc0540344cc05401c4c94ccc124c8cc004004cc138dd4815198271ba90294bd701129998270008a51132533304c3302303b375c60a20042660060060022940c144004400452819baf0173232323232323230223305330540073305330540063305330540053305330540043305330540033305330540023305330540013305330543055001330533752048660a66ea408d2f5c060a800260a600260a400260a200260a0002609e00260946ea80d858dd7182600098260011bae304a001304a002375a60900026090004608c002608c0046eb8c110004c110008dd698210009821001182000098200011bae303e001303e002303c001303c002375c6074002606c6ea800c58894ccc0d4c0a4c0d8dd5001099191919299981e181f80109980380189919299981d9817800899192999820182180109919299981f981980089919299982218238010998078008a8020b182280098209baa0031533303f303800113232323232325333048304b0021500816375a609200260920046eb4c11c004c11c008dd6982280098209baa00316303f37540042a0082c6082002607a6ea800c54ccc0ecc0d000454ccc0f8c0f4dd50018a8010b0b181d9baa0021500516303d001303d002303b001303737540042c4464a66606a605200226464a666074607a0042a0082c6eb8c0ec004c0dcdd50018a99981a981700089919299981d181e8010a8020b1bae303b001303737540062c606a6ea8008c0d8c0ccdd50008b181a981b181b18191baa001163034001323300100102122533303300114bd70099192999819299981919baf3037303437540040382605664a666066605860686ea8004520001375a6070606a6ea8004c94ccc0ccc0b0c0d0dd50008a60103d87a80001323300100137566072606c6ea8008894ccc0e0004530103d87a800013232323253330393372291100002153330393371e9101000021300c3303d375000297ae014c0103d87a8000133006006003375a60740066eb8c0e0008c0f0008c0e8004c8cc004004dd5981c181c981a9baa00322533303700114c103d87a80001323232325333038337220480042a66607066e3c0900084c02ccc0f0dd3000a5eb80530103d87a8000133006006003375660720066eb8c0dc008c0ec008c0e400452809981b00119802002000899802002000981b801181a8009ba548000dd7181898190011bae3030001302c375404a2a666054660020320122666600403402c91100480045281119198008008019129998180008a50132533302e3371e6eb8c0cc008010528899801801800981980091111929998180008a50153330303033001132323253330303371e6eb8c0d400c01c54ccc0c0cdc7800803099b8700200514a02940dd7181a181a8011bad303330343034001375860640022940c8cc004004014894ccc0c400452f5c0264666444646600200200644a66606e0022006264660726e9ccc0e4dd48031981c981b0009981c981b800a5eb80cc00c00cc0ec008c0e4004dd718180009bab30310013300300330350023033001232337140029101012900337149110a5265676973747279202800330020013300400148008c0040048894ccc0a0c0840044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66604c66e2000920141001133300300333706004900a19b8200148050c08cdd500e9bae30263027002375c604a002604a0046eb4c08c004c08cc08c008dd7181080098108011bad301f001301f301f002375c603a002603a004603600260360046eb8c064004c054dd5000980b980a1baa008163758602c602e602e602e602e0046eacc054004c054c054008dd618098009809980998079baa00a370e90001b8748010c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"d9c639433a3de1adeb247053b7556dd637be9398b245fa0ab351fbbf\"\n },\n {\n \"title\": \"oracle_validator.oracle_validator.else\",\n \"compiledCode\": \"5906cd01010032323232323232253330023232323232533233008300130093754004264646464646464a66601e60060022a66602460226ea8028540085854ccc03cc02000454ccc048c044dd50050a8010b0a9998079802000899191919299980b180c8010a8030b1bae30170013017002375c602a00260226ea802854ccc03ccdc3a400c0022a66602460226ea8028540085858c03cdd5004899191919192999809180318099baa008132323232323232323232323232323232323232323232325333029301d00713333001019011300200f4800854ccc0a4c08801c4cccc004064034c00802d2002132533302a301f00813232323232325333033303600213253330313026303237540022646464a6660686050606a6ea800c4c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc12cc1380084cc0540444cc0540344cc05401c4c94ccc124c8cc004004cc138dd4815198271ba90294bd701129998270008a51132533304c3302303b375c60a20042660060060022940c144004400452819baf0173232323232323230223305330540073305330540063305330540053305330540043305330540033305330540023305330540013305330543055001330533752048660a66ea408d2f5c060a800260a600260a400260a200260a0002609e00260946ea80d858dd7182600098260011bae304a001304a002375a60900026090004608c002608c0046eb8c110004c110008dd698210009821001182000098200011bae303e001303e002303c001303c002375c6074002606c6ea800c58894ccc0d4c0a4c0d8dd5001099191919299981e181f80109980380189919299981d9817800899192999820182180109919299981f981980089919299982218238010998078008a8020b182280098209baa0031533303f303800113232323232325333048304b0021500816375a609200260920046eb4c11c004c11c008dd6982280098209baa00316303f37540042a0082c6082002607a6ea800c54ccc0ecc0d000454ccc0f8c0f4dd50018a8010b0b181d9baa0021500516303d001303d002303b001303737540042c4464a66606a605200226464a666074607a0042a0082c6eb8c0ec004c0dcdd50018a99981a981700089919299981d181e8010a8020b1bae303b001303737540062c606a6ea8008c0d8c0ccdd50008b181a981b181b18191baa001163034001323300100102122533303300114bd70099192999819299981919baf3037303437540040382605664a666066605860686ea8004520001375a6070606a6ea8004c94ccc0ccc0b0c0d0dd50008a60103d87a80001323300100137566072606c6ea8008894ccc0e0004530103d87a800013232323253330393372291100002153330393371e9101000021300c3303d375000297ae014c0103d87a8000133006006003375a60740066eb8c0e0008c0f0008c0e8004c8cc004004dd5981c181c981a9baa00322533303700114c103d87a80001323232325333038337220480042a66607066e3c0900084c02ccc0f0dd3000a5eb80530103d87a8000133006006003375660720066eb8c0dc008c0ec008c0e400452809981b00119802002000899802002000981b801181a8009ba548000dd7181898190011bae3030001302c375404a2a666054660020320122666600403402c91100480045281119198008008019129998180008a50132533302e3371e6eb8c0cc008010528899801801800981980091111929998180008a50153330303033001132323253330303371e6eb8c0d400c01c54ccc0c0cdc7800803099b8700200514a02940dd7181a181a8011bad303330343034001375860640022940c8cc004004014894ccc0c400452f5c0264666444646600200200644a66606e0022006264660726e9ccc0e4dd48031981c981b0009981c981b800a5eb80cc00c00cc0ec008c0e4004dd718180009bab30310013300300330350023033001232337140029101012900337149110a5265676973747279202800330020013300400148008c0040048894ccc0a0c0840044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66604c66e2000920141001133300300333706004900a19b8200148050c08cdd500e9bae30263027002375c604a002604a0046eb4c08c004c08cc08c008dd7181080098108011bad301f001301f301f002375c603a002603a004603600260360046eb8c064004c054dd5000980b980a1baa008163758602c602e602e602e602e0046eacc054004c054c054008dd618098009809980998079baa00a370e90001b8748010c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"d9c639433a3de1adeb247053b7556dd637be9398b245fa0ab351fbbf\"\n },\n {\n \"title\": \"ownership_registry.ownership_registry.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1OwnershipRegistryDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1OwnershipRegistryRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590bb40101003232323232323223225333004323232323253323300a3001300b375400426464646464646464a66602460060022a66602a60286ea802c540085854ccc048c0240044c8c8c8c94ccc064c0700084cc02400c894ccc06c008540204c8c008c07c00cdd7180e8010b1bad301a001301a0023758603000260286ea802c54ccc048c01000454ccc054c050dd50058a8010b0b18091baa00a1323232323232323232323232323232533302200114a02a666044604a00226464a666042602660446ea80044c8c8c8c8c94ccc098c05c01054ccc098c05cc09cdd500289919191919191919191919191919191919191919299981e982000109980b00889980b00689980b003899299981f0008a501533303e3041001132533303c302d303d37540022646464a66607e6060002264646464a66608c609200426606c00244a6660900042a010264600460980066eb8c12800858dd6182380098238011bae3045001304137540062a66607e606c002264646464a66608c60920042a00c2c6eb4c11c004c11c008dd7182280098209baa0031533303f303100115333042304137540062a0042c2c607e6ea800854ccc0f4c0b8c0f8dd50008a5114a06082607c6ea800458c8c8cc004004090894ccc104004530103d87a8000132323253330413375e00c60840062604c6608a00297ae01330050050023042002304500230430013374a90011981f980b181e9baa30400014bd700a503301d02923375e602c607a6ea8c084c0f4dd50008070b1bae303e001303e002375c607800260780046eb4c0e8004c0e8008c0e0004c0e0008dd7181b000981b0011bad3034001303400230320013032002375c60600026060004605c002605c0046eb8c0b0004c0a0dd50028b09919192999814981000389919192999816180e98169baa00b132323232323232323232323232323232323232325333043304600213301c01113301c00d13301c007132323232533304700200115333047304a002132533304800400215333048304b0041323253330473039304837540022646466002004264a666094607860966ea80044c8cc00c0044c94ccc130c0f4c134dd50008991919192999829982b00109919299982919b8848000c8c8cc004004c8cc004004110894ccc16400452f5c02660b46ea0ccc0e8dd5981e182c1baa303c3058375460b60026eb8c0c4010dd7181e00219801001182e00091299982c0008a4000266e00dd6982d00099801001182d8009982b1ba900533056375200697ae015333052002100114a02940c10ccc8c004004894ccc15800452000133700900119801001182c80098151bab30373053375401866ebc018c0d4cc150c0acc148dd50049982a1ba7323232533305330443054375400226644646600200200644a6660b400220062660b660b80026600400460ba0026eb0c0b8008cc15cdd38149bac3058305537540022c64a6660ac002298103d87a80001303833057374e60b200297ae0375860700026660020026eb0c0dcc14cdd5005013111299982b0010a5eb8410180008101800009919299982a99b89003480004cc16530101800033059374e00897ae01323305a374e660b46e9c00cdd6182d8009982d182d982e000a5eb80ccc014014004cdc0001a400260b40066eb0c1600092f5c02c6eb8c150004c150008dd718290009bac3051304e37540022c66646002002444a6660a20042980103d87a800013232533305030410031303533054374e00497ae01333005005001337000069000982a8019bac305300237586062609a6ea8010080c13cc130dd50008b181518259baa00422533304a303b304b3754004264646464a6660a260a800426608200244a6660a60042a00e2660866eb0c154008894ccc1540084c00cc1600104c8c008c16400cdd7182b8010b1bac30520013052002375a60a000260986ea800858c130c124dd50008b181398241baa302c30483754004609400800460920040022940dd618238011bac3046304700133044374e66603005e00e012660886e9ccc08c0b094ccc104cdd7980e18219baa00100813301b301a3756604e60866ea80048cdc79bae301d00100b14a097ae016375c608800260880046eb8c108004c108008dd698200009820001181f000981f0011bae303c001303c002375a60740026074004607000260700046eb8c0d8004c0d8008c0d0004c0d0008dd7181900098171baa00b16375a606060620046eb0c0bc004c0acdd50110a999814980d18151baa008132323232323232323232323232323232323232325333040304300213301901113301900d133019007132533304100114a02a6660826088002264a66607e646600200205044a66608800229404c94ccc108cdc79bae304700200614a2266006006002608e00220022940cdd79ba6028374c646600200264660020026eacc098c108dd5181318211baa304500322533304400114bd6f7b630099191919299982299b9148900002153330453371e91010000210031005133049337606ea4008dd3000998030030019bab3046003375c60880046090004608c00244a666086002297adef6c60132330453376060840026e98c8cc004004dd598220011129998230008a5eb7bdb1804c8cc120cdd818228009ba83370290001bad304600133003003304a0023048001330030033047002304500114a066602a05800e0122c6eb8c104004c104008dd7181f800981f8011bad303d001303d002303b001303b002375c607200260720046eb4c0dc004c0dc008c0d4004c0d4008dd718198009819801181880098188011bae302f001302b37540102c4446601c0064a66605866ebcc01cc0b8dd5180918171baa001003133006300537566024605c6ea8c048c0b8dd5000919b8f375c601000200629408c8cc004004008894ccc0b400452f5c0264666444646600200200644a66606600220062646606a6e9ccc0d4dd48031981a98190009981a9819800a5eb80cc00c00cc0dc008c0d4004dd718160009bab302d001330030033031002302f00122323300100100322533302d00114a0264a66605660086eb0c0c0008528899801801800981800091815800912999813180b98139baa002132323232533302d303000213300700313232533302c301d00113232533303130340021323253330303021001132325333035303800213300f00115004163036001303237540062a666060604e0022646464646464a66607260780042a0102c6eb4c0e8004c0e8008dd6981c000981c0011bad3036001303237540062c60606ea80085401058c0c8004c0b8dd50018a99981618118008a99981798171baa003150021616302c37540042a00a2c605c002605c004605800260506ea80085888c94ccc098c05c0044c8c94ccc0acc0b80085401058dd7181600098141baa00315333026301d00113232533302b302e0021500416375c605800260506ea800c58c098dd500118119baa01b3026302337540022c600260446ea8c018c088dd5181280111812981318130008a5033001375860460184602c6660066eacc014c084dd5180298109baa00101d48810022323300100100322533302400114bd7009919299981198028010998138011980200200089980200200098140011813000911192999810180b98109baa0011480004dd6981298111baa001325333020301730213754002298103d87a8000132330010013756604c60466ea8008894ccc094004530103d87a80001323232325333026337220100042a66604c66e3c0200084c02ccc0a8dd4000a5eb80530103d87a8000133006006003375a604e0066eb8c094008c0a4008c09c004c8cc004004010894ccc0900045300103d87a80001323232325333025337220100042a66604a66e3c0200084c028cc0a4dd3000a5eb80530103d87a80001330060060033756604c0066eb8c090008c0a0008c098004dd2a40004604060420026eacc078c07c008dd6180e800980e980e980e980e8011bab301b001301b301b00237586032002603200260300046eb0c058004c048dd50059b8748000dc3a40084464660020020064466006002600400460226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea800452613656375c002ae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"12114eef00bfb34d7a7d42893b01f6395508fa5a275e2e2c96013446\"\n },\n {\n \"title\": \"ownership_registry.ownership_registry.else\",\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590bb40101003232323232323223225333004323232323253323300a3001300b375400426464646464646464a66602460060022a66602a60286ea802c540085854ccc048c0240044c8c8c8c94ccc064c0700084cc02400c894ccc06c008540204c8c008c07c00cdd7180e8010b1bad301a001301a0023758603000260286ea802c54ccc048c01000454ccc054c050dd50058a8010b0b18091baa00a1323232323232323232323232323232533302200114a02a666044604a00226464a666042602660446ea80044c8c8c8c8c94ccc098c05c01054ccc098c05cc09cdd500289919191919191919191919191919191919191919299981e982000109980b00889980b00689980b003899299981f0008a501533303e3041001132533303c302d303d37540022646464a66607e6060002264646464a66608c609200426606c00244a6660900042a010264600460980066eb8c12800858dd6182380098238011bae3045001304137540062a66607e606c002264646464a66608c60920042a00c2c6eb4c11c004c11c008dd7182280098209baa0031533303f303100115333042304137540062a0042c2c607e6ea800854ccc0f4c0b8c0f8dd50008a5114a06082607c6ea800458c8c8cc004004090894ccc104004530103d87a8000132323253330413375e00c60840062604c6608a00297ae01330050050023042002304500230430013374a90011981f980b181e9baa30400014bd700a503301d02923375e602c607a6ea8c084c0f4dd50008070b1bae303e001303e002375c607800260780046eb4c0e8004c0e8008c0e0004c0e0008dd7181b000981b0011bad3034001303400230320013032002375c60600026060004605c002605c0046eb8c0b0004c0a0dd50028b09919192999814981000389919192999816180e98169baa00b132323232323232323232323232323232323232325333043304600213301c01113301c00d13301c007132323232533304700200115333047304a002132533304800400215333048304b0041323253330473039304837540022646466002004264a666094607860966ea80044c8cc00c0044c94ccc130c0f4c134dd50008991919192999829982b00109919299982919b8848000c8c8cc004004c8cc004004110894ccc16400452f5c02660b46ea0ccc0e8dd5981e182c1baa303c3058375460b60026eb8c0c4010dd7181e00219801001182e00091299982c0008a4000266e00dd6982d00099801001182d8009982b1ba900533056375200697ae015333052002100114a02940c10ccc8c004004894ccc15800452000133700900119801001182c80098151bab30373053375401866ebc018c0d4cc150c0acc148dd50049982a1ba7323232533305330443054375400226644646600200200644a6660b400220062660b660b80026600400460ba0026eb0c0b8008cc15cdd38149bac3058305537540022c64a6660ac002298103d87a80001303833057374e60b200297ae0375860700026660020026eb0c0dcc14cdd5005013111299982b0010a5eb8410180008101800009919299982a99b89003480004cc16530101800033059374e00897ae01323305a374e660b46e9c00cdd6182d8009982d182d982e000a5eb80ccc014014004cdc0001a400260b40066eb0c1600092f5c02c6eb8c150004c150008dd718290009bac3051304e37540022c66646002002444a6660a20042980103d87a800013232533305030410031303533054374e00497ae01333005005001337000069000982a8019bac305300237586062609a6ea8010080c13cc130dd50008b181518259baa00422533304a303b304b3754004264646464a6660a260a800426608200244a6660a60042a00e2660866eb0c154008894ccc1540084c00cc1600104c8c008c16400cdd7182b8010b1bac30520013052002375a60a000260986ea800858c130c124dd50008b181398241baa302c30483754004609400800460920040022940dd618238011bac3046304700133044374e66603005e00e012660886e9ccc08c0b094ccc104cdd7980e18219baa00100813301b301a3756604e60866ea80048cdc79bae301d00100b14a097ae016375c608800260880046eb8c108004c108008dd698200009820001181f000981f0011bae303c001303c002375a60740026074004607000260700046eb8c0d8004c0d8008c0d0004c0d0008dd7181900098171baa00b16375a606060620046eb0c0bc004c0acdd50110a999814980d18151baa008132323232323232323232323232323232323232325333040304300213301901113301900d133019007132533304100114a02a6660826088002264a66607e646600200205044a66608800229404c94ccc108cdc79bae304700200614a2266006006002608e00220022940cdd79ba6028374c646600200264660020026eacc098c108dd5181318211baa304500322533304400114bd6f7b630099191919299982299b9148900002153330453371e91010000210031005133049337606ea4008dd3000998030030019bab3046003375c60880046090004608c00244a666086002297adef6c60132330453376060840026e98c8cc004004dd598220011129998230008a5eb7bdb1804c8cc120cdd818228009ba83370290001bad304600133003003304a0023048001330030033047002304500114a066602a05800e0122c6eb8c104004c104008dd7181f800981f8011bad303d001303d002303b001303b002375c607200260720046eb4c0dc004c0dc008c0d4004c0d4008dd718198009819801181880098188011bae302f001302b37540102c4446601c0064a66605866ebcc01cc0b8dd5180918171baa001003133006300537566024605c6ea8c048c0b8dd5000919b8f375c601000200629408c8cc004004008894ccc0b400452f5c0264666444646600200200644a66606600220062646606a6e9ccc0d4dd48031981a98190009981a9819800a5eb80cc00c00cc0dc008c0d4004dd718160009bab302d001330030033031002302f00122323300100100322533302d00114a0264a66605660086eb0c0c0008528899801801800981800091815800912999813180b98139baa002132323232533302d303000213300700313232533302c301d00113232533303130340021323253330303021001132325333035303800213300f00115004163036001303237540062a666060604e0022646464646464a66607260780042a0102c6eb4c0e8004c0e8008dd6981c000981c0011bad3036001303237540062c60606ea80085401058c0c8004c0b8dd50018a99981618118008a99981798171baa003150021616302c37540042a00a2c605c002605c004605800260506ea80085888c94ccc098c05c0044c8c94ccc0acc0b80085401058dd7181600098141baa00315333026301d00113232533302b302e0021500416375c605800260506ea800c58c098dd500118119baa01b3026302337540022c600260446ea8c018c088dd5181280111812981318130008a5033001375860460184602c6660066eacc014c084dd5180298109baa00101d48810022323300100100322533302400114bd7009919299981198028010998138011980200200089980200200098140011813000911192999810180b98109baa0011480004dd6981298111baa001325333020301730213754002298103d87a8000132330010013756604c60466ea8008894ccc094004530103d87a80001323232325333026337220100042a66604c66e3c0200084c02ccc0a8dd4000a5eb80530103d87a8000133006006003375a604e0066eb8c094008c0a4008c09c004c8cc004004010894ccc0900045300103d87a80001323232325333025337220100042a66604a66e3c0200084c028cc0a4dd3000a5eb80530103d87a80001330060060033756604c0066eb8c090008c0a0008c098004dd2a40004604060420026eacc078c07c008dd6180e800980e980e980e980e8011bab301b001301b301b00237586032002603200260300046eb0c058004c048dd50059b8748000dc3a40084464660020020064466006002600400460226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea800452613656375c002ae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"12114eef00bfb34d7a7d42893b01f6395508fa5a275e2e2c96013446\"\n },\n {\n \"title\": \"ownership_registry_ref_token.ownership_registry_ref_token.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/content_ownership~1types~1MintPolarity\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59074d0101003232323232323223225333004323232323253323300a3001300b3754004264646464a66601c600a0022a66602260206ea801c540085854ccc038c00c00454ccc044c040dd50038a8010b0b18071baa0061323232323232323232323232323232533301b3012301c37540042a66603c0060022a66603c6042006264a6646603a6002603c6ea80084c8c8c8c8cc0040104c8c8c8c8c8c8c8c94ccc0b000800454ccc0b0c0bc0084c94ccc0b401000854ccc0b4c0c00104c8c94ccc0b0c040c0b4dd5000899192999817180918179baa0011323300f0031533302f302630303754002264646464a66606c60720042646600200444a6660720042646464646464a66607866ebc040c8c8c8c8c8c8c8c0c8cc11cc12001ccc11cc120018cc11cc120014cc11cc120010cc11cc12000ccc11cc120008cc11cc120004cc11cdd419b8001f48008c124c124004c120004c11c004c118004c114004c110004c10c004c0f8dd500f8a99981e0030a99981e00108008a5014a02940c07cc008dd59814181e9baa011301e30013756604e60786ea80448c008c094004c004004894ccc0f000452000133700900119801001181f800a99981b1816803099baf374e00898101800014a02660066eb0c0ec008894ccc0ec0084c00cc0f80104c8c008c0fc00cdd7181e801111919800800801911980180098010010b1bac30370013037002375a606a00260626ea800458c0ccc0c0dd50008b180b18179baa0033031302e37540022c6028605a6ea8008c0bc010008c0b80080045281bac302c00237586056605800264660546e9ccccc004060c0ac0140912201003302a374e666600203060560066eb8c0ac010c8c8c8c8c8cdc5000a441012900337149110a5265676973747279202800330010063300300648008c0040048894ccc0acc0800044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66605266e2000920141001133300300333706004900a19b82001480512f5c04444660320084a66605466ebcc050c0b0dd50008020980f99980c1bab3017302c37540020060042940dd69814981500098148009814181418141814000981398119baa00422533302230193023375400426464646464646464646464646464646464646464a666072607800426602e02226602e01a26602e00e2a02a2c6eb8c0e8004c0e8008dd7181c000981c0011bad3036001303600230340013034002375c606400260640046eb4c0c0004c0c0008c0b8004c0b8008dd718160009816001181500098150011bae3028001302437540042c44a666042603060446ea80084c8c8c8c94ccc0a0c0ac0084cc01c00c4c8c94ccc09cc0780044c8c94ccc0b0c0bc0084c8c94ccc0acc0880044c8c94ccc0c0c0cc0084cc03c0045401058c0c4004c0b4dd50018a99981598100008991919191919299981a181b8010a8040b1bad30350013035002375a606600260660046eb4c0c4004c0b4dd50018b18159baa0021500416302d001302937540062a66604e60380022a66605460526ea800c540085858c09cdd50010a8028b18148009814801181380098119baa0021622325333021301800113232533302630290021500416375c604e00260466ea800c54ccc084c0580044c8c94ccc098c0a40085401058dd7181380098119baa00316302137540046044603e6ea8008dc3a40082c6008603a6ea8c020c074dd518100018008008a99980d1807980d9baa00113233001001300600c22533301f00114a2264a66603a64a66603c66e3cdd7180400080a099b88375a600e00290000a51375860440042660060060022940c088004528180f0029bac301d301e0042301d301e301e0012301c0012323300100100222533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004cc060034cc060dd3998021bac30190082300a33300337566004602e6ea8c008c05cdd5000809a45004bd701180c980d00091119299980b1805980b9baa0011480004dd6980d980c1baa001325333016300b301737540022980103d87a8000132330010013756603860326ea8008894ccc06c004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc080dd4000a5eb80530103d87a8000133006006003375a603a0066eb8c06c008c07c008c074004c8cc004004010894ccc0680045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc07cdd3000a5eb80530103d87a8000133006006003375660380066eb8c068008c078008c070004dd2a400044646600200200644a66602e002297ae0132325333016300500213301a00233004004001133004004001301b002301900137566028602a602a0046eb0c04c004c04cc04c004c038dd50039b8748008dd7180798061baa002370e90000b1806980700118060009806001180500098031baa00114984d958dd7000ab9a5573aaae7955cfaba05742ae89\",\n \"hash\": \"fff25ccc074dc16f05defe497e8e250b15cd491c5565a63c260eb2b4\"\n },\n {\n \"title\": \"ownership_registry_ref_token.ownership_registry_ref_token.else\",\n \"parameters\": [\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59074d0101003232323232323223225333004323232323253323300a3001300b3754004264646464a66601c600a0022a66602260206ea801c540085854ccc038c00c00454ccc044c040dd50038a8010b0b18071baa0061323232323232323232323232323232533301b3012301c37540042a66603c0060022a66603c6042006264a6646603a6002603c6ea80084c8c8c8c8cc0040104c8c8c8c8c8c8c8c94ccc0b000800454ccc0b0c0bc0084c94ccc0b401000854ccc0b4c0c00104c8c94ccc0b0c040c0b4dd5000899192999817180918179baa0011323300f0031533302f302630303754002264646464a66606c60720042646600200444a6660720042646464646464a66607866ebc040c8c8c8c8c8c8c8c0c8cc11cc12001ccc11cc120018cc11cc120014cc11cc120010cc11cc12000ccc11cc120008cc11cc120004cc11cdd419b8001f48008c124c124004c120004c11c004c118004c114004c110004c10c004c0f8dd500f8a99981e0030a99981e00108008a5014a02940c07cc008dd59814181e9baa011301e30013756604e60786ea80448c008c094004c004004894ccc0f000452000133700900119801001181f800a99981b1816803099baf374e00898101800014a02660066eb0c0ec008894ccc0ec0084c00cc0f80104c8c008c0fc00cdd7181e801111919800800801911980180098010010b1bac30370013037002375a606a00260626ea800458c0ccc0c0dd50008b180b18179baa0033031302e37540022c6028605a6ea8008c0bc010008c0b80080045281bac302c00237586056605800264660546e9ccccc004060c0ac0140912201003302a374e666600203060560066eb8c0ac010c8c8c8c8c8cdc5000a441012900337149110a5265676973747279202800330010063300300648008c0040048894ccc0acc0800044cdc599b80002481812210013371666e00cdc1801000a40c066600600666e18008004cdc1800a40286002002444a66605266e2000920141001133300300333706004900a19b82001480512f5c04444660320084a66605466ebcc050c0b0dd50008020980f99980c1bab3017302c37540020060042940dd69814981500098148009814181418141814000981398119baa00422533302230193023375400426464646464646464646464646464646464646464a666072607800426602e02226602e01a26602e00e2a02a2c6eb8c0e8004c0e8008dd7181c000981c0011bad3036001303600230340013034002375c606400260640046eb4c0c0004c0c0008c0b8004c0b8008dd718160009816001181500098150011bae3028001302437540042c44a666042603060446ea80084c8c8c8c94ccc0a0c0ac0084cc01c00c4c8c94ccc09cc0780044c8c94ccc0b0c0bc0084c8c94ccc0acc0880044c8c94ccc0c0c0cc0084cc03c0045401058c0c4004c0b4dd50018a99981598100008991919191919299981a181b8010a8040b1bad30350013035002375a606600260660046eb4c0c4004c0b4dd50018b18159baa0021500416302d001302937540062a66604e60380022a66605460526ea800c540085858c09cdd50010a8028b18148009814801181380098119baa0021622325333021301800113232533302630290021500416375c604e00260466ea800c54ccc084c0580044c8c94ccc098c0a40085401058dd7181380098119baa00316302137540046044603e6ea8008dc3a40082c6008603a6ea8c020c074dd518100018008008a99980d1807980d9baa00113233001001300600c22533301f00114a2264a66603a64a66603c66e3cdd7180400080a099b88375a600e00290000a51375860440042660060060022940c088004528180f0029bac301d301e0042301d301e301e0012301c0012323300100100222533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004cc060034cc060dd3998021bac30190082300a33300337566004602e6ea8c008c05cdd5000809a45004bd701180c980d00091119299980b1805980b9baa0011480004dd6980d980c1baa001325333016300b301737540022980103d87a8000132330010013756603860326ea8008894ccc06c004530103d87a8000132323232533301c337220100042a66603866e3c0200084c02ccc080dd4000a5eb80530103d87a8000133006006003375a603a0066eb8c06c008c07c008c074004c8cc004004010894ccc0680045300103d87a8000132323232533301b337220100042a66603666e3c0200084c028cc07cdd3000a5eb80530103d87a8000133006006003375660380066eb8c068008c078008c070004dd2a400044646600200200644a66602e002297ae0132325333016300500213301a00233004004001133004004001301b002301900137566028602a602a0046eb0c04c004c04cc04c004c038dd50039b8748008dd7180798061baa002370e90000b1806980700118060009806001180500098031baa00114984d958dd7000ab9a5573aaae7955cfaba05742ae89\",\n \"hash\": \"fff25ccc074dc16f05defe497e8e250b15cd491c5565a63c260eb2b4\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"List$ByteArray\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n \"List$List$ByteArray\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"cardano/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"content_ownership/types/ContentRegistryDatum\": {\n \"title\": \"ContentRegistryDatum\",\n \"anyOf\": [\n {\n \"title\": \"ContentRegistryDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"count\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"registry\",\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n ]\n }\n ]\n },\n \"content_ownership/types/ContentRegistryRedeemer\": {\n \"title\": \"ContentRegistryRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"CreateContent\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"content_hash\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"owner\",\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n ]\n },\n {\n \"title\": \"UpdateContent\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"new_content_hash\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"content_number\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n },\n {\n \"title\": \"StopContentRegistry\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": []\n }\n ]\n },\n \"content_ownership/types/MintPolarity\": {\n \"title\": \"MintPolarity\",\n \"anyOf\": [\n {\n \"title\": \"RMint\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"RBurn\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"content_ownership/types/OracleDatum\": {\n \"title\": \"OracleDatum\",\n \"anyOf\": [\n {\n \"title\": \"OracleDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"oracle_nft\",\n \"$ref\": \"#/definitions/PolicyId\"\n },\n {\n \"title\": \"oracle_address\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"content_registry_ref_token\",\n \"$ref\": \"#/definitions/PolicyId\"\n },\n {\n \"title\": \"content_registry_address\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"content_registry_count\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"ownership_registry_ref_token\",\n \"$ref\": \"#/definitions/PolicyId\"\n },\n {\n \"title\": \"ownership_registry_address\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"ownership_registry_count\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"operation_key\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"stop_key\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"content_ownership/types/OracleRedeemer\": {\n \"title\": \"OracleRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"CreateContentRegistry\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"CreateOwnershipRegistry\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n },\n {\n \"title\": \"RotateKey\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": [\n {\n \"title\": \"new_operation_key\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"new_stop_key\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n },\n {\n \"title\": \"StopApp\",\n \"dataType\": \"constructor\",\n \"index\": 3,\n \"fields\": []\n }\n ]\n },\n \"content_ownership/types/OwnershipRegistryDatum\": {\n \"title\": \"OwnershipRegistryDatum\",\n \"anyOf\": [\n {\n \"title\": \"OwnershipRegistryDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"count\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"registry\",\n \"$ref\": \"#/definitions/List$List$ByteArray\"\n }\n ]\n }\n ]\n },\n \"content_ownership/types/OwnershipRegistryRedeemer\": {\n \"title\": \"OwnershipRegistryRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"CreateOwnershipRecord\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"TransferOwnership\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"new_owner_token\",\n \"$ref\": \"#/definitions/List$ByteArray\"\n },\n {\n \"title\": \"content_number\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n },\n {\n \"title\": \"StopOwnershipRegistry\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import {\n ConStr0,\n conStr0,\n ConStr1,\n conStr1,\n DEFAULT_REDEEMER_BUDGET,\n mConStr1,\n mConStr2,\n MeshValue,\n PubKeyAddress,\n pubKeyAddress,\n Value,\n value,\n} from \"@meshsdk/common\";\nimport {\n Asset,\n deserializeAddress,\n deserializeDatum,\n mergeAssets,\n serializeAddressObj,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\nimport blueprintV3 from \"./aiken-workspace-v3/plutus.json\";\n\nexport type InitiationDatum = ConStr0<[PubKeyAddress, Value]>;\nexport const initiateEscrowDatum = (\n walletAddress: string,\n amount: Asset[],\n): InitiationDatum => {\n const { pubKeyHash, stakeCredentialHash } = deserializeAddress(walletAddress);\n return conStr0([\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n value(amount),\n ]);\n};\n\nexport type ActiveEscrowDatum = ConStr1<\n [PubKeyAddress, Value, PubKeyAddress, Value]\n>;\nexport const activeEscrowDatum = (\n initiationDatum: InitiationDatum,\n walletAddress: string,\n amount: Asset[],\n): ActiveEscrowDatum => {\n const { pubKeyHash, stakeCredentialHash } = deserializeAddress(walletAddress);\n const [initiator, initiatorAmount] = initiationDatum.fields;\n return conStr1([\n initiator,\n initiatorAmount,\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n value(amount),\n ]);\n};\n\nexport type RecipientDepositRedeemer = ConStr0<[PubKeyAddress, Value]>;\nexport const recipientDepositRedeemer = (\n recipient: string,\n depositAmount: Asset[],\n) => initiateEscrowDatum(recipient, depositAmount);\n\nexport class MeshEscrowContract extends MeshTxInitiator {\n scriptCbor: string;\n scriptAddress: string;\n\n constructor(inputs: MeshTxInitiatorInput) {\n super(inputs);\n this.scriptCbor = this.getScriptCbor();\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = () => {\n switch (this.version) {\n case 3:\n return applyParamsToScript(blueprintV3.validators[0]!.compiledCode, []);\n case 2:\n return applyParamsToScript(blueprintV2.validators[0]!.compiledCode, []);\n default:\n return applyParamsToScript(blueprintV1.validators[0]!.compiledCode, []);\n }\n };\n\n initiateEscrow = async (escrowAmount: Asset[]): Promise<string> => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n\n await this.mesh\n .txOut(this.scriptAddress, escrowAmount)\n .txOutInlineDatumValue(\n initiateEscrowDatum(walletAddress, escrowAmount),\n \"JSON\",\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n cancelEscrow = async (escrowUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n const inputDatum = deserializeDatum<InitiationDatum | ActiveEscrowDatum>(\n escrowUtxo.output.plutusData!,\n );\n\n if (inputDatum.constructor === 1) {\n const [\n initiatorAddressObj,\n initiatorAmount,\n recipientAddressObj,\n recipientAmount,\n ] = inputDatum.fields;\n\n const initiatorAddress = serializeAddressObj(\n initiatorAddressObj,\n this.networkId,\n );\n const recipientAddress = serializeAddressObj(\n recipientAddressObj!,\n this.networkId,\n );\n const initiatorToReceive =\n MeshValue.fromValue(initiatorAmount).toAssets();\n const recipientToReceive = MeshValue.fromValue(\n recipientAmount!,\n ).toAssets();\n this.mesh\n .txOut(initiatorAddress, initiatorToReceive)\n .txOut(recipientAddress, recipientToReceive);\n }\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n escrowUtxo.input.txHash,\n escrowUtxo.input.outputIndex,\n escrowUtxo.output.amount,\n this.scriptAddress,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr1([]))\n .txInScript(this.scriptCbor)\n .requiredSignerHash(deserializeAddress(walletAddress).pubKeyHash)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n recipientDeposit = async (\n escrowUtxo: UTxO,\n depositAmount: Asset[],\n ): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n const inputDatum = deserializeDatum<InitiationDatum>(\n escrowUtxo.output.plutusData!,\n );\n const outputDatum = activeEscrowDatum(\n inputDatum,\n walletAddress,\n depositAmount,\n );\n\n const inputAssets = MeshValue.fromValue(inputDatum.fields[1]).toAssets();\n const escrowAmount = mergeAssets([...depositAmount, ...inputAssets]);\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n escrowUtxo.input.txHash,\n escrowUtxo.input.outputIndex,\n escrowUtxo.output.amount,\n this.scriptAddress,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .txInRedeemerValue(\n recipientDepositRedeemer(walletAddress, depositAmount),\n \"JSON\",\n DEFAULT_REDEEMER_BUDGET,\n )\n .txInScript(this.scriptCbor)\n .txOut(this.scriptAddress, escrowAmount)\n .txOutInlineDatumValue(outputDatum, \"JSON\")\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n completeEscrow = async (escrowUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n const inputDatum = deserializeDatum<ActiveEscrowDatum>(\n escrowUtxo.output.plutusData!,\n );\n const [\n initiatorAddressObj,\n initiatorAmount,\n recipientAddressObj,\n recipientAmount,\n ] = inputDatum.fields;\n const initiatorAddress = serializeAddressObj(\n initiatorAddressObj,\n this.networkId,\n );\n const recipientAddress = serializeAddressObj(\n recipientAddressObj,\n this.networkId,\n );\n const initiatorToReceive = MeshValue.fromValue(recipientAmount).toAssets();\n const recipientToReceive = MeshValue.fromValue(initiatorAmount).toAssets();\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n escrowUtxo.input.txHash,\n escrowUtxo.input.outputIndex,\n escrowUtxo.output.amount,\n this.scriptAddress,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr2([]))\n .txInScript(this.scriptCbor)\n .txOut(initiatorAddress, initiatorToReceive)\n .txOut(recipientAddress, recipientToReceive)\n .requiredSignerHash(deserializeAddress(recipientAddress).pubKeyHash)\n .requiredSignerHash(deserializeAddress(initiatorAddress).pubKeyHash)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash, this.scriptCbor);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/escrow\",\n \"description\": \"Aiken contracts for project 'meshjs/escrow'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"escrow.escrow\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1types~1EscrowDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1types~1EscrowRedeemer\"\n }\n },\n \"compiledCode\": \"590c2f01000032323232323232232323232323232232322533300d3232533300f300c3010375400226464646464646464a66602e602a60306ea80044c8c8c8c8c8c8c8c8c8c94ccc084c07c0244c8c8c8c8c8c8c94ccc0acc0b800c4c94ccc0b0c0bc00c4c94ccc0a8c080c0acdd5000899192999816181118169baa001132533302d302b302e3754006264646464a666068606e004264646464a66606a66ebc024cdd2a40046607200e660726e98014cc0e404ccc0e4dd300925eb8040045281980b9bab302730363754018660326eacc09cc0d8dd51813981b1baa00d301a011302c0073302c0022323302e3756606c0044646eb4c0e0008dd7181b0009bae3034001302c003163756606a002606a0046066002605e6ea800c58c0c4c0b8dd50008b180798169baa003302f302c37540022c601a60566ea8c070c0acdd50010b18168010b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb80dd598141814801181380098119baa01813232325333024302100c132323232533302b302e0031533302b0021325333029301f302a375400226464a666056605260586ea80084c94ccc0b0c0a8c0b4dd500089980500c1bae3031302e37540022c60106060605a6ea80084c8c8c8c8c8c8c8c94ccc0ccc0c4c0d0dd500089919299981a9819981b1baa0011533303532330010013303a375200666074607660706ea80092f5c044a66607400229404c94ccc0e0cc058090dd7181e8010a51133003003001303d00115333035005100414a0294058c044014dd7181c181a9baa00116300f006330143301001e00230173756606c606e006660266601e03a008602c6eacc0d400cc0d0004c0d0004c0cc008c0c4004c0b4dd50011811800981718159baa00116300c302a3754603660546ea80045858c0b0008dd6181598160011bac302a00133028374e6600802601a660506e9ccc0140440352f5c0264646464a666056605c0062a666056004264a666052603e60546ea80044c94ccc0a8c09cc0acdd500089919191919191919299981a981c001099191919191919299981c981b981d1baa00113232533303b3039303c37540022a6660766466002002660806ea400ccc100c104c0f8dd500125eb80894ccc100004528899299981f1980e0151bae304300213300300300114a060860022a66607600a200829405280b180b8059bae303e303b37540022c602a01a660346602c048010603a014660326602a046016603800a6605e008464660626eacc0e40088c8dd6981d8011bae3039001375c606e002605e00a6605a00c4646605e6eacc0dc0088c8dd6981c8011bae3037001375c606a002605a00e2c6eacc0d8004c0d8008c0d0004c0d0008dd598190009819001181800098161baa00116302e302b37540022c601860546ea8c06cc0a8dd50008b0b18160011bac302b302c00237586054002660506e9ccc01004c034cc0a0dd399802808806a5eb808c94ccc094c08cc098dd50008980819814981518139baa0014bd700a6103d87a800030153026375400244646600200200644a66605200229404c94ccc09ccdc79bae302c00200414a2266006006002605800244646600200200644a666050002297adef6c601332253330273375e603060526ea80080144cc030004dd5980d18149baa0021001302a00133002002302b001223300400223375e6028604a6ea8c058c094dd50008011119801801119baf30133024375400200444646600200200644a66604a002297ae013232533302430050021330280023300400400113300400400130290023027001223233001001323300100100322533302500114bd7009919991119198008008019129998158008801899198169ba73302d375200c6605a60540026605a605600297ae033003003302f002302d001375c60480026eacc094004cc00c00cc0a4008c09c004894ccc09000452889929998111919b89375a600e002664464a66604c6046604e6ea8004520001375a605660506ea8004c94ccc098c08cc09cdd50008a60103d87a8000132330010013756605860526ea8008894ccc0ac004530103d87a8000132323232533302c337220100042a66605866e3c0200084c05ccc0c0dd4000a5eb80530103d87a8000133006006003375a605a0066eb8c0ac008c0bc008c0b4004c8cc004004024894ccc0a80045300103d87a8000132323232533302b337220100042a66605666e3c0200084c058cc0bcdd3000a5eb80530103d87a8000133006006003375660580066eb8c0a8008c0b8008c0b0004dd7180a0009bae30160013758604e0042660060060022940c09c0048c088c08cc08c00488c8ccc00400400c0088894ccc08c00840044c8ccc010010c09c00ccccc020008dd718110009bab3023001222325333025533302800114a229405300103d87a80001301033029374c00297ae032333001001003002222533302a0021001132333004004302e0033322323300100100522533302f001133030337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0c0cdc800400109981a19bb037520106ea001c01454ccc0c0cdc78040010992999818981798191baa001133035337606ea4024c0d8c0ccdd5000802080219299981898178008a60103d87a80001301c33035375000297ae03370000e00226606866ec0dd48011ba800133006006003375a60620066eb8c0bc008c0cc008c0c4004dd718148009bad302a001302c00230250022323300100100222533302000114bd6f7b6300999119191999804001801000911319190011919198008008019129998138008a4c264a6660500022a66604a60086eb4c09cc0a8008526161323232325333029337206eb8c0a8010dd718150018a9998149804000899803803998168018010b0b1bad302a003302d003302b002302a002302a001233302230200014a0944dd598110019bae3020002302200133002002302300122223233001001005225333022001133023337606ea4014dd300225eb7bdb1804c8c8c8c94ccc08ccdc800480109981399bb037520126e9802001454ccc08ccdc78048010992999812181118129baa001133028337606ea4028c0a4c098dd5000802080219980380480400089981399bb037520046e98004cc01801800cdd598120019bae3022002302600230240013019375401e601060326ea8c028c064dd5180e180c9baa0011632323300100100722533301c00114c0103d87a800013232533301b3375e6018603a6ea80080144c018cc07c0092f5c02660080080026040004603c002603660306ea8020dd2a40006eb0c064c068c068c068c068c068c068008dd6180c000980c180c0011bac301600130123754600260246ea80108c054004528180098081baa00223013301400114984d958c94ccc030c0280044c8c8c8c94ccc04cc0580084c8c9263300b0022323300d3756602a0044646eb4c05c008dd7180a8009bae3013001300b003163756602800260280046024002601c6ea800c54ccc030c02400454ccc03cc038dd50018a4c2c2a66601860040022a66601e601c6ea800c5261616300c37540046e1d20043001007232533300930070011323232325333010301300213232498cc0200088c8cc028dd598090011191bad3014002375c60240026eb8c040004c02000c58dd598088009808801180780098059baa0021533300930060011323232323232323253330143017002132323232498cc0380108c8cc040dd5980c0011191bad301a002375c60300026eb8c058004c038014cc0300188c8cc038dd5980b0011191bad3018002375c602c0026eb8c050004c03001c58dd5980a800980a801180980098098011bab30110013011002300f001300b37540042c60126ea800488c8cc00400400c894ccc0340045261323300300330110023003300f00125333006300430073754002264646464a66601a602000426464931929998061805000899192999808980a00109924c64a66601e601a00226464a666028602e0042649318068008b180a80098089baa0021533300f300c00113232323232325333018301b002149858dd6980c800980c8011bad30170013017002375a602a00260226ea800858c03cdd50008b180900098071baa0031533300c30090011533300f300e37540062930b0b18061baa002300600316300e001300e002300c001300837540022c464a66600c600800226464a666016601c0042930b1bae300c001300837540042a66600c600600226464a666016601c0042930b1bae300c001300837540042c600c6ea8004dc3a40046e1d20005734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"8fa9284f5889972d7260c10e940a2e1acb2114bdcea845da3d52de7d\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"List$Pair$ByteArray_Int\": {\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/ByteArray\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"List$Pair$ByteArray_List$Pair$ByteArray_Int\": {\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/ByteArray\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/List$Pair$ByteArray_Int\"\n }\n },\n \"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Optional\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"aiken/transaction/credential/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://cips.cardano.org/cip/CIP-19).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKeyCredential\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n },\n {\n \"title\": \"ScriptCredential\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Referenced\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"escrow/types/EscrowDatum\": {\n \"title\": \"EscrowDatum\",\n \"anyOf\": [\n {\n \"title\": \"Initiation\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n }\n ]\n },\n {\n \"title\": \"ActiveEscrow\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n },\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n }\n ]\n }\n ]\n },\n \"escrow/types/EscrowRedeemer\": {\n \"title\": \"EscrowRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"RecipientDeposit\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n }\n ]\n },\n {\n \"title\": \"CancelTrade\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n },\n {\n \"title\": \"CompleteTrade\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": []\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/escrow\",\n \"description\": \"Aiken contracts for project 'meshjs/escrow'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"escrow.escrow.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1EscrowDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1EscrowRedeemer\"\n }\n },\n \"compiledCode\": \"590d2301010032323232323232253330023232323232533233008300130093754004264646464646464646464a666024600e002264646464a666032603800426601200626601000244a6660360042a01026464660186eacc070008894ccc07c0084c014c0880184c8c8c8c010c094014dd698100011bae301e0013021002375c6034002603a0042c6eacc068004c068008c060004c050dd50068a99980918058008a99980a980a1baa00d1500216153330123003001153330153014375401a2a0042c2c60246ea80304c8c8c8c8c8c8c8c94ccc060c034c064dd500089919191919191919191919192999812180c80509919191919191929998171818801899299981798190018992999816980f18171baa00113232533302f302030303754002264a666060604a60626ea800c4c8c8c8c94ccc0dcc0e80084cc09c00c4cc098004894ccc0e40084cc05801c4c94ccc0dccdd780419ba548008cc0ec018cc0ecdd30021981d8091981d9ba60114bd7008008a50330173756603c60706ea802ccc064dd5980f181c1baa301e30383754018603402026464660546eacc0e8008894ccc0f40084c014c1000184c8c8c8c010c10c014dd6981f0011bae303c001303f002375c607000260760042c6eacc0e0004c0e0008c0d8004c0c8dd50018b181a18189baa001163010303037540066064605e6ea800458c038c0b8dd5180a18171baa00216303000216302f0023758605c605e0046eb0c0b4004cc0acdd39980200b007198159ba73300501400e4bd701bab302b302c002302a0013026375403e2646464a66604e604001a264646464a66605c60620062a66605c004264a666058603a605a6ea80044c8cc03400454ccc0b4c088c0b8dd50008992999817181198179baa00113300901a375c606660606ea800458c01cc0c8c0bcdd500089919191919191919299981a9815181b1baa001132325333037302c303837540022a66606e6466002002660786ea400ccc0f0c0f4c0e8dd500125eb80894ccc0f0004528099299981d1980a8131bae303f00214a2266006006002607e0022a66606e00a200829405280b18080029bae303a303737540022c601c00c660286601e040004602e6eacc0e0c0e400ccc04ccc03807c010c058dd5981b801981b000981b000981a801181980098179baa0013031302e37540022c601a605a6ea8c04cc0b4dd50008b0b18178011bac302e302f0023758605a002660566e9ccc010058038cc0acdd39980280a00725eb804c8c8c8c94ccc0b8c0c400c54ccc0b80084c94ccc0b0c074c0b4dd50008992999816981318171baa001132323232323232325333038303b00213302800713302700522533303a00213302a00513302900322533303c0021323232533303c3031303d375400226464a66607c6066607e6ea800454ccc0f8c8cc004004cc10cdd480199821982218209baa0024bd701129998218008a5113253330413301c02d375c608c0042660060060022940c11800454ccc0f801440105280a5016301700b375c6082607c6ea800458c054034cc06ccc05809c020c078028cc068cc05409802cc0740144c8c8cc0b4dd5981e8011129998200010980298218030991919180218230029bad3041002375c607e00260840046eb8c0ec004c0f80084c8c8cc0acdd5981d80111299981f0010980298208030991919180218220029bad303f002375c607a00260800046eb8c0e4004c0f000858dd5981c800981c801181b800981b8011bab303500130350023033001302f37540022c6062605c6ea800458c034c0b4dd5180998169baa0011616302f0023758605c605e0046eb0c0b4004cc0acdd39980200b007198159ba73300501400e4bd701192999814180e98149baa001130123302c302d302a375400297ae014c103d87a800030123029375400244646600200200644a66605800229404c94ccc0a8cdc79bae302f00200414a2266006006002605e00244646600200200644a666056002297adef6c6013322533302a3375e602a60586ea80080144cc034004dd5980918161baa0021001302d00133002002302e001223300400223375e602260506ea8c038c0a0dd50008011119801801119baf30103027375400200444646600200200644a666050002297ae0132325333027300500213302b00233004004001133004004001302c002302a001223253330233018001132323232533302a302d00213301a00313301900122533302c00215008132323301d3756605a00444a6660600042600a606600c26464646008606c00a6eb4c0c4008dd7181780098190011bae302b001302e002163756605600260560046052002604a6ea800c54ccc08cc0700044c8c8c8c8c8c8c8c94ccc0b8c0c40084cc07801c4cc074014894ccc0c00084cc0800144cc07c00c894ccc0c8008540384c8c8cc08cdd5981980111299981b00109802981c80309919191802181e0029bad3037002375c606a00260700046eb8c0c4004c0d00084c8c8cc084dd5981880111299981a00109802981b80309919191802181d0029bad3035002375c6066002606c0046eb8c0bc004c0c800858dd598178009817801181680098168011bab302b001302b0023029001302537540062c60466ea800888c8cc004004c8cc00400400c894ccc09c00452f5c0264666444646600200200644a66605a00220062646605e6e9ccc0bcdd4803198179816000998179816800a5eb80cc00c00cc0c4008c0bc004dd718130009bab302700133003003302b002302900122533302600114a2264a6660486466e24dd698038009991192999814181098149baa0011480004dd6981698151baa0013253330283021302937540022980103d87a8000132330010013756605c60566ea8008894ccc0b4004530103d87a8000132323232533302e337220100042a66605c66e3c0200084c060cc0c8dd4000a5eb80530103d87a8000133006006003375a605e0066eb8c0b4008c0c4008c0bc004c8cc004004024894ccc0b00045300103d87a8000132323232533302d337220100042a66605a66e3c0200084c05ccc0c4dd3000a5eb80530103d87a80001330060060033756605c0066eb8c0b0008c0c0008c0b8004dd718080009bae300d001375860520042660060060022940c0a40048c090c094c09400488c8ccc00400400c0088894ccc09400840044c8ccc010010c0a400ccccc020008dd718120009bab3025001222325333027533302a00114a229405300103d87a8000130113302b374c00297ae032333001001003002222533302c0021001132333004004303000333223233001001005225333031001133032337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0c8cdc800400109981b19bb037520106ea001c01454ccc0c8cdc780400109929998199814181a1baa001133037337606ea4024c0e0c0d4dd5000802080219299981998140008a60103d87a80001301d33037375000297ae03370000e00226606c66ec0dd48011ba800133006006003375a60660066eb8c0c4008c0d4008c0cc004dd718158009bad302c001302e00230270022323300100100222533302200114bd6f7b6300999119191999804001801000911319190011919198008008019129998148008a4c264a6660540022a66604e60086eb4c0a4c0b000852616132323232533302b337206eb8c0b0010dd718160018a9998159804000899803803998178018010b0b1bad302c003302f003302d002302c002302c001233302430190014a0944dd598120019bae3022002302400133002002302500122223233001001005225333024001133025337606ea4014dd300225eb7bdb1804c8c8c8c94ccc094cdc800480109981499bb037520126e9802001454ccc094cdc78048010992999813180d98139baa00113302a337606ea4028c0acc0a0dd5000802080219980380480400089981499bb037520046e98004cc01801800cdd598130019bae302400230280023026001301b375402a600860366ea8c004c06cdd5180f180d9baa0022301e301f00116323300100100722533301c00114c0103d87a800013232533301b3375e600c603a6ea80080484c014cc07c0092f5c02660080080026040004603c0026e9520002301b001375860326034603460346034603460340046eb0c060004c060c060008dd6180b00098091baa00d370e900211191980080080191198018009801001112999807980218081baa00213232323253330163019002133007003132325333015300a00113232533301a301d002132325333019300e00113232533301e302100213300f0011500416301f001301b37540062a66603260240022646464646464a666044604a0042a0102c6eb4c08c004c08c008dd6981080098108011bad301f001301b37540062c60326ea80085401058c06c004c05cdd50018a99980a98070008a99980c180b9baa003150021616301537540042a00a2c602e002602e004602a00260226ea80085888c94ccc03cc0100044c8c94ccc050c05c0085401058dd7180a80098089baa0031533300f300800113232533301430170021500416375c602a00260226ea800c58c03cdd50011b8748000c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"6e95d24ab0579b9e44c7cd1c801e1527c63124cef086d39443696b6b\"\n },\n {\n \"title\": \"escrow.escrow.else\",\n \"compiledCode\": \"590d2301010032323232323232253330023232323232533233008300130093754004264646464646464646464a666024600e002264646464a666032603800426601200626601000244a6660360042a01026464660186eacc070008894ccc07c0084c014c0880184c8c8c8c010c094014dd698100011bae301e0013021002375c6034002603a0042c6eacc068004c068008c060004c050dd50068a99980918058008a99980a980a1baa00d1500216153330123003001153330153014375401a2a0042c2c60246ea80304c8c8c8c8c8c8c8c94ccc060c034c064dd500089919191919191919191919192999812180c80509919191919191929998171818801899299981798190018992999816980f18171baa00113232533302f302030303754002264a666060604a60626ea800c4c8c8c8c94ccc0dcc0e80084cc09c00c4cc098004894ccc0e40084cc05801c4c94ccc0dccdd780419ba548008cc0ec018cc0ecdd30021981d8091981d9ba60114bd7008008a50330173756603c60706ea802ccc064dd5980f181c1baa301e30383754018603402026464660546eacc0e8008894ccc0f40084c014c1000184c8c8c8c010c10c014dd6981f0011bae303c001303f002375c607000260760042c6eacc0e0004c0e0008c0d8004c0c8dd50018b181a18189baa001163010303037540066064605e6ea800458c038c0b8dd5180a18171baa00216303000216302f0023758605c605e0046eb0c0b4004cc0acdd39980200b007198159ba73300501400e4bd701bab302b302c002302a0013026375403e2646464a66604e604001a264646464a66605c60620062a66605c004264a666058603a605a6ea80044c8cc03400454ccc0b4c088c0b8dd50008992999817181198179baa00113300901a375c606660606ea800458c01cc0c8c0bcdd500089919191919191919299981a9815181b1baa001132325333037302c303837540022a66606e6466002002660786ea400ccc0f0c0f4c0e8dd500125eb80894ccc0f0004528099299981d1980a8131bae303f00214a2266006006002607e0022a66606e00a200829405280b18080029bae303a303737540022c601c00c660286601e040004602e6eacc0e0c0e400ccc04ccc03807c010c058dd5981b801981b000981b000981a801181980098179baa0013031302e37540022c601a605a6ea8c04cc0b4dd50008b0b18178011bac302e302f0023758605a002660566e9ccc010058038cc0acdd39980280a00725eb804c8c8c8c94ccc0b8c0c400c54ccc0b80084c94ccc0b0c074c0b4dd50008992999816981318171baa001132323232323232325333038303b00213302800713302700522533303a00213302a00513302900322533303c0021323232533303c3031303d375400226464a66607c6066607e6ea800454ccc0f8c8cc004004cc10cdd480199821982218209baa0024bd701129998218008a5113253330413301c02d375c608c0042660060060022940c11800454ccc0f801440105280a5016301700b375c6082607c6ea800458c054034cc06ccc05809c020c078028cc068cc05409802cc0740144c8c8cc0b4dd5981e8011129998200010980298218030991919180218230029bad3041002375c607e00260840046eb8c0ec004c0f80084c8c8cc0acdd5981d80111299981f0010980298208030991919180218220029bad303f002375c607a00260800046eb8c0e4004c0f000858dd5981c800981c801181b800981b8011bab303500130350023033001302f37540022c6062605c6ea800458c034c0b4dd5180998169baa0011616302f0023758605c605e0046eb0c0b4004cc0acdd39980200b007198159ba73300501400e4bd701192999814180e98149baa001130123302c302d302a375400297ae014c103d87a800030123029375400244646600200200644a66605800229404c94ccc0a8cdc79bae302f00200414a2266006006002605e00244646600200200644a666056002297adef6c6013322533302a3375e602a60586ea80080144cc034004dd5980918161baa0021001302d00133002002302e001223300400223375e602260506ea8c038c0a0dd50008011119801801119baf30103027375400200444646600200200644a666050002297ae0132325333027300500213302b00233004004001133004004001302c002302a001223253330233018001132323232533302a302d00213301a00313301900122533302c00215008132323301d3756605a00444a6660600042600a606600c26464646008606c00a6eb4c0c4008dd7181780098190011bae302b001302e002163756605600260560046052002604a6ea800c54ccc08cc0700044c8c8c8c8c8c8c8c94ccc0b8c0c40084cc07801c4cc074014894ccc0c00084cc0800144cc07c00c894ccc0c8008540384c8c8cc08cdd5981980111299981b00109802981c80309919191802181e0029bad3037002375c606a00260700046eb8c0c4004c0d00084c8c8cc084dd5981880111299981a00109802981b80309919191802181d0029bad3035002375c6066002606c0046eb8c0bc004c0c800858dd598178009817801181680098168011bab302b001302b0023029001302537540062c60466ea800888c8cc004004c8cc00400400c894ccc09c00452f5c0264666444646600200200644a66605a00220062646605e6e9ccc0bcdd4803198179816000998179816800a5eb80cc00c00cc0c4008c0bc004dd718130009bab302700133003003302b002302900122533302600114a2264a6660486466e24dd698038009991192999814181098149baa0011480004dd6981698151baa0013253330283021302937540022980103d87a8000132330010013756605c60566ea8008894ccc0b4004530103d87a8000132323232533302e337220100042a66605c66e3c0200084c060cc0c8dd4000a5eb80530103d87a8000133006006003375a605e0066eb8c0b4008c0c4008c0bc004c8cc004004024894ccc0b00045300103d87a8000132323232533302d337220100042a66605a66e3c0200084c05ccc0c4dd3000a5eb80530103d87a80001330060060033756605c0066eb8c0b0008c0c0008c0b8004dd718080009bae300d001375860520042660060060022940c0a40048c090c094c09400488c8ccc00400400c0088894ccc09400840044c8ccc010010c0a400ccccc020008dd718120009bab3025001222325333027533302a00114a229405300103d87a8000130113302b374c00297ae032333001001003002222533302c0021001132333004004303000333223233001001005225333031001133032337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0c8cdc800400109981b19bb037520106ea001c01454ccc0c8cdc780400109929998199814181a1baa001133037337606ea4024c0e0c0d4dd5000802080219299981998140008a60103d87a80001301d33037375000297ae03370000e00226606c66ec0dd48011ba800133006006003375a60660066eb8c0c4008c0d4008c0cc004dd718158009bad302c001302e00230270022323300100100222533302200114bd6f7b6300999119191999804001801000911319190011919198008008019129998148008a4c264a6660540022a66604e60086eb4c0a4c0b000852616132323232533302b337206eb8c0b0010dd718160018a9998159804000899803803998178018010b0b1bad302c003302f003302d002302c002302c001233302430190014a0944dd598120019bae3022002302400133002002302500122223233001001005225333024001133025337606ea4014dd300225eb7bdb1804c8c8c8c94ccc094cdc800480109981499bb037520126e9802001454ccc094cdc78048010992999813180d98139baa00113302a337606ea4028c0acc0a0dd5000802080219980380480400089981499bb037520046e98004cc01801800cdd598130019bae302400230280023026001301b375402a600860366ea8c004c06cdd5180f180d9baa0022301e301f00116323300100100722533301c00114c0103d87a800013232533301b3375e600c603a6ea80080484c014cc07c0092f5c02660080080026040004603c0026e9520002301b001375860326034603460346034603460340046eb0c060004c060c060008dd6180b00098091baa00d370e900211191980080080191198018009801001112999807980218081baa00213232323253330163019002133007003132325333015300a00113232533301a301d002132325333019300e00113232533301e302100213300f0011500416301f001301b37540062a66603260240022646464646464a666044604a0042a0102c6eb4c08c004c08c008dd6981080098108011bad301f001301b37540062c60326ea80085401058c06c004c05cdd50018a99980a98070008a99980c180b9baa003150021616301537540042a00a2c602e002602e004602a00260226ea80085888c94ccc03cc0100044c8c94ccc050c05c0085401058dd7180a80098089baa0031533300f300800113232533301430170021500416375c602a00260226ea800c58c03cdd50011b8748000c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"6e95d24ab0579b9e44c7cd1c801e1527c63124cef086d39443696b6b\"\n }\n ],\n \"definitions\": {\n \"AssetName\": {\n \"title\": \"AssetName\",\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"MValue\": {\n \"title\": \"MValue\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/PolicyId\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Pairs$AssetName_Int\"\n }\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"Pairs$AssetName_Int\": {\n \"title\": \"Pairs<AssetName, Int>\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/AssetName\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"escrow/EscrowDatum\": {\n \"title\": \"EscrowDatum\",\n \"anyOf\": [\n {\n \"title\": \"Initiation\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n },\n {\n \"title\": \"ActiveEscrow\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/MValue\"\n },\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n }\n ]\n },\n \"escrow/EscrowRedeemer\": {\n \"title\": \"EscrowRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"RecipientDeposit\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n },\n {\n \"title\": \"CancelTrade\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n },\n {\n \"title\": \"CompleteTrade\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": []\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/escrow\",\n \"description\": \"Aiken contracts for project 'meshjs/escrow'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.9+2217206\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"escrow.escrow.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1EscrowDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/escrow~1EscrowRedeemer\"\n }\n },\n \"compiledCode\": \"590d5501010032323232323232253330023232323232533233008300130093754004264664464646464646464a666024600e002264646464a666032603800426601200626601000244a66603600401026464660186eacc070008894ccc07c0084c014c0880184c8c8c8c010c094014dd698100011bae301e0013021002375c6034002603a0042c6eacc068004c068008c060004c050dd50068a99980918058008a99980a980a1baa00d00216153330123003001153330153014375401a0042c2c60246ea80304c8c8c8c8c8c8c8c94ccc060c034c064dd50008991919191919191919191919191919192999814180e8010991991191919192999819181a8010992999819981b0020992999818981118191baa001132325333033302430343754002264a6660686052606a6ea800c4c8c8c8c94ccc0ecc0f80084cc0ac00c4cc0a8004894ccc0f40084cc04c01c4c8c94ccc0f0cdd780499ba548008cc10001ccc100dd300299820009998201ba60124bd700a99981e00108008a5014a066e24c8cc004004c07cdd59812181f1baa00d2253330400011480004cdc02400466004004608600290091980d9bab3022303c3754016660346eacc088c0f0dd51811181e1baa00c301e010132323302e3756607c00444a6660820042600a608800c26464646008608e00a6eb4c108008dd7182000098218011bae303c001303f002163756607800260780046074002606c6ea800c58c0e0c0d4dd50008b180a181a1baa0033036303337540022c602460646ea8c060c0c8dd50010b181a0018b18198009bac30320023758606260640026605e6e9ccc01c064048cc0bcdd39980400c00925eb80c0b8004dd59817181780098151baa023153330283021002132323232533302f30320021533302f003132533302d301e302e37540022646600e0022a66605c6046605e6ea80044c94ccc0bcc090c0c0dd500089980500d9bae3034303137540022c6028606660606ea80044c8c8c8ccc888c8c8c94ccc0dcc0b0c0e0dd500089919299981c9817181d1baa0011533303932330010013303e37520066607c607e60786ea80092f5c044a66607c00229404cc894ccc0f4cc0600a40085288998020020009bae3040001304100115333039005100414a0294058c078014dd7181e181c9baa00116301c0053301633014022002301937566074607600a6602a660260420066030004606c0066eacc0d8008c0d8004c0d8004c0d4004c0c0dd5000981918179baa00116300e302e37546028605c6ea80045858c0c0004dd618178011bac302e302f0013302c374e6600802c01e660586e9ccc01405403d2f5c0264646464a66605e60640042a66605e006264a66605a603c605c6ea80044c94ccc0b8c09cc0bcdd500089919191919191919299981c981e00109981480389981400291299981d80109981580289981500191299981e8010991919299981e9819181f1baa00113232533303f3034304037540022a66607e6466002002660886ea400ccc110c114c108dd500125eb80894ccc1100045288999129998219980f0178010998020020008a50375c608c002608e0022a66607e00a200829405280b18120059bae3042303f37540022c604401a6603866034050010603e014660366603204e016603c00a264646605c6eacc0f8008894ccc1040084c014c1100184c8c8c8c010c11c014dd698210011bae30400013043002375c6078002607e00426464660586eacc0f0008894ccc0fc0084c014c1080184c8c8c8c010c114014dd698200011bae303e0013041002375c6074002607a0042c6eacc0e8004c0e8008c0e0004c0e0008dd5981b000981b001181a00098181baa001163032302f37540022c601c605c6ea8c050c0b8dd50008b0b18180009bac302f0023758605c605e002660586e9ccc01005803ccc0b0dd39980280a807a5eb8088c94ccc0a8c07c0044c8c8c8c94ccc0c4c0d00084cc08400c4cc080004894ccc0cc0080204c8c8cc090dd5981a00111299981b80109802981d00309919191802181e8029bad3038002375c606c00260720046eb8c0c8004c0d400858dd598190009819001181800098161baa0031533302a3023001132323232323232325333035303800213302500713302400522533303700213302700513302600322533303900200e132323302a3756607400444a66607a0042600a608000c26464646008608600a6eb4c0f8008dd7181e000981f8011bae3038001303b00213232330283756607000444a6660760042600a607c00c26464646008608200a6eb4c0f0008dd7181d000981e8011bae30360013039002163756606c002606c004606800260680046eacc0c8004c0c8008c0c0004c0b0dd50018b18151baa0023027375404244646600200200644a66605800229404cc894ccc0accdc78010028a51133004004001375c605c002605e0024466008004466ebcc048c0a4dd5180798149baa001002223300300223375e602260506ea800400888c8cc00400400c894ccc0a400452f5c026644a666050600a004266058004660080080022660080080026056002605800244646600200200644a666050002297adef6c601332253330273375e602460526ea80080144cc01c004dd5980798149baa0021001302a00133002002302b001223233300100100300222253330280021001132333004004302c003333300b002375c604e0026eacc0a0004888c94ccc0a94ccc0b40045288a5014c103d87a8000130143302e374c00297ae032333001001003002222533302f0021001132332233300600630350053233001001005225333034001133035337606ea4010dd4001a5eb7bdb1804c8ccc8894ccc0d4cdc800400189981c99bb037520106ea001c01454ccc0d4cdc7804001899299981b1815981b9baa00113303a337606ea4024c0ecc0e0dd5000801080119299981b18158008a60103d87a8000130203303a375000297ae03370000e00426607266ec0dd48019ba800233006006001375c60660026eb4c0d0004c0e0008c0d8004dd718170009bad302f0013031002302a002223233001001300500222533302600114a226644a66604a66e24dd698038011991192999814181098149baa0011480004dd6981698151baa001325333028302130293754002298103d87a8000132330010013756605c60566ea8008894ccc0b4004530103d87a8000132333222533302e337220100062a66605c66e3c02000c4c060cc0c8dd400125eb80530103d87a8000133006006001375c60580026eb4c0b4004c0c4008c0bc004c8cc004004024894ccc0b00045300103d87a8000132333222533302d337220100062a66605a66e3c02000c4c05ccc0c4dd300125eb80530103d87a8000133006006001375c60560026eacc0b0004c0c0008c0b8004dd718080011bae300d00213300400400114a06eb0c0a0004c0a40048c090c094c0940048c8cc004004008894ccc08c00452f5c0264666444646600200200644a6660520022006264660566e9ccc0acdd4803198159814000998159814800a5eb80cc00c00cc0b4008c0ac004dd718110009bab302300133003003302700230250012323300100100222533302200114bd6f7b6300999119191999804001801191900199198008008019129998148008a4c264a6660540022a66604e60086eb4c0a4c0b0008526161323233332222533302d337200080042a66605a60140062660120126606200a0022c2c6eb8c0a8008dd698158011bae302a001302f003302d002302c002302c001233302430190014a09448898dd598120019bae3022002302400133002002302500122223233001001005225333024001133025337606ea4014dd300225eb7bdb1804c8ccc8894ccc094cdc800480189981499bb037520126e9802001454ccc094cdc78048018992999813180d98139baa00113302a337606ea4028c0acc0a0dd5000801080119980380480400109981499bb037520066e98008cc018018004dd718118009bab302400130280023026001232533301c3011301d37540022600c660406042603c6ea80052f5c02980103d87a80003006301d3754002600860366ea8c004c06cdd5180f180d9baa0022301e301f00116323300100100622533301c00114c103d87a800013322533301b3375e600c603a6ea80080484c014cc07c0092f5c0266008008002603c002603e0026e9520002301b001375860326034603460346034603460340066eb0c060008dd6180b801180b980b80098091baa00c370e900211191980080080191198018009801001112999807980218081baa0021323232325333016301900213300700313253330143009001132325333019301c0021325333017300c00113232533301c301f00213300d00100b16301d001301937540042a66602e60200022646464646464a666040604600401e2c6eb4c084004c084008dd6980f800980f8011bad301d001301937540042c602e6ea800458c068004c058dd50010a99980a18068008a99980b980b1baa0020061616301437540022c602e002602e004602a00260226ea80085888c94ccc03cc0100044c8c94ccc050c05c00801058dd7180a80098089baa0031533300f3008001132325333014301700200416375c602a00260226ea800c58c03cdd50011b8748000c038004c038c03c004c028dd50011b874800858c02cc03000cc028008c024008c024004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"1bf1264ddd67f3555b0d103f71422f44c7373a8a42744f0d75052aae\"\n },\n {\n \"title\": \"escrow.escrow.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"compiledCode\": \"590d5501010032323232323232253330023232323232533233008300130093754004264664464646464646464a666024600e002264646464a666032603800426601200626601000244a66603600401026464660186eacc070008894ccc07c0084c014c0880184c8c8c8c010c094014dd698100011bae301e0013021002375c6034002603a0042c6eacc068004c068008c060004c050dd50068a99980918058008a99980a980a1baa00d00216153330123003001153330153014375401a0042c2c60246ea80304c8c8c8c8c8c8c8c94ccc060c034c064dd50008991919191919191919191919191919192999814180e8010991991191919192999819181a8010992999819981b0020992999818981118191baa001132325333033302430343754002264a6660686052606a6ea800c4c8c8c8c94ccc0ecc0f80084cc0ac00c4cc0a8004894ccc0f40084cc04c01c4c8c94ccc0f0cdd780499ba548008cc10001ccc100dd300299820009998201ba60124bd700a99981e00108008a5014a066e24c8cc004004c07cdd59812181f1baa00d2253330400011480004cdc02400466004004608600290091980d9bab3022303c3754016660346eacc088c0f0dd51811181e1baa00c301e010132323302e3756607c00444a6660820042600a608800c26464646008608e00a6eb4c108008dd7182000098218011bae303c001303f002163756607800260780046074002606c6ea800c58c0e0c0d4dd50008b180a181a1baa0033036303337540022c602460646ea8c060c0c8dd50010b181a0018b18198009bac30320023758606260640026605e6e9ccc01c064048cc0bcdd39980400c00925eb80c0b8004dd59817181780098151baa023153330283021002132323232533302f30320021533302f003132533302d301e302e37540022646600e0022a66605c6046605e6ea80044c94ccc0bcc090c0c0dd500089980500d9bae3034303137540022c6028606660606ea80044c8c8c8ccc888c8c8c94ccc0dcc0b0c0e0dd500089919299981c9817181d1baa0011533303932330010013303e37520066607c607e60786ea80092f5c044a66607c00229404cc894ccc0f4cc0600a40085288998020020009bae3040001304100115333039005100414a0294058c078014dd7181e181c9baa00116301c0053301633014022002301937566074607600a6602a660260420066030004606c0066eacc0d8008c0d8004c0d8004c0d4004c0c0dd5000981918179baa00116300e302e37546028605c6ea80045858c0c0004dd618178011bac302e302f0013302c374e6600802c01e660586e9ccc01405403d2f5c0264646464a66605e60640042a66605e006264a66605a603c605c6ea80044c94ccc0b8c09cc0bcdd500089919191919191919299981c981e00109981480389981400291299981d80109981580289981500191299981e8010991919299981e9819181f1baa00113232533303f3034304037540022a66607e6466002002660886ea400ccc110c114c108dd500125eb80894ccc1100045288999129998219980f0178010998020020008a50375c608c002608e0022a66607e00a200829405280b18120059bae3042303f37540022c604401a6603866034050010603e014660366603204e016603c00a264646605c6eacc0f8008894ccc1040084c014c1100184c8c8c8c010c11c014dd698210011bae30400013043002375c6078002607e00426464660586eacc0f0008894ccc0fc0084c014c1080184c8c8c8c010c114014dd698200011bae303e0013041002375c6074002607a0042c6eacc0e8004c0e8008c0e0004c0e0008dd5981b000981b001181a00098181baa001163032302f37540022c601c605c6ea8c050c0b8dd50008b0b18180009bac302f0023758605c605e002660586e9ccc01005803ccc0b0dd39980280a807a5eb8088c94ccc0a8c07c0044c8c8c8c94ccc0c4c0d00084cc08400c4cc080004894ccc0cc0080204c8c8cc090dd5981a00111299981b80109802981d00309919191802181e8029bad3038002375c606c00260720046eb8c0c8004c0d400858dd598190009819001181800098161baa0031533302a3023001132323232323232325333035303800213302500713302400522533303700213302700513302600322533303900200e132323302a3756607400444a66607a0042600a608000c26464646008608600a6eb4c0f8008dd7181e000981f8011bae3038001303b00213232330283756607000444a6660760042600a607c00c26464646008608200a6eb4c0f0008dd7181d000981e8011bae30360013039002163756606c002606c004606800260680046eacc0c8004c0c8008c0c0004c0b0dd50018b18151baa0023027375404244646600200200644a66605800229404cc894ccc0accdc78010028a51133004004001375c605c002605e0024466008004466ebcc048c0a4dd5180798149baa001002223300300223375e602260506ea800400888c8cc00400400c894ccc0a400452f5c026644a666050600a004266058004660080080022660080080026056002605800244646600200200644a666050002297adef6c601332253330273375e602460526ea80080144cc01c004dd5980798149baa0021001302a00133002002302b001223233300100100300222253330280021001132333004004302c003333300b002375c604e0026eacc0a0004888c94ccc0a94ccc0b40045288a5014c103d87a8000130143302e374c00297ae032333001001003002222533302f0021001132332233300600630350053233001001005225333034001133035337606ea4010dd4001a5eb7bdb1804c8ccc8894ccc0d4cdc800400189981c99bb037520106ea001c01454ccc0d4cdc7804001899299981b1815981b9baa00113303a337606ea4024c0ecc0e0dd5000801080119299981b18158008a60103d87a8000130203303a375000297ae03370000e00426607266ec0dd48019ba800233006006001375c60660026eb4c0d0004c0e0008c0d8004dd718170009bad302f0013031002302a002223233001001300500222533302600114a226644a66604a66e24dd698038011991192999814181098149baa0011480004dd6981698151baa001325333028302130293754002298103d87a8000132330010013756605c60566ea8008894ccc0b4004530103d87a8000132333222533302e337220100062a66605c66e3c02000c4c060cc0c8dd400125eb80530103d87a8000133006006001375c60580026eb4c0b4004c0c4008c0bc004c8cc004004024894ccc0b00045300103d87a8000132333222533302d337220100062a66605a66e3c02000c4c05ccc0c4dd300125eb80530103d87a8000133006006001375c60560026eacc0b0004c0c0008c0b8004dd718080011bae300d00213300400400114a06eb0c0a0004c0a40048c090c094c0940048c8cc004004008894ccc08c00452f5c0264666444646600200200644a6660520022006264660566e9ccc0acdd4803198159814000998159814800a5eb80cc00c00cc0b4008c0ac004dd718110009bab302300133003003302700230250012323300100100222533302200114bd6f7b6300999119191999804001801191900199198008008019129998148008a4c264a6660540022a66604e60086eb4c0a4c0b0008526161323233332222533302d337200080042a66605a60140062660120126606200a0022c2c6eb8c0a8008dd698158011bae302a001302f003302d002302c002302c001233302430190014a09448898dd598120019bae3022002302400133002002302500122223233001001005225333024001133025337606ea4014dd300225eb7bdb1804c8ccc8894ccc094cdc800480189981499bb037520126e9802001454ccc094cdc78048018992999813180d98139baa00113302a337606ea4028c0acc0a0dd5000801080119980380480400109981499bb037520066e98008cc018018004dd718118009bab302400130280023026001232533301c3011301d37540022600c660406042603c6ea80052f5c02980103d87a80003006301d3754002600860366ea8c004c06cdd5180f180d9baa0022301e301f00116323300100100622533301c00114c103d87a800013322533301b3375e600c603a6ea80080484c014cc07c0092f5c0266008008002603c002603e0026e9520002301b001375860326034603460346034603460340066eb0c060008dd6180b801180b980b80098091baa00c370e900211191980080080191198018009801001112999807980218081baa0021323232325333016301900213300700313253330143009001132325333019301c0021325333017300c00113232533301c301f00213300d00100b16301d001301937540042a66602e60200022646464646464a666040604600401e2c6eb4c084004c084008dd6980f800980f8011bad301d001301937540042c602e6ea800458c068004c058dd50010a99980a18068008a99980b980b1baa0020061616301437540022c602e002602e004602a00260226ea80085888c94ccc03cc0100044c8c94ccc050c05c00801058dd7180a80098089baa0031533300f3008001132325333014301700200416375c602a00260226ea800c58c03cdd50011b8748000c038004c038c03c004c028dd50011b874800858c02cc03000cc028008c024008c024004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"1bf1264ddd67f3555b0d103f71422f44c7373a8a42744f0d75052aae\"\n }\n ],\n \"definitions\": {\n \"AssetName\": {\n \"title\": \"AssetName\",\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"MValue\": {\n \"title\": \"MValue\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/PolicyId\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Pairs$AssetName_Int\"\n }\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"Pairs$AssetName_Int\": {\n \"title\": \"Pairs<AssetName, Int>\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/AssetName\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"escrow/EscrowDatum\": {\n \"title\": \"EscrowDatum\",\n \"anyOf\": [\n {\n \"title\": \"Initiation\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n },\n {\n \"title\": \"ActiveEscrow\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"initiator_assets\",\n \"$ref\": \"#/definitions/MValue\"\n },\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n }\n ]\n },\n \"escrow/EscrowRedeemer\": {\n \"title\": \"EscrowRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"RecipientDeposit\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"recipient\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"recipient_assets\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n },\n {\n \"title\": \"CancelTrade\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n },\n {\n \"title\": \"CompleteTrade\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import {\n builtinByteString,\n BuiltinByteString,\n Integer,\n List,\n mConStr0,\n mConStr1,\n outputReference,\n PlutusScript,\n stringToHex,\n txOutRef,\n} from \"@meshsdk/common\";\nimport {\n Asset,\n deserializeDatum,\n resolveScriptHash,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport class MeshGiftCardContract extends MeshTxInitiator {\n tokenNameHex: string = \"\";\n paramUtxo: UTxO[\"input\"] = { outputIndex: 0, txHash: \"\" };\n\n constructor(\n inputs: MeshTxInitiatorInput,\n tokenNameHex?: string,\n paramUtxo?: UTxO[\"input\"],\n ) {\n super(inputs);\n if (tokenNameHex) {\n this.tokenNameHex = tokenNameHex;\n }\n if (paramUtxo) {\n this.paramUtxo = paramUtxo;\n }\n }\n\n giftCardCbor = (\n tokenNameHex: string,\n utxoTxHash: string,\n utxoTxId: number,\n ) => {\n let scriptCbor;\n let utxo;\n switch (this.version) {\n case 2:\n scriptCbor = blueprintV2.validators[0]!.compiledCode;\n utxo = outputReference(utxoTxHash, utxoTxId);\n break;\n default:\n scriptCbor = blueprintV1.validators[0]!.compiledCode;\n utxo = txOutRef(utxoTxHash, utxoTxId);\n break;\n }\n\n return applyParamsToScript(\n scriptCbor,\n [builtinByteString(tokenNameHex), utxo],\n \"JSON\",\n );\n };\n\n redeemCbor = (tokenNameHex: string, policyId: string) => {\n let scriptCbor;\n switch (this.version) {\n case 2:\n scriptCbor = blueprintV2.validators[2]!.compiledCode;\n break;\n default:\n scriptCbor = blueprintV1.validators[1]!.compiledCode;\n }\n\n return applyParamsToScript(scriptCbor, [tokenNameHex, policyId]);\n };\n\n createGiftCard = async (\n tokenName: string,\n giftValue: Asset[],\n ): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const tokenNameHex = stringToHex(tokenName);\n const firstUtxo = utxos[0];\n if (firstUtxo === undefined) throw new Error(\"No UTXOs available\");\n const remainingUtxos = utxos.slice(1);\n const giftCardScript = this.giftCardCbor(\n tokenNameHex,\n firstUtxo.input.txHash,\n firstUtxo.input.outputIndex,\n );\n\n const giftCardPolicy = resolveScriptHash(\n giftCardScript,\n this.languageVersion,\n );\n\n const redeemScript: PlutusScript = {\n code: this.redeemCbor(tokenNameHex, giftCardPolicy),\n version: this.languageVersion,\n };\n\n const redeemAddr = this.getScriptAddress(redeemScript.code);\n\n await this.mesh\n .txIn(\n firstUtxo.input.txHash,\n firstUtxo.input.outputIndex,\n firstUtxo.output.amount,\n firstUtxo.output.address,\n )\n .mintPlutusScript(this.languageVersion)\n .mint(\"1\", giftCardPolicy, tokenNameHex)\n .mintingScript(giftCardScript)\n .mintRedeemerValue(mConStr0([]))\n .txOut(redeemAddr, [\n ...giftValue,\n { unit: giftCardPolicy + tokenNameHex, quantity: \"1\" },\n ])\n .txOutInlineDatumValue([\n firstUtxo.input.txHash,\n firstUtxo.input.outputIndex,\n tokenNameHex,\n ])\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(remainingUtxos)\n .complete();\n\n this.tokenNameHex = tokenNameHex;\n this.paramUtxo = firstUtxo.input;\n\n return this.mesh.txHex;\n };\n\n redeemGiftCard = async (giftCardUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n const inlineDatum = deserializeDatum<List>(\n giftCardUtxo.output.plutusData!,\n ).list;\n const paramTxHash = (inlineDatum[0] as BuiltinByteString).bytes;\n const paramTxId = (inlineDatum[1] as Integer).int as number;\n const tokenNameHex = (inlineDatum[2] as BuiltinByteString).bytes;\n const giftCardScript = this.giftCardCbor(\n tokenNameHex,\n paramTxHash,\n paramTxId,\n );\n\n const giftCardPolicy = resolveScriptHash(\n giftCardScript,\n this.languageVersion,\n );\n\n const redeemScript = this.redeemCbor(tokenNameHex, giftCardPolicy);\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n giftCardUtxo.input.txHash,\n giftCardUtxo.input.outputIndex,\n giftCardUtxo.output.amount,\n giftCardUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(\"\")\n .txInScript(redeemScript)\n .mintPlutusScript(this.languageVersion)\n .mint(\"-1\", giftCardPolicy, tokenNameHex)\n .mintingScript(giftCardScript)\n .mintRedeemerValue(mConStr1([]))\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/giftcard\",\n \"description\": \"Aiken contracts for project 'meshjs/giftcard'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"oneshot.gift_card\",\n \"redeemer\": {\n \"title\": \"rdmr\",\n \"schema\": {\n \"$ref\": \"#/definitions/oneshot~1Action\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/aiken~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"5901f5010000323232323232322322232323225333009323232533300c3007300d3754002264646464a666026602c00426464a666024601a60266ea803854ccc048c034c04cdd5191980080080311299980b8008a60103d87a80001323253330163375e603660306ea800804c4cdd2a40006603400497ae0133004004001301b002301900115333012300c00113371e00402029405854ccc048cdc3800a4002266e3c0080405281bad3013002375c60220022c602800264a66601e601260206ea800452f5bded8c026eacc050c044dd500099191980080099198008009bab3016301730173017301700522533301500114bd6f7b630099191919299980b19b91488100002153330163371e9101000021003100513301a337606ea4008dd3000998030030019bab3017003375c602a0046032004602e00244a666028002298103d87a800013232323253330153372200e0042a66602a66e3c01c0084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd7180998081baa00337586024002601c6ea800858c040c044008c03c004c02cdd50008a4c26cac64a66601060060022a66601660146ea8010526161533300830020011533300b300a37540082930b0b18041baa003370e90011b8748000dd7000ab9a5573aaae7955cfaba05742ae89\",\n \"hash\": \"0c0d17d9095fe6b07a2727403e2c6f2dff8042ed7c300cb67a2577a2\"\n },\n {\n \"title\": \"oneshot.redeem\",\n \"datum\": {\n \"title\": \"_d\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_r\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"policy_id\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5901320100003232323232323223223222253330083232533300d3010002132533300b3370e6eb4c034009200113371e0020122940dd718058008b180700099299980499b8748008c028dd50008a5eb7bdb1804dd5980718059baa001323300100132330010013756601e602060206020602060186ea8c03cc030dd50019129998070008a5eb7bdb1804c8c8c8c94ccc03ccdc8a45000021533300f3371e91010000210031005133013337606ea4008dd3000998030030019bab3010003375c601c0046024004602000244a66601a002298103d87a8000132323232533300e337220140042a66601c66e3c0280084cdd2a4000660246e980052f5c02980103d87a80001330060060033756601e0066eb8c034008c044008c03c00452613656375c0026eb80055cd2ab9d5573caae7d5d02ba157441\",\n \"hash\": \"39faa048196bb6b30f50815475e9d16b22e7a0ef6de5935b408ca617\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"aiken/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/aiken~1transaction~1TransactionId\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/TransactionId\": {\n \"title\": \"TransactionId\",\n \"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.\",\n \"anyOf\": [\n {\n \"title\": \"TransactionId\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"hash\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"oneshot/Action\": {\n \"title\": \"Action\",\n \"anyOf\": [\n {\n \"title\": \"Mint\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Burn\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/giftcard\",\n \"description\": \"Aiken contracts for project 'meshjs/giftcard'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"oneshot.gift_card.mint\",\n \"redeemer\": {\n \"title\": \"rdmr\",\n \"schema\": {\n \"$ref\": \"#/definitions/oneshot~1Action\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11\",\n \"hash\": \"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195\"\n },\n {\n \"title\": \"oneshot.gift_card.else\",\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"5901ae01010032323232323232232225333005323232323253323300b3001300c3754004264646464a66601e600a0022a66602460226ea801c540085854ccc03cc00c00454ccc048c044dd50038a8010b0b18079baa006132323232533301430170021323253330133009301437540162a666026601260286ea8c8cc004004018894ccc0600045300103d87a80001323253330173375e603860326ea80080504cdd2a40006603600497ae0133004004001301c002301a00115333013300700113371e00402229405854ccc04ccdc3800a4002266e3c0080445281bad3014002375c60240022c602a00264a666020600860226ea800452f5bded8c026eacc054c048dd500099198008009bab3015301630163016301600322533301400114c103d87a80001323232325333015337220140042a66602a66e3c0280084cdd2a4000660326e980052f5c02980103d87a80001330060060033756602c0066eb8c050008c060008c058004dd6180980098079baa007370e90011bae3010300d37540046e1d200016300e300f002300d001300d002300b0013007375400229309b2b1bae0015734aae7555cf2ab9f5740ae855d11\",\n \"hash\": \"401c967008d42885400991f9225715e1c3a8e43757b1fd36a1328195\"\n },\n {\n \"title\": \"oneshot.redeem.spend\",\n \"datum\": {\n \"title\": \"_d\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_r\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"policy_id\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f\"\n },\n {\n \"title\": \"oneshot.redeem.else\",\n \"parameters\": [\n {\n \"title\": \"token_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"policy_id\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"59011501010032323232323232232232253330063232323232533300b3370e900118061baa001132323232325333013301600213253330113370e6eb4c04c009200113371e00201e2940dd718088008b180a00099299980799b8748008c040dd50008a5eb7bdb1804dd5980a18089baa001323300100137566028602a602a602a602a60226ea8020894ccc04c004530103d87a80001323232325333014337220200042a66602866e3c0400084cdd2a4000660306e980052f5c02980103d87a80001330060060033756602a0066eb8c04c008c05c008c054004c048c04c008c044004c034dd50008b1807980800118070009807001180600098041baa00114984d958dd70009bae0015734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"b2386630f1b210c58d0e46f132e931b362c3f373685118018e4d956f\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"cardano/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"oneshot/Action\": {\n \"title\": \"Action\",\n \"anyOf\": [\n {\n \"title\": \"Mint\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Burn\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import {\n Asset,\n BuiltinByteString,\n ConStr0,\n deserializeAddress,\n Integer,\n mConStr0,\n stringToHex,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport type HelloWorldDatum = ConStr0<\n [Integer, BuiltinByteString, BuiltinByteString]\n>;\n\nexport class MeshHelloWorldContract extends MeshTxInitiator {\n scriptCbor: string;\n scriptAddress: string;\n\n constructor(inputs: MeshTxInitiatorInput) {\n super(inputs);\n this.scriptCbor = this.getScriptCbor();\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = () => {\n switch (this.version) {\n case 2:\n return applyParamsToScript(blueprintV2.validators[0]!.compiledCode, []);\n default:\n return applyParamsToScript(blueprintV1.validators[0]!.compiledCode, []);\n }\n };\n\n lockAsset = async (assets: Asset[]): Promise<string> => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n\n const signerHash = deserializeAddress(walletAddress).pubKeyHash;\n\n await this.mesh\n .txOut(this.scriptAddress, assets)\n .txOutDatumHashValue(mConStr0([signerHash]))\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n unlockAsset = async (scriptUtxo: UTxO, message: string): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const signerHash = deserializeAddress(walletAddress).pubKeyHash;\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n scriptUtxo.input.txHash,\n scriptUtxo.input.outputIndex,\n scriptUtxo.output.amount,\n scriptUtxo.output.address,\n )\n .txInScript(this.scriptCbor)\n .txInRedeemerValue(mConStr0([stringToHex(message)]))\n .txInDatumValue(mConStr0([signerHash]))\n .requiredSignerHash(signerHash)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash, this.scriptCbor);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/aiken\",\n \"description\": \"Aiken on MeshJS\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"hello_world.hello_world\",\n \"datum\": {\n \"title\": \"datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/hello_world~1Datum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/hello_world~1Redeemer\"\n }\n },\n \"compiledCode\": \"58e901000032323232323223223225333006323253330083371e6eb8c008c028dd5002a4410d48656c6c6f2c20576f726c642100100114a06644646600200200644a66601c00229404c94ccc030cdc79bae301000200414a226600600600260200026eb0c02cc030c030c030c030c030c030c030c030c024dd5180098049baa002375c600260126ea80188c02c0045261365653330043370e900018029baa001132325333009300b002149858dd7180480098031baa0011653330023370e900018019baa0011323253330073009002149858dd7180380098021baa001165734aae7555cf2ab9f5742ae881\",\n \"hash\": \"c1fe430f19ac248a8a7ea47db106002c4327e542c3fdc60ad6481103\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"hello_world/Datum\": {\n \"title\": \"Datum\",\n \"anyOf\": [\n {\n \"title\": \"Datum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"owner\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"hello_world/Redeemer\": {\n \"title\": \"Redeemer\",\n \"anyOf\": [\n {\n \"title\": \"Redeemer\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"msg\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/aiken\",\n \"description\": \"Aiken on MeshJS\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"hello_world.hello_world.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/hello_world~1Datum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/hello_world~1Redeemer\"\n }\n },\n \"compiledCode\": \"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89\",\n \"hash\": \"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe\"\n },\n {\n \"title\": \"hello_world.hello_world.else\",\n \"compiledCode\": \"59010801010032323232323225333002323232323253330073370e900118041baa0011323232533300a3370e900018059baa00513232533300f30110021533300c3370e900018069baa00313232533300e3371e6eb8c008c040dd5004a450d48656c6c6f2c20576f726c642100100114a06644646600200200644a66602800229404c94ccc048cdc79bae301600200414a2266006006002602c0026eb0c044c048c048c048c048c048c048c048c048c03cdd50051bae3001300f37546022601e6ea80108c0440045858dd7180780098061baa00516300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89\",\n \"hash\": \"7aef0f7e3fa04defd42c73815891623f7b56d4b98c47610dd59395fe\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"hello_world/Datum\": {\n \"title\": \"Datum\",\n \"anyOf\": [\n {\n \"title\": \"Datum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"owner\",\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n }\n ]\n },\n \"hello_world/Redeemer\": {\n \"title\": \"Redeemer\",\n \"anyOf\": [\n {\n \"title\": \"Redeemer\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"msg\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","import {\n ConStr0,\n conStr0,\n CurrencySymbol,\n currencySymbol,\n Integer,\n integer,\n mConStr0,\n mConStr1,\n parseAssetUnit,\n PubKeyAddress,\n pubKeyAddress,\n TokenName,\n tokenName,\n} from \"@meshsdk/common\";\nimport {\n deserializeAddress,\n deserializeDatum,\n Quantity,\n serializeAddressObj,\n Unit,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport type MarketplaceDatum = ConStr0<\n [PubKeyAddress, Integer, CurrencySymbol, TokenName]\n>;\nexport const marketplaceDatum = (\n sellerAddress: string,\n lovelaceFee: number,\n assetHex: string,\n): MarketplaceDatum => {\n const { pubKeyHash, stakeCredentialHash } = deserializeAddress(sellerAddress);\n const { policyId, assetName } = parseAssetUnit(assetHex);\n return conStr0([\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n integer(lovelaceFee),\n currencySymbol(policyId),\n tokenName(assetName),\n ]);\n};\n\nexport class MeshMarketplaceContract extends MeshTxInitiator {\n ownerAddress: string;\n feePercentageBasisPoint: number;\n scriptCbor: string;\n scriptAddress: string;\n\n constructor(\n inputs: MeshTxInitiatorInput,\n ownerAddress: string,\n feePercentageBasisPoint: number,\n ) {\n super(inputs);\n this.ownerAddress = ownerAddress;\n this.feePercentageBasisPoint = feePercentageBasisPoint;\n\n const { pubKeyHash, stakeCredentialHash } =\n deserializeAddress(ownerAddress);\n\n this.scriptCbor = this.getScriptCbor(\n pubKeyHash,\n stakeCredentialHash,\n feePercentageBasisPoint,\n );\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = (\n pubKeyHash: string,\n stakeCredentialHash: string,\n feePercentageBasisPoint: number,\n ) => {\n switch (this.version) {\n case 2:\n return applyParamsToScript(\n blueprintV2.validators[0]!.compiledCode,\n [\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n integer(feePercentageBasisPoint),\n ],\n \"JSON\",\n );\n default:\n return applyParamsToScript(\n blueprintV1.validators[0]!.compiledCode,\n [\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n integer(feePercentageBasisPoint),\n ],\n \"JSON\",\n );\n }\n };\n\n listAsset = async (asset: string, price: number) => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n\n const assetMap = new Map<Unit, Quantity>();\n assetMap.set(asset, \"1\");\n\n const tokenForSale = [{ unit: asset, quantity: \"1\" }];\n const outputDatum = marketplaceDatum(walletAddress, price, asset);\n\n await this.mesh\n .txOut(this.scriptAddress, tokenForSale)\n .txOutInlineDatumValue(outputDatum, \"JSON\")\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n return this.mesh.txHex;\n };\n\n delistAsset = async (marketplaceUtxo: UTxO) => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n marketplaceUtxo.input.txHash,\n marketplaceUtxo.input.outputIndex,\n marketplaceUtxo.output.amount,\n marketplaceUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr1([]))\n .txInScript(this.scriptCbor)\n .changeAddress(walletAddress)\n .requiredSignerHash(deserializeAddress(walletAddress).pubKeyHash)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n\n return this.mesh.txHex;\n };\n\n purchaseAsset = async (marketplaceUtxo: UTxO) => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n\n const inputDatum = deserializeDatum<MarketplaceDatum>(\n marketplaceUtxo.output.plutusData!,\n );\n\n const inputLovelace = marketplaceUtxo.output.amount.find(\n (a) => a.unit === \"lovelace\",\n )!.quantity;\n\n const tx = this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n marketplaceUtxo.input.txHash,\n marketplaceUtxo.input.outputIndex,\n marketplaceUtxo.output.amount,\n marketplaceUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr0([]))\n .txInScript(this.scriptCbor)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos);\n\n let ownerToReceiveLovelace =\n ((inputDatum.fields[1].int as number) * this.feePercentageBasisPoint) /\n 10000;\n if (this.feePercentageBasisPoint > 0 && ownerToReceiveLovelace < 1000000) {\n ownerToReceiveLovelace = 1000000;\n }\n\n if (ownerToReceiveLovelace > 0) {\n const ownerToReceive = [\n {\n unit: \"lovelace\",\n quantity: Math.ceil(ownerToReceiveLovelace).toString(),\n },\n ];\n tx.txOut(this.ownerAddress, ownerToReceive);\n }\n\n const sellerToReceiveLovelace =\n (inputDatum.fields[1].int as number) + Number(inputLovelace);\n\n if (sellerToReceiveLovelace > 0) {\n const sellerAddress = serializeAddressObj(\n inputDatum.fields[0],\n this.networkId,\n );\n const sellerToReceive = [\n {\n unit: \"lovelace\",\n quantity: sellerToReceiveLovelace.toString(),\n },\n ];\n tx.txOut(sellerAddress, sellerToReceive);\n }\n await tx.complete();\n\n return this.mesh.txHex;\n };\n\n relistAsset = async (marketplaceUtxo: UTxO, newPrice: number) => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const inputAsset = marketplaceUtxo.output.amount.find(\n (a) => a.unit !== \"lovelace\",\n )!.unit;\n\n const tokenForSale = [{ unit: inputAsset, quantity: \"1\" }];\n const outputDatum = marketplaceDatum(walletAddress, newPrice, inputAsset);\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n marketplaceUtxo.input.txHash,\n marketplaceUtxo.input.outputIndex,\n marketplaceUtxo.output.amount,\n marketplaceUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr1([]))\n .txInScript(this.scriptCbor)\n .txOut(this.scriptAddress, tokenForSale)\n .txOutInlineDatumValue(outputDatum, \"JSON\")\n .changeAddress(walletAddress)\n .requiredSignerHash(deserializeAddress(walletAddress).pubKeyHash)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash, this.scriptCbor);\n };\n\n static getCompiledCode = (version = 2) => {\n switch (version) {\n case 2:\n return blueprintV2.validators[0]!.compiledCode;\n default:\n return blueprintV1.validators[0]!.compiledCode;\n }\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/marketplace\",\n \"description\": \"Aiken contracts for project 'meshjs/marketplace'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"marketplace.marketplace\",\n \"datum\": {\n \"title\": \"datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/marketplace~1types~1MarketplaceDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/marketplace~1types~1MarketplaceRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"owner\",\n \"schema\": {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n }\n },\n {\n \"title\": \"fee_percentage_basis_point\",\n \"schema\": {\n \"$ref\": \"#/definitions/Int\"\n }\n }\n ],\n \"compiledCode\": \"59082f01000032323232323232223223232322322533300b3232533300d3007300e375400226464a64666020601660226ea80204c94ccc044c030c048dd500089919191919191919299980c99299980e8008a501533301d302000114a22940cc88c8cc00400400c894ccc08000452f5c026464a66603e66ebcc044c084dd5180a18109baa00200513302300233004004001133004004001302400230220013758601660366ea8c02cc06cdd50079805980d9baa300e301b37540102a6660320022004294052819801998011bac3004301a3754601460346ea803805cc018cdc199b82375a601a60346ea805005520a09c0133002330013758600660326ea8c024c064dd50069804980c9baa0133005337006eb4c030c064dd50099998021bab300c30193754601860326ea801922010048810022323300100100322533301d00114bd6f7b63009991299980e19baf300e301e375400400a2646660020020046eacc048c07cdd50019112999811001080089919980200218130019991191980080080291299981380089981419bb037520086e9800d2f5bded8c0264646464a66605066e400200084cc0b0cdd81ba9008374c00e00a2a66605066e3c0200084c94ccc0a4c090c0a8dd500089981699bb03752012605c60566ea80040104010c94ccc0a54ccc0b00045288a5014c0103d87a80001301a3302d374c00297ae032333001001008002222533302e0021001132333004004303200333223233001001005225333033001133034337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0d0cdc800400109981c19bb037520106ea001c01454ccc0d0cdc7804001099299981a9818181b1baa001133039337606ea4024c0e8c0dcdd5000802080219299981a98180008a60103d87a80001302633039375000297ae03370000e00226607066ec0dd48011ba800133006006003375a606a0066eb8c0cc008c0dc008c0d4004dd718168009bad302e001303000213302c337606ea4008dd3000998030030019bab3029003375c604e004605600460520026eb8c084004dd5981100098120010800980f800998010011810000911919800800991980080080191299980e8008a5eb804c8ccc888c8cc00400400c894ccc08c004400c4c8cc094dd3998129ba90063302530220013302530230014bd7019801801981380118128009bae301c0013756603a002660060066042004603e00244a66603800229444c94ccc068c8cdc49bad3007001333008006375c601a0026eb8c040004dd6180f8010998018018008a50301f0012301a301b301b0012223253330173011301837540022900009bad301c3019375400264a66602e602260306ea8004530103d87a8000132330010013756603a60346ea8008894ccc070004530103d87a8000132323232533301d337220100042a66603a66e3c0200084c038cc084dd4000a5eb80530103d87a8000133006006003375a603c0066eb8c070008c080008c078004c8cc004004010894ccc06c0045300103d87a8000132323232533301c337220100042a66603866e3c0200084c034cc080dd3000a5eb80530103d87a80001330060060033756603a0066eb8c06c008c07c008c07400494ccc04cc03800452f5bded8c0264646600200297adef6c6022533301900113301a337609801014000374c00697adef6c60132323232533301a3372091010000213301e337609801014000374c00e00a2a66603466e3d2210000213301e337609801014000374c00e00626603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc0040052f5bded8c044a66603000226603266ec13001014000375000697adef6c6013232323253330193372091010000213301d337609801014000375000e00a2a66603266e3d2210000213301d337609801014000375000e00626603a66ec0dd48011ba800133006006003375a60340066eb8c060008c070008c068004c058c04cdd50008b19198008009bac300330133754600660266ea801c894ccc054004530103d87a80001323253330143375e600c602c6ea800801c4c014cc0600092f5c02660080080026032004602e002264a666022601860246ea80044cc88c8cc00400400c894ccc060004528099299980b19b8f375c603600400829444cc00c00c004c06c004dd6180b180b980b980b980b980b980b980b980b98099baa30033013375400e6eb8c058c04cdd50008b192999808980618091baa001130023301530163013375400297ae014c0103d87a8000300230123754600460246ea8030dd2a4000460280026024601e6ea8004528180098071baa00223011301200114984d958c94ccc028c01400454ccc034c030dd50010a4c2c2a66601460080022a66601a60186ea80085261616300a375400264a666010600660126ea80104c8c8c8c8c8c8c8c94ccc04cc0580084c9265333010300b3011375400e264646464a66602e6034004264649319299980b180880089919299980d980f00109924c64a666032602800226464a66603c604200426493180a0008b180f800980d9baa002153330193013001132323232323253330223025002149858dd6981180098118011bad30210013021002375a603e00260366ea800858c064dd50008b180e000980c1baa00315333016301000115333019301837540062930b0b180b1baa002300d003163018001301800230160013012375400e2c2c6eb8c050004c050008dd7180900098090011bad30100013010002300e001300a37540082c464a666012600800226464a66601c60220042930b1bae300f001300b37540042a666012600600226464a66601c60220042930b1bae300f001300b37540042c60126ea8004dc3a40046e1d2000375a002ae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"96dbc09c69d812e157d42967587c459b60f5dd21b1902312045586c4\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Optional\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"aiken/transaction/credential/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://cips.cardano.org/cip/CIP-19).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKeyCredential\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n },\n {\n \"title\": \"ScriptCredential\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Referenced\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"marketplace/types/MarketplaceDatum\": {\n \"title\": \"MarketplaceDatum\",\n \"anyOf\": [\n {\n \"title\": \"MarketplaceDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"seller\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"price\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"policy\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"tokenName\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"marketplace/types/MarketplaceRedeemer\": {\n \"title\": \"MarketplaceRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"Buy\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Close\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/marketplace\",\n \"description\": \"Aiken contracts for project 'meshjs/marketplace'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"marketplace.marketplace.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/marketplace~1MarketplaceDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/marketplace~1MarketplaceRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"owner\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n }\n },\n {\n \"title\": \"fee_percentage_basis_point\",\n \"schema\": {\n \"$ref\": \"#/definitions/Int\"\n }\n }\n ],\n \"compiledCode\": \"5906f401010032323232323232223225333005323232323253323300b3001300c37540042646464646464a66602260060022a66602860266ea8024540085854ccc044c01c00454ccc050c04cdd50048a8010b0b18089baa0081533300f30013010375400426464a64666024600860266ea80284c94ccc04cc014c050dd50008991919191919191919299980e1929998100008a5015333020302300114a22940cc88c8cc00400400c894ccc08c00452f5c026464a66604466ebcc048c090dd5180718121baa002005133026002330040040011330040040013027002302500137586018603c6ea8058c030c078dd51804180f1baa0091533301c001100214a02940cc00ccc008dd61802180e9baa01501a30063370666e08dd69803980e9baa00c018482827004cc008cc004dd61801980e1baa014300a301c3754016600a66e00dd69803180e1baa00b3330043756600c60386ea8c018c070dd5003a450048810022323300100100322533302000114bd6f7b63009991299980f99baf300f3021375400400a2646660020020046eacc030c088dd50019112999812801080089919980200218148019991191980080080291299981500089981599bb037520086e9800d2f5bded8c0264646464a66605666e400200084cc0bccdd81ba9008374c00e00a2a66605666e3c0200084c94ccc0b0c078c0b4dd500089981819bb037520126062605c6ea80040104010c94ccc0b14ccc0bc0045288a5014c0103d87a80001301b33030374c00297ae03233300100100800222253330310021001132333004004303500333223233001001005225333036001133037337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0dccdc800400109981d99bb037520106ea001c01454ccc0dccdc7804001099299981c1815181c9baa00113303c337606ea4024c0f4c0e8dd5000802080219299981c18150008a60103d87a8000130273303c375000297ae03370000e00226607666ec0dd48011ba800133006006003375a60700066eb8c0d8008c0e8008c0e0004dd718180009bad3031001303300213302f337606ea4008dd3000998030030019bab302c003375c6054004605c00460580026eb8c090004dd5981280098138010800981100099801001181180091191980080099198008008019129998100008a5eb804c8ccc888c8cc00400400c894ccc098004400c4c8cc0a0dd3998141ba90063302830250013302830260014bd7019801801981500118140009bae301f00137566040002660060066048004604400244a66603e00229444c94ccc074c8cdc49bad3007001333008006375c601c0026eb8c028004dd618110010998018018008a5030220012301d301e301e00122232533301a3010301b37540022900009bad301f301c375400264a666034602060366ea8004530103d87a80001323300100137566040603a6ea8008894ccc07c004530103d87a80001323232325333020337220100042a66604066e3c0200084c03ccc090dd4000a5eb80530103d87a8000133006006003375a60420066eb8c07c008c08c008c084004c8cc004004010894ccc0780045300103d87a8000132323232533301f337220100042a66603e66e3c0200084c038cc08cdd3000a5eb80530103d87a8000133006006003375660400066eb8c078008c088008c08000494ccc058c02000452f5bded8c0264646600200297adef6c6022533301c00113301d337609801014000374c00697adef6c60132323232533301d33720910100002133021337609801014000374c00e00a2a66603a66e3d22100002133021337609801014000374c00e00626604266ec0dd48011ba6001330060060033756603c0066eb8c070008c080008c078004c8cc0040052f5bded8c044a66603600226603866ec13001014000375000697adef6c60132323232533301c33720910100002133020337609801014000375000e00a2a66603866e3d22100002133020337609801014000375000e00626604066ec0dd48011ba800133006006003375a603a0066eb8c06c008c07c008c0740048c068c06c004c060c054dd50008b19198008009bac30033015375401a44a66602e002298103d87a80001323253330163375e600c60306ea80080284c014cc0680092f5c026600800800260360046032002264a666026600a60286ea80044cc88c8cc00400400c894ccc068004528099299980c19b8f375c603a00400829444cc00c00c004c074004dd6180c180c980c980c980c980c980c980c980c980a9baa00d375c6030602a6ea800458c94ccc04cc014c050dd5000898011980b980c180a9baa0014bd700a60103d87a8000300230143754600460286ea800cdd2a40004602c002602860226ea800858dc3a4000602460260046022002601a6ea8008dc3a40042c601c601e004601a002601a0046016002600e6ea800452613656375a002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"464b45f4a6b3b34e2583796622c329a7f084eb47a6b0c1fc2bd08ad8\"\n },\n {\n \"title\": \"marketplace.marketplace.else\",\n \"parameters\": [\n {\n \"title\": \"owner\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n }\n },\n {\n \"title\": \"fee_percentage_basis_point\",\n \"schema\": {\n \"$ref\": \"#/definitions/Int\"\n }\n }\n ],\n \"compiledCode\": \"5906f401010032323232323232223225333005323232323253323300b3001300c37540042646464646464a66602260060022a66602860266ea8024540085854ccc044c01c00454ccc050c04cdd50048a8010b0b18089baa0081533300f30013010375400426464a64666024600860266ea80284c94ccc04cc014c050dd50008991919191919191919299980e1929998100008a5015333020302300114a22940cc88c8cc00400400c894ccc08c00452f5c026464a66604466ebcc048c090dd5180718121baa002005133026002330040040011330040040013027002302500137586018603c6ea8058c030c078dd51804180f1baa0091533301c001100214a02940cc00ccc008dd61802180e9baa01501a30063370666e08dd69803980e9baa00c018482827004cc008cc004dd61801980e1baa014300a301c3754016600a66e00dd69803180e1baa00b3330043756600c60386ea8c018c070dd5003a450048810022323300100100322533302000114bd6f7b63009991299980f99baf300f3021375400400a2646660020020046eacc030c088dd50019112999812801080089919980200218148019991191980080080291299981500089981599bb037520086e9800d2f5bded8c0264646464a66605666e400200084cc0bccdd81ba9008374c00e00a2a66605666e3c0200084c94ccc0b0c078c0b4dd500089981819bb037520126062605c6ea80040104010c94ccc0b14ccc0bc0045288a5014c0103d87a80001301b33030374c00297ae03233300100100800222253330310021001132333004004303500333223233001001005225333036001133037337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0dccdc800400109981d99bb037520106ea001c01454ccc0dccdc7804001099299981c1815181c9baa00113303c337606ea4024c0f4c0e8dd5000802080219299981c18150008a60103d87a8000130273303c375000297ae03370000e00226607666ec0dd48011ba800133006006003375a60700066eb8c0d8008c0e8008c0e0004dd718180009bad3031001303300213302f337606ea4008dd3000998030030019bab302c003375c6054004605c00460580026eb8c090004dd5981280098138010800981100099801001181180091191980080099198008008019129998100008a5eb804c8ccc888c8cc00400400c894ccc098004400c4c8cc0a0dd3998141ba90063302830250013302830260014bd7019801801981500118140009bae301f00137566040002660060066048004604400244a66603e00229444c94ccc074c8cdc49bad3007001333008006375c601c0026eb8c028004dd618110010998018018008a5030220012301d301e301e00122232533301a3010301b37540022900009bad301f301c375400264a666034602060366ea8004530103d87a80001323300100137566040603a6ea8008894ccc07c004530103d87a80001323232325333020337220100042a66604066e3c0200084c03ccc090dd4000a5eb80530103d87a8000133006006003375a60420066eb8c07c008c08c008c084004c8cc004004010894ccc0780045300103d87a8000132323232533301f337220100042a66603e66e3c0200084c038cc08cdd3000a5eb80530103d87a8000133006006003375660400066eb8c078008c088008c08000494ccc058c02000452f5bded8c0264646600200297adef6c6022533301c00113301d337609801014000374c00697adef6c60132323232533301d33720910100002133021337609801014000374c00e00a2a66603a66e3d22100002133021337609801014000374c00e00626604266ec0dd48011ba6001330060060033756603c0066eb8c070008c080008c078004c8cc0040052f5bded8c044a66603600226603866ec13001014000375000697adef6c60132323232533301c33720910100002133020337609801014000375000e00a2a66603866e3d22100002133020337609801014000375000e00626604066ec0dd48011ba800133006006003375a603a0066eb8c06c008c07c008c0740048c068c06c004c060c054dd50008b19198008009bac30033015375401a44a66602e002298103d87a80001323253330163375e600c60306ea80080284c014cc0680092f5c026600800800260360046032002264a666026600a60286ea80044cc88c8cc00400400c894ccc068004528099299980c19b8f375c603a00400829444cc00c00c004c074004dd6180c180c980c980c980c980c980c980c980c980a9baa00d375c6030602a6ea800458c94ccc04cc014c050dd5000898011980b980c180a9baa0014bd700a60103d87a8000300230143754600460286ea800cdd2a40004602c002602860226ea800858dc3a4000602460260046022002601a6ea8008dc3a40042c601c601e004601a002601a0046016002600e6ea800452613656375a002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"464b45f4a6b3b34e2583796622c329a7f084eb47a6b0c1fc2bd08ad8\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"marketplace/MarketplaceDatum\": {\n \"title\": \"MarketplaceDatum\",\n \"anyOf\": [\n {\n \"title\": \"MarketplaceDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"seller\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"price\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"policy\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"tokenName\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"marketplace/MarketplaceRedeemer\": {\n \"title\": \"MarketplaceRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"Buy\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Close\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import { builtinByteString, list, PlutusScript } from \"@meshsdk/common\";\nimport {\n BrowserWallet,\n deserializeAddress,\n MeshWallet,\n Transaction,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport class MeshPaymentSplitterContract extends MeshTxInitiator {\n scriptCbor: string;\n scriptAddress: string;\n payees: string[] = [];\n\n wrapPayees = (payees: string[]) =>\n list(\n payees.map((payee) =>\n builtinByteString(deserializeAddress(payee).pubKeyHash),\n ),\n );\n\n constructor(inputs: MeshTxInitiatorInput, payees: string[]) {\n super(inputs);\n\n if (inputs.wallet) {\n inputs.wallet.getUsedAddresses().then((addresses) => {\n this.payees = [addresses[0]!, ...payees];\n });\n } else {\n this.payees = payees;\n console.warn(\n \"Wallet not provided. Therefore the payment address will not be added to the payees list which makes it impossible to trigger the payout.\",\n );\n }\n\n this.scriptCbor = this.getScriptCbor();\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = () => {\n switch (this.version) {\n case 2:\n return applyParamsToScript(\n blueprintV2.validators[0]!.compiledCode,\n [this.wrapPayees(this.payees)],\n \"JSON\",\n );\n\n default:\n return applyParamsToScript(\n blueprintV1.validators[0]!.compiledCode,\n [this.wrapPayees(this.payees)],\n \"JSON\",\n );\n }\n };\n\n sendLovelaceToSplitter = async (lovelaceAmount: number): Promise<string> => {\n if (this.wallet === null || this.wallet === undefined) {\n throw new Error(\"Wallet not provided\");\n }\n\n const { walletAddress } = await this.getWalletInfoForTx();\n\n const { pubKeyHash } = deserializeAddress(walletAddress);\n const datum = {\n alternative: 0,\n fields: [pubKeyHash],\n };\n\n const tx = new Transaction({ initiator: this.wallet }).sendLovelace(\n {\n address: this.scriptAddress,\n datum: { value: datum },\n },\n lovelaceAmount.toString(),\n );\n\n const unsignedTx = await tx.build();\n return unsignedTx;\n };\n\n triggerPayout = async () => {\n if (this.wallet === null || this.wallet === undefined) {\n throw new Error(\"Wallet not provided\");\n }\n\n const { walletAddress, collateral } = await this.getWalletInfoForTx();\n\n const script: PlutusScript = {\n code: this.scriptCbor,\n version: this.languageVersion,\n };\n\n const utxos =\n (await this.fetcher?.fetchAddressUTxOs(this.scriptAddress)) || [];\n const { pubKeyHash } = deserializeAddress(walletAddress);\n const datum = {\n alternative: 0,\n fields: [pubKeyHash],\n };\n\n const redeemerData = \"Hello, World!\";\n const redeemer = { data: { alternative: 0, fields: [redeemerData] } };\n\n let tx = new Transaction({ initiator: this.wallet });\n let split = 0;\n for (const utxo of utxos) {\n const amount = utxo.output?.amount;\n if (amount) {\n let lovelace = amount.find((asset) => asset.unit === \"lovelace\");\n if (lovelace) {\n split += Math.floor(Number(lovelace.quantity) / this.payees.length);\n }\n\n tx = tx.redeemValue({\n value: utxo,\n script: script,\n datum: datum,\n redeemer: redeemer,\n });\n }\n }\n\n tx = tx.setCollateral([collateral]);\n for (const payee of this.payees) {\n tx = tx.sendLovelace(payee, split.toString());\n }\n\n tx = tx.setRequiredSigners([walletAddress]);\n const unsignedTx = await tx.build();\n return unsignedTx;\n };\n}\n","{\n \"preamble\": {\n \"title\": \"fabianbormann/payment-splitter\",\n \"description\": \"Aiken contracts for project 'fabianbormann/payment-splitter'\",\n \"version\": \"0.1.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"payment_splitter.payout\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/payment_splitter~1Datum\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/payment_splitter~1Redeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"scriptHashes\",\n \"schema\": {\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5903a5010000323232323232322322322322533300832323232323232323232323253330143375e6e9cccc8c0040048894ccc06800440084ccc00c00cc8c8cc004004010894ccc07400452f5c026464a66603866ebc00801440044cc080008cc010010004c084008c07c004c070004c074004cc8c004004894ccc06400452f5c026466036002660060066600e603a004466603066ebc00400928251301b001323300100100722533301900114bd7009980d1806180c1baa300c3018375460360026600400460380020169801018000100114a0646600200200444a66603000229444c94ccc058cdc39bad301b00233005533301900414c0103d87a80001300e3301a301b0044bd70240002660060060022940c06c004c8cc004004028894ccc05c00452f5c02660306ea0c8c8c8c8c8c94ccc068cdc424000002266e04008cdc08009802005880119980119804806919baf3010301c3754602060386ea8c014c070dd5000803240004466e00004c014dd59803180e9baa3006301d375400466600266010014466ebcc03cc06cdd51807980d9baa0010054800088cdc000098021bab3005301c3754004444646600200200844a66603e0022008266006604200266004004604400246600c64a66603066e1d200230193754002298103d87a8000132330010013756603c60366ea8008894ccc074004530103d87a8000132323232533301e33722911000021533301e3371e9101000021301633022375000297ae014c0103d87a8000133006006003375a603e0066eb8c074008c084008c07c004c8cc004004008894ccc0700045300103d87a8000132323232533301d33722911000021533301d3371e9101000021301533021374c00297ae014c0103d87a80001330060060033756603c0066eb8c070008c080008c07800520002301b301c001301900133002002301a0012253330133370e9001180a1baa00210011375a6030602a6ea800888c8cc00400400c894ccc05c00452f5c026464a66602c600a00426603400466008008002266008008002603600460320026eacc050c054008dd61809800980998098011bac3011001300d37546002601a6ea80108c040004c8cc004004020894ccc03800452f5c026601e60066601e602000297ae0330020023011001374a90000a4c26caca66600c66e1d20003007375400226464a666016601c0042930b1bae300c001300837540022ca66600866e1d20003005375400226464a66601260180042930b1bae300a001300637540022c6eb00055cd2ab9d5573caae7d5d02ba157441\",\n \"hash\": \"0776032753d2900f7c1e933af4108c53851e10ca95fa10e34af90277\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"List$ByteArray\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n \"payment_splitter/Datum\": {\n \"title\": \"Datum\",\n \"anyOf\": [\n {\n \"title\": \"Datum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"owner\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"payment_splitter/Redeemer\": {\n \"title\": \"Redeemer\",\n \"anyOf\": [\n {\n \"title\": \"Redeemer\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"message\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"fabianbormann/payment-splitter\",\n \"description\": \"Aiken contracts for project 'fabianbormann/payment-splitter'\",\n \"version\": \"0.1.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"payment_splitter.payout.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/payment_splitter~1Datum\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/payment_splitter~1Redeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"scriptHashes\",\n \"schema\": {\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5903ac0101003232323232323223225333004323232323253323300a3001300b37540042646464a66601a66e1d2000300e375400c26464a666024602a0042646464646464646464646464a66603666ebcdd3999918008009112999810800880109998018019919198008008021129998120008a5eb804c8c94ccc08ccdd7801002880089981380119802002000981400118130009811800981200099918008009129998100008a5eb804c8cc088004cc00c00ccc01cc0900088ccc07ccdd78008012504a26044002646600200201044a666040002297ae01330213007301f3754600e603e6ea8c088004cc008008c08c00402d3001018000100114a0646600200200444a66603e00229444c94ccc074cdc39bad302200233005533302000414c0103d87a80001300e3302130220044bd70240002660060060022940c088004c8cc004004028894ccc07800452f5c026603e6ea0c8c8c8c8c8c94ccc084cdc424000002266e04008cdc0800806080119980119804807119baf300b30233754601660466ea8c014c08cdd5000803240004466e00004c014dd5980318121baa30063024375400466600266010016466ebcc028c088dd5180518111baa0010054800088cdc000098021bab300530233754004444646600200200844a66604c0022008266006605000266004004605200246600c64a66603e602c60406ea80045300103d87a8000132330010013756604a60446ea8008894ccc090004530103d87a800013232323253330253372291100002153330253371e9101000021301633029375000297ae014c0103d87a8000133006006003375a604c0066eb8c090008c0a0008c098004c8cc004004008894ccc08c0045300103d87a800013232323253330243372291100002153330243371e9101000021301533028374c00297ae014c0103d87a80001330060060033756604a0066eb8c08c008c09c008c0940052000230223023001302000133002002302100122533301a3011301b3754004200226eb4c07cc070dd500111191980080080191299980f0008a5eb804c8c94ccc074c0140084cc084008cc0100100044cc010010004c088008c0800048c070004dd6980d180d8011bac3019001301930190023758602e00260266ea8030c8cc00400403c894ccc05400452f5c026602c60066602c602e00297ae0330020023018001374a90000b1bae3013001300f375400c2c60226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea8004526136563758002ae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"18dd08b9d716f70842061bc6967787def27aee863ac223e048f68317\"\n },\n {\n \"title\": \"payment_splitter.payout.else\",\n \"parameters\": [\n {\n \"title\": \"scriptHashes\",\n \"schema\": {\n \"$ref\": \"#/definitions/List$ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5903ac0101003232323232323223225333004323232323253323300a3001300b37540042646464a66601a66e1d2000300e375400c26464a666024602a0042646464646464646464646464a66603666ebcdd3999918008009112999810800880109998018019919198008008021129998120008a5eb804c8c94ccc08ccdd7801002880089981380119802002000981400118130009811800981200099918008009129998100008a5eb804c8cc088004cc00c00ccc01cc0900088ccc07ccdd78008012504a26044002646600200201044a666040002297ae01330213007301f3754600e603e6ea8c088004cc008008c08c00402d3001018000100114a0646600200200444a66603e00229444c94ccc074cdc39bad302200233005533302000414c0103d87a80001300e3302130220044bd70240002660060060022940c088004c8cc004004028894ccc07800452f5c026603e6ea0c8c8c8c8c8c94ccc084cdc424000002266e04008cdc0800806080119980119804807119baf300b30233754601660466ea8c014c08cdd5000803240004466e00004c014dd5980318121baa30063024375400466600266010016466ebcc028c088dd5180518111baa0010054800088cdc000098021bab300530233754004444646600200200844a66604c0022008266006605000266004004605200246600c64a66603e602c60406ea80045300103d87a8000132330010013756604a60446ea8008894ccc090004530103d87a800013232323253330253372291100002153330253371e9101000021301633029375000297ae014c0103d87a8000133006006003375a604c0066eb8c090008c0a0008c098004c8cc004004008894ccc08c0045300103d87a800013232323253330243372291100002153330243371e9101000021301533028374c00297ae014c0103d87a80001330060060033756604a0066eb8c08c008c09c008c0940052000230223023001302000133002002302100122533301a3011301b3754004200226eb4c07cc070dd500111191980080080191299980f0008a5eb804c8c94ccc074c0140084cc084008cc0100100044cc010010004c088008c0800048c070004dd6980d180d8011bac3019001301930190023758602e00260266ea8030c8cc00400403c894ccc05400452f5c026602c60066602c602e00297ae0330020023018001374a90000b1bae3013001300f375400c2c60226024004602000260186ea8008dc3a40042c601a601c004601800260180046014002600c6ea8004526136563758002ae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"18dd08b9d716f70842061bc6967787def27aee863ac223e048f68317\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"List$ByteArray\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"payment_splitter/Datum\": {\n \"title\": \"Datum\",\n \"anyOf\": [\n {\n \"title\": \"Datum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"owner\",\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n }\n ]\n },\n \"payment_splitter/Redeemer\": {\n \"title\": \"Redeemer\",\n \"anyOf\": [\n {\n \"title\": \"Redeemer\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"message\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","import {\n AssetMetadata,\n conStr0,\n Data,\n integer,\n mConStr0,\n mOutputReference,\n mPubKeyAddress,\n stringToHex,\n} from \"@meshsdk/common\";\nimport {\n applyCborEncoding,\n applyParamsToScript,\n deserializeAddress,\n resolveScriptHash,\n serializeAddressObj,\n serializePlutusScript,\n UTxO,\n} from \"@meshsdk/core\";\nimport { parseDatumCbor } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprint from \"./aiken-workspace/plutus.json\";\nimport { OracleDatum } from \"./type\";\n\n/**\n * Mesh Plutus NFT contract class\n *\n * This NFT minting script enables users to mint NFTs with an automatically incremented index, which increases by one for each newly minted NFT.\n *\n * To facilitate this process, the first step is to set up a one-time minting policy by minting an oracle token. This oracle token is essential as it holds the current state and index of the NFTs, acting as a reference for the minting sequence.\n *\n * With each new NFT minted, the token index within the oracle is incremented by one, ensuring a consistent and orderly progression in the numbering of the NFTs.\n */\nexport class MeshPlutusNFTContract extends MeshTxInitiator {\n collectionName: string;\n paramUtxo: UTxO[\"input\"] = { outputIndex: 0, txHash: \"\" };\n oracleAddress: string;\n\n getOracleCbor = () => {\n return applyCborEncoding(blueprint.validators[0]!.compiledCode);\n };\n\n getOracleNFTCbor = () => {\n return applyParamsToScript(blueprint.validators[2]!.compiledCode, [\n mOutputReference(this.paramUtxo.txHash, this.paramUtxo.outputIndex),\n ]);\n };\n\n getNFTCbor = () => {\n const oracleNftPolicyId = resolveScriptHash(this.getOracleNFTCbor(), \"V3\");\n return applyParamsToScript(blueprint.validators[4]!.compiledCode, [\n stringToHex(this.collectionName),\n oracleNftPolicyId,\n ]);\n };\n\n constructor(\n inputs: MeshTxInitiatorInput,\n contract: {\n collectionName: string;\n paramUtxo?: UTxO[\"input\"];\n },\n ) {\n super(inputs);\n this.collectionName = contract.collectionName;\n if (contract.paramUtxo) {\n this.paramUtxo = contract.paramUtxo;\n }\n this.oracleAddress = serializePlutusScript(\n {\n code: applyCborEncoding(blueprint.validators[0]!.compiledCode),\n version: \"V3\",\n },\n inputs.stakeCredential,\n inputs.networkId,\n ).address;\n }\n\n /**\n * Set up a one-time minting policy by minting an oracle token. This oracle token is essential as it holds the current state and index of the NFTs, acting as a reference for the minting sequence.\n * @param lovelacePrice - Price of the NFT in lovelace\n * @returns - Transaction hex and paramUtxo\n *\n * @example\n * ```typescript\n * const { tx, paramUtxo } = await contract.setupOracle(lovelacePrice);\n * ```\n */\n setupOracle = async (lovelacePrice: number) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n if (utxos?.length <= 0) {\n throw new Error(\"No UTxOs found\");\n }\n const paramUtxo = utxos[0]!;\n const script = blueprint.validators[2]!.compiledCode;\n const param: Data = mOutputReference(\n paramUtxo.input.txHash,\n paramUtxo.input.outputIndex,\n );\n const paramScript = applyParamsToScript(script, [param]);\n const policyId = resolveScriptHash(paramScript, \"V3\");\n const tokenName = \"\";\n const { pubKeyHash, stakeCredentialHash } =\n deserializeAddress(walletAddress);\n\n const txHex = await this.mesh\n .txIn(\n paramUtxo.input.txHash,\n paramUtxo.input.outputIndex,\n paramUtxo.output.amount,\n paramUtxo.output.address,\n )\n .mintPlutusScriptV3()\n .mint(\"1\", policyId, tokenName)\n .mintingScript(paramScript)\n .mintRedeemerValue(mConStr0([]))\n .txOut(this.oracleAddress, [{ unit: policyId, quantity: \"1\" }])\n .txOutInlineDatumValue(\n mConStr0([\n 0,\n lovelacePrice,\n mPubKeyAddress(pubKeyHash, stakeCredentialHash),\n ]),\n )\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n\n this.paramUtxo = paramUtxo.input;\n\n return { tx: txHex, paramUtxo: paramUtxo.input };\n };\n\n /**\n * Mint NFT token with an automatically incremented index, which increases by one for each newly minted NFT.\n * @param assetMetadata - Asset metadata\n * @returns - Transaction hex\n *\n * @example\n * ```typescript\n * const assetMetadata = {\n * ...demoAssetMetadata,\n * name: `Mesh Token ${oracleData.nftIndex}`,\n * };\n * const tx = await contract.mintPlutusNFT(assetMetadata);\n * ```\n */\n mintPlutusNFT = async (assetMetadata?: AssetMetadata) => {\n const { utxos, collateral, walletAddress } =\n await this.getWalletInfoForTx();\n if (utxos?.length <= 0) {\n throw new Error(\"No UTxOs found\");\n }\n\n const {\n nftIndex,\n policyId,\n lovelacePrice,\n oracleUtxo,\n oracleNftPolicyId,\n feeCollectorAddress,\n feeCollectorAddressObj,\n } = await this.getOracleData();\n\n const tokenName = `${this.collectionName} (${nftIndex})`;\n const tokenNameHex = stringToHex(tokenName);\n\n const updatedOracleDatum: OracleDatum = conStr0([\n integer((nftIndex as number) + 1),\n integer(lovelacePrice),\n feeCollectorAddressObj,\n ]);\n\n const tx = this.mesh\n .spendingPlutusScriptV3()\n .txIn(\n oracleUtxo.input.txHash,\n oracleUtxo.input.outputIndex,\n oracleUtxo.output.amount,\n oracleUtxo.output.address,\n )\n .txInRedeemerValue(mConStr0([]))\n .txInScript(this.getOracleCbor())\n .txInInlineDatumPresent()\n .txOut(this.oracleAddress, [{ unit: oracleNftPolicyId, quantity: \"1\" }])\n .txOutInlineDatumValue(updatedOracleDatum, \"JSON\")\n .mintPlutusScriptV3()\n .mint(\"1\", policyId, tokenNameHex)\n .mintingScript(this.getNFTCbor());\n\n if (assetMetadata) {\n const metadata = { [policyId]: { [tokenName]: { ...assetMetadata } } };\n tx.metadataValue(721, metadata);\n }\n\n tx.mintRedeemerValue(mConStr0([]))\n .txOut(feeCollectorAddress, [\n { unit: \"lovelace\", quantity: lovelacePrice.toString() },\n ])\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos);\n\n const txHex = await tx.complete();\n return txHex;\n };\n\n /**\n * Get the current oracle data.\n *\n * @returns - Oracle data\n *\n * @example\n * ```typescript\n * const oracleData = await contract.getOracleData();\n * ```\n */\n getOracleData = async () => {\n const oracleNftPolicyId = resolveScriptHash(this.getOracleNFTCbor(), \"V3\");\n const oracleUtxo = (\n await this.getAddressUtxosWithToken(this.oracleAddress, oracleNftPolicyId)\n )[0]!;\n const oracleDatum: OracleDatum = parseDatumCbor(\n oracleUtxo!.output.plutusData!,\n );\n\n const nftIndex = oracleDatum.fields[0].int;\n const lovelacePrice = oracleDatum.fields[1].int;\n const feeCollectorAddressObj = oracleDatum.fields[2];\n const feeCollectorAddress = serializeAddressObj(\n feeCollectorAddressObj,\n this.networkId,\n );\n\n const policyId = resolveScriptHash(this.getNFTCbor(), \"V3\");\n\n return {\n nftIndex,\n policyId,\n lovelacePrice,\n oracleUtxo,\n oracleNftPolicyId,\n feeCollectorAddress,\n feeCollectorAddressObj,\n };\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/plutus-nft\",\n \"description\": \"Aiken contracts for project 'meshjs/plutus-nft'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.4+79d0e45\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"oracle.oracle.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/oracle~1OracleDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/oracle~1OracleRedeemer\"\n }\n },\n \"compiledCode\": \"590879010100323232323232322533300232323232325332330083001300937540042646464646464a66601c60060022a66602260206ea8024540085854ccc038c01c00454ccc044c040dd50048a8010b0b18071baa008132323232323232533301330083014375401226464646464646464a666036602060386ea80044c8c8c8c8c8c94ccc090c09c0084c8c8c8c8c8c8c94ccc0a0c074c0a4dd50010a9998158018008a99981598170018a9998158020008a9998159817002099191919299981619b8733230010012253330310011480004cdc024004660040046068002601e6eacc040c0b8dd5002240082a6660580042002294052819191980080098082999816981100b8a5eb7bdb1804c8c8cc0040052f5bded8c044a66606600226606866ec13001014000374c00697adef6c60132323232533303433720910100002133038337609801014000374c00e00a2a666068602c00426607066ec13001014000374c00e00626607066ec0dd48011ba6001330060060033756606a0066eb8c0cc008c0dc008c0d4004c8cc0040052f5bded8c044a66606400226606666ec13001014000375003297adef6c60132323232533303333720910100002133037337609801014000375003a00a2a666066602a00426606e66ec13001014000375003a00626606e66ec0dd48011ba800133006006003375a60680066eb8c0c8008c0d8008c0d0004894ccc0c400452889929998179919b89375a600e002664464a666066605860686ea8004520001375a6070606a6ea8004c94ccc0ccc0b0c0d0dd50008a6103d87a80001323300100137566072606c6ea8008894ccc0e0004530103d87a80001323232325333039337220100042a66607266e3c0200084c080cc0f4dd4000a5eb80530103d87a8000133006006003375a60740066eb8c0e0008c0f0008c0e8004c8cc004004020894ccc0dc0045300103d87a80001323232325333038337220100042a66607066e3c0200084c07ccc0f0dd3000a5eb80530103d87a8000133006006003375660720066eb8c0dc008c0ec008c0e4004dd7180c0009bae3014001375860680042660060060022940c0d0004c8cc004004074894ccc0c000452f5bded8c026644a66605e66ebcc05cc0c4dd500100c0991998008008011bab301430323754006444a66606a004200226466600800860720066644646600200200a44a66607400226607666ec0dd48021ba60034bd6f7b630099191919299981d99b9000800213303f337606ea4020dd30038028a99981d99b8f008002132533303c3031303d375400226608066ec0dd48049820981f1baa001004100432533303c533303f00114a22940530103d87a80001302333040374c00297ae03233300100100800222253330410021001132333004004304500333223233001001005225333046001133047337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc11ccdc800400109982599bb037520106ea001c01454ccc11ccdc78040010992999824181e98249baa00113304c337606ea4024c134c128dd50008020802192999824181e8008a60103d87a80001302f3304c375000297ae03370000e00226609666ec0dd48011ba800133006006003375a60900066eb8c118008c128008c120004dd718200009bad3041001304300213303f337606ea4008dd3000998030030019bab303c003375c6074004607c00460780026eb8c0d0004dd5981a800981b8010800981900099801001181980099baf3001302c375400466e9520043302e30113302e375066e0005920023302e37500286605c02697ae04bd70118179818181800098168020008008008992999814181098149baa0021533302b0030011533302b302e003132533302932533302d00114a02a66605a60600022646464a66605a66e3cdd718190018060a9998169807800899b87002480045280a50375c606260640046eb4c0c0c0c4c0c4004dd618178008a50300c018100114a064646600200203044a66605c00229404c94ccc0b0cdc79bae303100200414a2266006006002606200264a666052604460546ea80044dd7181718159baa0011375c605c60566ea8004c040c0a8dd50088008008a50302b0033758605460560046eb0c0a4c0a8c0a8004c8c8cc0a4080cc0a4dd39980100c1299981319baf300e30283754601460506ea80040104cc008c024dd5980518141baa300a30283754002466e3cdd718078008030a5033029374e6600402c4a66604c66ebcc038c0a0dd500080209980118049bab300a30283754002466e3cdd718078008030a504bd701119198008008019129998158008a50132533302930043758605c00429444cc00c00c004c0b800488c8cc00400400c894ccc0a800452f5c026464a666052600a00426605a00466008008002266008008002605c0046058002601460486ea8c018c090dd50039bae3026001163758604a002646600200260066eacc010c088dd5180218111baa00522533302400114bd7009919299981199981198029bae300b0024a09444cc09cdd38011980200200089980200200098140011bac3026001371e911002323300100100222533302300114bd7009919991119198008008019129998148008801899198159ba73302b375200c66056605000266056605200297ae033003003302d002302b001375c60440026eacc08c004cc00c00cc09c008c0940048c088c08c004c080c074dd50008b191980080080711299980f8008a6103d87a800013232533301e3375e600c60406ea80080544c014cc0880092f5c0266008008002604600460420026e9520002301e001301c301d002375a603600260360046eb4c064004c054dd5180c180a9baa009163758602e60306030603060300046eacc058004c058c058008dd6180a000980a180a0011bac3012001300e37540126e1d2000300f3010002300e001300a37540046e1d200216300b300c002300a001300a00230080013004375400229309b2b2b9a5573aaae7955cfaba05742ae881\",\n \"hash\": \"975ec6fe46e63846aad882fecd8e1c7c4a41d7ed3a8aae463482935e\"\n },\n {\n \"title\": \"oracle.oracle.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"compiledCode\": \"590879010100323232323232322533300232323232325332330083001300937540042646464646464a66601c60060022a66602260206ea8024540085854ccc038c01c00454ccc044c040dd50048a8010b0b18071baa008132323232323232533301330083014375401226464646464646464a666036602060386ea80044c8c8c8c8c8c94ccc090c09c0084c8c8c8c8c8c8c94ccc0a0c074c0a4dd50010a9998158018008a99981598170018a9998158020008a9998159817002099191919299981619b8733230010012253330310011480004cdc024004660040046068002601e6eacc040c0b8dd5002240082a6660580042002294052819191980080098082999816981100b8a5eb7bdb1804c8c8cc0040052f5bded8c044a66606600226606866ec13001014000374c00697adef6c60132323232533303433720910100002133038337609801014000374c00e00a2a666068602c00426607066ec13001014000374c00e00626607066ec0dd48011ba6001330060060033756606a0066eb8c0cc008c0dc008c0d4004c8cc0040052f5bded8c044a66606400226606666ec13001014000375003297adef6c60132323232533303333720910100002133037337609801014000375003a00a2a666066602a00426606e66ec13001014000375003a00626606e66ec0dd48011ba800133006006003375a60680066eb8c0c8008c0d8008c0d0004894ccc0c400452889929998179919b89375a600e002664464a666066605860686ea8004520001375a6070606a6ea8004c94ccc0ccc0b0c0d0dd50008a6103d87a80001323300100137566072606c6ea8008894ccc0e0004530103d87a80001323232325333039337220100042a66607266e3c0200084c080cc0f4dd4000a5eb80530103d87a8000133006006003375a60740066eb8c0e0008c0f0008c0e8004c8cc004004020894ccc0dc0045300103d87a80001323232325333038337220100042a66607066e3c0200084c07ccc0f0dd3000a5eb80530103d87a8000133006006003375660720066eb8c0dc008c0ec008c0e4004dd7180c0009bae3014001375860680042660060060022940c0d0004c8cc004004074894ccc0c000452f5bded8c026644a66605e66ebcc05cc0c4dd500100c0991998008008011bab301430323754006444a66606a004200226466600800860720066644646600200200a44a66607400226607666ec0dd48021ba60034bd6f7b630099191919299981d99b9000800213303f337606ea4020dd30038028a99981d99b8f008002132533303c3031303d375400226608066ec0dd48049820981f1baa001004100432533303c533303f00114a22940530103d87a80001302333040374c00297ae03233300100100800222253330410021001132333004004304500333223233001001005225333046001133047337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc11ccdc800400109982599bb037520106ea001c01454ccc11ccdc78040010992999824181e98249baa00113304c337606ea4024c134c128dd50008020802192999824181e8008a60103d87a80001302f3304c375000297ae03370000e00226609666ec0dd48011ba800133006006003375a60900066eb8c118008c128008c120004dd718200009bad3041001304300213303f337606ea4008dd3000998030030019bab303c003375c6074004607c00460780026eb8c0d0004dd5981a800981b8010800981900099801001181980099baf3001302c375400466e9520043302e30113302e375066e0005920023302e37500286605c02697ae04bd70118179818181800098168020008008008992999814181098149baa0021533302b0030011533302b302e003132533302932533302d00114a02a66605a60600022646464a66605a66e3cdd718190018060a9998169807800899b87002480045280a50375c606260640046eb4c0c0c0c4c0c4004dd618178008a50300c018100114a064646600200203044a66605c00229404c94ccc0b0cdc79bae303100200414a2266006006002606200264a666052604460546ea80044dd7181718159baa0011375c605c60566ea8004c040c0a8dd50088008008a50302b0033758605460560046eb0c0a4c0a8c0a8004c8c8cc0a4080cc0a4dd39980100c1299981319baf300e30283754601460506ea80040104cc008c024dd5980518141baa300a30283754002466e3cdd718078008030a5033029374e6600402c4a66604c66ebcc038c0a0dd500080209980118049bab300a30283754002466e3cdd718078008030a504bd701119198008008019129998158008a50132533302930043758605c00429444cc00c00c004c0b800488c8cc00400400c894ccc0a800452f5c026464a666052600a00426605a00466008008002266008008002605c0046058002601460486ea8c018c090dd50039bae3026001163758604a002646600200260066eacc010c088dd5180218111baa00522533302400114bd7009919299981199981198029bae300b0024a09444cc09cdd38011980200200089980200200098140011bac3026001371e911002323300100100222533302300114bd7009919991119198008008019129998148008801899198159ba73302b375200c66056605000266056605200297ae033003003302d002302b001375c60440026eacc08c004cc00c00cc09c008c0940048c088c08c004c080c074dd50008b191980080080711299980f8008a6103d87a800013232533301e3375e600c60406ea80080544c014cc0880092f5c0266008008002604600460420026e9520002301e001301c301d002375a603600260360046eb4c064004c054dd5180c180a9baa009163758602e60306030603060300046eacc058004c058c058008dd6180a000980a180a0011bac3012001300e37540126e1d2000300f3010002300e001300a37540046e1d200216300b300c002300a001300a00230080013004375400229309b2b2b9a5573aaae7955cfaba05742ae881\",\n \"hash\": \"975ec6fe46e63846aad882fecd8e1c7c4a41d7ed3a8aae463482935e\"\n },\n {\n \"title\": \"oracle_nft.oracle_nft.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/oracle_nft~1MintPolarity\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"59019e0101003232323232323222533300332323232325332330093001300a37540042646464a66601860080022a66601e601c6ea8018540085854ccc030cdc3a40040022a66601e601c6ea8018540085858c030dd50028992999805980198061baa0051533300b3003300c375464660020026eb0c044c038dd50041129998080008a60103d87a800013232533300f3375e01c600a60226ea80084cdd2a40006602600497ae01330040040013014002301200114a229404c8cc004004c8cc004004dd59809180998099809980998079baa00922533301100114bd70099199911191980080080191299980b80088018991980c9ba733019375200c66032602c00266032602e00297ae033003003301b0023019001375c60200026eacc044004cc00c00cc054008c04c004894ccc040004528899299980719299980799b8f375c600a00200c266e20dd6980a180a980a800a40002944dd618098010998018018008a50301300123010001375c601c60166ea8008dc3a40002c6018601a004601600260160046012002600a6ea8004526136565734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"55ada3bfe32c4ff89d50cfdd86956e013a011fa28279112e424e596a\"\n },\n {\n \"title\": \"oracle_nft.oracle_nft.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n }\n ],\n \"compiledCode\": \"59019e0101003232323232323222533300332323232325332330093001300a37540042646464a66601860080022a66601e601c6ea8018540085854ccc030cdc3a40040022a66601e601c6ea8018540085858c030dd50028992999805980198061baa0051533300b3003300c375464660020026eb0c044c038dd50041129998080008a60103d87a800013232533300f3375e01c600a60226ea80084cdd2a40006602600497ae01330040040013014002301200114a229404c8cc004004c8cc004004dd59809180998099809980998079baa00922533301100114bd70099199911191980080080191299980b80088018991980c9ba733019375200c66032602c00266032602e00297ae033003003301b0023019001375c60200026eacc044004cc00c00cc054008c04c004894ccc040004528899299980719299980799b8f375c600a00200c266e20dd6980a180a980a800a40002944dd618098010998018018008a50301300123010001375c601c60166ea8008dc3a40002c6018601a004601600260160046012002600a6ea8004526136565734aae7555cf2ab9f5740ae855d101\",\n \"hash\": \"55ada3bfe32c4ff89d50cfdd86956e013a011fa28279112e424e596a\"\n },\n {\n \"title\": \"plutus_nft.plutus_nft.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/plutus_nft~1MintPolarity\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"collection_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5904250101003232323232323223223225333006323232323253323300c3001300d3754004264646464a666020600a0022a66602660246ea801c540085854ccc040c00c00454ccc04cc048dd50038a8010b0b18081baa0061323232533301130063012375401026464646464a6660326038004264a66602e66e1d200430183754002264a666030601a60326ea80044c8c8c8c8c8c94ccc084c0900084c94ccc07cc050c080dd500109919191929998131814801099802801899192999812980d0008991929998151816801099192999814980f00089919299981718188010998068008a8020b181780098159baa00315333029301c0011323232323232533303230350021500816375a606600260660046eb4c0c4004c0c4008dd6981780098159baa00316302937540042a0082c6056002604e6ea800c54ccc094c06000454ccc0a0c09cdd50018a8010b0b18129baa00213232533302800114a02a66605060560022646464a66605066e3cdd7181680180e0a99981419b8f0010051301b00214a02940dd7181618168011bad302b302c302c001375860540022940c054048c8c8cdc5000a44101290033714002646466600200201a66600400401a90011112999814180d800899b8b3370000490302450013371666e00cdc1801000a40c066600600666e18008004cdc1800a4028444a66604e66e2000920141001133300300333706004900a19b8200148050cdc5010a4410220280016302700130270023025001302137540042c4464a666042602c00226464a66604c60520042a0082c6eb8c09c004c08cdd50018a999810980a00089919299981318148010a8020b1bae3027001302337540062c60426ea800858c088004c088008dd6981000098100011bad301e001301a37540022c603860326ea800458c020c060dd51801980c1baa00116301a00132330010013758603400844a666032002297ae01323253330183233001001300a3756600c60366ea8c018c06cdd500191299980e8008a50132533301b3371e6eb8c02cdd6181000100b8a51133003003001302000113301c00233004004001133004004001301d002301b00123019301a0013756602e603060306030603000260266ea80284c8cc004004c00cdd5980b980c180c180c180c180a1baa00b22533301600114a2264a66602864a66602a66e3cdd71802800804899b88375a600e00290000a51375860320042660060060022940c0640048c0580048c8cc004004008894ccc05400452f5c0264666444646600200200644a66603600220062646603a6e9ccc074dd48031980e980d0009980e980d800a5eb80cc00c00cc07c008c074004dd7180a0009bab301500133003003301900230170012301430153015001370e90011bae3011300e37540046e1d200016300f3010002300e001300e002300c0013008375400229309b2b1bae001375c002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"227ea4150bb7c090b84178f7ff40bcaad280298db1611b6911252f33\"\n },\n {\n \"title\": \"plutus_nft.plutus_nft.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"collection_name\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n },\n {\n \"title\": \"oracle_nft\",\n \"schema\": {\n \"$ref\": \"#/definitions/PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5904250101003232323232323223223225333006323232323253323300c3001300d3754004264646464a666020600a0022a66602660246ea801c540085854ccc040c00c00454ccc04cc048dd50038a8010b0b18081baa0061323232533301130063012375401026464646464a6660326038004264a66602e66e1d200430183754002264a666030601a60326ea80044c8c8c8c8c8c94ccc084c0900084c94ccc07cc050c080dd500109919191929998131814801099802801899192999812980d0008991929998151816801099192999814980f00089919299981718188010998068008a8020b181780098159baa00315333029301c0011323232323232533303230350021500816375a606600260660046eb4c0c4004c0c4008dd6981780098159baa00316302937540042a0082c6056002604e6ea800c54ccc094c06000454ccc0a0c09cdd50018a8010b0b18129baa00213232533302800114a02a66605060560022646464a66605066e3cdd7181680180e0a99981419b8f0010051301b00214a02940dd7181618168011bad302b302c302c001375860540022940c054048c8c8cdc5000a44101290033714002646466600200201a66600400401a90011112999814180d800899b8b3370000490302450013371666e00cdc1801000a40c066600600666e18008004cdc1800a4028444a66604e66e2000920141001133300300333706004900a19b8200148050cdc5010a4410220280016302700130270023025001302137540042c4464a666042602c00226464a66604c60520042a0082c6eb8c09c004c08cdd50018a999810980a00089919299981318148010a8020b1bae3027001302337540062c60426ea800858c088004c088008dd6981000098100011bad301e001301a37540022c603860326ea800458c020c060dd51801980c1baa00116301a00132330010013758603400844a666032002297ae01323253330183233001001300a3756600c60366ea8c018c06cdd500191299980e8008a50132533301b3371e6eb8c02cdd6181000100b8a51133003003001302000113301c00233004004001133004004001301d002301b00123019301a0013756602e603060306030603000260266ea80284c8cc004004c00cdd5980b980c180c180c180c180a1baa00b22533301600114a2264a66602864a66602a66e3cdd71802800804899b88375a600e00290000a51375860320042660060060022940c0640048c0580048c8cc004004008894ccc05400452f5c0264666444646600200200644a66603600220062646603a6e9ccc074dd48031980e980d0009980e980d800a5eb80cc00c00cc07c008c074004dd7180a0009bab301500133003003301900230170012301430153015001370e90011bae3011300e37540046e1d200016300f3010002300e001300e002300c0013008375400229309b2b1bae001375c002ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"227ea4150bb7c090b84178f7ff40bcaad280298db1611b6911252f33\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"cardano/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"oracle/OracleDatum\": {\n \"title\": \"OracleDatum\",\n \"anyOf\": [\n {\n \"title\": \"OracleDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"count\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"lovelace_price\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"fee_address\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n }\n ]\n }\n ]\n },\n \"oracle/OracleRedeemer\": {\n \"title\": \"OracleRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"MintPlutusNFT\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"StopOracle\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"oracle_nft/MintPolarity\": {\n \"title\": \"MintPolarity\",\n \"anyOf\": [\n {\n \"title\": \"RMint\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"RBurn\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"plutus_nft/MintPolarity\": {\n \"title\": \"MintPolarity\",\n \"anyOf\": [\n {\n \"title\": \"RMint\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"RBurn\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import {\n Asset,\n conStr0,\n ConStr0,\n mConStr0,\n mConStr1,\n MeshValue,\n pubKeyAddress,\n PubKeyAddress,\n UTxO,\n value,\n Value,\n} from \"@meshsdk/common\";\nimport {\n deserializeAddress,\n deserializeDatum,\n serializeAddressObj,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport type SwapDatum = ConStr0<[PubKeyAddress, Value, Value]>;\n\nexport class MeshSwapContract extends MeshTxInitiator {\n scriptCbor: string;\n scriptAddress: string;\n\n constructor(inputs: MeshTxInitiatorInput) {\n super(inputs);\n this.scriptCbor = this.getScriptCbor();\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = () => {\n switch (this.version) {\n case 2:\n return applyParamsToScript(blueprintV2.validators[0]!.compiledCode, []);\n default:\n return applyParamsToScript(blueprintV1.validators[0]!.compiledCode, []);\n }\n };\n\n initiateSwap = async (\n toProvide: Asset[],\n toReceive: Asset[],\n ): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const { pubKeyHash, stakeCredentialHash } =\n deserializeAddress(walletAddress);\n const swapDatum: SwapDatum = conStr0([\n pubKeyAddress(pubKeyHash, stakeCredentialHash),\n value(toProvide),\n value(toReceive),\n ]);\n\n await this.mesh\n .txOut(this.scriptAddress, toProvide)\n .txOutInlineDatumValue(swapDatum, \"JSON\")\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n\n return this.mesh.txHex;\n };\n\n acceptSwap = async (swapUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const inlineDatum = deserializeDatum<SwapDatum>(\n swapUtxo.output.plutusData!,\n );\n const initiatorAddress = serializeAddressObj(\n inlineDatum.fields[0],\n this.networkId,\n );\n const initiatorToReceive = inlineDatum.fields[2];\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n swapUtxo.input.txHash,\n swapUtxo.input.outputIndex,\n swapUtxo.output.amount,\n swapUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr1([]))\n .txInScript(this.scriptCbor)\n .txOut(\n initiatorAddress,\n MeshValue.fromValue(initiatorToReceive).toAssets(),\n )\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n cancelSwap = async (swapUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const inlineDatum = deserializeDatum<SwapDatum>(\n swapUtxo.output.plutusData!,\n );\n const initiatorAddress = serializeAddressObj(\n inlineDatum.fields[0],\n this.networkId,\n );\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n swapUtxo.input.txHash,\n swapUtxo.input.outputIndex,\n swapUtxo.output.amount,\n swapUtxo.output.address,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(mConStr0([]))\n .txInScript(this.scriptCbor)\n .changeAddress(walletAddress)\n .txInCollateral(\n collateral.input.txHash,\n collateral.input.outputIndex,\n collateral.output.amount,\n collateral.output.address,\n )\n .requiredSignerHash(deserializeAddress(initiatorAddress).pubKeyHash)\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash, this.scriptCbor);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/swap\",\n \"description\": \"Aiken contracts for project 'meshjs/swap'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"swap.swap\",\n \"datum\": {\n \"title\": \"datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/swap~1SwapDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/swap~1SwapRedeemer\"\n }\n },\n \"compiledCode\": \"590827010000323232323232322323232232253330083232533300a3007300b375400226464a6466601a6014601c6ea80204c94ccc038c030c03cdd5000899191919191919191919299980c299980d8048a501533301b301e00914a2294054ccc06000440085280a50330043330030084bd6f7b63011299980c99baf300e301b3754602260366ea800802c4cc010004dd59808980d9baa3011301b37540042002600c6eacc03cc064dd500b19801999119980200125eb7bdb180894ccc068cdd79807980e1baa0020031330050013756602460386ea80084004dd61802180c1baa300b3018375401e601660306ea8054c014dd59802180c1baa0152232333001001003002222533301d00210011323330040043021003333300b002375c60380026eacc074004888c94ccc07d4ccc0880045288a5014c103d87a80001301333023374c00297ae0323330010010030022225333024002100113233300400430280033322323300100100522533302900113302a337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0a8cdc800400109981719bb037520106ea001c01454ccc0a8cdc78040010992999815981498161baa00113302f337606ea4024c0c0c0b4dd5000802080219299981598148008a60103d87a80001301f3302f375000297ae03370000e00226605c66ec0dd48011ba800133006006003375a60560066eb8c0a4008c0b4008c0ac004dd718118009bad30240013026002301f002222323300100100422533301c0011004133003301e00133002002301f001223233001001323300100100322533301b00114bd7009919991119198008008019129998108008801899198119ba733023375200c66046604000266046604200297ae03300300330250023023001375c60340026eacc06c004cc00c00cc07c008c074004894ccc068004528899299980c1919b89375a600e002664464a6660386032603a6ea8004520001375a6042603c6ea8004c94ccc070c064c074dd50008a6103d87a80001323300100137566044603e6ea8008894ccc084004530103d87a80001323232325333022337220100042a66604466e3c0200084c058cc098dd4000a5eb80530103d87a8000133006006003375a60460066eb8c084008c094008c08c004c8cc004004024894ccc0800045300103d87a80001323232325333021337220100042a66604266e3c0200084c054cc094dd3000a5eb80530103d87a8000133006006003375660440066eb8c080008c090008c088004dd718070009bae30110013758603a0042660060060022940c0740048c060c064c0640048c8cc004004008894ccc05c00452f5bded8c02664464646666010006004002444c646400464646600200200644a66603c002293099299980f8008a99980e18021bad301e30210021498584c8c8c8c94ccc080cdc81bae3021004375c60420062a666040601000226600e00e660480060042c2c6eb4c08400cc09000cc088008c084008c0840048ccc064c05c00528251375660320066eb8c05c008c064004cc008008c0680048888c8cc004004014894ccc0640044cc068cdd81ba9005374c00897adef6c60132323232533301a3372001200426603c66ec0dd48049ba60080051533301a3371e012004264a666036603260386ea80044cc07ccdd81ba900a3020301d3754002008200866600e01201000226603c66ec0dd48011ba600133006006003375660360066eb8c064008c074008c06c004c8cc004004dd6180298091baa30053012375401244a666028002297ae01323253330133375e6010602a6ea8c02cc054dd500100289980b80119802002000899802002000980c001180b000980198081baa300630103754602660206ea800458c8cc004004dd6180198081baa30033010375400e44a666024002298103d87a80001323253330113375e600c60266ea800801c4c014cc0540092f5c0266008008002602c0046028002264a66601c6018601e6ea80044cc88c8cc00400400c894ccc054004528099299980999b8f375c603000400829444cc00c00c004c060004dd61809980a180a180a180a180a180a180a180a18081baa30033010375400e6eb8c04cc040dd50008b192999807180618079baa001130023301230133010375400297ae014c0103d87a80003002300f37546004601e6ea8030dd2a400046022002601e60186ea8004528180098059baa0022300e300f00114984d958c94ccc01cc01400454ccc028c024dd50010a4c2c2a66600e60080022a66601460126ea80085261616300737540026464a66600c6008600e6ea80144c8c8c8c8c8c94ccc03cc0480084c8c8c926330090032323300b375660240044646eb4c050008dd718090009bae3010001330080042323300a375660220044646eb4c04c008dd718088009bae300f001533300c300a300d375400a264646464a666026602c0042646493192999809180800089919299980b980d00109924c64a66602a602600226464a666034603a0042649318098008b180d800980b9baa0021533301530120011323232323232533301e3021002149858dd6980f800980f8011bad301d001301d002375a6036002602e6ea800858c054dd50008b180c000980a1baa00315333012300f00115333015301437540062930b0b18091baa002300c00316301400130140023012001300e375400a2c2c6eacc040004c040008dd598070009807001180600098041baa0051622323300100100322533300c00114984c8cc00c00cc040008c00cc0380048c94ccc018c0100044c8c94ccc02cc03800852616375c601800260106ea800854ccc018c00c0044c8c94ccc02cc03800852616375c601800260106ea800858c018dd50009b8748008dc3a4000ae6955ceaab9e5573eae815d0aba201\",\n \"hash\": \"5db0485a71b88eb31dec330bcf994509ea24b709498f90f9b1863902\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"List$Pair$ByteArray_Int\": {\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/ByteArray\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"List$Pair$ByteArray_List$Pair$ByteArray_Int\": {\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/ByteArray\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/List$Pair$ByteArray_Int\"\n }\n },\n \"Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Optional\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"aiken/transaction/credential/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://cips.cardano.org/cip/CIP-19).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKeyCredential\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n },\n {\n \"title\": \"ScriptCredential\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential\": {\n \"title\": \"Referenced\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"swap/SwapDatum\": {\n \"title\": \"SwapDatum\",\n \"anyOf\": [\n {\n \"title\": \"SwapDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/aiken~1transaction~1credential~1Address\"\n },\n {\n \"title\": \"to_provide\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n },\n {\n \"title\": \"to_receive\",\n \"$ref\": \"#/definitions/List$Pair$ByteArray_List$Pair$ByteArray_Int\"\n }\n ]\n }\n ]\n },\n \"swap/SwapRedeemer\": {\n \"title\": \"SwapRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"Cancel\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Swap\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/swap\",\n \"description\": \"Aiken contracts for project 'meshjs/swap'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"swap.swap.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/swap~1SwapDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/swap~1SwapRedeemer\"\n }\n },\n \"compiledCode\": \"59069e010100323232323232322533300232323232325332330083001300937540042646464646464a66601c60060022a66602260206ea8024540085854ccc038c01c00454ccc044c040dd50048a8010b0b18071baa0081533300c3001300d375400426464a6466601e601060206ea80284c94ccc040c014c044dd500089919191919191919191919299980da99980f0048a501533301e302100914a2294054ccc06c00440085280a50330043330030084bd6f7b63011299980e19baf300f301e37546018603c6ea800802c4cc010004dd59806180f1baa300c301e37540042002600c6eacc028c070dd500719801999119980200125eb7bdb180894ccc074cdd79808180f9baa0020031330050013756601a603e6ea80084004dd61802180d9baa016300c301b375401a600a6eacc010c06cdd5006911919980080080180111129998100010800899199802002181200199998058011bae301f0013756604000244464a666044a66604a00229445280a60103d87a80001301433026374c00297ae03233300100100300222253330270021001132333004004302b0033322323300100100522533302c00113302d337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0b4cdc800400109981899bb037520106ea001c01454ccc0b4cdc78040010992999817181198179baa001133032337606ea4024c0ccc0c0dd5000802080219299981718118008a60103d87a80001302033032375000297ae03370000e00226606266ec0dd48011ba800133006006003375a605c0066eb8c0b0008c0c0008c0b8004dd718130009bad302700130290023022002222323300100100422533301f00110041330033021001330020023022001223233001001323300100100322533301e00114bd7009919991119198008008019129998120008801899198131ba733026375200c6604c60460026604c604800297ae03300300330280023026001375c603a0026eacc078004cc00c00cc088008c080004894ccc074004528899299980d9919b89375a600e002664464a66603e603060406ea8004520001375a604860426ea8004c94ccc07cc060c080dd50008a6103d87a8000132330010013756604a60446ea8008894ccc090004530103d87a80001323232325333025337220100042a66604a66e3c0200084c05ccc0a4dd4000a5eb80530103d87a8000133006006003375a604c0066eb8c090008c0a0008c098004c8cc004004024894ccc08c0045300103d87a80001323232325333024337220100042a66604866e3c0200084c058cc0a0dd3000a5eb80530103d87a80001330060060033756604a0066eb8c08c008c09c008c094004dd718078009bae300c001375860400042660060060022940c0800048c06cc070c0700048c8cc004004008894ccc06800452f5bded8c02664464646666010006004002444c646400464646600200200644a66604200229309929998110008a99980f98021bad302130240021498584c8c8c8c94ccc08ccdc81bae3024004375c60480062a666046601000226600e00e6604e0060042c2c6eb4c09000cc09c00cc094008c090008c0900048ccc070c04400528251375660380066eb8c068008c070004cc008008c0740048888c8cc004004014894ccc0700044cc074cdd81ba9005374c00897adef6c60132323232533301d3372001200426604266ec0dd48049ba60080051533301d3371e012004264a66603c6026603e6ea80044cc088cdd81ba900a302330203754002008200866600e01201000226604266ec0dd48011ba6001330060060033756603c0066eb8c070008c080008c078004c8cc004004dd61803180a9baa01022533301700114bd7009919299980b19baf300930183754600c60306ea80080144cc068008cc0100100044cc010010004c06c008c064004c010c04cdd5180098099baa3016301337540044602c602e0022c64660020026eb0c00cc048dd500691299980a0008a6103d87a80001323253330133375e600c602a6ea80080284c014cc05c0092f5c02660080080026030004602c002264a666020600a60226ea80044cc88c8cc00400400c894ccc05c004528099299980a99b8f375c603400400829444cc00c00c004c068004dd6180a980b180b180b180b180b180b180b180b18091baa00d375c602a60246ea800458c94ccc040c014c044dd5000898011980a180a98091baa0014bd700a60103d87a8000300230113754600460226ea800cdd2a4000460260026022601c6ea800858dc3a4000601e6020004601c00260146ea8008dc3a40042c6016601800460140026014004601000260086ea8004526136565734aae7555cf2ab9f5740ae855d11\",\n \"hash\": \"cbebe37fa901785755124c23e59812f3aa59b8539096a322727a5003\"\n },\n {\n \"title\": \"swap.swap.else\",\n \"compiledCode\": \"59069e010100323232323232322533300232323232325332330083001300937540042646464646464a66601c60060022a66602260206ea8024540085854ccc038c01c00454ccc044c040dd50048a8010b0b18071baa0081533300c3001300d375400426464a6466601e601060206ea80284c94ccc040c014c044dd500089919191919191919191919299980da99980f0048a501533301e302100914a2294054ccc06c00440085280a50330043330030084bd6f7b63011299980e19baf300f301e37546018603c6ea800802c4cc010004dd59806180f1baa300c301e37540042002600c6eacc028c070dd500719801999119980200125eb7bdb180894ccc074cdd79808180f9baa0020031330050013756601a603e6ea80084004dd61802180d9baa016300c301b375401a600a6eacc010c06cdd5006911919980080080180111129998100010800899199802002181200199998058011bae301f0013756604000244464a666044a66604a00229445280a60103d87a80001301433026374c00297ae03233300100100300222253330270021001132333004004302b0033322323300100100522533302c00113302d337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc0b4cdc800400109981899bb037520106ea001c01454ccc0b4cdc78040010992999817181198179baa001133032337606ea4024c0ccc0c0dd5000802080219299981718118008a60103d87a80001302033032375000297ae03370000e00226606266ec0dd48011ba800133006006003375a605c0066eb8c0b0008c0c0008c0b8004dd718130009bad302700130290023022002222323300100100422533301f00110041330033021001330020023022001223233001001323300100100322533301e00114bd7009919991119198008008019129998120008801899198131ba733026375200c6604c60460026604c604800297ae03300300330280023026001375c603a0026eacc078004cc00c00cc088008c080004894ccc074004528899299980d9919b89375a600e002664464a66603e603060406ea8004520001375a604860426ea8004c94ccc07cc060c080dd50008a6103d87a8000132330010013756604a60446ea8008894ccc090004530103d87a80001323232325333025337220100042a66604a66e3c0200084c05ccc0a4dd4000a5eb80530103d87a8000133006006003375a604c0066eb8c090008c0a0008c098004c8cc004004024894ccc08c0045300103d87a80001323232325333024337220100042a66604866e3c0200084c058cc0a0dd3000a5eb80530103d87a80001330060060033756604a0066eb8c08c008c09c008c094004dd718078009bae300c001375860400042660060060022940c0800048c06cc070c0700048c8cc004004008894ccc06800452f5bded8c02664464646666010006004002444c646400464646600200200644a66604200229309929998110008a99980f98021bad302130240021498584c8c8c8c94ccc08ccdc81bae3024004375c60480062a666046601000226600e00e6604e0060042c2c6eb4c09000cc09c00cc094008c090008c0900048ccc070c04400528251375660380066eb8c068008c070004cc008008c0740048888c8cc004004014894ccc0700044cc074cdd81ba9005374c00897adef6c60132323232533301d3372001200426604266ec0dd48049ba60080051533301d3371e012004264a66603c6026603e6ea80044cc088cdd81ba900a302330203754002008200866600e01201000226604266ec0dd48011ba6001330060060033756603c0066eb8c070008c080008c078004c8cc004004dd61803180a9baa01022533301700114bd7009919299980b19baf300930183754600c60306ea80080144cc068008cc0100100044cc010010004c06c008c064004c010c04cdd5180098099baa3016301337540044602c602e0022c64660020026eb0c00cc048dd500691299980a0008a6103d87a80001323253330133375e600c602a6ea80080284c014cc05c0092f5c02660080080026030004602c002264a666020600a60226ea80044cc88c8cc00400400c894ccc05c004528099299980a99b8f375c603400400829444cc00c00c004c068004dd6180a980b180b180b180b180b180b180b180b18091baa00d375c602a60246ea800458c94ccc040c014c044dd5000898011980a180a98091baa0014bd700a60103d87a8000300230113754600460226ea800cdd2a4000460260026022601c6ea800858dc3a4000601e6020004601c00260146ea8008dc3a40042c6016601800460140026014004601000260086ea8004526136565734aae7555cf2ab9f5740ae855d11\",\n \"hash\": \"cbebe37fa901785755124c23e59812f3aa59b8539096a322727a5003\"\n }\n ],\n \"definitions\": {\n \"AssetName\": {\n \"title\": \"AssetName\",\n \"dataType\": \"bytes\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"MValue\": {\n \"title\": \"MValue\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/PolicyId\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Pairs$AssetName_Int\"\n }\n },\n \"Option$StakeCredential\": {\n \"title\": \"Option\",\n \"anyOf\": [\n {\n \"title\": \"Some\",\n \"description\": \"An optional value.\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/StakeCredential\"\n }\n ]\n },\n {\n \"title\": \"None\",\n \"description\": \"Nothing.\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n },\n \"Pairs$AssetName_Int\": {\n \"title\": \"Pairs<AssetName, Int>\",\n \"dataType\": \"map\",\n \"keys\": {\n \"$ref\": \"#/definitions/AssetName\"\n },\n \"values\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"PaymentCredential\": {\n \"title\": \"PaymentCredential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"StakeCredential\": {\n \"title\": \"StakeCredential\",\n \"description\": \"Represent a type of object that can be represented either inline (by hash)\\n or via a reference (i.e. a pointer to an on-chain location).\\n\\n This is mainly use for capturing pointers to a stake credential\\n registration certificate in the case of so-called pointer addresses.\",\n \"anyOf\": [\n {\n \"title\": \"Inline\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n },\n {\n \"title\": \"Pointer\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"slot_number\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"transaction_index\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"certificate_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Address\": {\n \"title\": \"Address\",\n \"description\": \"A Cardano `Address` typically holding one or two credential references.\\n\\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\\n completely excluded from Plutus contexts. Thus, from an on-chain\\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).\",\n \"anyOf\": [\n {\n \"title\": \"Address\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"payment_credential\",\n \"$ref\": \"#/definitions/PaymentCredential\"\n },\n {\n \"title\": \"stake_credential\",\n \"$ref\": \"#/definitions/Option$StakeCredential\"\n }\n ]\n }\n ]\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/ScriptHash\"\n }\n ]\n }\n ]\n },\n \"swap/SwapDatum\": {\n \"title\": \"SwapDatum\",\n \"anyOf\": [\n {\n \"title\": \"SwapDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"initiator\",\n \"$ref\": \"#/definitions/cardano~1address~1Address\"\n },\n {\n \"title\": \"to_provide\",\n \"$ref\": \"#/definitions/MValue\"\n },\n {\n \"title\": \"to_receive\",\n \"$ref\": \"#/definitions/MValue\"\n }\n ]\n }\n ]\n },\n \"swap/SwapRedeemer\": {\n \"title\": \"SwapRedeemer\",\n \"anyOf\": [\n {\n \"title\": \"Cancel\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"Swap\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": []\n }\n ]\n }\n }\n}\n","import {\n BuiltinByteString,\n ConStr0,\n Integer,\n mConStr0,\n SLOT_CONFIG_NETWORK,\n unixTimeToEnclosingSlot,\n} from \"@meshsdk/common\";\nimport {\n Asset,\n deserializeAddress,\n deserializeDatum,\n UTxO,\n} from \"@meshsdk/core\";\nimport { applyParamsToScript } from \"@meshsdk/core-cst\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../common\";\nimport blueprintV1 from \"./aiken-workspace-v1/plutus.json\";\nimport blueprintV2 from \"./aiken-workspace-v2/plutus.json\";\n\nexport type VestingDatum = ConStr0<\n [Integer, BuiltinByteString, BuiltinByteString]\n>;\n\nexport class MeshVestingContract extends MeshTxInitiator {\n scriptCbor: string;\n scriptAddress: string;\n\n constructor(inputs: MeshTxInitiatorInput) {\n super(inputs);\n this.scriptCbor = this.getScriptCbor();\n this.scriptAddress = this.getScriptAddress(this.scriptCbor);\n }\n\n getScriptCbor = () => {\n switch (this.version) {\n case 2:\n return applyParamsToScript(blueprintV2.validators[0]!.compiledCode, []);\n default:\n return applyParamsToScript(blueprintV1.validators[0]!.compiledCode, []);\n }\n };\n\n depositFund = async (\n amount: Asset[],\n lockUntilTimeStampMs: number,\n beneficiary: string,\n ): Promise<string> => {\n const { utxos, walletAddress } = await this.getWalletInfoForTx();\n\n const { pubKeyHash: ownerPubKeyHash } = deserializeAddress(walletAddress);\n const { pubKeyHash: beneficiaryPubKeyHash } =\n deserializeAddress(beneficiary);\n\n await this.mesh\n .txOut(this.scriptAddress, amount)\n .txOutInlineDatumValue(\n mConStr0([\n lockUntilTimeStampMs,\n ownerPubKeyHash,\n beneficiaryPubKeyHash,\n ]),\n )\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n withdrawFund = async (vestingUtxo: UTxO): Promise<string> => {\n const { utxos, walletAddress, collateral } =\n await this.getWalletInfoForTx();\n const { input: collateralInput, output: collateralOutput } = collateral;\n\n const { pubKeyHash } = deserializeAddress(walletAddress);\n\n const datum = deserializeDatum<VestingDatum>(\n vestingUtxo.output.plutusData!,\n );\n\n const invalidBefore =\n unixTimeToEnclosingSlot(\n Math.min(Number(datum.fields[0].int), Date.now() - 15000),\n this.networkId === 0\n ? SLOT_CONFIG_NETWORK.preprod\n : SLOT_CONFIG_NETWORK.mainnet,\n ) + 1;\n\n await this.mesh\n .spendingPlutusScript(this.languageVersion)\n .txIn(\n vestingUtxo.input.txHash,\n vestingUtxo.input.outputIndex,\n vestingUtxo.output.amount,\n this.scriptAddress,\n )\n .spendingReferenceTxInInlineDatumPresent()\n .spendingReferenceTxInRedeemerValue(\"\")\n .txInScript(this.scriptCbor)\n .txOut(walletAddress, [])\n .txInCollateral(\n collateralInput.txHash,\n collateralInput.outputIndex,\n collateralOutput.amount,\n collateralOutput.address,\n )\n .invalidBefore(invalidBefore)\n .requiredSignerHash(pubKeyHash)\n .changeAddress(walletAddress)\n .selectUtxosFrom(utxos)\n .complete();\n return this.mesh.txHex;\n };\n\n getUtxoByTxHash = async (txHash: string): Promise<UTxO | undefined> => {\n return await this._getUtxoByTxHash(txHash, this.scriptCbor);\n };\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/vesting\",\n \"description\": \"Aiken contracts for project 'meshjs/vesting'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v2\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.0.29-alpha+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"vesting.vesting\",\n \"datum\": {\n \"title\": \"datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/vesting~1types~1VestingDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"compiledCode\": \"5901c40100003232323232323223222533300532533233007300130083754600460126ea800c4c8c8c94ccc028cc004dd6180118061baa3003300c375400c6eb8c014c030dd50048a511533300a330013758600460186ea8c00cc030dd50031bae300f30103010300c3754012266446464646464a666022601660246ea80084c94ccc0480104cdc40038008011bad301630133754004002264a666022601660246ea80084c94ccc0480100084cdc48038009bad3016301337540040022940c050008cdc424000601e6ea8c04cc050004cc044c048004cc044ccc034cdc424000601c6ea8c048c04c00530103d87a80004c0103d87980004bd7018071baa3005300e3754004601e602060206020602060206020602060186ea8c00cc030dd50031bad3003300c3754012294088c8cc00400400c894ccc040004528099299980719b8f375c602600400829444cc00c00c004c04c0048c038c03cc03cc03cc03cc03cc03cc03cc03c0048c034004dc3a400429408c02cc0300045261365653330023370e900018019baa0011323232323232533300b300e002149858dd7180600098060011bae300a001300a002375a601000260086ea8004595cd2ab9d5573caae7d5d02ba157441\",\n \"hash\": \"ac96a3fa3cabf670268a88720402c715ed5fd73ffb3276e6092ead00\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"vesting/types/VestingDatum\": {\n \"title\": \"VestingDatum\",\n \"anyOf\": [\n {\n \"title\": \"VestingDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"lock_until\",\n \"description\": \"POSIX time in second, e.g. 1672843961000\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"owner\",\n \"description\": \"Owner's credentials\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"beneficiary\",\n \"description\": \"Beneficiary's credentials\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","{\n \"preamble\": {\n \"title\": \"meshjs/vesting\",\n \"description\": \"Aiken contracts for project 'meshjs/vesting'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.0+unknown\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"vesting.vesting.spend\",\n \"datum\": {\n \"title\": \"datum_opt\",\n \"schema\": {\n \"$ref\": \"#/definitions/vesting~1VestingDatum\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"compiledCode\": \"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb\"\n },\n {\n \"title\": \"vesting.vesting.else\",\n \"compiledCode\": \"5901a7010100323232323232322533300232323232325332330083001300937540042646464a66601666e1d2000300c37540022646464a66601c660026eb0c008c040dd50059bae3013301430103754006294454ccc038cc004dd6180118081baa00b375c60266028602860206ea800c4c8cc88c8c8c8c8c94ccc058c03cc05cdd5001099299980b802099b88007001002375a603660306ea80080044c94ccc058c03cc05cdd5001099299980b802001099b89007001375a603660306ea8008004528180c8011806180a1baa3018301900133016301700133016333012300b30133754602e603000298103d87a80004c0103d87980004bd7018099baa3003301337540046028602a602a602a602a602a602a602a60226ea8030dd6980098089baa0042301400114a044646600200200644a66602800229404c94ccc048cdc79bae301700200414a2266006006002602e00246024602660266026602660266026602660260026020601a6ea800458c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba21\",\n \"hash\": \"d13324c13a48b69d67ccfc88e3e87f046f4417f57f5c740d515249fb\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"vesting/VestingDatum\": {\n \"title\": \"VestingDatum\",\n \"anyOf\": [\n {\n \"title\": \"VestingDatum\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"lock_until\",\n \"description\": \"POSIX time in milliseconds, e.g. 1672843961000\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"owner\",\n \"description\": \"Owner's credentials\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"beneficiary\",\n \"description\": \"Beneficiary's credentials\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}\n","import {\n Asset,\n byteString,\n conStr0,\n conStr1,\n conStr2,\n integer,\n list,\n POLICY_ID_LENGTH,\n stringToHex,\n UTxO,\n} from \"@meshsdk/common\";\nimport { deserializeDatum } from \"@meshsdk/core\";\n\nimport { MeshTxInitiator, MeshTxInitiatorInput } from \"../../common\";\nimport { StandardScripts, SubStandardScripts } from \"./common\";\nimport {\n BlacklistBootstrap,\n BlacklistDatum,\n ProtocolBootstrapParams,\n smartWalletAddress,\n} from \"./type\";\nimport {\n parseBlacklistDatum,\n parseRegistryDatum,\n selectProgrammableTokenUtxos,\n} from \"./utils\";\nimport { resolveBlacklistScripts, resolveStakeCredential } from \"./resolvers\";\nimport params from \"./protocolParams.json\";\n\nexport class ProgrammableTokenContract extends MeshTxInitiator {\n private _blacklistBootstrap: BlacklistBootstrap | undefined;\n private _params: ProtocolBootstrapParams;\n\n constructor(\n private inputs: MeshTxInitiatorInput,\n blacklistBootstrap?: BlacklistBootstrap,\n ) {\n super(inputs);\n this._params = params;\n this._blacklistBootstrap = blacklistBootstrap;\n }\n\n get protocolParams() {\n return this._params;\n }\n\n mintToken = async (\n assetName: string,\n quantity: string,\n issuerAdminPkh: string,\n recepientSmartAddress: smartWalletAddress,\n ): Promise<string> => {\n const params = this._params;\n const fetcher = this.fetcher;\n const wallet = this.wallet;\n if (!params || !fetcher || !wallet)\n throw new Error(\n \"Contract parameters, fetcher, or wallet not initialized\",\n );\n\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n const standardScript = new StandardScripts(this.networkId);\n const substandardScript = new SubStandardScripts(this.networkId);\n\n const substandardIssue =\n await substandardScript.issuerAdmin(issuerAdminPkh);\n const substandardIssueCbor = substandardIssue.cbor;\n const substandardPolicyId = substandardIssue.policyId;\n\n const issuanceMint = await standardScript.issuanceMint(\n substandardPolicyId,\n params,\n );\n\n const issuanceRedeemer = conStr0([\n conStr1([byteString(substandardPolicyId)]),\n ]);\n\n const programmableTokenAssets: Asset[] = [\n { unit: \"lovelace\", quantity: \"1300000\" },\n {\n unit: issuanceMint.policyId + stringToHex(assetName),\n quantity: quantity,\n },\n ];\n\n const programmableTokenDatum = conStr0([]);\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .withdrawalPlutusScriptV3()\n .withdrawal(substandardIssue.rewardAddress, \"0\")\n .withdrawalScript(substandardIssueCbor)\n .withdrawalRedeemerValue(conStr0([]), \"JSON\")\n\n .mintPlutusScriptV3()\n .mint(quantity, issuanceMint.policyId, stringToHex(assetName))\n .mintingScript(issuanceMint.cbor)\n .mintRedeemerValue(issuanceRedeemer, \"JSON\")\n\n .txOut(recepientSmartAddress, programmableTokenAssets)\n .txOutInlineDatumValue(programmableTokenDatum, \"JSON\")\n\n .requiredSignerHash(issuerAdminPkh)\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n burnToken = async (\n assetName: string,\n quantity: string,\n txhash: string,\n outputIndex: number,\n issuerAdminPkh: string,\n ): Promise<string> => {\n const params = this._params;\n const fetcher = this.fetcher;\n const wallet = this.wallet;\n if (!params || !fetcher || !wallet)\n throw new Error(\n \"Contract parameters, fetcher, or wallet not initialized\",\n );\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n const standard = new StandardScripts(this.networkId);\n const substandard = new SubStandardScripts(this.networkId);\n\n const programmableLogicBase = await standard.programmableLogicBase(params);\n const programmableLogicGlobal =\n await standard.programmableLogicGlobal(params);\n const registrySpend = await standard.registrySpend(params);\n const substandardIssue = await substandard.issuerAdmin(issuerAdminPkh);\n const issuanceMint = await standard.issuanceMint(\n substandardIssue.policyId,\n params,\n );\n\n const utxoToBurn = (await fetcher.fetchUTxOs(txhash, outputIndex))?.[0];\n if (!utxoToBurn) throw new Error(\"Token UTxO not found\");\n\n const tokenUnit = issuanceMint.policyId + stringToHex(assetName);\n const utxoTokenAmount =\n utxoToBurn.output.amount.find((a) => a.unit === tokenUnit)?.quantity ??\n \"0\";\n if (Number(quantity) > Number(utxoTokenAmount))\n throw new Error(\"Not enough tokens to burn\");\n\n const registryUtxos = await fetcher.fetchAddressUTxOs(\n registrySpend.address,\n );\n const progTokenRegistry = registryUtxos.find((utxo) => {\n if (!utxo.output.plutusData) return false;\n const parsed = parseRegistryDatum(\n deserializeDatum(utxo.output.plutusData),\n );\n return parsed?.key === issuanceMint.policyId;\n });\n if (!progTokenRegistry)\n throw new Error(\"Registry entry not found, token not registered\");\n\n const feePayerUtxo = walletUtxos.find(\n (u) =>\n BigInt(\n u.output.amount.find((a) => a.unit === \"lovelace\")?.quantity ?? \"0\",\n ) > 5_000_000n,\n );\n if (!feePayerUtxo)\n throw new Error(\"No UTXO with enough ADA for fees found\");\n\n const protocolParamsUtxo = (\n await fetcher.fetchUTxOs(params.txHash, 0)\n )?.[0];\n if (!protocolParamsUtxo) throw new Error(\"Protocol params missing\");\n\n const totalInputs = [feePayerUtxo, utxoToBurn].length;\n\n const compareUtxos = (a: UTxO, b: UTxO): number =>\n a.input.txHash !== b.input.txHash\n ? a.input.txHash.localeCompare(b.input.txHash)\n : a.input.outputIndex - b.input.outputIndex;\n\n const sortedRefInputs = [protocolParamsUtxo, progTokenRegistry].sort(\n compareUtxos,\n );\n\n const registryRefInputIndex = sortedRefInputs.findIndex(\n (r) =>\n r.input.txHash === progTokenRegistry.input.txHash &&\n r.input.outputIndex === progTokenRegistry.input.outputIndex,\n );\n if (registryRefInputIndex === -1)\n throw new Error(\"Could not find registry in sorted reference inputs\");\n\n const issuanceRedeemer = conStr0([\n conStr1([byteString(substandardIssue.policyId)]),\n ]);\n\n const programmableGlobalRedeemer = conStr1([\n integer(registryRefInputIndex),\n integer(0), // outputs_start_idx\n integer(totalInputs), // length_inputs\n ]);\n\n const returningAmount = utxoToBurn.output.amount\n .map((a) =>\n a.unit === tokenUnit\n ? {\n unit: a.unit,\n quantity: String(BigInt(a.quantity) - BigInt(quantity)),\n }\n : a,\n )\n .filter((a) => BigInt(a.quantity) > 0n);\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .txIn(feePayerUtxo.input.txHash, feePayerUtxo.input.outputIndex)\n .spendingPlutusScriptV3()\n .txIn(utxoToBurn.input.txHash, utxoToBurn.input.outputIndex)\n .txInScript(programmableLogicBase.cbor)\n .txInInlineDatumPresent()\n .txInRedeemerValue(conStr0([]), \"JSON\")\n\n .withdrawalPlutusScriptV3()\n .withdrawal(substandardIssue.rewardAddress, \"0\")\n .withdrawalScript(substandardIssue.cbor)\n .withdrawalRedeemerValue(conStr0([]), \"JSON\")\n\n .withdrawalPlutusScriptV3()\n .withdrawal(programmableLogicGlobal.rewardAddress, \"0\")\n .withdrawalScript(programmableLogicGlobal.cbor)\n .withdrawalRedeemerValue(programmableGlobalRedeemer, \"JSON\")\n\n .mintPlutusScriptV3()\n .mint(`-${quantity}`, issuanceMint.policyId, stringToHex(assetName))\n .mintingScript(issuanceMint.cbor)\n .mintRedeemerValue(issuanceRedeemer, \"JSON\");\n\n if (returningAmount.length > 0) {\n this.mesh\n .txOut(utxoToBurn.output.address, returningAmount)\n .txOutInlineDatumValue(conStr0([]), \"JSON\");\n }\n\n for (const refInput of sortedRefInputs) {\n this.mesh.readOnlyTxInReference(\n refInput.input.txHash,\n refInput.input.outputIndex,\n );\n }\n\n this.mesh\n .requiredSignerHash(issuerAdminPkh)\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n transferToken = async (\n unit: string,\n quantity: string,\n senderSmartWallet: smartWalletAddress,\n recipientSmartWallet: smartWalletAddress,\n ): Promise<string> => {\n const params = this._params;\n const fetcher = this.fetcher;\n const wallet = this.wallet;\n if (!params || !fetcher || !wallet)\n throw new Error(\n \"Contract parameters, fetcher, or wallet not initialized\",\n );\n\n const policyId = unit.substring(0, POLICY_ID_LENGTH);\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n const standard = new StandardScripts(this.networkId);\n const substandard = new SubStandardScripts(this.networkId);\n\n const programmableLogicBase = await standard.programmableLogicBase(params);\n const programmableLogicGlobal =\n await standard.programmableLogicGlobal(params);\n const registrySpend = await standard.registrySpend(params);\n\n if (!this._blacklistBootstrap)\n throw new Error(\"Blacklist bootstrap not initialized\");\n const blacklistNodePolicyId =\n this._blacklistBootstrap.blacklistMintBootstrap.scriptHash;\n const substandardTransfer = await substandard.customTransfer(\n params.programmableLogicBaseParams.scriptHash,\n blacklistNodePolicyId,\n );\n const substandardTransferCbor = substandardTransfer.cbor;\n\n const progTokenRegistry = (\n await fetcher.fetchAddressUTxOs(registrySpend.address)\n ).find((utxo: UTxO) => {\n if (!utxo.output.plutusData) return false;\n return (\n parseRegistryDatum(deserializeDatum(utxo.output.plutusData))?.key ===\n policyId\n );\n });\n if (!progTokenRegistry)\n throw new Error(\"Could not find registry entry for token\");\n\n const protocolParamsUtxo = (\n await fetcher.fetchUTxOs(params.txHash, 0)\n )?.[0];\n if (!protocolParamsUtxo)\n throw new Error(\"Could not resolve protocol params\");\n\n const senderProgTokenUtxos =\n await fetcher.fetchAddressUTxOs(senderSmartWallet);\n if (!senderProgTokenUtxos?.length)\n throw new Error(\"No programmable tokens found at sender address\");\n\n const { selectedUtxos } = await selectProgrammableTokenUtxos(\n senderProgTokenUtxos,\n unit,\n Number(quantity),\n );\n if (!selectedUtxos.length) throw new Error(\"Not enough funds\");\n\n const compareUtxos = (a: UTxO, b: UTxO): number =>\n a.input.txHash !== b.input.txHash\n ? a.input.txHash.localeCompare(b.input.txHash)\n : a.input.outputIndex - b.input.outputIndex;\n\n const sortedInputs = [...selectedUtxos].sort(compareUtxos);\n const programmableInputs: UTxO[] = [];\n const uniquePolicies: string[] = [];\n\n for (const utxo of sortedInputs) {\n programmableInputs.push(utxo);\n for (const asset of utxo.output.amount) {\n if (asset.unit === \"lovelace\") continue;\n const p = asset.unit.substring(0, 56);\n if (!uniquePolicies.includes(p)) uniquePolicies.push(p);\n }\n }\n uniquePolicies.sort();\n\n const blacklistProofs: UTxO[] = [];\n if (blacklistNodePolicyId) {\n const blacklistSpend = await substandard.blacklistSpend(\n blacklistNodePolicyId,\n );\n const blacklistUtxos = await fetcher.fetchAddressUTxOs(\n blacklistSpend.address,\n );\n\n for (const utxo of programmableInputs) {\n const stakingPkh = resolveStakeCredential(utxo.output.address);\n if (!stakingPkh) throw new Error(\"UTXO missing stake credential\");\n\n const proofUtxo = blacklistUtxos.find((bl: UTxO) => {\n if (!bl.output.plutusData) return false;\n const datum = parseBlacklistDatum(\n deserializeDatum(bl.output.plutusData),\n );\n if (!datum) return false;\n const isGreater = datum.key === \"\" || stakingPkh > datum.key;\n const isLess = datum.next === \"\" || stakingPkh < datum.next;\n return isGreater && isLess;\n });\n\n if (!proofUtxo)\n throw new Error(`Blacklist proof not found for wallet ${stakingPkh}`);\n blacklistProofs.push(proofUtxo);\n }\n }\n\n const registryProofs: UTxO[] = [];\n const registryUtxos = await fetcher.fetchAddressUTxOs(\n registrySpend.address,\n );\n for (const p of uniquePolicies) {\n const registryNft = params.directoryMintParams.scriptHash + p;\n const proofUtxo = registryUtxos.find((u) =>\n u.output.amount.find((a) => a.unit === registryNft),\n );\n if (!proofUtxo)\n throw new Error(`Registry node not found for policy ${p}`);\n registryProofs.push(proofUtxo);\n }\n\n const uniqueBlacklistProofs = [\n ...new Map(\n blacklistProofs.map((p) => [\n `${p.input.txHash}#${p.input.outputIndex}`,\n p,\n ]),\n ).values(),\n ];\n\n const sortedRefInputs = [\n ...uniqueBlacklistProofs,\n ...registryProofs,\n protocolParamsUtxo,\n ].sort(compareUtxos);\n\n const substandardTransferRedeemer = list(\n blacklistProofs.map((p) => {\n const idx = sortedRefInputs.findIndex(\n (r) =>\n r.input.txHash === p.input.txHash &&\n r.input.outputIndex === p.input.outputIndex,\n );\n return conStr0([integer(idx)]);\n }),\n );\n\n const programmableGlobalRedeemer = conStr0([\n list(\n registryProofs.map((p) => {\n const idx = sortedRefInputs.findIndex(\n (r) =>\n r.input.txHash === p.input.txHash &&\n r.input.outputIndex === p.input.outputIndex,\n );\n return conStr0([integer(idx)]);\n }),\n ),\n ]);\n\n const totalTokens = selectedUtxos.reduce(\n (sum, utxo) =>\n sum +\n BigInt(\n utxo.output.amount.find((a) => a.unit === unit)?.quantity ?? \"0\",\n ),\n 0n,\n );\n const totalLovelace = selectedUtxos.reduce(\n (sum, utxo) =>\n sum +\n BigInt(\n utxo.output.amount.find((a) => a.unit === \"lovelace\")?.quantity ??\n \"0\",\n ),\n 0n,\n );\n\n if (totalTokens < BigInt(quantity)) throw new Error(\"Not enough funds\");\n\n const recipientLovelace = 1500000n;\n const remainingTokens = totalTokens - BigInt(quantity);\n const recipientAssets = [\n { unit: \"lovelace\", quantity: recipientLovelace.toString() },\n { unit: unit, quantity: quantity },\n ];\n const remainingLovelace = totalLovelace - recipientLovelace;\n const returningAssets = [\n {\n unit: \"lovelace\",\n quantity: (remainingLovelace > 1_000_000n\n ? remainingLovelace\n : 1_500_000n\n ).toString(),\n },\n ...(remainingTokens > 0n\n ? [{ unit: unit, quantity: remainingTokens.toString() }]\n : []),\n ];\n\n this.mesh.verbose = true;\n this.mesh.evaluator = this.inputs.mesh.evaluator;\n for (const utxo of sortedInputs) {\n this.mesh\n .spendingPlutusScriptV3()\n .txIn(utxo.input.txHash, utxo.input.outputIndex)\n .txInScript(programmableLogicBase.cbor)\n .txInRedeemerValue(conStr0([]), \"JSON\")\n .txInInlineDatumPresent();\n }\n\n this.mesh\n .withdrawalPlutusScriptV3()\n .withdrawal(substandardTransfer.rewardAddress, \"0\")\n .withdrawalScript(substandardTransferCbor)\n .withdrawalRedeemerValue(substandardTransferRedeemer, \"JSON\")\n\n .withdrawalPlutusScriptV3()\n .withdrawal(programmableLogicGlobal.rewardAddress, \"0\")\n .withdrawalScript(programmableLogicGlobal.cbor)\n .withdrawalRedeemerValue(programmableGlobalRedeemer, \"JSON\");\n\n if (remainingTokens > 0n || remainingLovelace > 1_000_000n) {\n this.mesh\n .txOut(senderSmartWallet, returningAssets)\n .txOutInlineDatumValue(conStr0([]), \"JSON\");\n }\n\n this.mesh\n .txOut(recipientSmartWallet, recipientAssets)\n .txOutInlineDatumValue(conStr0([]), \"JSON\");\n\n for (const refInput of sortedRefInputs) {\n this.mesh.readOnlyTxInReference(\n refInput.input.txHash,\n refInput.input.outputIndex,\n );\n }\n\n this.mesh\n .requiredSignerHash(resolveStakeCredential(senderSmartWallet))\n .setFee(\"600000\")\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n blacklistSmartWalletAddress = async (\n smartWalletAddress: smartWalletAddress,\n ): Promise<string> => {\n const fetcher = this.fetcher;\n const wallet = this.wallet;\n if (!fetcher || !wallet)\n throw new Error(\"Fetcher or wallet not initialized\");\n\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n if (!this._blacklistBootstrap)\n throw new Error(\"Blacklist bootstrap not initialized\");\n const blacklistMintBootstrap =\n this._blacklistBootstrap.blacklistMintBootstrap;\n const { blacklistMint, blacklistSpend } = await resolveBlacklistScripts(\n this.networkId as 0 | 1,\n blacklistMintBootstrap.txInput,\n blacklistMintBootstrap.adminPubKeyHash,\n );\n if (!this.fetcher) {\n throw new Error(\"Fetcher not initialized\");\n }\n\n const blacklistUtxos = await fetcher.fetchAddressUTxOs(\n blacklistSpend.address,\n );\n if (!blacklistUtxos?.length) throw new Error(\"No blacklist UTxOs found\");\n\n const targetStakeHash = resolveStakeCredential(smartWalletAddress);\n\n let nodeToReplace: UTxO | null = null;\n let preexistingNode: BlacklistDatum | null = null;\n\n for (const utxo of blacklistUtxos) {\n if (!utxo.output.plutusData) continue;\n const datum = parseBlacklistDatum(\n deserializeDatum(utxo.output.plutusData),\n );\n if (!datum) continue;\n if (datum.key === targetStakeHash)\n throw new Error(\"Target address is already blacklisted\");\n if (\n datum.key.localeCompare(targetStakeHash) < 0 &&\n targetStakeHash.localeCompare(datum.next) < 0\n ) {\n nodeToReplace = utxo;\n preexistingNode = datum;\n break;\n }\n }\n\n if (!nodeToReplace || !preexistingNode)\n throw new Error(\"Could not find blacklist node to replace\");\n\n const beforeNode = conStr0([\n byteString(preexistingNode.key),\n byteString(targetStakeHash),\n ]);\n const afterNode = conStr0([\n byteString(targetStakeHash),\n byteString(preexistingNode.next),\n ]);\n\n const mintRedeemer = conStr1([byteString(targetStakeHash)]);\n const spendRedeemer = conStr0([]);\n const mintedAssets: Asset[] = [\n {\n unit: blacklistMint.policyId + targetStakeHash,\n quantity: \"1\",\n },\n ];\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .spendingPlutusScriptV3()\n .txIn(nodeToReplace.input.txHash, nodeToReplace.input.outputIndex)\n .txInScript(blacklistSpend.cbor)\n .txInRedeemerValue(spendRedeemer, \"JSON\")\n .txInInlineDatumPresent()\n\n .mintPlutusScriptV3()\n .mint(\"1\", blacklistMint.policyId, targetStakeHash)\n .mintingScript(blacklistMint.cbor)\n .mintRedeemerValue(mintRedeemer, \"JSON\")\n\n .txOut(blacklistSpend.address, nodeToReplace.output.amount)\n .txOutInlineDatumValue(beforeNode, \"JSON\")\n\n .txOut(blacklistSpend.address, mintedAssets)\n .txOutInlineDatumValue(afterNode, \"JSON\")\n\n .requiredSignerHash(\n this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash,\n )\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n whitelistSmartWalletAddress = async (\n smartWalletAddress: smartWalletAddress,\n ): Promise<string> => {\n const fetcher = this.fetcher;\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n if (!fetcher) throw new Error(\"Fetcher or wallet not initialized\");\n\n const credentialsToRemove = resolveStakeCredential(smartWalletAddress);\n\n if (!this._blacklistBootstrap)\n throw new Error(\"Blacklist bootstrap not initialized\");\n const blacklistMintBootstrap =\n this._blacklistBootstrap.blacklistMintBootstrap;\n const { blacklistMint, blacklistSpend } = await resolveBlacklistScripts(\n this.networkId as 0 | 1,\n blacklistMintBootstrap.txInput,\n blacklistMintBootstrap.adminPubKeyHash,\n );\n if (!this.fetcher) {\n throw new Error(\"Fetcher not initialized\");\n }\n\n const blacklistUtxos = await fetcher.fetchAddressUTxOs(\n blacklistSpend.address,\n );\n if (!blacklistUtxos?.length) throw new Error(\"No blacklist UTxOs found\");\n\n let nodeToRemove: UTxO | null = null;\n let nodeToRemoveDatum: { key: string; next: string } | null = null;\n let nodeToUpdate: UTxO | null = null;\n let nodeToUpdateDatum: { key: string; next: string } | null = null;\n\n for (const utxo of blacklistUtxos) {\n if (!utxo.output.plutusData) continue;\n const datum = parseBlacklistDatum(\n deserializeDatum(utxo.output.plutusData),\n );\n if (!datum) continue;\n if (datum.key === credentialsToRemove) {\n nodeToRemove = utxo;\n nodeToRemoveDatum = datum;\n }\n if (datum.next === credentialsToRemove) {\n nodeToUpdate = utxo;\n nodeToUpdateDatum = datum;\n }\n if (nodeToRemove && nodeToUpdate) break;\n }\n\n if (!nodeToRemove || !nodeToRemoveDatum)\n throw new Error(\n \"Could not resolve relevant blacklist nodes (node to remove)\",\n );\n if (!nodeToUpdate || !nodeToUpdateDatum)\n throw new Error(\n \"Could not resolve relevant blacklist nodes (node to update)\",\n );\n\n const newNext = nodeToRemoveDatum.next;\n const updatedNode = conStr0([\n byteString(nodeToUpdateDatum.key),\n byteString(newNext),\n ]);\n\n const mintRedeemer = conStr2([byteString(credentialsToRemove)]);\n const spendRedeemer = conStr0([]);\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .spendingPlutusScriptV3()\n .txIn(nodeToRemove.input.txHash, nodeToRemove.input.outputIndex)\n .txInScript(blacklistSpend.cbor)\n .txInInlineDatumPresent()\n .txInRedeemerValue(spendRedeemer, \"JSON\")\n\n .spendingPlutusScriptV3()\n .txIn(nodeToUpdate.input.txHash, nodeToUpdate.input.outputIndex)\n .txInScript(blacklistSpend.cbor)\n .txInInlineDatumPresent()\n .txInRedeemerValue(spendRedeemer, \"JSON\")\n\n .mintPlutusScriptV3()\n .mint(\"-1\", blacklistMint.policyId, credentialsToRemove)\n .mintingScript(blacklistMint.cbor)\n .mintRedeemerValue(mintRedeemer, \"JSON\")\n\n .txOut(blacklistSpend.address, nodeToUpdate.output.amount)\n .txOutInlineDatumValue(updatedNode, \"JSON\")\n\n .requiredSignerHash(\n this._blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash,\n )\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n seizeToken = async (\n unit: string,\n txHash: string,\n outputIndex: number,\n issuerAdminPkh: string,\n recipientSmartWallet: smartWalletAddress,\n ): Promise<string> => {\n const params = this._params;\n const fetcher = this.fetcher;\n const wallet = this.wallet;\n if (!params || !fetcher || !wallet)\n throw new Error(\n \"Contract parameters, fetcher, or wallet not initialized\",\n );\n\n const policyId = unit.substring(0, POLICY_ID_LENGTH);\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n const standardScript = new StandardScripts(this.networkId);\n const substandardScript = new SubStandardScripts(this.networkId);\n const programmableLogicBase =\n await standardScript.programmableLogicBase(params);\n const programmableLogicGlobal =\n await standardScript.programmableLogicGlobal(params);\n const registrySpend = await standardScript.registrySpend(params);\n\n const feePayerUtxo = walletUtxos.find(\n (u) =>\n BigInt(\n u.output.amount.find((a) => a.unit === \"lovelace\")?.quantity ?? \"0\",\n ) > 10_000_000n,\n );\n if (!feePayerUtxo)\n throw new Error(\"No UTXO with enough ADA for fees found\");\n\n const utxosAtRef = await fetcher.fetchUTxOs(txHash, outputIndex);\n const utxoToSeize = utxosAtRef?.[0];\n if (!utxoToSeize) throw new Error(\"Could not find utxo to seize\");\n if (!utxoToSeize.output.plutusData)\n throw new Error(\"UTXO to seize must have inline datum\");\n\n const totalInputs = [feePayerUtxo, utxoToSeize].length;\n const tokenAsset = utxoToSeize.output.amount.find((a) => a.unit === unit);\n if (!tokenAsset)\n throw new Error(\"UTXO does not contain the specified token\");\n if (Number(tokenAsset.quantity) <= 0)\n throw new Error(\"UTXO token quantity must be greater than zero\");\n\n const registryUtxos = await fetcher.fetchAddressUTxOs(\n registrySpend.address,\n );\n const progTokenRegistry = registryUtxos.find((utxo: UTxO) => {\n if (!utxo.output.plutusData) return false;\n const parsedDatum = parseRegistryDatum(\n deserializeDatum(utxo.output.plutusData),\n );\n return parsedDatum?.key === policyId;\n });\n if (!progTokenRegistry)\n throw new Error(\"Could not find registry entry for token\");\n\n const protocolParamsUtxo = (\n await fetcher.fetchUTxOs(params.txHash, 0)\n )?.[0];\n if (!protocolParamsUtxo)\n throw new Error(\"Could not resolve protocol params\");\n\n const compareUtxos = (a: UTxO, b: UTxO): number =>\n a.input.txHash !== b.input.txHash\n ? a.input.txHash.localeCompare(b.input.txHash)\n : a.input.outputIndex - b.input.outputIndex;\n\n const sortedRefInputs = [protocolParamsUtxo, progTokenRegistry].sort(\n compareUtxos,\n );\n const registryRefInputIndex = sortedRefInputs.findIndex(\n (r) =>\n r.input.txHash === progTokenRegistry.input.txHash &&\n r.input.outputIndex === progTokenRegistry.input.outputIndex,\n );\n if (registryRefInputIndex === -1)\n throw new Error(\"Could not find registry in sorted reference inputs\");\n\n const programmableGlobalRedeemer = conStr1([\n integer(registryRefInputIndex),\n integer(1), // outputs_start_idx (skip recipient output)\n integer(totalInputs), // length_inputs\n ]);\n\n const seizedAssets: Asset[] = [\n { unit: \"lovelace\", quantity: \"1500000\" },\n { unit: unit, quantity: tokenAsset.quantity },\n ];\n const remainingAssets: Asset[] = utxoToSeize.output.amount.filter(\n (a) => a.unit !== unit,\n );\n if (remainingAssets.length === 0) {\n remainingAssets.push({ unit: \"lovelace\", quantity: \"1000000\" });\n }\n\n const substandardIssueAdmin =\n await substandardScript.issuerAdmin(issuerAdminPkh);\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .txIn(feePayerUtxo.input.txHash, feePayerUtxo.input.outputIndex)\n .spendingPlutusScriptV3()\n .txIn(utxoToSeize.input.txHash, utxoToSeize.input.outputIndex)\n .txInScript(programmableLogicBase.cbor)\n .txInRedeemerValue(conStr0([]), \"JSON\")\n .txInInlineDatumPresent()\n\n .withdrawalPlutusScriptV3()\n .withdrawal(substandardIssueAdmin.rewardAddress, \"0\")\n .withdrawalScript(substandardIssueAdmin.cbor)\n .withdrawalRedeemerValue(conStr0([]), \"JSON\")\n\n .withdrawalPlutusScriptV3()\n .withdrawal(programmableLogicGlobal.rewardAddress, \"0\")\n .withdrawalScript(programmableLogicGlobal.cbor)\n .withdrawalRedeemerValue(programmableGlobalRedeemer, \"JSON\")\n\n .txOut(recipientSmartWallet, seizedAssets)\n .txOutInlineDatumValue(conStr0([]), \"JSON\")\n\n .txOut(utxoToSeize.output.address, remainingAssets)\n .txOutInlineDatumValue(conStr0([]), \"JSON\");\n\n for (const refInput of sortedRefInputs) {\n this.mesh.readOnlyTxInReference(\n refInput.input.txHash,\n refInput.input.outputIndex,\n );\n }\n\n this.mesh\n .requiredSignerHash(issuerAdminPkh)\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .selectUtxosFrom(walletUtxos)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .changeAddress(changeAddress);\n\n return await this.mesh.complete();\n };\n\n initializeBlacklist = async (\n adminPubKeyHash: string,\n ): Promise<{\n txHex: string;\n bootstrap: BlacklistBootstrap;\n }> => {\n const params = this._params;\n const wallet = this.wallet;\n if (!params || !wallet)\n throw new Error(\"Contract parameters or wallet not initialized\");\n\n const {\n utxos: walletUtxos,\n walletAddress: changeAddress,\n collateral,\n } = await this.getWalletInfoForTx();\n\n const utilityUtxos = walletUtxos.filter((utxo) => {\n const lovelaceAsset = utxo.output.amount.find(\n (a) => a.unit === \"lovelace\",\n );\n if (!lovelaceAsset) return false;\n const hasOnlyAda = utxo.output.amount.length === 1;\n const hasEnoughAda = Number(lovelaceAsset.quantity) >= 10_000_000;\n return hasOnlyAda && hasEnoughAda;\n });\n\n if (utilityUtxos.length === 0) {\n throw new Error(\"No suitable UTxOs found for bootstrap\");\n }\n\n const bootstrapInput = utilityUtxos[0]!.input;\n const substandardScript = new SubStandardScripts(this.networkId);\n\n const blacklistMint = await substandardScript.blacklistMint(\n bootstrapInput,\n adminPubKeyHash,\n );\n const blacklistMintPolicyId = blacklistMint.policyId;\n const blacklistSpend = await substandardScript.blacklistSpend(\n blacklistMintPolicyId,\n );\n const blacklistSpendAddress = blacklistSpend.address;\n\n const blacklistInitDatum = conStr0([\n byteString(\"\"),\n byteString(\n \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n ),\n ]);\n\n const blacklistAssets: Asset[] = [\n {\n unit: blacklistMintPolicyId,\n quantity: \"1\",\n },\n ];\n\n this.mesh.txEvaluationMultiplier = 1.3;\n this.mesh\n .txIn(bootstrapInput.txHash, bootstrapInput.outputIndex)\n .mintPlutusScriptV3()\n .mint(\"1\", blacklistMintPolicyId, stringToHex(\"\"))\n .mintingScript(blacklistMint.cbor)\n .mintRedeemerValue(conStr0([]), \"JSON\")\n\n .txOut(blacklistSpendAddress, blacklistAssets)\n .txOutInlineDatumValue(blacklistInitDatum, \"JSON\")\n\n .txInCollateral(collateral.input.txHash, collateral.input.outputIndex)\n .setNetwork(this.networkId === 0 ? \"preview\" : \"mainnet\")\n .selectUtxosFrom(utilityUtxos)\n .changeAddress(changeAddress);\n\n const txHex = await this.mesh.complete();\n\n const bootstrap: BlacklistBootstrap = {\n blacklistMintBootstrap: {\n txInput: bootstrapInput,\n adminPubKeyHash: adminPubKeyHash,\n scriptHash: blacklistMintPolicyId,\n },\n blacklistSpendBootstrap: {\n blacklistMintScriptHash: blacklistMintPolicyId,\n scriptHash: blacklistSpend.policyId,\n },\n };\n\n return { txHex, bootstrap };\n };\n}\n","import {\n byteString,\n conStr,\n conStr1,\n integer,\n PlutusScript,\n TxInput,\n} from \"@meshsdk/common\";\nimport {\n applyParamsToScript,\n resolveScriptHash,\n serializePlutusScript,\n} from \"@meshsdk/core\";\nimport { scriptHashToRewardAddress } from \"@meshsdk/core-cst\";\n\nimport { ProtocolBootstrapParams } from \"./type\";\nimport { cborEncode, findValidator } from \"./utils\";\n\nexport class StandardScripts {\n constructor(private readonly networkID: number) {}\n\n private build(\n validatorName: string,\n params: object[],\n ): { cbor: string; plutusScript: PlutusScript } {\n const cbor = applyParamsToScript(\n findValidator(validatorName),\n params,\n \"JSON\",\n );\n return { cbor, plutusScript: { code: cbor, version: \"V3\" } };\n }\n\n private txRef(utxo: TxInput) {\n return conStr(0, [byteString(utxo.txHash), integer(utxo.outputIndex)]);\n }\n\n private resolveParam(\n params: ProtocolBootstrapParams | string,\n extract: (p: ProtocolBootstrapParams) => string,\n errorMsg: string,\n ): string {\n const hash = typeof params === \"string\" ? params : extract(params);\n if (!hash) throw new Error(errorMsg);\n return hash;\n }\n\n private toAddress(\n plutusScript: PlutusScript,\n staking: string | undefined = undefined,\n ) {\n return serializePlutusScript(plutusScript, staking, this.networkID, false)\n .address;\n }\n\n async issuanceMint(\n mintingLogicCredential: string,\n params: ProtocolBootstrapParams | string,\n ) {\n const paramScriptHash = this.resolveParam(\n params,\n (p) => p.programmableLogicBaseParams.scriptHash!,\n \"could not resolve issuance mint parameters\",\n );\n const { cbor, plutusScript } = this.build(\n \"issuance_mint.issuance_mint.mint\",\n [\n conStr1([byteString(paramScriptHash)]),\n conStr1([byteString(mintingLogicCredential)]),\n ],\n );\n return {\n cbor,\n plutusScript,\n policyId: resolveScriptHash(cbor, \"V3\"),\n address: this.toAddress(plutusScript),\n };\n }\n\n async issuanceCborHexMint(utxo_reference: TxInput) {\n const { cbor, plutusScript } = this.build(\n \"issuance_cbor_hex_mint.issuance_cbor_hex_mint.mint\",\n [this.txRef(utxo_reference)],\n );\n return {\n cbor,\n plutusScript,\n policyId: resolveScriptHash(cbor, \"V3\"),\n address: this.toAddress(plutusScript),\n };\n }\n\n async programmableLogicBase(params: ProtocolBootstrapParams | string) {\n const paramScriptHash = this.resolveParam(\n params,\n (p) => p.programmableLogicGlobalParams.scriptHash!,\n \"could not resolve logic base parameter\",\n );\n const { cbor, plutusScript } = this.build(\n \"programmable_logic_base.programmable_logic_base.spend\",\n [conStr1([byteString(paramScriptHash)])],\n );\n return { cbor, plutusScript, policyId: resolveScriptHash(cbor, \"V3\") };\n }\n\n async programmableLogicGlobal(params: ProtocolBootstrapParams | string) {\n const paramScriptHash = this.resolveParam(\n params,\n (p) => p.protocolParams.scriptHash!,\n \"could not resolve logic global parameter\",\n );\n const { cbor, plutusScript } = this.build(\n \"programmable_logic_global.programmable_logic_global.withdraw\",\n [byteString(paramScriptHash)],\n );\n const scriptHash = resolveScriptHash(cbor, \"V3\");\n return {\n cbor,\n plutusScript,\n scriptHash,\n rewardAddress: scriptHashToRewardAddress(scriptHash, this.networkID),\n };\n }\n\n async protocolParamMint(utxo_reference: TxInput) {\n const { cbor, plutusScript } = this.build(\n \"protocol_params_mint.protocol_params_mint.mint\",\n [this.txRef(utxo_reference)],\n );\n const scriptHash = resolveScriptHash(cbor, \"V3\");\n return {\n cbor,\n plutusScript,\n scriptHash,\n address: this.toAddress(plutusScript),\n };\n }\n\n async registryMint(params: ProtocolBootstrapParams | string, utxo?: TxInput) {\n const paramScriptHash =\n typeof params === \"string\"\n ? params\n : params.directoryMintParams.issuanceScriptHash;\n const txInput =\n typeof params === \"string\" ? utxo! : params.directoryMintParams.txInput;\n if (!txInput)\n throw new Error(\"register mint utxo parameter could not resolve\");\n if (!paramScriptHash)\n throw new Error(\"registry mint param script hash could not resolve\");\n const { cbor, plutusScript } = this.build(\n \"registry_mint.registry_mint.mint\",\n [this.txRef(txInput), byteString(paramScriptHash)],\n );\n return { cbor, plutusScript, policyId: resolveScriptHash(cbor, \"V3\") };\n }\n\n async registrySpend(params: ProtocolBootstrapParams | string) {\n const paramScriptHash = this.resolveParam(\n params,\n (p) => p.protocolParams.scriptHash,\n \"could not resolve params for registry spend\",\n );\n const { cbor, plutusScript } = this.build(\n \"registry_spend.registry_spend.spend\",\n [byteString(paramScriptHash)],\n );\n return {\n cbor,\n plutusScript,\n policyId: resolveScriptHash(cbor, \"V3\"),\n address: this.toAddress(plutusScript, \"\"),\n };\n }\n}\n\nexport class SubStandardScripts {\n constructor(private readonly networkID: number) {}\n\n private buildRaw(validatorName: string) {\n const _cbor = cborEncode(findValidator(validatorName, false));\n const plutusScript: PlutusScript = { code: _cbor, version: \"V3\" };\n const policyId = resolveScriptHash(_cbor, \"V3\");\n const rewardAddress = scriptHashToRewardAddress(policyId, this.networkID);\n return { _cbor, plutusScript, policyId, rewardAddress };\n }\n\n private buildWithParams(validatorName: string, params: object[]) {\n const _cbor = findValidator(validatorName, false);\n const cbor = applyParamsToScript(_cbor, params, \"JSON\");\n const plutusScript: PlutusScript = { code: cbor, version: \"V3\" };\n const policyId = resolveScriptHash(cbor, \"V3\");\n const rewardAddress = scriptHashToRewardAddress(policyId, this.networkID);\n return { cbor, plutusScript, policyId, rewardAddress };\n }\n\n private txRef(utxo: TxInput) {\n return conStr(0, [byteString(utxo.txHash), integer(utxo.outputIndex)]);\n }\n\n async issue() {\n return this.buildRaw(\"transfer.issue.withdraw\");\n }\n\n async transfer() {\n return this.buildRaw(\"transfer.transfer.withdraw\");\n }\n\n async blacklistSpend(blacklistNodePolicyId: string) {\n const { cbor, plutusScript, policyId } = this.buildWithParams(\n \"blacklist_spend.blacklist_spend.spend\",\n [byteString(blacklistNodePolicyId)],\n );\n const address = serializePlutusScript(\n plutusScript,\n \"\",\n this.networkID,\n false,\n ).address;\n return { cbor, plutusScript, address, policyId };\n }\n\n async blacklistMint(bootstraptxInput: TxInput, adminPubkeyHash: string) {\n return this.buildWithParams(\"blacklist_mint.blacklist_mint.mint\", [\n this.txRef(bootstraptxInput),\n byteString(adminPubkeyHash),\n ]);\n }\n\n async issuerAdmin(adminPubKeyHash: string) {\n return this.buildWithParams(\n \"example_transfer_logic.issuer_admin_contract.withdraw\",\n [conStr(0, [byteString(adminPubKeyHash)])],\n );\n }\n\n async customTransfer(\n programmableLogicBaseScriptHash: string,\n blacklistNodePolicyId: string,\n ) {\n const { cbor, plutusScript, policyId, rewardAddress } =\n this.buildWithParams(\"example_transfer_logic.transfer.withdraw\", [\n conStr1([byteString(programmableLogicBaseScriptHash)]),\n byteString(blacklistNodePolicyId),\n ]);\n return { cbor, plutusScript, policyId, rewardAddress };\n }\n}\n","import cbor from \"cbor\";\nimport subStandardPlutusScriptFreeze from \"../aiken-workspace-subStandard/freeze-and-seize/plutus.json\";\nimport subStandardPlutusScriptDummy from \"../aiken-workspace-subStandard/dummy/plutus.json\";\nimport standardPlutusScript from \"../aiken-workspace-standard/plutus.json\";\nimport {\n BlacklistBootstrap,\n BlacklistDatum,\n RegistryCredential,\n RegistryDatum,\n} from \"./type\";\nimport { deserializeAddress } from \"@meshsdk/core-cst\";\nimport { deserializeDatum, IFetcher, IWallet, UTxO } from \"@meshsdk/core\";\nimport { resolveBlacklistScripts } from \"./resolvers\";\n\nexport const findValidator = (\n validatorName: string,\n isStandard: boolean = true,\n): string => {\n const sources = isStandard\n ? [standardPlutusScript]\n : [subStandardPlutusScriptFreeze, subStandardPlutusScriptDummy];\n\n for (const script of sources) {\n const match = script.validators.find(\n ({ title }) => title === validatorName,\n );\n if (match) return match.compiledCode;\n }\n\n throw new Error(`Validator ${validatorName} not found`);\n};\n\nexport const cborEncode = (cbor_param: string) => {\n const _cbor = cbor.encode(Buffer.from(cbor_param, \"hex\")).toString(\"hex\");\n return _cbor;\n};\n\nexport const walletConfig = async (wallet: IWallet) => {\n const changeAddress = await wallet.getChangeAddress();\n const walletUtxos = await wallet.getUtxos();\n const collateral = (await wallet.getCollateral())[0];\n if (!collateral) throw new Error(\"No collateral available\");\n if (!walletUtxos) throw new Error(\"Wallet is empty\");\n return { changeAddress, walletUtxos, collateral };\n};\n\nfunction extractBytes(field: any): string {\n if (!field) return \"\";\n if (typeof field === \"string\") return field;\n if (field.bytes) return field.bytes;\n if (field.fields && field.fields.length > 0) {\n const inner = field.fields[0];\n if (typeof inner === \"string\") return inner;\n if (inner?.bytes) return inner.bytes;\n }\n return \"\";\n}\n\nexport function parseRegistryDatum(datum: any): RegistryDatum | null {\n if (!datum?.fields || datum.fields.length < 5) {\n return null;\n }\n\n const getCredential = (field: any): RegistryCredential => {\n return {\n hash: extractBytes(field),\n index: field.constructor ?? 0,\n };\n };\n\n return {\n key: extractBytes(datum.fields[0]),\n next: extractBytes(datum.fields[1]),\n transferScript: getCredential(datum.fields[2]),\n thirdPartyScript: getCredential(datum.fields[3]),\n metadata: extractBytes(datum.fields[4]),\n };\n}\n\nexport function parseBlacklistDatum(datum: any): BlacklistDatum | null {\n if (!datum?.fields || datum.fields.length < 2) {\n return null;\n }\n return {\n key: extractBytes(datum.fields[0]),\n next: extractBytes(datum.fields[1]),\n };\n}\n\nexport const selectProgrammableTokenUtxos = async (\n senderProgTokenUtxos: UTxO[],\n unit: string,\n amount: number,\n) => {\n const selectedUtxos: UTxO[] = [];\n let selectedAmount = 0;\n for (const utxo of senderProgTokenUtxos) {\n if (selectedAmount >= amount) break;\n const tokenAsset = utxo.output.amount.find((a) => a.unit === unit);\n if (tokenAsset) {\n selectedUtxos.push(utxo);\n selectedAmount += Number(tokenAsset.quantity);\n }\n }\n const returningAmount = selectedAmount - amount;\n return { selectedUtxos, returningAmount };\n};\n\nexport const isAddressBlacklisted = async (\n address: string,\n blacklistBootstrap: BlacklistBootstrap,\n NetworkId: 0 | 1,\n fetcher: IFetcher,\n): Promise<boolean> => {\n const stakeCredential = deserializeAddress(address)\n .asBase()\n ?.getStakeCredential().hash;\n\n if (!stakeCredential) return false;\n\n const { blacklistSpend } = await resolveBlacklistScripts(\n NetworkId,\n blacklistBootstrap.blacklistMintBootstrap.txInput,\n blacklistBootstrap.blacklistMintBootstrap.adminPubKeyHash,\n );\n\n const blacklistUtxos = await fetcher.fetchAddressUTxOs(\n blacklistSpend.address,\n );\n\n return blacklistUtxos.some((utxo: UTxO) => {\n if (!utxo.output.plutusData) return false;\n const datum = parseBlacklistDatum(deserializeDatum(utxo.output.plutusData));\n return datum?.key === stakeCredential;\n });\n};\n","{\n \"preamble\": {\n \"title\": \"cip113/freeze-unfreeze\",\n \"description\": \"CIP113 Sub Standard for freeze/unfreeze capabilities\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.21+42babe5\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"blacklist_mint.blacklist_mint.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/types~1BlacklistRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"manager_pkh\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281\",\n \"hash\": \"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe\"\n },\n {\n \"title\": \"blacklist_mint.blacklist_mint.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"manager_pkh\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"590e9e0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a6600692123657870656374205b6e6f64655f6f75747075745d203d206e6f64655f6f75747075747300168a99801a4924657870656374205b5061697228746e2c20717479295d203d20746f6b656e5f706169727300168a99801a493465787065637420636f766572696e675f6e6f64653a20426c61636b6c6973744e6f6465203d20636f766572696e675f646174756d00168a99801a4925657870656374205b636f766572696e675f696e7075745d203d206e6f64655f696e7075747300168a99801a4927657870656374205b6f75747075745f6e6f64655f6f75745d203d206e6f64655f6f75747075747300168a99801a4926657870656374205b6e6f64655f612c206e6f64655f625d203d20696e7075745f646174756d7300168a99801a4922657870656374206e6f64653a20426c61636b6c6973744e6f6465203d20646174756d00168a99801a491b72656465656d65723a20426c61636b6c69737452656465656d657200164888888896600264653001301200198091809800cdc3a400130120024888966002600460246ea800e264b30010058999119912cc004c01c0062b30013018375401300280620328acc004c010006264b3001001806c4c96600200300e807403a01d13259800980f801c01601e80e0dd7000a03e301c001406860306ea80262b300130030018992cc00400601b13259800800c03a01d00e80744c966002603e007005807a038375c00280f8c07000501a180c1baa009806202a405480a8660024603460360032301a301b301b0019b804800a460346036603660366036003223232330010010042259800800c00e2646644b30013372200e00515980099b8f0070028800c01901b44cc014014c08801101b1bae301b00137566038002603c00280e052f5bded8c1222598009804180c1baa0038992cc00400600513259800800c00e007003801c4cc89660020030058992cc00400600d006803401a264b30013023003804401d0201bae001408c604000280f0dd7000980f8012040301d001406c60326ea800e00280b244646600200200644b30010018a5eb822660386006603a00266004004603c00280da46034603660366036603660366036603660360032232330010010032259800800c528456600260066eb8c0740062946266004004603c00280b901b4c054dd5003c88c8cc00400400c896600200314a11598009801980e800c528c4cc008008c078005017203648888888888a600266446644b3001002899813a60101800033027374e00297ae08992cc004c8cc00400400c896600200314a315980099baf302b302837546056002007133002002302c0018a504094814a2660506e9c00ccc0a0dd380125eb822a66048921776578706563740a20202020202020206c6973742e616c6c280a202020202020202020206e6f64655f6f7574707574732c0a20202020202020202020666e286f757470757429207b206f75747075742e61646472657373203d3d2065787065637465645f61646472657373207d2c0a2020202020202020290016408c6050604a6ea8c03cc094dd51814001204c330023758604c60466ea80448cc008dd5980718121baa300e30243754002022660046eb0c030c08cdd50089198011bab300e3024375400202244646600200200644b30010018a5eb8226644b3001300500289981480119802002000c4cc01001000502418140009814800a04c2232330010010032259800800c52844c96600266e44010006266e3c01000626600600660540048118dd718121814000a04c912cc0040062900044c02ccc008008c09c005024489660020031480022601666004004604e0028122464b3001300e30223754003130263023375400315330214912465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164080601660446ea80064446466446600400400244b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204e8998028029817002204e375c604e0026eb4c0a0004c0a8005028198058020018a4000911114c004dd61814802cdd618149815002cc010012600600722230159800801c00a0028021222223259800980d806c566002660186eb0c0bcc0b0dd500d119baf3030302d375400206b159800992cc00401a051132598009819003c4c966002b30010098a518a5040c115980099b8f375c6064605e6ea8005221008acc004cdc79bae3019302f375400291011effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008cc00400e039488100401514a08162294102c452820583300300101b814a05e303000640b86eacc04cc0b0dd500d4528c54cc0a924015076616c69646174655f626c61636b6c6973745f696e6974286e6f64655f696e707574732c206e6f64655f6f7574707574732c2073656c662e6d696e742c20706f6c6963795f696429203f2046616c73650014a0814a2a660549217d6578706563740a202020202020202020206c6973742e616e79280a20202020202020202020202073656c662e696e707574732c0a202020202020202020202020666e28696e70757429207b20696e7075742e6f75747075745f7265666572656e6365203d3d207574786f5f726566207d2c0a2020202020202020202029001640a5159800980c006c4cc89660020110268992cc004c0cc026264b30010018cc004006264b30015980099b87371a00a901c4528c54cc0bd2412e6275696c74696e2e6c656e6774685f6f665f627974656172726179286b657929203d3d203238203f2046616c73650014a081722b3001598008024528c54cc0bd2401166d616e616765725f7369676e6564203f2046616c73650014a081722b300159800cc004dd5980c18189baa01f80f40150074528c54cc0bd2401186a7573745f73696e676c655f6d696e74203f2046616c73650014a081722b30015980099b90375c606860626ea800801629462a6605e9212c6279746561727261795f6c7428636f766572696e675f6e6f64652e6b65792c206b657929203f2046616c73650014a081722b30015980099b90005375c603660626ea800a29462a6605e9212d6279746561727261795f6c74286b65792c20636f766572696e675f6e6f64652e6e65787429203f2046616c73650014a081722b300159800980e1804800c528c54cc0bd2401266c6973742e6c656e677468286f75747075745f6e6f64657329203d3d2032203f2046616c73650014a081722b3001598009980880092cc004cdc79bae3035303237540026eb8c0d4c0c8dd5001c4cdc79bae301c3032375400200d14a0817a29462a6605e92011e626c61636b6c6973745f6e6f64655f75706461746564203f2046616c73650014a081722b30013301100125980099b8f375c606a60646ea800401a266e3cdd7180e18191baa001375c603860646ea800e294102f4528c54cc0bd2411f626c61636b6c6973745f6e6f64655f696e736572746564203f2046616c73650014a08172294102e4528205c8a5040b914a08172294102e4528205c8a5040b86602801246600c00203d0294055029814c0a605281a8c02cc064c0bcdd5000c09d0301818804205e375c605e60586ea8074cc038dd6180798161baa01a23371e002053198009bae302f302c375403b3300e3758601e60586ea80688cdc7800814ccc0400188c96600200319800800c4006046809a047023811c08d0331804980b98169baa001488966002003025899912cc00400604f13259800981b00145660020170298992cc004c0dc032264b300159800803c528c54cc0c92401166d616e616765725f7369676e6564203f2046616c73650014a0818a2b30015980099b8798009bab301b30343754045021804201e4800629462a66064921186a7573745f73696e676c655f6275726e203f2046616c73650014a0818a2b3001301f300c00e8acc0056600266e3cdd7181b981a1baa0050088acc004cdc79bae3037303437540026eb8c0dcc0d0dd5001c56600266e3cdd7180f181a1baa001375c603c60686ea8016266e3cdd7180f181a1baa0030088a5040c514a0818a2b30013371e6eb8c0dcc0d0dd5001804456600266e3cdd7181b981a1baa001375c606e60686ea80162b30013371e6eb8c078c0d0dd50009bae301e3034375400713371e6eb8c078c0d0dd5002804452820628a5040c515330324901274e65697468657220696e707574206d61746368657320746865206b657920746f2072656d6f7665001640c4818a29462a660649210e636865636b73203f2046616c73650014a0818a2941031452820628a5040c46601000204102a40d0606a016819a0508198c0d000503218190009819800a060205240a44464b3001301932330010010022259800800c52000899914c004dd718188014dd598190014896600200310038991991180f99802802981d8021bae3034001375a606a002606e00281a922233001001002181980099801001181a000a0628992cc004c06cc018006264b30010018cc0040062b3001337206eb8c0ccc0c0dd50009bae301a3030375400315980080140aa264b300130350038992cc004c078dd698190014566002b30013371e0026eb8c0d4c0c8dd5001c528c4cdc7800a4410040bd10038a998182492d65787065637420746e203d3d206e6f64652e6b6579207c7c20746e203d3d206f726967696e5f6e6f64655f746e001640bd15330304910f65787065637420717479203d3d2031001640bc6eb8c0c00060568190c0cc009031454cc0b9240128657870656374206279746561727261795f6c74286e6f64652e6b65792c206e6f64652e6e65787429001640b50254055025812c09604a81a8c02c0122a6605a92012265787065637420646963742e73697a65286e6f64655f746f6b656e7329203d3d2031001640b066028002005153302c49012665787065637420636f756e745f756e697175655f746f6b656e732876616c756529203d3d2032001640ac6eacc05cc0b4dd500103015375400e6e1d2002370e900240220110088042032375c602c60266ea800e2c80806024002601a6ea804e293454cc02d2411856616c696461746f722072657475726e65642066616c7365001365640281\",\n \"hash\": \"1693ffa822bd92dd0f194e0d09d5e2728663d07463c03bf6b074c7fe\"\n },\n {\n \"title\": \"blacklist_spend.blacklist_spend.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"blacklist_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081\",\n \"hash\": \"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66\"\n },\n {\n \"title\": \"blacklist_spend.blacklist_spend.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"blacklist_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"58c1010100229800aba2aba1aab9faab9eaab9dab9cab9a9bae0024888888896600264646644b30013370e900118041baa0018994c004c0300066018601a0032259800800c52844c96600266e44024006266e3c02400626600600660200048050dd718059807000a01a4888cc004004dd59807980818081808180818069baa300f00818049baa0018b200c30090013009300a001300900130053754013149a2a660069211856616c696461746f722072657475726e65642066616c7365001365640081\",\n \"hash\": \"2430d6ffbe8bd961e496fd22a08686ff9bd27643bc15f6f78c937e66\"\n },\n {\n \"title\": \"example_transfer_logic.issuer_admin_contract.withdraw\",\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"permitted_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041\",\n \"hash\": \"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4\"\n },\n {\n \"title\": \"example_transfer_logic.issuer_admin_contract.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"permitted_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"590121010100229800aba2aba1aba0aab9faab9eaab9dab9cab9a4888888896600264653001300900198049805000cc0240092225980099b8748010c020dd500144c96600266e1d20003009375402113232330010013758601e6020602060206020602060206020602060186ea8010896600200314a115980099b8f375c602000200714a3133002002301100140288070dd7180698051baa01089919198008009bab300f301030103010301030103010300c375400844b30010018a508acc004cdd798061808000801c528c4cc008008c04400500a201c3374a900119806180698051baa0104bd70200e300c30093754005164018300900130043754013149a2a6600492011856616c696461746f722072657475726e65642066616c7365001365640041\",\n \"hash\": \"ec10bc8537367b5f3169268e25069beee7c6767770984c90c14c3dd4\"\n },\n {\n \"title\": \"example_transfer_logic.transfer.withdraw\",\n \"redeemer\": {\n \"title\": \"proofs\",\n \"schema\": {\n \"$ref\": \"#/definitions/List<types~1BlacklistProof>\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"programmable_logic_base_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n },\n {\n \"title\": \"blacklist_node_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601\",\n \"hash\": \"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c\"\n },\n {\n \"title\": \"example_transfer_logic.transfer.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"programmable_logic_base_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n },\n {\n \"title\": \"blacklist_node_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59071d0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae00248888888888cc896600264653001300c00198061806800cdc3a4009300c0024888966002600460186ea800e264b300100580440222646466002002004446644b30010038992cc004c8cc004004dd5980c180c980c980c980c980c980c980c980c980c980a9baa0092259800800c528456600264b3001300c3016375400313375e6034602e6ea800402a2941014180a980c800c528c4cc008008c068005013202e8994c004c00400644b30010018a518acc004cdc3a4004602c6ea8c068006266004004603600314a080a10184dd61801180a9baa0094888cc008008ca600200332330010013758603a60346ea8038896600200314bd7044cc896600266ebcc080c074dd51810180e9baa300a301d375400404b13322598009806980f1baa0028992cc004c038c07cdd5000c4c966002601e60406ea8006266046604860426ea8004016266046604860426ea800401501e181198101baa001801203a3022301f375400500140706014603a6ea8c080c074dd51805180e9baa00210018800a034301e00133002002301f001407100b4004444b30010028a5eb822b30010018a5eb8226603b30013322598009805980e1baa0018992cc0056600266e212000323322330020020012259800800c00e2646644b3001337229101000028acc004cdc7a441000028800c01902144cc014014c0a00110211bae3021001375a604400260480028110c8c8cc004004dd5980718109baa0042259800800c00e2646644b30013372204200515980099b8f0210028800c01902244cc014014c0a40110221bae302200137566046002604a002811852f5bded8c0290004528c4c8cc004004c8cc004004dd5980698101baa0032259800800c52f5c113233223322330020020012259800800c400e264660526e9ccc0a4dd4802998149813000998149813800a5eb80cc00c00cc0ac008c0a40050271bab3024003375c604200266006006604c00460480028110896600200314a115980099b8f375c60466eb0c08c0040722946266004004604800280e902120368992cc0040062b3001300d301e375400313259800800c06e264b300100180e407203901c899912cc00400603d13259800800c07e03f01f80fc4c966002605200715980099b90375c6050604a6ea801c02a266e40028dd7180918129baa0078a50408902040986eb80050291813000a048375c002604a0048130c08c005021180f9baa00180d203880d406a03501a409064b30013014301e375400313022301f3754003153301d49012465787065637420496e6c696e65446174756d286429203d206f75747075742e646174756d00164070604260446044603c6ea80062a660389201ff6578706563740a20202020202020207175616e746974795f6f66286e6f64655f6f75747075742e76616c75652c20626c61636b6c6973745f6e6f64655f63732c20222229203e2030207c7c202f2f20436865636b20666f7220616e7920746f6b656e2066726f6d207468697320706f6c6963792028736f6d6520696d706c656d656e746174696f6e732075736520746f6b656e206e616d6573290a20202020202020206c6973742e616e79280a202020202020202020206173736574732e666c617474656e286e6f64655f6f75747075742e76616c7565292c0a20202020202020202020666e28617373657429207b0a2020202020202020202020206c657453202863732c205f746e2c205f71747929203d2061737365740a2020202020202020202020206373203d3d20626c61636b6c6973745f6e6f64655f63730a202020202020202020207d2c0a2020202020202020290016406c6014603a6ea8c080c074dd5000c54cc06d24013c65787065637420536f6d65287265665f696e70757429203d206c6973742e6174287265666572656e63655f696e707574732c206e6f64655f69647829001640686eb8c078008c96600266e2000520008a6103d87a8000899803802800a032375a603c60366ea8c07800698103d87a8000a60103d879800040613001003980f8014c07c005003203840702225980080145300103d87a80008acc004c014006266e95200033019301a0024bd70466002007301b00299b80001480050032028406114a080888c05cc060006264b30010018acc004c008c04cdd5000c4c96600200300f8992cc00400602101080844c966002603600713006301b007808a030375a003010406c603000280b0c050dd5000c039011403a01d00e80720323016003405060040046e1d2000375800b00880420263010300d3754007164028300c0013007375401b149a2a6600a92011856616c696461746f722072657475726e65642066616c7365001365640102a6600692012d657870656374206e6f64653a2074797065732e426c61636b6c6973744e6f6465203d20646174756d5f64617461001615330034911c70726f6f66733a204c6973743c426c61636b6c69737450726f6f663e001601\",\n \"hash\": \"7bb4d341b24f9ca7a59dcb60bb55b2871bd422c06a89f958c7602b4c\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"title\": \"ByteArray\",\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"List<types/BlacklistProof>\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/types~1BlacklistProof\"\n }\n },\n \"aiken/crypto/ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"aiken/crypto/VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1crypto~1VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1crypto~1ScriptHash\"\n }\n ]\n }\n ]\n },\n \"cardano/assets/PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"cardano/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"types/BlacklistProof\": {\n \"title\": \"BlacklistProof\",\n \"description\": \"Proof of blacklist membership or non-membership\",\n \"anyOf\": [\n {\n \"title\": \"NonmembershipProof\",\n \"description\": \"Proof of non-membership via covering node\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"node_idx\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"types/BlacklistRedeemer\": {\n \"title\": \"BlacklistRedeemer\",\n \"description\": \"Redeemer for blacklist minting policy (linked list operations)\",\n \"anyOf\": [\n {\n \"title\": \"BlacklistInit\",\n \"description\": \"Initialize the blacklist with the origin node\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"BlacklistInsert\",\n \"description\": \"Insert a credential into the blacklist\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"key\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n },\n {\n \"title\": \"BlacklistRemove\",\n \"description\": \"Remove a credential from the blacklist\",\n \"dataType\": \"constructor\",\n \"index\": 2,\n \"fields\": [\n {\n \"title\": \"key\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n }\n }\n}","{\n \"preamble\": {\n \"title\": \"wsc-poc/aiken-policy\",\n \"description\": \"Aiken contracts for project 'wsc-poc/aiken-policy'\",\n \"version\": \"0.0.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.19+e525483\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"transfer.issue.withdraw\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"compiledCode\": \"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011\",\n \"hash\": \"a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950\"\n },\n {\n \"title\": \"transfer.issue.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"compiledCode\": \"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008906400980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011\",\n \"hash\": \"a82718805c3541469346431c0cc023a76afce8d6d2c1c64d00bf1950\"\n },\n {\n \"title\": \"transfer.transfer.withdraw\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Int\"\n }\n },\n \"compiledCode\": \"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011\",\n \"hash\": \"93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd\"\n },\n {\n \"title\": \"transfer.transfer.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"compiledCode\": \"585701010029800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900218031baa00289919b87375a6012008904801980418039baa0028a504014600c600e002600c004600c00260066ea801a29344d9590011\",\n \"hash\": \"93fd90884c772ced27987503f9d37c857372b99cf5cc716197ebb8bd\"\n }\n ],\n \"definitions\": {\n \"Int\": {\n \"dataType\": \"integer\"\n }\n }\n}","{\n \"preamble\": {\n \"title\": \"iohk/programmable-tokens\",\n \"description\": \"Aiken implementation of CIP-0143 programmable tokens (migrated from Plutarch)\",\n \"version\": \"0.3.0\",\n \"plutusVersion\": \"v3\",\n \"compiler\": {\n \"name\": \"Aiken\",\n \"version\": \"v1.1.21+42babe5\"\n },\n \"license\": \"Apache-2.0\"\n },\n \"validators\": [\n {\n \"title\": \"always_fail.always_fail.spend\",\n \"datum\": {\n \"title\": \"_d\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_r\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"_nonce\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"585f010100229800aba2aba1aab9eaab9dab9a9bae00248888896600264653001300700198039804000cc01c0092225980099b8748008c020dd500144c8cc898c02c004c02cc030004c024dd50014590070c01c004c010dd5003c52689b2b20041\",\n \"hash\": \"e9d8d9c7fc531f0b179d502c86bffee829613c537794dab053ae28fe\"\n },\n {\n \"title\": \"always_fail.always_fail.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"_nonce\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"585f010100229800aba2aba1aab9eaab9dab9a9bae00248888896600264653001300700198039804000cc01c0092225980099b8748008c020dd500144c8cc898c02c004c02cc030004c024dd50014590070c01c004c010dd5003c52689b2b20041\",\n \"hash\": \"e9d8d9c7fc531f0b179d502c86bffee829613c537794dab053ae28fe\"\n },\n {\n \"title\": \"issuance_cbor_hex_mint.issuance_cbor_hex_mint.mint\",\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"always_fail_hash\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5903d30101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d20043011375400313259800980598091baa0018991919912cc004c06c00e2b300132330010013758603660306ea803c896600200314a115980099baf301c30193754603800204314a3133002002301d001405c80d22b30013371e6eb8c0680212210f49737375616e636543626f72486578008acc004cdc39bad301a301b0084800a266ebcc068c05cdd500398051980c99ba548008cc064dd480a25eb80cc065300103d87a80004bd704528202a8a50405514a080aa2c80c0dd7180c0009bae3018002301800130133754003164044602a60246ea80062c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c1104f49737375616e636543626f72486578004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401\",\n \"hash\": \"7a52b5d9171439e64fa0df2d49ca7487d369e146f697553feba95426\"\n },\n {\n \"title\": \"issuance_cbor_hex_mint.issuance_cbor_hex_mint.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"always_fail_hash\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"5903d30101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d20043011375400313259800980598091baa0018991919912cc004c06c00e2b300132330010013758603660306ea803c896600200314a115980099baf301c30193754603800204314a3133002002301d001405c80d22b30013371e6eb8c0680212210f49737375616e636543626f72486578008acc004cdc39bad301a301b0084800a266ebcc068c05cdd500398051980c99ba548008cc064dd480a25eb80cc065300103d87a80004bd704528202a8a50405514a080aa2c80c0dd7180c0009bae3018002301800130133754003164044602a60246ea80062c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c1104f49737375616e636543626f72486578004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401\",\n \"hash\": \"7a52b5d9171439e64fa0df2d49ca7487d369e146f697553feba95426\"\n },\n {\n \"title\": \"issuance_mint.issuance_mint.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/types~1SmartTokenMintingAction\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"programmable_logic_base\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n },\n {\n \"title\": \"minting_logic_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"5903b30101002229800aba2aba1aba0aab9faab9eaab9dab9a488888896600264653001300800198041804800cdc3a400130080024888966002600460106ea800e2664464b30013005300b375400f132598009808800c4c8c96600260100031323259800980a801401a2c8090dd7180980098079baa0028acc004c01400626464b300130150028034590121bae3013001300f37540051640348068c034dd50009808000c5900e18061baa0078b2014132598009808000c4c8c96600266ebcc044c038dd500480a4566002646600200264660020026eacc04cc050c050c050c050c050c050c040dd5004112cc004006297ae08998099808180a00099801001180a800a0242259800800c528456600266ebcc04c00405a294626600400460280028071011456600260086530010019bab3012301330133013301330133013301330133013300f375400f480010011112cc00400a200319800801cc05400a64b3001300b30113754602200315980099baf301200100d899b800024800a2004808220048080c05000900320248acc004c010c8cc0040040108966002003148002266e012002330020023014001404515980099b88480000062664464b3001300a30103754003159800980518081baa30143011375400315980099baf301430113754602860226ea800c062266e1e60026eacc008c044dd5001cdd7180a002c520004888cc88cc004004008c8c8cc004004014896600200300389919912cc004cdc8808801456600266e3c04400a20030064061133005005301e00440606eb8c05c004dd5980c000980d000a03014bd6f7b630112cc00400600713233225980099b910070028acc004cdc78038014400600c80ba26600a00a603a00880b8dd7180b0009bad30170013019001405c0048a50403d16403d16403c600260206ea8c04cc040dd500118089bac301130123012300e375400c46024602600315980099b880014800229462c806100c452820188a50403114a08062294100c1bad3010301100130103758601e003164034646600200264660020026eacc040c044c044c044c044c034dd5002912cc004006297ae08991991199119801001000912cc004006200713233016374e6602c6ea4014cc058c04c004cc058c0500052f5c0660060066030004602c00280a0dd598088019bae300e0013300300330130023011001403c44b30010018a5eb8226644b30013371e6eb8c04800801a2660226e9c008cc0100100062660080080028068dd618080009808800a01c375c601860126ea800cdc3a400516401c300800130033754011149a26cac80081\",\n \"hash\": \"a5ed4b4e7813e17eec3b66f64dc5f2c6d11d62e7120d90a0f0acf450\"\n },\n {\n \"title\": \"issuance_mint.issuance_mint.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"programmable_logic_base\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n },\n {\n \"title\": \"minting_logic_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"5903b30101002229800aba2aba1aba0aab9faab9eaab9dab9a488888896600264653001300800198041804800cdc3a400130080024888966002600460106ea800e2664464b30013005300b375400f132598009808800c4c8c96600260100031323259800980a801401a2c8090dd7180980098079baa0028acc004c01400626464b300130150028034590121bae3013001300f37540051640348068c034dd50009808000c5900e18061baa0078b2014132598009808000c4c8c96600266ebcc044c038dd500480a4566002646600200264660020026eacc04cc050c050c050c050c050c050c040dd5004112cc004006297ae08998099808180a00099801001180a800a0242259800800c528456600266ebcc04c00405a294626600400460280028071011456600260086530010019bab3012301330133013301330133013301330133013300f375400f480010011112cc00400a200319800801cc05400a64b3001300b30113754602200315980099baf301200100d899b800024800a2004808220048080c05000900320248acc004c010c8cc0040040108966002003148002266e012002330020023014001404515980099b88480000062664464b3001300a30103754003159800980518081baa30143011375400315980099baf301430113754602860226ea800c062266e1e60026eacc008c044dd5001cdd7180a002c520004888cc88cc004004008c8c8cc004004014896600200300389919912cc004cdc8808801456600266e3c04400a20030064061133005005301e00440606eb8c05c004dd5980c000980d000a03014bd6f7b630112cc00400600713233225980099b910070028acc004cdc78038014400600c80ba26600a00a603a00880b8dd7180b0009bad30170013019001405c0048a50403d16403d16403c600260206ea8c04cc040dd500118089bac301130123012300e375400c46024602600315980099b880014800229462c806100c452820188a50403114a08062294100c1bad3010301100130103758601e003164034646600200264660020026eacc040c044c044c044c044c034dd5002912cc004006297ae08991991199119801001000912cc004006200713233016374e6602c6ea4014cc058c04c004cc058c0500052f5c0660060066030004602c00280a0dd598088019bae300e0013300300330130023011001403c44b30010018a5eb8226644b30013371e6eb8c04800801a2660226e9c008cc0100100062660080080028068dd618080009808800a01c375c601860126ea800cdc3a400516401c300800130033754011149a26cac80081\",\n \"hash\": \"a5ed4b4e7813e17eec3b66f64dc5f2c6d11d62e7120d90a0f0acf450\"\n },\n {\n \"title\": \"programmable_logic_base.programmable_logic_base.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"stake_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"588b010100229800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900118031baa0018994c004c02400660126014003225980099baf3009300b00100e8a518998010011806000a0104888cc004004dd5980618069806980698069806980698059baa300c00818039baa0018b200a30060013006300700130060013003375400d149a26cac8009\",\n \"hash\": \"be1e5967da54825149611a725eddea8664c1898a98bcf54f05f6728a\"\n },\n {\n \"title\": \"programmable_logic_base.programmable_logic_base.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"stake_cred\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n }\n ],\n \"compiledCode\": \"588b010100229800aba2aba1aab9eaab9dab9a4888896600264646644b30013370e900118031baa0018994c004c02400660126014003225980099baf3009300b00100e8a518998010011806000a0104888cc004004dd5980618069806980698069806980698059baa300c00818039baa0018b200a30060013006300700130060013003375400d149a26cac8009\",\n \"hash\": \"be1e5967da54825149611a725eddea8664c1898a98bcf54f05f6728a\"\n },\n {\n \"title\": \"programmable_logic_global.programmable_logic_global.withdraw\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/types~1ProgrammableLogicGlobalRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"params_policy\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590a58010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400930090024888966002600460126ea800e33001300d300a3754007370e90004dc3a4005300937540089111192cc004c01000a264b30013014001899198008009bac301400222325980080140162646644b3001300b002899192cc004c07000a0071640646eb4c068004c058dd5001c56600260140051323259800980e001400e2c80c8dd6980d000980b1baa0038b2028405060266ea80044c008c06000cc058009014180100145901118079baa0098acc004c00c00a26464653001375a602a003375a602a007375a602a0049112cc004c06401200f16405830150013014001300f375401316403480686600246024602660260032300f37540032232598009803000c4c8c966002602e0050048b2028375c602a00260226ea800e2b30013005001899192cc004c05c00a0091640506eb8c054004c044dd5001c5900f201e300f375400523012301300148888c8c966002601860266ea800626466446600e00233001329800800d20009bac30073018375401f2640044444b30010028800c4ca600200b3370000890014c08000e4b30013370e00a00315980099b8f300b300c301d375400401113259800980b180e9baa00189810980f1baa0018b2038300f301d37546018603a6ea800a2c80da2600600280d9005180f00120389180d980e180e180e180e180e180e000c8c06cc070c070c070c070006444b30010018a5189991191980080080291192cc004cdc79bae301e005375c603c00315980099b89375a603e00a6eb4c07c00633001008981180140110084528203a8998018019811801203a3021001301d001301e001406d222329800800c012006800888966002005100189919914c00401a604800b32330010010052259800800c4cc090cdd81ba9004375000697adef6c608994c004dd71811000cdd69811800cc09c0092225980099b9000800389981419bb037520106ea001c0162b30013371e01000719800804401e005233029337606ea4024dd40008014400500d44cc0a0cdd81ba900337500046600c00c00281210240c094005023200c375c603a0026eb4c078004c08000901e24444464b30013012301c375402f198009112cc00400a2003132332298008034c09c016646600200200a44b300100189981399bb037520086e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001000713302b337606ea4020dd3003802c56600266e3c02000e26605666ec0dd48041ba69800803c00a44444600466e0001000d00e000c4cc0accdd81ba9003374c0046600c00c00281390270c0a0005026200c375c60400026eacc084004c08c00902148896600200310028994c0040124b30013375e00400314a313004001408130250024010603e6046002810a603860406eacc014c074dd500a244464664466ebd3001018000374e6530010019bac30273024375403d98009bac3027302437540373756601660486ea806e44464b30013375e605660506ea8c0acc0a0dd500080944c966002603c60506ea8006264b3001301f3029375400313232300700559800981018151baa0018992cc004c8cc004004dd618181818981898189818981898189818981898169baa024225980099b8f375c606200200714a3133002002303200140b1149a2c8150dd7181718159baa0018acc004c0240062934590292052302d302a37540031640a0605860526ea80062c8138c05cc0a0dd5181598141baa001801204c301630273754006801b30013758602c60486ea806e97adef6c609112cc004cdd7981518139baa302a3027375400602313259800980e98139baa0018acc004c074c09cdd5181598141baa00189801802459026459026180b18139baa302a302737540070014094801900111112cc00400a200713298009bae30270019bab302800198158024c0b000d222259800981098159baa00289919911980f8008acc004cdc7801003c566002601a0031323300100100a22325980099b8f00a375c60620031598009980b1bab30320010098cc00403e606c01d007981b001201e8b2060899801801981b001206030340018b205a8b205a375c6060002606060626062002603a602a6eb4c0bcc0b0dd500144c96600266e40dd71818000802c56600266e40014dd718181818800c660020153031009801401d00a45902b45902b180e980a9bad302f302c3754004815060540048140888ca6002003004801a0022225980080144006330010039815801660026054005233008002302c3756602e60506ea80062002802100320509800801c8cdd7800801cc094dd5980498109baa018400c60060068cc004c074dd500bc888ca6002003004a5eb7bdb1810011112cc00400a33001001a5eb7bdb18297adef6c60401113233225980099b900020088cc00401a00333028003004401915980099b8f0020088cc0040126eacc09800e002803a33001004a5eb7bdb18200a80390242048375c60460026050006604c00481224464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204689980280298148022046375c60440026eacc08c004c0940050230a5eb7bdb182453001002800c88888c966002603400300289801800a046337000080068021222233223298009bae30270019813981418141814000cdd698139814001cdd69813801a4444660300062b300132330010013756602260526ea8080896600266ebcc0a4c0b40040162946266004004605c002814226530010019bac301b30293754041002a5eb7bdb1810011111192cc004cdc4801a40011329800800cdd6181898171baa02580440166601e6eacc054c0b8dd5012805400d0011111112cc004cdc48022400115980099baf4c1018000374e00b133017329800800c01200480088896600200510018cc00400e6074005325980099baf303a303737546074606e6ea800408626602e660306eacc098c0dcdd500080980144009035181c801200640dc0051640c51325980099baf303730343754606e60686ea800407a264b30013375e6070606a6ea8004c0e0c0d4dd5001456600266ebcc09cc0d4dd50009813981a9baa0028cc004dd59812181a9baa002808c88a60026eacc09cc0e0dd50024052444b30015980099baf374c00c6e9800e2b30013375e6e98010dd3000c6600266ebcdd30029ba6002a50a5140e514a081ca294103946600201d303f00d98078064c0fc02e6603601400b3301b00200940391640e480d1017459033459033181b80246600200f30380069804002c012007002401c8190c0d8c0dcc0ccdd5181b002a06289919912cc004cdd7981998181baa3033303037540020351300233010005330113756603e60606ea80040322600400a8170a600200f0029801802c00500718188029818802205637009000c590260c050c030004c094010dd69812002101b18010010dd7180c000980c180c8009802980b980a1baa0018b2024300530133754600460266ea8c8cc004004dd61801980a1baa00b22325980099b8f30043005301637540020271001899801801980d001202830180012375c6024602c602e6eacc008c04cdd50009164020300900130043754013149a26cac8011\",\n \"hash\": \"da609c9b93fee7a2cce156f879aa1f800ad05e86c587478026540231\"\n },\n {\n \"title\": \"programmable_logic_global.programmable_logic_global.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"params_policy\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"590a58010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400930090024888966002600460126ea800e33001300d300a3754007370e90004dc3a4005300937540089111192cc004c01000a264b30013014001899198008009bac301400222325980080140162646644b3001300b002899192cc004c07000a0071640646eb4c068004c058dd5001c56600260140051323259800980e001400e2c80c8dd6980d000980b1baa0038b2028405060266ea80044c008c06000cc058009014180100145901118079baa0098acc004c00c00a26464653001375a602a003375a602a007375a602a0049112cc004c06401200f16405830150013014001300f375401316403480686600246024602660260032300f37540032232598009803000c4c8c966002602e0050048b2028375c602a00260226ea800e2b30013005001899192cc004c05c00a0091640506eb8c054004c044dd5001c5900f201e300f375400523012301300148888c8c966002601860266ea800626466446600e00233001329800800d20009bac30073018375401f2640044444b30010028800c4ca600200b3370000890014c08000e4b30013370e00a00315980099b8f300b300c301d375400401113259800980b180e9baa00189810980f1baa0018b2038300f301d37546018603a6ea800a2c80da2600600280d9005180f00120389180d980e180e180e180e180e180e000c8c06cc070c070c070c070006444b30010018a5189991191980080080291192cc004cdc79bae301e005375c603c00315980099b89375a603e00a6eb4c07c00633001008981180140110084528203a8998018019811801203a3021001301d001301e001406d222329800800c012006800888966002005100189919914c00401a604800b32330010010052259800800c4cc090cdd81ba9004375000697adef6c608994c004dd71811000cdd69811800cc09c0092225980099b9000800389981419bb037520106ea001c0162b30013371e01000719800804401e005233029337606ea4024dd40008014400500d44cc0a0cdd81ba900337500046600c00c00281210240c094005023200c375c603a0026eb4c078004c08000901e24444464b30013012301c375402f198009112cc00400a2003132332298008034c09c016646600200200a44b300100189981399bb037520086e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001000713302b337606ea4020dd3003802c56600266e3c02000e26605666ec0dd48041ba69800803c00a44444600466e0001000d00e000c4cc0accdd81ba9003374c0046600c00c00281390270c0a0005026200c375c60400026eacc084004c08c00902148896600200310028994c0040124b30013375e00400314a313004001408130250024010603e6046002810a603860406eacc014c074dd500a244464664466ebd3001018000374e6530010019bac30273024375403d98009bac3027302437540373756601660486ea806e44464b30013375e605660506ea8c0acc0a0dd500080944c966002603c60506ea8006264b3001301f3029375400313232300700559800981018151baa0018992cc004c8cc004004dd618181818981898189818981898189818981898169baa024225980099b8f375c606200200714a3133002002303200140b1149a2c8150dd7181718159baa0018acc004c0240062934590292052302d302a37540031640a0605860526ea80062c8138c05cc0a0dd5181598141baa001801204c301630273754006801b30013758602c60486ea806e97adef6c609112cc004cdd7981518139baa302a3027375400602313259800980e98139baa0018acc004c074c09cdd5181598141baa00189801802459026459026180b18139baa302a302737540070014094801900111112cc00400a200713298009bae30270019bab302800198158024c0b000d222259800981098159baa00289919911980f8008acc004cdc7801003c566002601a0031323300100100a22325980099b8f00a375c60620031598009980b1bab30320010098cc00403e606c01d007981b001201e8b2060899801801981b001206030340018b205a8b205a375c6060002606060626062002603a602a6eb4c0bcc0b0dd500144c96600266e40dd71818000802c56600266e40014dd718181818800c660020153031009801401d00a45902b45902b180e980a9bad302f302c3754004815060540048140888ca6002003004801a0022225980080144006330010039815801660026054005233008002302c3756602e60506ea80062002802100320509800801c8cdd7800801cc094dd5980498109baa018400c60060068cc004c074dd500bc888ca6002003004a5eb7bdb1810011112cc00400a33001001a5eb7bdb18297adef6c60401113233225980099b900020088cc00401a00333028003004401915980099b8f0020088cc0040126eacc09800e002803a33001004a5eb7bdb18200a80390242048375c60460026050006604c00481224464646600200200844b3001001801c4c8cc896600266e4401c00a2b30013371e00e0051001803204689980280298148022046375c60440026eacc08c004c0940050230a5eb7bdb182453001002800c88888c966002603400300289801800a046337000080068021222233223298009bae30270019813981418141814000cdd698139814001cdd69813801a4444660300062b300132330010013756602260526ea8080896600266ebcc0a4c0b40040162946266004004605c002814226530010019bac301b30293754041002a5eb7bdb1810011111192cc004cdc4801a40011329800800cdd6181898171baa02580440166601e6eacc054c0b8dd5012805400d0011111112cc004cdc48022400115980099baf4c1018000374e00b133017329800800c01200480088896600200510018cc00400e6074005325980099baf303a303737546074606e6ea800408626602e660306eacc098c0dcdd500080980144009035181c801200640dc0051640c51325980099baf303730343754606e60686ea800407a264b30013375e6070606a6ea8004c0e0c0d4dd5001456600266ebcc09cc0d4dd50009813981a9baa0028cc004dd59812181a9baa002808c88a60026eacc09cc0e0dd50024052444b30015980099baf374c00c6e9800e2b30013375e6e98010dd3000c6600266ebcdd30029ba6002a50a5140e514a081ca294103946600201d303f00d98078064c0fc02e6603601400b3301b00200940391640e480d1017459033459033181b80246600200f30380069804002c012007002401c8190c0d8c0dcc0ccdd5181b002a06289919912cc004cdd7981998181baa3033303037540020351300233010005330113756603e60606ea80040322600400a8170a600200f0029801802c00500718188029818802205637009000c590260c050c030004c094010dd69812002101b18010010dd7180c000980c180c8009802980b980a1baa0018b2024300530133754600460266ea8c8cc004004dd61801980a1baa00b22325980099b8f30043005301637540020271001899801801980d001202830180012375c6024602c602e6eacc008c04cdd50009164020300900130043754013149a26cac8011\",\n \"hash\": \"da609c9b93fee7a2cce156f879aa1f800ad05e86c587478026540231\"\n },\n {\n \"title\": \"protocol_params_mint.protocol_params_mint.mint\",\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"always_fail_hash\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"59041c0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d2004301137540031332259800980618099baa00289919912cc004c06c00626464b30013011001899192cc004c07c00a0111640706eb8c074004c064dd5001456600266e1d2002001899192cc004c07c00a0111640706eb8c074004c064dd5001459017202e3017375400260340031640606eb8c060004c064004c050dd5001459012180a98091baa00115980099198008009bac30163013375401444b30010018a508acc004cdd7980b980a1baa301700101c8a51899801001180c000a024405515980099b8f375c602a00691010e50726f746f636f6c506172616d73008acc004cdc39bad301530160034800a266ebcc054c048dd500118029980a19ba548008cc050dd4807a5eb80cc051300103d87a80004bd70452820208a50404114a080822c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c10f4e50726f746f636f6c506172616d73004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401\",\n \"hash\": \"b35a80517d8fd4bd767e7b20516fbd913b7a4961383ab29cc4a7d92c\"\n },\n {\n \"title\": \"protocol_params_mint.protocol_params_mint.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"always_fail_hash\",\n \"schema\": {\n \"$ref\": \"#/definitions/ByteArray\"\n }\n }\n ],\n \"compiledCode\": \"59041c0101002229800aba4aba2aba1aba0aab9faab9eaab9dab9a9bae00248888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e26464b300130100018999119912cc004c020c03cdd500144c8c96600266e1d2004301137540031332259800980618099baa00289919912cc004c06c00626464b30013011001899192cc004c07c00a0111640706eb8c074004c064dd5001456600266e1d2002001899192cc004c07c00a0111640706eb8c074004c064dd5001459017202e3017375400260340031640606eb8c060004c064004c050dd5001459012180a98091baa00115980099198008009bac30163013375401444b30010018a508acc004cdd7980b980a1baa301700101c8a51899801001180c000a024405515980099b8f375c602a00691010e50726f746f636f6c506172616d73008acc004cdc39bad301530160034800a266ebcc054c048dd500118029980a19ba548008cc050dd4807a5eb80cc051300103d87a80004bd70452820208a50404114a080822c8080c014c044dd5000980998081baa0028b201c323300100137586006601e6ea8018896600200314c0103d87a80008992cc004cc896600200514a11329800992cc004c034c050dd5000c4dd6980a980c1bab301830153754003148001013180b800cdd7980b980c000cdd5801a444b30010018acc004c00801a26600a00690004528202a8992cc004cdd7980b800a610140008acc004cc018010dd6980c180d9bab3018001898019ba6301c0028a5040591598009980300224001130030078a50405880b0c0680050180ca60020033756602e603060286ea80124466030004660306e980052f5c08008889660020051330014c103d87a80004bd6f7b63044ca60026eb8c0580066eacc05c00660360069112cc004cdc8a441000038acc004cdc7a4410000389980298069980e1ba60024bd70000c4cc015300103d87a8000006406119800803c006446600e0046603c66ec0dd48029ba6004001401c80c0603200480ba2942294229410181ba633013337606ea401cdd31980999bb04c10f4e50726f746f636f6c506172616d73004c010101004bd6f7b63025eb7bdb1808928c4c010cc04c0052f5c11330030033015002403c60260028088c048dd6180880191808180898088009ba5480022c8068c8cc004004c8cc004004dd59808180898089808980898069baa0042259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c00266006006602600460220028078896600200314bd7044cc896600266e3cdd71809001002c4cc044dd380119802002000c4cc01001000500d1bac3010001301100140386eb8c034c028dd5001c590080c024004c010dd5005452689b2b200401\",\n \"hash\": \"b35a80517d8fd4bd767e7b20516fbd913b7a4961383ab29cc4a7d92c\"\n },\n {\n \"title\": \"registry_mint.registry_mint.mint\",\n \"redeemer\": {\n \"title\": \"redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/types~1RegistryRedeemer\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"issuance_cbor_hex_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5908ea0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e266446644b300130060018acc004c038dd5004400a2c807a2b300130030018991919912cc004c05800e00d16404c6eb8c04c004dd71809801180980098071baa0088b20184030330012301030110019180818089808800c88c8cc00400400c896600200314a115980098019809800c528c4cc008008c05000500e20229b804800a4464b30013007001899192cc004c05400a0091640486eb8c04c004c03cdd5001c56600260080031323259800980a80140122c8090dd7180980098079baa0038b201a4034601a6ea800a6e1d200491191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c809226600a00a60300088090dd718088009bab301200130140014048297adef6c609b8f48900918081808980898089808800c8c040c044c044c04400522222222229800999119912cc00400a26603898010180003301c374e00297ae08992cc004c8cc00400400c896600200314a315980099baf3020301d3754604000200713300200230210018a50406c80f226603a6e9c00ccc074dd380125eb822c80c8c074c068dd51807180d1baa301d002406c660046eb0c06cc060dd50079198011bab300d30193754601a60326ea800403ccc008dd61805980c1baa00f2330023756601a60326ea800403c88c8cc00400400c896600200314bd7044cc8966002600a00513301e00233004004001899802002000a034301d001301e001406c446466002002603a00644b30010018a508acc004cdc79bae3019301d0010038a51899801001180f000a030406d2259800800c520008980499801001180e000a0329192cc004c01cc05cdd5000c4c06cc060dd5000c590161805180b9baa001912cc004c040c05cdd500144c8c8c8c8ca60026eb8c0800066eb8c0800166eb8c080012604000491112cc004c094016266022604800e2660220020151640883020001301f001301e001301d00130183754005164059222300e323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901d44cc014014c08c01101d1bae301c001375a603a002603e00280e8cc02001000c52000488888ca60024464b3001300e32330010010022259800800c52000899914c004dd718110014dd598118014896600200310038991991180c9980280298160021bae3025001375a604c00260500028131222330010010021812000998010011812800a0448992cc004c054c014006264660100022b3001337206eb8c090c084dd50009bae301530213754003159800981280144c8c96600260306eb4c08c00a2b30015980099b8f001375c604c60466ea800e294626020002810a20071640851640846eb8c084004c09000a2c81122c80f8c0200122c80f0cc03400400a2c80e8dd59809180f1baa0029bac301f30200069bac301f006488966002602e603c6ea80662b30013301137586044603e6ea80588cdd7981198101baa0010278acc004c08c00a264b3001598008014528c52820428acc004c034dd7181198101baa0018acc004cdc79bae3014302037540029111effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008acc004cdd7980998101baa0014c0105d8799f40ff008acc004cdd7980598101baa0014c0105d8799f40ff008acc004c034dd7180618101baa0018cc004dd5980618101baa01780b522100401914a080f2294101e4528203c8a50407914a080f2294101e19801981100100ac590204528203a89919912cc004c068c084dd5000c4c966002603660446ea8006264646644b3001302b0038992cc004c0b002a26466020002264b30010038992cc004c004dc6805c56600266e40dd7181718159baa00300b8acc004cdc80059bae301f302b3754007159800cc004dd5980b98159baa022810c02d01145660026034646600200200644b30010018a40011301e33002002303100140b91598009980e80112cc004cdc79bae302f302c37540026eb8c0bcc0b0dd5002456600266e3cdd7181018161baa00100c8acc004cdd7980f98161baa001301f302c375400915980099baf3017302c3754002602e60586ea8012266e3cdd7180c18161baa001375c603060586ea8012294102a452820548a5040a914a0815226603a00446464b30013371e6eb8c0c4c0b8dd5001807456600266e3cdd7181118171baa003375c6044605c6ea801a2b300130013021302e37540071598009800980c98171baa0038acc004c098dc69bae301a302e375400714a313004371a6eb8c068c0b8dd5001a0588a5040b114a08162294102c45282058259800981318169baa001898011bae3031302e375400313002375c6062605c6ea800502c1192cc004c01000629462604c0028160dc6800c52820528a5040a514a0814a2941029452820528a5040a46e1d20388a5040a0646600200201a44b30010018a5eb8226605a6601e605c00204266004004605e0028160c040c070c0a0dd518158054590292cc004c8cc004004c8cc004004dd5980a98149baa0202259800800c52f5c113233223322330020020012259800800c400e264660646e9ccc0c8dd4802998191817800998191818000a5eb80cc00c00cc0d0008c0c80050301bab302d003375c605400266006006605e004605a0028158896600200314a1159800992cc004cdc79bae302d00100a899b8848000dd6981698171817000c52820503758605800314a3133002002302d001409c8152266e3cde419b8a4881010300337146eb8c0a8c09cdd500299b8a375c605460560106eb8c06cc09cdd5002803c528204a8b2050375c60500026eb8c0a0008c0a0004c08cdd5000c590211805180b18111baa3025302237540031640806eb8c08c004c8cc004004dd6180a98109baa0182259800800c530103d87a80008992cc0066002b3001330113756602e60466ea8c05cc08cdd50008104528c5282048a50a51408513374a900019812800a5eb82266006006604e0048108c094005023180f9baa019407430040040c02cdd50031bae300d300a37540066e1d20028b2010180480098021baa0098a4d1365640081\",\n \"hash\": \"7caba74f4f7d0b7f813a05552ba48bbcd3b49f6d6b4fda9c22a3fe06\"\n },\n {\n \"title\": \"registry_mint.registry_mint.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"utxo_ref\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1transaction~1OutputReference\"\n }\n },\n {\n \"title\": \"issuance_cbor_hex_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"5908ea0101002229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cdc3a400130090024888966002600460126ea800e266446644b300130060018acc004c038dd5004400a2c807a2b300130030018991919912cc004c05800e00d16404c6eb8c04c004dd71809801180980098071baa0088b20184030330012301030110019180818089808800c88c8cc00400400c896600200314a115980098019809800c528c4cc008008c05000500e20229b804800a4464b30013007001899192cc004c05400a0091640486eb8c04c004c03cdd5001c56600260080031323259800980a80140122c8090dd7180980098079baa0038b201a4034601a6ea800a6e1d200491191919800800802112cc00400600713233225980099b910070028acc004cdc78038014400600c809226600a00a60300088090dd718088009bab301200130140014048297adef6c609b8f48900918081808980898089808800c8c040c044c044c04400522222222229800999119912cc00400a26603898010180003301c374e00297ae08992cc004c8cc00400400c896600200314a315980099baf3020301d3754604000200713300200230210018a50406c80f226603a6e9c00ccc074dd380125eb822c80c8c074c068dd51807180d1baa301d002406c660046eb0c06cc060dd50079198011bab300d30193754601a60326ea800403ccc008dd61805980c1baa00f2330023756601a60326ea800403c88c8cc00400400c896600200314bd7044cc8966002600a00513301e00233004004001899802002000a034301d001301e001406c446466002002603a00644b30010018a508acc004cdc79bae3019301d0010038a51899801001180f000a030406d2259800800c520008980499801001180e000a0329192cc004c01cc05cdd5000c4c06cc060dd5000c590161805180b9baa001912cc004c040c05cdd500144c8c8c8c8ca60026eb8c0800066eb8c0800166eb8c080012604000491112cc004c094016266022604800e2660220020151640883020001301f001301e001301d00130183754005164059222300e323322330020020012259800800c00e2646644b30013372200e00515980099b8f0070028800c01901d44cc014014c08c01101d1bae301c001375a603a002603e00280e8cc02001000c52000488888ca60024464b3001300e32330010010022259800800c52000899914c004dd718110014dd598118014896600200310038991991180c9980280298160021bae3025001375a604c00260500028131222330010010021812000998010011812800a0448992cc004c054c014006264660100022b3001337206eb8c090c084dd50009bae301530213754003159800981280144c8c96600260306eb4c08c00a2b30015980099b8f001375c604c60466ea800e294626020002810a20071640851640846eb8c084004c09000a2c81122c80f8c0200122c80f0cc03400400a2c80e8dd59809180f1baa0029bac301f30200069bac301f006488966002602e603c6ea80662b30013301137586044603e6ea80588cdd7981198101baa0010278acc004c08c00a264b3001598008014528c52820428acc004c034dd7181198101baa0018acc004cdc79bae3014302037540029111effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008acc004cdd7980998101baa0014c0105d8799f40ff008acc004cdd7980598101baa0014c0105d8799f40ff008acc004c034dd7180618101baa0018cc004dd5980618101baa01780b522100401914a080f2294101e4528203c8a50407914a080f2294101e19801981100100ac590204528203a89919912cc004c068c084dd5000c4c966002603660446ea8006264646644b3001302b0038992cc004c0b002a26466020002264b30010038992cc004c004dc6805c56600266e40dd7181718159baa00300b8acc004cdc80059bae301f302b3754007159800cc004dd5980b98159baa022810c02d01145660026034646600200200644b30010018a40011301e33002002303100140b91598009980e80112cc004cdc79bae302f302c37540026eb8c0bcc0b0dd5002456600266e3cdd7181018161baa00100c8acc004cdd7980f98161baa001301f302c375400915980099baf3017302c3754002602e60586ea8012266e3cdd7180c18161baa001375c603060586ea8012294102a452820548a5040a914a0815226603a00446464b30013371e6eb8c0c4c0b8dd5001807456600266e3cdd7181118171baa003375c6044605c6ea801a2b300130013021302e37540071598009800980c98171baa0038acc004c098dc69bae301a302e375400714a313004371a6eb8c068c0b8dd5001a0588a5040b114a08162294102c45282058259800981318169baa001898011bae3031302e375400313002375c6062605c6ea800502c1192cc004c01000629462604c0028160dc6800c52820528a5040a514a0814a2941029452820528a5040a46e1d20388a5040a0646600200201a44b30010018a5eb8226605a6601e605c00204266004004605e0028160c040c070c0a0dd518158054590292cc004c8cc004004c8cc004004dd5980a98149baa0202259800800c52f5c113233223322330020020012259800800c400e264660646e9ccc0c8dd4802998191817800998191818000a5eb80cc00c00cc0d0008c0c80050301bab302d003375c605400266006006605e004605a0028158896600200314a1159800992cc004cdc79bae302d00100a899b8848000dd6981698171817000c52820503758605800314a3133002002302d001409c8152266e3cde419b8a4881010300337146eb8c0a8c09cdd500299b8a375c605460560106eb8c06cc09cdd5002803c528204a8b2050375c60500026eb8c0a0008c0a0004c08cdd5000c590211805180b18111baa3025302237540031640806eb8c08c004c8cc004004dd6180a98109baa0182259800800c530103d87a80008992cc0066002b3001330113756602e60466ea8c05cc08cdd50008104528c5282048a50a51408513374a900019812800a5eb82266006006604e0048108c094005023180f9baa019407430040040c02cdd50031bae300d300a37540066e1d20028b2010180480098021baa0098a4d1365640081\",\n \"hash\": \"7caba74f4f7d0b7f813a05552ba48bbcd3b49f6d6b4fda9c22a3fe06\"\n },\n {\n \"title\": \"registry_spend.registry_spend.spend\",\n \"datum\": {\n \"title\": \"_datum\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"redeemer\": {\n \"title\": \"_redeemer\",\n \"schema\": {\n \"$ref\": \"#/definitions/Data\"\n }\n },\n \"parameters\": [\n {\n \"title\": \"protocol_params_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59025f010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c020dd500144cc8a6002601c005300e300f00299198008009bac3002300c375400844b30010018a60103d87a80008992cc004c8cc004004c04cdd5980298079baa3005300f375400444b30010018a508acc004cdc79bae300f301300100d8a51899801001180a000a01c404513374a900019808000a5eb8226600600660240048060c04000500e4dc3a400091112cc004c004c038dd500144c8c966002600660206ea800a2646644b30013018001899192cc004c02000626464b3001301c0028044590191bae301a0013016375400515980099b874800800626464b3001301c0028044590191bae301a0013016375400516405080a0c050dd5000980b800c590151bae301500130160013011375400516403c264646600200264660020026eacc058c05cc05cc05cc05cc04cdd5005912cc004006297ae08991991199119801001000912cc00400620071323301c374e660386ea4014cc070c064004cc070c0680052f5c066006006603c004603800280d0dd5980b8019bae30140013300300330190023017001405444b30010018a508acc004c96600266e3cdd7180b800802466002600c6eb4c05cc060c060006942945012452820243758602c00314a31330020023017001404480a0dd7180998081baa001325980099b8748010c03cdd5000c4c04cc040dd5000c5900e18091809980998079baa3005300f37546024601e6ea800a2c806860126ea80088c034c0380062c8038601200260086ea802629344d95900201\",\n \"hash\": \"d38270f68cf6138cc7815cce73342378701cc6352f6f15f65235f6b5\"\n },\n {\n \"title\": \"registry_spend.registry_spend.else\",\n \"redeemer\": {\n \"schema\": {}\n },\n \"parameters\": [\n {\n \"title\": \"protocol_params_cs\",\n \"schema\": {\n \"$ref\": \"#/definitions/cardano~1assets~1PolicyId\"\n }\n }\n ],\n \"compiledCode\": \"59025f010100229800aba2aba1aba0aab9faab9eaab9dab9a9bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c020dd500144cc8a6002601c005300e300f00299198008009bac3002300c375400844b30010018a60103d87a80008992cc004c8cc004004c04cdd5980298079baa3005300f375400444b30010018a508acc004cdc79bae300f301300100d8a51899801001180a000a01c404513374a900019808000a5eb8226600600660240048060c04000500e4dc3a400091112cc004c004c038dd500144c8c966002600660206ea800a2646644b30013018001899192cc004c02000626464b3001301c0028044590191bae301a0013016375400515980099b874800800626464b3001301c0028044590191bae301a0013016375400516405080a0c050dd5000980b800c590151bae301500130160013011375400516403c264646600200264660020026eacc058c05cc05cc05cc05cc04cdd5005912cc004006297ae08991991199119801001000912cc00400620071323301c374e660386ea4014cc070c064004cc070c0680052f5c066006006603c004603800280d0dd5980b8019bae30140013300300330190023017001405444b30010018a508acc004c96600266e3cdd7180b800802466002600c6eb4c05cc060c060006942945012452820243758602c00314a31330020023017001404480a0dd7180998081baa001325980099b8748010c03cdd5000c4c04cc040dd5000c5900e18091809980998079baa3005300f37546024601e6ea800a2c806860126ea80088c034c0380062c8038601200260086ea802629344d95900201\",\n \"hash\": \"d38270f68cf6138cc7815cce73342378701cc6352f6f15f65235f6b5\"\n }\n ],\n \"definitions\": {\n \"ByteArray\": {\n \"title\": \"ByteArray\",\n \"dataType\": \"bytes\"\n },\n \"Data\": {\n \"title\": \"Data\",\n \"description\": \"Any Plutus data.\"\n },\n \"Int\": {\n \"dataType\": \"integer\"\n },\n \"List<types/RegistryProof>\": {\n \"dataType\": \"list\",\n \"items\": {\n \"$ref\": \"#/definitions/types~1RegistryProof\"\n }\n },\n \"aiken/crypto/ScriptHash\": {\n \"title\": \"ScriptHash\",\n \"dataType\": \"bytes\"\n },\n \"aiken/crypto/VerificationKeyHash\": {\n \"title\": \"VerificationKeyHash\",\n \"dataType\": \"bytes\"\n },\n \"cardano/address/Credential\": {\n \"title\": \"Credential\",\n \"description\": \"A general structure for representing an on-chain `Credential`.\\n\\n Credentials are always one of two kinds: a direct public/private key\\n pair, or a script (native or Plutus).\",\n \"anyOf\": [\n {\n \"title\": \"VerificationKey\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1crypto~1VerificationKeyHash\"\n }\n ]\n },\n {\n \"title\": \"Script\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"$ref\": \"#/definitions/aiken~1crypto~1ScriptHash\"\n }\n ]\n }\n ]\n },\n \"cardano/assets/PolicyId\": {\n \"title\": \"PolicyId\",\n \"dataType\": \"bytes\"\n },\n \"cardano/transaction/OutputReference\": {\n \"title\": \"OutputReference\",\n \"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\",\n \"anyOf\": [\n {\n \"title\": \"OutputReference\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"transaction_id\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"output_index\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"types/ProgrammableLogicGlobalRedeemer\": {\n \"title\": \"ProgrammableLogicGlobalRedeemer\",\n \"description\": \"Redeemer for the global programmable logic stake validator\",\n \"anyOf\": [\n {\n \"title\": \"TransferAct\",\n \"description\": \"Transfer action with proofs for each token type\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"proofs\",\n \"$ref\": \"#/definitions/List<types~1RegistryProof>\"\n }\n ]\n },\n {\n \"title\": \"ThirdPartyAct\",\n \"description\": \"Third party action for admin operations (seizure, freeze, etc.)\\n Supports multiple UTxOs in a single transaction\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"registry_node_idx\",\n \"description\": \"Index of the registry node in reference inputs\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"outputs_start_idx\",\n \"description\": \"Starting index in outputs where processed outputs begin\",\n \"$ref\": \"#/definitions/Int\"\n },\n {\n \"title\": \"length_inputs\",\n \"description\": \"Length of input_idxs list (for validation)\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"types/RegistryProof\": {\n \"title\": \"RegistryProof\",\n \"description\": \"Proof that a token is (or is not) in the registry\",\n \"anyOf\": [\n {\n \"title\": \"TokenExists\",\n \"description\": \"Token exists in the registry at this reference input index\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"node_idx\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n },\n {\n \"title\": \"TokenDoesNotExist\",\n \"description\": \"Token does not exist (proof via covering node at this index)\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"node_idx\",\n \"$ref\": \"#/definitions/Int\"\n }\n ]\n }\n ]\n },\n \"types/RegistryRedeemer\": {\n \"title\": \"RegistryRedeemer\",\n \"description\": \"Redeemer for registry minting policy (linked list operations)\",\n \"anyOf\": [\n {\n \"title\": \"RegistryInit\",\n \"description\": \"Initialize the registry with the origin node\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": []\n },\n {\n \"title\": \"RegistryInsert\",\n \"description\": \"Insert a new programmable token policy into the registry\",\n \"dataType\": \"constructor\",\n \"index\": 1,\n \"fields\": [\n {\n \"title\": \"key\",\n \"$ref\": \"#/definitions/ByteArray\"\n },\n {\n \"title\": \"hashed_param\",\n \"$ref\": \"#/definitions/ByteArray\"\n }\n ]\n }\n ]\n },\n \"types/SmartTokenMintingAction\": {\n \"title\": \"SmartTokenMintingAction\",\n \"description\": \"Action for the minting policy\",\n \"anyOf\": [\n {\n \"title\": \"SmartTokenMintingAction\",\n \"dataType\": \"constructor\",\n \"index\": 0,\n \"fields\": [\n {\n \"title\": \"minting_logic_cred\",\n \"description\": \"The credential of the minting logic script that must be invoked\",\n \"$ref\": \"#/definitions/cardano~1address~1Credential\"\n }\n ]\n }\n ]\n }\n }\n}","import {\n deserializeAddress,\n buildBaseAddress,\n CredentialType,\n Hash28ByteBase16,\n} from \"@meshsdk/core-cst\";\nimport { StandardScripts, SubStandardScripts } from \"./common\";\nimport { smartWalletAddress, stakeCredential } from \"./type\";\nimport params from \"./protocolParams.json\";\nimport { TxInput } from \"@meshsdk/common\";\n\n/**\n * Resolves the programmable smart wallet address for a given base address.\n */\nexport const resolveSmartWalletAddress = async (\n address: string,\n networkId: 0 | 1,\n): Promise<smartWalletAddress> => {\n const credential = deserializeAddress(address)\n .asBase()\n ?.getStakeCredential().hash;\n\n if (!credential) {\n throw new Error(\"Address missing stake credential\");\n }\n\n const standardScript = new StandardScripts(networkId);\n const programmableLogicBase =\n await standardScript.programmableLogicBase(params);\n\n const baseAddress = buildBaseAddress(\n networkId,\n programmableLogicBase.policyId as Hash28ByteBase16,\n credential,\n CredentialType.ScriptHash,\n CredentialType.KeyHash,\n );\n\n return baseAddress.toAddress().toBech32() as smartWalletAddress;\n};\n\n/**\n * Resolves the stake credential hash from a bech32 address.\n */\nexport const resolveStakeCredential = (address: string): stakeCredential => {\n const cred = deserializeAddress(address).asBase()?.getStakeCredential().hash;\n if (!cred) throw new Error(\"Address missing stake credential\");\n return cred as stakeCredential;\n};\n\n/**\n * Resolves the blacklist mint and spend scripts.\n */\nexport async function resolveBlacklistScripts(\n networkId: 0 | 1,\n blacklistMintBootstrapTxInput: TxInput,\n blacklistAdminPkh: string,\n) {\n const substandardScript = new SubStandardScripts(networkId);\n const blacklistMint = await substandardScript.blacklistMint(\n blacklistMintBootstrapTxInput,\n blacklistAdminPkh,\n );\n const blacklistSpend = await substandardScript.blacklistSpend(\n blacklistMint.policyId,\n );\n return { blacklistMint, blacklistSpend };\n}\n\n/**\n * Resolves the blacklist script address.\n */\nexport const resolveBlacklistAddress = async (\n blacklistMintScriptHash: string,\n networkId: number,\n): Promise<string> => {\n const substandard = new SubStandardScripts(networkId);\n const blacklistSpend = await substandard.blacklistSpend(\n blacklistMintScriptHash,\n );\n return blacklistSpend.address;\n};\n","{\n \"txHash\": \"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7\",\n \"protocolParams\": {\n \"txInput\": {\n \"txHash\": \"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973\",\n \"outputIndex\": 0\n },\n \"scriptHash\": \"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214\",\n \"alwaysFailScriptHash\": \"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99\"\n },\n \"programmableLogicGlobalParams\": {\n \"protocolParamsScriptHash\": \"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214\",\n \"scriptHash\": \"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046\"\n },\n \"programmableLogicBaseParams\": {\n \"programmableLogicGlobalScriptHash\": \"24b338c9996217cc2a9770e00efe7d66ad459fa368d0eb804956c046\",\n \"scriptHash\": \"3a7ce34145cbc597a85ac83db88c029ff9e909d92e04a7b2376b31ff\"\n },\n \"issuanceParams\": {\n \"txInput\": {\n \"txHash\": \"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973\",\n \"outputIndex\": 1\n },\n \"scriptHash\": \"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1\",\n \"alwaysFailScriptHash\": \"de8efca54bfd3b0a445f9d9f72a1c1b2524928f810ea106a6ca9aa99\"\n },\n \"directoryMintParams\": {\n \"txInput\": {\n \"txHash\": \"c39b5e0db71df7fd41d7dc44d66911d99d98bb7e76127b5335bb04dc3087f973\",\n \"outputIndex\": 0\n },\n \"issuanceScriptHash\": \"188a2b2cc43b93f026ccb56bfe7a1eea121e9a74e5bdb6259a0215e1\",\n \"scriptHash\": \"91b403111a7fab9ffbf5a3c7485d3f9a79d5bf65f38c8d48359be4c0\"\n },\n \"directorySpendParams\": {\n \"protocolParamsPolicyId\": \"debc6597dd54b0c372dc30c72494f49b2a0a6a6c9058dc6a67748214\",\n \"scriptHash\": \"b672f3b03d19cd40c59c447aabd6c26ca296bbc78b205e5227317638\"\n },\n \"programmableBaseRefInput\": {\n \"txHash\": \"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7\",\n \"outputIndex\": 3\n },\n \"programmableGlobalRefInput\": {\n \"txHash\": \"259e58611145bf7276bf5e97e7924cfa704f0d658b7e53b445be976649fc59e7\",\n \"outputIndex\": 4\n }\n}"],"mappings":"wKAAA,OAEE,sBAAAA,GACA,eAAAC,GACA,WAAAC,EACA,YAAAC,EACA,YAAAC,GACA,oBAAAC,GACA,kBAAAC,GAEA,qBAAAC,GACA,yBAAAC,GACA,eAAAC,EACA,UAAAC,OAEK,gBACP,OACE,uBAAAC,GACA,kBAAAC,GACA,oBAAAC,OACK,oBCpBP,OAOE,yBAAAC,OAEK,gBAWA,IAAMC,EAAN,KAAsB,CAS3B,YAAY,CACV,KAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EAAY,EACZ,gBAAAC,EAAkB,2DAClB,QAAAC,EAAU,CACZ,EAAyB,CAfzBC,EAAA,aACAA,EAAA,gBACAA,EAAA,eACAA,EAAA,wBACAA,EAAA,iBAAY,GACZA,EAAA,eAAU,GACVA,EAAA,uBAAmC,MAyCnCA,EAAA,wBAAoBC,GAAuB,CACzC,GAAM,CAAE,QAAAC,CAAQ,EAAIC,GAClB,CAAE,KAAMF,EAAY,QAAS,KAAK,eAAgB,EAClD,KAAK,gBACL,KAAK,SACP,EACA,OAAOC,CACT,GAEAF,EAAA,KAAU,kBAAkB,SAAY,CACtC,IAAMI,EAAW,KAAK,KAAK,gBAAgB,EACrCC,EAAS,MAAM,KAAK,KAAK,SAASD,CAAQ,EAChD,YAAK,KAAK,MAAM,EACTC,CACT,GAEAL,EAAA,KAAU,aAAa,MAAOM,GACxB,KAAK,QACO,MAAM,KAAK,QAAQ,kBAAkBA,CAAa,EAG3D,CAAC,GAGVN,EAAA,KAAU,uBAAuB,SAAY,CAC3C,GAAI,KAAK,OAAQ,CACf,IAAMO,EAAgB,MAAM,KAAK,OAAO,iBAAiB,EACzD,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EACA,CACE,MAAS,uDACT,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,CACF,EACA,aAAgB,q0BAChB,KAAQ,0DACV,EACA,CACE,MAAS,0CACT,MAAS,CACP,MAAS,YACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,wDACV,CACF,EACA,aAAgB,m6GAChB,KAAQ,0DACV,EACA,CACE,MAAS,yCACT,aAAgB,m6GAChB,KAAQ,0DACV,EACA,CACE,MAAS,8CACT,MAAS,CACP,MAAS,SACT,OAAU,CACR,KAAQ,gEACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,mEACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,i3LAChB,KAAQ,0DACV,EACA,CACE,MAAS,6CACT,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,i3LAChB,KAAQ,0DACV,EACA,CACE,MAAS,iEACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,sDACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,mqHAChB,KAAQ,0DACV,EACA,CACE,MAAS,iEACT,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,mqHAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,SAAY,OACd,EACA,IAAO,CACL,SAAY,SACd,EACA,eAAkB,CAChB,SAAY,OACZ,MAAS,CACP,KAAQ,yBACV,CACF,EACA,oBAAuB,CACrB,SAAY,OACZ,MAAS,CACP,KAAQ,8BACV,CACF,EACA,uBAA0B,CACxB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,+BACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,kBAAqB,CACnB,MAAS,oBACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,SAAY,CACV,MAAS,WACT,SAAY,OACd,EACA,WAAc,CACZ,MAAS,aACT,SAAY,OACd,EACA,gBAAmB,CACjB,MAAS,kBACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,sCAAuC,CACrC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,iBACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,+CAAgD,CAC9C,MAAS,uBACT,MAAS,CACP,CACE,MAAS,uBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,QACT,KAAQ,mBACV,EACA,CACE,MAAS,WACT,KAAQ,8BACV,CACF,CACF,CACF,CACF,EACA,kDAAmD,CACjD,MAAS,0BACT,MAAS,CACP,CACE,MAAS,gBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,eACT,KAAQ,yBACV,EACA,CACE,MAAS,QACT,KAAQ,8BACV,CACF,CACF,EACA,CACE,MAAS,gBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,mBACT,KAAQ,yBACV,EACA,CACE,MAAS,iBACT,KAAQ,mBACV,CACF,CACF,EACA,CACE,MAAS,sBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,uCAAwC,CACtC,MAAS,eACT,MAAS,CACP,CACE,MAAS,QACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,QACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,sCAAuC,CACrC,MAAS,cACT,MAAS,CACP,CACE,MAAS,cACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,aACT,KAAQ,wBACV,EACA,CACE,MAAS,iBACT,KAAQ,yCACV,EACA,CACE,MAAS,6BACT,KAAQ,wBACV,EACA,CACE,MAAS,2BACT,KAAQ,yCACV,EACA,CACE,MAAS,yBACT,KAAQ,mBACV,EACA,CACE,MAAS,+BACT,KAAQ,wBACV,EACA,CACE,MAAS,6BACT,KAAQ,yCACV,EACA,CACE,MAAS,2BACT,KAAQ,mBACV,EACA,CACE,MAAS,gBACT,KAAQ,yBACV,EACA,CACE,MAAS,WACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,yCAA0C,CACxC,MAAS,iBACT,MAAS,CACP,CACE,MAAS,wBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,0BACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,YACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,oBACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,yBACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,iDAAkD,CAChD,MAAS,yBACT,MAAS,CACP,CACE,MAAS,yBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,QACT,KAAQ,mBACV,EACA,CACE,MAAS,WACT,KAAQ,mCACV,CACF,CACF,CACF,CACF,EACA,oDAAqD,CACnD,MAAS,4BACT,MAAS,CACP,CACE,MAAS,wBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,oBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,kBACT,KAAQ,8BACV,EACA,CACE,MAAS,iBACT,KAAQ,mBACV,CACF,CACF,EACA,CACE,MAAS,wBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,ED7kBO,IAAMC,EAAgB,CAC3BC,EACAC,IACG,CACH,IAAMC,EAAaC,GAAU,WACvBC,EAAgBC,GACpBH,EAAW,CAAC,EAAG,aACf,CAACI,GAAgBN,EAAgB,OAAQA,EAAgB,WAAW,CAAC,EACrE,MACF,EACMO,EAAmBC,GACvBC,GAAkBL,EAAe,IAAI,CACvC,EACA,OAAQH,EAA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,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,4BACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yBACV,CACF,CACF,EACA,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,kFAAmF,CACjF,MAAS,aACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0DACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,2BAA4B,CAC1B,MAAS,cACT,MAAS,CACP,CACE,MAAS,aACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,uDACV,EACA,CACE,MAAS,mBACT,KAAQ,2DACV,CACF,CACF,EACA,CACE,MAAS,eACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,uDACV,EACA,CACE,MAAS,mBACT,KAAQ,2DACV,EACA,CACE,MAAS,YACT,KAAQ,uDACV,EACA,CACE,MAAS,mBACT,KAAQ,2DACV,CACF,CACF,CACF,CACF,EACA,8BAA+B,CAC7B,MAAS,iBACT,MAAS,CACP,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,uDACV,EACA,CACE,MAAS,mBACT,KAAQ,2DACV,CACF,CACF,EACA,CACE,MAAS,cACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,gBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,EC7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AS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,MAAS,cACT,MAAS,CACP,CACE,MAAS,aACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,yCACV,EACA,CACE,MAAS,mBACT,KAAQ,sBACV,CACF,CACF,EACA,CACE,MAAS,eACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,yCACV,EACA,CACE,MAAS,mBACT,KAAQ,sBACV,EACA,CACE,MAAS,YACT,KAAQ,yCACV,EACA,CACE,MAAS,mBACT,KAAQ,sBACV,CACF,CACF,CACF,CACF,EACA,wBAAyB,CACvB,MAAS,iBACT,MAAS,CACP,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,yCACV,EACA,CACE,MAAS,mBACT,KAAQ,sBACV,CACF,CACF,EACA,CACE,MAAS,cACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,gBACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,EC3RA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,gBACT,YAAe,8CACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,gBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,sBACT,MAAS,CACP,MAAS,SACT,OAAU,CACR,KAAQ,mCACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,sCACV,CACF,EACA,aAAgB,mrNAChB,KAAQ,0DACV,EACA,CACE,MAAS,qBACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,aAAgB,mrNAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,MAAS,YACT,SAAY,OACd,EACA,IAAO,CACL,SAAY,SACd,EACA,OAAU,CACR,MAAS,SACT,SAAY,MACZ,KAAQ,CACN,KAAQ,wBACV,EACA,OAAU,CACR,KAAQ,mCACV,CACF,EACA,uBAA0B,CACxB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,+BACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,wBACT,SAAY,MACZ,KAAQ,CACN,KAAQ,yBACV,EACA,OAAU,CACR,KAAQ,mBACV,CACF,EACA,kBAAqB,CACnB,MAAS,oBACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,SAAY,CACV,MAAS,WACT,SAAY,OACd,EACA,WAAc,CACZ,MAAS,aACT,SAAY,OACd,EACA,gBAAmB,CACjB,MAAS,kBACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,MAAS,cACT,MAAS,CACP,CACE,MAAS,aACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,yCACV,EACA,CACE,MAAS,mBACT,KAAQ,sBACV,CACF,CACF,EACA,CACE,MAAS,eACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KA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,CACP,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,YACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,6mBAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,SAAY,OACd,EACA,KAAQ,CACN,MAAS,OACT,YAAe,kBACjB,EACA,IAAO,CACL,SAAY,SACd,EACA,oCAAqC,CACnC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,iBACT,KAAQ,iDACV,EACA,CACE,MAAS,eACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,kCAAmC,CACjC,MAAS,gBACT,YAAe,wQACf,MAAS,CACP,CACE,MAAS,gBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,OACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,iBAAkB,CAChB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,OACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,ECzIA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,kBACT,YAAe,gDACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,gBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,yBACT,SAAY,CACV,MAAS,OACT,OAAU,CACR,KAAQ,+BACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,CACF,EACA,aAAgB,q2BAChB,KAAQ,0DACV,EACA,CACE,MAAS,yBACT,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,CACF,EACA,aAAgB,q2BAChB,KAAQ,0DACV,EACA,CACE,MAAS,uBACT,MAAS,CACP,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,YACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,mjBAChB,KAAQ,0DACV,EACA,CACE,MAAS,sBACT,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,YACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,mjBAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,SAAY,OACd,EACA,KAAQ,CACN,MAAS,OACT,YAAe,kBACjB,EACA,IAAO,CACL,SAAY,SACd,EACA,sCAAuC,CACrC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,iBACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,iBAAkB,CAChB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,OACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,EFtIO,IAAMC,GAAN,cAAmCC,CAAgB,CAIxD,YACEC,EACAC,EACAC,EACA,CACA,MAAMF,CAAM,EARdG,EAAA,oBAAuB,IACvBA,EAAA,iBAA2B,CAAE,YAAa,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F,CACxF,MAAS,WACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,qGACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,uCAAwC,CACtC,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,2EACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,0DACV,EACA,CACE,MAAS,mBACT,KAAQ,4GACV,CACF,CACF,CACF,CACF,EACA,0CAA2C,CACzC,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,4BACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yBACV,CACF,CACF,EACA,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,kFAAmF,CACjF,MAAS,aACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0DACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,qCAAsC,CACpC,MAAS,mBACT,MAAS,CACP,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,SACT,KAAQ,uDACV,EACA,CACE,MAAS,QACT,KAAQ,mBACV,EACA,CACE,MAAS,SACT,KAAQ,yBACV,EACA,CACE,MAAS,YACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,wCAAyC,CACvC,MAAS,sBACT,MAAS,CACP,CACE,MAAS,MACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,QACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,EC3MA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,qBACT,YAAe,mDACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,gBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,gCACT,MAAS,CACP,MAAS,YACT,OAAU,CACR,KAAQ,6CACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,gDACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,QACT,OAAU,CACR,KAAQ,yCACV,CACF,EACA,CACE,MAAS,6BACT,OAAU,CACR,KAAQ,mBACV,CACF,CACF,EACA,aAAgB,i/GAChB,KAAQ,0DACV,EACA,CACE,MAAS,+BACT,WAAc,CACZ,CACE,MAAS,QACT,OAAU,CACR,KAAQ,yCACV,CACF,EACA,CACE,MAAS,6BACT,OAAU,CACR,KAAQ,mBACV,CACF,CACF,EACA,aAAgB,i/GAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,SAAY,OACd,EACA,IAAO,CACL,SAAY,SACd,EACA,uBAA0B,CACxB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,+BACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,kBAAqB,CACnB,MAAS,oBACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,WAAc,CACZ,MAAS,aACT,SAAY,OACd,EACA,gBAAmB,CACjB,MAAS,kBACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,+BAAgC,CAC9B,MAAS,mBACT,MAAS,CACP,CACE,MAAS,mBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,SACT,KAAQ,yCACV,EACA,CACE,MAAS,QACT,KAAQ,mBACV,EACA,CACE,MAAS,SACT,KAAQ,yBACV,EACA,CACE,MAAS,YACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,kCAAmC,CACjC,MAAS,sBACT,MAAS,CACP,CACE,MAAS,MACT,SAAY,cACZ,M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AS,CACP,MAAS,YACT,OAAU,CACR,KAAQ,mCACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,sCACV,CACF,EACA,aAAgB,2vIAChB,KAAQ,0DACV,EACA,CACE,MAAS,qBACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,aAAgB,2vIAChB,KAAQ,0DACV,EACA,CACE,MAAS,6BACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,wCACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,CACF,EACA,aAAgB,q0BAChB,KAAQ,0DACV,EACA,CACE,MAAS,6BACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,CACF,EACA,aAAgB,q0BAChB,KAAQ,0DACV,EACA,CACE,MAAS,6BACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,wCACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,kBACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,mlEAChB,KAAQ,0DACV,EACA,CACE,MAAS,6BACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,kBACT,OAAU,CACR,KAAQ,yBACV,CACF,EACA,CACE,MAAS,aACT,OAAU,CACR,KAAQ,wBACV,CACF,CACF,EACA,aAAgB,mlEAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,SAAY,OACd,EACA,IAAO,CACL,SAAY,SACd,EACA,uBAA0B,CACxB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,+BACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,kBAAqB,CACnB,MAAS,oBACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,SAAY,CACV,MAAS,WACT,SAAY,OACd,EACA,WAAc,CACZ,MAAS,aACT,SAAY,OACd,EACA,gBAAmB,CACjB,MAAS,kBACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,sCAAuC,CACrC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY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,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,iBAAkB,CAChB,MAAS,YACT,MAAS,CACP,CACE,MAAS,YACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,YACT,KAAQ,uDACV,EACA,CACE,MAAS,aACT,KAAQ,2DACV,EACA,CACE,MAAS,aACT,KAAQ,2DACV,CACF,CACF,CACF,CACF,EACA,oBAAqB,CACnB,MAAS,eACT,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,OACT,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,CACF,CACF,EC3MA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,cACT,YAAe,4CACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,gBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,kBACT,MAAS,CACP,MAAS,YACT,OAAU,CACR,KAAQ,+BACV,CACF,EACA,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,kCACV,CACF,EACA,aAAgB,q0GAChB,KAAQ,0DACV,EACA,CACE,MAAS,iBACT,aAAgB,q0GAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,MAAS,YACT,SAAY,OACd,EACA,IAAO,CACL,SAAY,SACd,EACA,OAAU,CACR,MAAS,SACT,SAAY,MACZ,KAAQ,CACN,KAAQ,wBACV,EACA,OAAU,CACR,KAAQ,mCACV,CACF,EACA,uBAA0B,CACxB,MAAS,SACT,MAAS,CACP,CACE,MAAS,OACT,YAAe,qBACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,+BACV,CACF,CACF,EACA,CACE,MAAS,OACT,YAAe,WACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,wBACT,SAAY,MACZ,KAAQ,CACN,KAAQ,yBACV,EACA,OAAU,CACR,KAAQ,mBACV,CACF,EACA,kBAAqB,CACnB,MAAS,oBACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,0BACV,CACF,CACF,CACF,CACF,EACA,SAAY,CACV,MAAS,WACT,SAAY,OACd,EACA,WAAc,CACZ,MAAS,aACT,SAAY,OACd,EACA,gBAAmB,CACjB,MAAS,kBACT,YAAe;AAAA;AAAA;AAAA;AAAA,uEACf,MAAS,CACP,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,4CACV,CACF,CACF,EACA,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,cACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,oBAAuB,CACrB,MAAS,sBACT,SAAY,OACd,EACA,0BAA2B,CACzB,MAAS,UACT,YAAe;AAAA;AAAA;AAAA;AAAA;AAAA,0HACf,MAAS,CACP,CACE,MAAS,UACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,KAAQ,iCACV,EACA,CACE,MAAS,mBACT,KAAQ,sCACV,CACF,CACF,CACF,CACF,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,mCACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAA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,CACV,MAAS,yBACT,YAAe,uDACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,iBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,qCACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,wCACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,cACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,q0OAChB,KAAQ,0DACV,EACA,CACE,MAAS,qCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,cACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,q0OAChB,KAAQ,0DACV,EACA,CACE,MAAS,wCACT,MAAS,CACP,MAAS,SACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,eACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,yYAChB,KAAQ,0DACV,EACA,CACE,MAAS,uCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,eACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,yYAChB,KAAQ,0DACV,EACA,CACE,MAAS,wDACT,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,iBACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,2kBAChB,KAAQ,0DACV,EACA,CACE,MAAS,oDACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,iBACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,2kBAChB,KAAQ,0DACV,EACA,CACE,MAAS,2CACT,SAAY,CACV,MAAS,SACT,OAAU,CACR,KAAQ,2CACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,+BACT,OAAU,CACR,KAAQ,4CACV,CACF,EACA,CACE,MAAS,oBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,mkHAChB,KAAQ,0DACV,EACA,CACE,MAAS,uCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,+BACT,OAAU,CACR,KAAQ,4CACV,CACF,EACA,CACE,MAAS,oBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,mkHAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,MAAS,YACT,SAAY,OACd,EACA,KAAQ,CACN,MAAS,OACT,YAAe,kBACjB,EACA,IAAO,CACL,SAAY,SACd,EACA,6BAA8B,CAC5B,SAAY,OACZ,MAAS,CACP,KAAQ,qCACV,CACF,EACA,0BAA2B,CACzB,MAAS,aACT,SAAY,OACd,EACA,mCAAoC,CAClC,MAAS,sBACT,SAAY,OACd,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,kDACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yCACV,CACF,CACF,CACF,CACF,EACA,0BAA2B,CACzB,MAAS,WACT,SAAY,OACd,EACA,sCAAuC,CACrC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,iBACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,uBAAwB,CACtB,MAAS,iBACT,YAAe,kDACf,MAAS,CACP,CACE,MAAS,qBACT,YAAe,4CACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,WACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,0BAA2B,CACzB,MAAS,oBACT,YAAe,iEACf,MAAS,CACP,CACE,MAAS,gBACT,YAAe,gDACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,kBACT,YAAe,yCACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,MACT,KAAQ,yBACV,CACF,CACF,EACA,CACE,MAAS,kBACT,YAAe,yCACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,MACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,CACF,CACF,EC7TA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,uBACT,YAAe,qDACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,iBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,0BACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,mBACV,CACF,EACA,aAAgB,qLAChB,KAAQ,0DACV,EACA,CACE,MAAS,sBACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,aAAgB,qLAChB,KAAQ,0DACV,EACA,CACE,MAAS,6BACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,mBACV,CACF,EACA,aAAgB,qLAChB,KAAQ,0DACV,EACA,CACE,MAAS,yBACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,aAAgB,qLAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,IAAO,CACL,SAAY,SACd,CACF,CACF,ECzDA,IAAAC,GAAA,CACE,SAAY,CACV,MAAS,2BACT,YAAe,gFACf,QAAW,QACX,cAAiB,KACjB,SAAY,CACV,KAAQ,QACR,QAAW,iBACb,EACA,QAAW,YACb,EACA,WAAc,CACZ,CACE,MAAS,gCACT,MAAS,CACP,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,KACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,SACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,qMAChB,KAAQ,0DACV,EACA,CACE,MAAS,+BACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,SACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,qMAChB,KAAQ,0DACV,EACA,CACE,MAAS,qDACT,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,mBACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,+6DAChB,KAAQ,0DACV,EACA,CACE,MAAS,qDACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,mBACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,+6DAChB,KAAQ,0DACV,EACA,CACE,MAAS,mCACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,8CACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,0BACT,OAAU,CACR,KAAQ,4CACV,CACF,EACA,CACE,MAAS,qBACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,+2DAChB,KAAQ,0DACV,EACA,CACE,MAAS,mCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,0BACT,OAAU,CACR,KAAQ,4CACV,CACF,EACA,CACE,MAAS,qBACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,+2DAChB,KAAQ,0DACV,EACA,CACE,MAAS,wDACT,MAAS,CACP,MAAS,SACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,6RAChB,KAAQ,0DACV,EACA,CACE,MAAS,uDACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,aACT,OAAU,CACR,KAAQ,4CACV,CACF,CACF,EACA,aAAgB,6RAChB,KAAQ,0DACV,EACA,CACE,MAAS,+DACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,sDACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,gBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,yrKAChB,KAAQ,0DACV,EACA,CACE,MAAS,2DACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,gBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,yrKAChB,KAAQ,0DACV,EACA,CACE,MAAS,iDACT,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,mBACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,ikEAChB,KAAQ,0DACV,EACA,CACE,MAAS,iDACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,mBACT,OAAU,CACR,KAAQ,yBACV,CACF,CACF,EACA,aAAgB,ikEAChB,KAAQ,0DACV,EACA,CACE,MAAS,mCACT,SAAY,CACV,MAAS,WACT,OAAU,CACR,KAAQ,uCACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,uBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,69IAChB,KAAQ,0DACV,EACA,CACE,MAAS,mCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,WACT,OAAU,CACR,KAAQ,qDACV,CACF,EACA,CACE,MAAS,uBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,69IAChB,KAAQ,0DACV,EACA,CACE,MAAS,sCACT,MAAS,CACP,MAAS,SACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,SAAY,CACV,MAAS,YACT,OAAU,CACR,KAAQ,oBACV,CACF,EACA,WAAc,CACZ,CACE,MAAS,qBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,usCAChB,KAAQ,0DACV,EACA,CACE,MAAS,qCACT,SAAY,CACV,OAAU,CAAC,CACb,EACA,WAAc,CACZ,CACE,MAAS,qBACT,OAAU,CACR,KAAQ,yCACV,CACF,CACF,EACA,aAAgB,usCAChB,KAAQ,0DACV,CACF,EACA,YAAe,CACb,UAAa,CACX,MAAS,YACT,SAAY,OACd,EACA,KAAQ,CACN,MAAS,OACT,YAAe,kBACjB,EACA,IAAO,CACL,SAAY,SACd,EACA,4BAA6B,CAC3B,SAAY,OACZ,MAAS,CACP,KAAQ,oCACV,CACF,EACA,0BAA2B,CACzB,MAAS,aACT,SAAY,OACd,EACA,mCAAoC,CAClC,MAAS,sBACT,SAAY,OACd,EACA,6BAA8B,CAC5B,MAAS,aACT,YAAe;AAAA;AAAA;AAAA,wCACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,kDACV,CACF,CACF,EACA,CACE,MAAS,SACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,KAAQ,yCACV,CACF,CACF,CACF,CACF,EACA,0BAA2B,CACzB,MAAS,WACT,SAAY,OACd,EACA,sCAAuC,CACrC,MAAS,kBACT,YAAe,8MACf,MAAS,CACP,CACE,MAAS,kBACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,iBACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,wCAAyC,CACvC,MAAS,kCACT,YAAe,6DACf,MAAS,CACP,CACE,MAAS,cACT,YAAe,kDACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,SACT,KAAQ,0CACV,CACF,CACF,EACA,CACE,MAAS,gBACT,YAAe;AAAA,kDACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,oBACT,YAAe,iDACf,KAAQ,mBACV,EACA,CACE,MAAS,oBACT,YAAe,0DACf,KAAQ,mBACV,EACA,CACE,MAAS,gBACT,YAAe,6CACf,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,sBAAuB,CACrB,MAAS,gBACT,YAAe,oDACf,MAAS,CACP,CACE,MAAS,cACT,YAAe,6DACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,WACT,KAAQ,mBACV,CACF,CACF,EACA,CACE,MAAS,oBACT,YAAe,+DACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,WACT,KAAQ,mBACV,CACF,CACF,CACF,CACF,EACA,yBAA0B,CACxB,MAAS,mBACT,YAAe,gEACf,MAAS,CACP,CACE,MAAS,eACT,YAAe,+CACf,SAAY,cACZ,MAAS,EACT,OAAU,CAAC,CACb,EACA,CACE,MAAS,iBACT,YAAe,2DACf,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,MACT,KAAQ,yBACV,EACA,CACE,MAAS,eACT,KAAQ,yBACV,CACF,CACF,CACF,CACF,EACA,gCAAiC,CAC/B,MAAS,0BACT,YAAe,gCACf,MAAS,CACP,CACE,MAAS,0BACT,SAAY,cACZ,MAAS,EACT,OAAU,CACR,CACE,MAAS,qBACT,YAAe,kEACf,KAAQ,4CACV,CACF,CACF,CACF,CACF,CACF,CACF,EHliBA,OAAS,sBAAAC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kB,eAC7CY,CACF,EACMC,EAAwB1D,EAAe,QAEvC2D,EAAqB9G,EAAQ,CACjCE,EAAW,EAAE,EACbA,EACE,8DACF,CACF,CAAC,EAEK6G,EAA2B,CAC/B,CACE,KAAMH,EACN,SAAU,GACZ,CACF,EAEA,KAAK,KAAK,uBAAyB,IACnC,KAAK,KACF,KAAKD,EAAe,OAAQA,EAAe,WAAW,EACtD,mBAAmB,EACnB,KAAK,IAAKC,EAAuBxG,GAAY,EAAE,CAAC,EAChD,cAAcyE,EAAc,IAAI,EAChC,kBAAkB7E,EAAQ,CAAC,CAAC,EAAG,MAAM,EAErC,MAAM6G,EAAuBE,CAAe,EAC5C,sBAAsBD,EAAoB,MAAM,EAEhD,eAAevH,EAAW,MAAM,OAAQA,EAAW,MAAM,WAAW,EACpE,WAAW,KAAK,YAAc,EAAI,UAAY,SAAS,EACvD,gBAAgBgH,CAAY,EAC5B,cAAcjH,CAAa,EAE9B,IAAM0H,EAAQ,MAAM,KAAK,KAAK,SAAS,EAEjCC,EAAgC,CACpC,uBAAwB,CACtB,QAASN,EACT,gBAAiBL,EACjB,WAAYM,CACd,EACA,wBAAyB,CACvB,wBAAyBA,EACzB,WAAYzD,EAAe,QAC7B,CACF,EAEA,MAAO,CAAE,MAAA6D,EAAO,UAAAC,CAAU,CAC5B,GAj7BE,KAAK,QAAUC,GACf,KAAK,oBAAsBtI,CAC7B,CAEA,IAAI,gBAAiB,CACnB,OAAO,KAAK,OACd,CA46BF","names":["deserializeAddress","ForgeScript","mConStr","mConStr0","mConStr1","mOutputReference","mScriptAddress","resolveScriptHash","serializeNativeScript","stringToHex","toUTF8","applyParamsToScript","parseDatumCbor","parseInlineDatum","serializePlutusScript","MeshTxInitiator","mesh","fetcher","wallet","networkId","stakeCredential","version","__publicField","scriptCbor","address","serializePlutusScript","signedTx","txHash","walletAddress","usedAddresses","unusedAddresses","lovelace","providedUtxos","utxos","u","lovelaceAmount","a","assetHex","userUtxos","assetAmount","collateral","scriptUtxo","scriptAddr","utxo","builtinByteString","outputReference","resolveScriptHash","serializePlutusScript","applyParamsToScript","plutus_default","getScriptCbor","oracleParamUtxo","scriptIndex","validators","plutus_default","oracleNFTCbor","applyParamsToScript","outputReference","oracleNFTToParam","builtinByteString","resolveScriptHash","getScriptHash","scriptCbor","getScriptInfo","stakeCredential","networkId","info","oracleAddress","serializePlutusScript","contentRegistryAddress","ownershipRegistryAddress","MeshContentOwnershipContract","MeshTxInitiator","inputs","contract","__publicField","getScriptInfo","keyHash","deserializeAddress","nativeScript","scriptAddress","serializeNativeScript","utxos","collateral","walletAddress","paramUtxo","script","plutus_default","param","mOutputReference","paramScript","applyParamsToScript","policyId","resolveScriptHash","txHex","mConStr0","datumValue","scriptIndex","getScriptCbor","scriptUtxo","currentOracleDatum","contentNumber","ownershipNumber","contentTokenName","stringToHex","oracleTxHash","oracleTxId","oracleAddress","oracleValue","oracleDatumValue","ownershipTokenName","mConStr1","tokenName","tokenMetadata","forgingScript","ForgeScript","tokenNameHex","metadata","ownerAssetHex","contentHashHex","registryNumber","registryName","oracleUtxo","contentUtxo","ownershipUtxo","contentTxHash","contentTxId","_contentAddress","contentAmount","ownershipTxHash","ownershipTxId","ownershipValue","ownershipAddress","ownerAssetClass","newContentRegistry","newOwnershipRegistry","mConStr","content","contentAtRegistry","parseDatumCbor","toUTF8","ownerTokenUtxo","newContentHashHex","registryTokenNameHex","oracle","ownership","newOwnerAssetHex","newOwnerAssetClass","scriptUtxos","validatorTxHash","validatorTxId","scriptValue","txInHash","txInId","txHash","outputIndex","parseInlineDatum","contentRegistryCount","ownershipRegistryCount","oracleAddr","mScriptAddress","contentRegistryAddr","ownershipRegistryAddr","contentArray","ownershipArray","toFetch","promises","plutusData","newContentHash","contentRegistry","plutusBytes","ownershipRegistry","plutusBytesArray","serializedOpsPlutusAddr","conStr0","conStr1","DEFAULT_REDEEMER_BUDGET","mConStr1","mConStr2","MeshValue","pubKeyAddress","value","deserializeAddress","deserializeDatum","mergeAssets","serializeAddressObj","applyParamsToScript","plutus_default","plutus_default","plutus_default","initiateEscrowDatum","walletAddress","amount","pubKeyHash","stakeCredentialHash","deserializeAddress","conStr0","pubKeyAddress","value","activeEscrowDatum","initiationDatum","initiator","initiatorAmount","conStr1","recipientDepositRedeemer","recipient","depositAmount","MeshEscrowContract","MeshTxInitiator","inputs","__publicField","applyParamsToScript","plutus_default","escrowAmount","utxos","escrowUtxo","collateral","inputDatum","deserializeDatum","initiatorAddressObj","recipientAddressObj","recipientAmount","initiatorAddress","serializeAddressObj","recipientAddress","initiatorToReceive","MeshValue","recipientToReceive","mConStr1","outputDatum","inputAssets","mergeAssets","DEFAULT_REDEEMER_BUDGET","mConStr2","txHash","builtinByteString","mConStr0","mConStr1","outputReference","stringToHex","txOutRef","deserializeDatum","resolveScriptHash","applyParamsToScript","plutus_default","plutus_default","MeshGiftCardContract","MeshTxInitiator","inputs","tokenNameHex","paramUtxo","__publicField","utxoTxHash","utxoTxId","scriptCbor","utxo","plutus_default","outputReference","txOutRef","applyParamsToScript","builtinByteString","policyId","tokenName","giftValue","utxos","walletAddress","collateral","stringToHex","firstUtxo","remainingUtxos","giftCardScript","giftCardPolicy","resolveScriptHash","redeemScript","redeemAddr","mConStr0","giftCardUtxo","inlineDatum","deserializeDatum","paramTxHash","paramTxId","mConStr1","txHash","deserializeAddress","mConStr0","stringToHex","applyParamsToScript","plutus_default","plutus_default","MeshHelloWorldContract","MeshTxInitiator","inputs","__publicField","applyParamsToScript","plutus_default","assets","utxos","walletAddress","signerHash","deserializeAddress","mConStr0","scriptUtxo","message","collateral","stringToHex","txHash","conStr0","currencySymbol","integer","mConStr0","mConStr1","parseAssetUnit","pubKeyAddress","tokenName","deserializeAddress","deserializeDatum","serializeAddressObj","applyParamsToScript","plutus_default","plutus_default","marketplaceDatum","sellerAddress","lovelaceFee","assetHex","pubKeyHash","stakeCredentialHash","deserializeAddress","policyId","assetName","parseAssetUnit","conStr0","pubKeyAddress","integer","currencySymbol","tokenName","MeshMarketplaceContract","MeshTxInitiator","inputs","ownerAddress","feePercentageBasisPoint","__publicField","applyParamsToScript","plutus_default","asset","price","utxos","walletAddress","tokenForSale","outputDatum","marketplaceUtxo","collateral","mConStr1","inputDatum","deserializeDatum","inputLovelace","a","tx","mConStr0","ownerToReceiveLovelace","ownerToReceive","sellerToReceiveLovelace","serializeAddressObj","sellerToReceive","newPrice","inputAsset","txHash","version","builtinByteString","list","deserializeAddress","Transaction","applyParamsToScript","plutus_default","plutus_default","MeshPaymentSplitterContract","MeshTxInitiator","inputs","payees","__publicField","list","payee","builtinByteString","deserializeAddress","applyParamsToScript","plutus_default","lovelaceAmount","walletAddress","pubKeyHash","datum","Transaction","collateral","script","utxos","redeemer","tx","split","utxo","amount","lovelace","asset","addresses","conStr0","integer","mConStr0","mOutputReference","mPubKeyAddress","stringToHex","applyCborEncoding","applyParamsToScript","deserializeAddress","resolveScriptHash","serializeAddressObj","serializePlutusScript","parseDatumCbor","plutus_default","MeshPlutusNFTContract","MeshTxInitiator","inputs","contract","__publicField","applyCborEncoding","plutus_default","applyParamsToScript","mOutputReference","oracleNftPolicyId","resolveScriptHash","stringToHex","lovelacePrice","utxos","collateral","walletAddress","paramUtxo","script","param","paramScript","policyId","tokenName","pubKeyHash","stakeCredentialHash","deserializeAddress","txHex","mConStr0","mPubKeyAddress","assetMetadata","nftIndex","oracleUtxo","feeCollectorAddress","feeCollectorAddressObj","tokenNameHex","updatedOracleDatum","conStr0","integer","tx","metadata","oracleDatum","parseDatumCbor","serializeAddressObj","txHash","serializePlutusScript","conStr0","mConStr0","mConStr1","MeshValue","pubKeyAddress","value","deserializeAddress","deserializeDatum","serializeAddressObj","applyParamsToScript","plutus_default","plutus_default","MeshSwapContract","MeshTxInitiator","inputs","__publicField","applyParamsToScript","plutus_default","toProvide","toReceive","utxos","walletAddress","collateral","pubKeyHash","stakeCredentialHash","deserializeAddress","swapDatum","conStr0","pubKeyAddress","value","swapUtxo","inlineDatum","deserializeDatum","initiatorAddress","serializeAddressObj","initiatorToReceive","mConStr1","MeshValue","mConStr0","txHash","mConStr0","SLOT_CONFIG_NETWORK","unixTimeToEnclosingSlot","deserializeAddress","deserializeDatum","applyParamsToScript","plutus_default","plutus_default","MeshVestingContract","MeshTxInitiator","inputs","__publicField","applyParamsToScript","plutus_default","amount","lockUntilTimeStampMs","beneficiary","utxos","walletAddress","ownerPubKeyHash","deserializeAddress","beneficiaryPubKeyHash","mConStr0","vestingUtxo","collateral","collateralInput","collateralOutput","pubKeyHash","datum","deserializeDatum","invalidBefore","unixTimeToEnclosingSlot","SLOT_CONFIG_NETWORK","txHash","byteString","conStr0","conStr1","conStr2","integer","list","POLICY_ID_LENGTH","stringToHex","deserializeDatum","byteString","conStr","conStr1","integer","applyParamsToScript","resolveScriptHash","serializePlutusScript","scriptHashToRewardAddress","cbor","plutus_default","plutus_default","plutus_default","deserializeAddress","deserializeDatum","deserializeAddress","buildBaseAddress","CredentialType","protocolParams_default","resolveSmartWalletAddress","address","networkId","credential","deserializeAddress","programmableLogicBase","StandardScripts","protocolParams_default","buildBaseAddress","CredentialType","resolveStakeCredential","cred","resolveBlacklistScripts","blacklistMintBootstrapTxInput","blacklistAdminPkh","substandardScript","SubStandardScripts","blacklistMint","blacklistSpend","resolveBlacklistAddress","blacklistMintScriptHash","findValidator","validatorName","isStandard","sources","plutus_default","script","match","title","cborEncode","cbor_param","cbor","extractBytes","field","inner","parseRegistryDatum","datum","getCredential","parseBlacklistDatum","selectProgrammableTokenUtxos","senderProgTokenUtxos","unit","amount","selectedUtxos","selectedAmount","utxo","tokenAsset","a","returningAmount","StandardScripts","networkID","__publicField","validatorName","params","cbor","applyParamsToScript","findValidator","utxo","conStr","byteString","integer","extract","errorMsg","hash","plutusScript","staking","serializePlutusScript","mintingLogicCredential","paramScriptHash","p","conStr1","resolveScriptHash","utxo_reference","scriptHash","scriptHashToRewardAddress","txInput","SubStandardScripts","_cbor","cborEncode","policyId","rewardAddress","blacklistNodePolicyId","address","bootstraptxInput","adminPubkeyHash","adminPubKeyHash","programmableLogicBaseScriptHash","ProgrammableTokenContract","MeshTxInitiator","inputs","blacklistBootstrap","__publicField","assetName","quantity","issuerAdminPkh","recepientSmartAddress","params","fetcher","wallet","walletUtxos","changeAddress","collateral","standardScript","StandardScripts","substandardIssue","SubStandardScripts","substandardIssueCbor","substandardPolicyId","issuanceMint","issuanceRedeemer","conStr0","conStr1","byteString","programmableTokenAssets","stringToHex","programmableTokenDatum","txhash","outputIndex","standard","substandard","programmableLogicBase","programmableLogicGlobal","registrySpend","utxoToBurn","tokenUnit","utxoTokenAmount","a","progTokenRegistry","utxo","parseRegistryDatum","deserializeDatum","feePayerUtxo","u","protocolParamsUtxo","totalInputs","compareUtxos","b","sortedRefInputs","registryRefInputIndex","r","programmableGlobalRedeemer","integer","returningAmount","refInput","unit","senderSmartWallet","recipientSmartWallet","policyId","POLICY_ID_LENGTH","blacklistNodePolicyId","substandardTransfer","substandardTransferCbor","senderProgTokenUtxos","selectedUtxos","selectProgrammableTokenUtxos","sortedInputs","programmableInputs","uniquePolicies","asset","p","blacklistProofs","blacklistSpend","blacklistUtxos","stakingPkh","resolveStakeCredential","proofUtxo","bl","datum","parseBlacklistDatum","isGreater","isLess","registryProofs","registryUtxos","registryNft","substandardTransferRedeemer","list","idx","totalTokens","sum","totalLovelace","recipientLovelace","remainingTokens","recipientAssets","remainingLovelace","returningAssets","smartWalletAddress","blacklistMintBootstrap","blacklistMint","resolveBlacklistScripts","targetStakeHash","nodeToReplace","preexistingNode","beforeNode","afterNode","mintRedeemer","spendRedeemer","mintedAssets","credentialsToRemove","nodeToRemove","nodeToRemoveDatum","nodeToUpdate","nodeToUpdateDatum","newNext","updatedNode","conStr2","txHash","substandardScript","utxoToSeize","tokenAsset","seizedAssets","remainingAssets","substandardIssueAdmin","adminPubKeyHash","utilityUtxos","lovelaceAsset","hasOnlyAda","hasEnoughAda","bootstrapInput","blacklistMintPolicyId","blacklistSpendAddress","blacklistInitDatum","blacklistAssets","txHex","bootstrap","protocolParams_default"]}