Skip to content

Instantly share code, notes, and snippets.

@jorisadri
Last active October 19, 2018 13:58
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/ba75b67684b2a1bc2af849cc70a7c4b5 to your computer and use it in GitHub Desktop.
Save jorisadri/ba75b67684b2a1bc2af849cc70a7c4b5 to your computer and use it in GitHub Desktop.
node-red-contrib-nem2 create multisig account example template

Description

Alt text

The flow will send a transaction to modify an account to multisig account.
It will also open two listeners.

  • Error listener.
  • Confirmed transaction listener

note: The publicAccounts needs to be send first.

Requirements

Mandatory

  • Public accounts
  • The publicKeys of the cosigners
  • account
  • privateKey of the account that will be transformed to a multisig account
  • modify multisig account transaction
  • min approval
  • minimum removal
  • Trigger
  • when the trigger is received a modify multisig account transaction is created witht the cosigners that where sent before.
  • announce transaction
  • url to a catapult server
  • listeners
  • url to a catapult server
[{"id":"1d167e0c.ae9522","type":"modifyMultisigAccount","z":"de7857c3.de9928","name":"","minApproval":"2","minRemoval":1,"remove":false,"trigger":"bundle","network":"2b9cf13.9eaf90e","x":761,"y":103,"wires":[["82e67973.579f48"]]},{"id":"8d835749.d68478","type":"account","z":"de7857c3.de9928","name":"account to multisig account","privateKey":"","network":"2b9cf13.9eaf90e","x":234,"y":241,"wires":[["5aa8c5c1.97e66c","f4e4d45c.60a948","fb8668a5.d05b08"]]},{"id":"53e5c7ed.6d6a78","type":"publicAccount","z":"de7857c3.de9928","name":"a cosigner publicKey","publicKey":"","network":"2b9cf13.9eaf90e","x":219,"y":105,"wires":[["1d167e0c.ae9522"]]},{"id":"8d8ce485.016ba8","type":"publicAccount","z":"de7857c3.de9928","name":"a cosigner publicKey","publicKey":"","network":"2b9cf13.9eaf90e","x":220,"y":170,"wires":[["1d167e0c.ae9522"]]},{"id":"5aa8c5c1.97e66c","type":"change","z":"de7857c3.de9928","name":"set trigger","rules":[{"t":"set","p":"nem.trigger","pt":"msg","to":"bundle","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":486,"y":198,"wires":[["1d167e0c.ae9522"]]},{"id":"82e67973.579f48","type":"signTransaction","z":"de7857c3.de9928","name":"","privateKey":"","network":"2b9cf13.9eaf90e","x":799,"y":170,"wires":[["a3c9670c.b88c98"]]},{"id":"a3c9670c.b88c98","type":"announce","z":"de7857c3.de9928","name":"","server":"551021ac.e378e","announceType":"announce","x":1032,"y":171,"wires":[[]]},{"id":"f4e4d45c.60a948","type":"listener","z":"de7857c3.de9928","name":"","server":"551021ac.e378e","address":"","listenerType":"confirmed","x":528,"y":270,"wires":[["453ed9dc.57a0d8"]]},{"id":"453ed9dc.57a0d8","type":"debug","z":"de7857c3.de9928","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":761,"y":270,"wires":[]},{"id":"fb8668a5.d05b08","type":"listener","z":"de7857c3.de9928","name":"","server":"551021ac.e378e","address":"","listenerType":"status","x":518.7777709960938,"y":331.88890171051025,"wires":[["6cdbfc6d.e4c5b4"]]},{"id":"6cdbfc6d.e4c5b4","type":"debug","z":"de7857c3.de9928","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":763.8888664245605,"y":331.8888883590698,"wires":[]},{"id":"2b9cf13.9eaf90e","type":"networkConfig","z":"","network":"MIJIN_TEST","customNetwork":""},{"id":"551021ac.e378e","type":"serverConfig","z":"","url":"http://localhost","customUrl":"","network":"2b9cf13.9eaf90e","port":"3000"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment