squash: refactor rpc_validate/add rpc_method/args helpers