Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( STMMainNetPublicKeyPrefixCompat = "STM" STMTestNetPublicKeyPrefixCompat = "TST" //STM stuff STM_mainnetPublic = addressEncoder.AddressType{"base58", addressEncoder.BTCAlphabet, "ripemd160", "", 33, []byte(STMMainNetPublicKeyPrefixCompat), nil} STM_testnetPublic = addressEncoder.AddressType{"base58", addressEncoder.BTCAlphabet, "ripemd160", "", 33, []byte(STMTestNetPublicKeyPrefixCompat), nil} STM_PrivateWIF = addressEncoder.AddressType{"base58", addressEncoder.BTCAlphabet, "doubleSHA256", "", 32, []byte{0x80}, nil} STM_PrivateWIFCompressed = addressEncoder.AddressType{"base58", addressEncoder.BTCAlphabet, "doubleSHA256", "", 32, []byte{0x80}, []byte{0x01}} Default = AddressDecoderV2{} )
Functions ¶
func CalculateAccountRolePrivateKey ¶ added in v1.0.2
计算角色私钥
func GetCompPubKey ¶ added in v1.0.2
获取角色的压缩公钥
Types ¶
type AddressDecoderV2 ¶
type AddressDecoderV2 struct { *openwallet.AddressDecoderV2Base IsTestNet bool }
AddressDecoderV2
func NewAddressDecoderV2 ¶
func NewAddressDecoderV2(isTestNet bool) *AddressDecoderV2
NewAddressDecoder 地址解析器
func (*AddressDecoderV2) AddressDecode ¶
func (dec *AddressDecoderV2) AddressDecode(pubKey string, opts ...interface{}) ([]byte, error)
AddressDecode decode address
func (*AddressDecoderV2) AddressEncode ¶
func (dec *AddressDecoderV2) AddressEncode(hash []byte, opts ...interface{}) (string, error)
AddressEncode encode address
Click to show internal directories.
Click to hide internal directories.