Skip to content

plugins.aea-ledger-solana.aea_ledger_solana.faucet

This module contains the Faucet implementation for the solana ledger.

SolanaFaucetApi Objects

class SolanaFaucetApi(FaucetApi)

Solana testnet faucet API.

get_wealth

def get_wealth(address: Address, url: Optional[str] = None) -> None

Get wealth from the faucet for the provided address.

Arguments:

  • address: the address.
  • url: the url

try_get_wealth

@staticmethod
@try_decorator(
    "An error occurred while attempting to generate wealth:\n{}",
    logger_method="error",
)
def try_get_wealth(address: Address,
                   amount: Optional[int] = None,
                   url: Optional[str] = None) -> Optional[str]

Get wealth from the faucet for the provided address.

Arguments:

  • address: the address.
  • amount: optional int
  • url: the url

Returns:

optional string

generate_wealth_if_needed

@staticmethod
def generate_wealth_if_needed(api,
                              address,
                              min_amount=None) -> Union[str, None]

Check the balance prior to generating wealth.