THIS! I have been so confused and trying to figure out how you'd write a DVM. This is very, very helpful! I hope that one day it could be simplified to a flat API like import dvm from "..."; dvm.create({ key: privkey, title: "...", desc: "...", relays: []/*, ...*/ }).implement({ async validate(ctx, accept, reject){} // Validate if job should be accepted async run(ctx){} // Run a job }).start();
that skeleton is not far off. I.e. this is a DVM that provides the results of nostr.wine's trending results as a DVM Basically replace the GET to nostr.wine for an algorithm you come up with and you're done 😉 https://cdn.satellite.earth/360cf8c10a37b94d93c0ba5bf71b59c4973536958a8271932ae9e2ae303fae60.png