Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@harmoniclabs/plu-ts-offchain

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmoniclabs/plu-ts-offchain - npm Package Compare versions

Comparing version 0.1.13-dev12 to 0.1.13-dev13

27

dist/TxBuilder/TxBuilder.js

@@ -117,15 +117,5 @@ "use strict";

var utils_1 = require("./utils.js");
var scriptCache = {};
// const scriptCache: { [x: string]: UPLCTerm } = {};
function getScriptLikeUplc(scriptLike) {
var script;
if ((script = scriptCache[scriptLike.hash]) === undefined) {
script = uplc_1.UPLCDecoder.parse(scriptLike.bytes, "flat").body;
Object.defineProperty(scriptCache, scriptLike.hash, {
value: script,
writable: false,
enumerable: true,
configurable: false
});
}
return script;
return uplc_1.UPLCDecoder.parse(scriptLike.bytes, "flat").body;
}

@@ -320,9 +310,12 @@ var TxBuilder = /** @class */ (function () {

var ctxData = getCtx(script.type, (0, getSpendingPurposeData_1.getSpendingPurposeData)(rdmr, tx.body, expectedVersion), (0, getSpendingPurposeData_1.getScriptInfoData)(rdmr, tx.body, expectedVersion), rdmrData, txInfosV1, txInfosV2, txInfosV3);
var _b = cek.eval(script.type === cardano_ledger_ts_1.ScriptType.PlutusV3 ?
new uplc_1.Application(getScriptLikeUplc(script), uplc_1.UPLCConst.data(ctxData)) :
new uplc_1.Application(new uplc_1.Application(getScriptLikeUplc(script), uplc_1.UPLCConst.data(rdmrData)), uplc_1.UPLCConst.data(ctxData))), result = _b.result, budgetSpent = _b.budgetSpent, logs = _b.logs;
_isScriptValid = onEvaluationResult(i, totExBudget, rdmr, result, budgetSpent, logs, [
var isV2OrLess = (script.type === cardano_ledger_ts_1.ScriptType.PlutusV1 ||
script.type === cardano_ledger_ts_1.ScriptType.PlutusV2 ||
script.type === cardano_ledger_ts_1.ScriptType.NativeScript);
var _b = cek.eval(isV2OrLess ?
new uplc_1.Application(new uplc_1.Application(getScriptLikeUplc(script), uplc_1.UPLCConst.data(rdmrData)), uplc_1.UPLCConst.data(ctxData)) :
new uplc_1.Application(getScriptLikeUplc(script), uplc_1.UPLCConst.data(ctxData))), result = _b.result, budgetSpent = _b.budgetSpent, logs = _b.logs;
_isScriptValid = onEvaluationResult(i, totExBudget, rdmr, result, budgetSpent, logs, isV2OrLess ? [
rdmrData,
ctxData
], rdmrs, onScriptResult, onScriptInvalid);
] : [ctxData], rdmrs, onScriptResult, onScriptInvalid);
};

@@ -329,0 +322,0 @@ if (tag === cardano_ledger_ts_1.TxRedeemerTag.Spend) {

{
"name": "@harmoniclabs/plu-ts-offchain",
"version": "0.1.13-dev12",
"version": "0.1.13-dev13",
"description": "An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc