type $Oneof<Variants extends Record<string, unknown>> = {
  [Key in keyof Variants]: {
    [RequiredKey in Key]: Variants[RequiredKey]
  } & {
    /** @deprecated */
    [PartialKey in Exclude<keyof Variants, Key>]?: never;
  };
}[keyof Variants];
export namespace signalservice {
export namespace CDSClientRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CDSClientRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aciUakPairs: Uint8Array<ArrayBuffer> | null;
    prevE164s: Uint8Array<ArrayBuffer> | null;
    newE164s: Uint8Array<ArrayBuffer> | null;
    discardE164s: Uint8Array<ArrayBuffer> | null;
    hasMore: boolean | null;
    token: Uint8Array<ArrayBuffer> | null;
    tokenAck: boolean | null;
    returnAcisWithoutUaks: boolean | null;
  };
}
export type CDSClientRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aciUakPairs: Uint8Array<ArrayBuffer> | null;
  prevE164s: Uint8Array<ArrayBuffer> | null;
  newE164s: Uint8Array<ArrayBuffer> | null;
  discardE164s: Uint8Array<ArrayBuffer> | null;
  hasMore: boolean | null;
  token: Uint8Array<ArrayBuffer> | null;
  tokenAck: boolean | null;
  returnAcisWithoutUaks: boolean | null;
};
export namespace CDSClientResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CDSClientResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164PniAciTriples: Uint8Array<ArrayBuffer> | null;
    token: Uint8Array<ArrayBuffer> | null;
  };
}
export type CDSClientResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164PniAciTriples: Uint8Array<ArrayBuffer> | null;
  token: Uint8Array<ArrayBuffer> | null;
};
}
export namespace signalservice {
export namespace CrashReport {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CrashReport;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    filename: string | null;
    content: Uint8Array<ArrayBuffer> | null;
  };
}
export type CrashReport = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  filename: string;
  content: Uint8Array<ArrayBuffer>;
};
export namespace CrashReportList {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CrashReportList;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    reports: Array<signalservice.CrashReport.Params> | null;
  };
}
export type CrashReportList = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  reports: Array<signalservice.CrashReport>;
};
}
export namespace signalservice {
export namespace ProvisioningAddress {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProvisioningAddress;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    address: string | null;
  };
}
export type ProvisioningAddress = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  address: string | null;
};
export namespace ProvisionEnvelope {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProvisionEnvelope;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    body: Uint8Array<ArrayBuffer> | null;
  };
}
export type ProvisionEnvelope = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer> | null;
  body: Uint8Array<ArrayBuffer> | null;
};
export namespace ProvisionMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProvisionMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aciIdentityKeyPublic: Uint8Array<ArrayBuffer> | null;
    aciIdentityKeyPrivate: Uint8Array<ArrayBuffer> | null;
    pniIdentityKeyPublic: Uint8Array<ArrayBuffer> | null;
    pniIdentityKeyPrivate: Uint8Array<ArrayBuffer> | null;
    number: string | null;
    provisioningCode: string | null;
    userAgent: string | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    readReceipts: boolean | null;
    provisioningVersion: number | null;
    masterKey: Uint8Array<ArrayBuffer> | null;
    ephemeralBackupKey: Uint8Array<ArrayBuffer> | null;
    accountEntropyPool: string | null;
    mediaRootBackupKey: Uint8Array<ArrayBuffer> | null;
    aciBinary: Uint8Array<ArrayBuffer> | null;
    pniBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type ProvisionMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aciIdentityKeyPublic: Uint8Array<ArrayBuffer> | null;
  aciIdentityKeyPrivate: Uint8Array<ArrayBuffer> | null;
  pniIdentityKeyPublic: Uint8Array<ArrayBuffer> | null;
  pniIdentityKeyPrivate: Uint8Array<ArrayBuffer> | null;
  number: string | null;
  provisioningCode: string | null;
  userAgent: string | null;
  profileKey: Uint8Array<ArrayBuffer> | null;
  readReceipts: boolean | null;
  provisioningVersion: number | null;
  masterKey: Uint8Array<ArrayBuffer> | null;
  ephemeralBackupKey: Uint8Array<ArrayBuffer> | null;
  accountEntropyPool: string | null;
  mediaRootBackupKey: Uint8Array<ArrayBuffer> | null;
  aciBinary: Uint8Array<ArrayBuffer> | null;
  pniBinary: Uint8Array<ArrayBuffer> | null;
};
export enum ProvisioningVersion {
  INITIAL = 0,
  TABLET_SUPPORT = 1,
  CURRENT = 1,
}
export type $NullableProvisioningVersion =
  | ProvisioningVersion
  | (number & { $signalservice_ProvisioningVersion: never });
}
export namespace signalservice {
export namespace DeviceName {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeviceName;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    ephemeralPublic: Uint8Array<ArrayBuffer> | null;
    syntheticIv: Uint8Array<ArrayBuffer> | null;
    ciphertext: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeviceName = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  ephemeralPublic: Uint8Array<ArrayBuffer> | null;
  syntheticIv: Uint8Array<ArrayBuffer> | null;
  ciphertext: Uint8Array<ArrayBuffer> | null;
};
}
export namespace signalservice {
export namespace AvatarUploadAttributes {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AvatarUploadAttributes;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    key: string | null;
    credential: string | null;
    acl: string | null;
    algorithm: string | null;
    date: string | null;
    policy: string | null;
    signature: string | null;
  };
}
export type AvatarUploadAttributes = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  key: string;
  credential: string;
  acl: string;
  algorithm: string;
  date: string;
  policy: string;
  signature: string;
};
export namespace Member {
export enum Role {
  UNKNOWN = 0,
  DEFAULT = 1,
  ADMINISTRATOR = 2,
}
export type $NullableRole =
  | Role
  | (number & { $signalservice_Member_Role: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Member;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    role: signalservice.Member.$NullableRole | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    joinedAtVersion: number | null;
    labelEmoji: Uint8Array<ArrayBuffer> | null;
    labelString: Uint8Array<ArrayBuffer> | null;
  };
}
export type Member = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  role: signalservice.Member.$NullableRole;
  profileKey: Uint8Array<ArrayBuffer>;
  presentation: Uint8Array<ArrayBuffer>;
  joinedAtVersion: number;
  labelEmoji: Uint8Array<ArrayBuffer>;
  labelString: Uint8Array<ArrayBuffer>;
};
export namespace MemberPendingProfileKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MemberPendingProfileKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    member: signalservice.Member.Params | null;
    addedByUserId: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
  };
}
export type MemberPendingProfileKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  member: signalservice.Member | null;
  addedByUserId: Uint8Array<ArrayBuffer>;
  timestamp: bigint;
};
export namespace MemberPendingAdminApproval {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MemberPendingAdminApproval;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
  };
}
export type MemberPendingAdminApproval = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  profileKey: Uint8Array<ArrayBuffer>;
  presentation: Uint8Array<ArrayBuffer>;
  timestamp: bigint;
};
export namespace MemberBanned {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MemberBanned;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
  };
}
export type MemberBanned = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  timestamp: bigint;
};
export namespace AccessControl {
export enum AccessRequired {
  UNKNOWN = 0,
  ANY = 1,
  MEMBER = 2,
  ADMINISTRATOR = 3,
  UNSATISFIABLE = 4,
}
export type $NullableAccessRequired =
  | AccessRequired
  | (number & { $signalservice_AccessControl_AccessRequired: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AccessControl;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    attributes: signalservice.AccessControl.$NullableAccessRequired | null;
    members: signalservice.AccessControl.$NullableAccessRequired | null;
    addFromInviteLink: signalservice.AccessControl.$NullableAccessRequired | null;
    memberLabel: signalservice.AccessControl.$NullableAccessRequired | null;
  };
}
export type AccessControl = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  attributes: signalservice.AccessControl.$NullableAccessRequired;
  members: signalservice.AccessControl.$NullableAccessRequired;
  addFromInviteLink: signalservice.AccessControl.$NullableAccessRequired;
  memberLabel: signalservice.AccessControl.$NullableAccessRequired;
};
export namespace Group {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Group;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    title: Uint8Array<ArrayBuffer> | null;
    description: Uint8Array<ArrayBuffer> | null;
    avatarUrl: string | null;
    disappearingMessagesTimer: Uint8Array<ArrayBuffer> | null;
    accessControl: signalservice.AccessControl.Params | null;
    version: number | null;
    members: Array<signalservice.Member.Params> | null;
    membersPendingProfileKey: Array<signalservice.MemberPendingProfileKey.Params> | null;
    membersPendingAdminApproval: Array<signalservice.MemberPendingAdminApproval.Params> | null;
    inviteLinkPassword: Uint8Array<ArrayBuffer> | null;
    announcementsOnly: boolean | null;
    membersBanned: Array<signalservice.MemberBanned.Params> | null;
    terminated: boolean | null;
  };
}
export type Group = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer>;
  title: Uint8Array<ArrayBuffer>;
  description: Uint8Array<ArrayBuffer>;
  avatarUrl: string;
  disappearingMessagesTimer: Uint8Array<ArrayBuffer>;
  accessControl: signalservice.AccessControl | null;
  version: number;
  members: Array<signalservice.Member>;
  membersPendingProfileKey: Array<signalservice.MemberPendingProfileKey>;
  membersPendingAdminApproval: Array<signalservice.MemberPendingAdminApproval>;
  inviteLinkPassword: Uint8Array<ArrayBuffer>;
  announcementsOnly: boolean;
  membersBanned: Array<signalservice.MemberBanned>;
  terminated: boolean;
};
export namespace GroupAttributeBlob {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupAttributeBlob;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    content: null | $Oneof<{title: string; avatar: Uint8Array<ArrayBuffer>; disappearingMessagesDuration: number; descriptionText: string;}>;
  };
}
export type GroupAttributeBlob = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  content: null | $Oneof<{title: string; avatar: Uint8Array<ArrayBuffer>; disappearingMessagesDuration: number; descriptionText: string;}>;
};
export namespace GroupInviteLink {
export namespace GroupInviteLinkContentsV1 {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupInviteLinkContentsV1;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupMasterKey: Uint8Array<ArrayBuffer> | null;
    inviteLinkPassword: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupInviteLinkContentsV1 = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupMasterKey: Uint8Array<ArrayBuffer>;
  inviteLinkPassword: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupInviteLink;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    contents: null | $Oneof<{contentsV1: signalservice.GroupInviteLink.GroupInviteLinkContentsV1.Params;}>;
  };
}
export type GroupInviteLink = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  contents: null | $Oneof<{contentsV1: signalservice.GroupInviteLink.GroupInviteLinkContentsV1;}>;
};
export namespace GroupJoinInfo {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupJoinInfo;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    title: Uint8Array<ArrayBuffer> | null;
    description: Uint8Array<ArrayBuffer> | null;
    avatar: string | null;
    memberCount: number | null;
    addFromInviteLink: signalservice.AccessControl.$NullableAccessRequired | null;
    version: number | null;
    pendingAdminApproval: boolean | null;
    pendingAdminApprovalFull: boolean | null;
  };
}
export type GroupJoinInfo = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer>;
  title: Uint8Array<ArrayBuffer>;
  description: Uint8Array<ArrayBuffer>;
  avatar: string;
  memberCount: number;
  addFromInviteLink: signalservice.AccessControl.$NullableAccessRequired;
  version: number;
  pendingAdminApproval: boolean;
  pendingAdminApprovalFull: boolean;
};
export namespace GroupChange {
export namespace Actions {
export namespace AddMemberAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AddMemberAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    added: signalservice.Member.Params | null;
    joinFromInviteLink: boolean | null;
  };
}
export type AddMemberAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  added: signalservice.Member | null;
  joinFromInviteLink: boolean;
};
export namespace DeleteMemberAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMemberAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    deletedUserId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeleteMemberAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  deletedUserId: Uint8Array<ArrayBuffer>;
};
export namespace ModifyMemberRoleAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyMemberRoleAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    role: signalservice.Member.$NullableRole | null;
  };
}
export type ModifyMemberRoleAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  role: signalservice.Member.$NullableRole;
};
export namespace ModifyMemberLabelAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyMemberLabelAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    labelEmoji: Uint8Array<ArrayBuffer> | null;
    labelString: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyMemberLabelAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  labelEmoji: Uint8Array<ArrayBuffer>;
  labelString: Uint8Array<ArrayBuffer>;
};
export namespace ModifyMemberProfileKeyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyMemberProfileKeyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyMemberProfileKeyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  presentation: Uint8Array<ArrayBuffer>;
  userId: Uint8Array<ArrayBuffer>;
  profileKey: Uint8Array<ArrayBuffer>;
};
export namespace AddMemberPendingProfileKeyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AddMemberPendingProfileKeyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    added: signalservice.MemberPendingProfileKey.Params | null;
  };
}
export type AddMemberPendingProfileKeyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  added: signalservice.MemberPendingProfileKey | null;
};
export namespace DeleteMemberPendingProfileKeyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMemberPendingProfileKeyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    deletedUserId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeleteMemberPendingProfileKeyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  deletedUserId: Uint8Array<ArrayBuffer>;
};
export namespace PromoteMemberPendingProfileKeyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PromoteMemberPendingProfileKeyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type PromoteMemberPendingProfileKeyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  presentation: Uint8Array<ArrayBuffer>;
  userId: Uint8Array<ArrayBuffer>;
  profileKey: Uint8Array<ArrayBuffer>;
};
export namespace PromoteMemberPendingPniAciProfileKeyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PromoteMemberPendingPniAciProfileKeyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    pni: Uint8Array<ArrayBuffer> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type PromoteMemberPendingPniAciProfileKeyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  presentation: Uint8Array<ArrayBuffer>;
  userId: Uint8Array<ArrayBuffer>;
  pni: Uint8Array<ArrayBuffer>;
  profileKey: Uint8Array<ArrayBuffer>;
};
export namespace AddMemberPendingAdminApprovalAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AddMemberPendingAdminApprovalAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    added: signalservice.MemberPendingAdminApproval.Params | null;
  };
}
export type AddMemberPendingAdminApprovalAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  added: signalservice.MemberPendingAdminApproval | null;
};
export namespace DeleteMemberPendingAdminApprovalAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMemberPendingAdminApprovalAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    deletedUserId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeleteMemberPendingAdminApprovalAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  deletedUserId: Uint8Array<ArrayBuffer>;
};
export namespace PromoteMemberPendingAdminApprovalAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PromoteMemberPendingAdminApprovalAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userId: Uint8Array<ArrayBuffer> | null;
    role: signalservice.Member.$NullableRole | null;
  };
}
export type PromoteMemberPendingAdminApprovalAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userId: Uint8Array<ArrayBuffer>;
  role: signalservice.Member.$NullableRole;
};
export namespace AddMemberBannedAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AddMemberBannedAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    added: signalservice.MemberBanned.Params | null;
  };
}
export type AddMemberBannedAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  added: signalservice.MemberBanned | null;
};
export namespace DeleteMemberBannedAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMemberBannedAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    deletedUserId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeleteMemberBannedAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  deletedUserId: Uint8Array<ArrayBuffer>;
};
export namespace ModifyTitleAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyTitleAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    title: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyTitleAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  title: Uint8Array<ArrayBuffer>;
};
export namespace ModifyDescriptionAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyDescriptionAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    description: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyDescriptionAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  description: Uint8Array<ArrayBuffer>;
};
export namespace ModifyAvatarAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyAvatarAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    avatar: string | null;
  };
}
export type ModifyAvatarAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  avatar: string;
};
export namespace ModifyDisappearingMessageTimerAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyDisappearingMessageTimerAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timer: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyDisappearingMessageTimerAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timer: Uint8Array<ArrayBuffer>;
};
export namespace ModifyAttributesAccessControlAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyAttributesAccessControlAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    attributesAccess: signalservice.AccessControl.$NullableAccessRequired | null;
  };
}
export type ModifyAttributesAccessControlAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  attributesAccess: signalservice.AccessControl.$NullableAccessRequired;
};
export namespace ModifyMembersAccessControlAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyMembersAccessControlAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    membersAccess: signalservice.AccessControl.$NullableAccessRequired | null;
  };
}
export type ModifyMembersAccessControlAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  membersAccess: signalservice.AccessControl.$NullableAccessRequired;
};
export namespace ModifyAddFromInviteLinkAccessControlAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyAddFromInviteLinkAccessControlAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    addFromInviteLinkAccess: signalservice.AccessControl.$NullableAccessRequired | null;
  };
}
export type ModifyAddFromInviteLinkAccessControlAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  addFromInviteLinkAccess: signalservice.AccessControl.$NullableAccessRequired;
};
export namespace ModifyMemberLabelAccessControlAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyMemberLabelAccessControlAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    memberLabelAccess: signalservice.AccessControl.$NullableAccessRequired | null;
  };
}
export type ModifyMemberLabelAccessControlAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  memberLabelAccess: signalservice.AccessControl.$NullableAccessRequired;
};
export namespace ModifyInviteLinkPasswordAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyInviteLinkPasswordAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    inviteLinkPassword: Uint8Array<ArrayBuffer> | null;
  };
}
export type ModifyInviteLinkPasswordAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  inviteLinkPassword: Uint8Array<ArrayBuffer>;
};
export namespace ModifyAnnouncementsOnlyAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ModifyAnnouncementsOnlyAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    announcementsOnly: boolean | null;
  };
}
export type ModifyAnnouncementsOnlyAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  announcementsOnly: boolean;
};
export namespace TerminateGroupAction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): TerminateGroupAction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type TerminateGroupAction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Actions;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sourceUserId: Uint8Array<ArrayBuffer> | null;
    groupId: Uint8Array<ArrayBuffer> | null;
    version: number | null;
    addMembers: Array<signalservice.GroupChange.Actions.AddMemberAction.Params> | null;
    deleteMembers: Array<signalservice.GroupChange.Actions.DeleteMemberAction.Params> | null;
    modifyMemberRoles: Array<signalservice.GroupChange.Actions.ModifyMemberRoleAction.Params> | null;
    modifyMemberLabels: Array<signalservice.GroupChange.Actions.ModifyMemberLabelAction.Params> | null;
    modifyMemberProfileKeys: Array<signalservice.GroupChange.Actions.ModifyMemberProfileKeyAction.Params> | null;
    addMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.AddMemberPendingProfileKeyAction.Params> | null;
    deleteMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.DeleteMemberPendingProfileKeyAction.Params> | null;
    promoteMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.PromoteMemberPendingProfileKeyAction.Params> | null;
    modifyTitle: signalservice.GroupChange.Actions.ModifyTitleAction.Params | null;
    modifyAvatar: signalservice.GroupChange.Actions.ModifyAvatarAction.Params | null;
    modifyDisappearingMessageTimer: signalservice.GroupChange.Actions.ModifyDisappearingMessageTimerAction.Params | null;
    modifyAttributesAccess: signalservice.GroupChange.Actions.ModifyAttributesAccessControlAction.Params | null;
    modifyMemberAccess: signalservice.GroupChange.Actions.ModifyMembersAccessControlAction.Params | null;
    modifyAddFromInviteLinkAccess: signalservice.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction.Params | null;
    modifyMemberLabelAccess: signalservice.GroupChange.Actions.ModifyMemberLabelAccessControlAction.Params | null;
    addMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.AddMemberPendingAdminApprovalAction.Params> | null;
    deleteMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.DeleteMemberPendingAdminApprovalAction.Params> | null;
    promoteMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction.Params> | null;
    modifyInviteLinkPassword: signalservice.GroupChange.Actions.ModifyInviteLinkPasswordAction.Params | null;
    modifyDescription: signalservice.GroupChange.Actions.ModifyDescriptionAction.Params | null;
    modifyAnnouncementsOnly: signalservice.GroupChange.Actions.ModifyAnnouncementsOnlyAction.Params | null;
    addMembersBanned: Array<signalservice.GroupChange.Actions.AddMemberBannedAction.Params> | null;
    deleteMembersBanned: Array<signalservice.GroupChange.Actions.DeleteMemberBannedAction.Params> | null;
    promoteMembersPendingPniAciProfileKey: Array<signalservice.GroupChange.Actions.PromoteMemberPendingPniAciProfileKeyAction.Params> | null;
    terminateGroup: signalservice.GroupChange.Actions.TerminateGroupAction.Params | null;
  };
}
export type Actions = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sourceUserId: Uint8Array<ArrayBuffer>;
  groupId: Uint8Array<ArrayBuffer>;
  version: number;
  addMembers: Array<signalservice.GroupChange.Actions.AddMemberAction>;
  deleteMembers: Array<signalservice.GroupChange.Actions.DeleteMemberAction>;
  modifyMemberRoles: Array<signalservice.GroupChange.Actions.ModifyMemberRoleAction>;
  modifyMemberLabels: Array<signalservice.GroupChange.Actions.ModifyMemberLabelAction>;
  modifyMemberProfileKeys: Array<signalservice.GroupChange.Actions.ModifyMemberProfileKeyAction>;
  addMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.AddMemberPendingProfileKeyAction>;
  deleteMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.DeleteMemberPendingProfileKeyAction>;
  promoteMembersPendingProfileKey: Array<signalservice.GroupChange.Actions.PromoteMemberPendingProfileKeyAction>;
  modifyTitle: signalservice.GroupChange.Actions.ModifyTitleAction | null;
  modifyAvatar: signalservice.GroupChange.Actions.ModifyAvatarAction | null;
  modifyDisappearingMessageTimer: signalservice.GroupChange.Actions.ModifyDisappearingMessageTimerAction | null;
  modifyAttributesAccess: signalservice.GroupChange.Actions.ModifyAttributesAccessControlAction | null;
  modifyMemberAccess: signalservice.GroupChange.Actions.ModifyMembersAccessControlAction | null;
  modifyAddFromInviteLinkAccess: signalservice.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction | null;
  modifyMemberLabelAccess: signalservice.GroupChange.Actions.ModifyMemberLabelAccessControlAction | null;
  addMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.AddMemberPendingAdminApprovalAction>;
  deleteMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.DeleteMemberPendingAdminApprovalAction>;
  promoteMembersPendingAdminApproval: Array<signalservice.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction>;
  modifyInviteLinkPassword: signalservice.GroupChange.Actions.ModifyInviteLinkPasswordAction | null;
  modifyDescription: signalservice.GroupChange.Actions.ModifyDescriptionAction | null;
  modifyAnnouncementsOnly: signalservice.GroupChange.Actions.ModifyAnnouncementsOnlyAction | null;
  addMembersBanned: Array<signalservice.GroupChange.Actions.AddMemberBannedAction>;
  deleteMembersBanned: Array<signalservice.GroupChange.Actions.DeleteMemberBannedAction>;
  promoteMembersPendingPniAciProfileKey: Array<signalservice.GroupChange.Actions.PromoteMemberPendingPniAciProfileKeyAction>;
  terminateGroup: signalservice.GroupChange.Actions.TerminateGroupAction | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupChange;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    actions: Uint8Array<ArrayBuffer> | null;
    serverSignature: Uint8Array<ArrayBuffer> | null;
    changeEpoch: number | null;
  };
}
export type GroupChange = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  actions: Uint8Array<ArrayBuffer>;
  serverSignature: Uint8Array<ArrayBuffer>;
  changeEpoch: number;
};
export namespace ExternalGroupCredential {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ExternalGroupCredential;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    token: string | null;
  };
}
export type ExternalGroupCredential = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  token: string;
};
export namespace GroupResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    group: signalservice.Group.Params | null;
    groupSendEndorsementsResponse: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  group: signalservice.Group | null;
  groupSendEndorsementsResponse: Uint8Array<ArrayBuffer>;
};
export namespace GroupChanges {
export namespace GroupChangeState {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupChangeState;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupChange: signalservice.GroupChange.Params | null;
    groupState: signalservice.Group.Params | null;
  };
}
export type GroupChangeState = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupChange: signalservice.GroupChange | null;
  groupState: signalservice.Group | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupChanges;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupChanges: Array<signalservice.GroupChanges.GroupChangeState.Params> | null;
    groupSendEndorsementsResponse: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupChanges = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupChanges: Array<signalservice.GroupChanges.GroupChangeState>;
  groupSendEndorsementsResponse: Uint8Array<ArrayBuffer>;
};
export namespace GroupChangeResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupChangeResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupChange: signalservice.GroupChange.Params | null;
    groupSendEndorsementsResponse: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupChangeResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupChange: signalservice.GroupChange | null;
  groupSendEndorsementsResponse: Uint8Array<ArrayBuffer>;
};
}
export namespace signal {
export namespace proto {
export namespace storage {
export namespace SessionStructure {
export namespace Chain {
export namespace ChainKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ChainKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    index: number | null;
    key: Uint8Array<ArrayBuffer> | null;
  };
}
export type ChainKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  index: number;
  key: Uint8Array<ArrayBuffer>;
};
export namespace MessageKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessageKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    index: number | null;
    cipherKey: Uint8Array<ArrayBuffer> | null;
    macKey: Uint8Array<ArrayBuffer> | null;
    iv: Uint8Array<ArrayBuffer> | null;
  };
}
export type MessageKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  index: number;
  cipherKey: Uint8Array<ArrayBuffer>;
  macKey: Uint8Array<ArrayBuffer>;
  iv: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Chain;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderRatchetKey: Uint8Array<ArrayBuffer> | null;
    senderRatchetKeyPrivate: Uint8Array<ArrayBuffer> | null;
    chainKey: signal.proto.storage.SessionStructure.Chain.ChainKey.Params | null;
    messageKeys: Array<signal.proto.storage.SessionStructure.Chain.MessageKey.Params> | null;
  };
}
export type Chain = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderRatchetKey: Uint8Array<ArrayBuffer>;
  senderRatchetKeyPrivate: Uint8Array<ArrayBuffer>;
  chainKey: signal.proto.storage.SessionStructure.Chain.ChainKey | null;
  messageKeys: Array<signal.proto.storage.SessionStructure.Chain.MessageKey>;
};
export namespace PendingPreKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PendingPreKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    preKeyId: number | null;
    signedPreKeyId: number | null;
    baseKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type PendingPreKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  preKeyId: number;
  signedPreKeyId: number;
  baseKey: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SessionStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionVersion: number | null;
    localIdentityPublic: Uint8Array<ArrayBuffer> | null;
    remoteIdentityPublic: Uint8Array<ArrayBuffer> | null;
    rootKey: Uint8Array<ArrayBuffer> | null;
    previousCounter: number | null;
    senderChain: signal.proto.storage.SessionStructure.Chain.Params | null;
    receiverChains: Array<signal.proto.storage.SessionStructure.Chain.Params> | null;
    pendingPreKey: signal.proto.storage.SessionStructure.PendingPreKey.Params | null;
    remoteRegistrationId: number | null;
    localRegistrationId: number | null;
    needsRefresh: boolean | null;
    aliceBaseKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type SessionStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionVersion: number;
  localIdentityPublic: Uint8Array<ArrayBuffer>;
  remoteIdentityPublic: Uint8Array<ArrayBuffer>;
  rootKey: Uint8Array<ArrayBuffer>;
  previousCounter: number;
  senderChain: signal.proto.storage.SessionStructure.Chain | null;
  receiverChains: Array<signal.proto.storage.SessionStructure.Chain>;
  pendingPreKey: signal.proto.storage.SessionStructure.PendingPreKey | null;
  remoteRegistrationId: number;
  localRegistrationId: number;
  needsRefresh: boolean;
  aliceBaseKey: Uint8Array<ArrayBuffer>;
};
export namespace RecordStructure {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RecordStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    currentSession: signal.proto.storage.SessionStructure.Params | null;
    previousSessions: Array<signal.proto.storage.SessionStructure.Params> | null;
  };
}
export type RecordStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  currentSession: signal.proto.storage.SessionStructure | null;
  previousSessions: Array<signal.proto.storage.SessionStructure>;
};
export namespace PreKeyRecordStructure {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PreKeyRecordStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    privateKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type PreKeyRecordStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number;
  publicKey: Uint8Array<ArrayBuffer>;
  privateKey: Uint8Array<ArrayBuffer>;
};
export namespace SignedPreKeyRecordStructure {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SignedPreKeyRecordStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    privateKey: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
  };
}
export type SignedPreKeyRecordStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number;
  publicKey: Uint8Array<ArrayBuffer>;
  privateKey: Uint8Array<ArrayBuffer>;
  signature: Uint8Array<ArrayBuffer>;
  timestamp: bigint;
};
export namespace IdentityKeyPairStructure {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): IdentityKeyPairStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    privateKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type IdentityKeyPairStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer>;
  privateKey: Uint8Array<ArrayBuffer>;
};
export namespace SenderKeyStateStructure {
export namespace SenderChainKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderChainKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    iteration: number | null;
    seed: Uint8Array<ArrayBuffer> | null;
  };
}
export type SenderChainKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  iteration: number;
  seed: Uint8Array<ArrayBuffer>;
};
export namespace SenderMessageKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderMessageKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    iteration: number | null;
    seed: Uint8Array<ArrayBuffer> | null;
  };
}
export type SenderMessageKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  iteration: number;
  seed: Uint8Array<ArrayBuffer>;
};
export namespace SenderSigningKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderSigningKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    public: Uint8Array<ArrayBuffer> | null;
    private: Uint8Array<ArrayBuffer> | null;
  };
}
export type SenderSigningKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  public: Uint8Array<ArrayBuffer>;
  private: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderKeyStateStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderKeyId: number | null;
    senderChainKey: signal.proto.storage.SenderKeyStateStructure.SenderChainKey.Params | null;
    senderSigningKey: signal.proto.storage.SenderKeyStateStructure.SenderSigningKey.Params | null;
    senderMessageKeys: Array<signal.proto.storage.SenderKeyStateStructure.SenderMessageKey.Params> | null;
  };
}
export type SenderKeyStateStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderKeyId: number;
  senderChainKey: signal.proto.storage.SenderKeyStateStructure.SenderChainKey | null;
  senderSigningKey: signal.proto.storage.SenderKeyStateStructure.SenderSigningKey | null;
  senderMessageKeys: Array<signal.proto.storage.SenderKeyStateStructure.SenderMessageKey>;
};
export namespace SenderKeyRecordStructure {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderKeyRecordStructure;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderKeyStates: Array<signal.proto.storage.SenderKeyStateStructure.Params> | null;
  };
}
export type SenderKeyRecordStructure = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderKeyStates: Array<signal.proto.storage.SenderKeyStateStructure>;
};
}
}
}
export namespace signaling {
export namespace DeviceToDevice {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeviceToDevice;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeviceToDevice = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupId: Uint8Array<ArrayBuffer> | null;
};
export namespace CallMessage {
export namespace RingIntention {
export enum Type {
  RING = 0,
  CANCELLED = 1,
}
export type $NullableType =
  | Type
  | (number & { $signaling_CallMessage_RingIntention_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RingIntention;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupId: Uint8Array<ArrayBuffer> | null;
    type: signaling.CallMessage.RingIntention.$NullableType | null;
    ringId: bigint | null;
  };
}
export type RingIntention = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupId: Uint8Array<ArrayBuffer> | null;
  type: signaling.CallMessage.RingIntention.$NullableType | null;
  ringId: bigint | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    groupCallMessage: signaling.DeviceToDevice.Params | null;
    ringIntention: signaling.CallMessage.RingIntention.Params | null;
  };
}
export type CallMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  groupCallMessage: signaling.DeviceToDevice | null | null;
  ringIntention: signaling.CallMessage.RingIntention | null | null;
};
}
export namespace signalservice {
export namespace Envelope {
export enum Type {
  UNKNOWN = 0,
  DOUBLE_RATCHET = 1,
  PREKEY_MESSAGE = 3,
  SERVER_DELIVERY_RECEIPT = 5,
  UNIDENTIFIED_SENDER = 6,
  PLAINTEXT_CONTENT = 8,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_Envelope_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Envelope;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.Envelope.$NullableType | null;
    sourceServiceId: string | null;
    sourceDeviceId: number | null;
    destinationServiceId: string | null;
    clientTimestamp: bigint | null;
    content: Uint8Array<ArrayBuffer> | null;
    serverGuid: string | null;
    serverTimestamp: bigint | null;
    ephemeral: boolean | null;
    urgent: boolean | null;
    updatedPni: string | null;
    story: boolean | null;
    reportSpamToken: Uint8Array<ArrayBuffer> | null;
    sourceServiceIdBinary: Uint8Array<ArrayBuffer> | null;
    destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
    serverGuidBinary: Uint8Array<ArrayBuffer> | null;
    updatedPniBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Envelope = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.Envelope.$NullableType | null;
  sourceServiceId: string | null;
  sourceDeviceId: number | null;
  destinationServiceId: string | null;
  clientTimestamp: bigint | null;
  content: Uint8Array<ArrayBuffer> | null;
  serverGuid: string | null;
  serverTimestamp: bigint | null;
  ephemeral: boolean | null;
  urgent: boolean;
  updatedPni: string | null;
  story: boolean | null;
  reportSpamToken: Uint8Array<ArrayBuffer> | null;
  sourceServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  serverGuidBinary: Uint8Array<ArrayBuffer> | null;
  updatedPniBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Content {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Content;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    content: null | $Oneof<{dataMessage: signalservice.DataMessage.Params; syncMessage: signalservice.SyncMessage.Params; callMessage: signalservice.CallMessage.Params; nullMessage: signalservice.NullMessage.Params; receiptMessage: signalservice.ReceiptMessage.Params; typingMessage: signalservice.TypingMessage.Params; decryptionErrorMessage: Uint8Array<ArrayBuffer>; storyMessage: signalservice.StoryMessage.Params; editMessage: signalservice.EditMessage.Params;}>;
    senderKeyDistributionMessage: Uint8Array<ArrayBuffer> | null;
    pniSignatureMessage: signalservice.PniSignatureMessage.Params | null;
  };
}
export type Content = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  content: null | $Oneof<{dataMessage: signalservice.DataMessage; syncMessage: signalservice.SyncMessage; callMessage: signalservice.CallMessage; nullMessage: signalservice.NullMessage; receiptMessage: signalservice.ReceiptMessage; typingMessage: signalservice.TypingMessage; decryptionErrorMessage: Uint8Array<ArrayBuffer>; storyMessage: signalservice.StoryMessage; editMessage: signalservice.EditMessage;}>;
  senderKeyDistributionMessage: Uint8Array<ArrayBuffer> | null;
  pniSignatureMessage: signalservice.PniSignatureMessage | null | null;
};
export namespace CallMessage {
export namespace Offer {
export enum Type {
  OFFER_AUDIO_CALL = 0,
  OFFER_VIDEO_CALL = 1,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_CallMessage_Offer_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Offer;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    type: signalservice.CallMessage.Offer.$NullableType | null;
    opaque: Uint8Array<ArrayBuffer> | null;
  };
}
export type Offer = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  type: signalservice.CallMessage.Offer.$NullableType | null;
  opaque: Uint8Array<ArrayBuffer> | null;
};
export namespace Answer {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Answer;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    opaque: Uint8Array<ArrayBuffer> | null;
  };
}
export type Answer = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  opaque: Uint8Array<ArrayBuffer> | null;
};
export namespace IceUpdate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): IceUpdate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    opaque: Uint8Array<ArrayBuffer> | null;
  };
}
export type IceUpdate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  opaque: Uint8Array<ArrayBuffer> | null;
};
export namespace Busy {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Busy;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
  };
}
export type Busy = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
};
export namespace Hangup {
export enum Type {
  HANGUP_NORMAL = 0,
  HANGUP_ACCEPTED = 1,
  HANGUP_DECLINED = 2,
  HANGUP_BUSY = 3,
  HANGUP_NEED_PERMISSION = 4,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_CallMessage_Hangup_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Hangup;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    type: signalservice.CallMessage.Hangup.$NullableType | null;
    deviceId: number | null;
  };
}
export type Hangup = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  type: signalservice.CallMessage.Hangup.$NullableType | null;
  deviceId: number | null;
};
export namespace Opaque {
export enum Urgency {
  DROPPABLE = 0,
  HANDLE_IMMEDIATELY = 1,
}
export type $NullableUrgency =
  | Urgency
  | (number & { $signalservice_CallMessage_Opaque_Urgency: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Opaque;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    data: Uint8Array<ArrayBuffer> | null;
    urgency: signalservice.CallMessage.Opaque.$NullableUrgency | null;
  };
}
export type Opaque = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  data: Uint8Array<ArrayBuffer> | null;
  urgency: signalservice.CallMessage.Opaque.$NullableUrgency | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    offer: signalservice.CallMessage.Offer.Params | null;
    answer: signalservice.CallMessage.Answer.Params | null;
    iceUpdate: Array<signalservice.CallMessage.IceUpdate.Params> | null;
    busy: signalservice.CallMessage.Busy.Params | null;
    hangup: signalservice.CallMessage.Hangup.Params | null;
    destinationDeviceId: number | null;
    opaque: signalservice.CallMessage.Opaque.Params | null;
  };
}
export type CallMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  offer: signalservice.CallMessage.Offer | null | null;
  answer: signalservice.CallMessage.Answer | null | null;
  iceUpdate: Array<signalservice.CallMessage.IceUpdate>;
  busy: signalservice.CallMessage.Busy | null | null;
  hangup: signalservice.CallMessage.Hangup | null | null;
  destinationDeviceId: number | null;
  opaque: signalservice.CallMessage.Opaque | null | null;
};
export namespace DataMessage {
export enum Flags {
  END_SESSION = 1,
  EXPIRATION_TIMER_UPDATE = 2,
  PROFILE_KEY_UPDATE = 4,
  FORWARD = 8,
  UNKNOWN = 0,
}
export type $NullableFlags =
  | Flags
  | (number & { $signalservice_DataMessage_Flags: never });
export namespace Payment {
export namespace Amount {
export namespace MobileCoin {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MobileCoin;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    picoMob: bigint | null;
  };
}
export type MobileCoin = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  picoMob: bigint | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Amount;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    Amount: null | $Oneof<{mobileCoin: signalservice.DataMessage.Payment.Amount.MobileCoin.Params;}>;
  };
}
export type Amount = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  Amount: null | $Oneof<{mobileCoin: signalservice.DataMessage.Payment.Amount.MobileCoin;}>;
};
export namespace Notification {
export namespace MobileCoin {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MobileCoin;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    receipt: Uint8Array<ArrayBuffer> | null;
  };
}
export type MobileCoin = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  receipt: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Notification;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    Transaction: null | $Oneof<{mobileCoin: signalservice.DataMessage.Payment.Notification.MobileCoin.Params;}>;
    note: string | null;
  };
}
export type Notification = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  Transaction: null | $Oneof<{mobileCoin: signalservice.DataMessage.Payment.Notification.MobileCoin;}>;
  note: string | null;
};
export namespace Activation {
export enum Type {
  REQUEST = 0,
  ACTIVATED = 1,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_DataMessage_Payment_Activation_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Activation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.DataMessage.Payment.Activation.$NullableType | null;
  };
}
export type Activation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.DataMessage.Payment.Activation.$NullableType | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Payment;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    Item: null | $Oneof<{notification: signalservice.DataMessage.Payment.Notification.Params; activation: signalservice.DataMessage.Payment.Activation.Params;}>;
  };
}
export type Payment = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  Item: null | $Oneof<{notification: signalservice.DataMessage.Payment.Notification; activation: signalservice.DataMessage.Payment.Activation;}>;
};
export namespace Quote {
export enum Type {
  NORMAL = 0,
  GIFT_BADGE = 1,
  POLL = 2,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_DataMessage_Quote_Type: never });
export namespace QuotedAttachment {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): QuotedAttachment;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    contentType: string | null;
    fileName: string | null;
    thumbnail: signalservice.AttachmentPointer.Params | null;
  };
}
export type QuotedAttachment = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  contentType: string | null;
  fileName: string | null;
  thumbnail: signalservice.AttachmentPointer | null | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Quote;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    authorAci: string | null;
    text: string | null;
    attachments: Array<signalservice.DataMessage.Quote.QuotedAttachment.Params> | null;
    bodyRanges: Array<signalservice.BodyRange.Params> | null;
    type: signalservice.DataMessage.Quote.$NullableType | null;
    authorAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Quote = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  authorAci: string | null;
  text: string | null;
  attachments: Array<signalservice.DataMessage.Quote.QuotedAttachment>;
  bodyRanges: Array<signalservice.BodyRange>;
  type: signalservice.DataMessage.Quote.$NullableType | null;
  authorAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Contact {
export namespace Name {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Name;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    givenName: string | null;
    familyName: string | null;
    prefix: string | null;
    suffix: string | null;
    middleName: string | null;
    nickname: string | null;
  };
}
export type Name = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  givenName: string | null;
  familyName: string | null;
  prefix: string | null;
  suffix: string | null;
  middleName: string | null;
  nickname: string | null;
};
export namespace Phone {
export enum Type {
  HOME = 1,
  MOBILE = 2,
  WORK = 3,
  CUSTOM = 4,
  UNKNOWN = 0,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_DataMessage_Contact_Phone_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Phone;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    value: string | null;
    type: signalservice.DataMessage.Contact.Phone.$NullableType | null;
    label: string | null;
  };
}
export type Phone = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  value: string | null;
  type: signalservice.DataMessage.Contact.Phone.$NullableType | null;
  label: string | null;
};
export namespace Email {
export enum Type {
  HOME = 1,
  MOBILE = 2,
  WORK = 3,
  CUSTOM = 4,
  UNKNOWN = 0,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_DataMessage_Contact_Email_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Email;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    value: string | null;
    type: signalservice.DataMessage.Contact.Email.$NullableType | null;
    label: string | null;
  };
}
export type Email = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  value: string | null;
  type: signalservice.DataMessage.Contact.Email.$NullableType | null;
  label: string | null;
};
export namespace PostalAddress {
export enum Type {
  HOME = 1,
  WORK = 2,
  CUSTOM = 3,
  UNKNOWN = 0,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_DataMessage_Contact_PostalAddress_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PostalAddress;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.DataMessage.Contact.PostalAddress.$NullableType | null;
    label: string | null;
    street: string | null;
    pobox: string | null;
    neighborhood: string | null;
    city: string | null;
    region: string | null;
    postcode: string | null;
    country: string | null;
  };
}
export type PostalAddress = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.DataMessage.Contact.PostalAddress.$NullableType | null;
  label: string | null;
  street: string | null;
  pobox: string | null;
  neighborhood: string | null;
  city: string | null;
  region: string | null;
  postcode: string | null;
  country: string | null;
};
export namespace Avatar {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Avatar;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    avatar: signalservice.AttachmentPointer.Params | null;
    isProfile: boolean | null;
  };
}
export type Avatar = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  avatar: signalservice.AttachmentPointer | null | null;
  isProfile: boolean | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Contact;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    name: signalservice.DataMessage.Contact.Name.Params | null;
    number: Array<signalservice.DataMessage.Contact.Phone.Params> | null;
    email: Array<signalservice.DataMessage.Contact.Email.Params> | null;
    address: Array<signalservice.DataMessage.Contact.PostalAddress.Params> | null;
    avatar: signalservice.DataMessage.Contact.Avatar.Params | null;
    organization: string | null;
  };
}
export type Contact = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  name: signalservice.DataMessage.Contact.Name | null | null;
  number: Array<signalservice.DataMessage.Contact.Phone>;
  email: Array<signalservice.DataMessage.Contact.Email>;
  address: Array<signalservice.DataMessage.Contact.PostalAddress>;
  avatar: signalservice.DataMessage.Contact.Avatar | null | null;
  organization: string | null;
};
export namespace Sticker {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Sticker;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    packId: Uint8Array<ArrayBuffer> | null;
    packKey: Uint8Array<ArrayBuffer> | null;
    stickerId: number | null;
    data: signalservice.AttachmentPointer.Params | null;
    emoji: string | null;
  };
}
export type Sticker = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  packId: Uint8Array<ArrayBuffer> | null;
  packKey: Uint8Array<ArrayBuffer> | null;
  stickerId: number | null;
  data: signalservice.AttachmentPointer | null | null;
  emoji: string | null;
};
export namespace Reaction {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Reaction;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    emoji: string | null;
    remove: boolean | null;
    targetAuthorAci: string | null;
    targetSentTimestamp: bigint | null;
    targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Reaction = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  emoji: string | null;
  remove: boolean | null;
  targetAuthorAci: string | null;
  targetSentTimestamp: bigint | null;
  targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Delete {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Delete;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetSentTimestamp: bigint | null;
  };
}
export type Delete = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetSentTimestamp: bigint | null;
};
export namespace GroupCallUpdate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupCallUpdate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    eraId: string | null;
  };
}
export type GroupCallUpdate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  eraId: string | null;
};
export namespace StoryContext {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StoryContext;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    authorAci: string | null;
    sentTimestamp: bigint | null;
    authorAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type StoryContext = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  authorAci: string | null;
  sentTimestamp: bigint | null;
  authorAciBinary: Uint8Array<ArrayBuffer> | null;
};
export enum ProtocolVersion {
  INITIAL = 0,
  MESSAGE_TIMERS = 1,
  VIEW_ONCE = 2,
  VIEW_ONCE_VIDEO = 3,
  REACTIONS = 4,
  CDN_SELECTOR_ATTACHMENTS = 5,
  MENTIONS = 6,
  PAYMENTS = 7,
  POLLS = 8,
  CURRENT = 8,
}
export type $NullableProtocolVersion =
  | ProtocolVersion
  | (number & { $signalservice_DataMessage_ProtocolVersion: never });
export namespace GiftBadge {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GiftBadge;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    receiptCredentialPresentation: Uint8Array<ArrayBuffer> | null;
  };
}
export type GiftBadge = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  receiptCredentialPresentation: Uint8Array<ArrayBuffer> | null;
};
export namespace PollCreate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PollCreate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    question: string | null;
    allowMultiple: boolean | null;
    options: Array<string> | null;
  };
}
export type PollCreate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  question: string | null;
  allowMultiple: boolean | null;
  options: Array<string>;
};
export namespace PollTerminate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PollTerminate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetSentTimestamp: bigint | null;
  };
}
export type PollTerminate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetSentTimestamp: bigint | null;
};
export namespace PollVote {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PollVote;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
    targetSentTimestamp: bigint | null;
    optionIndexes: Array<number> | null;
    voteCount: number | null;
  };
}
export type PollVote = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
  targetSentTimestamp: bigint | null;
  optionIndexes: Array<number>;
  voteCount: number | null;
};
export namespace PinMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PinMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
    targetSentTimestamp: bigint | null;
    pinDuration: null | $Oneof<{pinDurationSeconds: number; pinDurationForever: boolean;}>;
  };
}
export type PinMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
  targetSentTimestamp: bigint | null;
  pinDuration: null | $Oneof<{pinDurationSeconds: number; pinDurationForever: boolean;}>;
};
export namespace UnpinMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UnpinMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
    targetSentTimestamp: bigint | null;
  };
}
export type UnpinMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
  targetSentTimestamp: bigint | null;
};
export namespace AdminDelete {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AdminDelete;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
    targetSentTimestamp: bigint | null;
  };
}
export type AdminDelete = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetAuthorAciBinary: Uint8Array<ArrayBuffer> | null;
  targetSentTimestamp: bigint | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DataMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    body: string | null;
    attachments: Array<signalservice.AttachmentPointer.Params> | null;
    groupV2: signalservice.GroupContextV2.Params | null;
    flags: number | null;
    expireTimer: number | null;
    expireTimerVersion: number | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
    quote: signalservice.DataMessage.Quote.Params | null;
    contact: Array<signalservice.DataMessage.Contact.Params> | null;
    preview: Array<signalservice.Preview.Params> | null;
    sticker: signalservice.DataMessage.Sticker.Params | null;
    requiredProtocolVersion: number | null;
    isViewOnce: boolean | null;
    reaction: signalservice.DataMessage.Reaction.Params | null;
    delete: signalservice.DataMessage.Delete.Params | null;
    bodyRanges: Array<signalservice.BodyRange.Params> | null;
    groupCallUpdate: signalservice.DataMessage.GroupCallUpdate.Params | null;
    payment: signalservice.DataMessage.Payment.Params | null;
    storyContext: signalservice.DataMessage.StoryContext.Params | null;
    giftBadge: signalservice.DataMessage.GiftBadge.Params | null;
    pollCreate: signalservice.DataMessage.PollCreate.Params | null;
    pollTerminate: signalservice.DataMessage.PollTerminate.Params | null;
    pollVote: signalservice.DataMessage.PollVote.Params | null;
    pinMessage: signalservice.DataMessage.PinMessage.Params | null;
    unpinMessage: signalservice.DataMessage.UnpinMessage.Params | null;
    adminDelete: signalservice.DataMessage.AdminDelete.Params | null;
  };
}
export type DataMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  body: string | null;
  attachments: Array<signalservice.AttachmentPointer>;
  groupV2: signalservice.GroupContextV2 | null | null;
  flags: number | null;
  expireTimer: number | null;
  expireTimerVersion: number | null;
  profileKey: Uint8Array<ArrayBuffer> | null;
  timestamp: bigint | null;
  quote: signalservice.DataMessage.Quote | null | null;
  contact: Array<signalservice.DataMessage.Contact>;
  preview: Array<signalservice.Preview>;
  sticker: signalservice.DataMessage.Sticker | null | null;
  requiredProtocolVersion: number | null;
  isViewOnce: boolean | null;
  reaction: signalservice.DataMessage.Reaction | null | null;
  delete: signalservice.DataMessage.Delete | null | null;
  bodyRanges: Array<signalservice.BodyRange>;
  groupCallUpdate: signalservice.DataMessage.GroupCallUpdate | null | null;
  payment: signalservice.DataMessage.Payment | null | null;
  storyContext: signalservice.DataMessage.StoryContext | null | null;
  giftBadge: signalservice.DataMessage.GiftBadge | null | null;
  pollCreate: signalservice.DataMessage.PollCreate | null | null;
  pollTerminate: signalservice.DataMessage.PollTerminate | null | null;
  pollVote: signalservice.DataMessage.PollVote | null | null;
  pinMessage: signalservice.DataMessage.PinMessage | null | null;
  unpinMessage: signalservice.DataMessage.UnpinMessage | null | null;
  adminDelete: signalservice.DataMessage.AdminDelete | null | null;
};
export namespace NullMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): NullMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    padding: Uint8Array<ArrayBuffer> | null;
  };
}
export type NullMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  padding: Uint8Array<ArrayBuffer> | null;
};
export namespace ReceiptMessage {
export enum Type {
  DELIVERY = 0,
  READ = 1,
  VIEWED = 2,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_ReceiptMessage_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ReceiptMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.ReceiptMessage.$NullableType | null;
    timestamp: Array<bigint> | null;
  };
}
export type ReceiptMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.ReceiptMessage.$NullableType | null;
  timestamp: Array<bigint>;
};
export namespace TypingMessage {
export enum Action {
  STARTED = 0,
  STOPPED = 1,
}
export type $NullableAction =
  | Action
  | (number & { $signalservice_TypingMessage_Action: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): TypingMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timestamp: bigint | null;
    action: signalservice.TypingMessage.$NullableAction | null;
    groupId: Uint8Array<ArrayBuffer> | null;
  };
}
export type TypingMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timestamp: bigint | null;
  action: signalservice.TypingMessage.$NullableAction | null;
  groupId: Uint8Array<ArrayBuffer> | null;
};
export namespace StoryMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StoryMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    group: signalservice.GroupContextV2.Params | null;
    attachment: null | $Oneof<{fileAttachment: signalservice.AttachmentPointer.Params; textAttachment: signalservice.TextAttachment.Params;}>;
    allowsReplies: boolean | null;
    bodyRanges: Array<signalservice.BodyRange.Params> | null;
  };
}
export type StoryMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  profileKey: Uint8Array<ArrayBuffer> | null;
  group: signalservice.GroupContextV2 | null | null;
  attachment: null | $Oneof<{fileAttachment: signalservice.AttachmentPointer; textAttachment: signalservice.TextAttachment;}>;
  allowsReplies: boolean | null;
  bodyRanges: Array<signalservice.BodyRange>;
};
export namespace Preview {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Preview;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    url: string | null;
    title: string | null;
    image: signalservice.AttachmentPointer.Params | null;
    description: string | null;
    date: bigint | null;
  };
}
export type Preview = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  url: string | null;
  title: string | null;
  image: signalservice.AttachmentPointer | null | null;
  description: string | null;
  date: bigint | null;
};
export namespace TextAttachment {
export enum Style {
  DEFAULT = 0,
  REGULAR = 1,
  BOLD = 2,
  SERIF = 3,
  SCRIPT = 4,
  CONDENSED = 5,
}
export type $NullableStyle =
  | Style
  | (number & { $signalservice_TextAttachment_Style: never });
export namespace Gradient {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Gradient;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    startColor: number | null;
    endColor: number | null;
    angle: number | null;
    colors: Array<number> | null;
    positions: Array<number> | null;
  };
}
export type Gradient = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  startColor: number | null;
  endColor: number | null;
  angle: number | null;
  colors: Array<number>;
  positions: Array<number>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): TextAttachment;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    text: string | null;
    textStyle: signalservice.TextAttachment.$NullableStyle | null;
    textForegroundColor: number | null;
    textBackgroundColor: number | null;
    preview: signalservice.Preview.Params | null;
    background: null | $Oneof<{gradient: signalservice.TextAttachment.Gradient.Params; color: number;}>;
  };
}
export type TextAttachment = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  text: string | null;
  textStyle: signalservice.TextAttachment.$NullableStyle | null;
  textForegroundColor: number | null;
  textBackgroundColor: number | null;
  preview: signalservice.Preview | null | null;
  background: null | $Oneof<{gradient: signalservice.TextAttachment.Gradient; color: number;}>;
};
export namespace Verified {
export enum State {
  DEFAULT = 0,
  VERIFIED = 1,
  UNVERIFIED = 2,
}
export type $NullableState =
  | State
  | (number & { $signalservice_Verified_State: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Verified;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destinationAci: string | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    state: signalservice.Verified.$NullableState | null;
    nullMessage: Uint8Array<ArrayBuffer> | null;
    destinationAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Verified = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destinationAci: string | null;
  identityKey: Uint8Array<ArrayBuffer> | null;
  state: signalservice.Verified.$NullableState | null;
  nullMessage: Uint8Array<ArrayBuffer> | null;
  destinationAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace SyncMessage {
export namespace Sent {
export namespace UnidentifiedDeliveryStatus {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UnidentifiedDeliveryStatus;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destinationServiceId: string | null;
    unidentified: boolean | null;
    destinationPniIdentityKey: Uint8Array<ArrayBuffer> | null;
    destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type UnidentifiedDeliveryStatus = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destinationServiceId: string | null;
  unidentified: boolean | null;
  destinationPniIdentityKey: Uint8Array<ArrayBuffer> | null;
  destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace StoryMessageRecipient {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StoryMessageRecipient;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destinationServiceId: string | null;
    distributionListIds: Array<string> | null;
    isAllowedToReply: boolean | null;
    destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type StoryMessageRecipient = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destinationServiceId: string | null;
  distributionListIds: Array<string>;
  isAllowedToReply: boolean | null;
  destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Sent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destinationE164: string | null;
    destinationServiceId: string | null;
    timestamp: bigint | null;
    message: signalservice.DataMessage.Params | null;
    expirationStartTimestamp: bigint | null;
    unidentifiedStatus: Array<signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus.Params> | null;
    isRecipientUpdate: boolean | null;
    storyMessage: signalservice.StoryMessage.Params | null;
    storyMessageRecipients: Array<signalservice.SyncMessage.Sent.StoryMessageRecipient.Params> | null;
    editMessage: signalservice.EditMessage.Params | null;
    destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Sent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destinationE164: string | null;
  destinationServiceId: string | null;
  timestamp: bigint | null;
  message: signalservice.DataMessage | null | null;
  expirationStartTimestamp: bigint | null;
  unidentifiedStatus: Array<signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus>;
  isRecipientUpdate: boolean;
  storyMessage: signalservice.StoryMessage | null | null;
  storyMessageRecipients: Array<signalservice.SyncMessage.Sent.StoryMessageRecipient>;
  editMessage: signalservice.EditMessage | null | null;
  destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Contacts {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Contacts;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    blob: signalservice.AttachmentPointer.Params | null;
    complete: boolean | null;
  };
}
export type Contacts = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  blob: signalservice.AttachmentPointer | null | null;
  complete: boolean;
};
export namespace Blocked {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Blocked;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    numbers: Array<string> | null;
    acis: Array<string> | null;
    groupIds: Array<Uint8Array<ArrayBuffer>> | null;
    acisBinary: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type Blocked = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  numbers: Array<string>;
  acis: Array<string>;
  groupIds: Array<Uint8Array<ArrayBuffer>>;
  acisBinary: Array<Uint8Array<ArrayBuffer>>;
};
export namespace Request {
export enum Type {
  UNKNOWN = 0,
  CONTACTS = 1,
  BLOCKED = 3,
  CONFIGURATION = 4,
  KEYS = 5,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_Request_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Request;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.SyncMessage.Request.$NullableType | null;
  };
}
export type Request = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.SyncMessage.Request.$NullableType | null;
};
export namespace Read {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Read;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderAci: string | null;
    timestamp: bigint | null;
    senderAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Read = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderAci: string | null;
  timestamp: bigint | null;
  senderAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Viewed {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Viewed;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderAci: string | null;
    timestamp: bigint | null;
    senderAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Viewed = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderAci: string | null;
  timestamp: bigint | null;
  senderAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace Configuration {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Configuration;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    readReceipts: boolean | null;
    unidentifiedDeliveryIndicators: boolean | null;
    typingIndicators: boolean | null;
    linkPreviews: boolean | null;
  };
}
export type Configuration = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  readReceipts: boolean | null;
  unidentifiedDeliveryIndicators: boolean | null;
  typingIndicators: boolean | null;
  linkPreviews: boolean | null;
};
export namespace StickerPackOperation {
export enum Type {
  INSTALL = 0,
  REMOVE = 1,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_StickerPackOperation_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StickerPackOperation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    packId: Uint8Array<ArrayBuffer> | null;
    packKey: Uint8Array<ArrayBuffer> | null;
    type: signalservice.SyncMessage.StickerPackOperation.$NullableType | null;
  };
}
export type StickerPackOperation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  packId: Uint8Array<ArrayBuffer> | null;
  packKey: Uint8Array<ArrayBuffer> | null;
  type: signalservice.SyncMessage.StickerPackOperation.$NullableType | null;
};
export namespace ViewOnceOpen {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ViewOnceOpen;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderAci: string | null;
    timestamp: bigint | null;
    senderAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type ViewOnceOpen = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderAci: string | null;
  timestamp: bigint | null;
  senderAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace FetchLatest {
export enum Type {
  UNKNOWN = 0,
  LOCAL_PROFILE = 1,
  STORAGE_MANIFEST = 2,
  SUBSCRIPTION_STATUS = 3,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_FetchLatest_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FetchLatest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.SyncMessage.FetchLatest.$NullableType | null;
  };
}
export type FetchLatest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.SyncMessage.FetchLatest.$NullableType | null;
};
export namespace Keys {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Keys;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    master: Uint8Array<ArrayBuffer> | null;
    accountEntropyPool: string | null;
    mediaRootBackupKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type Keys = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  master: Uint8Array<ArrayBuffer> | null;
  accountEntropyPool: string | null;
  mediaRootBackupKey: Uint8Array<ArrayBuffer> | null;
};
export namespace PniIdentity {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PniIdentity;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    privateKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type PniIdentity = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer> | null;
  privateKey: Uint8Array<ArrayBuffer> | null;
};
export namespace MessageRequestResponse {
export enum Type {
  UNKNOWN = 0,
  ACCEPT = 1,
  DELETE = 2,
  BLOCK = 3,
  BLOCK_AND_DELETE = 4,
  SPAM = 5,
  BLOCK_AND_SPAM = 6,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_MessageRequestResponse_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessageRequestResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    threadAci: string | null;
    groupId: Uint8Array<ArrayBuffer> | null;
    type: signalservice.SyncMessage.MessageRequestResponse.$NullableType | null;
    threadAciBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type MessageRequestResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  threadAci: string | null;
  groupId: Uint8Array<ArrayBuffer> | null;
  type: signalservice.SyncMessage.MessageRequestResponse.$NullableType | null;
  threadAciBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace OutgoingPayment {
export namespace MobileCoin {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MobileCoin;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    recipientAddress: Uint8Array<ArrayBuffer> | null;
    amountPicoMob: bigint | null;
    feePicoMob: bigint | null;
    receipt: Uint8Array<ArrayBuffer> | null;
    ledgerBlockTimestamp: bigint | null;
    ledgerBlockIndex: bigint | null;
    spentKeyImages: Array<Uint8Array<ArrayBuffer>> | null;
    outputPublicKeys: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type MobileCoin = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  recipientAddress: Uint8Array<ArrayBuffer> | null;
  amountPicoMob: bigint | null;
  feePicoMob: bigint | null;
  receipt: Uint8Array<ArrayBuffer> | null;
  ledgerBlockTimestamp: bigint | null;
  ledgerBlockIndex: bigint | null;
  spentKeyImages: Array<Uint8Array<ArrayBuffer>>;
  outputPublicKeys: Array<Uint8Array<ArrayBuffer>>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): OutgoingPayment;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    recipientServiceId: string | null;
    note: string | null;
    attachmentIdentifier: null | $Oneof<{mobileCoin: signalservice.SyncMessage.OutgoingPayment.MobileCoin.Params;}>;
  };
}
export type OutgoingPayment = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  recipientServiceId: string | null;
  note: string | null;
  attachmentIdentifier: null | $Oneof<{mobileCoin: signalservice.SyncMessage.OutgoingPayment.MobileCoin;}>;
};
export namespace PniChangeNumber {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PniChangeNumber;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityKeyPair: Uint8Array<ArrayBuffer> | null;
    signedPreKey: Uint8Array<ArrayBuffer> | null;
    lastResortKyberPreKey: Uint8Array<ArrayBuffer> | null;
    registrationId: number | null;
    newE164: string | null;
  };
}
export type PniChangeNumber = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityKeyPair: Uint8Array<ArrayBuffer> | null;
  signedPreKey: Uint8Array<ArrayBuffer> | null;
  lastResortKyberPreKey: Uint8Array<ArrayBuffer> | null;
  registrationId: number | null;
  newE164: string | null;
};
export namespace CallEvent {
export enum Type {
  UNKNOWN_TYPE = 0,
  AUDIO_CALL = 1,
  VIDEO_CALL = 2,
  GROUP_CALL = 3,
  AD_HOC_CALL = 4,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_CallEvent_Type: never });
export enum Direction {
  UNKNOWN_DIRECTION = 0,
  INCOMING = 1,
  OUTGOING = 2,
}
export type $NullableDirection =
  | Direction
  | (number & { $signalservice_SyncMessage_CallEvent_Direction: never });
export enum Event {
  UNKNOWN_EVENT = 0,
  ACCEPTED = 1,
  NOT_ACCEPTED = 2,
  DELETE = 3,
  OBSERVED = 4,
}
export type $NullableEvent =
  | Event
  | (number & { $signalservice_SyncMessage_CallEvent_Event: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    conversationId: Uint8Array<ArrayBuffer> | null;
    callId: bigint | null;
    timestamp: bigint | null;
    type: signalservice.SyncMessage.CallEvent.$NullableType | null;
    direction: signalservice.SyncMessage.CallEvent.$NullableDirection | null;
    event: signalservice.SyncMessage.CallEvent.$NullableEvent | null;
  };
}
export type CallEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  conversationId: Uint8Array<ArrayBuffer> | null;
  callId: bigint | null;
  timestamp: bigint | null;
  type: signalservice.SyncMessage.CallEvent.$NullableType | null;
  direction: signalservice.SyncMessage.CallEvent.$NullableDirection | null;
  event: signalservice.SyncMessage.CallEvent.$NullableEvent | null;
};
export namespace CallLinkUpdate {
export enum Type {
  UPDATE = 0,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_CallLinkUpdate_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallLinkUpdate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    rootKey: Uint8Array<ArrayBuffer> | null;
    adminPasskey: Uint8Array<ArrayBuffer> | null;
    type: signalservice.SyncMessage.CallLinkUpdate.$NullableType | null;
  };
}
export type CallLinkUpdate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  rootKey: Uint8Array<ArrayBuffer> | null;
  adminPasskey: Uint8Array<ArrayBuffer> | null;
  type: signalservice.SyncMessage.CallLinkUpdate.$NullableType | null;
};
export namespace CallLogEvent {
export enum Type {
  CLEAR = 0,
  MARKED_AS_READ = 1,
  MARKED_AS_READ_IN_CONVERSATION = 2,
  CLEAR_IN_CONVERSATION = 3,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_SyncMessage_CallLogEvent_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallLogEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.SyncMessage.CallLogEvent.$NullableType | null;
    timestamp: bigint | null;
    conversationId: Uint8Array<ArrayBuffer> | null;
    callId: bigint | null;
  };
}
export type CallLogEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.SyncMessage.CallLogEvent.$NullableType | null;
  timestamp: bigint | null;
  conversationId: Uint8Array<ArrayBuffer> | null;
  callId: bigint | null;
};
export namespace DeleteForMe {
export namespace MessageDeletes {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessageDeletes;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    conversation: signalservice.ConversationIdentifier.Params | null;
    messages: Array<signalservice.AddressableMessage.Params> | null;
  };
}
export type MessageDeletes = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  conversation: signalservice.ConversationIdentifier | null | null;
  messages: Array<signalservice.AddressableMessage>;
};
export namespace AttachmentDelete {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentDelete;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    conversation: signalservice.ConversationIdentifier.Params | null;
    targetMessage: signalservice.AddressableMessage.Params | null;
    clientUuid: Uint8Array<ArrayBuffer> | null;
    fallbackDigest: Uint8Array<ArrayBuffer> | null;
    fallbackPlaintextHash: Uint8Array<ArrayBuffer> | null;
  };
}
export type AttachmentDelete = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  conversation: signalservice.ConversationIdentifier | null | null;
  targetMessage: signalservice.AddressableMessage | null | null;
  clientUuid: Uint8Array<ArrayBuffer> | null;
  fallbackDigest: Uint8Array<ArrayBuffer> | null;
  fallbackPlaintextHash: Uint8Array<ArrayBuffer> | null;
};
export namespace ConversationDelete {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConversationDelete;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    conversation: signalservice.ConversationIdentifier.Params | null;
    mostRecentMessages: Array<signalservice.AddressableMessage.Params> | null;
    isFullDelete: boolean | null;
    mostRecentNonExpiringMessages: Array<signalservice.AddressableMessage.Params> | null;
  };
}
export type ConversationDelete = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  conversation: signalservice.ConversationIdentifier | null | null;
  mostRecentMessages: Array<signalservice.AddressableMessage>;
  isFullDelete: boolean | null;
  mostRecentNonExpiringMessages: Array<signalservice.AddressableMessage>;
};
export namespace LocalOnlyConversationDelete {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LocalOnlyConversationDelete;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    conversation: signalservice.ConversationIdentifier.Params | null;
  };
}
export type LocalOnlyConversationDelete = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  conversation: signalservice.ConversationIdentifier | null | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteForMe;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    messageDeletes: Array<signalservice.SyncMessage.DeleteForMe.MessageDeletes.Params> | null;
    conversationDeletes: Array<signalservice.SyncMessage.DeleteForMe.ConversationDelete.Params> | null;
    localOnlyConversationDeletes: Array<signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.Params> | null;
    attachmentDeletes: Array<signalservice.SyncMessage.DeleteForMe.AttachmentDelete.Params> | null;
  };
}
export type DeleteForMe = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  messageDeletes: Array<signalservice.SyncMessage.DeleteForMe.MessageDeletes>;
  conversationDeletes: Array<signalservice.SyncMessage.DeleteForMe.ConversationDelete>;
  localOnlyConversationDeletes: Array<signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete>;
  attachmentDeletes: Array<signalservice.SyncMessage.DeleteForMe.AttachmentDelete>;
};
export namespace DeviceNameChange {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeviceNameChange;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    deviceId: number | null;
  };
}
export type DeviceNameChange = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  deviceId: number | null;
};
export namespace AttachmentBackfillRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentBackfillRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetMessage: signalservice.AddressableMessage.Params | null;
    targetConversation: signalservice.ConversationIdentifier.Params | null;
  };
}
export type AttachmentBackfillRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetMessage: signalservice.AddressableMessage | null | null;
  targetConversation: signalservice.ConversationIdentifier | null | null;
};
export namespace AttachmentBackfillResponse {
export namespace AttachmentData {
export enum Status {
  PENDING = 0,
  TERMINAL_ERROR = 1,
}
export type $NullableStatus =
  | Status
  | (number & { $signalservice_SyncMessage_AttachmentBackfillResponse_AttachmentData_Status: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentData;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    data: null | $Oneof<{attachment: signalservice.AttachmentPointer.Params; status: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.$NullableStatus;}>;
  };
}
export type AttachmentData = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  data: null | $Oneof<{attachment: signalservice.AttachmentPointer; status: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.$NullableStatus;}>;
};
export enum Error {
  MESSAGE_NOT_FOUND = 0,
}
export type $NullableError =
  | Error
  | (number & { $signalservice_SyncMessage_AttachmentBackfillResponse_Error: never });
export namespace AttachmentDataList {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentDataList;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    attachments: Array<signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Params> | null;
    longText: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Params | null;
  };
}
export type AttachmentDataList = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  attachments: Array<signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData>;
  longText: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData | null | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentBackfillResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetMessage: signalservice.AddressableMessage.Params | null;
    targetConversation: signalservice.ConversationIdentifier.Params | null;
    data: null | $Oneof<{attachments: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.Params; error: signalservice.SyncMessage.AttachmentBackfillResponse.$NullableError;}>;
  };
}
export type AttachmentBackfillResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetMessage: signalservice.AddressableMessage | null | null;
  targetConversation: signalservice.ConversationIdentifier | null | null;
  data: null | $Oneof<{attachments: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList; error: signalservice.SyncMessage.AttachmentBackfillResponse.$NullableError;}>;
};
export namespace UsernameChange {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UsernameChange;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type UsernameChange = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SyncMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    content: null | $Oneof<{sent: signalservice.SyncMessage.Sent.Params; contacts: signalservice.SyncMessage.Contacts.Params; request: signalservice.SyncMessage.Request.Params; blocked: signalservice.SyncMessage.Blocked.Params; verified: signalservice.Verified.Params; configuration: signalservice.SyncMessage.Configuration.Params; viewOnceOpen: signalservice.SyncMessage.ViewOnceOpen.Params; fetchLatest: signalservice.SyncMessage.FetchLatest.Params; keys: signalservice.SyncMessage.Keys.Params; messageRequestResponse: signalservice.SyncMessage.MessageRequestResponse.Params; outgoingPayment: signalservice.SyncMessage.OutgoingPayment.Params; pniChangeNumber: signalservice.SyncMessage.PniChangeNumber.Params; callEvent: signalservice.SyncMessage.CallEvent.Params; callLinkUpdate: signalservice.SyncMessage.CallLinkUpdate.Params; callLogEvent: signalservice.SyncMessage.CallLogEvent.Params; deleteForMe: signalservice.SyncMessage.DeleteForMe.Params; deviceNameChange: signalservice.SyncMessage.DeviceNameChange.Params; attachmentBackfillRequest: signalservice.SyncMessage.AttachmentBackfillRequest.Params; attachmentBackfillResponse: signalservice.SyncMessage.AttachmentBackfillResponse.Params; usernameChange: signalservice.SyncMessage.UsernameChange.Params;}>;
    read: Array<signalservice.SyncMessage.Read.Params> | null;
    stickerPackOperation: Array<signalservice.SyncMessage.StickerPackOperation.Params> | null;
    viewed: Array<signalservice.SyncMessage.Viewed.Params> | null;
    padding: Uint8Array<ArrayBuffer> | null;
  };
}
export type SyncMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  content: null | $Oneof<{sent: signalservice.SyncMessage.Sent; contacts: signalservice.SyncMessage.Contacts; request: signalservice.SyncMessage.Request; blocked: signalservice.SyncMessage.Blocked; verified: signalservice.Verified; configuration: signalservice.SyncMessage.Configuration; viewOnceOpen: signalservice.SyncMessage.ViewOnceOpen; fetchLatest: signalservice.SyncMessage.FetchLatest; keys: signalservice.SyncMessage.Keys; messageRequestResponse: signalservice.SyncMessage.MessageRequestResponse; outgoingPayment: signalservice.SyncMessage.OutgoingPayment; pniChangeNumber: signalservice.SyncMessage.PniChangeNumber; callEvent: signalservice.SyncMessage.CallEvent; callLinkUpdate: signalservice.SyncMessage.CallLinkUpdate; callLogEvent: signalservice.SyncMessage.CallLogEvent; deleteForMe: signalservice.SyncMessage.DeleteForMe; deviceNameChange: signalservice.SyncMessage.DeviceNameChange; attachmentBackfillRequest: signalservice.SyncMessage.AttachmentBackfillRequest; attachmentBackfillResponse: signalservice.SyncMessage.AttachmentBackfillResponse; usernameChange: signalservice.SyncMessage.UsernameChange;}>;
  read: Array<signalservice.SyncMessage.Read>;
  stickerPackOperation: Array<signalservice.SyncMessage.StickerPackOperation>;
  viewed: Array<signalservice.SyncMessage.Viewed>;
  padding: Uint8Array<ArrayBuffer> | null;
};
export namespace AttachmentPointer {
export enum Flags {
  VOICE_MESSAGE = 1,
  BORDERLESS = 2,
  GIF = 8,
  UNKNOWN = 0,
}
export type $NullableFlags =
  | Flags
  | (number & { $signalservice_AttachmentPointer_Flags: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AttachmentPointer;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    attachmentIdentifier: null | $Oneof<{cdnId: bigint; cdnKey: string;}>;
    clientUuid: Uint8Array<ArrayBuffer> | null;
    contentType: string | null;
    key: Uint8Array<ArrayBuffer> | null;
    size: number | null;
    thumbnail: Uint8Array<ArrayBuffer> | null;
    digest: Uint8Array<ArrayBuffer> | null;
    incrementalMac: Uint8Array<ArrayBuffer> | null;
    chunkSize: number | null;
    fileName: string | null;
    flags: number | null;
    width: number | null;
    height: number | null;
    caption: string | null;
    blurHash: string | null;
    uploadTimestamp: bigint | null;
    cdnNumber: number | null;
  };
}
export type AttachmentPointer = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  attachmentIdentifier: null | $Oneof<{cdnId: bigint; cdnKey: string;}>;
  clientUuid: Uint8Array<ArrayBuffer> | null;
  contentType: string | null;
  key: Uint8Array<ArrayBuffer> | null;
  size: number | null;
  thumbnail: Uint8Array<ArrayBuffer> | null;
  digest: Uint8Array<ArrayBuffer> | null;
  incrementalMac: Uint8Array<ArrayBuffer> | null;
  chunkSize: number | null;
  fileName: string | null;
  flags: number | null;
  width: number | null;
  height: number | null;
  caption: string | null;
  blurHash: string | null;
  uploadTimestamp: bigint | null;
  cdnNumber: number | null;
};
export namespace GroupContextV2 {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupContextV2;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    masterKey: Uint8Array<ArrayBuffer> | null;
    revision: number | null;
    groupChange: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupContextV2 = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  masterKey: Uint8Array<ArrayBuffer> | null;
  revision: number | null;
  groupChange: Uint8Array<ArrayBuffer> | null;
};
export namespace ContactDetails {
export namespace Avatar {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Avatar;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    contentType: string | null;
    length: number | null;
  };
}
export type Avatar = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  contentType: string | null;
  length: number | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ContactDetails;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    number: string | null;
    aci: string | null;
    aciBinary: Uint8Array<ArrayBuffer> | null;
    name: string | null;
    avatar: signalservice.ContactDetails.Avatar.Params | null;
    expireTimer: number | null;
    expireTimerVersion: number | null;
    inboxPosition: number | null;
  };
}
export type ContactDetails = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  number: string | null;
  aci: string | null;
  aciBinary: Uint8Array<ArrayBuffer> | null;
  name: string | null;
  avatar: signalservice.ContactDetails.Avatar | null | null;
  expireTimer: number | null;
  expireTimerVersion: number | null;
  inboxPosition: number | null;
};
export namespace PaymentAddress {
export namespace MobileCoin {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MobileCoin;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    publicAddress: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type MobileCoin = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  publicAddress: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PaymentAddress;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    Address: null | $Oneof<{mobileCoin: signalservice.PaymentAddress.MobileCoin.Params;}>;
  };
}
export type PaymentAddress = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  Address: null | $Oneof<{mobileCoin: signalservice.PaymentAddress.MobileCoin;}>;
};
export namespace DecryptionErrorMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DecryptionErrorMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    ratchetKey: Uint8Array<ArrayBuffer> | null;
    timestamp: bigint | null;
    deviceId: number | null;
  };
}
export type DecryptionErrorMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  ratchetKey: Uint8Array<ArrayBuffer> | null;
  timestamp: bigint | null;
  deviceId: number | null;
};
export namespace PniSignatureMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PniSignatureMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    pni: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type PniSignatureMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  pni: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
export namespace EditMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): EditMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetSentTimestamp: bigint | null;
    dataMessage: signalservice.DataMessage.Params | null;
  };
}
export type EditMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetSentTimestamp: bigint | null;
  dataMessage: signalservice.DataMessage | null | null;
};
export namespace BodyRange {
export enum Style {
  NONE = 0,
  BOLD = 1,
  ITALIC = 2,
  SPOILER = 3,
  STRIKETHROUGH = 4,
  MONOSPACE = 5,
}
export type $NullableStyle =
  | Style
  | (number & { $signalservice_BodyRange_Style: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): BodyRange;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    start: number | null;
    length: number | null;
    associatedValue: null | $Oneof<{mentionAci: string; style: signalservice.BodyRange.$NullableStyle; mentionAciBinary: Uint8Array<ArrayBuffer>;}>;
  };
}
export type BodyRange = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  start: number | null;
  length: number | null;
  associatedValue: null | $Oneof<{mentionAci: string; style: signalservice.BodyRange.$NullableStyle; mentionAciBinary: Uint8Array<ArrayBuffer>;}>;
};
export namespace AddressableMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AddressableMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    author: null | $Oneof<{authorServiceId: string; authorE164: string; authorServiceIdBinary: Uint8Array<ArrayBuffer>;}>;
    sentTimestamp: bigint | null;
  };
}
export type AddressableMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  author: null | $Oneof<{authorServiceId: string; authorE164: string; authorServiceIdBinary: Uint8Array<ArrayBuffer>;}>;
  sentTimestamp: bigint | null;
};
export namespace ConversationIdentifier {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConversationIdentifier;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identifier: null | $Oneof<{threadServiceId: string; threadGroupId: Uint8Array<ArrayBuffer>; threadE164: string; threadServiceIdBinary: Uint8Array<ArrayBuffer>;}>;
  };
}
export type ConversationIdentifier = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identifier: null | $Oneof<{threadServiceId: string; threadGroupId: Uint8Array<ArrayBuffer>; threadE164: string; threadServiceIdBinary: Uint8Array<ArrayBuffer>;}>;
};
}
export namespace signalservice {
export enum OptionalBool {
  UNSET = 0,
  ENABLED = 1,
  DISABLED = 2,
}
export type $NullableOptionalBool =
  | OptionalBool
  | (number & { $signalservice_OptionalBool: never });
export namespace StorageManifest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StorageManifest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    version: bigint | null;
    value: Uint8Array<ArrayBuffer> | null;
  };
}
export type StorageManifest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  version: bigint;
  value: Uint8Array<ArrayBuffer>;
};
export namespace StorageItem {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StorageItem;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    key: Uint8Array<ArrayBuffer> | null;
    value: Uint8Array<ArrayBuffer> | null;
  };
}
export type StorageItem = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  key: Uint8Array<ArrayBuffer>;
  value: Uint8Array<ArrayBuffer>;
};
export namespace StorageItems {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StorageItems;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    items: Array<signalservice.StorageItem.Params> | null;
  };
}
export type StorageItems = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  items: Array<signalservice.StorageItem>;
};
export namespace WriteOperation {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): WriteOperation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    manifest: signalservice.StorageManifest.Params | null;
    insertItem: Array<signalservice.StorageItem.Params> | null;
    deleteKey: Array<Uint8Array<ArrayBuffer>> | null;
    clearAll: boolean | null;
  };
}
export type WriteOperation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  manifest: signalservice.StorageManifest | null;
  insertItem: Array<signalservice.StorageItem>;
  deleteKey: Array<Uint8Array<ArrayBuffer>>;
  clearAll: boolean;
};
export namespace ReadOperation {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ReadOperation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    readKey: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ReadOperation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  readKey: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ManifestRecord {
export namespace Identifier {
export enum Type {
  UNKNOWN = 0,
  CONTACT = 1,
  GROUPV1 = 2,
  GROUPV2 = 3,
  ACCOUNT = 4,
  STORY_DISTRIBUTION_LIST = 5,
  STICKER_PACK = 6,
  CALL_LINK = 7,
  CHAT_FOLDER = 8,
  NOTIFICATION_PROFILE = 9,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_ManifestRecord_Identifier_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Identifier;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    raw: Uint8Array<ArrayBuffer> | null;
    type: signalservice.ManifestRecord.Identifier.$NullableType | null;
  };
}
export type Identifier = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  raw: Uint8Array<ArrayBuffer>;
  type: signalservice.ManifestRecord.Identifier.$NullableType;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ManifestRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    version: bigint | null;
    sourceDevice: number | null;
    identifiers: Array<signalservice.ManifestRecord.Identifier.Params> | null;
    recordIkm: Uint8Array<ArrayBuffer> | null;
  };
}
export type ManifestRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  version: bigint;
  sourceDevice: number;
  identifiers: Array<signalservice.ManifestRecord.Identifier>;
  recordIkm: Uint8Array<ArrayBuffer>;
};
export namespace StorageRecord {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StorageRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    record: null | $Oneof<{contact: signalservice.ContactRecord.Params; groupV1: signalservice.GroupV1Record.Params; groupV2: signalservice.GroupV2Record.Params; account: signalservice.AccountRecord.Params; storyDistributionList: signalservice.StoryDistributionListRecord.Params; stickerPack: signalservice.StickerPackRecord.Params; callLink: signalservice.CallLinkRecord.Params; chatFolder: signalservice.ChatFolderRecord.Params; notificationProfile: signalservice.NotificationProfile.Params;}>;
  };
}
export type StorageRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  record: null | $Oneof<{contact: signalservice.ContactRecord; groupV1: signalservice.GroupV1Record; groupV2: signalservice.GroupV2Record; account: signalservice.AccountRecord; storyDistributionList: signalservice.StoryDistributionListRecord; stickerPack: signalservice.StickerPackRecord; callLink: signalservice.CallLinkRecord; chatFolder: signalservice.ChatFolderRecord; notificationProfile: signalservice.NotificationProfile;}>;
};
export enum AvatarColor {
  A100 = 0,
  A110 = 1,
  A120 = 2,
  A130 = 3,
  A140 = 4,
  A150 = 5,
  A160 = 6,
  A170 = 7,
  A180 = 8,
  A190 = 9,
  A200 = 10,
  A210 = 11,
}
export type $NullableAvatarColor =
  | AvatarColor
  | (number & { $signalservice_AvatarColor: never });
export namespace ContactRecord {
export enum IdentityState {
  DEFAULT = 0,
  VERIFIED = 1,
  UNVERIFIED = 2,
}
export type $NullableIdentityState =
  | IdentityState
  | (number & { $signalservice_ContactRecord_IdentityState: never });
export namespace Name {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Name;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    given: string | null;
    family: string | null;
  };
}
export type Name = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  given: string;
  family: string;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ContactRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: string | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    identityState: signalservice.ContactRecord.$NullableIdentityState | null;
    givenName: string | null;
    familyName: string | null;
    username: string | null;
    blocked: boolean | null;
    whitelisted: boolean | null;
    archived: boolean | null;
    markedUnread: boolean | null;
    mutedUntilTimestamp: bigint | null;
    hideStory: boolean | null;
    unregisteredAtTimestamp: bigint | null;
    systemGivenName: string | null;
    systemFamilyName: string | null;
    systemNickname: string | null;
    hidden: boolean | null;
    pniSignatureVerified: boolean | null;
    nickname: signalservice.ContactRecord.Name.Params | null;
    note: string | null;
    avatarColor: signalservice.$NullableAvatarColor | null;
    aciBinary: Uint8Array<ArrayBuffer> | null;
    pniBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type ContactRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: string;
  profileKey: Uint8Array<ArrayBuffer>;
  identityKey: Uint8Array<ArrayBuffer>;
  identityState: signalservice.ContactRecord.$NullableIdentityState;
  givenName: string;
  familyName: string;
  username: string;
  blocked: boolean;
  whitelisted: boolean;
  archived: boolean;
  markedUnread: boolean;
  mutedUntilTimestamp: bigint;
  hideStory: boolean;
  unregisteredAtTimestamp: bigint;
  systemGivenName: string;
  systemFamilyName: string;
  systemNickname: string;
  hidden: boolean;
  pniSignatureVerified: boolean;
  nickname: signalservice.ContactRecord.Name | null;
  note: string;
  avatarColor: signalservice.$NullableAvatarColor | null;
  aciBinary: Uint8Array<ArrayBuffer>;
  pniBinary: Uint8Array<ArrayBuffer>;
};
export namespace GroupV1Record {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupV1Record;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: Uint8Array<ArrayBuffer> | null;
  };
}
export type GroupV1Record = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: Uint8Array<ArrayBuffer>;
};
export namespace GroupV2Record {
export enum StorySendMode {
  DEFAULT = 0,
  DISABLED = 1,
  ENABLED = 2,
}
export type $NullableStorySendMode =
  | StorySendMode
  | (number & { $signalservice_GroupV2Record_StorySendMode: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GroupV2Record;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    masterKey: Uint8Array<ArrayBuffer> | null;
    blocked: boolean | null;
    whitelisted: boolean | null;
    archived: boolean | null;
    markedUnread: boolean | null;
    mutedUntilTimestamp: bigint | null;
    dontNotifyForMentionsIfMuted: boolean | null;
    hideStory: boolean | null;
    storySendMode: signalservice.GroupV2Record.$NullableStorySendMode | null;
    avatarColor: signalservice.$NullableAvatarColor | null;
  };
}
export type GroupV2Record = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  masterKey: Uint8Array<ArrayBuffer>;
  blocked: boolean;
  whitelisted: boolean;
  archived: boolean;
  markedUnread: boolean;
  mutedUntilTimestamp: bigint;
  dontNotifyForMentionsIfMuted: boolean;
  hideStory: boolean;
  storySendMode: signalservice.GroupV2Record.$NullableStorySendMode;
  avatarColor: signalservice.$NullableAvatarColor | null;
};
export namespace Payments {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Payments;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    enabled: boolean | null;
    entropy: Uint8Array<ArrayBuffer> | null;
  };
}
export type Payments = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  enabled: boolean;
  entropy: Uint8Array<ArrayBuffer>;
};
export namespace AccountRecord {
export enum PhoneNumberSharingMode {
  UNKNOWN = 0,
  EVERYBODY = 1,
  NOBODY = 2,
}
export type $NullablePhoneNumberSharingMode =
  | PhoneNumberSharingMode
  | (number & { $signalservice_AccountRecord_PhoneNumberSharingMode: never });
export namespace PinnedConversation {
export namespace Contact {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Contact;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: string | null;
    serviceIdBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Contact = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: string;
  serviceIdBinary: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PinnedConversation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identifier: null | $Oneof<{contact: signalservice.AccountRecord.PinnedConversation.Contact.Params; legacyGroupId: Uint8Array<ArrayBuffer>; groupMasterKey: Uint8Array<ArrayBuffer>;}>;
  };
}
export type PinnedConversation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identifier: null | $Oneof<{contact: signalservice.AccountRecord.PinnedConversation.Contact; legacyGroupId: Uint8Array<ArrayBuffer>; groupMasterKey: Uint8Array<ArrayBuffer>;}>;
};
export namespace UsernameLink {
export enum Color {
  UNKNOWN = 0,
  BLUE = 1,
  WHITE = 2,
  GREY = 3,
  OLIVE = 4,
  GREEN = 5,
  ORANGE = 6,
  PINK = 7,
  PURPLE = 8,
}
export type $NullableColor =
  | Color
  | (number & { $signalservice_AccountRecord_UsernameLink_Color: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UsernameLink;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    entropy: Uint8Array<ArrayBuffer> | null;
    serverId: Uint8Array<ArrayBuffer> | null;
    color: signalservice.AccountRecord.UsernameLink.$NullableColor | null;
  };
}
export type UsernameLink = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  entropy: Uint8Array<ArrayBuffer>;
  serverId: Uint8Array<ArrayBuffer>;
  color: signalservice.AccountRecord.UsernameLink.$NullableColor;
};
export namespace IAPSubscriberData {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): IAPSubscriberData;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    subscriberId: Uint8Array<ArrayBuffer> | null;
    iapSubscriptionId: null | $Oneof<{purchaseToken: string; originalTransactionId: bigint;}>;
  };
}
export type IAPSubscriberData = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  subscriberId: Uint8Array<ArrayBuffer>;
  iapSubscriptionId: null | $Oneof<{purchaseToken: string; originalTransactionId: bigint;}>;
};
export namespace BackupTierHistory {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): BackupTierHistory;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    backupTier: bigint | null;
    endedAtTimestamp: bigint | null;
  };
}
export type BackupTierHistory = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  backupTier: bigint | null;
  endedAtTimestamp: bigint | null;
};
export namespace NotificationProfileManualOverride {
export namespace ManuallyEnabled {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ManuallyEnabled;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: Uint8Array<ArrayBuffer> | null;
    endAtTimestampMs: bigint | null;
  };
}
export type ManuallyEnabled = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: Uint8Array<ArrayBuffer>;
  endAtTimestampMs: bigint;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): NotificationProfileManualOverride;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    override: null | $Oneof<{disabledAtTimestampMs: bigint; enabled: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled.Params;}>;
  };
}
export type NotificationProfileManualOverride = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  override: null | $Oneof<{disabledAtTimestampMs: bigint; enabled: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled;}>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AccountRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    profileKey: Uint8Array<ArrayBuffer> | null;
    givenName: string | null;
    familyName: string | null;
    avatarUrlPath: string | null;
    noteToSelfArchived: boolean | null;
    readReceipts: boolean | null;
    sealedSenderIndicators: boolean | null;
    typingIndicators: boolean | null;
    noteToSelfMarkedUnread: boolean | null;
    linkPreviews: boolean | null;
    phoneNumberSharingMode: signalservice.AccountRecord.$NullablePhoneNumberSharingMode | null;
    unlistedPhoneNumber: boolean | null;
    pinnedConversations: Array<signalservice.AccountRecord.PinnedConversation.Params> | null;
    preferContactAvatars: boolean | null;
    payments: signalservice.Payments.Params | null;
    universalExpireTimer: number | null;
    preferredReactionEmoji: Array<string> | null;
    donorSubscriberId: Uint8Array<ArrayBuffer> | null;
    donorSubscriberCurrencyCode: string | null;
    displayBadgesOnProfile: boolean | null;
    donorSubscriptionManuallyCancelled: boolean | null;
    keepMutedChatsArchived: boolean | null;
    hasSetMyStoriesPrivacy: boolean | null;
    hasViewedOnboardingStory: boolean | null;
    storiesDisabled: boolean | null;
    storyViewReceiptsEnabled: signalservice.$NullableOptionalBool | null;
    hasSeenGroupStoryEducationSheet: boolean | null;
    username: string | null;
    hasCompletedUsernameOnboarding: boolean | null;
    usernameLink: signalservice.AccountRecord.UsernameLink.Params | null;
    hasBackup: boolean | null;
    backupTier: bigint | null;
    backupSubscriberData: signalservice.AccountRecord.IAPSubscriberData.Params | null;
    avatarColor: signalservice.$NullableAvatarColor | null;
    notificationProfileManualOverride: signalservice.AccountRecord.NotificationProfileManualOverride.Params | null;
    notificationProfileSyncDisabled: boolean | null;
  };
}
export type AccountRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  profileKey: Uint8Array<ArrayBuffer>;
  givenName: string;
  familyName: string;
  avatarUrlPath: string;
  noteToSelfArchived: boolean;
  readReceipts: boolean;
  sealedSenderIndicators: boolean;
  typingIndicators: boolean;
  noteToSelfMarkedUnread: boolean;
  linkPreviews: boolean;
  phoneNumberSharingMode: signalservice.AccountRecord.$NullablePhoneNumberSharingMode;
  unlistedPhoneNumber: boolean;
  pinnedConversations: Array<signalservice.AccountRecord.PinnedConversation>;
  preferContactAvatars: boolean;
  payments: signalservice.Payments | null;
  universalExpireTimer: number;
  preferredReactionEmoji: Array<string>;
  donorSubscriberId: Uint8Array<ArrayBuffer>;
  donorSubscriberCurrencyCode: string;
  displayBadgesOnProfile: boolean;
  donorSubscriptionManuallyCancelled: boolean;
  keepMutedChatsArchived: boolean;
  hasSetMyStoriesPrivacy: boolean;
  hasViewedOnboardingStory: boolean;
  storiesDisabled: boolean;
  storyViewReceiptsEnabled: signalservice.$NullableOptionalBool;
  hasSeenGroupStoryEducationSheet: boolean;
  username: string;
  hasCompletedUsernameOnboarding: boolean;
  usernameLink: signalservice.AccountRecord.UsernameLink | null;
  hasBackup: boolean | null;
  backupTier: bigint | null;
  backupSubscriberData: signalservice.AccountRecord.IAPSubscriberData | null;
  avatarColor: signalservice.$NullableAvatarColor | null;
  notificationProfileManualOverride: signalservice.AccountRecord.NotificationProfileManualOverride | null;
  notificationProfileSyncDisabled: boolean;
};
export namespace StoryDistributionListRecord {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StoryDistributionListRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identifier: Uint8Array<ArrayBuffer> | null;
    name: string | null;
    deletedAtTimestamp: bigint | null;
    allowsReplies: boolean | null;
    isBlockList: boolean | null;
    recipientServiceIdsBinary: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type StoryDistributionListRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identifier: Uint8Array<ArrayBuffer>;
  name: string;
  deletedAtTimestamp: bigint;
  allowsReplies: boolean;
  isBlockList: boolean;
  recipientServiceIdsBinary: Array<Uint8Array<ArrayBuffer>>;
};
export namespace StickerPackRecord {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StickerPackRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    packId: Uint8Array<ArrayBuffer> | null;
    packKey: Uint8Array<ArrayBuffer> | null;
    position: number | null;
    deletedAtTimestamp: bigint | null;
  };
}
export type StickerPackRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  packId: Uint8Array<ArrayBuffer>;
  packKey: Uint8Array<ArrayBuffer>;
  position: number;
  deletedAtTimestamp: bigint;
};
export namespace CallLinkRecord {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallLinkRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    rootKey: Uint8Array<ArrayBuffer> | null;
    adminPasskey: Uint8Array<ArrayBuffer> | null;
    deletedAtTimestampMs: bigint | null;
  };
}
export type CallLinkRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  rootKey: Uint8Array<ArrayBuffer>;
  adminPasskey: Uint8Array<ArrayBuffer>;
  deletedAtTimestampMs: bigint;
};
export namespace Recipient {
export namespace Contact {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Contact;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: string | null;
    serviceIdBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Contact = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: string;
  serviceIdBinary: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Recipient;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identifier: null | $Oneof<{contact: signalservice.Recipient.Contact.Params; legacyGroupId: Uint8Array<ArrayBuffer>; groupMasterKey: Uint8Array<ArrayBuffer>;}>;
  };
}
export type Recipient = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identifier: null | $Oneof<{contact: signalservice.Recipient.Contact; legacyGroupId: Uint8Array<ArrayBuffer>; groupMasterKey: Uint8Array<ArrayBuffer>;}>;
};
export namespace ChatFolderRecord {
export enum FolderType {
  UNKNOWN = 0,
  ALL = 1,
  CUSTOM = 2,
}
export type $NullableFolderType =
  | FolderType
  | (number & { $signalservice_ChatFolderRecord_FolderType: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ChatFolderRecord;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: Uint8Array<ArrayBuffer> | null;
    name: string | null;
    position: number | null;
    showOnlyUnread: boolean | null;
    showMutedChats: boolean | null;
    includeAllIndividualChats: boolean | null;
    includeAllGroupChats: boolean | null;
    folderType: signalservice.ChatFolderRecord.$NullableFolderType | null;
    includedRecipients: Array<signalservice.Recipient.Params> | null;
    excludedRecipients: Array<signalservice.Recipient.Params> | null;
    deletedAtTimestampMs: bigint | null;
  };
}
export type ChatFolderRecord = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: Uint8Array<ArrayBuffer>;
  name: string;
  position: number;
  showOnlyUnread: boolean;
  showMutedChats: boolean;
  includeAllIndividualChats: boolean;
  includeAllGroupChats: boolean;
  folderType: signalservice.ChatFolderRecord.$NullableFolderType;
  includedRecipients: Array<signalservice.Recipient>;
  excludedRecipients: Array<signalservice.Recipient>;
  deletedAtTimestampMs: bigint;
};
export namespace NotificationProfile {
export enum DayOfWeek {
  UNKNOWN = 0,
  MONDAY = 1,
  TUESDAY = 2,
  WEDNESDAY = 3,
  THURSDAY = 4,
  FRIDAY = 5,
  SATURDAY = 6,
  SUNDAY = 7,
}
export type $NullableDayOfWeek =
  | DayOfWeek
  | (number & { $signalservice_NotificationProfile_DayOfWeek: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): NotificationProfile;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: Uint8Array<ArrayBuffer> | null;
    name: string | null;
    emoji: string | null;
    color: number | null;
    createdAtMs: bigint | null;
    allowAllCalls: boolean | null;
    allowAllMentions: boolean | null;
    allowedMembers: Array<signalservice.Recipient.Params> | null;
    scheduleEnabled: boolean | null;
    scheduleStartTime: number | null;
    scheduleEndTime: number | null;
    scheduleDaysEnabled: Array<signalservice.NotificationProfile.$NullableDayOfWeek> | null;
    deletedAtTimestampMs: bigint | null;
  };
}
export type NotificationProfile = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: Uint8Array<ArrayBuffer>;
  name: string;
  emoji: string | null;
  color: number;
  createdAtMs: bigint;
  allowAllCalls: boolean;
  allowAllMentions: boolean;
  allowedMembers: Array<signalservice.Recipient>;
  scheduleEnabled: boolean;
  scheduleStartTime: number;
  scheduleEndTime: number;
  scheduleDaysEnabled: Array<signalservice.NotificationProfile.$NullableDayOfWeek>;
  deletedAtTimestampMs: bigint;
};
}
export namespace signalservice {
export namespace StickerPack {
export namespace Sticker {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Sticker;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    emoji: string | null;
  };
}
export type Sticker = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number | null;
  emoji: string | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): StickerPack;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    title: string | null;
    author: string | null;
    cover: signalservice.StickerPack.Sticker.Params | null;
    stickers: Array<signalservice.StickerPack.Sticker.Params> | null;
  };
}
export type StickerPack = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  title: string | null;
  author: string | null;
  cover: signalservice.StickerPack.Sticker | null | null;
  stickers: Array<signalservice.StickerPack.Sticker>;
};
}
export namespace signalservice {
export namespace WebSocketRequestMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): WebSocketRequestMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    verb: string | null;
    path: string | null;
    body: Uint8Array<ArrayBuffer> | null;
    headers: Array<string> | null;
    id: bigint | null;
  };
}
export type WebSocketRequestMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  verb: string | null;
  path: string | null;
  body: Uint8Array<ArrayBuffer> | null;
  headers: Array<string>;
  id: bigint | null;
};
export namespace WebSocketResponseMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): WebSocketResponseMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: bigint | null;
    status: number | null;
    message: string | null;
    headers: Array<string> | null;
    body: Uint8Array<ArrayBuffer> | null;
  };
}
export type WebSocketResponseMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: bigint | null;
  status: number | null;
  message: string | null;
  headers: Array<string>;
  body: Uint8Array<ArrayBuffer> | null;
};
export namespace WebSocketMessage {
export enum Type {
  UNKNOWN = 0,
  REQUEST = 1,
  RESPONSE = 2,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_WebSocketMessage_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): WebSocketMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.WebSocketMessage.$NullableType | null;
    request: signalservice.WebSocketRequestMessage.Params | null;
    response: signalservice.WebSocketResponseMessage.Params | null;
  };
}
export type WebSocketMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.WebSocketMessage.$NullableType | null;
  request: signalservice.WebSocketRequestMessage | null | null;
  response: signalservice.WebSocketResponseMessage | null | null;
};
}
export namespace signalservice {
export namespace ServerCertificate {
export namespace Certificate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Certificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    key: Uint8Array<ArrayBuffer> | null;
  };
}
export type Certificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number | null;
  key: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ServerCertificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    certificate: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type ServerCertificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  certificate: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
export namespace SenderCertificate {
export namespace Certificate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Certificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderE164: string | null;
    senderUuid: string | null;
    senderDevice: number | null;
    expires: bigint | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    signer: signalservice.ServerCertificate.Params | null;
  };
}
export type Certificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderE164: string | null;
  senderUuid: string | null;
  senderDevice: number | null;
  expires: bigint | null;
  identityKey: Uint8Array<ArrayBuffer> | null;
  signer: signalservice.ServerCertificate | null | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderCertificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    certificate: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type SenderCertificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  certificate: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
export namespace UnidentifiedSenderMessage {
export namespace Message {
export enum Type {
  MESSAGE = 2,
  PREKEY_MESSAGE = 3,
  SENDERKEY_MESSAGE = 7,
  PLAINTEXT_CONTENT = 8,
  UNKNOWN = 0,
}
export type $NullableType =
  | Type
  | (number & { $signalservice_UnidentifiedSenderMessage_Message_Type: never });
export enum ContentHint {
  DEFAULT = 0,
  RESENDABLE = 1,
  IMPLICIT = 2,
}
export type $NullableContentHint =
  | ContentHint
  | (number & { $signalservice_UnidentifiedSenderMessage_Message_ContentHint: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Message;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: signalservice.UnidentifiedSenderMessage.Message.$NullableType | null;
    senderCertificate: signalservice.SenderCertificate.Params | null;
    content: Uint8Array<ArrayBuffer> | null;
    contentHint: signalservice.UnidentifiedSenderMessage.Message.$NullableContentHint | null;
    groupId: Uint8Array<ArrayBuffer> | null;
  };
}
export type Message = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: signalservice.UnidentifiedSenderMessage.Message.$NullableType | null;
  senderCertificate: signalservice.SenderCertificate | null | null;
  content: Uint8Array<ArrayBuffer> | null;
  contentHint: signalservice.UnidentifiedSenderMessage.Message.$NullableContentHint | null;
  groupId: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UnidentifiedSenderMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    ephemeralPublic: Uint8Array<ArrayBuffer> | null;
    encryptedStatic: Uint8Array<ArrayBuffer> | null;
    encryptedMessage: Uint8Array<ArrayBuffer> | null;
  };
}
export type UnidentifiedSenderMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  ephemeralPublic: Uint8Array<ArrayBuffer> | null;
  encryptedStatic: Uint8Array<ArrayBuffer> | null;
  encryptedMessage: Uint8Array<ArrayBuffer> | null;
};
}
export namespace org {
export namespace signal {
export namespace calling {
export namespace survey {
export namespace CallQualitySurveyResponsePubSubMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CallQualitySurveyResponsePubSubMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    responseId: string | null;
    submissionTimestamp: bigint | null;
    asnRegion: string | null;
    clientPlatform: string | null;
    clientVersion: string | null;
    clientUaAdditionalSpecifiers: string | null;
    userSatisfied: boolean | null;
    callQualityIssues: Array<string> | null;
    additionalIssuesDescription: string | null;
    debugLogUrl: string | null;
    startTimestamp: bigint | null;
    endTimestamp: bigint | null;
    callType: string | null;
    success: boolean | null;
    callEndReason: string | null;
    connectionRttMedian: number | null;
    audioRttMedian: number | null;
    videoRttMedian: number | null;
    audioRecvJitterMedian: number | null;
    videoRecvJitterMedian: number | null;
    audioSendJitterMedian: number | null;
    videoSendJitterMedian: number | null;
    audioRecvPacketLossFraction: number | null;
    videoRecvPacketLossFraction: number | null;
    audioSendPacketLossFraction: number | null;
    videoSendPacketLossFraction: number | null;
    callTelemetry: Uint8Array<ArrayBuffer> | null;
  };
}
export type CallQualitySurveyResponsePubSubMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  responseId: string;
  submissionTimestamp: bigint;
  asnRegion: string | null;
  clientPlatform: string | null;
  clientVersion: string | null;
  clientUaAdditionalSpecifiers: string | null;
  userSatisfied: boolean;
  callQualityIssues: Array<string>;
  additionalIssuesDescription: string | null;
  debugLogUrl: string | null;
  startTimestamp: bigint;
  endTimestamp: bigint;
  callType: string;
  success: boolean;
  callEndReason: string;
  connectionRttMedian: number | null;
  audioRttMedian: number | null;
  videoRttMedian: number | null;
  audioRecvJitterMedian: number | null;
  videoRecvJitterMedian: number | null;
  audioSendJitterMedian: number | null;
  videoSendJitterMedian: number | null;
  audioRecvPacketLossFraction: number | null;
  videoRecvPacketLossFraction: number | null;
  audioSendPacketLossFraction: number | null;
  videoSendPacketLossFraction: number | null;
  callTelemetry: Uint8Array<ArrayBuffer> | null;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace auth {
export namespace DisconnectionRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DisconnectionRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    accountIdentifier: Uint8Array<ArrayBuffer> | null;
    deviceIds: Array<number> | null;
  };
}
export type DisconnectionRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  accountIdentifier: Uint8Array<ArrayBuffer>;
  deviceIds: Array<number>;
};
}
}
}
}
export namespace DonationPubSubMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DonationPubSubMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timestamp: bigint | null;
    source: string | null;
    provider: string | null;
    recurring: boolean | null;
    paymentMethodType: string | null;
    originalAmountMicros: bigint | null;
    originalCurrency: string | null;
    originalAmountUsdMicros: bigint | null;
    country: string | null;
    clientPlatform: string | null;
  };
}
export type DonationPubSubMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timestamp: bigint;
  source: string;
  provider: string;
  recurring: boolean;
  paymentMethodType: string;
  originalAmountMicros: bigint;
  originalCurrency: string;
  originalAmountUsdMicros: bigint;
  country: string | null;
  clientPlatform: string | null;
};
export namespace kt_query {
export namespace SearchRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SearchRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aci: Uint8Array<ArrayBuffer> | null;
    aciIdentityKey: Uint8Array<ArrayBuffer> | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
    e164SearchRequest: kt_query.E164SearchRequest.Params | null;
    consistency: kt_query.ConsistencyParameters.Params | null;
  };
}
export type SearchRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aci: Uint8Array<ArrayBuffer>;
  aciIdentityKey: Uint8Array<ArrayBuffer>;
  usernameHash: Uint8Array<ArrayBuffer> | null;
  e164SearchRequest: kt_query.E164SearchRequest | null | null;
  consistency: kt_query.ConsistencyParameters | null;
};
export namespace E164SearchRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): E164SearchRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: string | null;
    unidentifiedAccessKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type E164SearchRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: string | null;
  unidentifiedAccessKey: Uint8Array<ArrayBuffer>;
};
export namespace SearchResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SearchResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeHead: kt_query.FullTreeHead.Params | null;
    aci: kt_query.CondensedTreeSearchResponse.Params | null;
    e164: kt_query.CondensedTreeSearchResponse.Params | null;
    usernameHash: kt_query.CondensedTreeSearchResponse.Params | null;
  };
}
export type SearchResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeHead: kt_query.FullTreeHead | null;
  aci: kt_query.CondensedTreeSearchResponse | null;
  e164: kt_query.CondensedTreeSearchResponse | null | null;
  usernameHash: kt_query.CondensedTreeSearchResponse | null | null;
};
export namespace ConsistencyParameters {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConsistencyParameters;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    last: bigint | null;
    distinguished: bigint | null;
  };
}
export type ConsistencyParameters = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  last: bigint | null;
  distinguished: bigint | null;
};
export namespace DistinguishedRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DistinguishedRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    last: bigint | null;
  };
}
export type DistinguishedRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  last: bigint | null;
};
export namespace DistinguishedResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DistinguishedResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeHead: kt_query.FullTreeHead.Params | null;
    distinguished: kt_query.CondensedTreeSearchResponse.Params | null;
  };
}
export type DistinguishedResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeHead: kt_query.FullTreeHead | null;
  distinguished: kt_query.CondensedTreeSearchResponse | null;
};
export namespace CondensedTreeSearchResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CondensedTreeSearchResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    vrfProof: Uint8Array<ArrayBuffer> | null;
    search: kt_query.SearchProof.Params | null;
    opening: Uint8Array<ArrayBuffer> | null;
    value: kt_query.UpdateValue.Params | null;
  };
}
export type CondensedTreeSearchResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  vrfProof: Uint8Array<ArrayBuffer>;
  search: kt_query.SearchProof | null;
  opening: Uint8Array<ArrayBuffer>;
  value: kt_query.UpdateValue | null;
};
export namespace FullTreeHead {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FullTreeHead;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeHead: kt_query.TreeHead.Params | null;
    last: Array<Uint8Array<ArrayBuffer>> | null;
    distinguished: Array<Uint8Array<ArrayBuffer>> | null;
    fullAuditorTreeHeads: Array<kt_query.FullAuditorTreeHead.Params> | null;
  };
}
export type FullTreeHead = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeHead: kt_query.TreeHead | null;
  last: Array<Uint8Array<ArrayBuffer>>;
  distinguished: Array<Uint8Array<ArrayBuffer>>;
  fullAuditorTreeHeads: Array<kt_query.FullAuditorTreeHead>;
};
export namespace TreeHead {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): TreeHead;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeSize: bigint | null;
    timestamp: bigint | null;
    signatures: Array<kt_query.Signature.Params> | null;
  };
}
export type TreeHead = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeSize: bigint;
  timestamp: bigint;
  signatures: Array<kt_query.Signature>;
};
export namespace Signature {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Signature;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    auditorPublicKey: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type Signature = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  auditorPublicKey: Uint8Array<ArrayBuffer>;
  signature: Uint8Array<ArrayBuffer>;
};
export namespace AuditorTreeHead {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AuditorTreeHead;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeSize: bigint | null;
    timestamp: bigint | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type AuditorTreeHead = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeSize: bigint;
  timestamp: bigint;
  signature: Uint8Array<ArrayBuffer>;
};
export namespace FullAuditorTreeHead {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FullAuditorTreeHead;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeHead: kt_query.AuditorTreeHead.Params | null;
    rootValue: Uint8Array<ArrayBuffer> | null;
    consistency: Array<Uint8Array<ArrayBuffer>> | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type FullAuditorTreeHead = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeHead: kt_query.AuditorTreeHead | null;
  rootValue: Uint8Array<ArrayBuffer> | null;
  consistency: Array<Uint8Array<ArrayBuffer>>;
  publicKey: Uint8Array<ArrayBuffer>;
};
export namespace ProofStep {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProofStep;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    prefix: kt_query.PrefixSearchResult.Params | null;
    commitment: Uint8Array<ArrayBuffer> | null;
  };
}
export type ProofStep = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  prefix: kt_query.PrefixSearchResult | null;
  commitment: Uint8Array<ArrayBuffer>;
};
export namespace SearchProof {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SearchProof;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    pos: bigint | null;
    steps: Array<kt_query.ProofStep.Params> | null;
    inclusion: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SearchProof = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  pos: bigint;
  steps: Array<kt_query.ProofStep>;
  inclusion: Array<Uint8Array<ArrayBuffer>>;
};
export namespace UpdateValue {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UpdateValue;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    value: Uint8Array<ArrayBuffer> | null;
  };
}
export type UpdateValue = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  value: Uint8Array<ArrayBuffer>;
};
export namespace PrefixSearchResult {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PrefixSearchResult;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    proof: Array<Uint8Array<ArrayBuffer>> | null;
    counter: number | null;
  };
}
export type PrefixSearchResult = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  proof: Array<Uint8Array<ArrayBuffer>>;
  counter: number;
};
export namespace MonitorRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MonitorRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aci: kt_query.AciMonitorRequest.Params | null;
    usernameHash: kt_query.UsernameHashMonitorRequest.Params | null;
    e164: kt_query.E164MonitorRequest.Params | null;
    consistency: kt_query.ConsistencyParameters.Params | null;
  };
}
export type MonitorRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aci: kt_query.AciMonitorRequest | null;
  usernameHash: kt_query.UsernameHashMonitorRequest | null | null;
  e164: kt_query.E164MonitorRequest | null | null;
  consistency: kt_query.ConsistencyParameters | null;
};
export namespace AciMonitorRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AciMonitorRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aci: Uint8Array<ArrayBuffer> | null;
    entryPosition: bigint | null;
    commitmentIndex: Uint8Array<ArrayBuffer> | null;
  };
}
export type AciMonitorRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aci: Uint8Array<ArrayBuffer>;
  entryPosition: bigint;
  commitmentIndex: Uint8Array<ArrayBuffer>;
};
export namespace UsernameHashMonitorRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UsernameHashMonitorRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
    entryPosition: bigint | null;
    commitmentIndex: Uint8Array<ArrayBuffer> | null;
  };
}
export type UsernameHashMonitorRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameHash: Uint8Array<ArrayBuffer>;
  entryPosition: bigint;
  commitmentIndex: Uint8Array<ArrayBuffer>;
};
export namespace E164MonitorRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): E164MonitorRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: string | null;
    entryPosition: bigint | null;
    commitmentIndex: Uint8Array<ArrayBuffer> | null;
  };
}
export type E164MonitorRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: string | null;
  entryPosition: bigint;
  commitmentIndex: Uint8Array<ArrayBuffer>;
};
export namespace MonitorProof {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MonitorProof;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    steps: Array<kt_query.ProofStep.Params> | null;
  };
}
export type MonitorProof = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  steps: Array<kt_query.ProofStep>;
};
export namespace MonitorResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MonitorResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    treeHead: kt_query.FullTreeHead.Params | null;
    aci: kt_query.MonitorProof.Params | null;
    usernameHash: kt_query.MonitorProof.Params | null;
    e164: kt_query.MonitorProof.Params | null;
    inclusion: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type MonitorResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  treeHead: kt_query.FullTreeHead | null;
  aci: kt_query.MonitorProof | null;
  usernameHash: kt_query.MonitorProof | null | null;
  e164: kt_query.MonitorProof | null | null;
  inclusion: Array<Uint8Array<ArrayBuffer>>;
};
}
export namespace textsecure {
export namespace PubSubMessage {
export enum Type {
  UNKNOWN = 0,
  QUERY_DB = 1,
  DELIVER = 2,
  KEEPALIVE = 3,
  CLOSE = 4,
  CONNECTED = 5,
}
export type $NullableType =
  | Type
  | (number & { $textsecure_PubSubMessage_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): PubSubMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: textsecure.PubSubMessage.$NullableType | null;
    content: Uint8Array<ArrayBuffer> | null;
  };
}
export type PubSubMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: textsecure.PubSubMessage.$NullableType | null;
  content: Uint8Array<ArrayBuffer> | null;
};
}
export namespace org {
export namespace signal {
export namespace registration {
export namespace rpc {
export namespace CreateRegistrationSessionRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CreateRegistrationSessionRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    e164: bigint | null;
    accountExistsWithE164: boolean | null;
    rateLimitCollationKey: string | null;
    mcc: string | null;
    mnc: string | null;
  };
}
export type CreateRegistrationSessionRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  e164: bigint;
  accountExistsWithE164: boolean;
  rateLimitCollationKey: string;
  mcc: string;
  mnc: string;
};
export namespace CreateRegistrationSessionResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CreateRegistrationSessionResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata.Params; error: org.signal.registration.rpc.CreateRegistrationSessionError.Params;}>;
  };
}
export type CreateRegistrationSessionResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata; error: org.signal.registration.rpc.CreateRegistrationSessionError;}>;
};
export namespace RegistrationSessionMetadata {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RegistrationSessionMetadata;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionId: Uint8Array<ArrayBuffer> | null;
    verified: boolean | null;
    e164: bigint | null;
    mayRequestSms: boolean | null;
    nextSmsSeconds: bigint | null;
    mayRequestVoiceCall: boolean | null;
    nextVoiceCallSeconds: bigint | null;
    mayCheckCode: boolean | null;
    nextCodeCheckSeconds: bigint | null;
    expirationSeconds: bigint | null;
  };
}
export type RegistrationSessionMetadata = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionId: Uint8Array<ArrayBuffer>;
  verified: boolean;
  e164: bigint;
  mayRequestSms: boolean;
  nextSmsSeconds: bigint;
  mayRequestVoiceCall: boolean;
  nextVoiceCallSeconds: bigint;
  mayCheckCode: boolean;
  nextCodeCheckSeconds: bigint;
  expirationSeconds: bigint;
};
export namespace CreateRegistrationSessionError {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CreateRegistrationSessionError;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    errorType: org.signal.registration.rpc.$NullableCreateRegistrationSessionErrorType | null;
    mayRetry: boolean | null;
    retryAfterSeconds: bigint | null;
  };
}
export type CreateRegistrationSessionError = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  errorType: org.signal.registration.rpc.$NullableCreateRegistrationSessionErrorType;
  mayRetry: boolean;
  retryAfterSeconds: bigint;
};
export enum CreateRegistrationSessionErrorType {
  CREATE_REGISTRATION_SESSION_ERROR_TYPE_UNSPECIFIED = 0,
  CREATE_REGISTRATION_SESSION_ERROR_TYPE_RATE_LIMITED = 1,
  CREATE_REGISTRATION_SESSION_ERROR_TYPE_ILLEGAL_PHONE_NUMBER = 2,
}
export type $NullableCreateRegistrationSessionErrorType =
  | CreateRegistrationSessionErrorType
  | (number & { $org_signal_registration_rpc_CreateRegistrationSessionErrorType: never });
export namespace GetRegistrationSessionMetadataRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetRegistrationSessionMetadataRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionId: Uint8Array<ArrayBuffer> | null;
  };
}
export type GetRegistrationSessionMetadataRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionId: Uint8Array<ArrayBuffer>;
};
export namespace GetRegistrationSessionMetadataResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetRegistrationSessionMetadataResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata.Params; error: org.signal.registration.rpc.GetRegistrationSessionMetadataError.Params;}>;
  };
}
export type GetRegistrationSessionMetadataResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata; error: org.signal.registration.rpc.GetRegistrationSessionMetadataError;}>;
};
export namespace GetRegistrationSessionMetadataError {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetRegistrationSessionMetadataError;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    errorType: org.signal.registration.rpc.$NullableGetRegistrationSessionMetadataErrorType | null;
  };
}
export type GetRegistrationSessionMetadataError = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  errorType: org.signal.registration.rpc.$NullableGetRegistrationSessionMetadataErrorType;
};
export enum GetRegistrationSessionMetadataErrorType {
  GET_REGISTRATION_SESSION_METADATA_ERROR_TYPE_UNSPECIFIED = 0,
  GET_REGISTRATION_SESSION_METADATA_ERROR_TYPE_NOT_FOUND = 1,
}
export type $NullableGetRegistrationSessionMetadataErrorType =
  | GetRegistrationSessionMetadataErrorType
  | (number & { $org_signal_registration_rpc_GetRegistrationSessionMetadataErrorType: never });
export namespace SendVerificationCodeRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendVerificationCodeRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    transport: org.signal.registration.rpc.$NullableMessageTransport | null;
    acceptLanguage: string | null;
    clientType: org.signal.registration.rpc.$NullableClientType | null;
    sessionId: Uint8Array<ArrayBuffer> | null;
    senderName: string | null;
  };
}
export type SendVerificationCodeRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  transport: org.signal.registration.rpc.$NullableMessageTransport;
  acceptLanguage: string;
  clientType: org.signal.registration.rpc.$NullableClientType;
  sessionId: Uint8Array<ArrayBuffer>;
  senderName: string;
};
export enum MessageTransport {
  MESSAGE_TRANSPORT_UNSPECIFIED = 0,
  MESSAGE_TRANSPORT_SMS = 1,
  MESSAGE_TRANSPORT_VOICE = 2,
}
export type $NullableMessageTransport =
  | MessageTransport
  | (number & { $org_signal_registration_rpc_MessageTransport: never });
export enum ClientType {
  CLIENT_TYPE_UNSPECIFIED = 0,
  CLIENT_TYPE_IOS = 1,
  CLIENT_TYPE_ANDROID_WITH_FCM = 2,
  CLIENT_TYPE_ANDROID_WITHOUT_FCM = 3,
}
export type $NullableClientType =
  | ClientType
  | (number & { $org_signal_registration_rpc_ClientType: never });
export namespace SendVerificationCodeResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendVerificationCodeResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata.Params | null;
    error: org.signal.registration.rpc.SendVerificationCodeError.Params | null;
  };
}
export type SendVerificationCodeResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata | null;
  error: org.signal.registration.rpc.SendVerificationCodeError | null;
};
export namespace SendVerificationCodeError {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendVerificationCodeError;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    errorType: org.signal.registration.rpc.$NullableSendVerificationCodeErrorType | null;
    mayRetry: boolean | null;
    retryAfterSeconds: bigint | null;
  };
}
export type SendVerificationCodeError = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  errorType: org.signal.registration.rpc.$NullableSendVerificationCodeErrorType;
  mayRetry: boolean;
  retryAfterSeconds: bigint;
};
export enum SendVerificationCodeErrorType {
  SEND_VERIFICATION_CODE_ERROR_TYPE_UNSPECIFIED = 0,
  SEND_VERIFICATION_CODE_ERROR_TYPE_SENDER_REJECTED = 1,
  SEND_VERIFICATION_CODE_ERROR_TYPE_SENDER_ILLEGAL_ARGUMENT = 2,
  SEND_VERIFICATION_CODE_ERROR_TYPE_RATE_LIMITED = 3,
  SEND_VERIFICATION_CODE_ERROR_TYPE_SESSION_NOT_FOUND = 4,
  SEND_VERIFICATION_CODE_ERROR_TYPE_SESSION_ALREADY_VERIFIED = 5,
  SEND_VERIFICATION_CODE_ERROR_TYPE_TRANSPORT_NOT_ALLOWED = 6,
  SEND_VERIFICATION_CODE_ERROR_TYPE_SUSPECTED_FRAUD = 7,
}
export type $NullableSendVerificationCodeErrorType =
  | SendVerificationCodeErrorType
  | (number & { $org_signal_registration_rpc_SendVerificationCodeErrorType: never });
export namespace CheckVerificationCodeRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckVerificationCodeRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionId: Uint8Array<ArrayBuffer> | null;
    verificationCode: string | null;
  };
}
export type CheckVerificationCodeRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionId: Uint8Array<ArrayBuffer>;
  verificationCode: string;
};
export namespace CheckVerificationCodeResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckVerificationCodeResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata.Params | null;
    error: org.signal.registration.rpc.CheckVerificationCodeError.Params | null;
  };
}
export type CheckVerificationCodeResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sessionMetadata: org.signal.registration.rpc.RegistrationSessionMetadata | null;
  error: org.signal.registration.rpc.CheckVerificationCodeError | null;
};
export namespace CheckVerificationCodeError {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckVerificationCodeError;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    errorType: org.signal.registration.rpc.$NullableCheckVerificationCodeErrorType | null;
    mayRetry: boolean | null;
    retryAfterSeconds: bigint | null;
  };
}
export type CheckVerificationCodeError = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  errorType: org.signal.registration.rpc.$NullableCheckVerificationCodeErrorType;
  mayRetry: boolean;
  retryAfterSeconds: bigint;
};
export enum CheckVerificationCodeErrorType {
  CHECK_VERIFICATION_CODE_ERROR_TYPE_UNSPECIFIED = 0,
  CHECK_VERIFICATION_CODE_ERROR_TYPE_NO_CODE_SENT = 1,
  CHECK_VERIFICATION_CODE_ERROR_TYPE_RATE_LIMITED = 2,
  CHECK_VERIFICATION_CODE_ERROR_TYPE_SESSION_NOT_FOUND = 3,
  CHECK_VERIFICATION_CODE_ERROR_TYPE_ATTEMPT_EXPIRED = 4,
}
export type $NullableCheckVerificationCodeErrorType =
  | CheckVerificationCodeErrorType
  | (number & { $org_signal_registration_rpc_CheckVerificationCodeErrorType: never });
}
}
}
}
export namespace textsecure {
export namespace Envelope {
export enum Type {
  UNKNOWN = 0,
  CIPHERTEXT = 1,
  PREKEY_BUNDLE = 3,
  SERVER_DELIVERY_RECEIPT = 5,
  UNIDENTIFIED_SENDER = 6,
  PLAINTEXT_CONTENT = 8,
}
export type $NullableType =
  | Type
  | (number & { $textsecure_Envelope_Type: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Envelope;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    type: textsecure.Envelope.$NullableType | null;
    sourceServiceId: string | null;
    sourceDevice: number | null;
    clientTimestamp: bigint | null;
    content: Uint8Array<ArrayBuffer> | null;
    serverGuid: string | null;
    serverTimestamp: bigint | null;
    ephemeral: boolean | null;
    destinationServiceId: string | null;
    urgent: boolean | null;
    updatedPni: string | null;
    story: boolean | null;
    reportSpamToken: Uint8Array<ArrayBuffer> | null;
    sharedMrmKey: Uint8Array<ArrayBuffer> | null;
    sourceServiceIdBinary: Uint8Array<ArrayBuffer> | null;
    destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
    serverGuidBinary: Uint8Array<ArrayBuffer> | null;
    updatedPniBinary: Uint8Array<ArrayBuffer> | null;
  };
}
export type Envelope = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  type: textsecure.Envelope.$NullableType | null;
  sourceServiceId: string | null;
  sourceDevice: number | null;
  clientTimestamp: bigint | null;
  content: Uint8Array<ArrayBuffer> | null;
  serverGuid: string | null;
  serverTimestamp: bigint | null;
  ephemeral: boolean | null;
  destinationServiceId: string | null;
  urgent: boolean;
  updatedPni: string | null;
  story: boolean | null;
  reportSpamToken: Uint8Array<ArrayBuffer> | null;
  sharedMrmKey: Uint8Array<ArrayBuffer> | null;
  sourceServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  destinationServiceIdBinary: Uint8Array<ArrayBuffer> | null;
  serverGuidBinary: Uint8Array<ArrayBuffer> | null;
  updatedPniBinary: Uint8Array<ArrayBuffer> | null;
};
export namespace ProvisioningAddress {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProvisioningAddress;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    address: string | null;
  };
}
export type ProvisioningAddress = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  address: string | null;
};
export namespace ServerCertificate {
export namespace Certificate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Certificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    key: Uint8Array<ArrayBuffer> | null;
  };
}
export type Certificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number | null;
  key: Uint8Array<ArrayBuffer> | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ServerCertificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    certificate: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type ServerCertificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  certificate: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
export namespace SenderCertificate {
export namespace Certificate {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Certificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    senderE164: string | null;
    senderUuid_: Uint8Array<ArrayBuffer> | null;
    senderDevice: number | null;
    expires: bigint | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    signer: null | $Oneof<{signerCertificate: textsecure.ServerCertificate.Params; signerId: number;}>;
  };
}
export type Certificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  senderE164: string | null;
  senderUuid_: Uint8Array<ArrayBuffer> | null;
  senderDevice: number | null;
  expires: bigint | null;
  identityKey: Uint8Array<ArrayBuffer> | null;
  signer: null | $Oneof<{signerCertificate: textsecure.ServerCertificate; signerId: number;}>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SenderCertificate;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    certificate: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type SenderCertificate = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  certificate: Uint8Array<ArrayBuffer> | null;
  signature: Uint8Array<ArrayBuffer> | null;
};
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace presence {
export namespace ClientEvent {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClientEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    event: null | $Oneof<{newMessageAvailable: org.signal.chat.presence.NewMessageAvailableEvent.Params; clientConnected: org.signal.chat.presence.ClientConnectedEvent.Params; messagesPersisted: org.signal.chat.presence.MessagesPersistedEvent.Params;}>;
  };
}
export type ClientEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  event: null | $Oneof<{newMessageAvailable: org.signal.chat.presence.NewMessageAvailableEvent; clientConnected: org.signal.chat.presence.ClientConnectedEvent; messagesPersisted: org.signal.chat.presence.MessagesPersistedEvent;}>;
};
export namespace NewMessageAvailableEvent {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): NewMessageAvailableEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type NewMessageAvailableEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ClientConnectedEvent {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClientConnectedEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    serverId: Uint8Array<ArrayBuffer> | null;
  };
}
export type ClientConnectedEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  serverId: Uint8Array<ArrayBuffer>;
};
export namespace MessagesPersistedEvent {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessagesPersistedEvent;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type MessagesPersistedEvent = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
}
}
}
}
export namespace google {
export namespace protobuf {
export namespace Empty {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Empty;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type Empty = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace account {
export namespace GetAccountIdentityRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetAccountIdentityRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type GetAccountIdentityRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace GetAccountIdentityResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetAccountIdentityResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    accountIdentifiers: org.signal.chat.common.AccountIdentifiers.Params | null;
  };
}
export type GetAccountIdentityResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  accountIdentifiers: org.signal.chat.common.AccountIdentifiers | null;
};
export namespace DeleteAccountRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteAccountRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteAccountRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace DeleteAccountResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteAccountResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteAccountResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetRegistrationLockRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetRegistrationLockRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    registrationLock: Uint8Array<ArrayBuffer> | null;
  };
}
export type SetRegistrationLockRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  registrationLock: Uint8Array<ArrayBuffer>;
};
export namespace SetRegistrationLockResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetRegistrationLockResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetRegistrationLockResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ClearRegistrationLockRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClearRegistrationLockRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ClearRegistrationLockRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ClearRegistrationLockResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClearRegistrationLockResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ClearRegistrationLockResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ReserveUsernameHashRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ReserveUsernameHashRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameHashes: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ReserveUsernameHashRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameHashes: Array<Uint8Array<ArrayBuffer>>;
};
export namespace UsernameNotAvailable {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UsernameNotAvailable;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type UsernameNotAvailable = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ReserveUsernameHashResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ReserveUsernameHashResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{usernameHash: Uint8Array<ArrayBuffer>; usernameNotAvailable: org.signal.chat.account.UsernameNotAvailable.Params;}>;
  };
}
export type ReserveUsernameHashResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{usernameHash: Uint8Array<ArrayBuffer>; usernameNotAvailable: org.signal.chat.account.UsernameNotAvailable;}>;
};
export namespace ConfirmUsernameHashRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConfirmUsernameHashRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
    zkProof: Uint8Array<ArrayBuffer> | null;
    usernameCiphertext: Uint8Array<ArrayBuffer> | null;
  };
}
export type ConfirmUsernameHashRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameHash: Uint8Array<ArrayBuffer>;
  zkProof: Uint8Array<ArrayBuffer>;
  usernameCiphertext: Uint8Array<ArrayBuffer>;
};
export namespace ConfirmUsernameHashResponse {
export namespace ConfirmedUsernameHash {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConfirmedUsernameHash;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
    usernameLinkHandle: Uint8Array<ArrayBuffer> | null;
  };
}
export type ConfirmedUsernameHash = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameHash: Uint8Array<ArrayBuffer>;
  usernameLinkHandle: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConfirmUsernameHashResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{confirmedUsernameHash: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash.Params; reservationNotFound: org.signal.chat.errors.FailedPrecondition.Params; usernameNotAvailable: org.signal.chat.account.UsernameNotAvailable.Params;}>;
  };
}
export type ConfirmUsernameHashResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{confirmedUsernameHash: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash; reservationNotFound: org.signal.chat.errors.FailedPrecondition; usernameNotAvailable: org.signal.chat.account.UsernameNotAvailable;}>;
};
export namespace DeleteUsernameHashRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteUsernameHashRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteUsernameHashRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace DeleteUsernameHashResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteUsernameHashResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteUsernameHashResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetUsernameLinkRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetUsernameLinkRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameCiphertext: Uint8Array<ArrayBuffer> | null;
    keepLinkHandle: boolean | null;
  };
}
export type SetUsernameLinkRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameCiphertext: Uint8Array<ArrayBuffer>;
  keepLinkHandle: boolean;
};
export namespace SetUsernameLinkResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetUsernameLinkResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{usernameLinkHandle: Uint8Array<ArrayBuffer>; noUsernameSet: org.signal.chat.errors.FailedPrecondition.Params;}>;
  };
}
export type SetUsernameLinkResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{usernameLinkHandle: Uint8Array<ArrayBuffer>; noUsernameSet: org.signal.chat.errors.FailedPrecondition;}>;
};
export namespace DeleteUsernameLinkRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteUsernameLinkRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteUsernameLinkRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace DeleteUsernameLinkResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteUsernameLinkResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type DeleteUsernameLinkResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ConfigureUnidentifiedAccessRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConfigureUnidentifiedAccessRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    unidentifiedAccessKey: Uint8Array<ArrayBuffer> | null;
    allowUnrestrictedUnidentifiedAccess: boolean | null;
  };
}
export type ConfigureUnidentifiedAccessRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  unidentifiedAccessKey: Uint8Array<ArrayBuffer>;
  allowUnrestrictedUnidentifiedAccess: boolean;
};
export namespace ConfigureUnidentifiedAccessResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ConfigureUnidentifiedAccessResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ConfigureUnidentifiedAccessResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetDiscoverableByPhoneNumberRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetDiscoverableByPhoneNumberRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    discoverableByPhoneNumber: boolean | null;
  };
}
export type SetDiscoverableByPhoneNumberRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  discoverableByPhoneNumber: boolean;
};
export namespace SetDiscoverableByPhoneNumberResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetDiscoverableByPhoneNumberResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetDiscoverableByPhoneNumberResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetRegistrationRecoveryPasswordRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetRegistrationRecoveryPasswordRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    registrationRecoveryPassword: Uint8Array<ArrayBuffer> | null;
  };
}
export type SetRegistrationRecoveryPasswordRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  registrationRecoveryPassword: Uint8Array<ArrayBuffer>;
};
export namespace SetRegistrationRecoveryPasswordResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetRegistrationRecoveryPasswordResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetRegistrationRecoveryPasswordResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace CheckAccountExistenceRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckAccountExistenceRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    serviceIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
  };
}
export type CheckAccountExistenceRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  serviceIdentifier: org.signal.chat.common.ServiceIdentifier | null;
};
export namespace CheckAccountExistenceResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckAccountExistenceResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    accountExists: boolean | null;
  };
}
export type CheckAccountExistenceResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  accountExists: boolean;
};
export namespace LookupUsernameHashRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LookupUsernameHashRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
  };
}
export type LookupUsernameHashRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameHash: Uint8Array<ArrayBuffer>;
};
export namespace LookupUsernameHashResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LookupUsernameHashResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{serviceIdentifier: org.signal.chat.common.ServiceIdentifier.Params; notFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type LookupUsernameHashResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{serviceIdentifier: org.signal.chat.common.ServiceIdentifier; notFound: org.signal.chat.errors.NotFound;}>;
};
export namespace LookupUsernameLinkRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LookupUsernameLinkRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    usernameLinkHandle: Uint8Array<ArrayBuffer> | null;
  };
}
export type LookupUsernameLinkRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  usernameLinkHandle: Uint8Array<ArrayBuffer>;
};
export namespace LookupUsernameLinkResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LookupUsernameLinkResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{usernameCiphertext: Uint8Array<ArrayBuffer>; notFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type LookupUsernameLinkResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{usernameCiphertext: Uint8Array<ArrayBuffer>; notFound: org.signal.chat.errors.NotFound;}>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace attachments {
export namespace GetUploadFormRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUploadFormRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    uploadLength: bigint | null;
  };
}
export type GetUploadFormRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  uploadLength: bigint;
};
export namespace GetUploadFormResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUploadFormResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    outcome: null | $Oneof<{uploadForm: org.signal.chat.common.UploadForm.Params; exceedsMaxUploadLength: org.signal.chat.errors.FailedPrecondition.Params;}>;
  };
}
export type GetUploadFormResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  outcome: null | $Oneof<{uploadForm: org.signal.chat.common.UploadForm; exceedsMaxUploadLength: org.signal.chat.errors.FailedPrecondition;}>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace backup {
export namespace SetBackupIdRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetBackupIdRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    messagesBackupAuthCredentialRequest: Uint8Array<ArrayBuffer> | null;
    mediaBackupAuthCredentialRequest: Uint8Array<ArrayBuffer> | null;
  };
}
export type SetBackupIdRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  messagesBackupAuthCredentialRequest: Uint8Array<ArrayBuffer>;
  mediaBackupAuthCredentialRequest: Uint8Array<ArrayBuffer>;
};
export namespace SetBackupIdResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetBackupIdResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetBackupIdResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace RedeemReceiptRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RedeemReceiptRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
  };
}
export type RedeemReceiptRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  presentation: Uint8Array<ArrayBuffer>;
};
export namespace RedeemReceiptResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RedeemReceiptResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; accountMissingCommitment: org.signal.chat.errors.FailedPrecondition.Params; invalidReceipt: org.signal.chat.errors.FailedPrecondition.Params;}>;
  };
}
export type RedeemReceiptResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; accountMissingCommitment: org.signal.chat.errors.FailedPrecondition; invalidReceipt: org.signal.chat.errors.FailedPrecondition;}>;
};
export namespace GetBackupAuthCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetBackupAuthCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    redemptionStart: bigint | null;
    redemptionStop: bigint | null;
  };
}
export type GetBackupAuthCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  redemptionStart: bigint;
  redemptionStop: bigint;
};
export namespace GetBackupAuthCredentialsResponse {
export namespace Credentials {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Credentials;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    messageCredentials: Map<bigint, org.signal.chat.common.ZkCredential.Params> | null;
    mediaCredentials: Map<bigint, org.signal.chat.common.ZkCredential.Params> | null;
  };
}
export type Credentials = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  messageCredentials: Map<bigint, org.signal.chat.common.ZkCredential|null>;
  mediaCredentials: Map<bigint, org.signal.chat.common.ZkCredential|null>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetBackupAuthCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    credentials: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.Params | null;
  };
}
export type GetBackupAuthCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  credentials: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials | null;
};
export namespace SignedPresentation {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SignedPresentation;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    presentation: Uint8Array<ArrayBuffer> | null;
    presentationSignature: Uint8Array<ArrayBuffer> | null;
  };
}
export type SignedPresentation = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  presentation: Uint8Array<ArrayBuffer>;
  presentationSignature: Uint8Array<ArrayBuffer>;
};
export namespace SetPublicKeyRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetPublicKeyRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type SetPublicKeyRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  publicKey: Uint8Array<ArrayBuffer>;
};
export namespace SetPublicKeyResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetPublicKeyResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type SetPublicKeyResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace GetCdnCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetCdnCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    cdn: number | null;
  };
}
export type GetCdnCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  cdn: number;
};
export namespace GetCdnCredentialsResponse {
export namespace CdnCredentials {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CdnCredentials;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    headers: Map<string, string> | null;
  };
}
export type CdnCredentials = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  headers: Map<string, string>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetCdnCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{cdnCredentials: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type GetCdnCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{cdnCredentials: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace GetSvrBCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetSvrBCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
  };
}
export type GetSvrBCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
};
export namespace GetSvrBCredentialsResponse {
export namespace SvrBCredentials {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SvrBCredentials;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    username: string | null;
    password: string | null;
  };
}
export type SvrBCredentials = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  username: string;
  password: string;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetSvrBCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{svrbCredentials: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type GetSvrBCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{svrbCredentials: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace GetBackupInfoRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetBackupInfoRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
  };
}
export type GetBackupInfoRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
};
export namespace GetMessageBackupInfoResponse {
export namespace MessageBackupInfo {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessageBackupInfo;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    backupDir: string | null;
    cdn: number | null;
    backupName: string | null;
  };
}
export type MessageBackupInfo = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  backupDir: string;
  cdn: number;
  backupName: string;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetMessageBackupInfoResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{backupInfo: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type GetMessageBackupInfoResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{backupInfo: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace GetMediaBackupInfoResponse {
export namespace MediaBackupInfo {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MediaBackupInfo;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    backupDir: string | null;
    mediaDir: string | null;
    usedSpace: bigint | null;
  };
}
export type MediaBackupInfo = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  backupDir: string;
  mediaDir: string;
  usedSpace: bigint;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetMediaBackupInfoResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{backupInfo: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type GetMediaBackupInfoResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{backupInfo: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace RefreshRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RefreshRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
  };
}
export type RefreshRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
};
export namespace RefreshResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RefreshResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type RefreshResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace GetUploadFormRequest {
export namespace MessagesUploadType {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MessagesUploadType;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type MessagesUploadType = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace MediaUploadType {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MediaUploadType;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type MediaUploadType = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUploadFormRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    uploadType: null | $Oneof<{messages: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType.Params; media: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType.Params;}>;
    uploadLength: bigint | null;
  };
}
export type GetUploadFormRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  uploadType: null | $Oneof<{messages: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType; media: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType;}>;
  uploadLength: bigint;
};
export namespace GetUploadFormResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUploadFormResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{uploadForm: org.signal.chat.common.UploadForm.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params; exceedsMaxUploadLength: org.signal.chat.errors.FailedPrecondition.Params;}>;
  };
}
export type GetUploadFormResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{uploadForm: org.signal.chat.common.UploadForm; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication; exceedsMaxUploadLength: org.signal.chat.errors.FailedPrecondition;}>;
};
export namespace CopyMediaItem {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CopyMediaItem;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    sourceAttachmentCdn: number | null;
    sourceKey: string | null;
    objectLength: number | null;
    mediaId: Uint8Array<ArrayBuffer> | null;
    hmacKey: Uint8Array<ArrayBuffer> | null;
    encryptionKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type CopyMediaItem = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  sourceAttachmentCdn: number;
  sourceKey: string;
  objectLength: number;
  mediaId: Uint8Array<ArrayBuffer>;
  hmacKey: Uint8Array<ArrayBuffer>;
  encryptionKey: Uint8Array<ArrayBuffer>;
};
export namespace CopyMediaRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CopyMediaRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    items: Array<org.signal.chat.backup.CopyMediaItem.Params> | null;
  };
}
export type CopyMediaRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  items: Array<org.signal.chat.backup.CopyMediaItem>;
};
export namespace CopyMediaResponse {
export namespace SourceNotFound {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SourceNotFound;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SourceNotFound = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace WrongSourceLength {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): WrongSourceLength;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type WrongSourceLength = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace OutOfSpace {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): OutOfSpace;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type OutOfSpace = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace CopySuccess {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CopySuccess;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    cdn: number | null;
  };
}
export type CopySuccess = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  cdn: number;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CopyMediaResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    mediaId: Uint8Array<ArrayBuffer> | null;
    response: null | $Oneof<{success: org.signal.chat.backup.CopyMediaResponse.CopySuccess.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params; sourceNotFound: org.signal.chat.backup.CopyMediaResponse.SourceNotFound.Params; wrongSourceLength: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength.Params; outOfSpace: org.signal.chat.backup.CopyMediaResponse.OutOfSpace.Params;}>;
  };
}
export type CopyMediaResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  mediaId: Uint8Array<ArrayBuffer>;
  response: null | $Oneof<{success: org.signal.chat.backup.CopyMediaResponse.CopySuccess; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication; sourceNotFound: org.signal.chat.backup.CopyMediaResponse.SourceNotFound; wrongSourceLength: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength; outOfSpace: org.signal.chat.backup.CopyMediaResponse.OutOfSpace;}>;
};
export namespace ListMediaRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ListMediaRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    cursor: string | null;
    limit: number | null;
  };
}
export type ListMediaRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  cursor: string | null;
  limit: number;
};
export namespace ListMediaResponse {
export namespace ListEntry {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ListEntry;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    cdn: number | null;
    mediaId: Uint8Array<ArrayBuffer> | null;
    length: bigint | null;
  };
}
export type ListEntry = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  cdn: number;
  mediaId: Uint8Array<ArrayBuffer>;
  length: bigint;
};
export namespace ListResult {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ListResult;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    page: Array<org.signal.chat.backup.ListMediaResponse.ListEntry.Params> | null;
    backupDir: string | null;
    mediaDir: string | null;
    cursor: string | null;
  };
}
export type ListResult = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  page: Array<org.signal.chat.backup.ListMediaResponse.ListEntry>;
  backupDir: string;
  mediaDir: string;
  cursor: string | null;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ListMediaResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{listResult: org.signal.chat.backup.ListMediaResponse.ListResult.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type ListMediaResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{listResult: org.signal.chat.backup.ListMediaResponse.ListResult; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace DeleteAllRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteAllRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
  };
}
export type DeleteAllRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
};
export namespace DeleteAllResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteAllResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type DeleteAllResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
export namespace DeleteMediaItem {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMediaItem;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    cdn: number | null;
    mediaId: Uint8Array<ArrayBuffer> | null;
  };
}
export type DeleteMediaItem = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  cdn: number;
  mediaId: Uint8Array<ArrayBuffer>;
};
export namespace DeleteMediaRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMediaRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    signedPresentation: org.signal.chat.backup.SignedPresentation.Params | null;
    items: Array<org.signal.chat.backup.DeleteMediaItem.Params> | null;
  };
}
export type DeleteMediaRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  signedPresentation: org.signal.chat.backup.SignedPresentation | null;
  items: Array<org.signal.chat.backup.DeleteMediaItem>;
};
export namespace DeleteMediaResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DeleteMediaResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{deletedItem: org.signal.chat.backup.DeleteMediaItem.Params; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication.Params;}>;
  };
}
export type DeleteMediaResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{deletedItem: org.signal.chat.backup.DeleteMediaItem; failedAuthentication: org.signal.chat.errors.FailedZkAuthentication;}>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace calling {
export namespace quality {
export namespace SubmitCallQualitySurveyRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SubmitCallQualitySurveyRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    userSatisfied: boolean | null;
    callQualityIssues: Array<string> | null;
    additionalIssuesDescription: string | null;
    debugLogUrl: string | null;
    startTimestamp: bigint | null;
    endTimestamp: bigint | null;
    callType: string | null;
    success: boolean | null;
    callEndReason: string | null;
    connectionRttMedian: number | null;
    audioRttMedian: number | null;
    videoRttMedian: number | null;
    audioRecvJitterMedian: number | null;
    videoRecvJitterMedian: number | null;
    audioSendJitterMedian: number | null;
    videoSendJitterMedian: number | null;
    audioRecvPacketLossFraction: number | null;
    videoRecvPacketLossFraction: number | null;
    audioSendPacketLossFraction: number | null;
    videoSendPacketLossFraction: number | null;
    callTelemetry: Uint8Array<ArrayBuffer> | null;
  };
}
export type SubmitCallQualitySurveyRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  userSatisfied: boolean;
  callQualityIssues: Array<string>;
  additionalIssuesDescription: string | null;
  debugLogUrl: string | null;
  startTimestamp: bigint;
  endTimestamp: bigint;
  callType: string;
  success: boolean;
  callEndReason: string;
  connectionRttMedian: number | null;
  audioRttMedian: number | null;
  videoRttMedian: number | null;
  audioRecvJitterMedian: number | null;
  videoRecvJitterMedian: number | null;
  audioSendJitterMedian: number | null;
  videoSendJitterMedian: number | null;
  audioRecvPacketLossFraction: number | null;
  videoRecvPacketLossFraction: number | null;
  audioSendPacketLossFraction: number | null;
  videoSendPacketLossFraction: number | null;
  callTelemetry: Uint8Array<ArrayBuffer> | null;
};
export namespace SubmitCallQualitySurveyResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SubmitCallQualitySurveyResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SubmitCallQualitySurveyResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
}
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace calling {
export namespace GetTurnCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetTurnCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type GetTurnCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace GetTurnCredentialsResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetTurnCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    username: string | null;
    password: string | null;
    urls: Array<string> | null;
  };
}
export type GetTurnCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  username: string;
  password: string;
  urls: Array<string>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace common {
export enum IdentityType {
  IDENTITY_TYPE_UNSPECIFIED = 0,
  IDENTITY_TYPE_ACI = 1,
  IDENTITY_TYPE_PNI = 2,
}
export type $NullableIdentityType =
  | IdentityType
  | (number & { $org_signal_chat_common_IdentityType: never });
export namespace ServiceIdentifier {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ServiceIdentifier;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityType: org.signal.chat.common.$NullableIdentityType | null;
    uuid: Uint8Array<ArrayBuffer> | null;
  };
}
export type ServiceIdentifier = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityType: org.signal.chat.common.$NullableIdentityType;
  uuid: Uint8Array<ArrayBuffer>;
};
export namespace AccountIdentifiers {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AccountIdentifiers;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    serviceIdentifiers: Array<org.signal.chat.common.ServiceIdentifier.Params> | null;
    e164: string | null;
    usernameHash: Uint8Array<ArrayBuffer> | null;
  };
}
export type AccountIdentifiers = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  serviceIdentifiers: Array<org.signal.chat.common.ServiceIdentifier>;
  e164: string;
  usernameHash: Uint8Array<ArrayBuffer>;
};
export namespace EcPreKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): EcPreKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    keyId: number | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type EcPreKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  keyId: number;
  publicKey: Uint8Array<ArrayBuffer>;
};
export namespace EcSignedPreKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): EcSignedPreKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    keyId: number | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type EcSignedPreKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  keyId: number;
  publicKey: Uint8Array<ArrayBuffer>;
  signature: Uint8Array<ArrayBuffer>;
};
export namespace KemSignedPreKey {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): KemSignedPreKey;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    keyId: number | null;
    publicKey: Uint8Array<ArrayBuffer> | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type KemSignedPreKey = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  keyId: number;
  publicKey: Uint8Array<ArrayBuffer>;
  signature: Uint8Array<ArrayBuffer>;
};
export enum DeviceCapability {
  DEVICE_CAPABILITY_UNSPECIFIED = 0,
  DEVICE_CAPABILITY_STORAGE = 1,
  DEVICE_CAPABILITY_TRANSFER = 2,
  DEVICE_CAPABILITY_ATTACHMENT_BACKFILL = 6,
  DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET = 7,
}
export type $NullableDeviceCapability =
  | DeviceCapability
  | (number & { $org_signal_chat_common_DeviceCapability: never });
export namespace ZkCredential {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ZkCredential;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    redemptionTime: bigint | null;
    credential: Uint8Array<ArrayBuffer> | null;
  };
}
export type ZkCredential = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  redemptionTime: bigint;
  credential: Uint8Array<ArrayBuffer>;
};
export namespace UploadForm {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): UploadForm;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    cdn: number | null;
    key: string | null;
    headers: Map<string, string> | null;
    signedUploadLocation: string | null;
  };
}
export type UploadForm = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  cdn: number;
  key: string;
  headers: Map<string, string>;
  signedUploadLocation: string;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace credentials {
export enum ExternalServiceType {
  EXTERNAL_SERVICE_TYPE_UNSPECIFIED = 0,
  EXTERNAL_SERVICE_TYPE_DIRECTORY = 1,
  EXTERNAL_SERVICE_TYPE_PAYMENTS = 2,
  EXTERNAL_SERVICE_TYPE_STORAGE = 3,
  EXTERNAL_SERVICE_TYPE_SVR = 4,
}
export type $NullableExternalServiceType =
  | ExternalServiceType
  | (number & { $org_signal_chat_credentials_ExternalServiceType: never });
export namespace GetExternalServiceCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetExternalServiceCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    externalService: org.signal.chat.credentials.$NullableExternalServiceType | null;
  };
}
export type GetExternalServiceCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  externalService: org.signal.chat.credentials.$NullableExternalServiceType;
};
export namespace GetExternalServiceCredentialsResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetExternalServiceCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    username: string | null;
    password: string | null;
  };
}
export type GetExternalServiceCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  username: string;
  password: string;
};
export enum AuthCheckResult {
  AUTH_CHECK_RESULT_UNSPECIFIED = 0,
  AUTH_CHECK_RESULT_MATCH = 1,
  AUTH_CHECK_RESULT_NO_MATCH = 2,
  AUTH_CHECK_RESULT_INVALID = 3,
}
export type $NullableAuthCheckResult =
  | AuthCheckResult
  | (number & { $org_signal_chat_credentials_AuthCheckResult: never });
export namespace CheckSvrCredentialsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckSvrCredentialsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    number: string | null;
    passwords: Array<string> | null;
  };
}
export type CheckSvrCredentialsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  number: string;
  passwords: Array<string>;
};
export namespace CheckSvrCredentialsResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckSvrCredentialsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    matches: Map<string, org.signal.chat.credentials.$NullableAuthCheckResult> | null;
  };
}
export type CheckSvrCredentialsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  matches: Map<string, org.signal.chat.credentials.$NullableAuthCheckResult>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace device {
export namespace GetDevicesRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetDevicesRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type GetDevicesRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace GetDevicesResponse {
export namespace LinkedDevice {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): LinkedDevice;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
    name: Uint8Array<ArrayBuffer> | null;
    lastSeen: bigint | null;
    registrationId: number | null;
    createdAtCiphertext: Uint8Array<ArrayBuffer> | null;
  };
}
export type LinkedDevice = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number;
  name: Uint8Array<ArrayBuffer>;
  lastSeen: bigint;
  registrationId: number;
  createdAtCiphertext: Uint8Array<ArrayBuffer>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetDevicesResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    devices: Array<org.signal.chat.device.GetDevicesResponse.LinkedDevice.Params> | null;
  };
}
export type GetDevicesResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  devices: Array<org.signal.chat.device.GetDevicesResponse.LinkedDevice>;
};
export namespace RemoveDeviceRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RemoveDeviceRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: number | null;
  };
}
export type RemoveDeviceRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: number;
};
export namespace SetDeviceNameRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetDeviceNameRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    name: Uint8Array<ArrayBuffer> | null;
    id: number | null;
  };
}
export type SetDeviceNameRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  name: Uint8Array<ArrayBuffer>;
  id: number;
};
export namespace SetDeviceNameResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetDeviceNameResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; targetDeviceNotFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type SetDeviceNameResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; targetDeviceNotFound: org.signal.chat.errors.NotFound;}>;
};
export namespace RemoveDeviceResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): RemoveDeviceResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type RemoveDeviceResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetPushTokenRequest {
export namespace ApnsTokenRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ApnsTokenRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    apnsToken: string | null;
  };
}
export type ApnsTokenRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  apnsToken: string;
};
export namespace FcmTokenRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FcmTokenRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    fcmToken: string | null;
  };
}
export type FcmTokenRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  fcmToken: string;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetPushTokenRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    tokenRequest: null | $Oneof<{apnsTokenRequest: org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest.Params; fcmTokenRequest: org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest.Params;}>;
  };
}
export type SetPushTokenRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  tokenRequest: null | $Oneof<{apnsTokenRequest: org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest; fcmTokenRequest: org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest;}>;
};
export namespace SetPushTokenResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetPushTokenResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetPushTokenResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ClearPushTokenRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClearPushTokenRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ClearPushTokenRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace ClearPushTokenResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ClearPushTokenResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type ClearPushTokenResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace SetCapabilitiesRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetCapabilitiesRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    capabilities: Array<org.signal.chat.common.$NullableDeviceCapability> | null;
  };
}
export type SetCapabilitiesRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  capabilities: Array<org.signal.chat.common.$NullableDeviceCapability>;
};
export namespace SetCapabilitiesResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetCapabilitiesResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetCapabilitiesResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace errors {
export namespace NotFound {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): NotFound;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type NotFound = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace FailedPrecondition {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FailedPrecondition;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    description: string | null;
  };
}
export type FailedPrecondition = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  description: string;
};
export namespace FailedZkAuthentication {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FailedZkAuthentication;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    description: string | null;
  };
}
export type FailedZkAuthentication = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  description: string;
};
export namespace FailedUnidentifiedAuthorization {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): FailedUnidentifiedAuthorization;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    description: string | null;
  };
}
export type FailedUnidentifiedAuthorization = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  description: string;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace keys {
export namespace GetPreKeyCountRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeyCountRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type GetPreKeyCountRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace GetPreKeyCountResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeyCountResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    aciEcPreKeyCount: number | null;
    aciKemPreKeyCount: number | null;
    pniEcPreKeyCount: number | null;
    pniKemPreKeyCount: number | null;
  };
}
export type GetPreKeyCountResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  aciEcPreKeyCount: number;
  aciKemPreKeyCount: number;
  pniEcPreKeyCount: number;
  pniKemPreKeyCount: number;
};
export namespace GetPreKeysRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeysRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    deviceId: number | null;
  };
}
export type GetPreKeysRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  deviceId: number | null;
};
export namespace GetPreKeysAnonymousRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeysAnonymousRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    request: org.signal.chat.keys.GetPreKeysRequest.Params | null;
    authorization: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>; unrestrictedAccess: google.protobuf.Empty.Params;}>;
  };
}
export type GetPreKeysAnonymousRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  request: org.signal.chat.keys.GetPreKeysRequest | null;
  authorization: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>; unrestrictedAccess: google.protobuf.Empty;}>;
};
export namespace DevicePreKeyBundle {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): DevicePreKeyBundle;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    ecSignedPreKey: org.signal.chat.common.EcSignedPreKey.Params | null;
    ecOneTimePreKey: org.signal.chat.common.EcPreKey.Params | null;
    kemOneTimePreKey: org.signal.chat.common.KemSignedPreKey.Params | null;
    registrationId: number | null;
  };
}
export type DevicePreKeyBundle = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  ecSignedPreKey: org.signal.chat.common.EcSignedPreKey | null;
  ecOneTimePreKey: org.signal.chat.common.EcPreKey | null;
  kemOneTimePreKey: org.signal.chat.common.KemSignedPreKey | null;
  registrationId: number;
};
export namespace AccountPreKeyBundles {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): AccountPreKeyBundles;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    devicePreKeys: Map<number, org.signal.chat.keys.DevicePreKeyBundle.Params> | null;
  };
}
export type AccountPreKeyBundles = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityKey: Uint8Array<ArrayBuffer>;
  devicePreKeys: Map<number, org.signal.chat.keys.DevicePreKeyBundle|null>;
};
export namespace GetPreKeysResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeysResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{preKeys: org.signal.chat.keys.AccountPreKeyBundles.Params; targetNotFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type GetPreKeysResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{preKeys: org.signal.chat.keys.AccountPreKeyBundles; targetNotFound: org.signal.chat.errors.NotFound;}>;
};
export namespace GetPreKeysAnonymousResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetPreKeysAnonymousResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{preKeys: org.signal.chat.keys.AccountPreKeyBundles.Params; targetNotFound: org.signal.chat.errors.NotFound.Params; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization.Params;}>;
  };
}
export type GetPreKeysAnonymousResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{preKeys: org.signal.chat.keys.AccountPreKeyBundles; targetNotFound: org.signal.chat.errors.NotFound; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization;}>;
};
export namespace SetOneTimeEcPreKeysRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetOneTimeEcPreKeysRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityType: org.signal.chat.common.$NullableIdentityType | null;
    preKeys: Array<org.signal.chat.common.EcPreKey.Params> | null;
  };
}
export type SetOneTimeEcPreKeysRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityType: org.signal.chat.common.$NullableIdentityType;
  preKeys: Array<org.signal.chat.common.EcPreKey>;
};
export namespace SetOneTimeKemSignedPreKeysRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetOneTimeKemSignedPreKeysRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityType: org.signal.chat.common.$NullableIdentityType | null;
    preKeys: Array<org.signal.chat.common.KemSignedPreKey.Params> | null;
  };
}
export type SetOneTimeKemSignedPreKeysRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityType: org.signal.chat.common.$NullableIdentityType;
  preKeys: Array<org.signal.chat.common.KemSignedPreKey>;
};
export namespace SetEcSignedPreKeyRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetEcSignedPreKeyRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityType: org.signal.chat.common.$NullableIdentityType | null;
    signedPreKey: org.signal.chat.common.EcSignedPreKey.Params | null;
  };
}
export type SetEcSignedPreKeyRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityType: org.signal.chat.common.$NullableIdentityType;
  signedPreKey: org.signal.chat.common.EcSignedPreKey | null;
};
export namespace SetKemLastResortPreKeyRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetKemLastResortPreKeyRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityType: org.signal.chat.common.$NullableIdentityType | null;
    signedPreKey: org.signal.chat.common.KemSignedPreKey.Params | null;
  };
}
export type SetKemLastResortPreKeyRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityType: org.signal.chat.common.$NullableIdentityType;
  signedPreKey: org.signal.chat.common.KemSignedPreKey | null;
};
export namespace SetPreKeyResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetPreKeyResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type SetPreKeyResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace CheckIdentityKeyRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckIdentityKeyRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    fingerprint: Uint8Array<ArrayBuffer> | null;
  };
}
export type CheckIdentityKeyRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  fingerprint: Uint8Array<ArrayBuffer>;
};
export namespace CheckIdentityKeyResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CheckIdentityKeyResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    targetIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type CheckIdentityKeyResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  targetIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  identityKey: Uint8Array<ArrayBuffer>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace messages {
export namespace IndividualRecipientMessageBundle {
export namespace Message {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Message;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    registrationId: number | null;
    payload: Uint8Array<ArrayBuffer> | null;
    type: org.signal.chat.messages.$NullableSendMessageType | null;
  };
}
export type Message = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  registrationId: number;
  payload: Uint8Array<ArrayBuffer>;
  type: org.signal.chat.messages.$NullableSendMessageType;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): IndividualRecipientMessageBundle;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timestamp: bigint | null;
    messages: Map<number, org.signal.chat.messages.IndividualRecipientMessageBundle.Message.Params> | null;
  };
}
export type IndividualRecipientMessageBundle = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timestamp: bigint;
  messages: Map<number, org.signal.chat.messages.IndividualRecipientMessageBundle.Message|null>;
};
export enum SendMessageType {
  UNSPECIFIED = 0,
  DOUBLE_RATCHET = 1,
  PREKEY_MESSAGE = 2,
  PLAINTEXT_CONTENT = 3,
  UNIDENTIFIED_SENDER = 4,
}
export type $NullableSendMessageType =
  | SendMessageType
  | (number & { $org_signal_chat_messages_SendMessageType: never });
export namespace SendAuthenticatedSenderMessageRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendAuthenticatedSenderMessageRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destination: org.signal.chat.common.ServiceIdentifier.Params | null;
    ephemeral: boolean | null;
    urgent: boolean | null;
    messages: org.signal.chat.messages.IndividualRecipientMessageBundle.Params | null;
  };
}
export type SendAuthenticatedSenderMessageRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destination: org.signal.chat.common.ServiceIdentifier | null;
  ephemeral: boolean;
  urgent: boolean;
  messages: org.signal.chat.messages.IndividualRecipientMessageBundle | null;
};
export namespace SendMessageAuthenticatedSenderResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendMessageAuthenticatedSenderResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; mismatchedDevices: org.signal.chat.messages.MismatchedDevices.Params; challengeRequired: org.signal.chat.messages.ChallengeRequired.Params; destinationNotFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type SendMessageAuthenticatedSenderResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; mismatchedDevices: org.signal.chat.messages.MismatchedDevices; challengeRequired: org.signal.chat.messages.ChallengeRequired; destinationNotFound: org.signal.chat.errors.NotFound;}>;
};
export namespace SendSyncMessageRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendSyncMessageRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    urgent: boolean | null;
    messages: org.signal.chat.messages.IndividualRecipientMessageBundle.Params | null;
  };
}
export type SendSyncMessageRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  urgent: boolean;
  messages: org.signal.chat.messages.IndividualRecipientMessageBundle | null;
};
export namespace SendSealedSenderMessageRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendSealedSenderMessageRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destination: org.signal.chat.common.ServiceIdentifier.Params | null;
    ephemeral: boolean | null;
    urgent: boolean | null;
    messages: org.signal.chat.messages.IndividualRecipientMessageBundle.Params | null;
    authorization: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>; unrestrictedAccess: google.protobuf.Empty.Params;}>;
  };
}
export type SendSealedSenderMessageRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destination: org.signal.chat.common.ServiceIdentifier | null;
  ephemeral: boolean;
  urgent: boolean;
  messages: org.signal.chat.messages.IndividualRecipientMessageBundle | null;
  authorization: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>; unrestrictedAccess: google.protobuf.Empty;}>;
};
export namespace SendStoryMessageRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendStoryMessageRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    destination: org.signal.chat.common.ServiceIdentifier.Params | null;
    urgent: boolean | null;
    messages: org.signal.chat.messages.IndividualRecipientMessageBundle.Params | null;
  };
}
export type SendStoryMessageRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  destination: org.signal.chat.common.ServiceIdentifier | null;
  urgent: boolean;
  messages: org.signal.chat.messages.IndividualRecipientMessageBundle | null;
};
export namespace SendMessageResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendMessageResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: google.protobuf.Empty.Params; mismatchedDevices: org.signal.chat.messages.MismatchedDevices.Params; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization.Params; destinationNotFound: org.signal.chat.errors.NotFound.Params;}>;
  };
}
export type SendMessageResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: google.protobuf.Empty; mismatchedDevices: org.signal.chat.messages.MismatchedDevices; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization; destinationNotFound: org.signal.chat.errors.NotFound;}>;
};
export namespace MultiRecipientMessage {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MultiRecipientMessage;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timestamp: bigint | null;
    payload: Uint8Array<ArrayBuffer> | null;
  };
}
export type MultiRecipientMessage = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timestamp: bigint;
  payload: Uint8Array<ArrayBuffer>;
};
export namespace SendMultiRecipientMessageRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendMultiRecipientMessageRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    ephemeral: boolean | null;
    urgent: boolean | null;
    message: org.signal.chat.messages.MultiRecipientMessage.Params | null;
    groupSendToken: Uint8Array<ArrayBuffer> | null;
  };
}
export type SendMultiRecipientMessageRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  ephemeral: boolean;
  urgent: boolean;
  message: org.signal.chat.messages.MultiRecipientMessage | null;
  groupSendToken: Uint8Array<ArrayBuffer>;
};
export namespace SendMultiRecipientStoryRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendMultiRecipientStoryRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    urgent: boolean | null;
    message: org.signal.chat.messages.MultiRecipientMessage.Params | null;
  };
}
export type SendMultiRecipientStoryRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  urgent: boolean;
  message: org.signal.chat.messages.MultiRecipientMessage | null;
};
export namespace MultiRecipientSuccess {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MultiRecipientSuccess;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    unresolvedRecipients: Array<org.signal.chat.common.ServiceIdentifier.Params> | null;
  };
}
export type MultiRecipientSuccess = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  unresolvedRecipients: Array<org.signal.chat.common.ServiceIdentifier>;
};
export namespace SendMultiRecipientMessageResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SendMultiRecipientMessageResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    response: null | $Oneof<{success: org.signal.chat.messages.MultiRecipientSuccess.Params; mismatchedDevices: org.signal.chat.messages.MultiRecipientMismatchedDevices.Params; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization.Params;}>;
  };
}
export type SendMultiRecipientMessageResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  response: null | $Oneof<{success: org.signal.chat.messages.MultiRecipientSuccess; mismatchedDevices: org.signal.chat.messages.MultiRecipientMismatchedDevices; failedUnidentifiedAuthorization: org.signal.chat.errors.FailedUnidentifiedAuthorization;}>;
};
export namespace MismatchedDevices {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MismatchedDevices;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    serviceIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    missingDevices: Array<number> | null;
    extraDevices: Array<number> | null;
    staleDevices: Array<number> | null;
  };
}
export type MismatchedDevices = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  serviceIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  missingDevices: Array<number>;
  extraDevices: Array<number>;
  staleDevices: Array<number>;
};
export namespace MultiRecipientMismatchedDevices {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): MultiRecipientMismatchedDevices;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    mismatchedDevices: Array<org.signal.chat.messages.MismatchedDevices.Params> | null;
  };
}
export type MultiRecipientMismatchedDevices = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  mismatchedDevices: Array<org.signal.chat.messages.MismatchedDevices>;
};
export namespace ChallengeRequired {
export enum ChallengeType {
  UNSPECIFIED = 0,
  CAPTCHA = 1,
  PUSH_CHALLENGE = 2,
}
export type $NullableChallengeType =
  | ChallengeType
  | (number & { $org_signal_chat_messages_ChallengeRequired_ChallengeType: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ChallengeRequired;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    token: string | null;
    challengeOptions: Array<org.signal.chat.messages.ChallengeRequired.$NullableChallengeType> | null;
    retryAfterSeconds: bigint | null;
  };
}
export type ChallengeRequired = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  token: string;
  challengeOptions: Array<org.signal.chat.messages.ChallengeRequired.$NullableChallengeType>;
  retryAfterSeconds: bigint | null;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace payments {
export namespace GetCurrencyConversionsRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetCurrencyConversionsRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
  };
}
export type GetCurrencyConversionsRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
};
export namespace GetCurrencyConversionsResponse {
export namespace CurrencyConversionEntity {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): CurrencyConversionEntity;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    base: string | null;
    conversions: Map<string, string> | null;
  };
}
export type CurrencyConversionEntity = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  base: string;
  conversions: Map<string, string>;
};
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetCurrencyConversionsResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    timestamp: bigint | null;
    currencies: Array<org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.Params> | null;
  };
}
export type GetCurrencyConversionsResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  timestamp: bigint;
  currencies: Array<org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity>;
};
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace profile {
export namespace SetProfileRequest {
export enum AvatarChange {
  AVATAR_CHANGE_UNCHANGED = 0,
  AVATAR_CHANGE_CLEAR = 1,
  AVATAR_CHANGE_UPDATE = 2,
}
export type $NullableAvatarChange =
  | AvatarChange
  | (number & { $org_signal_chat_profile_SetProfileRequest_AvatarChange: never });
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetProfileRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    version: string | null;
    name: Uint8Array<ArrayBuffer> | null;
    avatarChange: org.signal.chat.profile.SetProfileRequest.$NullableAvatarChange | null;
    aboutEmoji: Uint8Array<ArrayBuffer> | null;
    about: Uint8Array<ArrayBuffer> | null;
    paymentAddress: Uint8Array<ArrayBuffer> | null;
    badgeIds: Array<string> | null;
    phoneNumberSharing: Uint8Array<ArrayBuffer> | null;
    commitment: Uint8Array<ArrayBuffer> | null;
  };
}
export type SetProfileRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  version: string;
  name: Uint8Array<ArrayBuffer>;
  avatarChange: org.signal.chat.profile.SetProfileRequest.$NullableAvatarChange;
  aboutEmoji: Uint8Array<ArrayBuffer>;
  about: Uint8Array<ArrayBuffer>;
  paymentAddress: Uint8Array<ArrayBuffer>;
  badgeIds: Array<string>;
  phoneNumberSharing: Uint8Array<ArrayBuffer>;
  commitment: Uint8Array<ArrayBuffer>;
};
export namespace SetProfileResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SetProfileResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    attributes: org.signal.chat.profile.ProfileAvatarUploadAttributes.Params | null;
  };
}
export type SetProfileResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  attributes: org.signal.chat.profile.ProfileAvatarUploadAttributes | null;
};
export namespace GetVersionedProfileRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetVersionedProfileRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    accountIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    version: string | null;
  };
}
export type GetVersionedProfileRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  accountIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  version: string;
};
export namespace GetVersionedProfileAnonymousRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetVersionedProfileAnonymousRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    request: org.signal.chat.profile.GetVersionedProfileRequest.Params | null;
    unidentifiedAccessKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type GetVersionedProfileAnonymousRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  request: org.signal.chat.profile.GetVersionedProfileRequest | null;
  unidentifiedAccessKey: Uint8Array<ArrayBuffer>;
};
export namespace GetVersionedProfileResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetVersionedProfileResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    name: Uint8Array<ArrayBuffer> | null;
    about: Uint8Array<ArrayBuffer> | null;
    aboutEmoji: Uint8Array<ArrayBuffer> | null;
    avatar: string | null;
    paymentAddress: Uint8Array<ArrayBuffer> | null;
    phoneNumberSharing: Uint8Array<ArrayBuffer> | null;
  };
}
export type GetVersionedProfileResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  name: Uint8Array<ArrayBuffer>;
  about: Uint8Array<ArrayBuffer>;
  aboutEmoji: Uint8Array<ArrayBuffer>;
  avatar: string;
  paymentAddress: Uint8Array<ArrayBuffer>;
  phoneNumberSharing: Uint8Array<ArrayBuffer>;
};
export namespace GetUnversionedProfileRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUnversionedProfileRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    serviceIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
  };
}
export type GetUnversionedProfileRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  serviceIdentifier: org.signal.chat.common.ServiceIdentifier | null;
};
export namespace GetUnversionedProfileAnonymousRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUnversionedProfileAnonymousRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    request: org.signal.chat.profile.GetUnversionedProfileRequest.Params | null;
    authentication: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>;}>;
  };
}
export type GetUnversionedProfileAnonymousRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  request: org.signal.chat.profile.GetUnversionedProfileRequest | null;
  authentication: null | $Oneof<{unidentifiedAccessKey: Uint8Array<ArrayBuffer>; groupSendToken: Uint8Array<ArrayBuffer>;}>;
};
export namespace GetUnversionedProfileResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetUnversionedProfileResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    identityKey: Uint8Array<ArrayBuffer> | null;
    unidentifiedAccess: Uint8Array<ArrayBuffer> | null;
    unrestrictedUnidentifiedAccess: boolean | null;
    capabilities: Array<org.signal.chat.common.$NullableDeviceCapability> | null;
    badges: Array<org.signal.chat.profile.Badge.Params> | null;
  };
}
export type GetUnversionedProfileResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  identityKey: Uint8Array<ArrayBuffer>;
  unidentifiedAccess: Uint8Array<ArrayBuffer>;
  unrestrictedUnidentifiedAccess: boolean;
  capabilities: Array<org.signal.chat.common.$NullableDeviceCapability>;
  badges: Array<org.signal.chat.profile.Badge>;
};
export namespace GetExpiringProfileKeyCredentialRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetExpiringProfileKeyCredentialRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    accountIdentifier: org.signal.chat.common.ServiceIdentifier.Params | null;
    credentialRequest: Uint8Array<ArrayBuffer> | null;
    credentialType: org.signal.chat.profile.$NullableCredentialType | null;
    version: string | null;
  };
}
export type GetExpiringProfileKeyCredentialRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  accountIdentifier: org.signal.chat.common.ServiceIdentifier | null;
  credentialRequest: Uint8Array<ArrayBuffer>;
  credentialType: org.signal.chat.profile.$NullableCredentialType;
  version: string;
};
export namespace GetExpiringProfileKeyCredentialAnonymousRequest {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetExpiringProfileKeyCredentialAnonymousRequest;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    request: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.Params | null;
    unidentifiedAccessKey: Uint8Array<ArrayBuffer> | null;
  };
}
export type GetExpiringProfileKeyCredentialAnonymousRequest = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  request: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest | null;
  unidentifiedAccessKey: Uint8Array<ArrayBuffer>;
};
export namespace GetExpiringProfileKeyCredentialResponse {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): GetExpiringProfileKeyCredentialResponse;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    profileKeyCredential: Uint8Array<ArrayBuffer> | null;
  };
}
export type GetExpiringProfileKeyCredentialResponse = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  profileKeyCredential: Uint8Array<ArrayBuffer>;
};
export namespace ProfileAvatarUploadAttributes {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ProfileAvatarUploadAttributes;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    path: string | null;
    credential: string | null;
    acl: string | null;
    algorithm: string | null;
    date: string | null;
    policy: string | null;
    signature: Uint8Array<ArrayBuffer> | null;
  };
}
export type ProfileAvatarUploadAttributes = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  path: string;
  credential: string;
  acl: string;
  algorithm: string;
  date: string;
  policy: string;
  signature: Uint8Array<ArrayBuffer>;
};
export namespace Badge {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): Badge;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    id: string | null;
    category: string | null;
    name: string | null;
    description: string | null;
    sprites6: Array<string> | null;
    svg: string | null;
    svgs: Array<org.signal.chat.profile.BadgeSvg.Params> | null;
  };
}
export type Badge = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  id: string;
  category: string;
  name: string;
  description: string;
  sprites6: Array<string>;
  svg: string;
  svgs: Array<org.signal.chat.profile.BadgeSvg>;
};
export namespace BadgeSvg {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): BadgeSvg;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    light: string | null;
    dark: string | null;
  };
}
export type BadgeSvg = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  light: string;
  dark: string;
};
export enum CredentialType {
  CREDENTIAL_TYPE_UNSPECIFIED = 0,
  CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY = 1,
}
export type $NullableCredentialType =
  | CredentialType
  | (number & { $org_signal_chat_profile_CredentialType: never });
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace require {
export namespace SizeConstraint {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): SizeConstraint;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    min: number | null;
    max: number | null;
  };
}
export type SizeConstraint = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  min: number | null;
  max: number | null;
};
export namespace ValueRangeConstraint {
  export function decode(
    data: Uint8Array<ArrayBuffer>,
  ): ValueRangeConstraint;
  export function encode(data: Params): Uint8Array<ArrayBuffer>;
  export type Params = {
    $unknown?: Array<Uint8Array<ArrayBuffer>> | null;
    min: bigint | null;
    max: bigint | null;
  };
}
export type ValueRangeConstraint = {
  $unknown: Array<Uint8Array<ArrayBuffer>>;
  min: bigint | null;
  max: bigint | null;
};
export enum Auth {
  AUTH_UNSPECIFIED = 0,
  AUTH_ONLY_AUTHENTICATED = 1,
  AUTH_ONLY_ANONYMOUS = 2,
}
export type $NullableAuth =
  | Auth
  | (number & { $org_signal_chat_require_Auth: never });
}
}
}
}
export namespace org {
export namespace signal {
export namespace chat {
export namespace tag {
}
}
}
}
export const $services: {
  "kt_query.KeyTransparencyQueryService/Distinguished": {
    isRequestStream: false;
    Request: typeof kt_query.DistinguishedRequest;
    isResponseStream: false;
    Response: typeof kt_query.DistinguishedResponse;
  };
  "kt_query.KeyTransparencyQueryService/Search": {
    isRequestStream: false;
    Request: typeof kt_query.SearchRequest;
    isResponseStream: false;
    Response: typeof kt_query.SearchResponse;
  };
  "kt_query.KeyTransparencyQueryService/Monitor": {
    isRequestStream: false;
    Request: typeof kt_query.MonitorRequest;
    isResponseStream: false;
    Response: typeof kt_query.MonitorResponse;
  };
  "org.signal.registration.rpc.RegistrationService/CreateSession": {
    isRequestStream: false;
    Request: typeof org.signal.registration.rpc.CreateRegistrationSessionRequest;
    isResponseStream: false;
    Response: typeof org.signal.registration.rpc.CreateRegistrationSessionResponse;
  };
  "org.signal.registration.rpc.RegistrationService/GetSessionMetadata": {
    isRequestStream: false;
    Request: typeof org.signal.registration.rpc.GetRegistrationSessionMetadataRequest;
    isResponseStream: false;
    Response: typeof org.signal.registration.rpc.GetRegistrationSessionMetadataResponse;
  };
  "org.signal.registration.rpc.RegistrationService/SendVerificationCode": {
    isRequestStream: false;
    Request: typeof org.signal.registration.rpc.SendVerificationCodeRequest;
    isResponseStream: false;
    Response: typeof org.signal.registration.rpc.SendVerificationCodeResponse;
  };
  "org.signal.registration.rpc.RegistrationService/CheckVerificationCode": {
    isRequestStream: false;
    Request: typeof org.signal.registration.rpc.CheckVerificationCodeRequest;
    isResponseStream: false;
    Response: typeof org.signal.registration.rpc.CheckVerificationCodeResponse;
  };
  "org.signal.chat.account.Accounts/GetAccountIdentity": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.GetAccountIdentityRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.GetAccountIdentityResponse;
  };
  "org.signal.chat.account.Accounts/DeleteAccount": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.DeleteAccountRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.DeleteAccountResponse;
  };
  "org.signal.chat.account.Accounts/SetRegistrationLock": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.SetRegistrationLockRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.SetRegistrationLockResponse;
  };
  "org.signal.chat.account.Accounts/ClearRegistrationLock": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.ClearRegistrationLockRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.ClearRegistrationLockResponse;
  };
  "org.signal.chat.account.Accounts/ReserveUsernameHash": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.ReserveUsernameHashRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.ReserveUsernameHashResponse;
  };
  "org.signal.chat.account.Accounts/ConfirmUsernameHash": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.ConfirmUsernameHashRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.ConfirmUsernameHashResponse;
  };
  "org.signal.chat.account.Accounts/DeleteUsernameHash": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.DeleteUsernameHashRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.DeleteUsernameHashResponse;
  };
  "org.signal.chat.account.Accounts/SetUsernameLink": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.SetUsernameLinkRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.SetUsernameLinkResponse;
  };
  "org.signal.chat.account.Accounts/DeleteUsernameLink": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.DeleteUsernameLinkRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.DeleteUsernameLinkResponse;
  };
  "org.signal.chat.account.Accounts/ConfigureUnidentifiedAccess": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.ConfigureUnidentifiedAccessRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.ConfigureUnidentifiedAccessResponse;
  };
  "org.signal.chat.account.Accounts/SetDiscoverableByPhoneNumber": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.SetDiscoverableByPhoneNumberRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.SetDiscoverableByPhoneNumberResponse;
  };
  "org.signal.chat.account.Accounts/SetRegistrationRecoveryPassword": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.SetRegistrationRecoveryPasswordRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.SetRegistrationRecoveryPasswordResponse;
  };
  "org.signal.chat.account.AccountsAnonymous/CheckAccountExistence": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.CheckAccountExistenceRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.CheckAccountExistenceResponse;
  };
  "org.signal.chat.account.AccountsAnonymous/LookupUsernameHash": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.LookupUsernameHashRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.LookupUsernameHashResponse;
  };
  "org.signal.chat.account.AccountsAnonymous/LookupUsernameLink": {
    isRequestStream: false;
    Request: typeof org.signal.chat.account.LookupUsernameLinkRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.account.LookupUsernameLinkResponse;
  };
  "org.signal.chat.attachments.Attachments/GetUploadForm": {
    isRequestStream: false;
    Request: typeof org.signal.chat.attachments.GetUploadFormRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.attachments.GetUploadFormResponse;
  };
  "org.signal.chat.backup.Backups/SetBackupId": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.SetBackupIdRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.SetBackupIdResponse;
  };
  "org.signal.chat.backup.Backups/RedeemReceipt": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.RedeemReceiptRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.RedeemReceiptResponse;
  };
  "org.signal.chat.backup.Backups/GetBackupAuthCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetBackupAuthCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetBackupAuthCredentialsResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/GetCdnCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetCdnCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetCdnCredentialsResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/GetSvrBCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetSvrBCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetSvrBCredentialsResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/GetMessageBackupInfo": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetBackupInfoRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetMessageBackupInfoResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/GetMediaBackupInfo": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetBackupInfoRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetMediaBackupInfoResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/SetPublicKey": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.SetPublicKeyRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.SetPublicKeyResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/Refresh": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.RefreshRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.RefreshResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/GetUploadForm": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.GetUploadFormRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.GetUploadFormResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/CopyMedia": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.CopyMediaRequest;
    isResponseStream: true;
    Response: typeof org.signal.chat.backup.CopyMediaResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/ListMedia": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.ListMediaRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.ListMediaResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/DeleteMedia": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.DeleteMediaRequest;
    isResponseStream: true;
    Response: typeof org.signal.chat.backup.DeleteMediaResponse;
  };
  "org.signal.chat.backup.BackupsAnonymous/DeleteAll": {
    isRequestStream: false;
    Request: typeof org.signal.chat.backup.DeleteAllRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.backup.DeleteAllResponse;
  };
  "org.signal.chat.calling.quality.CallQuality/SubmitCallQualitySurvey": {
    isRequestStream: false;
    Request: typeof org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse;
  };
  "org.signal.chat.calling.Calling/GetTurnCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.calling.GetTurnCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.calling.GetTurnCredentialsResponse;
  };
  "org.signal.chat.credentials.ExternalServiceCredentials/GetExternalServiceCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.credentials.GetExternalServiceCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.credentials.GetExternalServiceCredentialsResponse;
  };
  "org.signal.chat.credentials.ExternalServiceCredentialsAnonymous/CheckSvrCredentials": {
    isRequestStream: false;
    Request: typeof org.signal.chat.credentials.CheckSvrCredentialsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.credentials.CheckSvrCredentialsResponse;
  };
  "org.signal.chat.device.Devices/GetDevices": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.GetDevicesRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.GetDevicesResponse;
  };
  "org.signal.chat.device.Devices/RemoveDevice": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.RemoveDeviceRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.RemoveDeviceResponse;
  };
  "org.signal.chat.device.Devices/SetDeviceName": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.SetDeviceNameRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.SetDeviceNameResponse;
  };
  "org.signal.chat.device.Devices/SetPushToken": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.SetPushTokenRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.SetPushTokenResponse;
  };
  "org.signal.chat.device.Devices/ClearPushToken": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.ClearPushTokenRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.ClearPushTokenResponse;
  };
  "org.signal.chat.device.Devices/SetCapabilities": {
    isRequestStream: false;
    Request: typeof org.signal.chat.device.SetCapabilitiesRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.device.SetCapabilitiesResponse;
  };
  "org.signal.chat.keys.Keys/GetPreKeyCount": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.GetPreKeyCountRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.GetPreKeyCountResponse;
  };
  "org.signal.chat.keys.Keys/GetPreKeys": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.GetPreKeysRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.GetPreKeysResponse;
  };
  "org.signal.chat.keys.Keys/SetOneTimeEcPreKeys": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.SetOneTimeEcPreKeysRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.SetPreKeyResponse;
  };
  "org.signal.chat.keys.Keys/SetOneTimeKemSignedPreKeys": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.SetPreKeyResponse;
  };
  "org.signal.chat.keys.Keys/SetEcSignedPreKey": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.SetEcSignedPreKeyRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.SetPreKeyResponse;
  };
  "org.signal.chat.keys.Keys/SetKemLastResortPreKey": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.SetKemLastResortPreKeyRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.SetPreKeyResponse;
  };
  "org.signal.chat.keys.KeysAnonymous/GetPreKeys": {
    isRequestStream: false;
    Request: typeof org.signal.chat.keys.GetPreKeysAnonymousRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.keys.GetPreKeysAnonymousResponse;
  };
  "org.signal.chat.keys.KeysAnonymous/CheckIdentityKeys": {
    isRequestStream: true;
    Request: typeof org.signal.chat.keys.CheckIdentityKeyRequest;
    isResponseStream: true;
    Response: typeof org.signal.chat.keys.CheckIdentityKeyResponse;
  };
  "org.signal.chat.messages.Messages/SendMessage": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendAuthenticatedSenderMessageRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMessageAuthenticatedSenderResponse;
  };
  "org.signal.chat.messages.Messages/SendSyncMessage": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendSyncMessageRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMessageAuthenticatedSenderResponse;
  };
  "org.signal.chat.messages.MessagesAnonymous/SendSingleRecipientMessage": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendSealedSenderMessageRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMessageResponse;
  };
  "org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientMessage": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendMultiRecipientMessageRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMultiRecipientMessageResponse;
  };
  "org.signal.chat.messages.MessagesAnonymous/SendStory": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendStoryMessageRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMessageResponse;
  };
  "org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientStory": {
    isRequestStream: false;
    Request: typeof org.signal.chat.messages.SendMultiRecipientStoryRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.messages.SendMultiRecipientMessageResponse;
  };
  "org.signal.chat.payments.Payments/GetCurrencyConversions": {
    isRequestStream: false;
    Request: typeof org.signal.chat.payments.GetCurrencyConversionsRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.payments.GetCurrencyConversionsResponse;
  };
  "org.signal.chat.profile.Profile/SetProfile": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.SetProfileRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.SetProfileResponse;
  };
  "org.signal.chat.profile.Profile/GetVersionedProfile": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetVersionedProfileRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetVersionedProfileResponse;
  };
  "org.signal.chat.profile.Profile/GetUnversionedProfile": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetUnversionedProfileRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetUnversionedProfileResponse;
  };
  "org.signal.chat.profile.Profile/GetExpiringProfileKeyCredential": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetExpiringProfileKeyCredentialResponse;
  };
  "org.signal.chat.profile.ProfileAnonymous/GetVersionedProfile": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetVersionedProfileAnonymousRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetVersionedProfileResponse;
  };
  "org.signal.chat.profile.ProfileAnonymous/GetUnversionedProfile": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetUnversionedProfileAnonymousRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetUnversionedProfileResponse;
  };
  "org.signal.chat.profile.ProfileAnonymous/GetExpiringProfileKeyCredential": {
    isRequestStream: false;
    Request: typeof org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest;
    isResponseStream: false;
    Response: typeof org.signal.chat.profile.GetExpiringProfileKeyCredentialResponse;
  };
};