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...)
- composeAddress
- updateLeafToRoot
- getDigest
- prepare
- compose
- close (needs testing)
- applyTransfers
- appliedSignatures
- getDiff (not used at the moment)
- sign
- Clone repo
- Update maven ressources
- That's it.
- You can run a test transaction by running the main func in the Main Class.
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:
- clone js lib from the repo
git clone [email protected]:iotaledger/iota.flash.js.git
- inside the cloned project open the gulpfile.js and change dist task to this
By doing this we get a umd package which we can access from the global js context under the name `iotaFlash
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)) });
- Copy the file from
dist/iota.flash.js
of the js lib folder to this project underres/iota.flash.js
- Add
"use strict";
to the start of the file you just coppied (If you don't the V8 will complain). - That was it...
- 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