Struct solana_faucet::faucet::Faucet [−][src]
pub struct Faucet { pub time_slice: Duration, // some fields omitted }
Fields
time_slice: Duration
Implementations
impl Faucet
[src]
impl Faucet
[src]pub fn new(
faucet_keypair: Keypair,
time_input: Option<u64>,
per_time_cap: Option<u64>,
per_request_cap: Option<u64>
) -> Self
[src]
faucet_keypair: Keypair,
time_input: Option<u64>,
per_time_cap: Option<u64>,
per_request_cap: Option<u64>
) -> Self
pub fn new_with_allowed_ips(
faucet_keypair: Keypair,
time_input: Option<u64>,
per_time_cap: Option<u64>,
per_request_cap: Option<u64>,
allowed_ips: HashSet<IpAddr>
) -> Self
[src]
faucet_keypair: Keypair,
time_input: Option<u64>,
per_time_cap: Option<u64>,
per_request_cap: Option<u64>,
allowed_ips: HashSet<IpAddr>
) -> Self
pub fn check_time_request_limit<T: LimitByTime + Display>(
&mut self,
request_amount: u64,
to: T
) -> Result<(), FaucetError>
[src]
&mut self,
request_amount: u64,
to: T
) -> Result<(), FaucetError>
pub fn clear_caches(&mut self)
[src]
pub fn build_airdrop_transaction(
&mut self,
req: FaucetRequest,
ip: IpAddr
) -> Result<FaucetTransaction, FaucetError>
[src]
&mut self,
req: FaucetRequest,
ip: IpAddr
) -> Result<FaucetTransaction, FaucetError>
Checks per-request and per-time-ip limits; if both pass, this method returns a signed
SystemProgram::Transfer transaction from the faucet keypair to the requested recipient. If
the request exceeds this per-request limit, this method returns a signed SPL Memo
transaction with the memo: “request too large; req:
pub fn process_faucet_request(
&mut self,
bytes: &[u8],
ip: IpAddr
) -> Result<Vec<u8>, FaucetError>
[src]
&mut self,
bytes: &[u8],
ip: IpAddr
) -> Result<Vec<u8>, FaucetError>
Deserializes a received airdrop request, and returns a serialized transaction
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Faucet
impl RefUnwindSafe for Faucet
impl UnwindSafe for Faucet
impl UnwindSafe for Faucet
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,