AMIDST support

Depends on skiphs/AMIDST#22 (this should not be merged before that PR is merged).