decode static method

XdrContractIDPreimageType decode(
  1. XdrDataInputStream stream
)

Implementation

static XdrContractIDPreimageType decode(XdrDataInputStream stream) {
  int value = stream.readInt();
  switch (value) {
    case 0:
      return CONTRACT_ID_PREIMAGE_FROM_ADDRESS;
    case 1:
      return CONTRACT_ID_PREIMAGE_FROM_ASSET;
    default:
      throw Exception("Unknown enum value: $value");
  }
}