address_codec

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Account address (20 bytes)
	ACCOUNT_ID = 0

	// Account public key (33 bytes)
	ACCOUNT_PUBLIC_KEY = 0x23

	// 28; Validation public key (33 bytes)
	NODE_PUBLIC = 0x1C
)

Variables

View Source
var (
	// 5, 68
	X_ADDRESS_PREFIX_BYTES_MAIN = []byte{0x05, 0x44}
	// 4, 147
	X_ADDRESS_PREFIX_BYTES_TEST = []byte{0x04, 0x93}
)

Functions

func DecodeAccountID

func DecodeAccountID(rAddress string) ([]byte, error)

func DecodeNodePublic added in v0.0.8

func DecodeNodePublic(nodePublic string) ([]byte, error)

func EncodeAccountID

func EncodeAccountID(accountId []byte) string

func EncodeXAddress

func EncodeXAddress(accountId []byte, tag *uint32, test bool) string

func NodePublicToClassicAddress added in v0.0.8

func NodePublicToClassicAddress(nodePublic string) (string, error)

func NodePublicToXAddress added in v0.0.8

func NodePublicToXAddress(nodePublic string, tag *uint32, test bool) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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