I have an idea for an IXI module that I'd like to try out, but I don't understand how I'm supposed to implement it.

I'd like to start with an example; what would an "Hello world!" version of an IXI module look like?

  • I don't know of any documentation for IXI modules (or whether the API is even considered stable). Generally, they are just JavaScript modules which use the Rhino JavaScript engine to directly call the Java methods of iri. There is the parsing of package.json etc implemented: github.com/iotaledger/iri/blob/… and here is a test case including a minimal ixi module: github.com/iotaledger/iri/blob/…
    – mihi
    Dec 10, 2017 at 21:16
  • Question edited to be more specific. Dec 11, 2017 at 7:25

1 Answer 1



{"main": "index.js"}


function hello_world_impl(req) {
    return com.iota.iri.service.dto.IXIResponse.create({greeting: "Hello, world!"});

API.put("helloWorld", new com.iota.iri.service.CallableRequest({call: hello_world_impl}));

How to call:

curl http://localhost:14700 -X POST -H 'X-IOTA-API-Version: 1.4.1' -H 'Content-Type: application/json' -d '{"command": "hello_world.helloWorld"}'


{"ixi":{"greeting":"Hello, world!"},"duration":2}

There is also Snapshot.ixi for a more realistic example.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.