client

package
v0.0.0-...-6d19cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func StartClient

func StartClient(ctx context.Context, cfg ClientConfig) (*Client, error)

func (*Client) Account

func (c *Client) Account() *simple.Account

func (*Client) Address

func (c *Client) Address() common.Address

func (*Client) Connect

func (c *Client) Connect(ctx context.Context, peer wire.Address, balance channel.Bal) (*connection.Connection, error)

func (*Client) Logf

func (c *Client) Logf(format string, v ...interface{})

func (*Client) NextConnectionRequest

func (c *Client) NextConnectionRequest(ctx context.Context) (*connection.ConnectionRequest, error)

func (*Client) OnChainBalance

func (c *Client) OnChainBalance() (b *big.Int, err error)

func (*Client) PerunAddress

func (c *Client) PerunAddress() wallet.Address

func (*Client) Shutdown

func (c *Client) Shutdown()

type ClientConfig

type ClientConfig struct {
	perun.ClientConfig
	ChallengeDuration time.Duration
	AppAddress        common.Address
}

type PaymentAcceptancePolicy

type PaymentAcceptancePolicy = func(
	amount *big.Int,
	collateral *big.Int,
	funding *big.Int,
	balance *big.Int,
	hasOverdrawn bool,
) (ok bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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