activity

package
v0.151.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

func GetActivityEntries

func GetActivityEntries(db *sql.DB, addresses []common.Address, chainIDs []uint64, filter Filter, offset int, limit int) ([]Entry, error)

func NewActivityEntryWithMultiTransaction

func NewActivityEntryWithMultiTransaction(id transfer.MultiTransactionIDType, timestamp int64, activityType Type) Entry

func NewActivityEntryWithTransaction

func NewActivityEntryWithTransaction(transactionType PayloadType, transaction *transfer.TransactionIdentity, timestamp int64, activityType Type) Entry

func (*Entry) MarshalJSON

func (e *Entry) MarshalJSON() ([]byte, error)

func (*Entry) TransactionType

func (e *Entry) TransactionType() PayloadType

func (*Entry) UnmarshalJSON

func (e *Entry) UnmarshalJSON(data []byte) error

type Filter

type Filter struct {
	Period                Period           `json:"period"`
	Types                 []Type           `json:"types"`
	Statuses              []Status         `json:"statuses"`
	TokenTypes            []TokenType      `json:"tokenTypes"`
	CounterpartyAddresses []common.Address `json:"counterpartyAddresses"`
}

type PayloadType

type PayloadType = int
const (
	MultiTransactionPT PayloadType = iota + 1
	SimpleTransactionPT
	PendingTransactionPT
)

type Period

type Period struct {
	// 0 means no limit
	StartTimestamp int64 `json:"startTimestamp"`
	EndTimestamp   int64 `json:"endTimestamp"`
}

type Status

type Status int
const (
	AllAS Status = iota
	FailedAS
	PendingAS
	CompleteAS
	FinalizedAS
)

type TokenType

type TokenType int
const (
	AllTT TokenType = iota
	AssetTT
	CollectiblesTT
)

type Type

type Type int
const (
	AllAT Type = iota
	SendAT
	ReceiveAT
	BuyAT
	SwapAT
	BridgeAT
)

Jump to

Keyboard shortcuts

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