@harmoniclabs/plu-ts-offchain
Advanced tools
Comparing version 0.1.13-dev3 to 0.1.13-dev4
@@ -270,3 +270,9 @@ "use strict"; | ||
var executionUnitPrices = this.protocolParamters.executionUnitPrices; | ||
executionUnitPrices = Array.isArray(executionUnitPrices) ? executionUnitPrices : [ | ||
executionUnitPrices.priceMemory, | ||
executionUnitPrices.priceSteps, | ||
]; | ||
var _d = __read(executionUnitPrices, 2), memRational = _d[0], cpuRational = _d[1]; | ||
memRational = typeof memRational === "number" ? cbor_1.CborPositiveRational.fromNumber(memRational) : memRational; | ||
cpuRational = typeof cpuRational === "number" ? cbor_1.CborPositiveRational.fromNumber(cpuRational) : cpuRational; | ||
// group by purpose so we can use the redeemer index to find the script | ||
@@ -273,0 +279,0 @@ var spendScriptsToExec = scriptsToExec.filter(function (elem) { return elem.rdmrTag === cardano_ledger_ts_1.TxRedeemerTag.Spend; }); |
@@ -13,2 +13,3 @@ "use strict"; | ||
}; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -24,12 +25,16 @@ exports.completeTxBuilderProtocolParams = exports.isValidatedTxBuilderProtocolParams = exports.defaultTxBuilderProtocolParameters = void 0; | ||
exports.defaultTxBuilderProtocolParameters = Object.freeze({ | ||
txFeePerByte: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.txFeePerByte), | ||
txFeeFixed: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.txFeeFixed), | ||
utxoCostPerByte: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.utxoCostPerByte), | ||
maxTxSize: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.maxTxSize), | ||
maxTxExecutionUnits: forceExBudget(cardano_ledger_ts_1.defaultProtocolParameters.maxTxExecutionUnits), | ||
maxCollateralInputs: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.maxCollateralInputs), | ||
collateralPercentage: BigInt(cardano_ledger_ts_1.defaultProtocolParameters.collateralPercentage), | ||
minfeeRefScriptCostPerByte: (0, Rational_1.cborFromRational)(cardano_ledger_ts_1.defaultProtocolParameters.minfeeRefScriptCostPerByte), | ||
executionUnitPrices: forceExecUnitPricesArray(cardano_ledger_ts_1.defaultProtocolParameters.executionUnitPrices), | ||
costModels: cardano_ledger_ts_1.defaultProtocolParameters.costModels | ||
txFeePerByte: BigInt((_a = cardano_ledger_ts_1.defaultProtocolParameters.txFeePerByte) !== null && _a !== void 0 ? _a : 0), | ||
txFeeFixed: BigInt((_b = cardano_ledger_ts_1.defaultProtocolParameters.txFeeFixed) !== null && _b !== void 0 ? _b : 0), | ||
utxoCostPerByte: BigInt((_c = cardano_ledger_ts_1.defaultProtocolParameters.utxoCostPerByte) !== null && _c !== void 0 ? _c : 0), | ||
maxTxSize: BigInt((_d = cardano_ledger_ts_1.defaultProtocolParameters.maxTxSize) !== null && _d !== void 0 ? _d : 0), | ||
maxTxExecutionUnits: forceExBudget((_e = cardano_ledger_ts_1.defaultProtocolParameters.maxTxExecutionUnits) !== null && _e !== void 0 ? _e : { steps: 0, memory: 0 }), | ||
maxCollateralInputs: BigInt((_f = cardano_ledger_ts_1.defaultProtocolParameters.maxCollateralInputs) !== null && _f !== void 0 ? _f : 0), | ||
collateralPercentage: BigInt((_g = cardano_ledger_ts_1.defaultProtocolParameters.collateralPercentage) !== null && _g !== void 0 ? _g : 0), | ||
minfeeRefScriptCostPerByte: (0, Rational_1.cborFromRational)((_h = cardano_ledger_ts_1.defaultProtocolParameters.minfeeRefScriptCostPerByte) !== null && _h !== void 0 ? _h : 0), | ||
executionUnitPrices: forceExecUnitPricesArray((_j = cardano_ledger_ts_1.defaultProtocolParameters.executionUnitPrices) !== null && _j !== void 0 ? _j : [0, 0]), | ||
costModels: (_k = cardano_ledger_ts_1.defaultProtocolParameters.costModels) !== null && _k !== void 0 ? _k : { | ||
PlutusScriptV1: cardano_costmodels_ts_1.defaultV1Costs, | ||
PlutusScriptV2: cardano_costmodels_ts_1.defaultV2Costs, | ||
PlutusScriptV3: cardano_costmodels_ts_1.defaultV3Costs | ||
} | ||
}); | ||
@@ -36,0 +41,0 @@ function forceExBudget(ex) { |
{ | ||
"name": "@harmoniclabs/plu-ts-offchain", | ||
"version": "0.1.13-dev3", | ||
"version": "0.1.13-dev4", | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247559
4584