fromIdentifierByte static method

KeyIdentifier fromIdentifierByte(
  1. int byte
)

Implementation

static KeyIdentifier fromIdentifierByte(int byte) {
  switch (byte) {
    case 0x00:
      return KeyIdentifier.account;
    case 0x01:
      return KeyIdentifier.hash;
    case 0x02:
      return KeyIdentifier.uref;
    case 0x03:
      return KeyIdentifier.transfer;
    case 0x04:
      return KeyIdentifier.deployInfo;
    case 0x05:
      return KeyIdentifier.eraInfo;
    case 0x06:
      return KeyIdentifier.balance;
    case 0x07:
      return KeyIdentifier.bid;
    case 0x08:
      return KeyIdentifier.withdraw;
    case 0x09:
      return KeyIdentifier.dictionary;
    default:
      throw ArgumentError.value(byte, 'byte', 'Unknown key identifier byte');
  }
}