faucet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package faucet provides functionality to find and interact with a faucet account in a blockchain. It offers utilities for locating the faucet account with the highest balance and retrieving its private key. The faucet account is typically used for distributing tokens to users during testing or development phases.

Index

Constants

This section is empty.

Variables

View Source
var ErrAccountNotFound = errors.New("faucet account not found")

ErrAccountNotFound is returned when the faucet account is not found.

Functions

func FindAccount

func FindAccount(c *chain.Chain) (*ecdsa.PrivateKey, error)

FindAccount finds the faucet account in the given chain and returns its private key. It selects the wealthiest account with a valid private key present in the chain's genesis allocation. If no valid faucet account is found, it returns ErrAccountNotFound.

Types

This section is empty.

Jump to

Keyboard shortcuts

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