distributor

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 10 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 interface {
	GetAccount(address string) (*gnoland.GnoAccount, error)
	BroadcastTransaction(tx *std.Tx) error
}

type Distributor

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

Distributor is the process that manages sub-account distributions

func NewDistributor

func NewDistributor(
	cli Client,
	signer Signer,
) *Distributor

NewDistributor creates a new instance of the distributor

func (*Distributor) Distribute

func (d *Distributor) Distribute(
	accounts []keys.Info,
	transactions uint64,
) ([]*gnoland.GnoAccount, error)

Distribute distributes the funds from the base account (account 0 in the mnemonic) to other subaccounts

type Signer

type Signer interface {
	SignTx(tx *std.Tx, account *gnoland.GnoAccount, nonce uint64, passphrase string) error
}

Jump to

Keyboard shortcuts

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