schema

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Tag         filter.Tag        `json:"tag"`
	Type        filter.Type       `json:"type"`
	Platform    string            `json:"platform,omitempty"`
	From        string            `json:"from"`
	To          string            `json:"to"`
	Metadata    metadata.Metadata `json:"metadata"`
	RelatedURLs []string          `json:"related_urls,omitempty"`
}

func (*Action) UnmarshalJSON

func (a *Action) UnmarshalJSON(bytes []byte) error

type Actions

type Actions []*Action

type Fee

type Fee struct {
	Address *string         `json:"address,omitempty"`
	Amount  decimal.Decimal `json:"amount"`
	Decimal uint            `json:"decimal"`
}

type Feed

type Feed struct {
	ID             string           `json:"id"`
	Owner          string           `json:"owner,omitempty"`
	Network        filter.Network   `json:"network"`
	Index          uint             `json:"index"`
	From           string           `json:"from"`
	To             string           `json:"to"`
	Tag            filter.Tag       `json:"tag"`
	Type           filter.Type      `json:"type"`
	Platform       *filter.Platform `json:"platform,omitempty"`
	Fee            *Fee             `json:"fee,omitempty"`
	Calldata       string           `json:"calldata,omitempty"` // don't store for now
	FunctionHash   string           `json:"function_hash,omitempty"`
	ParsedFunction string           `json:"parsed_function,omitempty"`
	TotalActions   uint             `json:"total_actions"`
	Actions        []*Action        `json:"actions"`
	Direction      filter.Direction `json:"direction,omitempty"`
	Status         bool             `json:"success"`
	Timestamp      uint64           `json:"timestamp"`
}

func NewUnknownFeed added in v0.1.4

func NewUnknownFeed(feed *Feed) *Feed

type FeedOption

type FeedOption func(feed *Feed) error

FeedOption is a function that can be used to modify a feed, it is used in the feed builder.

func WithFeedPlatform

func WithFeedPlatform(platform filter.Platform) FeedOption

type Feeds

type Feeds []*Feed

func (*Feeds) UnmarshalJSON

func (f *Feeds) UnmarshalJSON(bytes []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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