Skip to main content

Send a Micro Transaction

If you need to send an amount below the minimum storage deposit, you should use a microtransaction.

Online Faucet

You can request test funds from the Shimmer Testnet Faucet.

Code Example

The following example will:

  1. Create an account manager.
  2. Get Alice's account which was created in the first guide.
  3. Create the outputs for a microtransaction.
  4. Send the micro-microtransaction using the Account.send_micro_transaction(addresses_with_micro_amount, options) function.
Dotenv

This example uses dotenv, which is not safe for use in production environments.

wallet/examples/06_send_micro_transaction.rs
loading...

Run the example by running the following command:

cargo run --example send_micro_transaction --release

Expected Output

Transaction: 0x78abf6499023396fa9510155237542500015da882e2676bc9e5cd8280e3c15e6
Block sent: http://localhost:14265/api/core/v2/blocks/0xe601e25316c17c9aaa19de881aacd55ac270bc99697d34c4a9f4e57edf10cbe2