credit

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package credit describes the types and methods to interact with the credits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Balance fetches the current balance of credits.
	Balance(ctx context.Context) (*big.Int, error)

	// Balance fetches the current balance of credits.
	BalanceOf(ctx context.Context, address common.Address) (*big.Int, error)

	// Transfer tranfers credits from one address to another.
	Transfer(ctx context.Context, to common.Address, amount *big.Int) error

	// ReduceToBalance reduces a channel of transfers into balance.
	ReduceToBalance(
		ctx context.Context,
		transfers <-chan types.Transfer,
	) (<-chan *big.Int, error)
}

Manager handles the credits of the user.

Jump to

Keyboard shortcuts

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