bananoutils

package
v0.0.0-...-e3230a5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 15 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 Account) (public_key []byte, err error)

func ChangeMonkeyServer

func ChangeMonkeyServer(URL string)

func GenerateKey

func GenerateKey() (ed25519.PublicKey, ed25519.PrivateKey)

func GetAddressChecksum

func GetAddressChecksum(pub ed25519.PublicKey) []byte

func GetMonkeyDescriptionURI

func GetMonkeyDescriptionURI() string

func GetMonkeyServer

func GetMonkeyServer() string

func GrabMonkey

func GrabMonkey(ctx context.Context, publicAddr Account, format legion.ImageFormat) (io.Reader, error)

func KeypairFromPrivateKey

func KeypairFromPrivateKey(private_key string) (ed25519.PublicKey, ed25519.PrivateKey)

func KeypairFromSeed

func KeypairFromSeed(seed io.Reader, index uint32) (ed25519.PublicKey, ed25519.PrivateKey, error)

func Reversed

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

func ValidateAddress

func ValidateAddress(account Account) bool

Types

type Account

type Account string

func GeneratePrivateKeyAndFirstPublicAddress

func GeneratePrivateKeyAndFirstPublicAddress() (string, Account, error)

Generate a private key and the first public account key

func PubKeyToAddress

func PubKeyToAddress(pub ed25519.PublicKey) Account

type BlockHash

type BlockHash string

func BlockHashFromBytes

func BlockHashFromBytes(b []byte) BlockHash

func (BlockHash) Sign

func (hash BlockHash) Sign(private_key ed25519.PrivateKey) Signature

func (BlockHash) ToBytes

func (hash BlockHash) ToBytes() []byte

type Signature

type Signature string

func (Signature) ToBytes

func (sig Signature) ToBytes() []byte

type Work

type Work string

Jump to

Keyboard shortcuts

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