wallet

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ZCNSCSmartContractAddress = "6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712e0"
	MintFunc                  = "mint"
	BurnFunc                  = "burn"
	BurnWzcnTicketPath        = "/v1/ether/burnticket/get"
	BurnNativeTicketPath      = "/v1/0chain/burnticket/get"
)

Variables

Functions

func ExitWithError

func ExitWithError(v ...interface{})

func PrintError

func PrintError(v ...interface{})

Types

type StatusBar

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

type Wallet

type Wallet struct {
	ZCNWallet *zcncrypto.Wallet
}

Wallet represents a wallet that stores keys and additional info.

func AssignWallet

func AssignWallet(clientConfig string) (*Wallet, error)

func CreateWallet

func CreateWallet(publicKey, privateKey []byte) *Wallet

CreateWallet creates initialized Wallet.

func (*Wallet) ID

func (w *Wallet) ID() string

ID returns the client id. NOTE: client id represents hex encoded SHA3-256 hash of the raw public key.

func (*Wallet) PrivateKey added in v1.3.5

func (w *Wallet) PrivateKey() string

PrivateKey returns the public key.

func (*Wallet) PublicKey

func (w *Wallet) PublicKey() string

PublicKey returns the public key.

func (*Wallet) RegisterToMiners

func (w *Wallet) RegisterToMiners() error

RegisterToMiners registers wallet to the miners by executing zcncore.RegisterToMiners.

func (*Wallet) StringJSON

func (w *Wallet) StringJSON() (string, error)

StringJSON returns marshalled to JSON string Wallet.ZCNWallet.

type ZCNStatus

type ZCNStatus struct {
	Wg      *sync.WaitGroup
	Success bool
	ErrMsg  string
	// contains filtered or unexported fields
}

func NewZCNStatus

func NewZCNStatus() (zcns *ZCNStatus)

func (*ZCNStatus) Begin

func (zcn *ZCNStatus) Begin()

func (*ZCNStatus) OnAuthComplete

func (zcn *ZCNStatus) OnAuthComplete(_ *zcncore.Transaction, status int)

func (*ZCNStatus) OnAuthorizeSendComplete

func (zcn *ZCNStatus) OnAuthorizeSendComplete(status int, _ string, _ int64, _ string, creationDate int64, signature string)

func (*ZCNStatus) OnBalanceAvailable

func (zcn *ZCNStatus) OnBalanceAvailable(status int, value int64, _ string)

func (*ZCNStatus) OnInfoAvailable

func (zcn *ZCNStatus) OnInfoAvailable(_ int, status int, config string, err string)

func (*ZCNStatus) OnSetupComplete

func (zcn *ZCNStatus) OnSetupComplete(_ int, _ string)

func (*ZCNStatus) OnTransactionComplete

func (zcn *ZCNStatus) OnTransactionComplete(t *zcncore.Transaction, status int)

func (*ZCNStatus) OnVerifyComplete

func (zcn *ZCNStatus) OnVerifyComplete(t *zcncore.Transaction, status int)

func (*ZCNStatus) OnVoteComplete

func (zcn *ZCNStatus) OnVoteComplete(status int, proposal string, err string)

OnVoteComplete callback when a multisig vote is completed

func (*ZCNStatus) OnWalletCreateComplete

func (zcn *ZCNStatus) OnWalletCreateComplete(status int, wallet string, err string)

func (*ZCNStatus) Wait

func (zcn *ZCNStatus) Wait()

Jump to

Keyboard shortcuts

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