dwfclient

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0, BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DWFClient

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

func NewClient

func NewClient(nodeClient nodeclient.NodeClient, waspApiHost string, scAddress *address.Address, sigScheme signaturescheme.SignatureScheme) *DWFClient

func (*DWFClient) Donate

func (client *DWFClient) Donate(par DonateParams) (*sctransaction.Transaction, error)

func (*DWFClient) FetchStatus

func (client *DWFClient) FetchStatus() (*Status, error)

func (*DWFClient) Withdraw

func (client *DWFClient) Withdraw(par WithdrawParams) (*sctransaction.Transaction, error)

type DonateParams

type DonateParams struct {
	Amount            int64
	Feedback          string
	WaitForCompletion bool
	PublisherHosts    []string
	PublisherQuorum   int
	Timeout           time.Duration
}

type Status

type Status struct {
	*waspapi.SCStatus

	NumRecords      uint32
	FirstDonated    time.Time
	LastDonated     time.Time
	MaxDonation     int64
	TotalDonations  int64
	LastRecordsDesc []*donatewithfeedback.DonationInfo
}

type WithdrawParams

type WithdrawParams struct {
	Amount            int64
	WaitForCompletion bool
	PublisherHosts    []string
	PublisherQuorum   int
	Timeout           time.Duration
}

Jump to

Keyboard shortcuts

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