misc

package
v0.0.0-...-5d05a64 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bin2Addresses

func Bin2Addresses(binAddresses [][]byte) []string

func BytesToHexStr

func BytesToHexStr(data []uint8) string

func BytesToString

func BytesToString(data []byte) string

func ClearPrefix0x

func ClearPrefix0x(data string) string

func ConvertBytesToLong

func ConvertBytesToLong(b []byte) uint32

func FileExists

func FileExists(fileName string) bool

func GetAddressFromUnSizedPK

func GetAddressFromUnSizedPK(pk []byte) common.Address

func GetDilithiumAddressFromUnSizedPK

func GetDilithiumAddressFromUnSizedPK(pk []byte) common.Address

func GetMaxOTSBitfieldSizeFromAddress

func GetMaxOTSBitfieldSizeFromAddress(addr common.Address) uint64

func GetOTSIndexFromSignature

func GetOTSIndexFromSignature(signature []byte) uint64

func GetSignatureType

func GetSignatureType(addr common.Address) common2.SignatureType

func GetWalletTypeFromPK

func GetWalletTypeFromPK(pk []byte) common2.SignatureType

func GetXMSSAddressFromUnSizedPK

func GetXMSSAddressFromUnSizedPK(pk []byte) common.Address

func HexStrToBytes

func HexStrToBytes(data string) ([]uint8, error)

func IPFromMultiAddr

func IPFromMultiAddr(multiAddr string) string

func IsUsedOTSIndex

func IsUsedOTSIndex(otsIndex uint64, otsBitfield [][8]byte) bool

func MerkleTXHash

func MerkleTXHash(hashes list.List) []byte

func NewRotateFileHook

func NewRotateFileHook(config RotateFileConfig) (logrus.Hook, error)

func ShorToQuanta

func ShorToQuanta(data uint64) string

func ShorsToQuantas

func ShorsToQuantas(data []uint64) []string

func StringAddressToBytesArray

func StringAddressToBytesArray(addrs []string) ([][]byte, error)

func UnSizedAddressToSizedAddress

func UnSizedAddressToSizedAddress(addr []byte) (addrSized [common2.AddressSize]uint8)

func UnSizedDilithiumPKToSizedPK

func UnSizedDilithiumPKToSizedPK(pk []byte) (pkSized [dilithium.PKSizePacked]uint8)

func UnSizedXMSSPKToSizedPK

func UnSizedXMSSPKToSizedPK(pk []byte) (pkSized [xmss.ExtendedPKSize]uint8)

Types

type RotateFileConfig

type RotateFileConfig struct {
	Filename   string
	MaxSize    int
	MaxBackups int
	MaxAge     int
	Level      logrus.Level
	Formatter  logrus.Formatter
}

type RotateFileHook

type RotateFileHook struct {
	Config RotateFileConfig
	// contains filtered or unexported fields
}

func (*RotateFileHook) Fire

func (hook *RotateFileHook) Fire(entry *logrus.Entry) error

func (*RotateFileHook) Levels

func (hook *RotateFileHook) Levels() []logrus.Level

type TransactionList

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

func NewTransactionList

func NewTransactionList(outFileName string) *TransactionList

func (*TransactionList) Add

func (t *TransactionList) Add(tx *protos.Transaction)

func (*TransactionList) GetTransactions

func (t *TransactionList) GetTransactions() []*protos.Transaction

func (*TransactionList) List

func (t *TransactionList) List()

func (*TransactionList) Load

func (t *TransactionList) Load()

func (*TransactionList) Remove

func (t *TransactionList) Remove()

func (*TransactionList) Save

func (t *TransactionList) Save()

Jump to

Keyboard shortcuts

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