byteutil

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bytes2X_CMD = map[string]interface{}{
	"string":   BytesToString,
	"*string":  BytesToStringPoint,
	"[8]byte":  BytesTo8Bytes,
	"[16]byte": BytesTo16Bytes,
	"[32]byte": BytesTo32Bytes,
	"[64]byte": BytesTo64Bytes,

	"uint8":   BytesToUint8,
	"uint16":  BytesToUint16,
	"*uint16": BytesToUint16Point,
	"uint32":  BytesToUint32,
	"uint64":  BytesToUint64,

	"*big.Int":              BytesToBigInt,
	"[]*big.Int":            BytesToBigIntArr,
	"discover.NodeID":       BytesToNodeId,
	"[]discover.NodeID":     BytesToNodeIdArr,
	"common.Hash":           BytesToHash,
	"[]common.Hash":         BytesToHashArr,
	"common.Address":        BytesToAddress,
	"*common.Address":       BytesToAddressPoint,
	"[]common.Address":      BytesToAddressArr,
	"common.VersionSign":    BytesToVersionSign,
	"[]common.VersionSign":  BytesToVersionSignArr,
	"bls.PublicKeyHex":      BytesToPublicKeyHex,
	"[]bls.PublicKeyHex":    BytesToPublicKeyHexArr,
	"bls.SchnorrProofHex":   BytesToSchnorrProofHex,
	"[]bls.SchnorrProofHex": BytesToSchnorrProofHexArr,

	"[]restricting.RestrictingPlan": BytesToRestrictingPlanArr,
}

Functions

func BytesTo16Bytes added in v0.7.1

func BytesTo16Bytes(curByte []byte) [16]byte

func BytesTo32Bytes

func BytesTo32Bytes(curByte []byte) [32]byte

func BytesTo64Bytes

func BytesTo64Bytes(curByte []byte) [64]byte

func BytesTo8Bytes added in v0.7.1

func BytesTo8Bytes(curByte []byte) [8]byte

func BytesToAddress

func BytesToAddress(curByte []byte) common.Address

func BytesToAddressArr added in v0.7.1

func BytesToAddressArr(curByte []byte) []common.Address

func BytesToAddressPoint added in v1.0.0

func BytesToAddressPoint(curByte []byte) *common.Address

func BytesToBigInt

func BytesToBigInt(curByte []byte) *big.Int

func BytesToBigIntArr added in v0.7.1

func BytesToBigIntArr(curByte []byte) []*big.Int

func BytesToHash

func BytesToHash(curByte []byte) common.Hash

func BytesToHashArr added in v0.7.1

func BytesToHashArr(curByte []byte) []common.Hash

func BytesToNodeId

func BytesToNodeId(curByte []byte) discover.NodeID

func BytesToNodeIdArr added in v0.7.1

func BytesToNodeIdArr(curByte []byte) []discover.NodeID

func BytesToPublicKeyHex added in v0.7.3

func BytesToPublicKeyHex(currByte []byte) bls.PublicKeyHex

func BytesToPublicKeyHexArr added in v0.7.3

func BytesToPublicKeyHexArr(currByte []byte) []bls.PublicKeyHex

func BytesToRestrictingPlanArr added in v0.7.1

func BytesToRestrictingPlanArr(curByte []byte) []restricting.RestrictingPlan

func BytesToSchnorrProofHex added in v0.7.3

func BytesToSchnorrProofHex(currByte []byte) bls.SchnorrProofHex

func BytesToSchnorrProofHexArr added in v0.7.3

func BytesToSchnorrProofHexArr(currByte []byte) []bls.SchnorrProofHex

func BytesToString

func BytesToString(curByte []byte) string

func BytesToStringPoint added in v1.0.0

func BytesToStringPoint(curByte []byte) *string

func BytesToUint16 added in v0.7.1

func BytesToUint16(b []byte) uint16

func BytesToUint16Point added in v1.0.0

func BytesToUint16Point(b []byte) *uint16

func BytesToUint32 added in v0.7.1

func BytesToUint32(b []byte) uint32

func BytesToUint64 added in v0.7.1

func BytesToUint64(b []byte) uint64

func BytesToUint8 added in v0.7.1

func BytesToUint8(b []byte) uint8

func BytesToVersionSign added in v0.7.1

func BytesToVersionSign(currByte []byte) common.VersionSign

func BytesToVersionSignArr added in v0.7.1

func BytesToVersionSignArr(currByte []byte) []common.VersionSign

func Concat added in v1.0.0

func Concat(s1 []byte, s2 ...byte) []byte

func PrintNodeID added in v0.7.1

func PrintNodeID(nodeID discover.NodeID) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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