Documentation ¶
Index ¶
- Constants
- Variables
- func B58Decode(enc []byte) []byte
- func B58Encode(data []byte) []byte
- func BytesEquals(a []byte, b []byte) bool
- func BytesMixed(src []byte, lenBits int, buffer *bytes.Buffer) error
- func Decode16Byte(str string) []byte
- func Encode16Byte(byteVal []byte) string
- func Hex2bytes(s string) []byte
- func IsZero(a []byte) bool
- func IsZeroHash(h Hash) bool
- func ObjSHA256(obj rawencode.RawEncoder) ([]byte, []byte, error)
- func ParseString2BigInt(str string) *big.Int
- func PrefixDiff(a, b []byte, n int) int
- func PrefixLen(a []byte) int
- func ReadMixedBytes(buf *bytes.Buffer) ([]byte, error)
- func Uint64s(t json.Number) (uint64, error)
- func XOR(a, b []byte) []byte
- type Address
- func (a *Address) B58() []byte
- func (a *Address) B58String() string
- func (a *Address) Bytes() []byte
- func (a *Address) Checksum() []byte
- func (a *Address) Equals(b Address) bool
- func (a *Address) Hex() string
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) Payload() []byte
- func (a *Address) PubKeyHash() []byte
- func (a *Address) SetBytes(b []byte)
- func (a *Address) String() string
- func (a *Address) UnmarshalJSON(data []byte) error
- func (a *Address) Version() uint8
- type Hash
Constants ¶
View Source
const (
AddrDefaultVersion = 0
)
View Source
const Coin = 10 ^ 6
Variables ¶
View Source
var ( ZeroHash = Bytes2Hash([]byte{}) AddrCheckSumLen = 4 )
View Source
var Big0 = new(big.Int).SetInt64(0)
View Source
var Zero = int(0)
Functions ¶
func BytesEquals ¶
func Decode16Byte ¶
func Encode16Byte ¶
func IsZeroHash ¶
func ParseString2BigInt ¶
func PrefixDiff ¶
PrefixDiff counts the number of equal prefixed bits of a and b.
Types ¶
type Address ¶
type Address [addrLen]byte
func B58ToAddress ¶
func Bytes2Address ¶
func Hex2Address ¶
func StrB58ToAddress ¶
func (*Address) MarshalJSON ¶
func (*Address) PubKeyHash ¶
func (*Address) UnmarshalJSON ¶
type Hash ¶
type Hash [hashLen]byte
func Bytes2Hash ¶
func (*Hash) MarshalJSON ¶
func (*Hash) UnmarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.