Socket
Socket
Sign inDemoInstall

@taquito/michel-codec

Package Overview
Dependencies
Maintainers
7
Versions
171
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 17.3.2 to 17.4.0-beta-RC.0

1

dist/lib/base58.js

@@ -256,2 +256,1 @@ "use strict";

exports.encodeBase58Check = encodeBase58Check;
//# sourceMappingURL=base58.js.map

79

dist/lib/binary.js

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

if ('bytes' in e) {
const bytes = utils_1.parseHex(e.bytes);
const bytes = (0, utils_1.parseHex)(e.bytes);
wr.writeUint8(Tag.Bytes);

@@ -572,3 +572,3 @@ wr.writeUint32(bytes.length);

const bytes = rd.readBytes(length);
const hex = utils_1.hexBytes(Array.from(bytes));
const hex = (0, utils_1.hexBytes)(Array.from(bytes));
return tr({ bytes: hex });

@@ -656,11 +656,11 @@ }

const getWriteTransformFunc = (t) => {
if (utils_1.isPairType(t)) {
if ((0, utils_1.isPairType)(t)) {
return (d) => {
if (!utils_1.isPairData(d)) {
if (!(0, utils_1.isPairData)(d)) {
throw new utils_1.MichelsonTypeError(t, `pair expected: ${JSON.stringify(d)}`, d);
}
michelson_validator_1.assertDataListIfAny(d);
(0, michelson_validator_1.assertDataListIfAny)(d);
// combs aren't used in pack format
const tc = utils_1.unpackComb('pair', t);
const dc = utils_1.unpackComb('Pair', d);
const tc = (0, utils_1.unpackComb)('pair', t);
const dc = (0, utils_1.unpackComb)('Pair', d);
return [

@@ -755,7 +755,7 @@ dc,

if ('string' in d) {
const id = utils_1.checkDecodeTezosID(d.string, 'ChainID');
const id = (0, utils_1.checkDecodeTezosID)(d.string, 'ChainID');
if (id === null) {
throw new utils_1.MichelsonTypeError(t, `chain id base58 expected: ${d.string}`, d);
}
bytes = { bytes: utils_1.hexBytes(id[1]) };
bytes = { bytes: (0, utils_1.hexBytes)(id[1]) };
}

@@ -774,7 +774,7 @@ else {

if ('string' in d) {
const sig = utils_1.checkDecodeTezosID(d.string, 'ED25519Signature', 'SECP256K1Signature', 'P256Signature', 'GenericSignature');
const sig = (0, utils_1.checkDecodeTezosID)(d.string, 'ED25519Signature', 'SECP256K1Signature', 'P256Signature', 'GenericSignature');
if (sig === null) {
throw new utils_1.MichelsonTypeError(t, `signature base58 expected: ${d.string}`, d);
}
bytes = { bytes: utils_1.hexBytes(sig[1]) };
bytes = { bytes: (0, utils_1.hexBytes)(sig[1]) };
}

@@ -793,3 +793,3 @@ else {

if ('string' in d) {
const pkh = utils_1.checkDecodeTezosID(d.string, 'ED25519PublicKeyHash', 'SECP256K1PublicKeyHash', 'P256PublicKeyHash');
const pkh = (0, utils_1.checkDecodeTezosID)(d.string, 'ED25519PublicKeyHash', 'SECP256K1PublicKeyHash', 'P256PublicKeyHash');
if (pkh === null) {

@@ -800,3 +800,3 @@ throw new utils_1.MichelsonTypeError(t, `key hash base58 expected: ${d.string}`, d);

writePublicKeyHash({ type: pkh[0], hash: pkh[1] }, w);
bytes = { bytes: utils_1.hexBytes(w.buffer) };
bytes = { bytes: (0, utils_1.hexBytes)(w.buffer) };
}

@@ -815,3 +815,3 @@ else {

if ('string' in d) {
const key = utils_1.checkDecodeTezosID(d.string, 'ED25519PublicKey', 'SECP256K1PublicKey', 'P256PublicKey');
const key = (0, utils_1.checkDecodeTezosID)(d.string, 'ED25519PublicKey', 'SECP256K1PublicKey', 'P256PublicKey');
if (key === null) {

@@ -822,3 +822,3 @@ throw new utils_1.MichelsonTypeError(t, `public key base58 expected: ${d.string}`, d);

writePublicKey({ type: key[0], publicKey: key[1] }, w);
bytes = { bytes: utils_1.hexBytes(w.buffer) };
bytes = { bytes: (0, utils_1.hexBytes)(w.buffer) };
}

@@ -838,3 +838,3 @@ else {

const s = d.string.split('%');
const address = utils_1.checkDecodeTezosID(s[0], 'ED25519PublicKeyHash', 'SECP256K1PublicKeyHash', 'P256PublicKeyHash', 'ContractHash');
const address = (0, utils_1.checkDecodeTezosID)(s[0], 'ED25519PublicKeyHash', 'SECP256K1PublicKeyHash', 'P256PublicKeyHash', 'ContractHash');
if (address === null) {

@@ -845,3 +845,3 @@ throw new utils_1.MichelsonTypeError(t, `address base58 expected: ${d.string}`, d);

writeAddress({ type: address[0], hash: address[1], entryPoint: s.length > 1 ? s[1] : undefined }, w);
bytes = { bytes: utils_1.hexBytes(w.buffer) };
bytes = { bytes: (0, utils_1.hexBytes)(w.buffer) };
}

@@ -860,3 +860,3 @@ else {

if ('string' in d) {
const p = utils_1.parseDate(d);
const p = (0, utils_1.parseDate)(d);
if (p === null) {

@@ -879,3 +879,3 @@ throw new utils_1.MichelsonTypeError(t, `can't parse date: ${d.string}`, d);

if (isPushInstruction(e)) {
michelson_validator_1.assertMichelsonInstruction(e);
(0, michelson_validator_1.assertMichelsonInstruction)(e);
// capture inlined type definition

@@ -964,13 +964,13 @@ return [

function packDataBytes(d, t) {
return { bytes: utils_1.hexBytes(packData(d, t)) };
return { bytes: (0, utils_1.hexBytes)(packData(d, t)) };
}
exports.packDataBytes = packDataBytes;
const getReadTransformFuncs = (t) => {
if (utils_1.isPairType(t)) {
if ((0, utils_1.isPairType)(t)) {
return [
(d) => {
if (!utils_1.isPairData(d)) {
if (!(0, utils_1.isPairData)(d)) {
throw new utils_1.MichelsonTypeError(t, `pair expected: ${JSON.stringify(d)}`, d);
}
const tc = utils_1.unpackComb('pair', t);
const tc = (0, utils_1.unpackComb)('pair', t);
return (function* () {

@@ -1066,7 +1066,7 @@ for (const a of tc.args) {

}
const bytes = utils_1.parseBytes(d.bytes);
const bytes = (0, utils_1.parseBytes)(d.bytes);
if (bytes === null) {
throw new utils_1.MichelsonTypeError(t, `can't parse bytes: ${d.bytes}`, d);
}
return { string: utils_1.encodeTezosID('ChainID', bytes) };
return { string: (0, utils_1.encodeTezosID)('ChainID', bytes) };
},

@@ -1084,7 +1084,7 @@ ];

}
const bytes = utils_1.parseBytes(d.bytes);
const bytes = (0, utils_1.parseBytes)(d.bytes);
if (bytes === null) {
throw new utils_1.MichelsonTypeError(t, `can't parse bytes: ${d.bytes}`, d);
}
return { string: utils_1.encodeTezosID('GenericSignature', bytes) };
return { string: (0, utils_1.encodeTezosID)('GenericSignature', bytes) };
},

@@ -1102,3 +1102,3 @@ ];

}
const bytes = utils_1.parseBytes(d.bytes);
const bytes = (0, utils_1.parseBytes)(d.bytes);
if (bytes === null) {

@@ -1110,3 +1110,3 @@ throw new utils_1.MichelsonTypeError(t, `can't parse bytes: ${d.bytes}`, d);

return {
string: utils_1.encodeTezosID(addr.type, addr.hash) + (addr.entryPoint ? '%' + addr.entryPoint : ''),
string: (0, utils_1.encodeTezosID)(addr.type, addr.hash) + (addr.entryPoint ? '%' + addr.entryPoint : ''),
};

@@ -1125,3 +1125,3 @@ },

}
const bytes = utils_1.parseBytes(d.bytes);
const bytes = (0, utils_1.parseBytes)(d.bytes);
if (bytes === null) {

@@ -1132,3 +1132,3 @@ throw new utils_1.MichelsonTypeError(t, `can't parse bytes: ${d.bytes}`, d);

const pk = readPublicKey(rd);
return { string: utils_1.encodeTezosID(pk.type, pk.publicKey) };
return { string: (0, utils_1.encodeTezosID)(pk.type, pk.publicKey) };
},

@@ -1146,3 +1146,3 @@ ];

}
const bytes = utils_1.parseBytes(d.bytes);
const bytes = (0, utils_1.parseBytes)(d.bytes);
if (bytes === null) {

@@ -1154,3 +1154,3 @@ throw new utils_1.MichelsonTypeError(t, `can't parse bytes: ${d.bytes}`, d);

return {
string: utils_1.encodeTezosID(addr.type, addr.hash) + (addr.entryPoint ? '%' + addr.entryPoint : ''),
string: (0, utils_1.encodeTezosID)(addr.type, addr.hash) + (addr.entryPoint ? '%' + addr.entryPoint : ''),
};

@@ -1180,3 +1180,3 @@ },

if (isPushInstruction(e)) {
michelson_validator_1.assertMichelsonInstruction(e);
(0, michelson_validator_1.assertMichelsonInstruction)(e);
// capture inlined type definition

@@ -1232,3 +1232,3 @@ return (function* () {

const ex = readExpr(r, t !== undefined ? getReadTransformFuncs(t) : readPassThrough);
if (michelson_validator_1.assertMichelsonData(ex)) {
if ((0, michelson_validator_1.assertMichelsonData)(ex)) {
return ex;

@@ -1259,3 +1259,3 @@ }

function unpackDataBytes(src, t) {
const bytes = utils_1.parseBytes(src.bytes);
const bytes = (0, utils_1.parseBytes)(src.bytes);
if (bytes === null) {

@@ -1269,3 +1269,3 @@ throw new Error(`can't parse bytes: "${src.bytes}"`);

function decodeAddressBytes(b) {
const bytes = utils_1.parseBytes(b.bytes);
const bytes = (0, utils_1.parseBytes)(b.bytes);
if (bytes === null) {

@@ -1279,3 +1279,3 @@ throw new Error(`can't parse bytes: "${b.bytes}"`);

function decodePublicKeyHashBytes(b) {
const bytes = utils_1.parseBytes(b.bytes);
const bytes = (0, utils_1.parseBytes)(b.bytes);
if (bytes === null) {

@@ -1289,3 +1289,3 @@ throw new Error(`can't parse bytes: "${b.bytes}"`);

function decodePublicKeyBytes(b) {
const bytes = utils_1.parseBytes(b.bytes);
const bytes = (0, utils_1.parseBytes)(b.bytes);
if (bytes === null) {

@@ -1298,2 +1298,1 @@ throw new Error(`can't parse bytes: "${b.bytes}"`);

exports.decodePublicKeyBytes = decodePublicKeyBytes;
//# sourceMappingURL=binary.js.map

@@ -91,2 +91,1 @@ "use strict";

exports.HexParseError = HexParseError;
//# sourceMappingURL=errors.js.map

@@ -10,8 +10,8 @@ "use strict";

if ('failed' in s) {
return `[FAILED: ${micheline_emitter_1.emitMicheline(s.failed)}]`;
return `[FAILED: ${(0, micheline_emitter_1.emitMicheline)(s.failed)}]`;
}
return s
.map((v, i) => {
const ann = utils_1.unpackAnnotations(v);
return `[${i}${ann.v ? '/' + ann.v[0] : ''}]: ${micheline_emitter_1.emitMicheline(v)}`;
const ann = (0, utils_1.unpackAnnotations)(v);
return `[${i}${ann.v ? '/' + ann.v[0] : ''}]: ${(0, micheline_emitter_1.emitMicheline)(v)}`;
})

@@ -28,3 +28,3 @@ .join('\n');

const macro = (_a = v.op[micheline_1.sourceReference]) === null || _a === void 0 ? void 0 : _a.macro;
const msg = `${macro ? 'Macro' : 'Op'}: ${macro ? micheline_emitter_1.emitMicheline(macro, undefined, true) + ' / ' : ''}${micheline_emitter_1.emitMicheline(v.op)}
const msg = `${macro ? 'Macro' : 'Op'}: ${macro ? (0, micheline_emitter_1.emitMicheline)(macro, undefined, true) + ' / ' : ''}${(0, micheline_emitter_1.emitMicheline)(v.op)}
Input:

@@ -43,3 +43,3 @@ ${formatStack(v.in)}

const macro = (_a = err.val[micheline_1.sourceReference]) === null || _a === void 0 ? void 0 : _a.macro;
return `${macro ? 'Macro' : 'Op'}: ${macro ? micheline_emitter_1.emitMicheline(macro, undefined, true) + ' / ' : ''}${micheline_emitter_1.emitMicheline(err.val)}
return `${macro ? 'Macro' : 'Op'}: ${macro ? (0, micheline_emitter_1.emitMicheline)(macro, undefined, true) + ' / ' : ''}${(0, micheline_emitter_1.emitMicheline)(err.val)}
Stack:

@@ -51,7 +51,7 @@ ${formatStack(err.stackState)}

const type = Array.isArray(err.val)
? '[' + err.val.map((v, i) => `[${i}]: ${micheline_emitter_1.emitMicheline(v)}`).join('; ') + ']'
: micheline_emitter_1.emitMicheline(err.val);
? '[' + err.val.map((v, i) => `[${i}]: ${(0, micheline_emitter_1.emitMicheline)(v)}`).join('; ') + ']'
: (0, micheline_emitter_1.emitMicheline)(err.val);
return `Type: ${type}
${err.data
? `Data: ${micheline_emitter_1.emitMicheline(err.data)}
? `Data: ${(0, micheline_emitter_1.emitMicheline)(err.data)}
`

@@ -62,6 +62,5 @@ : ''}

else {
return `Value: ${micheline_emitter_1.emitMicheline(err.val)}`;
return `Value: ${(0, micheline_emitter_1.emitMicheline)(err.val)}`;
}
}
exports.formatError = formatError;
//# sourceMappingURL=formatters.js.map

@@ -14,2 +14,1 @@ "use strict";

exports.expandGlobalConstants = expandGlobalConstants;
//# sourceMappingURL=global-constants.js.map

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

if (unpairRe.test(ex.prim)) {
if (michelson_types_1.ProtoInferiorTo(proto, michelson_types_1.Protocol.PtEdo2Zk) && assertArgs(ex, 0)) {
if ((0, michelson_types_1.ProtoInferiorTo)(proto, michelson_types_1.Protocol.PtEdo2Zk) && assertArgs(ex, 0)) {
const { r } = parsePairUnpairExpr(ex, ex.prim.slice(3), ex.annots || [], (l, r, top) => [

@@ -501,3 +501,3 @@ top,

}
if (michelson_types_1.ProtoInferiorTo(proto, michelson_types_1.Protocol.PtEdo2Zk)) {
if ((0, michelson_types_1.ProtoInferiorTo)(proto, michelson_types_1.Protocol.PtEdo2Zk)) {
if (n === 1) {

@@ -551,2 +551,1 @@ if (ex.args === undefined) {

exports.expandMacros = expandMacros;
//# sourceMappingURL=macros.js.map

@@ -134,2 +134,1 @@ "use strict";

exports.emitMicheline = emitMicheline;
//# sourceMappingURL=micheline-emitter.js.map

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

* @category Error
* @description Error inidicates a failure when parsing Micheline JSON
* @description Error indicates a failure when parsing Micheline JSON
*/

@@ -68,3 +68,3 @@ class JSONParseError extends core_1.TaquitoError {

*
* Encode a Michelson expression for inital storage of a smart contract
* Encode a Michelson expression for initial storage of a smart contract
* ```

@@ -90,3 +90,3 @@ * const src = `(Pair (Pair { Elt 1

if (((_a = this.opt) === null || _a === void 0 ? void 0 : _a.expandGlobalConstant) !== undefined && ex.prim === 'constant') {
const ret = global_constants_1.expandGlobalConstants(ex, this.opt.expandGlobalConstant);
const ret = (0, global_constants_1.expandGlobalConstants)(ex, this.opt.expandGlobalConstant);
if (ret !== ex) {

@@ -98,3 +98,3 @@ ret[micheline_1.sourceReference] = Object.assign(Object.assign({}, (ex[micheline_1.sourceReference] || { first: 0, last: 0 })), { globalConstant: ex });

if (((_b = this.opt) === null || _b === void 0 ? void 0 : _b.expandMacros) !== undefined ? (_c = this.opt) === null || _c === void 0 ? void 0 : _c.expandMacros : true) {
const ret = macros_1.expandMacros(ex, this.opt);
const ret = (0, macros_1.expandMacros)(ex, this.opt);
if (ret !== ex) {

@@ -280,3 +280,3 @@ ret[micheline_1.sourceReference] = Object.assign(Object.assign({}, (ex[micheline_1.sourceReference] || { first: 0, last: 0 })), { macro: ex });

}
const scanner = scan_1.scan(src);
const scanner = (0, scan_1.scan)(src);
const tok = scanner.next();

@@ -297,3 +297,3 @@ if (tok.done) {

}
const scanner = scan_1.scan(src);
const scanner = (0, scan_1.scan)(src);
const tok = scanner.next();

@@ -314,3 +314,3 @@ if (tok.done) {

}
const scanner = scan_1.scan(src);
const scanner = (0, scan_1.scan)(src);
const tok = scanner.next();

@@ -411,2 +411,1 @@ if (tok.done) {

exports.Parser = Parser;
//# sourceMappingURL=micheline-parser.js.map

@@ -6,2 +6,1 @@ "use strict";

exports.sourceReference = Symbol('source_reference');
//# sourceMappingURL=micheline.js.map

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

this.ctx = Object.assign({ contract }, opt);
this.output = michelson_typecheck_1.assertContractValid(contract, this.ctx);
this.output = (0, michelson_typecheck_1.assertContractValid)(contract, this.ctx);
}

@@ -21,3 +21,3 @@ static parse(src, opt) {

}
if (michelson_validator_1.assertMichelsonContract(expr)) {
if ((0, michelson_validator_1.assertMichelsonContract)(expr)) {
return new Contract(expr, opt);

@@ -34,4 +34,4 @@ }

// remove assertTypeAnnotationsValid from if block because: () => void || throw error
if (michelson_validator_1.assertMichelsonType(expr)) {
michelson_typecheck_1.assertTypeAnnotationsValid(expr);
if ((0, michelson_validator_1.assertMichelsonType)(expr)) {
(0, michelson_typecheck_1.assertTypeAnnotationsValid)(expr);
return expr;

@@ -47,3 +47,3 @@ }

}
if (michelson_validator_1.assertMichelsonData(expr)) {
if ((0, michelson_validator_1.assertMichelsonData)(expr)) {
return expr;

@@ -54,15 +54,15 @@ }

section(section) {
return michelson_typecheck_1.contractSection(this.contract, section);
return (0, michelson_typecheck_1.contractSection)(this.contract, section);
}
entryPoints() {
return michelson_typecheck_1.contractEntryPoints(this.contract);
return (0, michelson_typecheck_1.contractEntryPoints)(this.contract);
}
entryPoint(ep) {
return michelson_typecheck_1.contractEntryPoint(this.contract, ep);
return (0, michelson_typecheck_1.contractEntryPoint)(this.contract, ep);
}
assertDataValid(d, t) {
michelson_typecheck_1.assertDataValid(d, t, this.ctx);
(0, michelson_typecheck_1.assertDataValid)(d, t, this.ctx);
}
isDataValid(d, t) {
return michelson_typecheck_1.isDataValid(d, t, this.ctx);
return (0, michelson_typecheck_1.isDataValid)(d, t, this.ctx);
}

@@ -86,3 +86,3 @@ assertParameterValid(ep, d) {

functionType(inst, stack) {
return michelson_typecheck_1.functionType(inst, stack, this.ctx);
return (0, michelson_typecheck_1.functionType)(inst, stack, this.ctx);
}

@@ -100,2 +100,1 @@ }

]);
//# sourceMappingURL=michelson-contract.js.map

@@ -19,5 +19,3 @@ "use strict";

Protocol["PtEdo2Zk"] = "PtEdo2ZkT9oKpimTah6x2embF25oss54njMuPzkJTEi5RqfdZFA";
Protocol["PsFLoren"] = "PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i";
Protocol["PsFLorena"] = "PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i";
Protocol["PtGRANAD"] = "PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV";
Protocol["PtGRANADs"] = "PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV";

@@ -36,3 +34,3 @@ Protocol["PtHangzH"] = "PtHangzHogokSuiMHemCuowEavgYTP8J5qQ9fQS793MHYFpCY3r";

Protocol["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK";
})(Protocol = exports.Protocol || (exports.Protocol = {}));
})(Protocol || (exports.Protocol = Protocol = {}));
exports.DefaultProtocol = Protocol.Psithaca2;

@@ -74,2 +72,1 @@ const protoLevel = {

exports.ProtoInferiorTo = ProtoInferiorTo;
//# sourceMappingURL=michelson-types.js.map

@@ -818,2 +818,1 @@ "use strict";

exports.assertDataListIfAny = assertDataListIfAny;
//# sourceMappingURL=michelson-validator.js.map

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

Literal[Literal["Ident"] = 4] = "Ident";
})(Literal = exports.Literal || (exports.Literal = {}));
})(Literal || (exports.Literal = Literal = {}));
const isSpace = new RegExp('\\s');

@@ -130,2 +130,1 @@ const isIdentStart = new RegExp('[:@%_A-Za-z]');

exports.scan = scan;
//# sourceMappingURL=scan.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -35,2 +39,1 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
//# sourceMappingURL=taquito-michel-codec.js.map

@@ -48,2 +48,10 @@ "use strict";

class LongInteger {
append(c) {
let i = 0;
while (c !== 0 || i < this.buf.length) {
const m = (this.buf[i] || 0) * 10 + c;
this.buf[i++] = m % 256;
c = Math.floor(m / 256);
}
}
constructor(arg) {

@@ -77,10 +85,2 @@ this.neg = false;

}
append(c) {
let i = 0;
while (c !== 0 || i < this.buf.length) {
const m = (this.buf[i] || 0) * 10 + c;
this.buf[i++] = m % 256;
c = Math.floor(m / 256);
}
}
cmp(arg) {

@@ -232,3 +232,3 @@ if (this.neg !== arg.neg) {

function checkDecodeTezosID(id, ...types) {
const buf = base58_1.decodeBase58Check(id);
const buf = (0, base58_1.decodeBase58Check)(id);
for (const t of types) {

@@ -254,3 +254,3 @@ const [plen, p] = exports.tezosPrefix[t];

}
return base58_1.encodeBase58Check([...p, ...data]);
return (0, base58_1.encodeBase58Check)([...p, ...data]);
}

@@ -327,2 +327,1 @@ exports.encodeTezosID = encodeTezosID;

exports.hexBytes = hexBytes;
//# sourceMappingURL=utils.js.map

@@ -6,5 +6,4 @@ "use strict";

exports.VERSION = {
"commitHash": "a97e506efd61b86e39ae30db588401b8fda46553",
"version": "17.3.2"
"commitHash": "4f44dd73b7659554c167acb80f0c20f222f893a5",
"version": "17.4.0-beta-RC.0"
};
//# sourceMappingURL=version.js.map

@@ -0,0 +0,0 @@ import { TaquitoError } from '@taquito/core';

import { BytesLiteral } from './micheline';
import { MichelsonData, MichelsonType } from './michelson-types';
declare type AddressType = 'ED25519PublicKeyHash' | 'SECP256K1PublicKeyHash' | 'P256PublicKeyHash' | 'ContractHash';
type AddressType = 'ED25519PublicKeyHash' | 'SECP256K1PublicKeyHash' | 'P256PublicKeyHash' | 'ContractHash';
export interface Address {

@@ -9,3 +9,3 @@ type: AddressType;

}
export declare type PublicKeyType = 'ED25519PublicKey' | 'SECP256K1PublicKey' | 'P256PublicKey';
export type PublicKeyType = 'ED25519PublicKey' | 'SECP256K1PublicKey' | 'P256PublicKey';
export interface PublicKey {

@@ -12,0 +12,0 @@ type: PublicKeyType;

@@ -0,0 +0,0 @@ import { ParameterValidationError, TaquitoError } from '@taquito/core';

@@ -0,0 +0,0 @@ import { InstructionTrace } from './michelson-typecheck';

import { Prim, Expr } from './micheline';
import { GlobalConstantHashAndValue } from './micheline-parser';
export declare function expandGlobalConstants(ex: Prim, hashAndValue: GlobalConstantHashAndValue): Expr;

@@ -0,0 +0,0 @@ import { TaquitoError } from '@taquito/core';

@@ -0,0 +0,0 @@ import { Expr } from './micheline';

@@ -20,3 +20,3 @@ import { Token } from './scan';

* @category Error
* @description Error inidicates a failure when parsing Micheline JSON
* @description Error indicates a failure when parsing Micheline JSON
*/

@@ -74,3 +74,3 @@ export declare class JSONParseError extends TaquitoError {

*
* Encode a Michelson expression for inital storage of a smart contract
* Encode a Michelson expression for initial storage of a smart contract
* ```

@@ -77,0 +77,0 @@ * const src = `(Pair (Pair { Elt 1

@@ -1,2 +0,2 @@

export declare type SourceReference = {
export type SourceReference = {
first: number;

@@ -37,3 +37,3 @@ last: number;

}
export declare type List<T extends Expr> = T[] & Node;
export type List<T extends Expr> = T[] & Node;
interface ExprList extends List<Expr> {

@@ -44,3 +44,3 @@ }

*/
export declare type Expr = Prim | StringLiteral | IntLiteral | BytesLiteral | ExprList;
export type Expr = Prim | StringLiteral | IntLiteral | BytesLiteral | ExprList;
export {};

@@ -0,0 +0,0 @@ import { MichelsonContract, MichelsonContractSection, MichelsonType, MichelsonData, MichelsonCode, MichelsonReturnType } from './michelson-types';

@@ -0,0 +0,0 @@ import { MichelsonType, MichelsonData, MichelsonCode, MichelsonContract, MichelsonContractSection, MichelsonReturnType, MichelsonContractView } from './michelson-types';

@@ -8,17 +8,17 @@ import { Prim, Expr, IntLiteral, StringLiteral, BytesLiteral, List, Node } from './micheline';

}
declare type MichelsonNoArgInstructionID = 'ABS' | 'ADD' | 'ADDRESS' | 'AMOUNT' | 'AND' | 'APPLY' | 'BALANCE' | 'BLAKE2B' | 'CAR' | 'CDR' | 'CHAIN_ID' | 'CHECK_SIGNATURE' | 'COMPARE' | 'CONCAT' | 'CONS' | 'EDIV' | 'EQ' | 'EXEC' | 'FAILWITH' | 'GE' | 'GET_AND_UPDATE' | 'GT' | 'HASH_KEY' | 'IMPLICIT_ACCOUNT' | 'INT' | 'ISNAT' | 'JOIN_TICKETS' | 'KECCAK' | 'LE' | 'LEVEL' | 'LSL' | 'LSR' | 'LT' | 'MEM' | 'MUL' | 'NEG' | 'NEQ' | 'NEVER' | 'NOT' | 'NOW' | 'OR' | 'PACK' | 'PAIRING_CHECK' | 'READ_TICKET' | 'SAPLING_VERIFY_UPDATE' | 'SELF' | 'SELF_ADDRESS' | 'SENDER' | 'SET_DELEGATE' | 'SHA256' | 'SHA3' | 'SHA512' | 'SIZE' | 'SLICE' | 'SOME' | 'SOURCE' | 'SPLIT_TICKET' | 'SUB' | 'SUB_MUTEZ' | 'SWAP' | 'TICKET' | 'TICKET_DEPRECATED' | 'TOTAL_VOTING_POWER' | 'TRANSFER_TOKENS' | 'UNIT' | 'VOTING_POWER' | 'XOR' | 'RENAME' | 'OPEN_CHEST' | 'MIN_BLOCK_TIME' | 'BYTES' | 'NAT';
declare type MichelsonRegularInstructionID = 'CONTRACT' | 'CREATE_CONTRACT' | 'DIG' | 'DIP' | 'DROP' | 'DUG' | 'DUP' | 'EMPTY_BIG_MAP' | 'EMPTY_MAP' | 'EMPTY_SET' | 'GET' | 'IF' | 'IF_CONS' | 'IF_LEFT' | 'IF_NONE' | 'ITER' | 'LAMBDA' | 'LAMBDA_REC' | 'LEFT' | 'LOOP' | 'LOOP_LEFT' | 'MAP' | 'NIL' | 'NONE' | 'PAIR' | 'PUSH' | 'RIGHT' | 'SAPLING_EMPTY_STATE' | 'UNPACK' | 'UNPAIR' | 'UPDATE' | 'CAST' | 'VIEW' | 'EMIT' | 'CREATE_ACCOUNT' | 'STEPS_TO_QUOTA';
export declare type MichelsonInstructionID = MichelsonNoArgInstructionID | MichelsonRegularInstructionID;
declare type InstrPrim<PT extends MichelsonInstructionID, AT extends Expr[]> = Prim<PT, AT>;
declare type Instr0<PT extends MichelsonNoArgInstructionID> = Prim0<PT>;
declare type InstrX<PT extends MichelsonRegularInstructionID, AT extends Expr[]> = PrimX<PT, AT>;
export declare type MichelsonCode = InstructionList | MichelsonInstruction;
type MichelsonNoArgInstructionID = 'ABS' | 'ADD' | 'ADDRESS' | 'AMOUNT' | 'AND' | 'APPLY' | 'BALANCE' | 'BLAKE2B' | 'CAR' | 'CDR' | 'CHAIN_ID' | 'CHECK_SIGNATURE' | 'COMPARE' | 'CONCAT' | 'CONS' | 'EDIV' | 'EQ' | 'EXEC' | 'FAILWITH' | 'GE' | 'GET_AND_UPDATE' | 'GT' | 'HASH_KEY' | 'IMPLICIT_ACCOUNT' | 'INT' | 'ISNAT' | 'JOIN_TICKETS' | 'KECCAK' | 'LE' | 'LEVEL' | 'LSL' | 'LSR' | 'LT' | 'MEM' | 'MUL' | 'NEG' | 'NEQ' | 'NEVER' | 'NOT' | 'NOW' | 'OR' | 'PACK' | 'PAIRING_CHECK' | 'READ_TICKET' | 'SAPLING_VERIFY_UPDATE' | 'SELF' | 'SELF_ADDRESS' | 'SENDER' | 'SET_DELEGATE' | 'SHA256' | 'SHA3' | 'SHA512' | 'SIZE' | 'SLICE' | 'SOME' | 'SOURCE' | 'SPLIT_TICKET' | 'SUB' | 'SUB_MUTEZ' | 'SWAP' | 'TICKET' | 'TICKET_DEPRECATED' | 'TOTAL_VOTING_POWER' | 'TRANSFER_TOKENS' | 'UNIT' | 'VOTING_POWER' | 'XOR' | 'RENAME' | 'OPEN_CHEST' | 'MIN_BLOCK_TIME' | 'BYTES' | 'NAT';
type MichelsonRegularInstructionID = 'CONTRACT' | 'CREATE_CONTRACT' | 'DIG' | 'DIP' | 'DROP' | 'DUG' | 'DUP' | 'EMPTY_BIG_MAP' | 'EMPTY_MAP' | 'EMPTY_SET' | 'GET' | 'IF' | 'IF_CONS' | 'IF_LEFT' | 'IF_NONE' | 'ITER' | 'LAMBDA' | 'LAMBDA_REC' | 'LEFT' | 'LOOP' | 'LOOP_LEFT' | 'MAP' | 'NIL' | 'NONE' | 'PAIR' | 'PUSH' | 'RIGHT' | 'SAPLING_EMPTY_STATE' | 'UNPACK' | 'UNPAIR' | 'UPDATE' | 'CAST' | 'VIEW' | 'EMIT' | 'CREATE_ACCOUNT' | 'STEPS_TO_QUOTA';
export type MichelsonInstructionID = MichelsonNoArgInstructionID | MichelsonRegularInstructionID;
type InstrPrim<PT extends MichelsonInstructionID, AT extends Expr[]> = Prim<PT, AT>;
type Instr0<PT extends MichelsonNoArgInstructionID> = Prim0<PT>;
type InstrX<PT extends MichelsonRegularInstructionID, AT extends Expr[]> = PrimX<PT, AT>;
export type MichelsonCode = InstructionList | MichelsonInstruction;
export interface InstructionList extends List<MichelsonCode> {
}
export declare type MichelsonNoArgInstruction = Instr0<MichelsonNoArgInstructionID>;
export declare type MichelsonInstruction = MichelsonNoArgInstruction | InstrX<'DIG' | 'DUG' | 'SAPLING_EMPTY_STATE', [IntLiteral]> | InstrX<'NONE' | 'LEFT' | 'RIGHT' | 'NIL' | 'CAST', [MichelsonType]> | InstrX<'IF_NONE' | 'IF_LEFT' | 'IF_CONS' | 'IF', [InstructionList, InstructionList]> | InstrX<'MAP' | 'ITER' | 'LOOP' | 'LOOP_LEFT' | 'DIP', [InstructionList]> | InstrX<'UNPACK', [MichelsonType]> | InstrX<'CONTRACT', [MichelsonType]> | InstrX<'CREATE_CONTRACT', [MichelsonContract]> | InstrX<'PUSH', [MichelsonType, MichelsonData]> | InstrX<'EMPTY_SET', [MichelsonType]> | InstrX<'EMPTY_MAP', [MichelsonType, MichelsonType]> | InstrX<'EMPTY_BIG_MAP', [MichelsonType, MichelsonType]> | InstrX<'LAMBDA' | 'LAMBDA_REC', [MichelsonType, MichelsonType, InstructionList]> | InstrX<'DIP', [IntLiteral, InstructionList] | [InstructionList]> | InstrX<'VIEW', [StringLiteral, MichelsonType]> | InstrX<'EMIT', [MichelsonType]> | InstrPrim<'DROP' | 'PAIR' | 'UNPAIR' | 'DUP' | 'GET' | 'UPDATE', [IntLiteral]>;
export declare type MichelsonSimpleComparableTypeID = 'string' | 'nat' | 'int' | 'bytes' | 'bool' | 'mutez' | 'key_hash' | 'address' | 'timestamp' | 'never' | 'key' | 'unit' | 'signature' | 'chain_id' | 'tx_rollup_l2_address';
export declare type MichelsonTypeID = MichelsonSimpleComparableTypeID | 'option' | 'list' | 'set' | 'contract' | 'operation' | 'pair' | 'or' | 'lambda' | 'map' | 'big_map' | 'sapling_transaction' | 'sapling_transaction_deprecated' | 'sapling_state' | 'ticket' | 'bls12_381_g1' | 'bls12_381_g2' | 'bls12_381_fr' | 'chest_key' | 'chest';
declare type Type0<PT extends MichelsonTypeID> = Prim0<PT>;
declare type TypeX<PT extends MichelsonTypeID, AT extends Expr[]> = PrimX<PT, AT>;
export type MichelsonNoArgInstruction = Instr0<MichelsonNoArgInstructionID>;
export type MichelsonInstruction = MichelsonNoArgInstruction | InstrX<'DIG' | 'DUG' | 'SAPLING_EMPTY_STATE', [IntLiteral]> | InstrX<'NONE' | 'LEFT' | 'RIGHT' | 'NIL' | 'CAST', [MichelsonType]> | InstrX<'IF_NONE' | 'IF_LEFT' | 'IF_CONS' | 'IF', [InstructionList, InstructionList]> | InstrX<'MAP' | 'ITER' | 'LOOP' | 'LOOP_LEFT' | 'DIP', [InstructionList]> | InstrX<'UNPACK', [MichelsonType]> | InstrX<'CONTRACT', [MichelsonType]> | InstrX<'CREATE_CONTRACT', [MichelsonContract]> | InstrX<'PUSH', [MichelsonType, MichelsonData]> | InstrX<'EMPTY_SET', [MichelsonType]> | InstrX<'EMPTY_MAP', [MichelsonType, MichelsonType]> | InstrX<'EMPTY_BIG_MAP', [MichelsonType, MichelsonType]> | InstrX<'LAMBDA' | 'LAMBDA_REC', [MichelsonType, MichelsonType, InstructionList]> | InstrX<'DIP', [IntLiteral, InstructionList] | [InstructionList]> | InstrX<'VIEW', [StringLiteral, MichelsonType]> | InstrX<'EMIT', [MichelsonType]> | InstrPrim<'DROP' | 'PAIR' | 'UNPAIR' | 'DUP' | 'GET' | 'UPDATE', [IntLiteral]>;
export type MichelsonSimpleComparableTypeID = 'string' | 'nat' | 'int' | 'bytes' | 'bool' | 'mutez' | 'key_hash' | 'address' | 'timestamp' | 'never' | 'key' | 'unit' | 'signature' | 'chain_id' | 'tx_rollup_l2_address';
export type MichelsonTypeID = MichelsonSimpleComparableTypeID | 'option' | 'list' | 'set' | 'contract' | 'operation' | 'pair' | 'or' | 'lambda' | 'map' | 'big_map' | 'sapling_transaction' | 'sapling_transaction_deprecated' | 'sapling_state' | 'ticket' | 'bls12_381_g1' | 'bls12_381_g2' | 'bls12_381_fr' | 'chest_key' | 'chest';
type Type0<PT extends MichelsonTypeID> = Prim0<PT>;
type TypeX<PT extends MichelsonTypeID, AT extends Expr[]> = PrimX<PT, AT>;
export declare const refContract: unique symbol;

@@ -28,23 +28,23 @@ export interface MichelsonTypeAddress extends Type0<'address'> {

}
export declare type MichelsonTypeInt = Type0<'int'>;
export declare type MichelsonTypeNat = Type0<'nat'>;
export declare type MichelsonTypeString = Type0<'string'>;
export declare type MichelsonTypeBytes = Type0<'bytes'>;
export declare type MichelsonTypeMutez = Type0<'mutez'>;
export declare type MichelsonTypeBool = Type0<'bool'>;
export declare type MichelsonTypeKeyHash = Type0<'key_hash'>;
export declare type MichelsonTypeTimestamp = Type0<'timestamp'>;
export declare type MichelsonTypeKey = Type0<'key'>;
export declare type MichelsonTypeUnit = Type0<'unit'>;
export declare type MichelsonTypeSignature = Type0<'signature'>;
export declare type MichelsonTypeOperation = Type0<'operation'>;
export declare type MichelsonTypeChainID = Type0<'chain_id'>;
export declare type MichelsonTypeNever = Type0<'never'>;
export declare type MichelsonTypeBLS12_381_G1 = Type0<'bls12_381_g1'>;
export declare type MichelsonTypeBLS12_381_G2 = Type0<'bls12_381_g2'>;
export declare type MichelsonTypeBLS12_381_FR = Type0<'bls12_381_fr'>;
export declare type MichelsonTypeChestKey = Type0<'chest_key'>;
export declare type MichelsonTypeChest = Type0<'chest'>;
declare type TypeList<T extends MichelsonType[]> = T & Node;
export declare type MichelsonTypePair<T extends MichelsonType[]> = TypeX<'pair', T> | TypeList<T>;
export type MichelsonTypeInt = Type0<'int'>;
export type MichelsonTypeNat = Type0<'nat'>;
export type MichelsonTypeString = Type0<'string'>;
export type MichelsonTypeBytes = Type0<'bytes'>;
export type MichelsonTypeMutez = Type0<'mutez'>;
export type MichelsonTypeBool = Type0<'bool'>;
export type MichelsonTypeKeyHash = Type0<'key_hash'>;
export type MichelsonTypeTimestamp = Type0<'timestamp'>;
export type MichelsonTypeKey = Type0<'key'>;
export type MichelsonTypeUnit = Type0<'unit'>;
export type MichelsonTypeSignature = Type0<'signature'>;
export type MichelsonTypeOperation = Type0<'operation'>;
export type MichelsonTypeChainID = Type0<'chain_id'>;
export type MichelsonTypeNever = Type0<'never'>;
export type MichelsonTypeBLS12_381_G1 = Type0<'bls12_381_g1'>;
export type MichelsonTypeBLS12_381_G2 = Type0<'bls12_381_g2'>;
export type MichelsonTypeBLS12_381_FR = Type0<'bls12_381_fr'>;
export type MichelsonTypeChestKey = Type0<'chest_key'>;
export type MichelsonTypeChest = Type0<'chest'>;
type TypeList<T extends MichelsonType[]> = T & Node;
export type MichelsonTypePair<T extends MichelsonType[]> = TypeX<'pair', T> | TypeList<T>;
export interface MichelsonTypeOption<T extends MichelsonType> extends TypeX<'option', [T]> {

@@ -72,20 +72,20 @@ }

}
export declare type MichelsonType<T extends MichelsonTypeID = MichelsonTypeID> = T extends 'int' ? MichelsonTypeInt : T extends 'nat' ? MichelsonTypeNat : T extends 'string' ? MichelsonTypeString : T extends 'bytes' ? MichelsonTypeBytes : T extends 'mutez' ? MichelsonTypeMutez : T extends 'bool' ? MichelsonTypeBool : T extends 'key_hash' ? MichelsonTypeKeyHash : T extends 'timestamp' ? MichelsonTypeTimestamp : T extends 'address' ? MichelsonTypeAddress : T extends 'key' ? MichelsonTypeKey : T extends 'unit' ? MichelsonTypeUnit : T extends 'signature' ? MichelsonTypeSignature : T extends 'operation' ? MichelsonTypeOperation : T extends 'chain_id' ? MichelsonTypeChainID : T extends 'option' ? MichelsonTypeOption<MichelsonType> : T extends 'list' ? MichelsonTypeList<MichelsonType> : T extends 'contract' ? MichelsonTypeContract<MichelsonType> : T extends 'ticket' ? MichelsonTypeTicket<MichelsonType> : T extends 'pair' ? MichelsonTypePair<MichelsonType[]> : T extends 'or' ? MichelsonTypeOr<[MichelsonType, MichelsonType]> : T extends 'lambda' ? MichelsonTypeLambda<MichelsonType, MichelsonType> : T extends 'set' ? MichelsonTypeSet<MichelsonType> : T extends 'map' ? MichelsonTypeMap<MichelsonType, MichelsonType> : T extends 'big_map' ? MichelsonTypeBigMap<MichelsonType, MichelsonType> : T extends 'never' ? MichelsonTypeNever : T extends 'bls12_381_g1' ? MichelsonTypeBLS12_381_G1 : T extends 'bls12_381_g2' ? MichelsonTypeBLS12_381_G2 : T extends 'bls12_381_fr' ? MichelsonTypeBLS12_381_FR : T extends 'sapling_transaction' ? MichelsonTypeSaplingTransaction : T extends 'sapling_state' ? MichelsonTypeSaplingState : T extends 'chest_key' ? MichelsonTypeChestKey : MichelsonTypeChest;
export declare type MichelsonDataID = 'Unit' | 'True' | 'False' | 'None' | 'Pair' | 'Left' | 'Right' | 'Some' | 'Lambda_rec';
declare type Data0<PT extends MichelsonDataID> = Prim0<PT>;
declare type DataX<PT extends MichelsonDataID, AT extends MichelsonData[]> = PrimX<PT, AT>;
export declare type MichelsonDataOption = DataX<'Some', [MichelsonData]> | Data0<'None'>;
export declare type MichelsonDataOr = DataX<'Left' | 'Right', [MichelsonData]>;
declare type DataList<T extends MichelsonData[]> = T & Node;
export declare type MichelsonDataPair<T extends MichelsonData[]> = DataX<'Pair', T> | DataList<T>;
export declare type MichelsonMapElt = PrimX<'Elt', [MichelsonData, MichelsonData]>;
export declare type MichelsonMapEltList = List<MichelsonMapElt>;
export declare type MichelsonLambdaRec = DataX<'Lambda_rec', [InstructionList]>;
export declare type MichelsonData = IntLiteral | StringLiteral | BytesLiteral | Data0<'Unit' | 'True' | 'False'> | MichelsonDataOption | MichelsonDataOr | DataList<MichelsonData[]> | MichelsonDataPair<MichelsonData[]> | InstructionList | MichelsonMapEltList | MichelsonLambdaRec;
export declare type MichelsonSectionID = 'parameter' | 'storage' | 'code' | 'view';
declare type SectionPrim<PT extends MichelsonSectionID, AT extends Expr[]> = PrimX<PT, AT>;
export declare type MichelsonContractParameter = SectionPrim<'parameter', [MichelsonType]>;
export declare type MichelsonContractStorage = SectionPrim<'storage', [MichelsonType]>;
export declare type MichelsonContractCode = SectionPrim<'code', [InstructionList]>;
export declare type MichelsonContractView = SectionPrim<'view', [
export type MichelsonType<T extends MichelsonTypeID = MichelsonTypeID> = T extends 'int' ? MichelsonTypeInt : T extends 'nat' ? MichelsonTypeNat : T extends 'string' ? MichelsonTypeString : T extends 'bytes' ? MichelsonTypeBytes : T extends 'mutez' ? MichelsonTypeMutez : T extends 'bool' ? MichelsonTypeBool : T extends 'key_hash' ? MichelsonTypeKeyHash : T extends 'timestamp' ? MichelsonTypeTimestamp : T extends 'address' ? MichelsonTypeAddress : T extends 'key' ? MichelsonTypeKey : T extends 'unit' ? MichelsonTypeUnit : T extends 'signature' ? MichelsonTypeSignature : T extends 'operation' ? MichelsonTypeOperation : T extends 'chain_id' ? MichelsonTypeChainID : T extends 'option' ? MichelsonTypeOption<MichelsonType> : T extends 'list' ? MichelsonTypeList<MichelsonType> : T extends 'contract' ? MichelsonTypeContract<MichelsonType> : T extends 'ticket' ? MichelsonTypeTicket<MichelsonType> : T extends 'pair' ? MichelsonTypePair<MichelsonType[]> : T extends 'or' ? MichelsonTypeOr<[MichelsonType, MichelsonType]> : T extends 'lambda' ? MichelsonTypeLambda<MichelsonType, MichelsonType> : T extends 'set' ? MichelsonTypeSet<MichelsonType> : T extends 'map' ? MichelsonTypeMap<MichelsonType, MichelsonType> : T extends 'big_map' ? MichelsonTypeBigMap<MichelsonType, MichelsonType> : T extends 'never' ? MichelsonTypeNever : T extends 'bls12_381_g1' ? MichelsonTypeBLS12_381_G1 : T extends 'bls12_381_g2' ? MichelsonTypeBLS12_381_G2 : T extends 'bls12_381_fr' ? MichelsonTypeBLS12_381_FR : T extends 'sapling_transaction' ? MichelsonTypeSaplingTransaction : T extends 'sapling_state' ? MichelsonTypeSaplingState : T extends 'chest_key' ? MichelsonTypeChestKey : MichelsonTypeChest;
export type MichelsonDataID = 'Unit' | 'True' | 'False' | 'None' | 'Pair' | 'Left' | 'Right' | 'Some' | 'Lambda_rec';
type Data0<PT extends MichelsonDataID> = Prim0<PT>;
type DataX<PT extends MichelsonDataID, AT extends MichelsonData[]> = PrimX<PT, AT>;
export type MichelsonDataOption = DataX<'Some', [MichelsonData]> | Data0<'None'>;
export type MichelsonDataOr = DataX<'Left' | 'Right', [MichelsonData]>;
type DataList<T extends MichelsonData[]> = T & Node;
export type MichelsonDataPair<T extends MichelsonData[]> = DataX<'Pair', T> | DataList<T>;
export type MichelsonMapElt = PrimX<'Elt', [MichelsonData, MichelsonData]>;
export type MichelsonMapEltList = List<MichelsonMapElt>;
export type MichelsonLambdaRec = DataX<'Lambda_rec', [InstructionList]>;
export type MichelsonData = IntLiteral | StringLiteral | BytesLiteral | Data0<'Unit' | 'True' | 'False'> | MichelsonDataOption | MichelsonDataOr | DataList<MichelsonData[]> | MichelsonDataPair<MichelsonData[]> | InstructionList | MichelsonMapEltList | MichelsonLambdaRec;
export type MichelsonSectionID = 'parameter' | 'storage' | 'code' | 'view';
type SectionPrim<PT extends MichelsonSectionID, AT extends Expr[]> = PrimX<PT, AT>;
export type MichelsonContractParameter = SectionPrim<'parameter', [MichelsonType]>;
export type MichelsonContractStorage = SectionPrim<'storage', [MichelsonType]>;
export type MichelsonContractCode = SectionPrim<'code', [InstructionList]>;
export type MichelsonContractView = SectionPrim<'view', [
StringLiteral,

@@ -96,4 +96,4 @@ MichelsonType,

]>;
export declare type MichelsonContract = MichelsonContractSection[];
export declare type MichelsonContractSection<T extends MichelsonSectionID = MichelsonSectionID> = T extends 'parameter' ? MichelsonContractParameter : T extends 'storage' ? MichelsonContractStorage : T extends 'view' ? MichelsonContractView : MichelsonContractCode;
export type MichelsonContract = MichelsonContractSection[];
export type MichelsonContractSection<T extends MichelsonSectionID = MichelsonSectionID> = T extends 'parameter' ? MichelsonContractParameter : T extends 'storage' ? MichelsonContractStorage : T extends 'view' ? MichelsonContractView : MichelsonContractCode;
export interface MichelsonTypeFailed {

@@ -103,3 +103,3 @@ failed: MichelsonType;

}
export declare type MichelsonReturnType = MichelsonType[] | MichelsonTypeFailed;
export type MichelsonReturnType = MichelsonType[] | MichelsonTypeFailed;
export declare enum Protocol {

@@ -117,5 +117,3 @@ Ps9mPmXa = "Ps9mPmXaRzmzk35gbAYNCAw6UXdE2qoABTHbN2oEEc1qM7CwT9P",

PtEdo2Zk = "PtEdo2ZkT9oKpimTah6x2embF25oss54njMuPzkJTEi5RqfdZFA",
PsFLoren = "PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i",
PsFLorena = "PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i",
PtGRANAD = "PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV",
PtGRANADs = "PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV",

@@ -136,3 +134,3 @@ PtHangzH = "PtHangzHogokSuiMHemCuowEavgYTP8J5qQ9fQS793MHYFpCY3r",

export declare const DefaultProtocol = Protocol.Psithaca2;
export declare type ProtocolID = `${Protocol}`;
export type ProtocolID = `${Protocol}`;
export declare function ProtoGreaterOrEqual(a: ProtocolID, b: ProtocolID): boolean;

@@ -139,0 +137,0 @@ export declare function ProtoInferiorTo(a: ProtocolID, b: ProtocolID): boolean;

@@ -0,0 +0,0 @@ import { Prim, Expr, StringLiteral } from './micheline';

@@ -19,3 +19,3 @@ import { TaquitoError } from '@taquito/core';

}
export declare type TokenType = '(' | ')' | '{' | '}' | ';' | Literal;
export type TokenType = '(' | ')' | '{' | '}' | ';' | Literal;
export interface Token {

@@ -22,0 +22,0 @@ t: TokenType;

import { Prim, Expr, StringLiteral, IntLiteral } from './micheline';
import { MichelsonData, MichelsonDataPair, MichelsonType, MichelsonTypePair } from './michelson-types';
import { TaquitoError } from '@taquito/core';
export declare type Tuple<N extends number, T> = N extends 1 ? [T] : N extends 2 ? [T, T] : N extends 3 ? [T, T, T] : N extends 4 ? [T, T, T, T] : N extends 5 ? [T, T, T, T, T] : N extends 6 ? [T, T, T, T, T, T] : N extends 7 ? [T, T, T, T, T, T, T] : N extends 8 ? [T, T, T, T, T, T, T, T] : T[];
declare type RequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
declare type OmitProp<T, K extends keyof T> = Omit<T, K> & {
export type Tuple<N extends number, T> = N extends 1 ? [T] : N extends 2 ? [T, T] : N extends 3 ? [T, T, T] : N extends 4 ? [T, T, T, T] : N extends 5 ? [T, T, T, T, T] : N extends 6 ? [T, T, T, T, T, T] : N extends 7 ? [T, T, T, T, T, T, T] : N extends 8 ? [T, T, T, T, T, T, T, T] : T[];
type RequiredProp<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
type OmitProp<T, K extends keyof T> = Omit<T, K> & {
[P in K]?: undefined;
};
export declare type ReqArgs<T extends Prim> = RequiredProp<T, 'args'>;
export declare type NoArgs<T extends Prim> = OmitProp<T, 'args'>;
export declare type NoAnnots<T extends Prim> = OmitProp<T, 'annots'>;
export declare type Nullable<T> = {
export type ReqArgs<T extends Prim> = RequiredProp<T, 'args'>;
export type NoArgs<T extends Prim> = OmitProp<T, 'args'>;
export type NoAnnots<T extends Prim> = OmitProp<T, 'annots'>;
export type Nullable<T> = {
[P in keyof T]: T[P] | null;

@@ -65,8 +65,8 @@ };

export declare function unpackAnnotations(p: Prim | Expr[], opt?: UnpackAnnotationsOptions): UnpackedAnnotations;
export declare type TezosIDType = 'BlockHash' | 'OperationHash' | 'OperationListHash' | 'OperationListListHash' | 'ProtocolHash' | 'ContextHash' | 'ED25519PublicKeyHash' | 'SECP256K1PublicKeyHash' | 'P256PublicKeyHash' | 'ContractHash' | 'CryptoboxPublicKeyHash' | 'ED25519Seed' | 'ED25519PublicKey' | 'SECP256K1SecretKey' | 'P256SecretKey' | 'ED25519EncryptedSeed' | 'SECP256K1EncryptedSecretKey' | 'P256EncryptedSecretKey' | 'SECP256K1PublicKey' | 'P256PublicKey' | 'SECP256K1Scalar' | 'SECP256K1Element' | 'ED25519SecretKey' | 'ED25519Signature' | 'SECP256K1Signature' | 'P256Signature' | 'GenericSignature' | 'ChainID' | 'RollupAddress' | 'TxRollupL2Address';
export declare type TezosIDPrefix = [number, number[]];
export type TezosIDType = 'BlockHash' | 'OperationHash' | 'OperationListHash' | 'OperationListListHash' | 'ProtocolHash' | 'ContextHash' | 'ED25519PublicKeyHash' | 'SECP256K1PublicKeyHash' | 'P256PublicKeyHash' | 'ContractHash' | 'CryptoboxPublicKeyHash' | 'ED25519Seed' | 'ED25519PublicKey' | 'SECP256K1SecretKey' | 'P256SecretKey' | 'ED25519EncryptedSeed' | 'SECP256K1EncryptedSecretKey' | 'P256EncryptedSecretKey' | 'SECP256K1PublicKey' | 'P256PublicKey' | 'SECP256K1Scalar' | 'SECP256K1Element' | 'ED25519SecretKey' | 'ED25519Signature' | 'SECP256K1Signature' | 'P256Signature' | 'GenericSignature' | 'ChainID' | 'RollupAddress' | 'TxRollupL2Address';
export type TezosIDPrefix = [number, number[]];
export declare const tezosPrefix: Record<TezosIDType, TezosIDPrefix>;
export declare function checkDecodeTezosID<T extends TezosIDType[]>(id: string, ...types: T): [T[number], number[]] | null;
export declare function encodeTezosID(id: TezosIDType, data: number[] | Uint8Array): string;
declare type PairTypeOrDataPrim<I extends 'pair' | 'Pair'> = I extends 'pair' ? Extract<MichelsonTypePair<MichelsonType[]>, Prim> : Extract<MichelsonDataPair<MichelsonData[]>, Prim>;
type PairTypeOrDataPrim<I extends 'pair' | 'Pair'> = I extends 'pair' ? Extract<MichelsonTypePair<MichelsonType[]>, Prim> : Extract<MichelsonDataPair<MichelsonData[]>, Prim>;
export declare function unpackComb<I extends 'pair' | 'Pair'>(id: I, v: I extends 'pair' ? MichelsonTypePair<MichelsonType[]> : MichelsonDataPair<MichelsonData[]>): PairTypeOrDataPrim<I>;

@@ -73,0 +73,0 @@ export declare function isPairType(t: MichelsonType): t is MichelsonTypePair<MichelsonType[]>;

@@ -0,0 +0,0 @@ export declare const VERSION: {

{
"name": "@taquito/michel-codec",
"version": "17.3.2",
"version": "17.4.0-beta-RC.0",
"description": "Michelson parser/validator/formatter",

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

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -38,4 +38,4 @@ "scripts": {

"version-stamp": "node ../taquito/version-stamping.js",
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts",
"start": "rollup -c rollup.config.ts -w"
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts --bundleConfigAsCjs",
"start": "rollup -c rollup.config.ts --bundleConfigAsCjs -w"
},

@@ -45,4 +45,3 @@ "lint-staged": {

"prettier --write",
"eslint --fix",
"git add"
"eslint --fix"
]

@@ -73,28 +72,27 @@ },

"dependencies": {
"@taquito/core": "^17.3.2"
"@taquito/core": "^17.4.0-beta-RC.0"
},
"devDependencies": {
"@types/bluebird": "^3.5.36",
"@types/jest": "^26.0.23",
"@types/node": "^16",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"eslint": "^8.17.0",
"jest": "^26.6.3",
"jest-config": "^26.6.3",
"jest-extended": "^1.2.0",
"lint-staged": "^13.0.1",
"@types/bluebird": "^3.5.40",
"@types/jest": "^29.5.5",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"eslint": "^8.51.0",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
"jest-extended": "^4.0.2",
"lint-staged": "^14.0.1",
"lodash.camelcase": "^4.3.0",
"prettier": "^2.7.0",
"rimraf": "^3.0.2",
"rollup": "^2.75.6",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.32.1",
"ts-jest": "^26.4.4",
"ts-node": "^10.4.0",
"rollup-plugin-typescript2": "^0.36.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"ts-toolbelt": "^9.6.0",
"typescript": "~4.1.5"
"typescript": "~5.2.2"
},
"gitHead": "a8dac9c64a1511b398fb8acb88cc8fb593d5d0f3"
"gitHead": "34103941d52e31a808e051ea19dbecf43f984dca"
}

@@ -227,7 +227,14 @@ {

"description": "Michelson parser/validator/formatter",
"keywords": ["tezos", "blockchain", "signer"],
"keywords": [
"tezos",
"blockchain",
"signer"
],
"main": "./dist/taquito-michel-codec.umd.js",
"module": "./dist/taquito-michel-codec.es5.js",
"typings": "./dist/types/taquito-michel-codec.d.ts",
"files": ["dist", "signature.json"],
"files": [
"dist",
"signature.json"
],
"publishConfig": {

@@ -243,3 +250,3 @@ "access": "public"

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -257,3 +264,6 @@ "scripts": {

"lint-staged": {
"{src,test}/**/*.ts": ["prettier --write", "tslint --fix", "git add"]
"{src,test}/**/*.ts": [
"prettier --write",
"tslint --fix"
]
},

@@ -266,12 +276,21 @@ "jest": {

"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": ["ts", "tsx", "js"],
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"moduleNameMapper": {
"^@taquito/utils$": "<rootDir>/../taquito-utils/src/taquito-utils.ts"
},
"coveragePathIgnorePatterns": ["/node_modules/", "/test/"],
"collectCoverageFrom": ["src/**/*.{js,ts}"]
"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/"
],
"collectCoverageFrom": [
"src/**/*.{js,ts}"
]
},
"devDependencies": {
"@types/jest": "^26.0.16",
"@types/node": "^16",
"@types/node": "^18",
"jest": "^26.6.3",

@@ -285,3 +304,2 @@ "jest-extended": "^0.11.5",

"rollup-plugin-json": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.27.3",

@@ -302,2 +320,2 @@ "ts-jest": "^26.4.4",

"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJgN/UCCRAD9Qy5GYHsngAAUvgQAEsq1HSL2sCOyAwtCuXJsWdm\n2Zb0U6VnOU+OmxLFWrWO+wgHddHu5uzD3grMuCbPY0IgaPiGpE0hFmRQ3gXn50SG\nBq9AGGd9NS61LHqAofkz0zVzwY3tUR5UZNwP38bkEKctf11Njp/dLqmFtkWMXb1U\n2iSSyhFufwIMsxNo5LgkVP6ZFtO2byIrhbwGcdz+RJNFcSVDmEZOsskbWjHK0TIc\nHOja3ZeUXHD4oWOK1TXaN2jGZBbb38pk9wPUoz5dDqW/itRd6ojrWd/3D81AAPui\nGYlSJwCuuNTrQJt+gLB3MsDmvU8UDRa9x/X2fKBWidB+haiIHAog8Ycn5Jq0XIOe\nSGsmxAFyXlFfDRW8By7pwgrty/og5yqvAk0+hSw3yXlfhnQQtu3A899fxpqV6Edb\n71GxavH014XijQd1Kki72iF2xoqnlDLGDY7PYOTwvn7C2lrJOAdU+SN8hiC3gB6G\nzhsvGEdPv/Y5tD43ur8W/ttChqzv9HULO+YtPkOjANXDn8SYRCU+gp1xygfN5b1X\nEKQsRlB8YuCm7M5NwGKUhz6R86fhxlIb89G8JxHjswsmxocMO+5hLOmbroN244Af\n/Tjx1tD9IiAW6/TPyn8nT3Kgi/X/b9drJDVpVCXjcOhNROxxZpm7RTbFJwraNNaE\nC8JtO4FrF97R+FjG/G8F\n=Yy2D\n-----END PGP SIGNATURE-----\n"
}
}

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

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

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