Documentation ¶
Index ¶
- Constants
- Variables
- func Base58Decode(s string) ([]byte, error)
- func Base58Encode(data []byte) string
- func Sha256(b []byte) []byte
- func Sha256RipeMD160(data []byte) []byte
- func Sha512Half(b []byte) []byte
- func Sha512Quarter(b []byte) []byte
- type Address
- type Key
- func (p *Key) GetAddress() (libcore.Address, error)
- func (p *Key) GetPrivate() (libaccount.PrivateKey, error)
- func (p *Key) GetPublic() (libaccount.PublicKey, error)
- func (p *Key) MarshalBinary() ([]byte, error)
- func (p *Key) MarshalText() ([]byte, error)
- func (p *Key) Sign(hash libcore.Hash, msg []byte) (libcore.Signature, error)
- func (p *Key) UnmarshalBinary(data []byte) error
- func (p *Key) UnmarshalText(b []byte) error
- func (p *Key) Verify(hash libcore.Hash, msg []byte, signature libcore.Signature) (bool, error)
- type Private
- func (p *Private) GeneratePublic() (libaccount.PublicKey, error)
- func (p *Private) GetSecret() (string, error)
- func (p *Private) MarshalBinary() ([]byte, error)
- func (p *Private) MarshalText() ([]byte, error)
- func (p *Private) Sign(hash libcore.Hash, msg []byte) (libcore.Signature, error)
- func (p *Private) UnmarshalBinary(data []byte) error
- func (p *Private) UnmarshalText(b []byte) error
- type Public
- func (p *Public) GenerateAddress() (libcore.Address, error)
- func (p *Public) MarshalBinary() ([]byte, error)
- func (p *Public) MarshalText() ([]byte, error)
- func (p *Public) UnmarshalBinary(data []byte) error
- func (p *Public) UnmarshalText(b []byte) error
- func (p *Public) Verify(hash libcore.Hash, msg []byte, signature libcore.Signature) (bool, error)
Constants ¶
View Source
const ( ADDRESS_PREFIX uint8 = 0 SECRET_PREFIX uint8 = 33 )
Variables ¶
View Source
var (
ALPHABET = base58.NewAlphabet("jpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65rkm8oFqi1tuvAxyz")
)
Functions ¶
func Base58Decode ¶
func Base58Encode ¶
func Sha256RipeMD160 ¶
func Sha512Half ¶
func Sha512Quarter ¶
Types ¶
type Address ¶
type Address [20]byte
func (Address) MarshalBinary ¶
func (Address) MarshalText ¶
func (*Address) UnmarshalBinary ¶
func (*Address) UnmarshalText ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func GenerateFamilySeed ¶
func (*Key) GetPrivate ¶
func (p *Key) GetPrivate() (libaccount.PrivateKey, error)
func (*Key) MarshalBinary ¶
func (*Key) MarshalText ¶
func (*Key) UnmarshalBinary ¶
func (*Key) UnmarshalText ¶
type Private ¶
type Private struct { *btcec.PrivateKey // contains filtered or unexported fields }
func (*Private) GeneratePublic ¶
func (p *Private) GeneratePublic() (libaccount.PublicKey, error)
func (*Private) MarshalBinary ¶
func (*Private) MarshalText ¶
func (*Private) UnmarshalBinary ¶
func (*Private) UnmarshalText ¶
type Public ¶
func (*Public) MarshalBinary ¶
func (*Public) MarshalText ¶
func (*Public) UnmarshalBinary ¶
func (*Public) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.