Documentation
¶
Overview ¶
Package faucet mines a PoWFaucet agent-REST challenge and claims the reward for a target address, with no browser, WebSocket, or captcha.
It requires the faucet's PoW to be Argon2id (type 2) at version 19 — the standard variant implemented by golang.org/x/crypto/argon2 — so mining runs natively with no cgo and no external dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client drives the PoWFaucet agent-REST flow over a Transport.
func New ¶
New returns a Client that talks directly to a faucet base URL, e.g. https://faucet-agents.<network>.ethpandaops.io. Used by tests and direct use.
func NewWithTransport ¶
NewWithTransport returns a Client that issues requests through t (e.g. the proxy-routed transport used by the evm.faucet server operation).
type Result ¶
type Result struct {
Session string `json:"session"`
Target string `json:"target"`
ClaimHash string `json:"claim_hash"`
AmountWei string `json:"amount_wei"`
}
Result is the outcome of a successful claim.
type Transport ¶
type Transport interface {
Do(ctx context.Context, method, path string, body []byte) (respBody []byte, status int, err error)
}
Transport issues one faucet HTTP request and returns the response body and status code. It lets the mining flow run either against a faucet URL directly (tests, CLI) or through the panda proxy — the only authenticated network path in production, so the faucet needs no public surface.