Documentation ¶
Index ¶
- func NewSwap(local *SwapParams, remote *SwapProfile, backend chequebook.Backend, ...) (self *swap.Swap, err error)
- type PayProfile
- type SwapParams
- func (self *SwapParams) Chequebook() *chequebook.Chequebook
- func (self *SwapParams) Init(contract common.Address, prvkey *ecdsa.PrivateKey)
- func (self *SwapParams) PrivateKey() *ecdsa.PrivateKey
- func (self *SwapParams) SetChequebook(ctx context.Context, backend chequebook.Backend, path string) error
- func (self *SwapParams) SetKey(prvkey *ecdsa.PrivateKey)
- type SwapProfile
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 SwapParams ¶
type SwapParams struct { *swap.Params *PayProfile }
func NewDefaultSwapParams ¶ added in v1.8.0
func NewDefaultSwapParams() *SwapParams
create params with default values
func (*SwapParams) Chequebook ¶
func (self *SwapParams) Chequebook() *chequebook.Chequebook
func (*SwapParams) Init ¶ added in v1.8.0
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 }
Click to show internal directories.
Click to hide internal directories.