utils

package
v0.0.0-...-1ccafed Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EncodeNano = "13456789abcdefghijkmnopqrstuwxyz"

nano uses a non-standard base32 character set.

Variables

Functions

func AddressToPub

func AddressToPub(account string) (public_key []byte, err error)

Convert address to a public key

func BananoToRaw

func BananoToRaw(banano float64) string

BananoToRaw - Converts Banano amount to Raw amount

func GetAddressChecksum

func GetAddressChecksum(pub ed25519.PublicKey) []byte

func GetEnv

func GetEnv(key string, fallback string) string

func IPAddress

func IPAddress(r *http.Request) string

func NanoToRaw

func NanoToRaw(nano float64) string

NanoToRaw - Converts Nano amount to Raw amount

func RawToBanano

func RawToBanano(raw string, truncate bool) (float64, error)

RawToBanano - Converts Raw amount to usable Banano amount

func RawToBigInt

func RawToBigInt(raw string) (*big.Int, error)

Raw to Big - converts raw amount to a big.Int

func RawToNano

func RawToNano(raw string, truncate bool) (float64, error)

RawToNano - Converts Raw amount to usable Nano amount

func Reversed

func Reversed(str []byte) (result []byte)

func ValidateAddress

func ValidateAddress(account string, bananoMode bool) bool

ValidateAddress - Returns true if a nano/banano address is valid

Types

This section is empty.

Directories

Path Synopsis
Package ed25519 implements the Ed25519 signature algorithm.
Package ed25519 implements the Ed25519 signature algorithm.

Jump to

Keyboard shortcuts

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