Request Funds
Once you have created your account,
you can start using the IOTA SDK for value transactions. Since these examples target the testnet, you can request funds
using the request_funds_from_faucet
function.
Online Faucet
You can request test funds from the Shimmer Testnet Faucet.
Example Code
- Rust
- Typescript (Node.js)
- Python
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Get all the
AccountAddress
related to theAccount
by calling theAccount.addresses()
function.
- Request funds to the
FAUCET_URL
you defined in the.env
file by calling theClient::utils::request_funds_from_faucet
function.
The following example will:
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Retrieve the first address related to Alice's account by calling the
Account.addresses()
function.
- Request funds to the
FAUCET_URL
you defined in the.env
file by calling theClient.requestFundsFromFaucet
function.
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Get all the
Addresses
related to theAccount
by calling theAccount.addresses()
function, and then select the first one.
- Request funds to the
FAUCET_URL
you defined in the.env
file by calling theClient.request_funds_from_faucet
function.
Expected Output
rms1qpjt6zr7rfvl27le5xjcv0qhr90l92wtm6eu6v6jhtgvrjp7mwufq6nqxn8
{"address":"rms1qpjt6zr7rfvl27le5xjcv0qhr90l92wtm6eu6v6jhtgvrjp7mwufq6nqxn8","waitingRequests":11}
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/simple_transaction/request_funds.rs
loading...
bindings/nodejs/examples/how_tos/simple_transaction/request-funds.ts
loading...
bindings/python/examples/how_tos/simple_transaction/request_funds.py
loading...