AccountAcceptAuthorization.deserialize constructor

AccountAcceptAuthorization.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory AccountAcceptAuthorization.deserialize(BinaryReader reader) {
  // Read [AccountAcceptAuthorization] fields.
  final botId = reader.readInt64();
  final scope = reader.readString();
  final publicKey = reader.readString();
  final valueHashes = reader.readVectorObject<SecureValueHashBase>();
  final credentials = reader.readObject() as SecureCredentialsEncryptedBase;

  // Construct [AccountAcceptAuthorization] object.
  final returnValue = AccountAcceptAuthorization(
    botId: botId,
    scope: scope,
    publicKey: publicKey,
    valueHashes: valueHashes,
    credentials: credentials,
  );

  // Now return the deserialized [AccountAcceptAuthorization].
  return returnValue;
}