Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSolanaFilePath ¶
func GetSolanaFilePath() string
GetSolanaFilePath returns path to .cwt file from configuration
func GetSolanaPasswordBytes ¶
GetSolanaPasswordBytes returns the password stored in memory (from PromptForPassword). Returns an error if the password was not set. Caller must zero the returned slice after use for security.
func GetSolanaRPCURL ¶
func GetSolanaRPCURL() string
GetSolanaRPCURL returns Solana RPC URL from configuration
func PromptForPassword ¶
func PromptForPassword() error
PromptForPassword prompts the user for the wallet password in the terminal. The password is read without echoing (hidden input) and stored in memory. Call this at startup before the server begins handling requests.
Types ¶
type Config ¶
type Config struct {
Port string `envconfig:"PORT" default:"8080"`
SolanaFilePath string `envconfig:"SOLANA_FILE_PATH" required:"true"`
SolanaRPCURL string `envconfig:"SOLANA_RPC_URL" default:"https://api.mainnet-beta.solana.com"`
}
Config contains all configuration parameters for the application. Note: Password is prompted at runtime and stored in memory - use GetSolanaPasswordBytes()