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.
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
.
- Java
- Nodejs
- Python
- Rust
- Wasm
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.
loading...
Sending value-based messages is a very straightforward process if you use the
MessageSender
helper class. You will only need to provide a valid
seed by chaining a call to .seed(seed: string)
, and an
output address and amount by chaining a call to
.output(address: string, amount: string)
. 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.
loading...
Sending value-based messages is a very straightforward process. You will only need to provide a valid seed
, outputs
(addresses and amounts) parameters to the
Client.message()
function. The method will find valid output(s) that can be used to fund the given amount(s) and the remaining amount will
be sent back the input address.
loading...
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
.with_seed(seed: &'a Seed)
, and
output address and amount by chaining a call to
.with_output(address: &str, amount: u64)
.
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.
loading...
Sending value-based messages is a very straightforward process if you use the
MessageBuilder
helper class. You will only need to provide a valid seed by chaining a call to
.seed(seed: string)
and
an output address and amount by chaining a call to .output(address: string, amount: BigInt)
. 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.
loading...
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.