faucet

package
v0.0.0-...-9742f5a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FAUCET_COIN_AMOUNT = 1337
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	common.StarterShutdowner
}

func NewApplication

func NewApplication(l *logrus.Logger, p *Faucet, db *sql.DB, conf *ConfigFile) (Application, error)

XXX: Should this take p as an argument, or be responsible for setting it up?

type ConfigFile

type ConfigFile struct {
	FaucetAddr string
	LedgerAddr string

	Database     string        `json:"database"`
	SyncInterval time.Duration `json:"sync_interval"`
	Insecure     bool          `json:"insecure"`
}

type Faucet

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

func NewFaucet

func NewFaucet(l *logrus.Logger, wallet *wallet.Wallet) (*Faucet, error)

func (*Faucet) FetchBlocks

func (f *Faucet) FetchBlocks(ctx context.Context) error

func (*Faucet) SendCoins

func (f *Faucet) SendCoins(ctx context.Context, target ledger.Address, amount uint32) error

func (*Faucet) SyncChain

func (f *Faucet) SyncChain(ctx context.Context, syncInterval time.Duration)

Jump to

Keyboard shortcuts

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