https://github.com/element-fi/hyperdrive/blob/2c4e0ed0ad6a656840398463e3a1c6536c2aa2f5/contracts/Hyperdrive.sol#L415
I believe we should move to an encode standard for asset ids, where the user provides the data of the id and then we use and internal method to decode it. Because the methods are not standard the user will have to provide the data and likely have to call the smart contract lib to encode anyway.