swap

package
v0.0.0-...-f8b7a73 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSwap

func NewSwap(localProfile *LocalProfile, remoteProfile *RemoteProfile, backend chequebook.Backend, proto swap.Protocol) (swapInstance *swap.Swap, err error)

Newswp构造函数,参数 *全球支票簿,承担部署服务和 *余额处于缓冲状态。 在netstore中调用swap.add(n) n>0发送块时调用=接收检索请求 或者寄支票。 n<0在接收数据块时调用=接收传递响应 或者收到支票。

Types

type LocalProfile

type LocalProfile struct {
	*swap.Params
	*PayProfile
}

localprofile将payprofile与*swap.params组合在一起

func NewDefaultSwapParams

func NewDefaultSwapParams() *LocalProfile

newdefaultswapparams使用默认值创建参数

func (*LocalProfile) Chequebook

func (lp *LocalProfile) Chequebook() *chequebook.Chequebook

从本地配置文件获取支票簿

func (*LocalProfile) Init

func (lp *LocalProfile) Init(contract common.Address, prvkey *ecdsa.PrivateKey)

init这只能在所有配置选项(file、cmd line、env vars)之后设置。 已经过评估

func (*LocalProfile) PrivateKey

func (lp *LocalProfile) PrivateKey() *ecdsa.PrivateKey

私钥访问器

func (*LocalProfile) SetChequebook

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

setcheckbook包装支票簿初始化器并设置自动报告以覆盖支出。

func (*LocalProfile) SetKey

func (lp *LocalProfile) SetKey(prvkey *ecdsa.PrivateKey)

本地配置文件上的set key集的私钥和公钥

type PayProfile

type PayProfile struct {
	PublicKey   string         //与承诺的签署核对
	Contract    common.Address //支票簿合同地址
	Beneficiary common.Address //Swarm销售收入的收件人地址
	// contains filtered or unexported fields
}

PayProfile是相关支票簿和受益人选项的容器。

type RemoteProfile

type RemoteProfile struct {
	*swap.Profile
	*PayProfile
}

RemoteProfile将PayProfile与*swap.profile结合在一起。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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