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();
Login to reply
Replies (1)
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 ๐

