Skip to main content

Send a Micro Transaction

Any transaction with an amount that is below the minimum storage deposit is considered a microtransaction.

The IOTA SDK has a convenient TransactionOption called allowMicroAmount to help you easily send a microtransaction.

Online Faucet

You can request test funds from the Shimmer Testnet Faucet.

Example Code

The following example will:

  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.
  2. Send a micro transaction using the Account.send() function with the TransactionOption::allow_micro_amount set as true.
sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs
loading...

Full Example Code

sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs
loading...

Expected Output

Transaction sent: 0x4f04a922dcac8d22b95f1edb269a0aee056f2fa11bbcf0cbb408f937480e8119
Block included: https://explorer.shimmer.network/testnet/block/0xb7134950c962b88d280589e9431dcb70527c4cb72cb640e614c896643180007a