Documentation
¶
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 wraps the Nitrolite SDK client for faucet operations.
func NewClient ¶
func NewClient(logger log.Logger, privateKeyHex, nitronodeURL, tokenSymbol string, tipAmount decimal.Decimal, minTransferCount int) (*Client, error)
NewClient creates a Client that wraps the Nitrolite SDK for faucet operations. privateKeyHex drives both message signing and tx signing. nitronodeURL is the WebSocket endpoint. The client is immediately connected and ready to use.
func (*Client) Close ¶
Close shuts down the Nitronode connection. Uses write lock to serialise with reconnect and prevent closing a freshly installed client.
func (*Client) EnsureConnected ¶
EnsureConnected checks the connection and reconnects with exponential backoff if necessary.
func (*Client) EnsureOperational ¶
EnsureOperational validates token support and sufficient balance.
func (*Client) GetOwnerAddress ¶
GetOwnerAddress returns the faucet owner's Ethereum address. Derived from the immutable raw signer; cached at construction so no lock is needed.
type TransferResult ¶
TransferResult holds the result of a token transfer.