Skip to main content

IFaucetClient

Namespace: IotaSdk

public interface IFaucetClient

Attributes NullableContextAttribute

Methods

Request(Address)

Request gas from the faucet. Note that this will return the UUID of the request and not wait until the token is received. Use request_and_wait to wait for the token.

Task<string?> Request(Address address)

Parameters

address Address

Returns

Task<String>

Exceptions

SdkFfiException

RequestAndWait(Address)

Request gas from the faucet and wait until the request is completed and token is transferred. Returns FaucetReceipt if the request is successful, which contains the list of tokens transferred, and the transaction digest.

Note that the faucet is heavily rate-limited, so calling repeatedly the faucet would likely result in a 429 code or 502 code.

If you intend to use the transferred tokens with the graphql client, consider using request_and_wait_for_finalized instead to ensure the tokens are available in the indexer.

Task<FaucetReceipt?> RequestAndWait(Address address)

Parameters

address Address

Returns

Task<FaucetReceipt>

Exceptions

SdkFfiException

RequestAndWaitForFinalized(Address, GraphQlClient)

Request gas from the faucet and wait until the request is completed and token is transferred and finalized on the ledger. Returns FaucetReceipt if the request is successful, which contains the list of tokens transferred, and the transaction digest.

This is a convenience method that combines request_and_wait and waiting for the funding transactions to be finalized using the provided GraphQL Client.

Task<FaucetReceipt?> RequestAndWaitForFinalized(Address address, GraphQlClient client)

Parameters

address Address

client GraphQlClient

Returns

Task<FaucetReceipt>

Exceptions

SdkFfiException

RequestStatus(String)

Check the faucet request status.

Possible statuses are defined in: BatchSendStatusType

Task<BatchSendStatus?> RequestStatus(string id)

Parameters

id String

Returns

Task<BatchSendStatus>

Exceptions

SdkFfiException