faucet

package
v0.0.0-...-c094c7e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeOpen      = "open"
	AuthTypeOauth     = "oauth"
	AuthTypeAragonDao = "aragondao"
	AuthTypeStripe    = "stripe"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTypes

type AuthTypes struct {
	AuthTypes   map[string]uint64 `json:"auth"`
	WaitSeconds uint64            `json:"waitSeconds"`
}

AuthTypes is a struct to return the supported authentication types.

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Faucet

type Faucet struct {
	Signer     *ethereum.SignKeys
	AuthTypes  map[string]uint64
	WaitPeriod time.Duration
	Storage    *storage.Storage
}

func (*Faucet) PrepareFaucetPackageWithAmount

func (f *Faucet) PrepareFaucetPackageWithAmount(toAddr common.Address, amount uint64) (*vFaucet.FaucetResponse, error)

PrepareFaucetPackageWithAmount prepares a Faucet package, including the signature, for the given address. Returns the Faucet package as a marshaled json byte array, ready to be sent to the user.

func (*Faucet) RegisterHandlers

func (f *Faucet) RegisterHandlers(api *apirest.API)

Register the handlers URLs

Jump to

Keyboard shortcuts

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