settlement

package
v0.0.0-...-9fdd194 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPeerNoSettlements = errors.New("no settlements for peer")
)

Functions

This section is empty.

Types

type Accounting

type Accounting interface {
	Settle(peer string, amount *big.Int, contractId string, token common.Address) error
	NotifyPaymentReceived(peer string, amount *big.Int, token common.Address) error
	NotifyPaymentSent(peer string, amount *big.Int, receivedError error, token common.Address)
}

type Interface

type Interface interface {
	// TotalSent returns the total amount sent to a peer
	TotalSent(peer string) (totalSent *big.Int, err error)
	// TotalReceived returns the total amount received from a peer
	TotalReceived(peer string) (totalSent *big.Int, err error)
	// SettlementsSent returns sent settlements for each individual known peer
	SettlementsSent() (map[string]*big.Int, error)
	// SettlementsReceived returns received settlements for each individual known peer
	SettlementsReceived() (map[string]*big.Int, error)
}

Interface is the interface used by Accounting to trigger settlement

Jump to

Keyboard shortcuts

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