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

@taquito/michelson-encoder

Package Overview
Dependencies
Maintainers
2
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taquito/michelson-encoder - npm Package Compare versions

Comparing version 7.1.0-preview-lambdaview.0 to 7.2.0-alpha.0

45

dist/lib/schema/storage.js

@@ -13,2 +13,22 @@ "use strict";

};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var _a;

@@ -136,2 +156,27 @@ Object.defineProperty(exports, "__esModule", { value: true });

};
/**
* @description Look up in top-level pairs of the storage to find a value matching the specified type
*
* @returns The first value found that match the type or `undefined` if no value is found
*
* @param storage storage to parse to find the value
* @param valueType type of value to look for
*
*/
Schema.prototype.FindFirstInTopLevelPair = function (storage, valueType) {
var path = this.findPathToValue(this.root['val'], valueType);
return path === null || path === void 0 ? void 0 : path.reduce(function (previous, current) {
return previous.args[current];
}, storage);
};
Schema.prototype.findPathToValue = function (schema, valueToFind, path) {
if (path === void 0) { path = []; }
if (JSON.stringify(valueToFind) === JSON.stringify(schema)) {
return path;
}
else if (schema['prim'] === 'pair') {
return (this.findPathToValue(schema['args'][0], valueToFind, __spread(path, ['0'])) ||
this.findPathToValue(schema['args'][1], valueToFind, __spread(path, ['1'])));
}
};
return Schema;

@@ -138,0 +183,0 @@ }());

@@ -37,3 +37,14 @@ import { MichelsonV1Expression, ScriptResponse } from '@taquito/rpc';

ComputeState(tx: RpcTransaction[], state: any): any;
/**
* @description Look up in top-level pairs of the storage to find a value matching the specified type
*
* @returns The first value found that match the type or `undefined` if no value is found
*
* @param storage storage to parse to find the value
* @param valueType type of value to look for
*
*/
FindFirstInTopLevelPair<T extends MichelsonV1Expression>(storage: any, valueType: any): T | undefined;
private findPathToValue;
}
export {};

24

package.json
{
"name": "@taquito/michelson-encoder",
"version": "7.1.0-preview-lambdaview.0",
"version": "7.2.0-alpha.0",
"description": "converts michelson data and types into convenient JS/TS objects",

@@ -70,4 +70,4 @@ "keywords": [

"dependencies": {
"@taquito/rpc": "^7.1.0-preview-lambdaview.0",
"@taquito/utils": "^7.1.0-preview-lambdaview.0",
"@taquito/rpc": "^7.2.0-alpha.0",
"@taquito/utils": "^7.2.0-alpha.0",
"bignumber.js": "^9.0.1",

@@ -77,10 +77,10 @@ "fast-json-stable-stringify": "^2.1.0"

"devDependencies": {
"@taquito/rpc": "^6.4.0-ledger.0",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.5",
"@taquito/rpc": "^7.1.0-beta.0",
"@types/jest": "^26.0.16",
"@types/node": "^14.14.10",
"colors": "^1.4.0",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"jest": "^26.5.2",
"jest-config": "^26.5.2",
"jest": "^26.6.3",
"jest-config": "^26.6.3",
"lint-staged": "^10.4.0",

@@ -97,4 +97,4 @@ "lodash.camelcase": "^4.3.0",

"shelljs": "^0.8.4",
"ts-jest": "^26.4.1",
"ts-node": "^9.0.0",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.1",
"tslint": "^6.1.3",

@@ -104,5 +104,5 @@ "tslint-config-prettier": "^1.18.0",

"typedoc": "^0.19.2",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},
"gitHead": "5263f97e652a38b0d04f1696241ed214c59b3c6d"
"gitHead": "cb287bf294290e81516f30a606b55cf26e0b3225"
}

@@ -458,3 +458,3 @@ {

],
"sha512": "a117df35c1325c4f8f47c811e0b99a4f4aecb6a20666a72c8df184dc3818c520fcb4cf8955d9b057ca33996eb7a9058bfc70623a756ac1d6d7ebb931babb19f4"
"sha512": "a9ef344418985002bcaa450abf0abfa8e05d66af59faa57715de53b4a474fcfd4daa2edbc486658f4fb056f1cf8e31d4f7b9d7e434fe64acfc705ec7569a07b2"
}

@@ -467,3 +467,3 @@ },

"name": "@taquito/michelson-encoder",
"version": "7.1.0-preview-lambdaview.0",
"version": "7.1.0-beta.0",
"description": "converts michelson data and types into convenient JS/TS objects",

@@ -535,4 +535,4 @@ "keywords": [

"dependencies": {
"@taquito/rpc": "^7.1.0-preview-lambdaview.0",
"@taquito/utils": "^7.1.0-preview-lambdaview.0",
"@taquito/rpc": "^7.1.0-beta.0",
"@taquito/utils": "^7.1.0-beta.0",
"bignumber.js": "^9.0.1",

@@ -543,9 +543,9 @@ "fast-json-stable-stringify": "^2.1.0"

"@taquito/rpc": "^6.4.0-ledger.0",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.5",
"@types/jest": "^26.0.16",
"@types/node": "^14.14.10",
"colors": "^1.4.0",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"jest": "^26.5.2",
"jest-config": "^26.5.2",
"jest": "^26.6.3",
"jest-config": "^26.6.3",
"lint-staged": "^10.4.0",

@@ -562,4 +562,4 @@ "lodash.camelcase": "^4.3.0",

"shelljs": "^0.8.4",
"ts-jest": "^26.4.1",
"ts-node": "^9.0.0",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.1",
"tslint": "^6.1.3",

@@ -569,3 +569,3 @@ "tslint-config-prettier": "^1.18.0",

"typedoc": "^0.19.2",
"typescript": "^4.0.3"
"typescript": "^4.1.2"
},

@@ -577,3 +577,3 @@ "gitHead": "551e35aeff7d6dcde1c72284238c0ed3c3aae77e"

],
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJfqdDvCRAD9Qy5GYHsngAAtm0QAEU8Zn2UAWnxxNSDBTrpx0yn\nfgvlR6wxZK4Bl6K3seXowUAFbbTOkOOTF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WbUhv0LDHtKsB\ndAhwpPjVj07XMhyu5X13eTdS4gvqvQMvvi8xspydAbeaa4zFiH3MNKUVXVkKKRn1\neZK8j5h/lsyr54ehfKPqhwbz4qYDDQ3yl1WoW3LdaSQRECJCqS5ziOuM7gwCUCJn\nlGLMIEPTK8B5S7lxVzbzeNSDh+7Ii/DtZc1fynZwzZh02XQ6GKio+uRDpPmw1SCn\nEJbJVu646UMBHM9tYTU9WsUaJnWbneY5FYsJ9ZLxIs8o5PRlSRSQrL3SrMZErEvW\nUnlEuQolkbUf9F9AjRDX6bYrwUx8ywa1mdyAVIKq2O1lPGxzvFKebqpLSglXwNKp\n9w7zEBjqi7UkoO3GJdTq\n=PT8b\n-----END PGP SIGNATURE-----\n"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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