Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @taquito/michel-codec

Index

References

BytesLiteral

Re-exports BytesLiteral

Expr

Re-exports Expr

FormatOptions

Re-exports FormatOptions

IntLiteral

Re-exports IntLiteral

JSONParseError

Re-exports JSONParseError

MacroError

Re-exports MacroError

MichelineParseError

Re-exports MichelineParseError

MichelsonCode

Re-exports MichelsonCode

MichelsonComparableType

Re-exports MichelsonComparableType

MichelsonData

Re-exports MichelsonData

MichelsonDataId

Re-exports MichelsonDataId

MichelsonInstruction

Re-exports MichelsonInstruction

MichelsonInstructionId

Re-exports MichelsonInstructionId

MichelsonMapElt

Re-exports MichelsonMapElt

MichelsonParameter

Re-exports MichelsonParameter

MichelsonScript

Re-exports MichelsonScript

MichelsonSimpleComparableType

Re-exports MichelsonSimpleComparableType

MichelsonSimpleComparableTypeId

Re-exports MichelsonSimpleComparableTypeId

MichelsonStorage

Re-exports MichelsonStorage

MichelsonType

Re-exports MichelsonType

MichelsonTypeId

Re-exports MichelsonTypeId

MichelsonUnaryInstructionId

Re-exports MichelsonUnaryInstructionId

Parser

Re-exports Parser

ParserOptions

Re-exports ParserOptions

Prim

Re-exports Prim

StringLiteral

Re-exports StringLiteral

ValidationError

Re-exports ValidationError

assertMichelsonCode

Re-exports assertMichelsonCode

assertMichelsonData

Re-exports assertMichelsonData

assertMichelsonScript

Re-exports assertMichelsonScript

assertMichelsonType

Re-exports assertMichelsonType

emitMicheline

Re-exports emitMicheline

Type aliases

Expr

An AST node representing valid Michelson expression. Directly corresponds to JSON-encoded Michelson node

MichelsonCode

MichelsonCode: SectionPrim<"code", [MichelsonInstruction[]]>

MichelsonComparableType

MichelsonData

MichelsonData: IntLiteral | StringLiteral | BytesLiteral | NoArgs<DataPrim<"Unit" | "True" | "False" | "None">> | ReqArgs<DataPrim<"Pair", [MichelsonData, MichelsonData]>> | ReqArgs<DataPrim<"Left" | "Right" | "Some", [MichelsonData]>> | MichelsonData[] | MichelsonMapElt[] | MichelsonInstruction

MichelsonDataId

MichelsonDataId: "Unit" | "True" | "False" | "None" | "Pair" | "Left" | "Right" | "Some"

MichelsonInstruction

MichelsonInstruction: MichelsonInstruction[] | NoArgs<InstrPrim<MichelsonUnaryInstructionId>> | ReqArgs<InstrPrim<"DIG" | "DUG", [IntLiteral]>> | InstrPrim<"DROP", [IntLiteral]> | ReqArgs<InstrPrim<"NONE" | "LEFT" | "RIGHT" | "NIL" | "UNPACK" | "CONTRACT" | "CAST", [MichelsonType]>> | ReqArgs<InstrPrim<"IF_NONE" | "IF_LEFT" | "IF_CONS" | "IF", [MichelsonInstruction[], MichelsonInstruction[]]>> | ReqArgs<InstrPrim<"MAP" | "ITER" | "LOOP" | "LOOP_LEFT" | "DIP" | "CREATE_CONTRACT", [MichelsonInstruction[]]>> | ReqArgs<InstrPrim<"PUSH", [MichelsonType, MichelsonData]>> | ReqArgs<InstrPrim<"EMPTY_SET", [MichelsonComparableType]>> | ReqArgs<InstrPrim<"EMPTY_MAP" | "EMPTY_BIG_MAP", [MichelsonComparableType, MichelsonType]>> | ReqArgs<InstrPrim<"LAMBDA", [MichelsonType, MichelsonType, MichelsonInstruction[]]>> | ReqArgs<InstrPrim<"DIP", [IntLiteral, MichelsonInstruction[]] | [MichelsonInstruction[]]>>

MichelsonInstructionId

MichelsonInstructionId: MichelsonUnaryInstructionId | "DROP" | "DIG" | "DUG" | "NONE" | "LEFT" | "RIGHT" | "NIL" | "UNPACK" | "CONTRACT" | "CAST" | "IF_NONE" | "IF_LEFT" | "IF_CONS" | "IF" | "MAP" | "ITER" | "LOOP" | "LOOP_LEFT" | "DIP" | "CREATE_CONTRACT" | "PUSH" | "EMPTY_SET" | "EMPTY_MAP" | "EMPTY_BIG_MAP" | "LAMBDA"

MichelsonMapElt

MichelsonMapElt: ReqArgs<Prim<"Elt", [MichelsonData, MichelsonData]>>

MichelsonParameter

MichelsonParameter: SectionPrim<"parameter", [MichelsonType]>

MichelsonScript

MichelsonSimpleComparableType

MichelsonSimpleComparableType: NoArgs<TypePrim<MichelsonSimpleComparableTypeId>>

MichelsonSimpleComparableTypeId

MichelsonSimpleComparableTypeId: "int" | "nat" | "string" | "bytes" | "mutez" | "bool" | "key_hash" | "timestamp" | "address"

MichelsonStorage

MichelsonStorage: SectionPrim<"storage", [MichelsonType]>

MichelsonType

MichelsonType: MichelsonComparableType | NoArgs<TypePrim<"key" | "unit" | "signature" | "operation" | "chain_id">> | ReqArgs<TypePrim<"option" | "list" | "contract", [MichelsonType]>> | ReqArgs<TypePrim<"pair" | "or" | "lambda", [MichelsonType, MichelsonType]>> | ReqArgs<TypePrim<"set", [MichelsonComparableType]>> | ReqArgs<TypePrim<"map" | "big_map", [MichelsonComparableType, MichelsonType]>>

MichelsonTypeId

MichelsonTypeId: MichelsonSimpleComparableTypeId | "key" | "unit" | "signature" | "operation" | "chain_id" | "option" | "list" | "contract" | "pair" | "or" | "lambda" | "set" | "map" | "big_map"

MichelsonUnaryInstructionId

MichelsonUnaryInstructionId: "DUP" | "SWAP" | "SOME" | "UNIT" | "PAIR" | "CAR" | "CDR" | "CONS" | "SIZE" | "MEM" | "GET" | "UPDATE" | "EXEC" | "FAILWITH" | "RENAME" | "CONCAT" | "SLICE" | "PACK" | "ADD" | "SUB" | "MUL" | "EDIV" | "ABS" | "ISNAT" | "INT" | "NEG" | "LSL" | "LSR" | "OR" | "AND" | "XOR" | "NOT" | "COMPARE" | "EQ" | "NEQ" | "LT" | "GT" | "LE" | "GE" | "SELF" | "TRANSFER_TOKENS" | "SET_DELEGATE" | "CREATE_ACCOUNT" | "IMPLICIT_ACCOUNT" | "NOW" | "AMOUNT" | "BALANCE" | "CHECK_SIGNATURE" | "BLAKE2B" | "SHA256" | "SHA512" | "HASH_KEY" | "STEPS_TO_QUOTA" | "SOURCE" | "SENDER" | "ADDRESS" | "CHAIN_ID"

NoAnnots

NoAnnots<T>: OmitProp<T, "annots">

Type parameters

NoArgs

NoArgs<T>: OmitProp<T, "args">

Type parameters

ReqArgs

ReqArgs<T>: RequiredProp<T, "args">

Type parameters

TokenType

TokenType: "(" | ")" | "{" | "}" | ";" | Literal

Tuple

Tuple<T, N>: N extends 1 ? [T] : N extends 2 ? [T, T] : N extends 3 ? [T, T, T] : N extends 4 ? [T, T, T, T] : never

Type parameters

  • T

  • N: number

Functions

assertMichelsonCode

  • assertMichelsonCode(ex: Expr[]): ex is MichelsonInstruction[]

assertMichelsonData

  • assertMichelsonData(ex: Expr): ex is MichelsonData

assertMichelsonScript

  • assertMichelsonScript(ex: Expr): ex is MichelsonScript
  • Checks if the node is a valid Michelson smart contract source containing all required and valid properties such as parameter, storage and code. This is a type guard function which either returns true of throws an exception.

    Parameters

    • ex: Expr

      An AST node

    Returns ex is MichelsonScript

assertMichelsonType

  • assertMichelsonType(ex: Expr): ex is MichelsonType

emitMicheline

expandMacros

scan

  • scan(src: string, scanComments?: boolean): Generator<Token, void>

Generated using TypeDoc