syntax = "proto3";

option java_multiple_files = true;
option java_package = "org.signal.registration.proto";

message RegistrationProvisionEnvelope {
  bytes publicKey = 1;
  bytes body = 2; // Encrypted RegistrationProvisionMessage
}

message RegistrationProvisionMessage {
  enum Platform {
    ANDROID = 0;
    IOS = 1;
  }

  enum Tier {
    FREE = 0;
    PAID = 1;
  }

  string e164 = 1;
  bytes aci = 2;
  string accountEntropyPool = 3;
  optional string pin = 4;
  Platform platform = 5;
  optional uint64 backupTimestampMs = 6;
  optional Tier tier = 7;
  optional uint64 backupSizeBytes = 8;
  string restoreMethodToken = 9;
  bytes aciIdentityKeyPublic = 10;
  bytes aciIdentityKeyPrivate = 11;
  bytes pniIdentityKeyPublic = 12;
  bytes pniIdentityKeyPrivate = 13;
  uint64 backupVersion = 14;
}
