Documentation ¶
Index ¶
- func BytesFromBase64(str string) []byte
- func BytesFromHex(str string) []byte
- func BytesToBase64(bytes []byte) string
- func BytesToHex(bytes []byte) string
- func GetAddressFromPubKey(pubKey crypto.PubKey) string
- func GetCid(content []byte) (string, error)
- func Intersection(a, b []string) (c []string)
- func MarshalMapToJSONBytes(val map[string]interface{}) (bytes []byte)
- func UnMarshalMapFromJSONBytes(bytes []byte) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesFromBase64 ¶
BytesFromBase64 decodes a byte array from a base64 string.
func BytesFromHex ¶
BytesFromHex decodes a byte array from a hex string.
func BytesToBase64 ¶
BytesToBase64 encodes a byte array as a base64 string.
func BytesToHex ¶
BytesToHex encodes a byte array as a hex string.
func GetAddressFromPubKey ¶
GetAddressFromPubKey gets an address from the public key.
func Intersection ¶
Intersection computes the intersection of two string slices.
func MarshalMapToJSONBytes ¶
MarshalMapToJSONBytes converts map[string]interface{} to bytes.
func UnMarshalMapFromJSONBytes ¶
UnMarshalMapFromJSONBytes converts bytes to map[string]interface{}.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.