event

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicBlock         = uint16(0x0101)
	TopicTransaction   = uint16(0x0201)
	TopicAccountChange = uint16(0x0301)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event []byte

func CreateAccountChangeEvent added in v0.15.0

func CreateAccountChangeEvent(accountAddr crypto.Address, height uint32) Event

CreateAccountChangeEvent creates an event when the new account is created. The account event structure is like : <topic_id><account_address><height><sequence_number>.

func CreateBlockEvent

func CreateBlockEvent(blockHash hash.Hash, height uint32) Event

CreateBlockEvent creates an event when the new block is committed. The block event structure is like : <topic_id><block_hash><height><sequence_number>.

func CreateTransactionEvent added in v0.15.0

func CreateTransactionEvent(txHash tx.ID, height uint32) Event

CreateTransactionEvent creates an event when a new transaction sent. The new transaction event structure is like : <topic_id><tx_hash><height><sequence_number>.

Jump to

Keyboard shortcuts

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