Skip to content

Instantly share code, notes, and snippets.

@jorisadri
Last active October 15, 2018 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorisadri/3d87669bfc71e99f29f5ad82ba2a402e to your computer and use it in GitHub Desktop.
Save jorisadri/3d87669bfc71e99f29f5ad82ba2a402e to your computer and use it in GitHub Desktop.
node-red-contrib-nem2 create namespace example template

Description

Alt text

The flow will send a transaction to create a namespace and opens 2 listeners.

  • Error listener
  • Confirmed transaction listener

Requirements

Mandatory

  • account
  • privateKey with enough funds
  • createNamespaceTransaction
  • Namespace name
  • Duration expressed in NEM blockchain blocks
  • announce transaction
  • url to a catapult server
  • listeners
  • url to a catapult server
[{"id":"fc9e8e03.8125a","type":"account","z":"f3722a13.973058","name":"","privateKey":"","network":"f8cd9dfa.71927","x":244.44442749023438,"y":130,"wires":[["6425e053.78087","b3de129.e32a2f","83ce09b1.fad728"]]},{"id":"6425e053.78087","type":"createNamespace","z":"f3722a13.973058","name":"","namespace":"","duration":"1000","network":"f8cd9dfa.71927","x":494.4444274902344,"y":130,"wires":[["ea73090e.8372a8"]]},{"id":"ea73090e.8372a8","type":"signTransaction","z":"f3722a13.973058","name":"","privateKey":"","network":"f8cd9dfa.71927","x":744.4444274902344,"y":130,"wires":[["829d91fd.d3dc8"]]},{"id":"829d91fd.d3dc8","type":"announce","z":"f3722a13.973058","name":"","server":"551021ac.e378e","announceType":"announce","x":974.4444274902344,"y":130,"wires":[[]]},{"id":"b3de129.e32a2f","type":"listener","z":"f3722a13.973058","name":"listen for errors","server":"551021ac.e378e","address":"","listenerType":"status","x":459.4444274902344,"y":175,"wires":[["e44eb3b8.af433"]]},{"id":"e44eb3b8.af433","type":"debug","z":"f3722a13.973058","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":639.4444274902344,"y":175,"wires":[]},{"id":"83ce09b1.fad728","type":"listener","z":"f3722a13.973058","name":"","server":"551021ac.e378e","address":"","listenerType":"confirmed","x":469.4444274902344,"y":235,"wires":[["6e786e58.34d5d"]]},{"id":"6e786e58.34d5d","type":"debug","z":"f3722a13.973058","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":639.4444274902344,"y":235,"wires":[]},{"id":"f2ca1de4.51738","type":"comment","z":"f3722a13.973058","name":"Create namespace","info":"The flow will send a transaction to create a namespace and opens 2 listeners.\n\nError listener\nConfirmed transaction listener","x":240,"y":52.22221755981445,"wires":[]},{"id":"f8cd9dfa.71927","type":"networkConfig","z":"","network":"MIJIN_TEST","customNetwork":""},{"id":"551021ac.e378e","type":"serverConfig","z":"","url":"http://localhost","customUrl":"","network":"2b9cf13.9eaf90e","port":"3000"},{"id":"2b9cf13.9eaf90e","type":"networkConfig","z":"","network":"MIJIN_TEST","customNetwork":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment