Node.js wrapper for iota.lib.js running in docker container
264
Github: https://github.com/alekserok/iota-node-middleware
This image is developed to simplify interaction between running iota node and any other application. It wraps methods "getInputs", "getNewAddress", "getNodeInfo", "sendTransfer" of standard iota.lib.js library.
docker-compose example
iota-node-middleware:
image: alekserok/iota-node-middleware
container_name: someservice-iota-node-middleware
environment:
- PORT=3000
- IOTA_PROVIDER=http://user:password@iotaledger:14265
ports:
- "3000:3000"
where PORT is the port where middleware is listening to requests and IOTA_PROVIDER is running iri node (username and password is optional).
(get node info)
{}
{
"appName": "IRI",
"appVersion": "1.5.3",
"jreAvailableProcessors": 6,
"jreFreeMemory": 3580485960,
"jreVersion": "1.8.0_181",
"jreMaxMemory": 11464605696,
"jreTotalMemory": 8248098816,
"latestMilestone": "ZWHYJJZEMQHPUHBIAR9LZZAN9EVWRSPQCKKPJMDZERSPOUSRVIKXPOYWKBRXNHTW9IJTPSFEWKPW99999",
"latestMilestoneIndex": 718740,
"latestSolidSubtangleMilestone": "ZWHYJJZEMQHPUHBIAR9LZZAN9EVWRSPQCKKPJMDZERSPOUSRVIKXPOYWKBRXNHTW9IJTPSFEWKPW99999",
"latestSolidSubtangleMilestoneIndex": 718740,
"milestoneStartIndex": 338000,
"neighbors": 9,
"packetsQueueSize": 0,
"time": 1535463191983,
"tips": 5880,
"transactionsToRequest": 146,
"duration": 0
}
(get account addresses balances)
{
"seed":"CDKCXTOZHJRLQVUPHWXRNRYWWOQQYKYLSUNBHZUKPEPKDOK9JMQHUPL9RHVLJJZQRLMMZOSLRZMBBBAGH
}
{
"inputs": [
{
"address": "DIWKWXULSJYCFSRQVCBQTETV9VEDBHRINXEBYNTFFDBZNGYSSSOYPPONMLOHZMQVRASWFQLGAJTSRSEZC",
"balance": 24,
"keyIndex": 2,
"security": 2
}
],
"totalBalance": 24
}
(get new address)
{
"seed":"CDKCXTOZHJRLQVUPHWXRNRYWWOQQYKYLSUNBHZUKPEPKDOK9JMQHUPL9RHVLJJZQRLMMZOSLRZMBBBAGH
}
"MKTBFNNWXGPXPX9UWGHFL9VTOSTVCWDIFORQFWEIVEFCQWSWQOBRWJUCAKHJNHDIRZDOHXIHLSGVXTRJC9KMJEZZOX"
(send transfer)
{
"seed":"CDKCXTOZHJRLQVUPHWXRNRYWWOQQYKYLSUNBHZUKPEPKDOK9JMQHUPL9RHVLJJZQRLMMZOSLRZMBBBAGH",
"address":"MKTBFNNWXGPXPX9UWGHFL9VTOSTVCWDIFORQFWEIVEFCQWSWQOBRWJUCAKHJNHDIRZDOHXIHLSGVXTRJC9KMJEZZOX",
"amount":"1",
"commissionAddress": "optional address to take comission for transactions",
"commission": optional commission value
}
"VEULCWUPDMBEEG9SCJLETIEFDLOIURNFTSOXOEUAHJVOYLPLAWJVHPXMKSJDKFXOPLAR9PCLFPKEZ9999"
Content type
Image
Digest
Size
257 MB
Last updated
about 8 years ago
docker pull alekserok/iota-node-middleware