wallet

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

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

	DefaultBatchInterval time.Duration = 1 * time.Minute

	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 SsmChain added in v0.0.5

type SsmChain struct {
	Device           string `json:"device"`
	Chain            string `json:"chain"`
	Fingerprint      string `json:"fingerprint"`
	DerivationPrefix string `json:"derivation_prefix"`
}

type SsmOption added in v0.0.5

type SsmOption struct {
	Name     string `json:"name"`
	Endpoint string `json:"endpoint"`
}

type SsmOptions added in v0.0.5

type SsmOptions struct {
	Ssm struct {
		Devices []SsmOption `json:"devices"`
		Chains  []SsmChain  `json:"chains"`
	} `json:"ssm"`

	TorProxy string `json:"tor_proxy"`
}

func (*SsmOptions) Devices added in v0.0.5

func (p *SsmOptions) Devices() []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) ImportAddress added in v0.0.5

func (p *Wallet) ImportAddress(ctx context.Context, chainName, account, address, pubkey, blindingkey string) error

func (*Wallet) Run

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

type WalletOptions

type WalletOptions struct {
	FileName string
	Mode     string
}

Directories

Path Synopsis
cmd
ssm

Jump to

Keyboard shortcuts

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