keys

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAddress

func ExtractAddress(startIndex int, key []byte) (addr sdk.AccAddress, nextIndex int, err error)

ExtractAddress extracts addr from a key of the form of ... | lengthPrefixed(addr) | ... starting at a given index. Also returns the index of the first byte following the address.

func ExtractAddressAndString

func ExtractAddressAndString(startIndex int, key []byte) (addr sdk.AccAddress, s string, nextIndex int, err error)

ExtractAddressAndString extracts addr and a null-terminated string from a key of the form of ... | lengthPrefixed(addr) | bytes(string) | 0x0 | ... starting at a given index. Also returns the index of the first byte following the null terminator.

func ExtractString

func ExtractString(startIndex int, key []byte) (s string, nextIndex int, err error)

ExtractString extracts a null-terminated string from a key of the form of ... | bytes(string) | 0x0 | ... starting at a given index. Also returns the index of the first byte following the null terminator.

func NoLastByte

func NoLastByte(key []byte) string

NoLastByte returns sub-slice of the key without the last byte. Panics if length of key is zero.

func ToStr

func ToStr(key []byte) string

ToStr takes the full key and converts it to a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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