Documentation ¶
Index ¶
- Constants
- Variables
- func SetNetWork(networkType string)
- type Address
- func NewAddrFromString(str string) (Address, error)
- func NewEd25519Addr(pubkey []byte) (Address, error)
- func NewFromBytes(addr []byte) (Address, error)
- func NewFromEthAddr(eaddr common.Address) (Address, error)
- func NewSecp256k1Addr(pub []byte) (Address, error)
- func StringToAddress(addr string) (Address, error)
- func (a Address) Bytes() []byte
- func (a *Address) MarshalCBOR(w io.Writer) error
- func (a *Address) NewCommonAddr() (common.Address, error)
- func (a Address) Payload() []byte
- func (a *Address) Protocol() crypto.SigType
- func (a Address) String() string
- func (a *Address) UnmarshalCBOR(r io.Reader) error
- type NetWork
Constants ¶
View Source
const ( ED25519PubKeySize = 32 Secp256k1PayloadSize = 21 )
View Source
const ( AddressSize = 44 AddresPrefixSize = 3 SecpAddressSzie = 44 Ed25519AddressSzie = 47 )
View Source
const ( MainnetPrefix = "Kto" TestnetPrefix = "otK" )
View Source
const (
UndefAddressString = ""
)
Variables ¶
View Source
var CurrentNetWork = Testnet
View Source
var GenesisAddress = "otK00000000000000000000000000000000000000000"
View Source
var Undef = Address{}
View Source
var (
ZeroAddress = Address{string([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})}
)
Functions ¶
func SetNetWork ¶
func SetNetWork(networkType string)
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
Address
func NewAddrFromString ¶
func NewEd25519Addr ¶
func NewFromBytes ¶
func NewSecp256k1Addr ¶
func StringToAddress ¶
Click to show internal directories.
Click to hide internal directories.