common

package
v0.0.0-...-8377674 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHAIN_POLY   = 0
	CHAIN_BTC    = 1
	CHAIN_ETH    = 2
	CHAIN_ONT    = 3
	CHAIN_NEO    = 4
	CHAIN_COSMOS = 5
)
View Source
const (
	BTC_TOKEN_NAME = "btc"
	BTC_TOKEN_HASH = "0000000000000000000000000000000000000011"
)
View Source
const UINT256_SIZE = 32

Variables

View Source
var UINT256_EMPTY = Uint256{}

Functions

func HexBytes2Base58Address

func HexBytes2Base58Address(address []byte) string

func HexReverse

func HexReverse(arr []byte) []byte

func HexString2Base58Address

func HexString2Base58Address(address string) string

func HexStringReverse

func HexStringReverse(value string) string

func String2Float64

func String2Float64(value string) float64

func ToArrayReverse

func ToArrayReverse(arr []byte) []byte

Types

type Uint256

type Uint256 [UINT256_SIZE]byte

func (*Uint256) Deserialize

func (u *Uint256) Deserialize(r io.Reader) error

func (*Uint256) Serialize

func (u *Uint256) Serialize(w io.Writer) error

func (*Uint256) ToArray

func (u *Uint256) ToArray() []byte

func (*Uint256) ToHexString

func (u *Uint256) ToHexString() string

Jump to

Keyboard shortcuts

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