decode static method

XdrSorobanCredentialsType decode(
  1. XdrDataInputStream stream
)

Implementation

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