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
1
Versions
42
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.11 to 0.1.12-dev0

11

dist/toOnChain/getSpendingPurposeData.js

@@ -7,3 +7,3 @@ "use strict";

function getSpendingPurposeData(rdmr, tx) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
var tag = rdmr.tag;

@@ -21,5 +21,6 @@ var ctorIdx;

ctorIdx = 1;
var utxoRef = tx.inputs.filter(function (input) { return input.resolved.address.paymentCreds.type === "script"; })[rdmr.index].utxoRef;
var utxoRef = (_b = tx.inputs[rdmr.index]) === null || _b === void 0 ? void 0 : _b.utxoRef;
if (utxoRef === undefined)
throw new Error("invalid utxo for spending redeemer " + rdmr.index.toString());
throw new Error("invalid 'Spend' redeemer index: " + rdmr.index.toString() +
"; tx.inputs.length is: " + tx.inputs.length.toString());
purposeArgData = utxoRef.toData();

@@ -29,3 +30,3 @@ }

ctorIdx = 2;
var stakeAddr = (_c = (_b = tx.withdrawals) === null || _b === void 0 ? void 0 : _b.map[rdmr.index]) === null || _c === void 0 ? void 0 : _c.rewardAccount;
var stakeAddr = (_d = (_c = tx.withdrawals) === null || _c === void 0 ? void 0 : _c.map[rdmr.index]) === null || _d === void 0 ? void 0 : _d.rewardAccount;
if (stakeAddr === undefined)

@@ -37,3 +38,3 @@ throw new Error("invalid stake credentials for rewarding redeemer " + rdmr.index.toString());

ctorIdx = 3;
var cert = (_d = tx.certs) === null || _d === void 0 ? void 0 : _d.at(rdmr.index);
var cert = (_e = tx.certs) === null || _e === void 0 ? void 0 : _e.at(rdmr.index);
if (cert === undefined)

@@ -40,0 +41,0 @@ throw new Error("invalid certificate for certifyng redeemer " + rdmr.index.toString());

@@ -334,3 +334,3 @@ "use strict";

}));
tx = new cardano_ledger_ts_1.Tx(__assign(__assign({}, tx), { body: __assign(__assign({}, tx.body), { outputs: txOuts, fee: fee, scriptDataHash: getScriptDataHash(rdmrs, datumsScriptData, languageViews) }), witnesses: __assign(__assign({}, tx.witnesses), { redeemers: rdmrs }), isScriptValid: _isScriptValid }));
tx = new cardano_ledger_ts_1.Tx(__assign(__assign({}, tx), { body: new cardano_ledger_ts_1.TxBody(__assign(__assign({}, tx.body), { outputs: txOuts, fee: fee, scriptDataHash: getScriptDataHash(rdmrs, datumsScriptData, languageViews) })), witnesses: new cardano_ledger_ts_1.TxWitnessSet(__assign(__assign({}, tx.witnesses), { redeemers: rdmrs })), isScriptValid: _isScriptValid }));
_isScriptValid = true;

@@ -516,3 +516,2 @@ totExBudget = new plutus_machine_1.ExBudget({ mem: 0, cpu: 0 });

var isScriptValid = true;
var nthScriptInput = 0;
var _inputs = inputs.map(function (_a, i) {

@@ -540,8 +539,7 @@ var utxo = _a.utxo, referenceScriptV2 = _a.referenceScriptV2, inputScript = _a.inputScript;

data: (0, CanBeData_1.forceData)(redeemer),
index: nthScriptInput,
index: i,
execUnits: dummyExecBudget.clone(),
tag: cardano_ledger_ts_1.TxRedeemerTag.Spend
}));
pushScriptToExec(nthScriptInput, cardano_ledger_ts_1.TxRedeemerTag.Spend, refScript, dat);
nthScriptInput++;
pushScriptToExec(i, cardano_ledger_ts_1.TxRedeemerTag.Spend, refScript, dat);
}

@@ -556,8 +554,7 @@ if (inputScript !== undefined) {

data: (0, CanBeData_1.forceData)(redeemer),
index: nthScriptInput,
index: i,
execUnits: dummyExecBudget.clone(),
tag: cardano_ledger_ts_1.TxRedeemerTag.Spend
}));
pushScriptToExec(nthScriptInput, cardano_ledger_ts_1.TxRedeemerTag.Spend, script, dat);
nthScriptInput++;
pushScriptToExec(i, cardano_ledger_ts_1.TxRedeemerTag.Spend, script, dat);
}

@@ -705,3 +702,3 @@ return new cardano_ledger_ts_1.TxIn(utxo);

var dummyTx = new cardano_ledger_ts_1.Tx({
body: {
body: new cardano_ledger_ts_1.TxBody({
inputs: _inputs,

@@ -730,3 +727,3 @@ outputs: dummyOuts,

network: network
},
}),
witnesses: dummyTxWitnesses,

@@ -756,3 +753,3 @@ auxiliaryData: auxData,

}));
var tx = new cardano_ledger_ts_1.Tx(__assign(__assign({}, dummyTx), { body: __assign(__assign({}, dummyTx.body), { outputs: txOuts, fee: minFee }) }));
var tx = new cardano_ledger_ts_1.Tx(__assign(__assign({}, dummyTx), { body: new cardano_ledger_ts_1.TxBody(__assign(__assign({}, dummyTx.body), { outputs: txOuts, fee: minFee })) }));
return {

@@ -759,0 +756,0 @@ tx: tx,

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

@@ -8,38 +8,38 @@ "main": "./dist/index.js",

"browser": {
"worker_threads": false
"worker_threads": false
},
"type": "commonjs",
"files": [
"dist"
"dist"
],
"scripts": {
"test": "jest",
"clear-jest": "jest --clearCache",
"test-watch": "jest --watchman",
"test-coverage": "jest --coverage",
"build": "rm -rf ./dist && tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
"build:light": "tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
"buidl": "npm run build",
"ci": "npm run test && npm run build",
"start": "npm-run-all --parallel build:watch run:watch"
"test": "jest",
"clear-jest": "jest --clearCache",
"test-watch": "jest --watchman",
"test-coverage": "jest --coverage",
"build": "rm -rf ./dist && tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
"build:light": "tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
"buidl": "npm run build",
"ci": "npm run test && npm run build",
"start": "npm-run-all --parallel build:watch run:watch"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
"registry": "https://registry.npmjs.org"
},
"keywords": [
"cardano",
"plutus",
"smart contract",
"smart-contract",
"smart contracts",
"smart-contracts",
"transaction",
"blockchain",
"block chain",
"block-chain",
"offchain",
"onchain",
"ada",
"ADA",
"dApp"
"cardano",
"plutus",
"smart contract",
"smart-contract",
"smart contracts",
"smart-contracts",
"transaction",
"blockchain",
"block chain",
"block-chain",
"offchain",
"onchain",
"ada",
"ADA",
"dApp"
],

@@ -49,41 +49,40 @@ "author": "Michele Nuzzi",

"repository": {
"type": "git",
"url": "git+https://github.com/HarmonicLabs/plu-ts.git"
"type": "git",
"url": "git+https://github.com/HarmonicLabs/plu-ts.git"
},
"bugs": {
"url": "https://github.com/HarmonicLabs/plu-ts/issues"
"url": "https://github.com/HarmonicLabs/plu-ts/issues"
},
"homepage": "https://github.com/HarmonicLabs/plu-ts#readme",
"dependencies": {
"@harmoniclabs/bigint-utils": "^1.0.0",
"@harmoniclabs/crypto": "^0.1.0",
"@harmoniclabs/uint8array-utils": "^1.0.0",
"@harmoniclabs/obj-utils": "^1.0.0"
"@harmoniclabs/bigint-utils": "^1.0.0",
"@harmoniclabs/crypto": "^0.1.0",
"@harmoniclabs/obj-utils": "^1.0.0",
"@harmoniclabs/uint8array-utils": "^1.0.0"
},
"peerDependencies": {
"@harmoniclabs/pair": "^1.0.0",
"@harmoniclabs/bytestring": "^1.0.0",
"@harmoniclabs/cbor": "^1.1.1",
"@harmoniclabs/plutus-data": "^1.0.0",
"@harmoniclabs/cardano-costmodels-ts": "^1.0.0",
"@harmoniclabs/plutus-machine": "^1.0.2",
"@harmoniclabs/uplc": "^1.1.0",
"@harmoniclabs/cardano-ledger-ts": "^0.1.3"
"@harmoniclabs/bytestring": "^1.0.0",
"@harmoniclabs/cardano-costmodels-ts": "^1.0.0",
"@harmoniclabs/cardano-ledger-ts": "^0.1.3",
"@harmoniclabs/cbor": "^1.1.1",
"@harmoniclabs/pair": "^1.0.0",
"@harmoniclabs/plutus-data": "^1.0.0",
"@harmoniclabs/plutus-machine": "^1.0.2",
"@harmoniclabs/uplc": "^1.1.0"
},
"devDependencies": {
"@babel/preset-env": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@types/blake2": "^4.0.1",
"@types/jest": "^28.1.4",
"@types/node": "^18.14.6",
"blake2": "^4.1.1",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"rollup": "^3.18.0",
"tsc-alias": "^1.7.1",
"typescript": "^4.6.3",
"v8-profiler-next": "^1.9.0"
"@babel/preset-env": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@types/blake2": "^4.0.1",
"@types/jest": "^28.1.4",
"@types/node": "^18.14.6",
"blake2": "^4.1.1",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"rollup": "^3.18.0",
"tsc-alias": "^1.7.1",
"typescript": "^4.6.3",
"v8-profiler-next": "^1.9.0"
},
"funding": "https://github.com/sponsors/HarmonicLabs"
}
}
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