Options
All
  • Public
  • Public/Protected
  • All
Menu
warn

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

Hierarchy

  • Schema

Index

Constructors

constructor

Properties

[schemaTypeSymbol]

[schemaTypeSymbol]: boolean = true

Readonly val

Methods

ComputeState

  • ComputeState(tx: RpcTransaction[], state: any): any

Encode

EncodeBigMapKey

  • EncodeBigMapKey(key: BigMapKeyType): { key: {}; type: { args?: object[]; prim: string } }

Execute

  • Execute(val: any, semantics?: Semantic): any

ExecuteOnBigMapDiff

  • ExecuteOnBigMapDiff(diff: any[], semantics?: Semantic): any

ExecuteOnBigMapValue

  • ExecuteOnBigMapValue(key: any, semantics?: Semantic): any

ExtractSchema

  • ExtractSchema(): any

FindFirstInTopLevelPair

  • FindFirstInTopLevelPair<T>(storage: any, valueType: any): undefined | T
  • description

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

    Type parameters

    Parameters

    • storage: any

      storage to parse to find the value

    • valueType: any

      type of value to look for

    Returns undefined | T

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

Typecheck

  • Typecheck(val: any): boolean

findToken

  • findToken(tokenToFind: string): Token[]
  • description

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

    example
    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');
    

    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

generateSchema

Static fromRPCResponse

Static isSchema

  • isSchema(obj: Schema): boolean

Generated using TypeDoc