decode static method

XdrSorobanAuthorizedFunctionType decode(
  1. XdrDataInputStream stream
)

Implementation

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