utils

package
v0.0.0-...-2176b9d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode58

func Decode58(address string) string

Decode58 will decode an address into the corresponding 20 byte hexadecimal representation of the hashed SEC.

func Encode58

func Encode58(str string) string

Encode58 will convert hexadecimal strings to base58

func Encode58CheckSum

func Encode58CheckSum(str string) string

Encode58CheckSum will include the checksum to a base58 encoded string

func FromBigInt

func FromBigInt(bigInt *big.Int) string

FromBigInt will return the 0x encoded of the provided bigInt

func GenerateSecret

func GenerateSecret() string

GenerateSecret will create a deterministic number

func H160ToP2PKH

func H160ToP2PKH(h160 string, testnet bool) string

H160ToP2PKH: Converts a h160 to a p2pkh address

func H160ToP2SH

func H160ToP2SH(h160 string, testnet bool) string

H160ToP2SH Converts a h160 to a p2sh address

func Hash160

func Hash160(sec string) string

Hash160 utility will take the SEC address format, applies a sha256 then ripemd160

func ToBigInt

func ToBigInt(ridiculouslyLargeNumber string) *big.Int

ToBigInt Converts a string to the corresponding big.Int

Types

This section is empty.

Jump to

Keyboard shortcuts

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