Taquito TypeDocs
    Preparing search index...

    Our current smart contract abstraction feature is currently in preview. Its API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.

    Index

    Constructors

    Properties

    "[schemaTypeSymbol]": boolean = true
    val: MichelsonV1Expression

    Methods

    • Look up in top-level pairs of the storage to find a value matching the specified type

      Type Parameters

      • T extends MichelsonV1Expression

      Parameters

      • storage: any

        storage to parse to find the value

      • valueType: any

        type of value to look for

      Returns T | undefined

      The first value found that match the type or undefined if no value is found

    • Look up the schema to find any occurrence of a particular token.

      Parameters

      • tokenToFind: string

        string representing the prim property of the token to find

      Returns Token[]

      an array of tokens of the specified kind or an empty array if no token was found

      Useful to find all global constants in a script, an array of GlobalConstantToken is returned:

      const schema = new Schema(script);
      const allGlobalConstantTokens = schema.findToken('constant');
    • Validates that a value matches the schema type. Performs type checking with special handling for BigMap, Ticket, and nested Map tokens.

      Parameters

      • val: any

        The value to validate against the schema

      Returns boolean

      Returns true if validation passes, false if validation fails