wallet

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultChainInterval      time.Duration = 30 * time.Second
	DefaultOperationsInterval time.Duration = 5 * time.Second
	DefaultAssetInfoInterval  time.Duration = 1 * time.Hour

	ConfirmedBlockCount   = 3 // number of confirmation to consider transaction complete
	UnconfirmedBlockCount = 6 // number of confirmation to continue fetching addressInfos

	AddressInfoMinConfirmation = 0
	AddressInfoMaxConfirmation = 9999
)

Variables

This section is empty.

Functions

func Models

func Models() []model.Model

func OptionArgs

func OptionArgs(args *WalletOptions)

Types

type ChainOption

type ChainOption struct {
	Chain    string `json:"chain"`
	HostName string `json:"hostname"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Pass     string `json:"pass"`
}

type ChainsOptions

type ChainsOptions struct {
	Chains []ChainOption `json:"chains"`
}

func (*ChainsOptions) Names

func (p *ChainsOptions) Names() []string

type Wallet

type Wallet int

func (*Wallet) GetAddressInfo

func (p *Wallet) GetAddressInfo(ctx context.Context, chainName, address string) (common.AddressInfo, error)

func (*Wallet) GetNewAddress

func (p *Wallet) GetNewAddress(ctx context.Context, chainName, account string) (string, error)

common.Chain interface

func (*Wallet) Run

func (p *Wallet) Run(ctx context.Context, options WalletOptions)

type WalletOptions

type WalletOptions struct {
	FileName string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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