wallet

package module
v0.0.0-...-a58a8a6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

swtc-base-lib-go

swtc base library, written in Go.

Original work almost completed by jingtum-lib-go, make an enhancement to support consortium chain on this basis.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SWTCAlphabet *base58.Alphabet

SWTCAlphabet definition

Functions

func IsValidAddress

func IsValidAddress(address string) bool

IsValidAddress validate swtc address is valid or not

func IsValidConsortiumAddress

func IsValidConsortiumAddress(address string, alphabet *base58.Alphabet, accountPrefix uint8) bool

IsValidConsortiumAddress validate consortium chain address is valid or not

func IsValidConsortiumSecret

func IsValidConsortiumSecret(secret string, alphabet *base58.Alphabet, seedfix uint8) bool

IsValidConsortiumSecret validate consortium chain secret is valid or not

func IsValidSecret

func IsValidSecret(secret string) bool

IsValidSecret validate swtc secret is valid or not

Types

type Wallet

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

Wallet strcut

func FromConsortiumSecret

func FromConsortiumSecret(secret string, alphabet *base58.Alphabet, seedfix uint8, accountPrefix uint8) (*Wallet, error)

FromConsortiumSecret generate consortium chain wallet by secret

func FromSecret

func FromSecret(secret string) (*Wallet, error)

FromSecret generate swtc wallet by secret

func Generate

func Generate() (*Wallet, error)

Generate swtc wallet

func GenerateConsortium

func GenerateConsortium(alphabet *base58.Alphabet, seedfix uint8, accountPrefix uint8) (*Wallet, error)

GenerateConsortium to generate consortium chain wallet

func (*Wallet) GetAddress

func (wallet *Wallet) GetAddress() string

GetAddress get address

func (*Wallet) GetPublicKey

func (wallet *Wallet) GetPublicKey() string

GetPublicKey get public key

func (*Wallet) GetSecret

func (wallet *Wallet) GetSecret() string

GetSecret get secret

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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