Buffer operations for bitcoin apps