@signalapp/libsignal-client 0.85.0 → 0.85.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/AccountKeys.js +1 -1
  2. package/dist/Address.d.ts +1 -1
  3. package/dist/Address.js +1 -1
  4. package/dist/EcKeys.d.ts +1 -1
  5. package/dist/EcKeys.js +1 -1
  6. package/dist/Errors.d.ts +1 -1
  7. package/dist/MessageBackup.d.ts +1 -1
  8. package/dist/MessageBackup.js +1 -1
  9. package/dist/Minidump.js +1 -1
  10. package/dist/Mp4Sanitizer.d.ts +1 -1
  11. package/dist/Mp4Sanitizer.js +1 -1
  12. package/dist/Native.d.ts +365 -0
  13. package/dist/Native.js +14 -0
  14. package/dist/SealedSenderMultiRecipientMessage.d.ts +1 -1
  15. package/dist/SealedSenderMultiRecipientMessage.js +1 -1
  16. package/dist/WebpSanitizer.js +1 -1
  17. package/dist/acknowledgments.md +1 -1
  18. package/dist/incremental_mac.js +1 -1
  19. package/dist/index.d.ts +3 -2
  20. package/dist/index.js +2 -1
  21. package/dist/internal.d.ts +1 -1
  22. package/dist/internal.js +1 -1
  23. package/dist/io.d.ts +1 -1
  24. package/dist/net/CDSI.d.ts +1 -1
  25. package/dist/net/CDSI.js +1 -1
  26. package/dist/net/Chat.d.ts +7 -6
  27. package/dist/net/Chat.js +4 -3
  28. package/dist/net/FakeChat.d.ts +31 -0
  29. package/dist/net/FakeChat.js +67 -0
  30. package/dist/net/KeyTransparency.d.ts +1 -1
  31. package/dist/net/KeyTransparency.js +1 -1
  32. package/dist/net/Registration.d.ts +5 -4
  33. package/dist/net/Registration.js +8 -4
  34. package/dist/net/SvrB.d.ts +1 -1
  35. package/dist/net/SvrB.js +1 -1
  36. package/dist/net/chat/UnauthMessagesService.js +1 -1
  37. package/dist/net/chat/UnauthUsernamesService.d.ts +19 -0
  38. package/dist/net/chat/UnauthUsernamesService.js +6 -1
  39. package/dist/net.d.ts +1 -1
  40. package/dist/net.js +1 -1
  41. package/dist/usernames.js +1 -1
  42. package/dist/uuid.d.ts +1 -0
  43. package/dist/uuid.js +6 -0
  44. package/dist/zkgroup/GenericServerPublicParams.js +1 -1
  45. package/dist/zkgroup/GenericServerSecretParams.js +1 -1
  46. package/dist/zkgroup/ServerPublicParams.d.ts +1 -1
  47. package/dist/zkgroup/ServerPublicParams.js +1 -1
  48. package/dist/zkgroup/ServerSecretParams.d.ts +1 -1
  49. package/dist/zkgroup/ServerSecretParams.js +1 -1
  50. package/dist/zkgroup/auth/AuthCredentialPresentation.js +1 -1
  51. package/dist/zkgroup/auth/AuthCredentialWithPni.js +1 -1
  52. package/dist/zkgroup/auth/AuthCredentialWithPniResponse.js +1 -1
  53. package/dist/zkgroup/auth/ClientZkAuthOperations.js +1 -1
  54. package/dist/zkgroup/auth/ServerZkAuthOperations.js +1 -1
  55. package/dist/zkgroup/backups/BackupAuthCredential.js +1 -1
  56. package/dist/zkgroup/backups/BackupAuthCredentialPresentation.js +1 -1
  57. package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +1 -1
  58. package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +1 -1
  59. package/dist/zkgroup/backups/BackupAuthCredentialResponse.js +1 -1
  60. package/dist/zkgroup/calllinks/CallLinkAuthCredential.js +1 -1
  61. package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.js +1 -1
  62. package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.js +1 -1
  63. package/dist/zkgroup/calllinks/CallLinkPublicParams.js +1 -1
  64. package/dist/zkgroup/calllinks/CallLinkSecretParams.js +1 -1
  65. package/dist/zkgroup/calllinks/CreateCallLinkCredential.js +1 -1
  66. package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.js +1 -1
  67. package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.js +1 -1
  68. package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.js +1 -1
  69. package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.js +1 -1
  70. package/dist/zkgroup/groups/ClientZkGroupCipher.js +1 -1
  71. package/dist/zkgroup/groups/GroupPublicParams.js +1 -1
  72. package/dist/zkgroup/groups/GroupSecretParams.js +1 -1
  73. package/dist/zkgroup/groups/ProfileKeyCiphertext.js +1 -1
  74. package/dist/zkgroup/groups/UuidCiphertext.js +1 -1
  75. package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.js +1 -1
  76. package/dist/zkgroup/groupsend/GroupSendEndorsement.js +1 -1
  77. package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.js +1 -1
  78. package/dist/zkgroup/groupsend/GroupSendFullToken.js +1 -1
  79. package/dist/zkgroup/groupsend/GroupSendToken.js +1 -1
  80. package/dist/zkgroup/internal/ByteArray.js +1 -1
  81. package/dist/zkgroup/profiles/ClientZkProfileOperations.js +1 -1
  82. package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.js +1 -1
  83. package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.js +1 -1
  84. package/dist/zkgroup/profiles/ProfileKey.js +1 -1
  85. package/dist/zkgroup/profiles/ProfileKeyCommitment.js +1 -1
  86. package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.js +1 -1
  87. package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.js +1 -1
  88. package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.js +1 -1
  89. package/dist/zkgroup/profiles/ServerZkProfileOperations.js +1 -1
  90. package/dist/zkgroup/receipts/ClientZkReceiptOperations.js +1 -1
  91. package/dist/zkgroup/receipts/ReceiptCredential.js +1 -1
  92. package/dist/zkgroup/receipts/ReceiptCredentialPresentation.js +1 -1
  93. package/dist/zkgroup/receipts/ReceiptCredentialRequest.js +1 -1
  94. package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.js +1 -1
  95. package/dist/zkgroup/receipts/ReceiptCredentialResponse.js +1 -1
  96. package/dist/zkgroup/receipts/ServerZkReceiptOperations.js +1 -1
  97. package/package.json +4 -3
  98. package/prebuilds/darwin-arm64/@signalapp+libsignal-client.node +0 -0
  99. package/prebuilds/darwin-x64/@signalapp+libsignal-client.node +0 -0
  100. package/prebuilds/linux-arm64/@signalapp+libsignal-client.node +0 -0
  101. package/prebuilds/linux-x64/@signalapp+libsignal-client.node +0 -0
  102. package/prebuilds/win32-arm64/@signalapp+libsignal-client.node +0 -0
  103. package/prebuilds/win32-x64/@signalapp+libsignal-client.node +0 -0
  104. package/Native.d.ts +0 -817
  105. package/Native.js +0 -9
package/dist/Native.js ADDED
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2020 Signal Messenger, LLC.
3
+ // SPDX-License-Identifier: AGPL-3.0-only
4
+ //
5
+ export var IdentityChange;
6
+ (function (IdentityChange) {
7
+ // This must be kept in sync with the Rust enum of the same name.
8
+ IdentityChange[IdentityChange["NewOrUnchanged"] = 0] = "NewOrUnchanged";
9
+ IdentityChange[IdentityChange["ReplacedExisting"] = 1] = "ReplacedExisting";
10
+ })(IdentityChange || (IdentityChange = {}));
11
+ import load from 'node-gyp-build';
12
+ const { registerErrors, initLogger, SealedSenderMultiRecipientMessage_Parse, MinidumpToJSONString, Aes256GcmSiv_New, Aes256GcmSiv_Encrypt, Aes256GcmSiv_Decrypt, PublicKey_HpkeSeal, PrivateKey_HpkeOpen, HKDF_DeriveSecrets, ServiceId_ServiceIdBinary, ServiceId_ServiceIdString, ServiceId_ServiceIdLog, ServiceId_ParseFromServiceIdBinary, ServiceId_ParseFromServiceIdString, ProtocolAddress_New, PublicKey_Deserialize, PublicKey_Serialize, PublicKey_GetPublicKeyBytes, ProtocolAddress_DeviceId, ProtocolAddress_Name, PublicKey_Equals, PublicKey_Compare, PublicKey_Verify, PrivateKey_Deserialize, PrivateKey_Serialize, PrivateKey_Generate, PrivateKey_GetPublicKey, PrivateKey_Sign, PrivateKey_Agree, KyberPublicKey_Serialize, KyberPublicKey_Deserialize, KyberSecretKey_Serialize, KyberSecretKey_Deserialize, KyberPublicKey_Equals, KyberKeyPair_Generate, KyberKeyPair_GetPublicKey, KyberKeyPair_GetSecretKey, IdentityKeyPair_Serialize, IdentityKeyPair_Deserialize, IdentityKeyPair_SignAlternateIdentity, IdentityKey_VerifyAlternateIdentity, Fingerprint_New, Fingerprint_ScannableEncoding, Fingerprint_DisplayString, ScannableFingerprint_Compare, SignalMessage_Deserialize, SignalMessage_GetBody, SignalMessage_GetSerialized, SignalMessage_GetCounter, SignalMessage_GetMessageVersion, SignalMessage_GetPqRatchet, SignalMessage_New, SignalMessage_VerifyMac, PreKeySignalMessage_New, PreKeySignalMessage_Deserialize, PreKeySignalMessage_Serialize, PreKeySignalMessage_GetRegistrationId, PreKeySignalMessage_GetSignedPreKeyId, PreKeySignalMessage_GetPreKeyId, PreKeySignalMessage_GetVersion, SenderKeyMessage_Deserialize, SenderKeyMessage_GetCipherText, SenderKeyMessage_Serialize, SenderKeyMessage_GetDistributionId, SenderKeyMessage_GetChainId, SenderKeyMessage_GetIteration, SenderKeyMessage_New, SenderKeyMessage_VerifySignature, SenderKeyDistributionMessage_Deserialize, SenderKeyDistributionMessage_GetChainKey, SenderKeyDistributionMessage_Serialize, SenderKeyDistributionMessage_GetDistributionId, SenderKeyDistributionMessage_GetChainId, SenderKeyDistributionMessage_GetIteration, SenderKeyDistributionMessage_New, DecryptionErrorMessage_Deserialize, DecryptionErrorMessage_GetTimestamp, DecryptionErrorMessage_GetDeviceId, DecryptionErrorMessage_Serialize, DecryptionErrorMessage_GetRatchetKey, DecryptionErrorMessage_ForOriginalMessage, DecryptionErrorMessage_ExtractFromSerializedContent, PlaintextContent_Deserialize, PlaintextContent_Serialize, PlaintextContent_GetBody, PlaintextContent_FromDecryptionErrorMessage, PreKeyBundle_New, PreKeyBundle_GetIdentityKey, PreKeyBundle_GetSignedPreKeySignature, PreKeyBundle_GetKyberPreKeySignature, PreKeyBundle_GetRegistrationId, PreKeyBundle_GetDeviceId, PreKeyBundle_GetSignedPreKeyId, PreKeyBundle_GetKyberPreKeyId, PreKeyBundle_GetPreKeyId, PreKeyBundle_GetPreKeyPublic, PreKeyBundle_GetSignedPreKeyPublic, PreKeyBundle_GetKyberPreKeyPublic, SignedPreKeyRecord_Deserialize, SignedPreKeyRecord_GetSignature, SignedPreKeyRecord_Serialize, SignedPreKeyRecord_GetId, SignedPreKeyRecord_GetTimestamp, SignedPreKeyRecord_GetPublicKey, SignedPreKeyRecord_GetPrivateKey, KyberPreKeyRecord_Deserialize, KyberPreKeyRecord_GetSignature, KyberPreKeyRecord_Serialize, KyberPreKeyRecord_GetId, KyberPreKeyRecord_GetTimestamp, KyberPreKeyRecord_GetPublicKey, KyberPreKeyRecord_GetSecretKey, KyberPreKeyRecord_GetKeyPair, SignedPreKeyRecord_New, KyberPreKeyRecord_New, PreKeyRecord_Deserialize, PreKeyRecord_Serialize, PreKeyRecord_GetId, PreKeyRecord_GetPublicKey, PreKeyRecord_GetPrivateKey, PreKeyRecord_New, SenderKeyRecord_Deserialize, SenderKeyRecord_Serialize, ServerCertificate_Deserialize, ServerCertificate_GetSerialized, ServerCertificate_GetCertificate, ServerCertificate_GetSignature, ServerCertificate_GetKeyId, ServerCertificate_GetKey, ServerCertificate_New, SenderCertificate_Deserialize, SenderCertificate_GetSerialized, SenderCertificate_GetCertificate, SenderCertificate_GetSignature, SenderCertificate_GetSenderUuid, SenderCertificate_GetSenderE164, SenderCertificate_GetExpiration, SenderCertificate_GetDeviceId, SenderCertificate_GetKey, SenderCertificate_Validate, SenderCertificate_GetServerCertificate, SenderCertificate_New, UnidentifiedSenderMessageContent_Deserialize, UnidentifiedSenderMessageContent_Serialize, UnidentifiedSenderMessageContent_GetContents, UnidentifiedSenderMessageContent_GetGroupId, UnidentifiedSenderMessageContent_GetSenderCert, UnidentifiedSenderMessageContent_GetMsgType, UnidentifiedSenderMessageContent_GetContentHint, UnidentifiedSenderMessageContent_New, CiphertextMessage_Type, CiphertextMessage_Serialize, CiphertextMessage_FromPlaintextContent, SessionRecord_ArchiveCurrentState, SessionRecord_HasUsableSenderChain, SessionRecord_CurrentRatchetKeyMatches, SessionRecord_Deserialize, SessionRecord_Serialize, SessionRecord_GetLocalRegistrationId, SessionRecord_GetRemoteRegistrationId, SealedSenderDecryptionResult_GetSenderUuid, SealedSenderDecryptionResult_GetSenderE164, SealedSenderDecryptionResult_GetDeviceId, SealedSenderDecryptionResult_Message, SessionBuilder_ProcessPreKeyBundle, SessionCipher_EncryptMessage, SessionCipher_DecryptSignalMessage, SessionCipher_DecryptPreKeySignalMessage, SealedSender_Encrypt, SealedSender_MultiRecipientEncrypt, SealedSender_MultiRecipientMessageForSingleRecipient, SealedSender_DecryptToUsmc, SealedSender_DecryptMessage, SenderKeyDistributionMessage_Create, SenderKeyDistributionMessage_Process, GroupCipher_EncryptMessage, GroupCipher_DecryptMessage, Cds2ClientState_New, HsmEnclaveClient_New, HsmEnclaveClient_CompleteHandshake, HsmEnclaveClient_EstablishedSend, HsmEnclaveClient_EstablishedRecv, HsmEnclaveClient_InitialRequest, SgxClientState_InitialRequest, SgxClientState_CompleteHandshake, SgxClientState_EstablishedSend, SgxClientState_EstablishedRecv, ExpiringProfileKeyCredential_CheckValidContents, ExpiringProfileKeyCredentialResponse_CheckValidContents, GroupMasterKey_CheckValidContents, GroupPublicParams_CheckValidContents, GroupSecretParams_CheckValidContents, ProfileKey_CheckValidContents, ProfileKeyCiphertext_CheckValidContents, ProfileKeyCommitment_CheckValidContents, ProfileKeyCredentialRequest_CheckValidContents, ProfileKeyCredentialRequestContext_CheckValidContents, ReceiptCredential_CheckValidContents, ReceiptCredentialPresentation_CheckValidContents, ReceiptCredentialRequest_CheckValidContents, ReceiptCredentialRequestContext_CheckValidContents, ReceiptCredentialResponse_CheckValidContents, UuidCiphertext_CheckValidContents, ServerPublicParams_Deserialize, ServerPublicParams_Serialize, ServerSecretParams_Deserialize, ServerSecretParams_Serialize, ProfileKey_GetCommitment, ProfileKey_GetProfileKeyVersion, ProfileKey_DeriveAccessKey, GroupSecretParams_GenerateDeterministic, GroupSecretParams_DeriveFromMasterKey, GroupSecretParams_GetMasterKey, GroupSecretParams_GetPublicParams, GroupSecretParams_EncryptServiceId, GroupSecretParams_DecryptServiceId, GroupSecretParams_EncryptProfileKey, GroupSecretParams_DecryptProfileKey, GroupSecretParams_EncryptBlobWithPaddingDeterministic, GroupSecretParams_DecryptBlobWithPadding, ServerSecretParams_GenerateDeterministic, ServerSecretParams_GetPublicParams, ServerSecretParams_SignDeterministic, ServerPublicParams_GetEndorsementPublicKey, ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId, ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic, ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic, ServerPublicParams_ReceiveExpiringProfileKeyCredential, ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic, ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic, ServerPublicParams_ReceiveReceiptCredential, ServerPublicParams_CreateReceiptCredentialPresentationDeterministic, ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic, AuthCredentialWithPni_CheckValidContents, AuthCredentialWithPniResponse_CheckValidContents, ServerSecretParams_VerifyAuthCredentialPresentation, ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic, ServerSecretParams_VerifyProfileKeyCredentialPresentation, ServerSecretParams_IssueReceiptCredentialDeterministic, ServerSecretParams_VerifyReceiptCredentialPresentation, GroupPublicParams_GetGroupIdentifier, ServerPublicParams_VerifySignature, AuthCredentialPresentation_CheckValidContents, AuthCredentialPresentation_GetUuidCiphertext, AuthCredentialPresentation_GetPniCiphertext, AuthCredentialPresentation_GetRedemptionTime, ProfileKeyCredentialRequestContext_GetRequest, ExpiringProfileKeyCredential_GetExpirationTime, ProfileKeyCredentialPresentation_CheckValidContents, ProfileKeyCredentialPresentation_GetUuidCiphertext, ProfileKeyCredentialPresentation_GetProfileKeyCiphertext, ReceiptCredentialRequestContext_GetRequest, ReceiptCredential_GetReceiptExpirationTime, ReceiptCredential_GetReceiptLevel, ReceiptCredentialPresentation_GetReceiptExpirationTime, ReceiptCredentialPresentation_GetReceiptLevel, ReceiptCredentialPresentation_GetReceiptSerial, GenericServerSecretParams_CheckValidContents, GenericServerSecretParams_GenerateDeterministic, GenericServerSecretParams_GetPublicParams, GenericServerPublicParams_CheckValidContents, CallLinkSecretParams_CheckValidContents, CallLinkSecretParams_DeriveFromRootKey, CallLinkSecretParams_GetPublicParams, CallLinkSecretParams_DecryptUserId, CallLinkSecretParams_EncryptUserId, CallLinkPublicParams_CheckValidContents, CreateCallLinkCredentialRequestContext_CheckValidContents, CreateCallLinkCredentialRequestContext_NewDeterministic, CreateCallLinkCredentialRequestContext_GetRequest, CreateCallLinkCredentialRequest_CheckValidContents, CreateCallLinkCredentialRequest_IssueDeterministic, CreateCallLinkCredentialResponse_CheckValidContents, CreateCallLinkCredentialRequestContext_ReceiveResponse, CreateCallLinkCredential_CheckValidContents, CreateCallLinkCredential_PresentDeterministic, CreateCallLinkCredentialPresentation_CheckValidContents, CreateCallLinkCredentialPresentation_Verify, CallLinkAuthCredentialResponse_CheckValidContents, CallLinkAuthCredentialResponse_IssueDeterministic, CallLinkAuthCredentialResponse_Receive, CallLinkAuthCredential_CheckValidContents, CallLinkAuthCredential_PresentDeterministic, CallLinkAuthCredentialPresentation_CheckValidContents, CallLinkAuthCredentialPresentation_Verify, CallLinkAuthCredentialPresentation_GetUserId, BackupAuthCredentialRequestContext_New, BackupAuthCredentialRequestContext_CheckValidContents, BackupAuthCredentialRequestContext_GetRequest, BackupAuthCredentialRequest_CheckValidContents, BackupAuthCredentialRequest_IssueDeterministic, BackupAuthCredentialResponse_CheckValidContents, BackupAuthCredentialRequestContext_ReceiveResponse, BackupAuthCredential_CheckValidContents, BackupAuthCredential_GetBackupId, BackupAuthCredential_GetBackupLevel, BackupAuthCredential_GetType, BackupAuthCredential_PresentDeterministic, BackupAuthCredentialPresentation_CheckValidContents, BackupAuthCredentialPresentation_Verify, BackupAuthCredentialPresentation_GetBackupId, BackupAuthCredentialPresentation_GetBackupLevel, BackupAuthCredentialPresentation_GetType, GroupSendDerivedKeyPair_CheckValidContents, GroupSendDerivedKeyPair_ForExpiration, GroupSendEndorsementsResponse_CheckValidContents, GroupSendEndorsementsResponse_IssueDeterministic, GroupSendEndorsementsResponse_GetExpiration, GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds, GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts, GroupSendEndorsement_CheckValidContents, GroupSendEndorsement_Combine, GroupSendEndorsement_Remove, GroupSendEndorsement_ToToken, GroupSendEndorsement_CallLinkParams_ToToken, GroupSendToken_CheckValidContents, GroupSendToken_ToFullToken, GroupSendFullToken_CheckValidContents, GroupSendFullToken_GetExpiration, GroupSendFullToken_Verify, LookupRequest_new, LookupRequest_addE164, LookupRequest_addPreviousE164, LookupRequest_setToken, LookupRequest_addAciAndAccessKey, CdsiLookup_new, CdsiLookup_token, CdsiLookup_complete, HttpRequest_new, HttpRequest_add_header, ChatConnectionInfo_local_port, ChatConnectionInfo_ip_version, ChatConnectionInfo_description, UnauthenticatedChatConnection_connect, UnauthenticatedChatConnection_init_listener, UnauthenticatedChatConnection_send, UnauthenticatedChatConnection_disconnect, UnauthenticatedChatConnection_info, UnauthenticatedChatConnection_look_up_username_hash, UnauthenticatedChatConnection_look_up_username_link, UnauthenticatedChatConnection_send_multi_recipient_message, AuthenticatedChatConnection_preconnect, AuthenticatedChatConnection_connect, AuthenticatedChatConnection_init_listener, AuthenticatedChatConnection_send, AuthenticatedChatConnection_disconnect, AuthenticatedChatConnection_info, ServerMessageAck_SendStatus, KeyTransparency_AciSearchKey, KeyTransparency_E164SearchKey, KeyTransparency_UsernameHashSearchKey, KeyTransparency_Search, KeyTransparency_Monitor, KeyTransparency_Distinguished, RegistrationService_CreateSession, RegistrationService_ResumeSession, RegistrationService_RequestVerificationCode, RegistrationService_SubmitVerificationCode, RegistrationService_SubmitCaptcha, RegistrationService_CheckSvr2Credentials, RegistrationService_RegisterAccount, RegistrationService_ReregisterAccount, RegistrationService_SessionId, RegistrationService_RegistrationSession, RegistrationSession_GetAllowedToRequestCode, RegistrationSession_GetVerified, RegistrationSession_GetNextCallSeconds, RegistrationSession_GetNextSmsSeconds, RegistrationSession_GetNextVerificationAttemptSeconds, RegistrationSession_GetRequestedInformation, RegisterAccountRequest_Create, RegisterAccountRequest_SetSkipDeviceTransfer, RegisterAccountRequest_SetAccountPassword, RegisterAccountRequest_SetIdentityPublicKey, RegisterAccountRequest_SetIdentitySignedPreKey, RegisterAccountRequest_SetIdentityPqLastResortPreKey, RegistrationAccountAttributes_Create, RegisterAccountResponse_GetIdentity, RegisterAccountResponse_GetNumber, RegisterAccountResponse_GetUsernameHash, RegisterAccountResponse_GetUsernameLinkHandle, RegisterAccountResponse_GetStorageCapable, RegisterAccountResponse_GetReregistration, RegisterAccountResponse_GetEntitlementBadges, RegisterAccountResponse_GetEntitlementBackupLevel, RegisterAccountResponse_GetEntitlementBackupExpirationSeconds, SecureValueRecoveryForBackups_CreateNewBackupChain, SecureValueRecoveryForBackups_StoreBackup, SecureValueRecoveryForBackups_RestoreBackupFromServer, SecureValueRecoveryForBackups_RemoveBackup, BackupStoreResponse_GetForwardSecrecyToken, BackupStoreResponse_GetOpaqueMetadata, BackupStoreResponse_GetNextBackupSecretData, BackupRestoreResponse_GetForwardSecrecyToken, BackupRestoreResponse_GetNextBackupSecretData, TokioAsyncContext_new, TokioAsyncContext_cancel, ConnectionProxyConfig_new, ConnectionManager_new, ConnectionManager_set_proxy, ConnectionManager_set_invalid_proxy, ConnectionManager_clear_proxy, ConnectionManager_set_ipv6_enabled, ConnectionManager_set_censorship_circumvention_enabled, ConnectionManager_set_remote_config, ConnectionManager_on_network_change, AccountEntropyPool_Generate, AccountEntropyPool_IsValid, AccountEntropyPool_DeriveSvrKey, AccountEntropyPool_DeriveBackupKey, BackupKey_DeriveBackupId, BackupKey_DeriveEcKey, BackupKey_DeriveLocalBackupMetadataKey, BackupKey_DeriveMediaId, BackupKey_DeriveMediaEncryptionKey, BackupKey_DeriveThumbnailTransitEncryptionKey, IncrementalMac_CalculateChunkSize, IncrementalMac_Initialize, IncrementalMac_Update, IncrementalMac_Finalize, ValidatingMac_Initialize, ValidatingMac_Update, ValidatingMac_Finalize, MessageBackupKey_FromAccountEntropyPool, MessageBackupKey_FromBackupKeyAndBackupId, MessageBackupKey_GetHmacKey, MessageBackupKey_GetAesKey, MessageBackupValidator_Validate, OnlineBackupValidator_New, OnlineBackupValidator_AddFrame, OnlineBackupValidator_Finalize, BackupJsonExporter_New, BackupJsonExporter_GetInitialChunk, BackupJsonExporter_ExportFrames, BackupJsonExporter_Finish, Username_Hash, Username_Proof, Username_Verify, Username_CandidatesFrom, Username_HashFromParts, UsernameLink_Create, UsernameLink_DecryptUsername, SignalMedia_CheckAvailable, Mp4Sanitizer_Sanitize, WebpSanitizer_Sanitize, SanitizedMetadata_GetMetadata, SanitizedMetadata_GetDataOffset, SanitizedMetadata_GetDataLen, BridgedStringMap_new, BridgedStringMap_insert, TESTING_NonSuspendingBackgroundThreadRuntime_New, TESTING_FutureSuccess, TESTING_TokioAsyncContext_FutureSuccessBytes, TESTING_FutureFailure, TESTING_FutureCancellationCounter_Create, TESTING_FutureCancellationCounter_WaitForCount, TESTING_FutureIncrementOnCancel, TESTING_TokioAsyncFuture, TESTING_TestingHandleType_getValue, TESTING_FutureProducesPointerType, TESTING_OtherTestingHandleType_getValue, TESTING_FutureProducesOtherPointerType, TESTING_PanicOnBorrowSync, TESTING_PanicOnBorrowAsync, TESTING_PanicOnBorrowIo, TESTING_ErrorOnBorrowSync, TESTING_ErrorOnBorrowAsync, TESTING_ErrorOnBorrowIo, TESTING_PanicOnLoadSync, TESTING_PanicOnLoadAsync, TESTING_PanicOnLoadIo, TESTING_PanicInBodySync, TESTING_PanicInBodyAsync, TESTING_PanicInBodyIo, TESTING_PanicOnReturnSync, TESTING_PanicOnReturnAsync, TESTING_PanicOnReturnIo, TESTING_ErrorOnReturnSync, TESTING_ErrorOnReturnAsync, TESTING_ErrorOnReturnIo, TESTING_ReturnStringArray, TESTING_JoinStringArray, TESTING_ProcessBytestringArray, TESTING_RoundTripU8, TESTING_RoundTripU16, TESTING_RoundTripU32, TESTING_RoundTripI32, TESTING_RoundTripU64, TESTING_ConvertOptionalUuid, TESTING_InputStreamReadIntoZeroLengthSlice, ComparableBackup_ReadUnencrypted, ComparableBackup_GetComparableString, ComparableBackup_GetUnknownFields, TESTING_FakeChatServer_Create, TESTING_FakeChatServer_GetNextRemote, TESTING_FakeChatConnection_Create, TESTING_FakeChatConnection_TakeAuthenticatedChat, TESTING_FakeChatConnection_TakeUnauthenticatedChat, TESTING_FakeChatConnection_TakeRemote, TESTING_FakeChatRemoteEnd_SendRawServerRequest, TESTING_FakeChatRemoteEnd_SendRawServerResponse, TESTING_FakeChatRemoteEnd_SendServerResponse, TESTING_FakeChatRemoteEnd_InjectConnectionInterrupted, TESTING_FakeChatRemoteEnd_ReceiveIncomingRequest, TESTING_ChatResponseConvert, TESTING_ChatRequestGetMethod, TESTING_ChatRequestGetPath, TESTING_ChatRequestGetHeaderNames, TESTING_ChatRequestGetHeaderValue, TESTING_ChatRequestGetBody, TESTING_FakeChatResponse_Create, TESTING_ChatConnectErrorConvert, TESTING_ChatSendErrorConvert, TESTING_KeyTransFatalVerificationFailure, TESTING_KeyTransNonFatalVerificationFailure, TESTING_KeyTransChatSendError, TESTING_RegistrationSessionInfoConvert, TESTING_RegistrationService_CheckSvr2CredentialsResponseConvert, TESTING_FakeRegistrationSession_CreateSession, TESTING_RegisterAccountResponse_CreateTestValue, TESTING_RegistrationService_CreateSessionErrorConvert, TESTING_RegistrationService_ResumeSessionErrorConvert, TESTING_RegistrationService_UpdateSessionErrorConvert, TESTING_RegistrationService_RequestVerificationCodeErrorConvert, TESTING_RegistrationService_SubmitVerificationErrorConvert, TESTING_RegistrationService_CheckSvr2CredentialsErrorConvert, TESTING_RegistrationService_RegisterAccountErrorConvert, TESTING_CdsiLookupResponseConvert, TESTING_CdsiLookupErrorConvert, TESTING_ServerMessageAck_Create, TESTING_ConnectionManager_newLocalOverride, TESTING_ConnectionManager_isUsingProxy, TESTING_CreateOTP, TESTING_CreateOTPFromBase64, TESTING_SignedPublicPreKey_CheckBridgesCorrectly, TestingSemaphore_New, TestingSemaphore_AddPermits, TestingValueHolder_New, TestingValueHolder_Get, TESTING_ReturnPair, test_only_fn_returns_123, TESTING_BridgedStringMap_dump_to_json, TESTING_TokioAsyncContext_NewSingleThreaded, } = load(`${import.meta.dirname}/../`);
13
+ export { registerErrors, initLogger, SealedSenderMultiRecipientMessage_Parse, MinidumpToJSONString, Aes256GcmSiv_New, Aes256GcmSiv_Encrypt, Aes256GcmSiv_Decrypt, PublicKey_HpkeSeal, PrivateKey_HpkeOpen, HKDF_DeriveSecrets, ServiceId_ServiceIdBinary, ServiceId_ServiceIdString, ServiceId_ServiceIdLog, ServiceId_ParseFromServiceIdBinary, ServiceId_ParseFromServiceIdString, ProtocolAddress_New, PublicKey_Deserialize, PublicKey_Serialize, PublicKey_GetPublicKeyBytes, ProtocolAddress_DeviceId, ProtocolAddress_Name, PublicKey_Equals, PublicKey_Compare, PublicKey_Verify, PrivateKey_Deserialize, PrivateKey_Serialize, PrivateKey_Generate, PrivateKey_GetPublicKey, PrivateKey_Sign, PrivateKey_Agree, KyberPublicKey_Serialize, KyberPublicKey_Deserialize, KyberSecretKey_Serialize, KyberSecretKey_Deserialize, KyberPublicKey_Equals, KyberKeyPair_Generate, KyberKeyPair_GetPublicKey, KyberKeyPair_GetSecretKey, IdentityKeyPair_Serialize, IdentityKeyPair_Deserialize, IdentityKeyPair_SignAlternateIdentity, IdentityKey_VerifyAlternateIdentity, Fingerprint_New, Fingerprint_ScannableEncoding, Fingerprint_DisplayString, ScannableFingerprint_Compare, SignalMessage_Deserialize, SignalMessage_GetBody, SignalMessage_GetSerialized, SignalMessage_GetCounter, SignalMessage_GetMessageVersion, SignalMessage_GetPqRatchet, SignalMessage_New, SignalMessage_VerifyMac, PreKeySignalMessage_New, PreKeySignalMessage_Deserialize, PreKeySignalMessage_Serialize, PreKeySignalMessage_GetRegistrationId, PreKeySignalMessage_GetSignedPreKeyId, PreKeySignalMessage_GetPreKeyId, PreKeySignalMessage_GetVersion, SenderKeyMessage_Deserialize, SenderKeyMessage_GetCipherText, SenderKeyMessage_Serialize, SenderKeyMessage_GetDistributionId, SenderKeyMessage_GetChainId, SenderKeyMessage_GetIteration, SenderKeyMessage_New, SenderKeyMessage_VerifySignature, SenderKeyDistributionMessage_Deserialize, SenderKeyDistributionMessage_GetChainKey, SenderKeyDistributionMessage_Serialize, SenderKeyDistributionMessage_GetDistributionId, SenderKeyDistributionMessage_GetChainId, SenderKeyDistributionMessage_GetIteration, SenderKeyDistributionMessage_New, DecryptionErrorMessage_Deserialize, DecryptionErrorMessage_GetTimestamp, DecryptionErrorMessage_GetDeviceId, DecryptionErrorMessage_Serialize, DecryptionErrorMessage_GetRatchetKey, DecryptionErrorMessage_ForOriginalMessage, DecryptionErrorMessage_ExtractFromSerializedContent, PlaintextContent_Deserialize, PlaintextContent_Serialize, PlaintextContent_GetBody, PlaintextContent_FromDecryptionErrorMessage, PreKeyBundle_New, PreKeyBundle_GetIdentityKey, PreKeyBundle_GetSignedPreKeySignature, PreKeyBundle_GetKyberPreKeySignature, PreKeyBundle_GetRegistrationId, PreKeyBundle_GetDeviceId, PreKeyBundle_GetSignedPreKeyId, PreKeyBundle_GetKyberPreKeyId, PreKeyBundle_GetPreKeyId, PreKeyBundle_GetPreKeyPublic, PreKeyBundle_GetSignedPreKeyPublic, PreKeyBundle_GetKyberPreKeyPublic, SignedPreKeyRecord_Deserialize, SignedPreKeyRecord_GetSignature, SignedPreKeyRecord_Serialize, SignedPreKeyRecord_GetId, SignedPreKeyRecord_GetTimestamp, SignedPreKeyRecord_GetPublicKey, SignedPreKeyRecord_GetPrivateKey, KyberPreKeyRecord_Deserialize, KyberPreKeyRecord_GetSignature, KyberPreKeyRecord_Serialize, KyberPreKeyRecord_GetId, KyberPreKeyRecord_GetTimestamp, KyberPreKeyRecord_GetPublicKey, KyberPreKeyRecord_GetSecretKey, KyberPreKeyRecord_GetKeyPair, SignedPreKeyRecord_New, KyberPreKeyRecord_New, PreKeyRecord_Deserialize, PreKeyRecord_Serialize, PreKeyRecord_GetId, PreKeyRecord_GetPublicKey, PreKeyRecord_GetPrivateKey, PreKeyRecord_New, SenderKeyRecord_Deserialize, SenderKeyRecord_Serialize, ServerCertificate_Deserialize, ServerCertificate_GetSerialized, ServerCertificate_GetCertificate, ServerCertificate_GetSignature, ServerCertificate_GetKeyId, ServerCertificate_GetKey, ServerCertificate_New, SenderCertificate_Deserialize, SenderCertificate_GetSerialized, SenderCertificate_GetCertificate, SenderCertificate_GetSignature, SenderCertificate_GetSenderUuid, SenderCertificate_GetSenderE164, SenderCertificate_GetExpiration, SenderCertificate_GetDeviceId, SenderCertificate_GetKey, SenderCertificate_Validate, SenderCertificate_GetServerCertificate, SenderCertificate_New, UnidentifiedSenderMessageContent_Deserialize, UnidentifiedSenderMessageContent_Serialize, UnidentifiedSenderMessageContent_GetContents, UnidentifiedSenderMessageContent_GetGroupId, UnidentifiedSenderMessageContent_GetSenderCert, UnidentifiedSenderMessageContent_GetMsgType, UnidentifiedSenderMessageContent_GetContentHint, UnidentifiedSenderMessageContent_New, CiphertextMessage_Type, CiphertextMessage_Serialize, CiphertextMessage_FromPlaintextContent, SessionRecord_ArchiveCurrentState, SessionRecord_HasUsableSenderChain, SessionRecord_CurrentRatchetKeyMatches, SessionRecord_Deserialize, SessionRecord_Serialize, SessionRecord_GetLocalRegistrationId, SessionRecord_GetRemoteRegistrationId, SealedSenderDecryptionResult_GetSenderUuid, SealedSenderDecryptionResult_GetSenderE164, SealedSenderDecryptionResult_GetDeviceId, SealedSenderDecryptionResult_Message, SessionBuilder_ProcessPreKeyBundle, SessionCipher_EncryptMessage, SessionCipher_DecryptSignalMessage, SessionCipher_DecryptPreKeySignalMessage, SealedSender_Encrypt, SealedSender_MultiRecipientEncrypt, SealedSender_MultiRecipientMessageForSingleRecipient, SealedSender_DecryptToUsmc, SealedSender_DecryptMessage, SenderKeyDistributionMessage_Create, SenderKeyDistributionMessage_Process, GroupCipher_EncryptMessage, GroupCipher_DecryptMessage, Cds2ClientState_New, HsmEnclaveClient_New, HsmEnclaveClient_CompleteHandshake, HsmEnclaveClient_EstablishedSend, HsmEnclaveClient_EstablishedRecv, HsmEnclaveClient_InitialRequest, SgxClientState_InitialRequest, SgxClientState_CompleteHandshake, SgxClientState_EstablishedSend, SgxClientState_EstablishedRecv, ExpiringProfileKeyCredential_CheckValidContents, ExpiringProfileKeyCredentialResponse_CheckValidContents, GroupMasterKey_CheckValidContents, GroupPublicParams_CheckValidContents, GroupSecretParams_CheckValidContents, ProfileKey_CheckValidContents, ProfileKeyCiphertext_CheckValidContents, ProfileKeyCommitment_CheckValidContents, ProfileKeyCredentialRequest_CheckValidContents, ProfileKeyCredentialRequestContext_CheckValidContents, ReceiptCredential_CheckValidContents, ReceiptCredentialPresentation_CheckValidContents, ReceiptCredentialRequest_CheckValidContents, ReceiptCredentialRequestContext_CheckValidContents, ReceiptCredentialResponse_CheckValidContents, UuidCiphertext_CheckValidContents, ServerPublicParams_Deserialize, ServerPublicParams_Serialize, ServerSecretParams_Deserialize, ServerSecretParams_Serialize, ProfileKey_GetCommitment, ProfileKey_GetProfileKeyVersion, ProfileKey_DeriveAccessKey, GroupSecretParams_GenerateDeterministic, GroupSecretParams_DeriveFromMasterKey, GroupSecretParams_GetMasterKey, GroupSecretParams_GetPublicParams, GroupSecretParams_EncryptServiceId, GroupSecretParams_DecryptServiceId, GroupSecretParams_EncryptProfileKey, GroupSecretParams_DecryptProfileKey, GroupSecretParams_EncryptBlobWithPaddingDeterministic, GroupSecretParams_DecryptBlobWithPadding, ServerSecretParams_GenerateDeterministic, ServerSecretParams_GetPublicParams, ServerSecretParams_SignDeterministic, ServerPublicParams_GetEndorsementPublicKey, ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId, ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic, ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic, ServerPublicParams_ReceiveExpiringProfileKeyCredential, ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic, ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic, ServerPublicParams_ReceiveReceiptCredential, ServerPublicParams_CreateReceiptCredentialPresentationDeterministic, ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic, AuthCredentialWithPni_CheckValidContents, AuthCredentialWithPniResponse_CheckValidContents, ServerSecretParams_VerifyAuthCredentialPresentation, ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic, ServerSecretParams_VerifyProfileKeyCredentialPresentation, ServerSecretParams_IssueReceiptCredentialDeterministic, ServerSecretParams_VerifyReceiptCredentialPresentation, GroupPublicParams_GetGroupIdentifier, ServerPublicParams_VerifySignature, AuthCredentialPresentation_CheckValidContents, AuthCredentialPresentation_GetUuidCiphertext, AuthCredentialPresentation_GetPniCiphertext, AuthCredentialPresentation_GetRedemptionTime, ProfileKeyCredentialRequestContext_GetRequest, ExpiringProfileKeyCredential_GetExpirationTime, ProfileKeyCredentialPresentation_CheckValidContents, ProfileKeyCredentialPresentation_GetUuidCiphertext, ProfileKeyCredentialPresentation_GetProfileKeyCiphertext, ReceiptCredentialRequestContext_GetRequest, ReceiptCredential_GetReceiptExpirationTime, ReceiptCredential_GetReceiptLevel, ReceiptCredentialPresentation_GetReceiptExpirationTime, ReceiptCredentialPresentation_GetReceiptLevel, ReceiptCredentialPresentation_GetReceiptSerial, GenericServerSecretParams_CheckValidContents, GenericServerSecretParams_GenerateDeterministic, GenericServerSecretParams_GetPublicParams, GenericServerPublicParams_CheckValidContents, CallLinkSecretParams_CheckValidContents, CallLinkSecretParams_DeriveFromRootKey, CallLinkSecretParams_GetPublicParams, CallLinkSecretParams_DecryptUserId, CallLinkSecretParams_EncryptUserId, CallLinkPublicParams_CheckValidContents, CreateCallLinkCredentialRequestContext_CheckValidContents, CreateCallLinkCredentialRequestContext_NewDeterministic, CreateCallLinkCredentialRequestContext_GetRequest, CreateCallLinkCredentialRequest_CheckValidContents, CreateCallLinkCredentialRequest_IssueDeterministic, CreateCallLinkCredentialResponse_CheckValidContents, CreateCallLinkCredentialRequestContext_ReceiveResponse, CreateCallLinkCredential_CheckValidContents, CreateCallLinkCredential_PresentDeterministic, CreateCallLinkCredentialPresentation_CheckValidContents, CreateCallLinkCredentialPresentation_Verify, CallLinkAuthCredentialResponse_CheckValidContents, CallLinkAuthCredentialResponse_IssueDeterministic, CallLinkAuthCredentialResponse_Receive, CallLinkAuthCredential_CheckValidContents, CallLinkAuthCredential_PresentDeterministic, CallLinkAuthCredentialPresentation_CheckValidContents, CallLinkAuthCredentialPresentation_Verify, CallLinkAuthCredentialPresentation_GetUserId, BackupAuthCredentialRequestContext_New, BackupAuthCredentialRequestContext_CheckValidContents, BackupAuthCredentialRequestContext_GetRequest, BackupAuthCredentialRequest_CheckValidContents, BackupAuthCredentialRequest_IssueDeterministic, BackupAuthCredentialResponse_CheckValidContents, BackupAuthCredentialRequestContext_ReceiveResponse, BackupAuthCredential_CheckValidContents, BackupAuthCredential_GetBackupId, BackupAuthCredential_GetBackupLevel, BackupAuthCredential_GetType, BackupAuthCredential_PresentDeterministic, BackupAuthCredentialPresentation_CheckValidContents, BackupAuthCredentialPresentation_Verify, BackupAuthCredentialPresentation_GetBackupId, BackupAuthCredentialPresentation_GetBackupLevel, BackupAuthCredentialPresentation_GetType, GroupSendDerivedKeyPair_CheckValidContents, GroupSendDerivedKeyPair_ForExpiration, GroupSendEndorsementsResponse_CheckValidContents, GroupSendEndorsementsResponse_IssueDeterministic, GroupSendEndorsementsResponse_GetExpiration, GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds, GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts, GroupSendEndorsement_CheckValidContents, GroupSendEndorsement_Combine, GroupSendEndorsement_Remove, GroupSendEndorsement_ToToken, GroupSendEndorsement_CallLinkParams_ToToken, GroupSendToken_CheckValidContents, GroupSendToken_ToFullToken, GroupSendFullToken_CheckValidContents, GroupSendFullToken_GetExpiration, GroupSendFullToken_Verify, LookupRequest_new, LookupRequest_addE164, LookupRequest_addPreviousE164, LookupRequest_setToken, LookupRequest_addAciAndAccessKey, CdsiLookup_new, CdsiLookup_token, CdsiLookup_complete, HttpRequest_new, HttpRequest_add_header, ChatConnectionInfo_local_port, ChatConnectionInfo_ip_version, ChatConnectionInfo_description, UnauthenticatedChatConnection_connect, UnauthenticatedChatConnection_init_listener, UnauthenticatedChatConnection_send, UnauthenticatedChatConnection_disconnect, UnauthenticatedChatConnection_info, UnauthenticatedChatConnection_look_up_username_hash, UnauthenticatedChatConnection_look_up_username_link, UnauthenticatedChatConnection_send_multi_recipient_message, AuthenticatedChatConnection_preconnect, AuthenticatedChatConnection_connect, AuthenticatedChatConnection_init_listener, AuthenticatedChatConnection_send, AuthenticatedChatConnection_disconnect, AuthenticatedChatConnection_info, ServerMessageAck_SendStatus, KeyTransparency_AciSearchKey, KeyTransparency_E164SearchKey, KeyTransparency_UsernameHashSearchKey, KeyTransparency_Search, KeyTransparency_Monitor, KeyTransparency_Distinguished, RegistrationService_CreateSession, RegistrationService_ResumeSession, RegistrationService_RequestVerificationCode, RegistrationService_SubmitVerificationCode, RegistrationService_SubmitCaptcha, RegistrationService_CheckSvr2Credentials, RegistrationService_RegisterAccount, RegistrationService_ReregisterAccount, RegistrationService_SessionId, RegistrationService_RegistrationSession, RegistrationSession_GetAllowedToRequestCode, RegistrationSession_GetVerified, RegistrationSession_GetNextCallSeconds, RegistrationSession_GetNextSmsSeconds, RegistrationSession_GetNextVerificationAttemptSeconds, RegistrationSession_GetRequestedInformation, RegisterAccountRequest_Create, RegisterAccountRequest_SetSkipDeviceTransfer, RegisterAccountRequest_SetAccountPassword, RegisterAccountRequest_SetIdentityPublicKey, RegisterAccountRequest_SetIdentitySignedPreKey, RegisterAccountRequest_SetIdentityPqLastResortPreKey, RegistrationAccountAttributes_Create, RegisterAccountResponse_GetIdentity, RegisterAccountResponse_GetNumber, RegisterAccountResponse_GetUsernameHash, RegisterAccountResponse_GetUsernameLinkHandle, RegisterAccountResponse_GetStorageCapable, RegisterAccountResponse_GetReregistration, RegisterAccountResponse_GetEntitlementBadges, RegisterAccountResponse_GetEntitlementBackupLevel, RegisterAccountResponse_GetEntitlementBackupExpirationSeconds, SecureValueRecoveryForBackups_CreateNewBackupChain, SecureValueRecoveryForBackups_StoreBackup, SecureValueRecoveryForBackups_RestoreBackupFromServer, SecureValueRecoveryForBackups_RemoveBackup, BackupStoreResponse_GetForwardSecrecyToken, BackupStoreResponse_GetOpaqueMetadata, BackupStoreResponse_GetNextBackupSecretData, BackupRestoreResponse_GetForwardSecrecyToken, BackupRestoreResponse_GetNextBackupSecretData, TokioAsyncContext_new, TokioAsyncContext_cancel, ConnectionProxyConfig_new, ConnectionManager_new, ConnectionManager_set_proxy, ConnectionManager_set_invalid_proxy, ConnectionManager_clear_proxy, ConnectionManager_set_ipv6_enabled, ConnectionManager_set_censorship_circumvention_enabled, ConnectionManager_set_remote_config, ConnectionManager_on_network_change, AccountEntropyPool_Generate, AccountEntropyPool_IsValid, AccountEntropyPool_DeriveSvrKey, AccountEntropyPool_DeriveBackupKey, BackupKey_DeriveBackupId, BackupKey_DeriveEcKey, BackupKey_DeriveLocalBackupMetadataKey, BackupKey_DeriveMediaId, BackupKey_DeriveMediaEncryptionKey, BackupKey_DeriveThumbnailTransitEncryptionKey, IncrementalMac_CalculateChunkSize, IncrementalMac_Initialize, IncrementalMac_Update, IncrementalMac_Finalize, ValidatingMac_Initialize, ValidatingMac_Update, ValidatingMac_Finalize, MessageBackupKey_FromAccountEntropyPool, MessageBackupKey_FromBackupKeyAndBackupId, MessageBackupKey_GetHmacKey, MessageBackupKey_GetAesKey, MessageBackupValidator_Validate, OnlineBackupValidator_New, OnlineBackupValidator_AddFrame, OnlineBackupValidator_Finalize, BackupJsonExporter_New, BackupJsonExporter_GetInitialChunk, BackupJsonExporter_ExportFrames, BackupJsonExporter_Finish, Username_Hash, Username_Proof, Username_Verify, Username_CandidatesFrom, Username_HashFromParts, UsernameLink_Create, UsernameLink_DecryptUsername, SignalMedia_CheckAvailable, Mp4Sanitizer_Sanitize, WebpSanitizer_Sanitize, SanitizedMetadata_GetMetadata, SanitizedMetadata_GetDataOffset, SanitizedMetadata_GetDataLen, BridgedStringMap_new, BridgedStringMap_insert, TESTING_NonSuspendingBackgroundThreadRuntime_New, TESTING_FutureSuccess, TESTING_TokioAsyncContext_FutureSuccessBytes, TESTING_FutureFailure, TESTING_FutureCancellationCounter_Create, TESTING_FutureCancellationCounter_WaitForCount, TESTING_FutureIncrementOnCancel, TESTING_TokioAsyncFuture, TESTING_TestingHandleType_getValue, TESTING_FutureProducesPointerType, TESTING_OtherTestingHandleType_getValue, TESTING_FutureProducesOtherPointerType, TESTING_PanicOnBorrowSync, TESTING_PanicOnBorrowAsync, TESTING_PanicOnBorrowIo, TESTING_ErrorOnBorrowSync, TESTING_ErrorOnBorrowAsync, TESTING_ErrorOnBorrowIo, TESTING_PanicOnLoadSync, TESTING_PanicOnLoadAsync, TESTING_PanicOnLoadIo, TESTING_PanicInBodySync, TESTING_PanicInBodyAsync, TESTING_PanicInBodyIo, TESTING_PanicOnReturnSync, TESTING_PanicOnReturnAsync, TESTING_PanicOnReturnIo, TESTING_ErrorOnReturnSync, TESTING_ErrorOnReturnAsync, TESTING_ErrorOnReturnIo, TESTING_ReturnStringArray, TESTING_JoinStringArray, TESTING_ProcessBytestringArray, TESTING_RoundTripU8, TESTING_RoundTripU16, TESTING_RoundTripU32, TESTING_RoundTripI32, TESTING_RoundTripU64, TESTING_ConvertOptionalUuid, TESTING_InputStreamReadIntoZeroLengthSlice, ComparableBackup_ReadUnencrypted, ComparableBackup_GetComparableString, ComparableBackup_GetUnknownFields, TESTING_FakeChatServer_Create, TESTING_FakeChatServer_GetNextRemote, TESTING_FakeChatConnection_Create, TESTING_FakeChatConnection_TakeAuthenticatedChat, TESTING_FakeChatConnection_TakeUnauthenticatedChat, TESTING_FakeChatConnection_TakeRemote, TESTING_FakeChatRemoteEnd_SendRawServerRequest, TESTING_FakeChatRemoteEnd_SendRawServerResponse, TESTING_FakeChatRemoteEnd_SendServerResponse, TESTING_FakeChatRemoteEnd_InjectConnectionInterrupted, TESTING_FakeChatRemoteEnd_ReceiveIncomingRequest, TESTING_ChatResponseConvert, TESTING_ChatRequestGetMethod, TESTING_ChatRequestGetPath, TESTING_ChatRequestGetHeaderNames, TESTING_ChatRequestGetHeaderValue, TESTING_ChatRequestGetBody, TESTING_FakeChatResponse_Create, TESTING_ChatConnectErrorConvert, TESTING_ChatSendErrorConvert, TESTING_KeyTransFatalVerificationFailure, TESTING_KeyTransNonFatalVerificationFailure, TESTING_KeyTransChatSendError, TESTING_RegistrationSessionInfoConvert, TESTING_RegistrationService_CheckSvr2CredentialsResponseConvert, TESTING_FakeRegistrationSession_CreateSession, TESTING_RegisterAccountResponse_CreateTestValue, TESTING_RegistrationService_CreateSessionErrorConvert, TESTING_RegistrationService_ResumeSessionErrorConvert, TESTING_RegistrationService_UpdateSessionErrorConvert, TESTING_RegistrationService_RequestVerificationCodeErrorConvert, TESTING_RegistrationService_SubmitVerificationErrorConvert, TESTING_RegistrationService_CheckSvr2CredentialsErrorConvert, TESTING_RegistrationService_RegisterAccountErrorConvert, TESTING_CdsiLookupResponseConvert, TESTING_CdsiLookupErrorConvert, TESTING_ServerMessageAck_Create, TESTING_ConnectionManager_newLocalOverride, TESTING_ConnectionManager_isUsingProxy, TESTING_CreateOTP, TESTING_CreateOTPFromBase64, TESTING_SignedPublicPreKey_CheckBridgesCorrectly, TestingSemaphore_New, TestingSemaphore_AddPermits, TestingValueHolder_New, TestingValueHolder_Get, TESTING_ReturnPair, test_only_fn_returns_123, TESTING_BridgedStringMap_dump_to_json, TESTING_TokioAsyncContext_NewSingleThreaded, };
14
+ //# sourceMappingURL=Native.js.map
@@ -1,4 +1,4 @@
1
- import Native from '../Native.js';
1
+ import * as Native from './Native.js';
2
2
  /**
3
3
  * A single recipient parsed from a {@link SealedSenderMultiRecipientMessage}.
4
4
  *
@@ -3,7 +3,7 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
5
  import { Buffer } from 'node:buffer';
6
- import Native from '../Native.js';
6
+ import * as Native from './Native.js';
7
7
  /**
8
8
  * A parsed Sealed Sender v2 "SentMessage", ready to be fanned out to multiple recipients.
9
9
  *
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * @module WebpSanitizer
12
12
  */
13
- import Native from '../Native.js';
13
+ import * as Native from './Native.js';
14
14
  /**
15
15
  * Sanitize a WebP input.
16
16
  *
@@ -3716,7 +3716,7 @@ DEALINGS IN THE SOFTWARE.
3716
3716
 
3717
3717
  ```
3718
3718
 
3719
- ## gimli 0.31.1, heck 0.5.0, unicode-xid 0.2.6
3719
+ ## gimli 0.31.1, heck 0.5.0, unicode-segmentation 1.12.0, unicode-xid 0.2.6
3720
3720
 
3721
3721
  ```
3722
3722
  Copyright (c) 2015 The Rust Project Developers
@@ -4,7 +4,7 @@
4
4
  //
5
5
  import * as stream from 'node:stream';
6
6
  import { Buffer } from 'node:buffer';
7
- import Native from '../Native.js';
7
+ import * as Native from './Native.js';
8
8
  import { LibSignalErrorBase, } from './Errors.js';
9
9
  export function everyNthByte(n) {
10
10
  return { kind: 'everyN', n: n };
package/dist/index.d.ts CHANGED
@@ -3,12 +3,14 @@ import { Aci, ProtocolAddress, ServiceId } from './Address.js';
3
3
  export * from './Address.js';
4
4
  import { PrivateKey, PublicKey } from './EcKeys.js';
5
5
  export * from './EcKeys.js';
6
+ import { Uuid } from './uuid.js';
7
+ export * from './uuid.js';
6
8
  export * as usernames from './usernames.js';
7
9
  export * as io from './io.js';
8
10
  export * as Net from './net.js';
9
11
  export * as Mp4Sanitizer from './Mp4Sanitizer.js';
10
12
  export * as WebpSanitizer from './WebpSanitizer.js';
11
- import Native from '../Native.js';
13
+ import * as Native from './Native.js';
12
14
  export declare enum CiphertextMessageType {
13
15
  Whisper = 2,
14
16
  PreKey = 3,
@@ -24,7 +26,6 @@ export declare enum ContentHint {
24
26
  Resendable = 1,
25
27
  Implicit = 2
26
28
  }
27
- export type Uuid = string;
28
29
  export declare function hkdf(outputLength: number, keyMaterial: Uint8Array, label: Uint8Array, salt: Uint8Array | null): Uint8Array;
29
30
  export declare class ScannableFingerprint {
30
31
  private readonly scannable;
package/dist/index.js CHANGED
@@ -10,12 +10,13 @@ import { Aci, ProtocolAddress, ServiceId } from './Address.js';
10
10
  export * from './Address.js';
11
11
  import { PrivateKey, PublicKey } from './EcKeys.js';
12
12
  export * from './EcKeys.js';
13
+ export * from './uuid.js';
13
14
  export * as usernames from './usernames.js';
14
15
  export * as io from './io.js';
15
16
  export * as Net from './net.js';
16
17
  export * as Mp4Sanitizer from './Mp4Sanitizer.js';
17
18
  export * as WebpSanitizer from './WebpSanitizer.js';
18
- import Native from '../Native.js';
19
+ import * as Native from './Native.js';
19
20
  Native.registerErrors(Errors);
20
21
  // These enums must be kept in sync with their Rust counterparts.
21
22
  export var CiphertextMessageType;
@@ -1,4 +1,4 @@
1
- import Native from '../Native.js';
1
+ import * as Native from './Native.js';
2
2
  export declare class BridgedStringMap {
3
3
  readonly _nativeHandle: Native.BridgedStringMap;
4
4
  constructor(input: ReadonlyMap<string, string>);
package/dist/internal.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../Native.js';
5
+ import * as Native from './Native.js';
6
6
  export class BridgedStringMap {
7
7
  constructor(input) {
8
8
  this._nativeHandle = Native.BridgedStringMap_new(input.size);
package/dist/io.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Native from '../Native.js';
1
+ import * as Native from './Native.js';
2
2
  /**
3
3
  * An abstract class representing an input stream of bytes.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
- import Native from '../../Native.js';
2
+ import * as Native from '../Native.js';
3
3
  import { TokioAsyncContext, ServiceAuth } from '../net.js';
4
4
  export type CDSRequestOptionsType = {
5
5
  e164s: Array<string>;
package/dist/net/CDSI.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../Native.js';
5
+ import * as Native from '../Native.js';
6
6
  import { Aci } from '../Address.js';
7
7
  import { Buffer } from 'node:buffer';
8
8
  import { newNativeHandle } from '../internal.js';
@@ -1,7 +1,8 @@
1
- import Native, { Wrapper } from '../../Native.js';
1
+ import * as Native from '../Native.js';
2
2
  import { LibSignalError } from '../Errors.js';
3
- import { TokioAsyncContext, Environment } from '../net.js';
3
+ import { Environment, TokioAsyncContext } from '../net.js';
4
4
  import * as KT from './KeyTransparency.js';
5
+ import { FakeChatRemote } from './FakeChat.js';
5
6
  export type ChatRequest = Readonly<{
6
7
  verb: string;
7
8
  path: string;
@@ -80,7 +81,7 @@ export interface ConnectionInfo {
80
81
  }
81
82
  export declare class UnauthenticatedChatConnection implements ChatConnection {
82
83
  readonly _asyncContext: TokioAsyncContext;
83
- readonly _chatService: Wrapper<Native.UnauthenticatedChatConnection>;
84
+ readonly _chatService: Native.Wrapper<Native.UnauthenticatedChatConnection>;
84
85
  private readonly chatListener;
85
86
  private readonly env?;
86
87
  static connect(asyncContext: TokioAsyncContext, connectionManager: ConnectionManager, listener: ConnectionEventsListener, env?: Environment, options?: {
@@ -95,7 +96,7 @@ export declare class UnauthenticatedChatConnection implements ChatConnection {
95
96
  * @returns an {@link UnauthenticatedChatConnection} and handle for the remote
96
97
  * end of the fake connection.
97
98
  */
98
- static fakeConnect(asyncContext: TokioAsyncContext, listener: ChatServiceListener): [UnauthenticatedChatConnection, Wrapper<Native.FakeChatRemoteEnd>];
99
+ static fakeConnect(asyncContext: TokioAsyncContext, listener: ChatServiceListener): [UnauthenticatedChatConnection, FakeChatRemote];
99
100
  private constructor();
100
101
  fetch(chatRequest: ChatRequest, options?: RequestOptions): Promise<Native.ChatResponse>;
101
102
  disconnect(): Promise<void>;
@@ -119,7 +120,7 @@ export declare class AuthenticatedChatConnection implements ChatConnection {
119
120
  * @returns an {@link AuthenticatedChatConnection} and handle for the remote
120
121
  * end of the fake connection.
121
122
  */
122
- static fakeConnect(asyncContext: TokioAsyncContext, listener: ChatServiceListener, alerts?: ReadonlyArray<string>): [AuthenticatedChatConnection, Wrapper<Native.FakeChatRemoteEnd>];
123
+ static fakeConnect(asyncContext: TokioAsyncContext, listener: ChatServiceListener, alerts?: ReadonlyArray<string>): [AuthenticatedChatConnection, FakeChatRemote];
123
124
  private constructor();
124
125
  fetch(chatRequest: ChatRequest, options?: {
125
126
  abortSignal?: AbortSignal;
@@ -127,5 +128,5 @@ export declare class AuthenticatedChatConnection implements ChatConnection {
127
128
  disconnect(): Promise<void>;
128
129
  connectionInfo(): ConnectionInfo;
129
130
  }
130
- export declare function buildHttpRequest(chatRequest: ChatRequest): Wrapper<Native.HttpRequest>;
131
+ export declare function buildHttpRequest(chatRequest: ChatRequest): Native.Wrapper<Native.HttpRequest>;
131
132
  export {};
package/dist/net/Chat.js CHANGED
@@ -2,9 +2,10 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../Native.js';
5
+ import * as Native from '../Native.js';
6
6
  import * as KT from './KeyTransparency.js';
7
7
  import { newNativeHandle } from '../internal.js';
8
+ import { FakeChatRemote } from './FakeChat.js';
8
9
  const DEFAULT_CHAT_REQUEST_TIMEOUT_MILLIS = 5000;
9
10
  export class ChatServerMessageAck {
10
11
  constructor(_nativeHandle) {
@@ -59,7 +60,7 @@ export class UnauthenticatedChatConnection {
59
60
  const chat = newNativeHandle(Native.TESTING_FakeChatConnection_TakeUnauthenticatedChat(fakeChat));
60
61
  return [
61
62
  new UnauthenticatedChatConnection(asyncContext, chat, nativeChatListener),
62
- newNativeHandle(Native.TESTING_FakeChatConnection_TakeRemote(fakeChat)),
63
+ new FakeChatRemote(asyncContext, Native.TESTING_FakeChatConnection_TakeRemote(fakeChat)),
63
64
  ];
64
65
  }
65
66
  constructor(
@@ -113,7 +114,7 @@ export class AuthenticatedChatConnection {
113
114
  const chat = newNativeHandle(Native.TESTING_FakeChatConnection_TakeAuthenticatedChat(fakeChat));
114
115
  return [
115
116
  new AuthenticatedChatConnection(asyncContext, chat, nativeChatListener),
116
- newNativeHandle(Native.TESTING_FakeChatConnection_TakeRemote(fakeChat)),
117
+ new FakeChatRemote(asyncContext, Native.TESTING_FakeChatConnection_TakeRemote(fakeChat)),
117
118
  ];
118
119
  }
119
120
  constructor(asyncContext, chatService,
@@ -0,0 +1,31 @@
1
+ import { TokioAsyncContext } from '../net.js';
2
+ import * as Native from '../Native.js';
3
+ import { FakeChatRemoteEnd } from '../Native.js';
4
+ export declare class InternalRequest implements Native.Wrapper<Native.HttpRequest> {
5
+ readonly _nativeHandle: Native.HttpRequest;
6
+ readonly requestId: bigint;
7
+ constructor([nativeHandle, requestId]: [Native.HttpRequest, bigint]);
8
+ get verb(): string;
9
+ get path(): string;
10
+ get headers(): Map<string, string>;
11
+ get body(): Uint8Array;
12
+ }
13
+ export type ServerResponse = {
14
+ id: bigint;
15
+ status: number;
16
+ message?: string;
17
+ headers?: string[];
18
+ body?: Uint8Array;
19
+ };
20
+ export declare class FakeChatRemote {
21
+ private asyncContext;
22
+ readonly _nativeHandle: FakeChatRemoteEnd;
23
+ constructor(asyncContext: TokioAsyncContext, _nativeHandle: FakeChatRemoteEnd);
24
+ receiveIncomingRequest(): Promise<InternalRequest | null>;
25
+ assertReceiveIncomingRequest(): Promise<InternalRequest>;
26
+ sendReplyTo(request: InternalRequest, response: Omit<ServerResponse, 'id'>): void;
27
+ sendServerResponse(response: ServerResponse): void;
28
+ sendRawServerResponse(bytes: Uint8Array): void;
29
+ sendRawServerRequest(bytes: Uint8Array): void;
30
+ injectConnectionInterrupted(): void;
31
+ }
@@ -0,0 +1,67 @@
1
+ //
2
+ // Copyright 2025 Signal Messenger, LLC.
3
+ // SPDX-License-Identifier: AGPL-3.0-only
4
+ //
5
+ import * as Native from '../Native.js';
6
+ import { newNativeHandle } from '../internal.js';
7
+ import assert from 'node:assert';
8
+ export class InternalRequest {
9
+ constructor([nativeHandle, requestId]) {
10
+ this._nativeHandle = nativeHandle;
11
+ this.requestId = requestId;
12
+ }
13
+ get verb() {
14
+ return Native.TESTING_ChatRequestGetMethod(this);
15
+ }
16
+ get path() {
17
+ return Native.TESTING_ChatRequestGetPath(this);
18
+ }
19
+ get headers() {
20
+ const names = Native.TESTING_ChatRequestGetHeaderNames(this);
21
+ return new Map(names.map((name) => {
22
+ return [name, Native.TESTING_ChatRequestGetHeaderValue(this, name)];
23
+ }));
24
+ }
25
+ get body() {
26
+ return Native.TESTING_ChatRequestGetBody(this);
27
+ }
28
+ }
29
+ export class FakeChatRemote {
30
+ constructor(asyncContext, _nativeHandle) {
31
+ this.asyncContext = asyncContext;
32
+ this._nativeHandle = _nativeHandle;
33
+ }
34
+ async receiveIncomingRequest() {
35
+ const nativeRequest = await Native.TESTING_FakeChatRemoteEnd_ReceiveIncomingRequest(this.asyncContext, this);
36
+ if (nativeRequest === null) {
37
+ return null;
38
+ }
39
+ return new InternalRequest(nativeRequest);
40
+ }
41
+ async assertReceiveIncomingRequest() {
42
+ const request = await this.receiveIncomingRequest();
43
+ assert(request !== null, 'Cannot reply to the request that is null');
44
+ return request;
45
+ }
46
+ sendReplyTo(request, response) {
47
+ const fullResponse = { id: request.requestId, ...response };
48
+ this.sendServerResponse(fullResponse);
49
+ }
50
+ sendServerResponse(response) {
51
+ const message = response.message ?? '';
52
+ const headers = response.headers ?? [];
53
+ const body = response.body ?? null;
54
+ const nativeResponse = newNativeHandle(Native.TESTING_FakeChatResponse_Create(response.id, response.status, message, headers, body));
55
+ Native.TESTING_FakeChatRemoteEnd_SendServerResponse(this, nativeResponse);
56
+ }
57
+ sendRawServerResponse(bytes) {
58
+ Native.TESTING_FakeChatRemoteEnd_SendRawServerResponse(this, bytes);
59
+ }
60
+ sendRawServerRequest(bytes) {
61
+ Native.TESTING_FakeChatRemoteEnd_SendRawServerRequest(this, bytes);
62
+ }
63
+ injectConnectionInterrupted() {
64
+ Native.TESTING_FakeChatRemoteEnd_InjectConnectionInterrupted(this);
65
+ }
66
+ }
67
+ //# sourceMappingURL=FakeChat.js.map
@@ -1,4 +1,4 @@
1
- import Native from '../../Native.js';
1
+ import * as Native from '../Native.js';
2
2
  import { Aci } from '../Address.js';
3
3
  import { PublicKey } from '../EcKeys.js';
4
4
  import { Environment, type TokioAsyncContext } from '../net.js';
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../Native.js';
5
+ import * as Native from '../Native.js';
6
6
  /**
7
7
  * Mode of the monitor operation.
8
8
  *
@@ -1,9 +1,10 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
- import Native from '../../Native.js';
2
+ import * as Native from '../Native.js';
3
3
  import { type TokioAsyncContext } from '../net.js';
4
4
  import { PublicKey } from '../EcKeys.js';
5
5
  import { Aci, Pni } from '../Address.js';
6
6
  import { SignedKyberPublicPreKey, SignedPublicPreKey } from '../index.js';
7
+ import { FakeChatRemote } from './FakeChat.js';
7
8
  type ConnectionManager = Native.Wrapper<Native.ConnectionManager>;
8
9
  type RegistrationOptions = {
9
10
  tokioAsyncContext: TokioAsyncContext;
@@ -128,12 +129,12 @@ export declare class RegistrationService {
128
129
  /**
129
130
  * Create a registration client that sends requests to the returned fake chat.
130
131
  *
131
- * Calling code will need to retrieve the first fake remote from the fake chat
132
- * server and respond in order for the returned Promise to resolve.
132
+ * Calling code will need to await and use the returned fake chat remote
133
+ * to respond in order for the returned Promise<RegistrationService> to resolve.
133
134
  *
134
135
  * Internal, only public for testing
135
136
  */
136
- static fakeCreateSession(tokio: TokioAsyncContext, { e164 }: CreateSessionArgs): [Promise<RegistrationService>, Native.Wrapper<Native.FakeChatServer>];
137
+ static fakeCreateSession(tokio: TokioAsyncContext, { e164 }: CreateSessionArgs): [Promise<RegistrationService>, Promise<FakeChatRemote>];
137
138
  }
138
139
  export declare class AccountAttributes {
139
140
  readonly _nativeHandle: Native.RegistrationAccountAttributes;
@@ -2,9 +2,10 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../Native.js';
5
+ import * as Native from '../Native.js';
6
6
  import { Aci, Pni, ServiceIdKind } from '../Address.js';
7
7
  import { newNativeHandle } from '../internal.js';
8
+ import { FakeChatRemote } from './FakeChat.js';
8
9
  /**
9
10
  * A client for the Signal registration service.
10
11
  *
@@ -123,8 +124,8 @@ export class RegistrationService {
123
124
  /**
124
125
  * Create a registration client that sends requests to the returned fake chat.
125
126
  *
126
- * Calling code will need to retrieve the first fake remote from the fake chat
127
- * server and respond in order for the returned Promise to resolve.
127
+ * Calling code will need to await and use the returned fake chat remote
128
+ * to respond in order for the returned Promise<RegistrationService> to resolve.
128
129
  *
129
130
  * Internal, only public for testing
130
131
  */
@@ -134,7 +135,10 @@ export class RegistrationService {
134
135
  const handle = await Native.TESTING_FakeRegistrationSession_CreateSession(tokio, { number: e164 }, server);
135
136
  return new RegistrationService(handle, tokio);
136
137
  };
137
- return [registration(), server];
138
+ const remote = async () => {
139
+ return new FakeChatRemote(tokio, await Native.TESTING_FakeChatServer_GetNextRemote(tokio, server));
140
+ };
141
+ return [registration(), remote()];
138
142
  }
139
143
  }
140
144
  function toBridgedPublicPreKey(key) {
@@ -1,4 +1,4 @@
1
- import Native from '../../Native.js';
1
+ import * as Native from '../Native.js';
2
2
  import { TokioAsyncContext, Environment } from '../net.js';
3
3
  import { BackupKey, BackupForwardSecrecyToken } from '../AccountKeys.js';
4
4
  type ConnectionManager = Native.Wrapper<Native.ConnectionManager>;
package/dist/net/SvrB.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../Native.js';
5
+ import * as Native from '../Native.js';
6
6
  import { BackupForwardSecrecyToken } from '../AccountKeys.js';
7
7
  class StoreBackupResponseImpl {
8
8
  constructor(handle) {
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../../../Native.js';
5
+ import * as Native from '../../Native.js';
6
6
  import { ServiceId } from '../../Address.js';
7
7
  import { UnauthenticatedChatConnection } from '../Chat.js';
8
8
  /**
@@ -1,4 +1,5 @@
1
1
  import { Aci } from '../../Address.js';
2
+ import { Uuid } from '../../uuid.js';
2
3
  import { RequestOptions } from '../Chat.js';
3
4
  declare module '../Chat' {
4
5
  interface UnauthenticatedChatConnection extends UnauthUsernamesService {
@@ -17,4 +18,22 @@ export interface UnauthUsernamesService {
17
18
  lookUpUsernameHash: (request: {
18
19
  hash: Uint8Array;
19
20
  }, options?: RequestOptions) => Promise<Aci | null>;
21
+ /**
22
+ * Looks up a username link on the service by UUID.
23
+ *
24
+ * Returns a decrypted, validated username, or `null` if the UUID does not correspond to a
25
+ * username link (perhaps the user rotated their link).
26
+ *
27
+ * Throws / completes with failure if the request can't be completed. Specifically throws
28
+ * {@link InvalidEntropyDataLength} if the entropy is invalid, and
29
+ * {@link InvalidUsernameLinkEncryptedData} if the data fetched from the service could not be
30
+ * decrypted or did not contain a valid username. `uuid` should be validated ahead of time.
31
+ */
32
+ lookUpUsernameLink: (request: {
33
+ uuid: Uuid;
34
+ entropy: Uint8Array;
35
+ }, options?: RequestOptions) => Promise<{
36
+ username: string;
37
+ hash: Uint8Array;
38
+ } | null>;
20
39
  }
@@ -3,11 +3,16 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
5
  import { Buffer } from 'node:buffer';
6
- import Native from '../../../Native.js';
6
+ import * as uuid from 'uuid';
7
+ import * as Native from '../../Native.js';
7
8
  import { Aci } from '../../Address.js';
8
9
  import { UnauthenticatedChatConnection } from '../Chat.js';
9
10
  UnauthenticatedChatConnection.prototype.lookUpUsernameHash = async function ({ hash, }, options) {
10
11
  const response = await this._asyncContext.makeCancellable(options?.abortSignal, Native.UnauthenticatedChatConnection_look_up_username_hash(this._asyncContext, this._chatService, Buffer.from(hash)));
11
12
  return response ? Aci.fromUuidBytes(response) : null;
12
13
  };
14
+ UnauthenticatedChatConnection.prototype.lookUpUsernameLink = async function ({ uuid: linkUuid, entropy, }, options) {
15
+ const response = await this._asyncContext.makeCancellable(options?.abortSignal, Native.UnauthenticatedChatConnection_look_up_username_link(this._asyncContext, this._chatService, uuid.parse(linkUuid), entropy));
16
+ return response ? { username: response[0], hash: response[1] } : null;
17
+ };
13
18
  //# sourceMappingURL=UnauthUsernamesService.js.map
package/dist/net.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
- import Native from '../Native.js';
2
+ import * as Native from './Native.js';
3
3
  import { CDSRequestOptionsType, CDSResponseType } from './net/CDSI.js';
4
4
  import { ConnectionEventsListener, UnauthenticatedChatConnection, AuthenticatedChatConnection, ChatServiceListener } from './net/Chat.js';
5
5
  import { RegistrationService } from './net/Registration.js';
package/dist/net.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 Signal Messenger, LLC.
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
- import Native from '../Native.js';
5
+ import * as Native from './Native.js';
6
6
  import { cdsiLookup, } from './net/CDSI.js';
7
7
  import { UnauthenticatedChatConnection, AuthenticatedChatConnection, } from './net/Chat.js';
8
8
  import { RegistrationService } from './net/Registration.js';
package/dist/usernames.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /* eslint @typescript-eslint/no-shadow: ["error", { "allow": ["hash"] }] */
6
6
  import { randomBytes } from 'node:crypto';
7
7
  import { RANDOM_LENGTH } from './zkgroup/internal/Constants.js';
8
- import Native from '../Native.js';
8
+ import * as Native from './Native.js';
9
9
  export function generateCandidates(nickname, minNicknameLength, maxNicknameLength) {
10
10
  return Native.Username_CandidatesFrom(nickname, minNicknameLength, maxNicknameLength);
11
11
  }
package/dist/uuid.d.ts ADDED
@@ -0,0 +1 @@
1
+ export type Uuid = string;
package/dist/uuid.js ADDED
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 Signal Messenger, LLC.
3
+ // SPDX-License-Identifier: AGPL-3.0-only
4
+ //
5
+ export {};
6
+ //# sourceMappingURL=uuid.js.map
@@ -3,7 +3,7 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
5
  import ByteArray from './internal/ByteArray.js';
6
- import Native from '../../Native.js';
6
+ import * as Native from '../Native.js';
7
7
  export default class GenericServerPublicParams extends ByteArray {
8
8
  constructor(contents) {
9
9
  super(contents, Native.GenericServerPublicParams_CheckValidContents);
@@ -3,7 +3,7 @@
3
3
  // SPDX-License-Identifier: AGPL-3.0-only
4
4
  //
5
5
  import { randomBytes } from 'node:crypto';
6
- import Native from '../../Native.js';
6
+ import * as Native from '../Native.js';
7
7
  import ByteArray from './internal/ByteArray.js';
8
8
  import { RANDOM_LENGTH } from './internal/Constants.js';
9
9
  import GenericServerPublicParams from './GenericServerPublicParams.js';