import * as Native from './Native.js'; export declare enum ServiceIdKind { Aci = 0, Pni = 1 } /** * Typed representation of a Signal service ID, which can be one of various types. * * Conceptually this is a UUID in a particular "namespace" representing a particular way to reach a * user on the Signal service. */ export declare abstract class ServiceId extends Object { private readonly serviceIdFixedWidthBinary; constructor(serviceIdFixedWidthBinary: Uint8Array); protected static fromUuidBytesAndKind(this: new (serviceIdFixedWidthBinary: Uint8Array) => InstanceType, uuidBytes: ArrayLike, kind: ServiceIdKind): InstanceType; getServiceIdBinary(): Uint8Array; getServiceIdFixedWidthBinary(): Uint8Array; getServiceIdString(): string; toString(): string; private downcastTo; static parseFromServiceIdFixedWidthBinary(this: T, serviceIdFixedWidthBinary: Uint8Array): InstanceType; static parseFromServiceIdBinary(this: T, serviceIdBinary: Uint8Array): InstanceType; static parseFromServiceIdString(this: T, serviceIdString: string): InstanceType; getRawUuid(): string; getRawUuidBytes(): Uint8Array; isEqual(other: ServiceId): boolean; /** * Orders ServiceIds by kind, then lexicographically by the bytes of the UUID. * * Compatible with Array.sort. */ static comparator(this: void, lhs: ServiceId, rhs: ServiceId): number; static toConcatenatedFixedWidthBinary(serviceIds: ServiceId[]): Uint8Array; } export declare class Aci extends ServiceId { private readonly __type?; static fromUuid(uuidString: string): Aci; static fromUuidBytes(uuidBytes: ArrayLike): Aci; } export declare class Pni extends ServiceId { private readonly __type?; static fromUuid(uuidString: string): Pni; static fromUuidBytes(uuidBytes: ArrayLike): Pni; } export declare class ProtocolAddress { readonly _nativeHandle: Native.ProtocolAddress; private constructor(); static _fromNativeHandle(handle: Native.ProtocolAddress): ProtocolAddress; /** * @param name the identifer for the recipient, usually a `ServiceId` * @param deviceId the identifier for the device; must be in the range 1-127 inclusive */ static new(name: string | ServiceId, deviceId: number): ProtocolAddress; name(): string; /** * Returns a ServiceId if this address contains a valid ServiceId, `null` otherwise. * * In a future release ProtocolAddresses will *only* support ServiceIds. */ serviceId(): ServiceId | null; deviceId(): number; toString(): string; }