ast

package
v0.1.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 23 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MiguelKindCreate = "create"
	MiguelKindUpdate = "update"
	MiguelKindDelete = "delete"
)

Miguel kinds

View Source
const (
	ContractTagFA1           = "fa1"
	ContractTagFA1_2         = "fa1-2"
	ContractTagFA2           = "fa2"
	ContractTagViewNat       = "view_nat"
	ContractTagViewAddress   = "view_address"
	ContractTagViewBalanceOf = "view_balance_of"
)

contract tags

View Source
const (
	JSONSchemaTypeInt    = "integer"
	JSONSchemaTypeString = "string"
	JSONSchemaTypeBool   = "boolean"
	JSONSchemaTypeArray  = "array"
	JSONSchemaTypeObject = "object"
)

Schema types

View Source
const (
	DocsFull = ""
)

docs constants

Variables

This section is empty.

Functions

func BigMapKeyHash

func BigMapKeyHash(node *base.Node) (string, error)

BigMapKeyHash -

func BigMapKeyHashFromNode

func BigMapKeyHashFromNode(node Node) (string, error)

BigMapKeyHashFromNode -

func BigMapKeyHashFromString

func BigMapKeyHashFromString(str string) (string, error)

BigMapKeyHashFromString -

func FindContractInterface

func FindContractInterface(tree *TypedAst, name string) bool

FindContractInterface -

func FindContractInterfaces

func FindContractInterfaces(tree *TypedAst) []string

FindContractInterfaces -

func Forge

func Forge(node Base, optimized bool) (string, error)

Forge -

func Pack

func Pack(node Base) (string, error)

Pack -

Types

type Address

type Address struct {
	Default
}

Address -

func NewAddress

func NewAddress(depth int) *Address

NewAddress -

func (*Address) Compare

func (a *Address) Compare(second Comparable) (int, error)

Compare -

func (*Address) Distinguish

func (a *Address) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Address) FindByName

func (a *Address) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Address) FromJSONSchema

func (a *Address) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Address) GetJSONModel

func (a *Address) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Address) ToBaseNode

func (a *Address) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Address) ToJSONSchema

func (a *Address) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Address) ToMiguel

func (a *Address) ToMiguel() (*MiguelNode, error)

ToMiguel -

type BLS12381fr

type BLS12381fr struct {
	Default
}

BLS12381fr -

func NewBLS12381fr

func NewBLS12381fr(depth int) *BLS12381fr

NewBLS12381fr -

func (*BLS12381fr) Distinguish

func (b *BLS12381fr) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*BLS12381fr) FindByName

func (b *BLS12381fr) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*BLS12381fr) ToJSONSchema

func (b *BLS12381fr) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type BLS12381g1

type BLS12381g1 struct {
	Default
}

BLS12381g1 -

func NewBLS12381g1

func NewBLS12381g1(depth int) *BLS12381g1

NewBLS12381g1 -

func (*BLS12381g1) Distinguish

func (b *BLS12381g1) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*BLS12381g1) FindByName

func (b *BLS12381g1) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*BLS12381g1) ToJSONSchema

func (b *BLS12381g1) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type BLS12381g2

type BLS12381g2 struct {
	Default
}

BLS12381g2 -

func NewBLS12381g2

func NewBLS12381g2(depth int) *BLS12381g2

NewBLS12381g2 -

func (*BLS12381g2) Distinguish

func (b *BLS12381g2) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*BLS12381g2) FindByName

func (b *BLS12381g2) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*BLS12381g2) ToJSONSchema

func (b *BLS12381g2) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type BakerHash

type BakerHash struct {
	Default
}

BakerHash -

func NewBakerHash

func NewBakerHash(depth int) *BakerHash

NewBakerHash -

func (*BakerHash) Compare

func (s *BakerHash) Compare(second Comparable) (int, error)

Compare -

func (*BakerHash) Distinguish

func (s *BakerHash) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*BakerHash) FindByName

func (s *BakerHash) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*BakerHash) FromJSONSchema

func (s *BakerHash) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*BakerHash) ToBaseNode

func (s *BakerHash) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*BakerHash) ToJSONSchema

func (s *BakerHash) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*BakerHash) ToMiguel

func (s *BakerHash) ToMiguel() (*MiguelNode, error)

ToMiguel -

type Base

type Base interface {
	ToBaseNode(optimized bool) (*base.Node, error)
}

Base -

type BigMap

type BigMap struct {
	Default

	KeyType   Node
	ValueType Node

	Data *OrderedMap
	Ptr  *int64
	// contains filtered or unexported fields
}

BigMap -

func NewBigMap

func NewBigMap(depth int) *BigMap

NewBigMap -

func (*BigMap) AddDiffs

func (m *BigMap) AddDiffs(diffs ...*types.BigMapDiff)

AddDiffs -

func (*BigMap) Distinguish

func (m *BigMap) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*BigMap) Docs

func (m *BigMap) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*BigMap) EnrichBigMap

func (m *BigMap) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*BigMap) EqualType

func (m *BigMap) EqualType(node Node) bool

EqualType -

func (*BigMap) FindByName

func (m *BigMap) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*BigMap) FindPointers

func (m *BigMap) FindPointers() map[int64]*BigMap

FindPointers -

func (*BigMap) FromJSONSchema

func (m *BigMap) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*BigMap) GetDiffs

func (m *BigMap) GetDiffs() []*types.BigMapDiff

GetDiffs -

func (*BigMap) GetJSONModel

func (m *BigMap) GetJSONModel(model JSONModel)

GetJSONModel -

func (*BigMap) MarshalJSON

func (m *BigMap) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*BigMap) ParseType

func (m *BigMap) ParseType(node *base.Node, id *int) error

ParseType -

func (*BigMap) ParseValue

func (m *BigMap) ParseValue(node *base.Node) error

ParseValue -

func (*BigMap) Range

func (m *BigMap) Range(handler func(node Node) error) error

Range -

func (*BigMap) SetKeyType

func (m *BigMap) SetKeyType(data []byte) error

SetKeyType -

func (*BigMap) SetValueType

func (m *BigMap) SetValueType(data []byte) error

SetValueType -

func (*BigMap) String

func (m *BigMap) String() string

String -

func (*BigMap) ToBaseNode

func (m *BigMap) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*BigMap) ToJSONSchema

func (m *BigMap) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*BigMap) ToMiguel

func (m *BigMap) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*BigMap) ToParameters

func (m *BigMap) ToParameters() ([]byte, error)

ToParameters -

type Bool

type Bool struct {
	Default
}

Bool -

func NewBool

func NewBool(depth int) *Bool

NewBool -

func (*Bool) Compare

func (b *Bool) Compare(second Comparable) (int, error)

Compare -

func (*Bool) Distinguish

func (b *Bool) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Bool) FindByName

func (b *Bool) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Bool) ParseValue

func (b *Bool) ParseValue(node *base.Node) error

ParseValue -

func (*Bool) ToBaseNode

func (b *Bool) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Bool) ToJSONSchema

func (b *Bool) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Bool) ToParameters

func (b *Bool) ToParameters() ([]byte, error)

ToParameters -

type Bytes

type Bytes struct {
	Default
}

Bytes -

func NewBytes

func NewBytes(depth int) *Bytes

NewBytes -

func (*Bytes) Compare

func (b *Bytes) Compare(second Comparable) (int, error)

Compare -

func (*Bytes) Distinguish

func (b *Bytes) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Bytes) FindByName

func (b *Bytes) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Bytes) FromJSONSchema

func (b *Bytes) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Bytes) ToJSONSchema

func (b *Bytes) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Bytes) ToMiguel

func (b *Bytes) ToMiguel() (*MiguelNode, error)

ToMiguel -

type ChainID

type ChainID struct {
	Default
}

ChainID -

func NewChainID

func NewChainID(depth int) *ChainID

NewChainID -

func (*ChainID) Compare

func (c *ChainID) Compare(second Comparable) (int, error)

Compare -

func (*ChainID) Distinguish

func (c *ChainID) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*ChainID) FindByName

func (c *ChainID) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*ChainID) FromJSONSchema

func (c *ChainID) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*ChainID) ToBaseNode

func (c *ChainID) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*ChainID) ToJSONSchema

func (c *ChainID) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*ChainID) ToMiguel

func (c *ChainID) ToMiguel() (*MiguelNode, error)

ToMiguel -

type Comparable

type Comparable interface {
	Compare(second Comparable) (int, error)
}

Comparable -

type Contract

type Contract struct {
	Address

	Type Node
}

Contract -

func NewContract

func NewContract(depth int) *Contract

NewContract -

func (*Contract) Distinguish

func (c *Contract) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Contract) Docs

func (c *Contract) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Contract) EqualType

func (c *Contract) EqualType(node Node) bool

EqualType -

func (*Contract) FindByName

func (c *Contract) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Contract) MarshalJSON

func (c *Contract) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Contract) ParseType

func (c *Contract) ParseType(node *base.Node, id *int) error

ParseType -

func (*Contract) String

func (c *Contract) String() string

String -

func (*Contract) ToJSONSchema

func (c *Contract) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Contract) ToMiguel

func (c *Contract) ToMiguel() (*MiguelNode, error)

ToMiguel -

type Default

type Default struct {
	ValueKind int
	ID        int
	ArgsCount int
	Depth     int

	Annots    []string
	Prim      string
	TypeName  string
	FieldName string

	Value interface{}
}

Default -

func NewDefault

func NewDefault(prim string, argsCount, depth int) Default

NewDefault -

func (*Default) Compare

func (d *Default) Compare(second Comparable) (int, error)

Compare -

func (*Default) Distinguish

func (d *Default) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Default) Docs

func (d *Default) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Default) EnrichBigMap

func (d *Default) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Default) Equal

func (d *Default) Equal(node Node) bool

Equal -

func (*Default) EqualType

func (d *Default) EqualType(node Node) bool

EqualType -

func (*Default) FindByName

func (d *Default) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Default) FindPointers

func (d *Default) FindPointers() map[int64]*BigMap

FindPointers -

func (*Default) FromJSONSchema

func (d *Default) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Default) GetEntrypoints

func (d *Default) GetEntrypoints() []string

GetEntrypoints -

func (*Default) GetJSONModel

func (d *Default) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Default) GetName

func (d *Default) GetName() string

GetName -

func (*Default) GetPrim

func (d *Default) GetPrim() string

GetPrim -

func (*Default) GetTypeName

func (d *Default) GetTypeName() string

GetTypeName -

func (*Default) GetValue

func (d *Default) GetValue() interface{}

GetValue -

func (*Default) IsNamed

func (d *Default) IsNamed() bool

IsNamed -

func (*Default) IsPrim

func (d *Default) IsPrim(prim string) bool

IsPrim -

func (Default) MarshalJSON

func (d Default) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Default) ParseType

func (d *Default) ParseType(node *base.Node, id *int) error

ParseType -

func (*Default) ParseValue

func (d *Default) ParseValue(node *base.Node) error

ParseValue -

func (*Default) Range

func (d *Default) Range(handler func(node Node) error) error

Range -

func (*Default) String

func (d *Default) String() string

String -

func (*Default) ToBaseNode

func (d *Default) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Default) ToJSONSchema

func (d *Default) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Default) ToMiguel

func (d *Default) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Default) ToParameters

func (d *Default) ToParameters() ([]byte, error)

ToParameters -

type Distinguishable

type Distinguishable interface {
	Distinguish(second Distinguishable) (*MiguelNode, error)
}

Distinguishable -

type EntrypointType

type EntrypointType struct {
	Name string    `json:"name"`
	Type []Typedef `json:"typedef"`
}

EntrypointType -

type Int

type Int struct {
	Default
}

Int -

func NewInt

func NewInt(depth int) *Int

NewInt -

func (*Int) Compare

func (i *Int) Compare(second Comparable) (int, error)

Compare -

func (*Int) Distinguish

func (i *Int) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Int) FindByName

func (i *Int) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Int) FromJSONSchema

func (i *Int) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Int) ToJSONSchema

func (i *Int) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type JSONModel

type JSONModel map[string]interface{}

JSONModel -

type JSONSchema

type JSONSchema struct {
	Type       string                 `json:"type,omitempty"`
	Title      string                 `json:"title,omitempty"`
	Prim       string                 `json:"prim,omitempty"`
	Tag        string                 `json:"tag,omitempty"`
	Format     string                 `json:"format,omitempty"`
	Default    interface{}            `json:"default,omitempty"`
	MinLength  int                    `json:"minLength,omitempty"`
	MaxLength  int                    `json:"maxLength,omitempty"`
	Properties map[string]*JSONSchema `json:"properties,omitempty"`
	OneOf      []*JSONSchema          `json:"oneOf,omitempty"`
	Required   []string               `json:"required,omitempty"`
	XItemTitle string                 `json:"x-itemTitle,omitempty"`
	Const      string                 `json:"const,omitempty"`
	SchemaKey  *SchemaKey             `json:"schemaKey,omitempty"`
	Items      *SchemaKey             `json:"items,omitempty"`
	XOptions   map[string]interface{} `json:"x-options,omitempty"`
}

JSONSchema -

func WrapEntrypointJSONSchema

func WrapEntrypointJSONSchema(schema *JSONSchema) *JSONSchema

WrapEntrypointJSONSchema -

type Key

type Key struct {
	Default
}

Key -

func NewKey

func NewKey(depth int) *Key

NewKey -

func (*Key) Compare

func (k *Key) Compare(second Comparable) (int, error)

Compare -

func (*Key) Distinguish

func (k *Key) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Key) FindByName

func (k *Key) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Key) FromJSONSchema

func (k *Key) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Key) ToBaseNode

func (k *Key) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Key) ToJSONSchema

func (k *Key) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Key) ToMiguel

func (k *Key) ToMiguel() (*MiguelNode, error)

ToMiguel -

type KeyHash

type KeyHash struct {
	Default
}

KeyHash -

func NewKeyHash

func NewKeyHash(depth int) *KeyHash

NewKeyHash -

func (*KeyHash) Compare

func (k *KeyHash) Compare(second Comparable) (int, error)

Compare -

func (*KeyHash) Distinguish

func (k *KeyHash) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*KeyHash) FindByName

func (k *KeyHash) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*KeyHash) FromJSONSchema

func (k *KeyHash) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*KeyHash) ToBaseNode

func (k *KeyHash) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*KeyHash) ToJSONSchema

func (k *KeyHash) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*KeyHash) ToMiguel

func (k *KeyHash) ToMiguel() (*MiguelNode, error)

ToMiguel -

type Lambda

type Lambda struct {
	Default
	InputType  Node
	ReturnType Node
}

Lambda -

func NewLambda

func NewLambda(depth int) *Lambda

NewLambda -

func (*Lambda) Distinguish

func (l *Lambda) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Lambda) Docs

func (l *Lambda) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Lambda) EqualType

func (l *Lambda) EqualType(node Node) bool

EqualType -

func (*Lambda) FindByName

func (l *Lambda) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Lambda) FromJSONSchema

func (l *Lambda) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Lambda) GetJSONModel

func (l *Lambda) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Lambda) MarshalJSON

func (l *Lambda) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Lambda) ParseType

func (l *Lambda) ParseType(node *base.Node, id *int) error

ParseType -

func (*Lambda) ParseValue

func (l *Lambda) ParseValue(node *base.Node) error

ParseValue -

func (*Lambda) ToBaseNode

func (l *Lambda) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Lambda) ToJSONSchema

func (l *Lambda) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Lambda) ToMiguel

func (l *Lambda) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Lambda) ToParameters

func (l *Lambda) ToParameters() ([]byte, error)

ToParameters -

type List

type List struct {
	Default

	Type Node

	Data []Node
}

List -

func NewList

func NewList(depth int) *List

NewList -

func (*List) Distinguish

func (list *List) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*List) Docs

func (list *List) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*List) EnrichBigMap

func (list *List) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*List) EqualType

func (list *List) EqualType(node Node) bool

EqualType -

func (*List) FindByName

func (list *List) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*List) FindPointers

func (list *List) FindPointers() map[int64]*BigMap

FindPointers -

func (*List) FromJSONSchema

func (list *List) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*List) GetJSONModel

func (list *List) GetJSONModel(model JSONModel)

GetJSONModel -

func (*List) MarshalJSON

func (list *List) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*List) ParseType

func (list *List) ParseType(node *base.Node, id *int) error

ParseType -

func (*List) ParseValue

func (list *List) ParseValue(node *base.Node) error

ParseValue -

func (*List) Range

func (list *List) Range(handler func(node Node) error) error

Range -

func (*List) String

func (list *List) String() string

String -

func (*List) ToBaseNode

func (list *List) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*List) ToJSONSchema

func (list *List) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*List) ToMiguel

func (list *List) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*List) ToParameters

func (list *List) ToParameters() ([]byte, error)

ToParameters -

type Map

type Map struct {
	Default
	KeyType   Node
	ValueType Node

	Data *OrderedMap
}

Map -

func NewMap

func NewMap(depth int) *Map

NewMap -

func (*Map) Distinguish

func (m *Map) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Map) Docs

func (m *Map) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Map) EnrichBigMap

func (m *Map) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Map) EqualType

func (m *Map) EqualType(node Node) bool

EqualType -

func (*Map) FindByName

func (m *Map) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Map) FindPointers

func (m *Map) FindPointers() map[int64]*BigMap

FindPointers -

func (*Map) FromJSONSchema

func (m *Map) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Map) GetDefaultJSONModel

func (m *Map) GetDefaultJSONModel(model JSONModel)

GetDefaultJSONModel -

func (*Map) MarshalJSON

func (m *Map) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Map) ParseType

func (m *Map) ParseType(node *base.Node, id *int) error

ParseType -

func (*Map) ParseValue

func (m *Map) ParseValue(node *base.Node) error

ParseValue -

func (*Map) Range

func (m *Map) Range(handler func(node Node) error) error

Range -

func (*Map) String

func (m *Map) String() string

String -

func (*Map) ToBaseNode

func (m *Map) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Map) ToJSONSchema

func (m *Map) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Map) ToMiguel

func (m *Map) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Map) ToParameters

func (m *Map) ToParameters() ([]byte, error)

ToParameters -

type MiguelNode

type MiguelNode struct {
	Prim     string      `json:"prim,omitempty"`
	Type     string      `json:"type,omitempty"`
	Name     *string     `json:"name,omitempty"`
	From     interface{} `json:"from,omitempty"`
	DiffType string      `json:"diff_type,omitempty"`
	Value    interface{} `json:"value,omitempty"`

	Children []*MiguelNode `json:"children,omitempty"`
}

MiguelNode -

func (*MiguelNode) Compare

func (node *MiguelNode) Compare(second *MiguelNode) bool

Compare -

func (*MiguelNode) String

func (node *MiguelNode) String() string

String -

type Mutez

type Mutez struct {
	Default
}

Mutez -

func NewMutez

func NewMutez(depth int) *Mutez

NewMutez -

func (*Mutez) Compare

func (m *Mutez) Compare(second Comparable) (int, error)

Compare -

func (*Mutez) Distinguish

func (m *Mutez) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Mutez) FindByName

func (m *Mutez) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Mutez) FromJSONSchema

func (m *Mutez) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Mutez) ToJSONSchema

func (m *Mutez) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type Nat

type Nat struct {
	Default
}

Nat -

func NewNat

func NewNat(depth int) *Nat

NewNat -

func (*Nat) Compare

func (n *Nat) Compare(second Comparable) (int, error)

Compare -

func (*Nat) Distinguish

func (n *Nat) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Nat) FindByName

func (n *Nat) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Nat) FromJSONSchema

func (n *Nat) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Nat) ToJSONSchema

func (n *Nat) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type Never

type Never struct {
	Default
}

Never -

func NewNever

func NewNever(depth int) *Never

NewNever -

func (*Never) Compare

func (n *Never) Compare(second Comparable) (int, error)

Compare -

func (*Never) Distinguish

func (n *Never) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Never) FindByName

func (n *Never) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Never) GetJSONModel

func (n *Never) GetJSONModel(model JSONModel)

GetJSONModel -

type Node

type Node interface {
	fmt.Stringer
	Type
	Value
	Base
}

Node -

func Copy

func Copy(node Node) Node

Copy -

type Operation

type Operation struct {
	Default
}

Operation -

func NewOperation

func NewOperation(depth int) *Operation

NewOperation -

func (*Operation) Distinguish

func (o *Operation) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Operation) FindByName

func (o *Operation) FindByName(name string, isEntrypoint bool) Node

FindByName -

type Option

type Option struct {
	Default
	Type Node
}

Option -

func NewOption

func NewOption(depth int) *Option

NewOption -

func (*Option) Compare

func (opt *Option) Compare(second Comparable) (int, error)

Compare -

func (*Option) Distinguish

func (opt *Option) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Option) Docs

func (opt *Option) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Option) EnrichBigMap

func (opt *Option) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Option) EqualType

func (opt *Option) EqualType(node Node) bool

EqualType -

func (*Option) FindByName

func (opt *Option) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Option) FindPointers

func (opt *Option) FindPointers() map[int64]*BigMap

FindPointers -

func (*Option) FromJSONSchema

func (opt *Option) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Option) GetJSONModel

func (opt *Option) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Option) IsNone

func (opt *Option) IsNone() bool

IsNone - return true if value is None

func (*Option) IsSome

func (opt *Option) IsSome() bool

IsSome - return true if value is Some

func (*Option) MarshalJSON

func (opt *Option) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Option) ParseType

func (opt *Option) ParseType(node *base.Node, id *int) error

ParseType -

func (*Option) ParseValue

func (opt *Option) ParseValue(node *base.Node) error

ParseValue -

func (*Option) Range

func (opt *Option) Range(handler func(node Node) error) error

Range -

func (*Option) String

func (opt *Option) String() string

String -

func (*Option) ToBaseNode

func (opt *Option) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Option) ToJSONSchema

func (opt *Option) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Option) ToMiguel

func (opt *Option) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Option) ToParameters

func (opt *Option) ToParameters() ([]byte, error)

ToParameters -

type Or

type Or struct {
	Default

	LeftType  Node
	RightType Node
	// contains filtered or unexported fields
}

Or -

func NewOr

func NewOr(depth int) *Or

NewOr -

func (*Or) Compare

func (or *Or) Compare(second Comparable) (int, error)

Compare -

func (*Or) Distinguish

func (or *Or) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Or) Docs

func (or *Or) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Or) EnrichBigMap

func (or *Or) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Or) EqualType

func (or *Or) EqualType(node Node) bool

EqualType -

func (*Or) FindByName

func (or *Or) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Or) FindPointers

func (or *Or) FindPointers() map[int64]*BigMap

FindPointers -

func (*Or) FromJSONSchema

func (or *Or) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Or) GetEntrypoints

func (or *Or) GetEntrypoints() []string

GetEntrypoints -

func (*Or) GetJSONModel

func (or *Or) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Or) MarshalJSON

func (or *Or) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Or) ParseType

func (or *Or) ParseType(node *base.Node, id *int) error

ParseType -

func (*Or) ParseValue

func (or *Or) ParseValue(node *base.Node) error

ParseValue -

func (*Or) Range

func (or *Or) Range(handler func(node Node) error) error

Range -

func (*Or) String

func (or *Or) String() string

String -

func (*Or) ToBaseNode

func (or *Or) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Or) ToJSONSchema

func (or *Or) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Or) ToMiguel

func (or *Or) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Or) ToParameters

func (or *Or) ToParameters() ([]byte, error)

ToParameters -

type OrderedMap

type OrderedMap struct {
	// contains filtered or unexported fields
}

OrderedMap -

func NewOrderedMap

func NewOrderedMap() *OrderedMap

NewOrderedMap -

func (*OrderedMap) Add

func (m *OrderedMap) Add(key, value Comparable) error

Add -

func (*OrderedMap) Get

func (m *OrderedMap) Get(key Comparable) (Comparable, bool)

Get -

func (*OrderedMap) Len

func (m *OrderedMap) Len() int

Len -

func (*OrderedMap) Range

func (m *OrderedMap) Range(handler func(key, value Comparable) (bool, error)) error

Range -

func (*OrderedMap) Remove

func (m *OrderedMap) Remove(key Comparable) (Comparable, bool)

Remove -

type Pair

type Pair struct {
	Default
	Args []Node
}

Pair -

func NewPair

func NewPair(depth int) *Pair

NewPair -

func (*Pair) Compare

func (p *Pair) Compare(second Comparable) (int, error)

Compare -

func (*Pair) Distinguish

func (p *Pair) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Pair) Docs

func (p *Pair) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Pair) EnrichBigMap

func (p *Pair) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Pair) EqualType

func (p *Pair) EqualType(node Node) bool

EqualType -

func (*Pair) FindByName

func (p *Pair) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Pair) FindPointers

func (p *Pair) FindPointers() map[int64]*BigMap

FindPointers -

func (*Pair) FromJSONSchema

func (p *Pair) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Pair) GetJSONModel

func (p *Pair) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Pair) MarshalJSON

func (p *Pair) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Pair) ParseType

func (p *Pair) ParseType(node *base.Node, id *int) error

ParseType -

func (*Pair) ParseValue

func (p *Pair) ParseValue(node *base.Node) error

ParseValue -

func (*Pair) Range

func (p *Pair) Range(handler func(node Node) error) error

Range -

func (*Pair) String

func (p *Pair) String() string

String -

func (*Pair) ToBaseNode

func (p *Pair) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Pair) ToJSONSchema

func (p *Pair) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Pair) ToMiguel

func (p *Pair) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Pair) ToParameters

func (p *Pair) ToParameters() ([]byte, error)

ToParameters -

type Parameter

type Parameter struct {
	*SectionType
}

Parameter -

func NewParameter

func NewParameter(depth int) *Parameter

NewParameter -

type SaplingState

type SaplingState struct {
	Default

	Type     *Int
	MemoSize int64
}

SaplingState -

func NewSaplingState

func NewSaplingState(depth int) *SaplingState

NewSaplingState -

func (*SaplingState) Distinguish

func (ss *SaplingState) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*SaplingState) Docs

func (ss *SaplingState) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*SaplingState) EqualType

func (ss *SaplingState) EqualType(node Node) bool

EqualType -

func (*SaplingState) FindByName

func (ss *SaplingState) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*SaplingState) MarshalJSON

func (ss *SaplingState) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*SaplingState) ParseType

func (ss *SaplingState) ParseType(node *base.Node, id *int) error

ParseType -

func (*SaplingState) ParseValue

func (ss *SaplingState) ParseValue(node *base.Node) error

ParseValue -

func (*SaplingState) String

func (ss *SaplingState) String() string

String -

func (*SaplingState) ToBaseNode

func (ss *SaplingState) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*SaplingState) ToMiguel

func (ss *SaplingState) ToMiguel() (*MiguelNode, error)

ToMiguel -

type SaplingTransaction

type SaplingTransaction struct {
	Default

	Data     *Bytes
	MemoSize int64
}

SaplingTransaction -

func NewSaplingTransaction

func NewSaplingTransaction(depth int) *SaplingTransaction

NewSaplingTransaction -

func (*SaplingTransaction) Distinguish

func (st *SaplingTransaction) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*SaplingTransaction) Docs

func (st *SaplingTransaction) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*SaplingTransaction) FindByName

func (st *SaplingTransaction) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*SaplingTransaction) FromJSONSchema

func (st *SaplingTransaction) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*SaplingTransaction) MarshalJSON

func (st *SaplingTransaction) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*SaplingTransaction) ParseType

func (st *SaplingTransaction) ParseType(node *base.Node, id *int) error

ParseType -

func (*SaplingTransaction) ParseValue

func (st *SaplingTransaction) ParseValue(node *base.Node) error

ParseValue -

func (*SaplingTransaction) String

func (st *SaplingTransaction) String() string

String -

func (*SaplingTransaction) ToBaseNode

func (st *SaplingTransaction) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*SaplingTransaction) ToMiguel

func (st *SaplingTransaction) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*SaplingTransaction) ToParameters

func (st *SaplingTransaction) ToParameters() ([]byte, error)

ToParameters -

type SchemaKey

type SchemaKey JSONSchema

SchemaKey -

type Script

type Script struct {
	Code      UntypedAST `json:"code"`
	Parameter UntypedAST `json:"parameter"`
	Storage   UntypedAST `json:"storage"`
}

Script -

func NewScript

func NewScript(data []byte) (*Script, error)

NewScript - creates `Script` object: untyped trees of code, storage and parameter

func NewScriptWithoutCode

func NewScriptWithoutCode(data []byte) (*Script, error)

NewScriptWithoutCode - creates `Script` object without code tree: storage and parameter

func (*Script) Compare

func (s *Script) Compare(another *Script) bool

Compare - compares two scripts

func (*Script) MarshalJSON

func (s *Script) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Script) ParameterType

func (s *Script) ParameterType() (*TypedAst, error)

ParameterType - returns parameter`s typed tree

func (*Script) StorageType

func (s *Script) StorageType() (*TypedAst, error)

StorageType - returns storage`s typed tree

func (*Script) UnmarshalJSON

func (s *Script) UnmarshalJSON(data []byte) error

UnmarshalJSON -

type SectionType

type SectionType struct {
	Default

	Args []Node
	// contains filtered or unexported fields
}

SectionType -

func NewSectionType

func NewSectionType(prim string, depth int) *SectionType

NewSectionType -

func (*SectionType) EqualType

func (st *SectionType) EqualType(node Node) bool

EqualType -

func (*SectionType) MarshalJSON

func (st *SectionType) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*SectionType) ParseType

func (st *SectionType) ParseType(node *base.Node, id *int) error

ParseType -

func (*SectionType) ParseValue

func (st *SectionType) ParseValue(node *base.Node) error

ParseValue -

func (*SectionType) String

func (st *SectionType) String() string

String -

type Set

type Set struct {
	Default

	Type Node
	Data []Node
}

Set -

func NewSet

func NewSet(depth int) *Set

NewSet -

func (*Set) Distinguish

func (set *Set) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Set) Docs

func (set *Set) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Set) EnrichBigMap

func (set *Set) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*Set) EqualType

func (set *Set) EqualType(node Node) bool

EqualType -

func (*Set) FindByName

func (set *Set) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Set) FindPointers

func (set *Set) FindPointers() map[int64]*BigMap

FindPointers -

func (*Set) FromJSONSchema

func (set *Set) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Set) GetJSONModel

func (set *Set) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Set) MarshalJSON

func (set *Set) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Set) ParseType

func (set *Set) ParseType(node *base.Node, id *int) error

ParseType -

func (*Set) ParseValue

func (set *Set) ParseValue(node *base.Node) error

ParseValue -

func (*Set) Range

func (set *Set) Range(handler func(node Node) error) error

Range -

func (*Set) String

func (set *Set) String() string

String -

func (*Set) ToBaseNode

func (set *Set) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Set) ToJSONSchema

func (set *Set) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Set) ToMiguel

func (set *Set) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Set) ToParameters

func (set *Set) ToParameters() ([]byte, error)

ToParameters -

type Signature

type Signature struct {
	Default
}

Signature -

func NewSignature

func NewSignature(depth int) *Signature

NewSignature -

func (*Signature) Compare

func (s *Signature) Compare(second Comparable) (int, error)

Compare -

func (*Signature) Distinguish

func (s *Signature) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Signature) FindByName

func (s *Signature) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Signature) FromJSONSchema

func (s *Signature) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Signature) ToBaseNode

func (s *Signature) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Signature) ToJSONSchema

func (s *Signature) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Signature) ToMiguel

func (s *Signature) ToMiguel() (*MiguelNode, error)

ToMiguel -

type String

type String struct {
	Default
}

String -

func NewString

func NewString(depth int) *String

NewString -

func (*String) Compare

func (s *String) Compare(second Comparable) (int, error)

Compare -

func (*String) Distinguish

func (s *String) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*String) FindByName

func (s *String) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*String) ToJSONSchema

func (s *String) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

type Ticket

type Ticket struct {
	Default

	Type       Node
	PairedType Node
	// contains filtered or unexported fields
}

Ticket -

func NewTicket

func NewTicket(depth int) *Ticket

NewTicket -

func (*Ticket) Distinguish

func (t *Ticket) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Ticket) Docs

func (t *Ticket) Docs(inferredName string) ([]Typedef, string, error)

Docs -

func (*Ticket) EqualType

func (t *Ticket) EqualType(node Node) bool

EqualType -

func (*Ticket) FindByName

func (t *Ticket) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Ticket) FromJSONSchema

func (t *Ticket) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Ticket) MarshalJSON

func (t *Ticket) MarshalJSON() ([]byte, error)

MarshalJSON -

func (*Ticket) ParseType

func (t *Ticket) ParseType(node *base.Node, id *int) error

ParseType -

func (*Ticket) ParseValue

func (t *Ticket) ParseValue(node *base.Node) error

ParseValue -

func (*Ticket) String

func (t *Ticket) String() string

String -

func (*Ticket) ToBaseNode

func (t *Ticket) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Ticket) ToMiguel

func (t *Ticket) ToMiguel() (*MiguelNode, error)

ToMiguel -

func (*Ticket) ToParameters

func (t *Ticket) ToParameters() ([]byte, error)

ToParameters -

type Timestamp

type Timestamp struct {
	Default
}

Timestamp -

func NewTimestamp

func NewTimestamp(depth int) *Timestamp

NewTimestamp -

func (*Timestamp) Compare

func (t *Timestamp) Compare(second Comparable) (int, error)

Compare -

func (*Timestamp) Distinguish

func (t *Timestamp) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Timestamp) FindByName

func (t *Timestamp) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Timestamp) FromJSONSchema

func (t *Timestamp) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*Timestamp) GetJSONModel

func (t *Timestamp) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Timestamp) ParseValue

func (t *Timestamp) ParseValue(node *base.Node) error

ParseValue -

func (*Timestamp) ToBaseNode

func (t *Timestamp) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Timestamp) ToJSONSchema

func (t *Timestamp) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*Timestamp) ToParameters

func (t *Timestamp) ToParameters() ([]byte, error)

ToParameters -

type Type

type Type interface {
	Docs(inferredName string) ([]Typedef, string, error)
	EqualType(node Node) bool
	FindByName(name string, isEntrypoint bool) Node
	GetEntrypoints() []string
	GetJSONModel(JSONModel)
	GetName() string
	GetPrim() string
	GetTypeName() string
	IsNamed() bool
	IsPrim(prim string) bool
	ParseType(node *base.Node, id *int) error
	Range(handler func(node Node) error) error
	ToJSONSchema() (*JSONSchema, error)
}

Type -

type TypedAst

type TypedAst struct {
	Nodes []Node
	// contains filtered or unexported fields
}

TypedAst -

func NewSettledTypedAst

func NewSettledTypedAst(tree, data string) (*TypedAst, error)

NewSettledTypedAst -

func NewTypedAST

func NewTypedAST() *TypedAst

NewTypedAST -

func NewTypedAstFromBytes

func NewTypedAstFromBytes(data []byte) (*TypedAst, error)

NewTypedAstFromBytes -

func NewTypedAstFromString

func NewTypedAstFromString(data string) (*TypedAst, error)

NewTypedAstFromString -

func (*TypedAst) Compare

func (a *TypedAst) Compare(b *TypedAst) (int, error)

Compare -

func (*TypedAst) Diff

func (a *TypedAst) Diff(b *TypedAst) (*MiguelNode, error)

Diff -

func (*TypedAst) Docs

func (a *TypedAst) Docs(entrypoint string) ([]Typedef, error)

Docs -

func (*TypedAst) EnrichBigMap

func (a *TypedAst) EnrichBigMap(bmd []*types.BigMapDiff) error

EnrichBigMap -

func (*TypedAst) EqualType

func (a *TypedAst) EqualType(b *TypedAst) bool

EqualType -

func (*TypedAst) FindBigMapByPtr

func (a *TypedAst) FindBigMapByPtr() map[int64]*BigMap

FindBigMapByPtr -

func (*TypedAst) FindByName

func (a *TypedAst) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*TypedAst) FromJSONSchema

func (a *TypedAst) FromJSONSchema(data map[string]interface{}) error

FromJSONSchema -

func (*TypedAst) FromParameters

func (a *TypedAst) FromParameters(data *types.Parameters) (*TypedAst, error)

FromParameters - fill(settle) subtree in `a` with `data`. Returned settled subtree and error if occured. If `entrypoint` is empty string it will try to settle main tree.

func (*TypedAst) GetEntrypoints

func (a *TypedAst) GetEntrypoints() []string

GetEntrypoints -

func (*TypedAst) GetEntrypointsDocs

func (a *TypedAst) GetEntrypointsDocs() ([]EntrypointType, error)

GetEntrypointsDocs -

func (*TypedAst) GetJSONModel

func (a *TypedAst) GetJSONModel(model JSONModel)

GetJSONModel -

func (*TypedAst) IsSettled

func (a *TypedAst) IsSettled() bool

IsSettled -

func (*TypedAst) ParametersForExecution

func (a *TypedAst) ParametersForExecution(entrypoint string, data map[string]interface{}) (*types.Parameters, error)

ParametersForExecution -

func (*TypedAst) Settle

func (a *TypedAst) Settle(untyped UntypedAST) error

Settle -

func (*TypedAst) SettleFromBytes

func (a *TypedAst) SettleFromBytes(data []byte) error

SettleFromBytes -

func (*TypedAst) String

func (a *TypedAst) String() string

String -

func (*TypedAst) ToBaseNode

func (a *TypedAst) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*TypedAst) ToJSONSchema

func (a *TypedAst) ToJSONSchema() (*JSONSchema, error)

ToJSONSchema -

func (*TypedAst) ToMiguel

func (a *TypedAst) ToMiguel() ([]*MiguelNode, error)

ToMiguel -

func (*TypedAst) ToParameters

func (a *TypedAst) ToParameters(entrypoint string) ([]byte, error)

ToParameters -

func (*TypedAst) UnmarshalJSON

func (ast *TypedAst) UnmarshalJSON(data []byte) error

UnmarshalJSON -

func (*TypedAst) UnwrapAndGetEntrypointName

func (a *TypedAst) UnwrapAndGetEntrypointName() (Node, string)

Unwrap - clear paramaters from Left/Right. Tree must be settled.

type Typedef

type Typedef struct {
	Name    string       `json:"name"`
	Type    string       `json:"type,omitempty"`
	TypeDef []Typedef    `json:"typedef,omitempty"`
	Args    []TypedefArg `json:"args,omitempty"`
}

Typedef -

type TypedefArg

type TypedefArg struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value"`
}

TypedefArg -

type Unit

type Unit struct {
	Default
}

Unit -

func NewUnit

func NewUnit(depth int) *Unit

NewUnit -

func (*Unit) Compare

func (u *Unit) Compare(second Comparable) (int, error)

Compare -

func (*Unit) Distinguish

func (u *Unit) Distinguish(x Distinguishable) (*MiguelNode, error)

Distinguish -

func (*Unit) FindByName

func (u *Unit) FindByName(name string, isEntrypoint bool) Node

FindByName -

func (*Unit) GetJSONModel

func (u *Unit) GetJSONModel(model JSONModel)

GetJSONModel -

func (*Unit) ToBaseNode

func (u *Unit) ToBaseNode(optimized bool) (*base.Node, error)

ToBaseNode -

func (*Unit) ToParameters

func (u *Unit) ToParameters() ([]byte, error)

ToParameters -

type UntypedAST

type UntypedAST []*base.Node

UntypedAST -

func NewUntypedAST

func NewUntypedAST(data []byte) (UntypedAST, error)

NewUntypedAST -

func (UntypedAST) Annotations

func (u UntypedAST) Annotations() []string

Annotations -

func (UntypedAST) Fingerprint

func (u UntypedAST) Fingerprint(isCode bool) ([]byte, error)

Fingerprint -

func (UntypedAST) GetStrings

func (u UntypedAST) GetStrings(tryUnpack bool) ([]string, error)

GetStrings -

func (UntypedAST) Hash

func (u UntypedAST) Hash() (string, error)

Hash -

func (UntypedAST) String

func (u UntypedAST) String() string

String -

func (UntypedAST) Stringify

func (u UntypedAST) Stringify() (string, error)

Stringify - make readable string

func (UntypedAST) ToTypedAST

func (u UntypedAST) ToTypedAST() (*TypedAst, error)

ToTypedAST -

func (*UntypedAST) UnmarshalJSON

func (u *UntypedAST) UnmarshalJSON(data []byte) error

UnmarshalJSON -

func (UntypedAST) Unpack

func (u UntypedAST) Unpack()

Unpack - unpack all bytes and store data in the tree.

type Value

type Value interface {
	Comparable
	Distinguishable

	EnrichBigMap(bmd []*types.BigMapDiff) error
	Equal(second Node) bool
	FindPointers() map[int64]*BigMap
	FromJSONSchema(data map[string]interface{}) error
	GetValue() interface{}
	ParseValue(node *base.Node) error
	ToMiguel() (*MiguelNode, error)
	ToParameters() ([]byte, error)
}

Value -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL