define separate interface and methods to encode/decode queries by crypto router