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 Testnet Faucet.
Example Code
- Rust
- Typescript (Node.js)
- Python
The following example will:
- Instantiate a
Wallet, get Alice'sAccountwhich was created in the first guide and sync it. - Send a micro transaction using the
Account.send()function with theTransactionOption::allow_micro_amountset astrue.
The following example will:
- Instantiate a
Wallet, get Alice'sAccountwhich was created in the first guide and sync it. - Send a micro transaction using the
Account.send()function with theTransactionOption:allowMicroAmountset astrue.
The following example will:
- Instantiate a
Wallet, get Alice'sAccountwhich was created in the first guide and sync it. - Send a micro transaction using the
Account.send_with_params()function with theTransactionOption:allowMicroAmountset astrue.
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/advanced_transactions/send_micro_transaction.rs
loading...
bindings/nodejs/examples/how_tos/advanced_transactions/send_micro_transaction.ts
loading...
bindings/python/examples/how_tos/advanced_transactions/send_micro_transaction.py
loading...
Expected Output
Transaction sent: 0x4f04a922dcac8d22b95f1edb269a0aee056f2fa11bbcf0cbb408f937480e8119
Block included: https://explorer.shimmer.network/testnet/block/0xb7134950c962b88d280589e9431dcb70527c4cb72cb640e614c896643180007a