// todo move chain api client here