Is it possible to add a hook for custom validation of transactions with a special script "tag" in them? If so, How? In essence, I want to add something similar in functionality to bitcoin script, but far more complex that what that supports. It doesn't matter if most clients/servers will not recognize the extended bitcoin script , provided they will ignore it.
The idea is that a node, when seeing a transaction with a special script payload, would call some external validation routine and only if that succeeded would it then run the standard integrity checks.
Are there supported hooks for this in the JSON-RPC API, any of the various clients, or would it require extensive modification of the source ?