Documentation ¶
Index ¶
- Constants
- Variables
- func IsValidHexAddress(hexStr string) bool
- func IsValidHexTokenTypeId(hexStr string) bool
- type Address
- func BytesToAddress(b []byte) (Address, error)
- func CreateAddress() (Address, ed25519.PrivateKey, error)
- func CreateAddressWithDeterministic(d [32]byte) (Address, ed25519.PrivateKey, error)
- func CreateContractAddress(data ...[]byte) Address
- func HexToAddress(hexStr string) (Address, error)
- func PrikeyToAddress(key ed25519.PrivateKey) Address
- func PubkeyToAddress(pubkey []byte) Address
- type GetError
- type Gid
- type Hash
- type TokenTypeId
Constants ¶
View Source
const ( AddressPrefix = "vite_" AddressSize = 20 )
View Source
const ( TokenTypeIdPrefix = "tti_" TokenTypeIdSize = 10 )
View Source
const GidSize = 10
View Source
const (
HashSize = 32
)
Variables ¶
View Source
var ( PRIVATE_GID = Gid{0, 0, 0, 0, 0, 0, 0, 0, 0, 0} SNAPSHOT_GID = Gid{0, 0, 0, 0, 0, 0, 0, 0, 0, 1} DELEGATE_GID = Gid{0, 0, 0, 0, 0, 0, 0, 0, 0, 2} )
View Source
var AccountLimitSnapshotHeight = uint64(60 * 60 * 24)
View Source
var EmptyHeight = uint64(0)
View Source
var (
ErrJsonNotString = errors.New("not valid string")
)
View Source
var GenesisHeight = uint64(1)
View Source
var ZERO_HASH = Hash{}
Functions ¶
func IsValidHexAddress ¶
func IsValidHexTokenTypeId ¶
Types ¶
type Address ¶
type Address [AddressSize]byte
func BytesToAddress ¶
func CreateAddress ¶
func CreateAddress() (Address, ed25519.PrivateKey, error)
func CreateAddressWithDeterministic ¶
func CreateAddressWithDeterministic(d [32]byte) (Address, ed25519.PrivateKey, error)
func CreateContractAddress ¶
func HexToAddress ¶
func PrikeyToAddress ¶
func PrikeyToAddress(key ed25519.PrivateKey) Address
func PubkeyToAddress ¶
func (Address) MarshalText ¶
func (*Address) UnmarshalJSON ¶
type Gid ¶
func BytesToGid ¶
type Hash ¶
func BytesToHash ¶
func DataListHash ¶
func (Hash) MarshalText ¶
func (*Hash) UnmarshalJSON ¶
type TokenTypeId ¶
type TokenTypeId [TokenTypeIdSize]byte
func BytesToTokenTypeId ¶
func BytesToTokenTypeId(b []byte) (TokenTypeId, error)
func CreateTokenTypeId ¶
func CreateTokenTypeId(data ...[]byte) TokenTypeId
func HexToTokenTypeId ¶
func HexToTokenTypeId(hexStr string) (TokenTypeId, error)
func (TokenTypeId) Bytes ¶
func (tid TokenTypeId) Bytes() []byte
func (TokenTypeId) Hex ¶
func (tid TokenTypeId) Hex() string
func (TokenTypeId) MarshalText ¶
func (tid TokenTypeId) MarshalText() ([]byte, error)
func (*TokenTypeId) SetBytes ¶
func (tid *TokenTypeId) SetBytes(b []byte) error
func (TokenTypeId) String ¶
func (tid TokenTypeId) String() string
func (*TokenTypeId) UnmarshalJSON ¶
func (tid *TokenTypeId) UnmarshalJSON(input []byte) error
Click to show internal directories.
Click to hide internal directories.