@taquito/michel-codec
Advanced tools
Comparing version 14.2.0 to 15.0.0-beta-RC.0
@@ -6,2 +6,4 @@ "use strict"; | ||
const utils_1 = require("./utils"); | ||
// The order is important! | ||
// The position represent the encoding value. | ||
const primitives = [ | ||
@@ -140,7 +142,7 @@ 'parameter', | ||
'sapling_state', | ||
'sapling_transaction', | ||
'sapling_transaction_deprecated', | ||
'SAPLING_EMPTY_STATE', | ||
'SAPLING_VERIFY_UPDATE', | ||
'ticket', | ||
'TICKET', | ||
'TICKET_DEPRECATED', | ||
'READ_TICKET', | ||
@@ -157,3 +159,9 @@ 'SPLIT_TICKET', | ||
'SUB_MUTEZ', | ||
'tx_rollup_l2_address', | ||
'MIN_BLOCK_TIME', | ||
'sapling_transaction', | ||
'EMIT', | ||
'Lambda_rec', | ||
'LAMBDA_REC', | ||
'TICKET', | ||
]; | ||
@@ -160,0 +168,0 @@ const primTags = Object.assign({}, ...primitives.map((v, i) => ({ [v]: i }))); |
@@ -30,2 +30,3 @@ "use strict"; | ||
Protocol["PtKathman"] = "PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg"; | ||
Protocol["PtLimaPtL"] = "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW"; | ||
Protocol["ProtoALpha"] = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"; | ||
@@ -55,3 +56,4 @@ })(Protocol = exports.Protocol || (exports.Protocol = {})); | ||
PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg: 14, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 15, | ||
PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW: 15, | ||
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 16, | ||
}; | ||
@@ -58,0 +60,0 @@ function ProtoGreaterOfEqual(a, b) { |
@@ -68,2 +68,3 @@ "use strict"; | ||
TICKET: true, | ||
TICKET_DEPRECATED: true, | ||
TOTAL_VOTING_POWER: true, | ||
@@ -98,2 +99,3 @@ TRANSFER_TOKENS: true, | ||
LAMBDA: true, | ||
LAMBDA_REC: true, | ||
LEFT: true, | ||
@@ -147,2 +149,3 @@ LOOP: true, | ||
sapling_transaction: true, | ||
sapling_transaction_deprecated: true, | ||
sapling_state: true, | ||
@@ -360,2 +363,3 @@ ticket: true, | ||
break; | ||
case 'LAMBDA_REC': | ||
case 'LAMBDA': | ||
@@ -651,2 +655,7 @@ /* istanbul ignore else */ | ||
break; | ||
case 'Lambda_rec': | ||
if (ex.args) { | ||
assertMichelsonInstruction(ex.args); | ||
} | ||
break; | ||
default: | ||
@@ -653,0 +662,0 @@ if (Object.prototype.hasOwnProperty.call(exports.instructionIDs, ex.prim)) { |
@@ -6,5 +6,5 @@ "use strict"; | ||
exports.VERSION = { | ||
"commitHash": "22fd810dcadf5272cb7a57d65165caa0eddbc57e", | ||
"version": "14.2.0" | ||
"commitHash": "91c00d2ab471e4fbb4c654fc45435919ad9e0675", | ||
"version": "15.0.0-beta-RC.0" | ||
}; | ||
//# sourceMappingURL=version.js.map |
@@ -8,4 +8,4 @@ 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' | 'TOTAL_VOTING_POWER' | 'TRANSFER_TOKENS' | 'UNIT' | 'VOTING_POWER' | 'XOR' | 'RENAME' | 'OPEN_CHEST' | 'MIN_BLOCK_TIME'; | ||
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' | 'LEFT' | 'LOOP' | 'LOOP_LEFT' | 'MAP' | 'NIL' | 'NONE' | 'PAIR' | 'PUSH' | 'RIGHT' | 'SAPLING_EMPTY_STATE' | 'UNPACK' | 'UNPAIR' | 'UPDATE' | 'CAST' | 'VIEW' | 'EMIT' | 'CREATE_ACCOUNT' | 'STEPS_TO_QUOTA'; | ||
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'; | ||
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; | ||
@@ -19,5 +19,5 @@ declare type InstrPrim<PT extends MichelsonInstructionID, AT extends Expr[]> = Prim<PT, AT>; | ||
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', [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 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_state' | 'ticket' | 'bls12_381_g1' | 'bls12_381_g2' | 'bls12_381_fr' | 'chest_key' | 'chest'; | ||
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>; | ||
@@ -73,3 +73,3 @@ declare type TypeX<PT extends MichelsonTypeID, AT extends Expr[]> = PrimX<PT, AT>; | ||
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'; | ||
export declare type MichelsonDataID = 'Unit' | 'True' | 'False' | 'None' | 'Pair' | 'Left' | 'Right' | 'Some' | 'Lambda_rec'; | ||
declare type Data0<PT extends MichelsonDataID> = Prim0<PT>; | ||
@@ -83,3 +83,4 @@ declare type DataX<PT extends MichelsonDataID, AT extends MichelsonData[]> = PrimX<PT, AT>; | ||
export declare type MichelsonMapEltList = List<MichelsonMapElt>; | ||
export declare type MichelsonData = IntLiteral | StringLiteral | BytesLiteral | Data0<'Unit' | 'True' | 'False'> | MichelsonDataOption | MichelsonDataOr | DataList<MichelsonData[]> | MichelsonDataPair<MichelsonData[]> | InstructionList | MichelsonMapEltList; | ||
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'; | ||
@@ -126,2 +127,3 @@ declare type SectionPrim<PT extends MichelsonSectionID, AT extends Expr[]> = PrimX<PT, AT>; | ||
PtKathman = "PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg", | ||
PtLimaPtL = "PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW", | ||
ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" | ||
@@ -128,0 +130,0 @@ } |
{ | ||
"name": "@taquito/michel-codec", | ||
"version": "14.2.0", | ||
"version": "15.0.0-beta-RC.0", | ||
"description": "Michelson parser/validator/formatter", | ||
@@ -92,3 +92,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "01924663dda2aa0d4d49a5e43c27146b498ad40b" | ||
"gitHead": "29c1cf0f95cb2e817d01260959a83d625a8fe38d" | ||
} |
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 not supported yet
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
1801771
18509
2