Understanding what could the best to develop blockchain interface


#1

I have to implement a very minimal blockchain (Ethereum) interface for OctoPrint on Raspberry which should make two very simple transactions: job_started and job_finished. These transactions could be triggered by two simple python functions. How I can edit the Octoprint server-side APIs functions?

(OctoPrint 0.15.10, OctoPi 0.16, Makerbot Replicator 2c (GPX plugin), 7.6)


#2

What does "I have to" mean? Work or school assignment?

Should be pretty easy to listen for those events.


#3

I have to develop a prototype for my thesis in university. Using APIs is ok, but for my specific case is better to implement transaction functions inner OctoPrint code, onto the Raspberry runs a light Ethereum node.


#4

could we have at least 3d printing clean from that bc garbage ppl are trying to peddle everywhere :frowning:

there's no valid reason to implement that as part of octoprint code. if you really have to develop it make a plugin, it's clean and does the same thing..


#5

@arhi here here...lmfao


#6

For reference....this is what @tedder was talking about using assuming you're going to develop a plugin.
http://docs.octoprint.org/en/master/plugins/mixins.html#eventhandlerplugin

Otherwise you could use the config.yaml and add the external python calls to whatever...
http://docs.octoprint.org/en/master/events/index.html#sec-events