MT#3949 API: implement contracts handling.