Skip to main content
Version: IOTA

Send a Signed Transaction

A SignedTransaction is a core payload type that is used to send value-based messages as Unspent Transaction Output (UTXO). This core payload changes the ledger state as it spends "old" outputs and replaces them with new outputs.

info

Though it is possible to send transactions with iota.rs, we strongly recommend that you use the official wallet.rs library together with the stronghold.rs enclave for value-based transfers. This combination incorporates the best security practices while dealing with seeds, related addresses, and UTXO.

Sending value-based messages is a very straightforward process if you use the ClientMessageBuilder helper class. You will only need to provide a valid seed by chaining a call to .withSeed(seed: String), and output addresses and amount by chaining a call to withOutput(address: String, amount: long):. The method will find valid output(s) that can be used to fund the given amount(s) and the unspent amount will be sent to the same address.

bindings/java/examples/java-app/src/main/java/org/iota/client/example/ExampleApp.java
loading...
Dust Protection

Due to the dust protection mechanism implemented in the network protocol, microtransactions below 1Mi of IOTA tokens can only be sent to another address if there is already at least 1Mi on that address

That's why the code in the example sent 1Mi, to comply with the protection.