pub struct CreateAccountByFaucet {
pub new_account_id: AccountId,
pub public_key: PublicKey,
}Fields§
§new_account_id: AccountId§public_key: PublicKeyImplementations§
Source§impl CreateAccountByFaucet
impl CreateAccountByFaucet
Sourcepub async fn send_to_testnet_faucet(self) -> Result<Response, FaucetError>
pub async fn send_to_testnet_faucet(self) -> Result<Response, FaucetError>
Sends the account creation request to the default testnet faucet service.
The account will be created as a sub-account of the testnet account
Sourcepub async fn send_to_config_faucet(
self,
config: &NetworkConfig,
) -> Result<Response, FaucetError>
pub async fn send_to_config_faucet( self, config: &NetworkConfig, ) -> Result<Response, FaucetError>
Sends the account creation request to the faucet service specified in the network config. This way you can specify your own faucet service.
The function sends the request in the following format:
{
"newAccountId": "new_account_id",
"newAccountPublicKey": "new_account_public_key"
}Sourcepub async fn send_to_faucet(self, url: &Url) -> Result<Response, FaucetError>
pub async fn send_to_faucet(self, url: &Url) -> Result<Response, FaucetError>
Sends the account creation request to the faucet service specified by the URL.
The function sends the request in the following format:
{
"newAccountId": "new_account_id",
"newAccountPublicKey": "new_account_public_key"
}Trait Implementations§
Source§impl Clone for CreateAccountByFaucet
impl Clone for CreateAccountByFaucet
Source§fn clone(&self) -> CreateAccountByFaucet
fn clone(&self) -> CreateAccountByFaucet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CreateAccountByFaucet
impl RefUnwindSafe for CreateAccountByFaucet
impl Send for CreateAccountByFaucet
impl Sync for CreateAccountByFaucet
impl Unpin for CreateAccountByFaucet
impl UnwindSafe for CreateAccountByFaucet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more