= IOTA Component
:doctitle: IOTA
:shortname: iota
:artifactid: camel-iota
:description: Manage financial transactions using IOTA distributed ledger.
:since: 2.23
:supportlevel: Stable
:component-header: Only producer is supported
//Manually maintained attributes
:camel-spring-boot-name: iota

*Since Camel {since}*

*{component-header}*

According to IOTA Official site: "IOTA is the first open-source distributed ledger that is being built to power the future of the Internet of Things with feeless microtransactions and data integrity for machines."

Maven users will need to add the following dependency to their `pom.xml`
for this component:

[source,xml]
------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-iota</artifactId>
    <version>x.y.z</version>
    <!-- use the same version as your Camel core version -->
</dependency>
------------------------------------------------------------


// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END

// endpoint options: START

// endpoint options: END


== Examples

The following route defined in Spring XML send a message to tangle

*Send message to tangle*

[source,xml]
----
<route>
  <from uri="direct:start" />
  <setMessage>
  	<constant>Hello world!</constant>
  </setMessage>
  <setHeader name="CamelIOTASeed">
  	<constant>MYSEEDHERE</constant>
  </setHeader>
  <setHeader name="CamelIOTAValue">
  	<constant>1</constant>
  </setHeader>
  <setHeader name="CamelIOTAToAddress">
  	<constant>RECIPIENTADDRESS</constant>
  </setHeader>
  <setHeader name="CamelIOTAToAddress">
  	<constant>RECIPIENTADDRESS</constant>
  </setHeader>
  <to uri="iota:good?url=https://node.iota.org:443&amp;operation=sendTransfer" />
  <to uri="direct:result" />
</route>
----

The following route defined in Spring XML create a new address

*Create a new address*

[source,xml]
----
<route>
  <from uri="direct:start" />
  <setHeader name="CamelIOTASeed">
  	<constant>MYSEEDHERE</constant>
  </setHeader>
  <setHeader name="CamelIOTAAddressIndex">
  	<constant>1</constant>
  </setHeader>
  <to uri="iota:good?url=https://node.iota.org:443&amp;operation=getNewAddress" />
  <to uri="direct:result" />
</route>
----

The following route defined in Spring XML retrieve transfers data

*Retrieve transfers*

[source,xml]
----
<route>
  <from uri="direct:start" />
  <setHeader name="CamelIOTASeed">
  	<constant>MYSEEDHERE</constant>
  </setHeader>
  <setHeader name="CamelIOTAAddressStartIndex">
  	<constant>1</constant>
  </setHeader>
  <setHeader name="CamelIOTAAddressEndIndex">
  	<constant>10</constant>
  </setHeader>
  <to uri="iota:good?url=https://node.iota.org:443&amp;operation=getTransfers" />
  <to uri="direct:result" />
</route>
----



include::spring-boot:partial$starter.adoc[]
