gateway: rpc interface