tzkt

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyKindList           = errors.New("Empty kind list")
	ErrUnknownOperationKind    = errors.New("Unknown operation kind")
	ErrOperationDoesNotContain = errors.New("Operation doesn't contain field")
	ErrInvalidFieldType        = errors.New("Field has invalid type")
	ErrInvalidBodyType         = errors.New("Invalid message body type")
	ErrInvalidOperationType    = errors.New("Invalid operation body type")
	ErrInvalidBlockType        = errors.New("Invalid block body type")
	ErrUnknownMessageType      = errors.New("Unknown TzKT message type")
)

errors

Functions

This section is empty.

Types

type BlockMessage

type BlockMessage struct {
	Hash      string             `json:"hash"`
	Level     uint64             `json:"level"`
	Type      events.MessageType `json:"type"`
	Timestamp time.Time
}

BlockMessage -

type OperationMessage

type OperationMessage struct {
	Level     uint64
	Block     string
	Timestamp time.Time
	Hash      *sync.Map
}

OperationMessage -

type TzKT

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

TzKT - tzkt data source

func NewTzKT

func NewTzKT(url string, accounts []string, kinds []string) *TzKT

NewTzKT - TzKT constructor

func (*TzKT) Blocks

func (tzkt *TzKT) Blocks() <-chan BlockMessage

Operations -

func (*TzKT) Close

func (tzkt *TzKT) Close() error

Close -

func (*TzKT) Connect

func (tzkt *TzKT) Connect(ctx context.Context) error

Connect -

func (*TzKT) Delegates

func (tzkt *TzKT) Delegates(ctx context.Context, limit, offset int64) ([]data.Delegate, error)

Delegates -

func (*TzKT) GetBlocks

func (tzkt *TzKT) GetBlocks(ctx context.Context, limit, state uint64) ([]BlockMessage, error)

GetBlocks -

func (*TzKT) Operations

func (tzkt *TzKT) Operations() <-chan OperationMessage

Operations -

func (*TzKT) Rights

func (tzkt *TzKT) Rights(ctx context.Context, level uint64) ([]data.Right, error)

Rights -

func (*TzKT) Subscribe

func (tzkt *TzKT) Subscribe() error

Subscribe -

func (*TzKT) SubscribeToBlocks

func (tzkt *TzKT) SubscribeToBlocks() error

SubscribeToBlocks -

func (*TzKT) SubscribeToOperations

func (tzkt *TzKT) SubscribeToOperations(address string, types ...string) error

SubscribeToOperations - Sends operations of specified `types` or related to specified `account`, included into the blockchain

func (*TzKT) Sync

func (tzkt *TzKT) Sync(ctx context.Context, indexerLevel uint64)

Sync -

Jump to

Keyboard shortcuts

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