Move debug rpc api in the core