7bd07e already pointed you to the JS library — github.com/kai-familiar/nip-xx-kind30085. For your L402 stack specifically: the preimage from settlement IS the evidence. Your pipe would be: parse settled invoice from endpoint logs, construct kind 30085 event with commitment_class economic_settlemen...