Go to file
2018-01-24 23:44:14 +01:00
gradle/wrapper Switched to gradle project 2018-01-20 16:12:49 +01:00
src/main Minor usability tweaks 2018-01-24 23:44:14 +01:00
.gitignore Updated ignores to include gradle and build 2018-01-20 16:12:10 +01:00
build.gradle Added iota trytes conversion and transfer, merged some model objects with jota.model objects, small cleanup 2018-01-21 00:20:13 +01:00
gradlew Switched to gradle project 2018-01-20 16:12:49 +01:00
gradlew.bat Switched to gradle project 2018-01-20 16:12:49 +01:00
iota.flash.lib.js.wrapper.iml Switched to gradle project 2018-01-20 16:12:49 +01:00
iota.flash.lib.js.wrapper.ipr Switched to gradle project 2018-01-20 16:12:49 +01:00
iota.flash.lib.js.wrapper.iws Switched to gradle project 2018-01-20 16:12:49 +01:00
LICENSE.md Created IOTA Java wrapper for js lib 2018-01-05 01:03:49 +01:00
pom.xml Mavend aar test 2018-01-20 16:13:02 +01:00
README.md added label 2018-01-15 18:20:41 +01:00
settings.gradle Switched to gradle project 2018-01-20 16:12:49 +01:00

IOTA Flash Channel Java Wrapper

This wrapper allows the usage of iota.flash.js lib directly in Java. This is achieved by running the iota.flash.js script and all dependencies (modified build of iota.flash.js) in the V8 engine (using J2V8 bindings for V8). If you have any ideas please submit a request (I am totally not a Java guy so...)

iota.flash.js coverage

Multisig

  • composeAddress
  • updateLeafToRoot
  • getDigest

Transfer

  • prepare
  • compose
  • close (needs testing)
  • applyTransfers
  • appliedSignatures
  • getDiff (not used at the moment)
  • sign

Installation

  1. Clone repo
  2. Update maven ressources
  3. That's it.
  4. You can run a test transaction by running the main func in the Main Class.

Updating iota.flash.js

I will try to update the iota.flash.js as often as I can till it is automated. To manually update the lib do the following:

  1. clone js lib from the repo git clone git@github.com:iotaledger/iota.flash.js.git
  2. inside the cloned project open the gulpfile.js and change dist task to this
    gulp.task('dist', () => {
      return gulp.src('lib/flash.js')
        .pipe(webpack({
          output: {
            filename: 'iota.flash.js',
            libraryTarget: 'umd',
            library: 'iotaFlash',
            umdNamedDefine: true
          }
        }))
        .pipe(gulp.dest(DEST))
    });
    
    By doing this we get a umd package which we can access from the global js context under the name `iotaFlash
  3. Copy the file from dist/iota.flash.js of the js lib folder to this project under res/iota.flash.js
  4. Add "use strict";to the start of the file you just coppied (If you don't the V8 will complain).
  5. That was it...

TODO

  • write documentation
  • add some testing
  • add a way to update iota.flash.js from the repo without manual steps
  • cleanup maven
  • makte this project a easy to import lib