address

package
v1.0.1-rc6-dev-review Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: GPL-3.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

View Source
const (
	// AccountAddressLength is the expected length of the adddress
	AccountAddressLength = 64
	SeedLength           = 32
)

Lengths of hashes and Accountes in bytes.

Variables

This section is empty.

Functions

func Decode

func Decode(input string) ([]byte, error)

func DecodeAddr

func DecodeAddr(input []byte) (bytes []byte, e error)

func DecodeHex

func DecodeHex(hex string) (bytes []byte, err error)

func IsBase58Str

func IsBase58Str(s string) bool

func IsHex

func IsHex(s string) bool

func ValidPk

func ValidPk(addr []byte) error

func ValidPkr

func ValidPkr(addr []byte) error

Types

type MixBase58Adrress

type MixBase58Adrress []byte

func (MixBase58Adrress) IsPkr

func (b MixBase58Adrress) IsPkr() bool

func (MixBase58Adrress) MarshalText

func (b MixBase58Adrress) MarshalText() ([]byte, error)

func (MixBase58Adrress) ToPkr

func (b MixBase58Adrress) ToPkr() c_type.PKr

func (*MixBase58Adrress) UnmarshalText

func (b *MixBase58Adrress) UnmarshalText(input []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type PKAddress

type PKAddress [64]byte

func NewPKAddres

func NewPKAddres(b []byte) (ret PKAddress)

func StringToPk

func StringToPk(str string) (ret PKAddress)

func (PKAddress) MarshalText

func (b PKAddress) MarshalText() ([]byte, error)

func (PKAddress) String

func (b PKAddress) String() string

func (PKAddress) ToUint512

func (b PKAddress) ToUint512() c_type.Uint512

func (*PKAddress) UnmarshalText

func (b *PKAddress) UnmarshalText(input []byte) (e error)

UnmarshalText implements encoding.TextUnmarshaler.

type Seed

type Seed [SeedLength]byte

func (*Seed) SeedToUint256

func (priv *Seed) SeedToUint256() *c_type.Uint256

type TKAddress

type TKAddress [64]byte

func Base58ToTk

func Base58ToTk(str string) (ret TKAddress)

func (TKAddress) MarshalText

func (b TKAddress) MarshalText() ([]byte, error)

func (TKAddress) String

func (c TKAddress) String() string

func (*TKAddress) ToPk

func (b *TKAddress) ToPk() (ret PKAddress)

func (TKAddress) ToTk

func (b TKAddress) ToTk() c_type.Tk

func (*TKAddress) UnmarshalText

func (b *TKAddress) UnmarshalText(input []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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