Add binary marshaling for value and amount