near/near-cli-rs

Replace current NEAR Helper service with near-faucet.io

Opened this issue · 2 comments

frol commented

Let's standardize a Faucet Interface and switch to using near-faucet.io

@flmel Can near-faucet.io create accounts with preloaded NEAR similar to how we currently use NEAR Helper endpoint?

Hey @frol I'm not exactly familiar how the current helper works, but the faucet and its web application have proven stable so I don't see complications doing so. However, the reserve of testnet tokens will deplete so there would be allocation needed.

frol commented

@flmel we just make a POST call to the helper with the following JSON data:

let mut data = std::collections::HashMap::new();
data.insert("newAccountId", new_account_id.to_string());
data.insert("newAccountPublicKey", public_key.to_string());
let client = reqwest::blocking::Client::new();
let result = client.post(faucet_service_url.clone()).json(&data).send();

Here is the URL we currently use:

faucet_url: Some("https://helper.nearprotocol.com/account".parse().unwrap()),

It would be great to replace only the URL. Would it be possible to make sure that Faucet Service endpoint supports the parameters?