examples: add example of internal API to validate an RPC.