node-red-contrib-nem2 cosign multisig transaction example template

Description

Alt text

The flow will retrieve all the aggregate transactions from a multisig account that are not cosigned. It checks if the account already cosigned, if not, the flow will create a cosign transaction and announce it to the network.
It will also opens two listeners.

  • Error listener.
  • Confirmed transaction listener

Requirements

Mandatory

  • public account
    • The publicKey of the multisig account
  • account
    • privateKey of the cosigner account that will cosign the transaction
  • announce transaction
    • url to a catapult server
  • listeners
    • url to a catapult server
[{"id":"a5551edb.ab1e9","type":"transactions","z":"d547a10b.4b6ac","name":"","publicKey":"","server":"551021ac.e378e","allTransactions":true,"pageSize":10,"transactionsType":"aggregateBondedTransactions","splitTransactions":true,"x":464,"y":473,"wires":[["5320bd67.1da4f4"]]},{"id":"b8294819.8d21d8","type":"listener","z":"d547a10b.4b6ac","name":"","server":"551021ac.e378e","address":"","listenerType":"confirmed","x":426,"y":541,"wires":[["2c1fe8e5.af25e8"]]},{"id":"495efa6e.8cf5a4","type":"listener","z":"d547a10b.4b6ac","name":"","server":"551021ac.e378e","address":"","listenerType":"status","x":415,"y":593,"wires":[["c82983c5.8cdb6"]]},{"id":"2c1fe8e5.af25e8","type":"debug","z":"d547a10b.4b6ac","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":607,"y":541,"wires":[]},{"id":"c82983c5.8cdb6","type":"debug","z":"d547a10b.4b6ac","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":602,"y":593,"wires":[]},{"id":"7368af6c.849bb","type":"signTransaction","z":"d547a10b.4b6ac","name":"","privateKey":"","network":"2b9cf13.9eaf90e","x":1227.8888549804688,"y":461.77777099609375,"wires":[["c09ff41b.b70338"]]},{"id":"c09ff41b.b70338","type":"announce","z":"d547a10b.4b6ac","name":"","server":"551021ac.e378e","announceType":"announceAggregateBondedCosignature","x":1346,"y":521.22216796875,"wires":[[]]},{"id":"d29a4ee9.b8d2d","type":"publicAccount","z":"d547a10b.4b6ac","name":"multisig public account","publicKey":"","network":"2b9cf13.9eaf90e","x":145,"y":474,"wires":[["a5551edb.ab1e9","b8294819.8d21d8","495efa6e.8cf5a4"]]},{"id":"568af053.73f9f","type":"comment","z":"d547a10b.4b6ac","name":"Cosign transaction for multisig account","info":"","x":177,"y":394,"wires":[]},{"id":"5320bd67.1da4f4","type":"account","z":"d547a10b.4b6ac","name":"account that will cosign","privateKey":"","network":"2b9cf13.9eaf90e","x":722.444450378418,"y":411.2221875190735,"wires":[["8f9866d8.d61498"]]},{"id":"8f9866d8.d61498","type":"filter","z":"d547a10b.4b6ac","name":"did cosigner sign it already?","property":"nem.transaction.cosignatures","propertyType":"msg","arrayProperty":"signer.publicKey","arrayPropertyCheck":true,"rules":[{"t":"neq","v":"nem.publicKey","vt":"msg"}],"checkall":"true","outputs":1,"x":970.0000610351562,"y":412.1111145019531,"wires":[["f0395fc6.b0954"]]},{"id":"f0395fc6.b0954","type":"cosignature","z":"d547a10b.4b6ac","name":"","x":1243,"y":411,"wires":[["7368af6c.849bb"]]},{"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":""}]
jorisadri

Flow Info

created 5 months, 1 week ago

Node Types

Core
  • comment (x1)
  • debug (x2)
Other

Tags

  • transaction
  • nem
  • nem2
  • blockchain
  • cosign
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option