Documentation ¶
Index ¶
- Variables
- func CalHash(msg []byte, hFunc func() hash.Hash) (res []byte, err error)
- func DecodePrivateKey(sk string) (privateKey *ecdsa.PrivateKey, err error)
- func DecodePrivateKeyBigInt(skStr string) (privateKey *ecdsa.PrivateKey, err error)
- func DecodePubKey(pk string) (pubKey *ecdsa.PublicKey, err error)
- func EncodePrivateKey(sk *ecdsa.PrivateKey) (priKey string, err error)
- func EncodePubKey(pk *ecdsa.PublicKey) (pubKey string, err error)
- func EtherToWei(value float64) *big.Int
- func IsValidEthAddress(address string) bool
- func IsValidHashValue(hash string) bool
- func IsValidPrivateKey(sk string) bool
- func Sign(sk string, data []byte) (sig []byte, err error)
- func VerifySig(pk string, sig []byte, data []byte) (res bool, err error)
- func WeiToEther(_balance *big.Int) *big.Float
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DecodePrivateKey ¶
func DecodePrivateKey(sk string) (privateKey *ecdsa.PrivateKey, err error)
func DecodePrivateKeyBigInt ¶
func DecodePrivateKeyBigInt(skStr string) (privateKey *ecdsa.PrivateKey, err error)
func EncodePrivateKey ¶
func EncodePrivateKey(sk *ecdsa.PrivateKey) (priKey string, err error)
func EtherToWei ¶
func IsValidEthAddress ¶
func IsValidHashValue ¶
func IsValidPrivateKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.