Documentation ¶
Overview ¶
Package address 计算地址相关的函数
Index ¶
- Constants
- Variables
- func CheckAddress(addr string) (e error)
- func CheckMultiSignAddress(addr string) (e error)
- func ExecAddress(name string) string
- func ExecPubKey(name string) []byte
- func MultiSignAddress(pubkey []byte) string
- func PubKeyToAddr(in []byte) string
- func SetNormalAddrVer(ver byte)
- type Address
Constants ¶
View Source
const MaxExecNameLength = 100
MaxExecNameLength 执行器名最大长度
Variables ¶
View Source
var ErrAddressChecksum = errors.New("address checksum error")
ErrAddressChecksum :
View Source
var ErrCheckChecksum = errors.New("Address Checksum error")
ErrCheckChecksum :
View Source
var ErrCheckVersion = errors.New("check version error")
ErrCheckVersion :
View Source
var MultiSignVer byte = 5
MultiSignVer 多重签名地址的版本号
View Source
var NormalVer byte
NormalVer 普通地址的版本号
Functions ¶
func CheckMultiSignAddress ¶
CheckMultiSignAddress 检查多重签名地址的有效性
func MultiSignAddress ¶
MultiSignAddress create a multi sign address
func SetNormalAddrVer ¶ added in v1.65.1
func SetNormalAddrVer(ver byte)
SetNormalAddrVer 根据配置设置生成普通地址的version版本号,默认是0
Types ¶
type Address ¶
type Address struct { Version byte Hash160 [20]byte // For a stealth address: it's HASH160 Checksum []byte // Unused for a stealth address Pubkey []byte // Unused for a stealth address Enc58str string }
Address 地址
func HashToAddress ¶
HashToAddress hash32 to address
func NewAddrFromString ¶
NewAddrFromString new 地址
Click to show internal directories.
Click to hide internal directories.