utils

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2020 License: LGPL-3.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcBlockConfirmationRisk added in v0.1.1

func CalcBlockConfirmationRisk(rawConfirmationRisk *big.Int) *big.Float

CalcBlockConfirmationRisk calculates block revert rate

func Keccak256

func Keccak256(hexStr string) (string, error)

Keccak256 hashes hex string by keccak256 and returns it's hash value

func PrivateKeyToPublicKey

func PrivateKeyToPublicKey(privateKey string) string

PrivateKeyToPublicKey calculates public key from private key

func PublicKeyToAddress

func PublicKeyToAddress(publicKey string) types.Address

PublicKeyToAddress generate address from public key

Account address in conflux starts with '0x1'

func ToCfxGeneralAddress

func ToCfxGeneralAddress(address common.Address) types.Address

ToCfxGeneralAddress converts a normal address to conflux customerd general address whose hex string starts with '0x1'

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL