swap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: GPL-3.0, GPL-3.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSwap

func NewSwap(local *SwapParams, remote *SwapProfile, backend chequebook.Backend, proto swap.Protocol) (self *swap.Swap, err error)

Types

type PayProfile

type PayProfile struct {
	PublicKey   string         // check against signature of promise
	Contract    common.Address // address of chequebook contract
	Beneficiary common.Address // recipient address for swarm sales revenue
	// contains filtered or unexported fields
}

type SwapParams

type SwapParams struct {
	*swap.Params
	*PayProfile
}

func NewDefaultSwapParams

func NewDefaultSwapParams() *SwapParams

create params with default values

func (*SwapParams) Chequebook

func (self *SwapParams) Chequebook() *chequebook.Chequebook

func (*SwapParams) Init

func (self *SwapParams) Init(contract common.Address, prvkey *ecdsa.PrivateKey)

this can only finally be set after all config options (file, cmd line, env vars) have been evaluated

func (*SwapParams) PrivateKey

func (self *SwapParams) PrivateKey() *ecdsa.PrivateKey

func (*SwapParams) SetChequebook

func (self *SwapParams) SetChequebook(ctx context.Context, backend chequebook.Backend, path string) error

setChequebook(path, backend) wraps the chequebook initialiser and sets up autoDeposit to cover spending.

func (*SwapParams) SetKey

func (self *SwapParams) SetKey(prvkey *ecdsa.PrivateKey)

type SwapProfile

type SwapProfile struct {
	*swap.Profile
	*PayProfile
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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