Skip to content

Api faucet

syl edited this page Oct 31, 2020 · 6 revisions

Functions

claim

Signature

pplx::task<web::http::http_response>
claim(const claim_request& claim_request);

Description

Requests the faucet API to get test coins like RICK or MORTY. A task containing a http_response is returned. It takes a claim_request_structure as first parameter.

get_claim_result

Signature

[[nodiscard]]
claim_result get_claim_result(const web::http::http_response& claim_response);

Description

Returns a valid claim_result object corresponding to the response returned by the claim function.

Structures

claim_request

std::string coin_name      // Name of the test coin used for faucet claiming (e.g. "RICK")
std::string wallet_address // Address of the chosen test coin wallet

claim_result

std::string message; // The message returned by the claim request.
std::string status;  // The status returned by the claim request.