utils

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Max key1 value (occupy 6 bytes = 48 bits)
	MaxKey1 = uint64(1<<48 - 1)
)

Variables

This section is empty.

Functions

func GenerateSystemTxId

func GenerateSystemTxId(systemTxType uint8, key1 uint64, key2 uint8) string

GenerateSystemTxId generates a system transaction hash with business type and two keys Format: 0x{system_tx_type(1 byte)}{key1(6 bytes)}{key2(1 byte)}0000000000000000000000000000000000000000

func ParseSystemTxId

func ParseSystemTxId(hash string) (systemTxType uint8, key1 uint64, key2 uint8, err error)

ParseSystemTxId parses a system transaction hash to get business type and two keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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