Skip to main content

Send a Transaction

Once you have created your account and requested funds from the faucet you are ready to send your first transaction.

Online Faucet

You can request test funds from the Shimmer Testnet Faucet.

Iota.js

You can also find this guide in the native iota.js library

Code Example

The following example will:

  1. Create an account manager.
  2. Get Alice's account which was created in the first guide.
  3. Send 1 SMR to an address using the Account.send_amount(addresses_with_amount, options) function. Make sure to update the code sample to send to the address of your choice.
Dotenv

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

wallet/examples/05_transaction.rs
loading...

Run the example by running the following command:

cargo run --example transaction --release

Expected Output

Transaction: 0x6b05d2023a690e60464b507653601d990bacb3eada64e04981b7c3a417c07500
Block sent: http://localhost:14265/api/core/v2/blocks/0x1b6839d2de7a7d856ab2cd66a3325a8fe0618e2d5406d1295348133abd09ee8e