12

Looking at MAM.ixi or Snapshot.ixi, I noticed that IXI Modules are written in Javascript but they are calling Java methods and using Java Classes by assignments like:

var Transaction = iri.controllers.TransactionViewModel;
var Address = iri.controllers.AddressViewModel;

Transaction.quietFromHash(IOTA.tangle, h)

Furthermore, the keywords IOTA, API and IXICycle can be used which probably has something to do with this.


Is there any documentation on this?
Is this IOTA-specific or a standardized technology and if it is, what's its name?
Are there tutorials or any other IXI Modules to look at?

Zauz
  • 4,454
  • 15
  • 42

1 Answers1

3

There are no official tutorials for the IXI modules yet. You can write javascript according to the "JavaScript Nashorn engine" specifications.

This is a good place to learn more about it: https://wiki.openjdk.java.net/display/Nashorn/Nashorn%3A+Articles%2C+Documents%2C+Slides+and+Videos

Since the IOTA/iota object (Iota.java) class is exposed, you can use all functionality from IRI inside an IXI module by importing classes/objects using the methods you described

var Transaction = iri.controllers.TransactionViewModel;

Iota actually updated the Snapshot.ixi, which may now provide a better example