Socket
Socket
Sign inDemoInstall

@taquito/michel-codec

Package Overview
Dependencies
Maintainers
2
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taquito/michel-codec - npm Package Compare versions

Comparing version 7.1.0-preview.1 to 7.1.0-preview.2

21

dist/lib/michelson-contract.js

@@ -60,8 +60,14 @@ "use strict";

};
Contract.prototype.entryPoints = function () {
return michelson_typecheck_1.contractEntryPoints(this.contract);
};
Contract.prototype.entryPoint = function (ep) {
return michelson_typecheck_1.contractEntryPoint(this.contract, ep);
};
Contract.prototype.assertDataValid = function (t, d) {
michelson_typecheck_1.assertDataValid(t, d, this.ctx);
Contract.prototype.assertDataValid = function (d, t) {
return michelson_typecheck_1.assertDataValid(d, t, this.ctx);
};
Contract.prototype.isDataValid = function (d, t) {
return michelson_typecheck_1.isDataValid(d, t, this.ctx);
};
Contract.prototype.assertParameterValid = function (ep, d) {

@@ -72,4 +78,13 @@ var t = this.entryPoint(ep || undefined);

}
this.assertDataValid(t, d);
this.assertDataValid(d, t);
};
Contract.prototype.isParameterValid = function (ep, d) {
try {
this.assertParameterValid(ep, d);
return true;
}
catch (_a) {
return false;
}
};
Contract.prototype.functionType = function (inst, stack) {

@@ -76,0 +91,0 @@ return michelson_typecheck_1.functionType(inst, stack, this.ctx);

5

dist/types/michelson-contract.d.ts

@@ -15,7 +15,10 @@ import { MichelsonContract, MichelsonContractSection, MichelsonType, MichelsonData, MichelsonCode, MichelsonStackType } from "./michelson-types";

section<T extends "parameter" | "storage" | "code">(section: T): MichelsonContractSection<T>;
entryPoints(): [string, MichelsonType][];
entryPoint(ep?: string): MichelsonType | null;
assertDataValid(t: MichelsonType, d: MichelsonData): void;
assertDataValid<T extends MichelsonType>(d: MichelsonData, t: T): d is MichelsonData<T>;
isDataValid<T extends MichelsonType>(d: MichelsonData, t: T): d is MichelsonData<T>;
assertParameterValid(ep: string | null, d: MichelsonData): void;
isParameterValid(ep: string | null, d: MichelsonData): boolean;
functionType(inst: MichelsonCode, stack: MichelsonType[]): MichelsonStackType;
}
export declare const dummyContract: Contract;

@@ -33,5 +33,10 @@ import { MichelsonType, MichelsonData, MichelsonCode, MichelsonContract, MichelsonContractSection, MichelsonStackType } from "./michelson-types";

export declare function contractEntryPoint(src: MichelsonContract | MichelsonType, ep?: string): MichelsonType | null;
export declare function contractEntryPoints(src: MichelsonContract | MichelsonType): [string, MichelsonType][];
export declare function assertContractValid(contract: MichelsonContract, ctx?: Context): MichelsonStackType;
export declare function assertDataValid(t: MichelsonType, d: MichelsonData, ctx?: Context): void;
export declare function assertDataValid<T extends MichelsonType>(d: MichelsonData, t: T, ctx?: Context): d is MichelsonData<T>;
export declare function functionType(inst: MichelsonCode, stack: MichelsonType[], ctx?: Context): MichelsonStackType;
export declare function assertTypesEqual<T1 extends MichelsonType | MichelsonType[], T2 extends T1>(a: T1, b: T2, field?: boolean): void;
export declare function isTypeAnnotationsValid(t: MichelsonType, field?: boolean): boolean;
export declare function isContractValid(contract: MichelsonContract, ctx?: Context): MichelsonStackType | null;
export declare function isDataValid<T extends MichelsonType>(d: MichelsonData, t: T, ctx?: Context): d is MichelsonData<T>;
export declare function isTypeEqual<T1 extends MichelsonType | MichelsonType[], T2 extends T1>(a: T1, b: T2, field?: boolean): boolean;

@@ -67,3 +67,3 @@ import { Prim, Expr, IntLiteral, StringLiteral, BytesLiteral, List } from "./micheline";

}
export declare type MichelsonData<T extends MichelsonType = MichelsonType> = T extends MichelsonTypeInt | MichelsonTypeNat | MichelsonTypeMutez ? IntLiteral : T extends MichelsonTypeString | MichelsonTypeKeyHash | MichelsonTypeAddress | MichelsonTypeKey | MichelsonTypeSignature ? StringLiteral : T extends MichelsonTypeBytes ? BytesLiteral : T extends MichelsonTypeTimestamp | MichelsonTypeChainID ? IntLiteral | StringLiteral : T extends MichelsonTypeUnit ? Data0<"Unit"> : T extends MichelsonTypeBool ? Data0<"True" | "False"> : T extends MichelsonTypeOption<infer A> ? Data0<"None"> | DataX<"Some", [MichelsonData<A>]> : T extends MichelsonTypeList<infer A> ? DataList<A> : T extends MichelsonTypePair<infer A1, infer A2> ? DataX<"Pair", [MichelsonData<A1>, MichelsonData<A2>]> : T extends MichelsonTypeOr<infer A1, infer A2> ? DataX<"Left", [MichelsonData<A1>]> | DataX<"Right", [MichelsonData<A2>]> : T extends MichelsonTypeLambda ? MichelsonCode : T extends MichelsonTypeSet<infer A> ? DataList<A> : T extends MichelsonTypeMap<infer A1, infer A2> ? EltList<A1, A2> : T extends MichelsonTypeBigMap<infer A1, infer A2> ? EltList<A1, A2> : never;
export declare type MichelsonData<T extends MichelsonType = MichelsonType> = T extends MichelsonTypeInt | MichelsonTypeNat | MichelsonTypeMutez ? IntLiteral : T extends MichelsonTypeString | MichelsonTypeKeyHash | MichelsonTypeAddress | MichelsonTypeKey | MichelsonTypeSignature ? StringLiteral : T extends MichelsonTypeBytes | MichelsonTypeChainID ? BytesLiteral : T extends MichelsonTypeTimestamp ? IntLiteral | StringLiteral : T extends MichelsonTypeUnit ? Data0<"Unit"> : T extends MichelsonTypeBool ? Data0<"True" | "False"> : T extends MichelsonTypeOption<infer A> ? Data0<"None"> | DataX<"Some", [MichelsonData<A>]> : T extends MichelsonTypeList<infer A> ? DataList<A> : T extends MichelsonTypePair<infer A1, infer A2> ? DataX<"Pair", [MichelsonData<A1>, MichelsonData<A2>]> : T extends MichelsonTypeOr<infer A1, infer A2> ? DataX<"Left", [MichelsonData<A1>]> | DataX<"Right", [MichelsonData<A2>]> : T extends MichelsonTypeLambda ? MichelsonCode : T extends MichelsonTypeSet<infer A> ? DataList<A> : T extends MichelsonTypeMap<infer A1, infer A2> ? EltList<A1, A2> : T extends MichelsonTypeBigMap<infer A1, infer A2> ? EltList<A1, A2> : never;
declare type MichelsonSectionId = "parameter" | "storage" | "code";

@@ -70,0 +70,0 @@ declare type SectionPrim<PT extends MichelsonSectionId, AT extends Expr[]> = ReqArgs<Prim<PT, AT>>;

{
"name": "@taquito/michel-codec",
"version": "7.1.0-preview.1",
"version": "7.1.0-preview.2",
"description": "Michelson parser/validator/formatter",

@@ -89,3 +89,3 @@ "keywords": [

},
"gitHead": "bf165096acaea8cc76b1a61d300c894ebc80d92c"
"gitHead": "58c179510cbefe3ccab25c96e07c9b6928876085"
}

@@ -33,7 +33,7 @@ {

"path": "dist/lib/michelson-contract.js",
"sha512": "1e274274740fbe4a1df0f33b90d924dc660d3f2e3cf351a99a4e328102216b819a9c0e5eb1a3b013babd3a75478b6f1bc5e340b42d5c65da63276a47851ad440"
"sha512": "845b36fabe1c3085f3e8709fa3597d08578b49dc5faa333fde175517cbae7114be4f9b2b855c27087e965dde60e0fbeba0f048d4b445f20c1b35ffda21c36bac"
},
{
"path": "dist/lib/michelson-typecheck.js",
"sha512": "06ed8dd041e40b55ddab8cbb0b65a972373620165e883471bc823fadc7f53ba7de26cc02f836f28a14da893eed4e31505e6fe7d87f32c0e4f05a45f057e321bf"
"sha512": "ad2dc78c76291e2eae63d41e27d6ea16730f6bb0a3033538f09f6080fa1822b8e2ca74943ca7560f3aa182a5b267c1d6ab41d76b7494b86ecd6e65d5902078a1"
},

@@ -54,3 +54,3 @@ {

"path": "dist/taquito-michel-codec.es5.js",
"sha512": "60d8cf3ee0b0d95e9c2cfa994160c600064e17c3c0f2769e3a5a2a1c74fe01c2dc49920c595f43cd28a4d5341d7fe80a334ef3abeebfacc05fdd3df25df9fe1a"
"sha512": "6a1b22392248c443eef676a290b640e5366f52cc133cf0ae6376cfb19c914ea06ebdcf762f08a478c2f6c9329e3f3c1e36d09b774d7c2568b21c48920739d0dd"
},

@@ -63,3 +63,3 @@ {

"path": "dist/taquito-michel-codec.umd.js",
"sha512": "cf4bc1714cf3b75da587734bd80483b9827a1c000421b32f1806d67682caef48f951bce444dda540ccfaaaba843a6112992bf03fc8236a5b11d6bf7de5492d72"
"sha512": "fcd446cb76d44ef1621f71ce2f236e4cf4807a4ab0995ce3bfbd7c788f0a1ab174af558ee37bfab60f5cb229e3ff589cf708dd6e867d3834102d46bb35e1a2d4"
},

@@ -76,3 +76,3 @@ {

"path": "dist/lib/formatters.js.map",
"sha512": "41aa0a57ad716ea947cfd53d0b9c4a1013402eb4bd09082000793f51563d86165f1234d39e68caff4fc1f7a03fe8ce12bfa5c53093ca457fabbe1763500c8ac0"
"sha512": "fcbfac897bc58470130ff45defc95d6a63a4f7f91b835afcd111cfd8cf5a097ae90523ef8aa31eaa190e3e0bad60d177546469862c39a76d30071520c4329dbe"
},

@@ -97,7 +97,7 @@ {

"path": "dist/lib/michelson-contract.js.map",
"sha512": "b817227d118283e0971e6cf889b016eab9ea9704b6c5dec6940b2e39e256561b434bdb74fa7d86b3378749d8f4ec8bf03146535028350383a65726364bcb8de3"
"sha512": "b6af24fbff09d63bad132c34f987784f235be3d964967a29e266e1b3da0ed2dddb4577780ddf67d2f295352851b7b1ad39f164d9e9a70cc31af37c7873f5fb9a"
},
{
"path": "dist/lib/michelson-typecheck.js.map",
"sha512": "d9f56d97c8adb91b99ad2ffe95f4dd4aede47ee97f54c98f0aafec507f19e7f5efa590cb8d8c450eb7e80a4494cfe0d03b4bb57024c178dd0a606278ed4cb36b"
"sha512": "3163cfe625fa7e2c85ecbe3201fe81442a1df3961c1685935424219d308517f53a28f79af65672618ae0bebe064438687f1f447b7642dd26cc5d08171e5f66d6"
},

@@ -118,3 +118,3 @@ {

"path": "dist/taquito-michel-codec.es5.js.map",
"sha512": "c426529d8a1dadf7f10eff74817f248022f0dc5a614d16dc3d8e2b641f33403cb311afb6df6e9b8b1351d52d9b89f07179d31f783a0520f1ff7dd8e769534aaa"
"sha512": "16308dfa7f6d66aaa84aec970528f6cdf63b20e4839752860c1ec5454323c6127952c0782abb6cd8ec7c3a0e6c93ad7acbb5a8b8e551a8ea3fac564c13a506f7"
},

@@ -127,3 +127,3 @@ {

"path": "dist/taquito-michel-codec.umd.js.map",
"sha512": "7e2dc59719662a17e7c08d1fc0e7ef52669d4d227e808143ef65fad727c2e22d91063a0873137025ab35f906a0382e3d948dafd862ee30405110d2a5dfd76a49"
"sha512": "084a53b51a95d510c68c5f996f98430f314aa1e57d3bcf0bd53d2b23f927de2aed4993985bda90843ff082a38ecc08e1961e326a3daeb14b4eedf1f787ac90cc"
},

@@ -164,11 +164,11 @@ {

"path": "dist/types/michelson-contract.d.ts",
"sha512": "15426c5b4a3566b1c8f5bb7a736f77cc77867dba11ec1c776686b1d3803488f2b5144aff77835eba9e34acdde08ea7b037a52247c70de61bb4d3137d0dea58e8"
"sha512": "d3a7d1adafb517db164844efb9cc7bc5930ec6ae35a5c57ce1d3796c4d90092d9019a4354b54043de000fa4e2c56b9cd9050feaf4067128e1e394e332c44ccc0"
},
{
"path": "dist/types/michelson-typecheck.d.ts",
"sha512": "1c38be88d7300732c222e7d1a8bd5833ada38ed1702140a69c0f8ea48285e1972b1882bb65ca9197d9bc01d1541425b60530f986391aacae28b22fc14596d2ff"
"sha512": "8ed9aa9942738319fe2f1138e6efb605fe255395820cd1aa4293a79da92bc3050b9eab7cfaf095ed52cf320c4a42fde5c19576e430a08388166e23e8b03b1ef3"
},
{
"path": "dist/types/michelson-types.d.ts",
"sha512": "9793bb73b3f2a2a528f500df38bb3cf11b5a23ddb41c0bd93c7afe18c8cb0cf0ef76bffddfeb3c0f437b6fdd3e97891084e7b845d1dce8e8945138f55deb9948"
"sha512": "c6b7ced60343107ad911df726fff4f93a95a15084cdfe0752030885b1f86cd42d1ce6e480ea57d803080ff0a83b006fb0a1628a786574dbf3527a85b521643c2"
},

@@ -225,3 +225,3 @@ {

],
"sha512": "7ced1cee79ecb72441b6f672b0f094959112ac79922039bec799e1e2c17ca8b9912ed41f8c121be34b59993e4a528e07a3376654c9b639f28ef9196fd8f794b2"
"sha512": "91415d85b1291793239aa70d1ea4380b6a00dbf7afc124cb9c54e98028dfda81a9fcc0b7a3cb133ecb25a93620e41ebdd548785bac57561dcaa81ef3fea0b594"
}

@@ -234,3 +234,3 @@ },

"name": "@taquito/michel-codec",
"version": "7.1.0-preview.1",
"version": "7.1.0-preview.2",
"description": "Michelson parser/validator/formatter",

@@ -326,3 +326,3 @@ "keywords": [

],
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJftcSpCRAD9Qy5GYHsngAAywoQAGk9kVKRj0ZsoLuxeip1YSl/\nuULrH0bB+C8K1RlK1SQlzYe0r1KaDAe99VvzpDD8Wl5blXIuX7aceiLmBXckUwMF\nckycOVeU7Ar0CsxEqnsUvcQ+q2b7MHLXgV7rSOWvHm3+RYPIN2J7HK6NzSuaXSld\nkgevE8ZFaGzBIC48Pc4UNJ0wPFeRwygUtSPOkk7Un0wEOPKo66EzGSTe/bKmzXn1\n6QPxeJgFDdFf5260l2RTziIiX6CUjeJmrfPqPq/0ct9zzPPM/0nS0GzFXn42oX12\nZhY8O8MF4wspAkvgjpBBMNX1dOX8rHx2W0ghrDj2kIqUwj6FeIgAP52mdUqbjXYg\nXFt4ruHy0zPRQLo811r0JUIUfZCDqJqklzeQM30Jj1WJIuAA0/INrArHzN6FTXeg\nfDqgplPZnWndiLapOy8QIgosEYdHIUIJ30r5/m++kh5DJq+lWOW56SIFLpKsCs6F\nY/nPD+CHSHDxXmTnDTFfDWeIsmqd76BD02tT/MhPMBIg+RI+2u3zYzBKkTdbdMRF\nDxXkGUV4IAlfkF0lvaN4lJDwiRYNRM5IChkB+osYta5TqWpNnflLPxN6khg5H57X\n3rig5fC9Zxz6bf3U7LhsmxAgU2OzrBkwLLl6wCdYPpYRB2FfVcmruvfGuI8XTE/W\nWE7x21RnRHAoHd/TaLYO\n=5NJi\n-----END PGP SIGNATURE-----\n"
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJfvHEKCRAD9Qy5GYHsngAAl78QAFJ/17F5AXZ2J5p/Swy2kSX4\n6zrAQyfmMUA9EJesn+vmKdAUdfeJ05k4LM5AZqqDCjgKewuhKTh8liK546FWaDMl\nIpAZd60ubgvO0/+bh+hbfeyINBJByq/VA/nr2dZTyT49OncqKHQf1LfSKljP+gAj\nEp42ZjFyGb3KS9BQOJtX77eMrrfHLJ3ytsFlQD8QbJH005huGdmgnc48EhX5KNal\nsepjYqVPD0jLtjnWmUZclKYJ0rIvB10E0LVTL5E24zRn4Fcfgej/dXRijfJuGkNb\ngG2exAT4pFGrB+/X93aGjqSmJQOKf9UxBi3+hfLKSmIundrcPkak+1SLv+lz7KH+\nz04Z4Os3It+nyMicvhNdVXndtL5EUdiaPLw+SGiU8UFpKKv0PyhSmnyEhqPSSzd2\n5RR6yAYeiI57jj+ezXZNaPboCStbnj2DI8Lu8DqZTKVEgfaZvZaXgJLnH7Zf52gs\nEDmpphbw6eeXUSUGH5UPrHQwmlLR1iv4lQDWeQ6oovLlQVk8CuqPa+q3oH6Q2iJU\nsj6odNk7ca3g6erY7lB8YgWz7PPO283GobEn79vDl3pspawi8HxLSEGaOpJVTDhF\nMcl0ytPMUHbJpHJKMqdEVjyUu04r53zOedkC0t8+E0sjzT6nAyo+TiH/59ZfOhTO\nN3onxQOnn8xf7V3tfjDE\n=CjHh\n-----END PGP SIGNATURE-----\n"
}

Sorry, the diff of this file is not supported yet

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

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