wallet

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressByPublicKey

func AddressByPublicKey(publicKey string) (string, error)

Get NOAH address from public key.

func NewMnemonic

func NewMnemonic() (string, error)

Generate mnemonic.

func PrivateKeyBySeed

func PrivateKeyBySeed(seed []byte) (string, error)

Get private key from seed.

func PublicKeyByPrivateKey

func PublicKeyByPrivateKey(privateKey string) (string, error)

Get public key from private key.

func Seed

func Seed(mnemonic string) ([]byte, error)

Get seed from mnemonic.

Types

type Data

type Data struct {
	Mnemonic   string
	Seed       string
	PrivateKey string
	PublicKey  string
	Address    string
}

func Create

func Create() (*Data, error)

Create wallet. This method returns generated seed, private key, public key, mnemonic and NOAH address.

type Wallet

type Wallet struct {
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet(seed []byte) (*Wallet, error)

func (*Wallet) Address

func (w *Wallet) Address() string

func (*Wallet) PrivateKey

func (w *Wallet) PrivateKey() string

func (*Wallet) PublicKey

func (w *Wallet) PublicKey() string

Jump to

Keyboard shortcuts

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