@massalabs/gossip-sdk 0.0.2-dev.20260225142738 → 0.0.2-dev.20260226131013

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 (87) hide show
  1. package/dist/api/authProtocol.d.ts +1 -1
  2. package/dist/api/authProtocol.js +3 -3
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.js +1 -1
  5. package/dist/api/messageProtocol/index.d.ts +3 -3
  6. package/dist/api/messageProtocol/index.js +3 -3
  7. package/dist/api/messageProtocol/rest.d.ts +2 -2
  8. package/dist/api/messageProtocol/rest.js +2 -2
  9. package/dist/core/SdkEventEmitter.d.ts +1 -1
  10. package/dist/core/SdkPolling.d.ts +2 -2
  11. package/dist/core/SdkPolling.js +1 -1
  12. package/dist/core/index.d.ts +4 -4
  13. package/dist/core/index.js +3 -3
  14. package/dist/crypto/encryption.d.ts +1 -1
  15. package/dist/crypto/encryption.js +1 -1
  16. package/dist/crypto/index.d.ts +2 -2
  17. package/dist/crypto/index.js +2 -2
  18. package/dist/db/index.d.ts +3 -3
  19. package/dist/db/index.js +3 -3
  20. package/dist/db/queries/activeSeekers.d.ts +1 -1
  21. package/dist/db/queries/activeSeekers.js +1 -1
  22. package/dist/db/queries/announcementCursors.d.ts +1 -1
  23. package/dist/db/queries/announcementCursors.js +1 -1
  24. package/dist/db/queries/contacts.d.ts +3 -3
  25. package/dist/db/queries/contacts.js +1 -1
  26. package/dist/db/queries/discussions.d.ts +2 -2
  27. package/dist/db/queries/discussions.js +1 -1
  28. package/dist/db/queries/index.d.ts +14 -14
  29. package/dist/db/queries/index.js +8 -8
  30. package/dist/db/queries/messages.d.ts +3 -3
  31. package/dist/db/queries/messages.js +2 -2
  32. package/dist/db/queries/pendingAnnouncements.d.ts +2 -2
  33. package/dist/db/queries/pendingAnnouncements.js +1 -1
  34. package/dist/db/queries/userProfile.d.ts +2 -2
  35. package/dist/db/queries/userProfile.js +1 -1
  36. package/dist/db/schema/activeSeekers.js +1 -1
  37. package/dist/db/schema/contacts.js +1 -1
  38. package/dist/db/schema/discussions.js +1 -1
  39. package/dist/db/schema/index.d.ts +8 -8
  40. package/dist/db/schema/index.js +8 -8
  41. package/dist/db/schema/messages.js +1 -1
  42. package/dist/db/schema/pendingAnnouncements.js +1 -1
  43. package/dist/db/schema/pendingEncryptedMessages.js +1 -1
  44. package/dist/db/schema/userProfile.js +1 -1
  45. package/dist/gossip.d.ts +13 -13
  46. package/dist/gossip.js +24 -24
  47. package/dist/index.d.ts +8 -8
  48. package/dist/index.js +8 -8
  49. package/dist/services/announcement.d.ts +9 -9
  50. package/dist/services/announcement.js +9 -9
  51. package/dist/services/auth.d.ts +2 -2
  52. package/dist/services/auth.js +3 -3
  53. package/dist/services/contact.d.ts +6 -6
  54. package/dist/services/contact.js +1 -1
  55. package/dist/services/discussion.d.ts +11 -11
  56. package/dist/services/discussion.js +8 -8
  57. package/dist/services/message.d.ts +10 -10
  58. package/dist/services/message.js +9 -9
  59. package/dist/services/profile.d.ts +3 -3
  60. package/dist/services/profile.js +2 -2
  61. package/dist/services/refresh.d.ts +6 -6
  62. package/dist/services/refresh.js +6 -6
  63. package/dist/sw.d.ts +1 -1
  64. package/dist/sw.js +1 -1
  65. package/dist/utils/contacts.d.ts +4 -4
  66. package/dist/utils/contacts.js +1 -1
  67. package/dist/utils/discussions.d.ts +3 -3
  68. package/dist/utils/discussions.js +1 -1
  69. package/dist/utils/index.d.ts +8 -8
  70. package/dist/utils/index.js +8 -8
  71. package/dist/utils/messageSerialization.d.ts +2 -2
  72. package/dist/utils/messageSerialization.js +2 -2
  73. package/dist/utils/userId.js +1 -1
  74. package/dist/utils/validation.d.ts +1 -1
  75. package/dist/utils/validation.js +1 -1
  76. package/dist/wasm/bindings.d.ts +2 -2
  77. package/dist/wasm/bindings.js +2 -2
  78. package/dist/wasm/encryption.d.ts +1 -1
  79. package/dist/wasm/encryption.js +2 -2
  80. package/dist/wasm/index.d.ts +5 -5
  81. package/dist/wasm/index.js +5 -6
  82. package/dist/wasm/loader.js +1 -1
  83. package/dist/wasm/session.d.ts +1 -1
  84. package/dist/wasm/session.js +2 -2
  85. package/dist/wasm/userKeys.d.ts +1 -1
  86. package/dist/wasm/userKeys.js +2 -2
  87. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auth Protocol — public key publishing & retrieval
3
3
  */
4
- import { RestClient } from './restClient';
4
+ import { RestClient } from './restClient.js';
5
5
  export interface IAuthProtocol {
6
6
  /** Fetches the base64-encoded public key for the given user ID. */
7
7
  fetchPublicKeyByUserId(userId: Uint8Array): Promise<string>;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Auth Protocol — public key publishing & retrieval
3
3
  */
4
- import { RestClient } from './restClient';
5
- import { encodeToBase64 } from '../utils/base64';
6
- import { protocolConfig } from '../config/protocol';
4
+ import { RestClient } from './restClient.js';
5
+ import { encodeToBase64 } from '../utils/base64.js';
6
+ import { protocolConfig } from '../config/protocol.js';
7
7
  export function createAuthProtocol(config) {
8
8
  return new RestAuthProtocol(config?.baseUrl ?? protocolConfig.baseUrl, config?.timeout ?? protocolConfig.timeout, config?.retryAttempts ?? protocolConfig.retryAttempts);
9
9
  }
@@ -1 +1 @@
1
- export { restMessageProtocol, RestMessageProtocol, type EncryptedMessage, } from './messageProtocol';
1
+ export { restMessageProtocol, RestMessageProtocol, type EncryptedMessage, } from './messageProtocol/index.js';
package/dist/api/index.js CHANGED
@@ -1 +1 @@
1
- export { restMessageProtocol, RestMessageProtocol, } from './messageProtocol';
1
+ export { restMessageProtocol, RestMessageProtocol, } from './messageProtocol/index.js';
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Factory functions and exports for message protocol implementations.
5
5
  */
6
- export type { EncryptedMessage, IMessageProtocol, MessageProtocolResponse, BulletinItem, } from './types';
7
- import type { IMessageProtocol } from './types';
6
+ export type { EncryptedMessage, IMessageProtocol, MessageProtocolResponse, BulletinItem, } from './types.js';
7
+ import type { IMessageProtocol } from './types.js';
8
8
  /**
9
9
  * Factory function to create message protocol instances
10
10
  */
@@ -14,4 +14,4 @@ export declare function createMessageProtocol(config?: Partial<{
14
14
  retryAttempts: number;
15
15
  }>): IMessageProtocol;
16
16
  export declare const restMessageProtocol: IMessageProtocol;
17
- export { RestMessageProtocol } from './rest';
17
+ export { RestMessageProtocol } from './rest.js';
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Factory functions and exports for message protocol implementations.
5
5
  */
6
- import { protocolConfig } from '../../config/protocol';
7
- import { RestMessageProtocol } from './rest';
6
+ import { protocolConfig } from '../../config/protocol.js';
7
+ import { RestMessageProtocol } from './rest.js';
8
8
  /**
9
9
  * Factory function to create message protocol instances
10
10
  */
@@ -12,4 +12,4 @@ export function createMessageProtocol(config) {
12
12
  return new RestMessageProtocol(config?.baseUrl ?? protocolConfig.baseUrl, config?.timeout ?? protocolConfig.timeout, config?.retryAttempts ?? protocolConfig.retryAttempts);
13
13
  }
14
14
  export const restMessageProtocol = createMessageProtocol();
15
- export { RestMessageProtocol } from './rest';
15
+ export { RestMessageProtocol } from './rest.js';
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * REST API implementation of the message protocol
3
3
  */
4
- import { BulletinItem, EncryptedMessage, IMessageProtocol, MessageProtocolResponse } from './types';
5
- import { RestClient } from '../restClient';
4
+ import { BulletinItem, EncryptedMessage, IMessageProtocol, MessageProtocolResponse } from './types.js';
5
+ import { RestClient } from '../restClient.js';
6
6
  export type BulletinsPage = {
7
7
  counter: string;
8
8
  data: string;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * REST API implementation of the message protocol
3
3
  */
4
- import { RestClient } from '../restClient';
5
- import { encodeToBase64, decodeFromBase64 } from '../../utils/base64';
4
+ import { RestClient } from '../restClient.js';
5
+ import { encodeToBase64, decodeFromBase64 } from '../../utils/base64.js';
6
6
  const BULLETIN_ENDPOINT = '/bulletin';
7
7
  const MESSAGES_ENDPOINT = '/messages';
8
8
  export class RestMessageProtocol extends RestClient {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Type-safe event emitter for SDK events.
5
5
  */
6
- import type { Message, Discussion, Contact } from '../db';
6
+ import type { Message, Discussion, Contact } from '../db/index.js';
7
7
  export declare enum SdkEventType {
8
8
  MESSAGE_RECEIVED = "messageReceived",
9
9
  MESSAGE_SENT = "messageSent",
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Manages polling timers for messages, announcements, and session refresh.
5
5
  */
6
- import type { SdkConfig } from '../config/sdk';
7
- import { SdkEventEmitter } from './SdkEventEmitter';
6
+ import type { SdkConfig } from '../config/sdk.js';
7
+ import { SdkEventEmitter } from './SdkEventEmitter.js';
8
8
  export interface PollingCallbacks {
9
9
  /** Fetch messages from protocol */
10
10
  fetchMessages: () => Promise<void>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Manages polling timers for messages, announcements, and session refresh.
5
5
  */
6
- import { SdkEventType } from './SdkEventEmitter';
6
+ import { SdkEventType } from './SdkEventEmitter.js';
7
7
  // ─────────────────────────────────────────────────────────────────────────────
8
8
  // Polling Manager Class
9
9
  // ─────────────────────────────────────────────────────────────────────────────
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Core SDK components
3
3
  */
4
- export { SdkEventEmitter } from './SdkEventEmitter';
5
- export { SdkEventType, type SdkEventHandlers } from './SdkEventEmitter';
6
- export { SdkPolling } from './SdkPolling';
7
- export type { PollingCallbacks } from './SdkPolling';
4
+ export { SdkEventEmitter } from './SdkEventEmitter.js';
5
+ export { SdkEventType, type SdkEventHandlers } from './SdkEventEmitter.js';
6
+ export { SdkPolling } from './SdkPolling.js';
7
+ export type { PollingCallbacks } from './SdkPolling.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Core SDK components
3
3
  */
4
- export { SdkEventEmitter } from './SdkEventEmitter';
5
- export { SdkEventType } from './SdkEventEmitter';
6
- export { SdkPolling } from './SdkPolling';
4
+ export { SdkEventEmitter } from './SdkEventEmitter.js';
5
+ export { SdkEventType } from './SdkEventEmitter.js';
6
+ export { SdkPolling } from './SdkPolling.js';
@@ -4,7 +4,7 @@
4
4
  * Provides convenient wrappers for encrypting and decrypting strings
5
5
  * using the WASM encryption primitives.
6
6
  */
7
- import { EncryptionKey } from '../wasm/encryption';
7
+ import { EncryptionKey } from '../wasm/encryption.js';
8
8
  /**
9
9
  * Encrypt a plaintext string using AES-256-SIV
10
10
  *
@@ -4,7 +4,7 @@
4
4
  * Provides convenient wrappers for encrypting and decrypting strings
5
5
  * using the WASM encryption primitives.
6
6
  */
7
- import { decryptAead, encryptAead, EncryptionKey, generateNonce, Nonce, } from '../wasm/encryption';
7
+ import { decryptAead, encryptAead, EncryptionKey, generateNonce, Nonce, } from '../wasm/encryption.js';
8
8
  /**
9
9
  * Encrypt a plaintext string using AES-256-SIV
10
10
  *
@@ -1,2 +1,2 @@
1
- export * from './bip39';
2
- export * from './encryption';
1
+ export * from './bip39.js';
2
+ export * from './encryption.js';
@@ -1,2 +1,2 @@
1
- export * from './bip39';
2
- export * from './encryption';
1
+ export * from './bip39.js';
2
+ export * from './encryption.js';
@@ -1,3 +1,3 @@
1
- export * from './db';
2
- export * from './queries';
3
- export * from './sqlite';
1
+ export * from './db.js';
2
+ export * from './queries/index.js';
3
+ export * from './sqlite.js';
package/dist/db/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from './db';
2
- export * from './queries';
3
- export * from './sqlite';
1
+ export * from './db.js';
2
+ export * from './queries/index.js';
3
+ export * from './sqlite.js';
@@ -1,4 +1,4 @@
1
- import type { DatabaseConnection } from '../sqlite';
1
+ import type { DatabaseConnection } from '../sqlite.js';
2
2
  export declare class ActiveSeekerQueries {
3
3
  private conn;
4
4
  constructor(conn: DatabaseConnection);
@@ -1,4 +1,4 @@
1
- import * as schema from '../schema';
1
+ import * as schema from '../schema/index.js';
2
2
  export class ActiveSeekerQueries {
3
3
  constructor(conn) {
4
4
  Object.defineProperty(this, "conn", {
@@ -1,4 +1,4 @@
1
- import type { DatabaseConnection } from '../sqlite';
1
+ import type { DatabaseConnection } from '../sqlite.js';
2
2
  export declare class AnnouncementCursorQueries {
3
3
  private conn;
4
4
  constructor(conn: DatabaseConnection);
@@ -1,5 +1,5 @@
1
1
  import { eq } from 'drizzle-orm';
2
- import * as schema from '../schema';
2
+ import * as schema from '../schema/index.js';
3
3
  export class AnnouncementCursorQueries {
4
4
  constructor(conn) {
5
5
  Object.defineProperty(this, "conn", {
@@ -1,6 +1,6 @@
1
- import * as schema from '../schema';
2
- import type { DatabaseConnection } from '../sqlite';
3
- import { Contact } from '../db';
1
+ import * as schema from '../schema/index.js';
2
+ import type { DatabaseConnection } from '../sqlite.js';
3
+ import type { Contact } from '../db.js';
4
4
  export type ContactRow = typeof schema.contacts.$inferSelect;
5
5
  type ContactInsert = typeof schema.contacts.$inferInsert;
6
6
  export declare class ContactQueries {
@@ -1,5 +1,5 @@
1
1
  import { eq, and, sql } from 'drizzle-orm';
2
- import * as schema from '../schema';
2
+ import * as schema from '../schema/index.js';
3
3
  /** Escape LIKE wildcard characters so they match literally. */
4
4
  function escapeLike(value) {
5
5
  return value.replace(/[%_]/g, '\\$&');
@@ -1,5 +1,5 @@
1
- import * as schema from '../schema';
2
- import type { DatabaseConnection } from '../sqlite';
1
+ import * as schema from '../schema/index.js';
2
+ import type { DatabaseConnection } from '../sqlite.js';
3
3
  import type { DiscussionStatus } from '../db';
4
4
  export type DiscussionRow = typeof schema.discussions.$inferSelect;
5
5
  type DiscussionInsert = typeof schema.discussions.$inferInsert;
@@ -1,5 +1,5 @@
1
1
  import { eq, and, gt, sql } from 'drizzle-orm';
2
- import * as schema from '../schema';
2
+ import * as schema from '../schema/index.js';
3
3
  export class DiscussionQueries {
4
4
  constructor(conn) {
5
5
  Object.defineProperty(this, "conn", {
@@ -1,17 +1,17 @@
1
- import type { DatabaseConnection } from '../sqlite';
2
- import { ContactQueries } from './contacts';
3
- import { DiscussionQueries } from './discussions';
4
- import { MessageQueries } from './messages';
5
- import { UserProfileQueries } from './userProfile';
6
- import { AnnouncementCursorQueries } from './announcementCursors';
7
- import { PendingAnnouncementQueries } from './pendingAnnouncements';
8
- import { ActiveSeekerQueries } from './activeSeekers';
9
- export type { ContactRow } from './contacts';
10
- export type { DiscussionRow } from './discussions';
11
- export type { MessageRow, MessageInsert } from './messages';
12
- export type { UserProfileRow, UserProfileInsert } from './userProfile';
13
- export { rowToUserProfile, userProfileToRow } from './userProfile';
14
- export type { PendingAnnouncementRow } from './pendingAnnouncements';
1
+ import type { DatabaseConnection } from '../sqlite.js';
2
+ import { ContactQueries } from './contacts.js';
3
+ import { DiscussionQueries } from './discussions.js';
4
+ import { MessageQueries } from './messages.js';
5
+ import { UserProfileQueries } from './userProfile.js';
6
+ import { AnnouncementCursorQueries } from './announcementCursors.js';
7
+ import { PendingAnnouncementQueries } from './pendingAnnouncements.js';
8
+ import { ActiveSeekerQueries } from './activeSeekers.js';
9
+ export type { ContactRow } from './contacts.js';
10
+ export type { DiscussionRow } from './discussions.js';
11
+ export type { MessageRow, MessageInsert } from './messages.js';
12
+ export type { UserProfileRow, UserProfileInsert } from './userProfile.js';
13
+ export { rowToUserProfile, userProfileToRow } from './userProfile.js';
14
+ export type { PendingAnnouncementRow } from './pendingAnnouncements.js';
15
15
  /**
16
16
  * Bundle of all query classes, scoped to a single DatabaseConnection.
17
17
  *
@@ -1,11 +1,11 @@
1
- import { ContactQueries } from './contacts';
2
- import { DiscussionQueries } from './discussions';
3
- import { MessageQueries } from './messages';
4
- import { UserProfileQueries } from './userProfile';
5
- import { AnnouncementCursorQueries } from './announcementCursors';
6
- import { PendingAnnouncementQueries } from './pendingAnnouncements';
7
- import { ActiveSeekerQueries } from './activeSeekers';
8
- export { rowToUserProfile, userProfileToRow } from './userProfile';
1
+ import { ContactQueries } from './contacts.js';
2
+ import { DiscussionQueries } from './discussions.js';
3
+ import { MessageQueries } from './messages.js';
4
+ import { UserProfileQueries } from './userProfile.js';
5
+ import { AnnouncementCursorQueries } from './announcementCursors.js';
6
+ import { PendingAnnouncementQueries } from './pendingAnnouncements.js';
7
+ import { ActiveSeekerQueries } from './activeSeekers.js';
8
+ export { rowToUserProfile, userProfileToRow } from './userProfile.js';
9
9
  /**
10
10
  * Bundle of all query classes, scoped to a single DatabaseConnection.
11
11
  *
@@ -1,6 +1,6 @@
1
- import * as schema from '../schema';
2
- import type { DatabaseConnection } from '../sqlite';
3
- import { MessageStatus } from '../../db/db';
1
+ import * as schema from '../schema/index.js';
2
+ import type { DatabaseConnection } from '../sqlite.js';
3
+ import { MessageStatus } from '../../db/db.js';
4
4
  export type MessageRow = typeof schema.messages.$inferSelect;
5
5
  export type MessageInsert = typeof schema.messages.$inferInsert;
6
6
  export declare class MessageQueries {
@@ -1,6 +1,6 @@
1
1
  import { eq, and, sql, inArray, asc } from 'drizzle-orm';
2
- import * as schema from '../schema';
3
- import { MessageDirection, MessageStatus, MessageType } from '../../db/db';
2
+ import * as schema from '../schema/index.js';
3
+ import { MessageDirection, MessageStatus, MessageType } from '../../db/db.js';
4
4
  export class MessageQueries {
5
5
  constructor(conn) {
6
6
  Object.defineProperty(this, "conn", {
@@ -1,5 +1,5 @@
1
- import * as schema from '../schema';
2
- import type { DatabaseConnection } from '../sqlite';
1
+ import * as schema from '../schema/index.js';
2
+ import type { DatabaseConnection } from '../sqlite.js';
3
3
  export type PendingAnnouncementRow = typeof schema.pendingAnnouncements.$inferSelect;
4
4
  export declare class PendingAnnouncementQueries {
5
5
  private conn;
@@ -1,5 +1,5 @@
1
1
  import { inArray } from 'drizzle-orm';
2
- import * as schema from '../schema';
2
+ import * as schema from '../schema/index.js';
3
3
  export class PendingAnnouncementQueries {
4
4
  constructor(conn) {
5
5
  Object.defineProperty(this, "conn", {
@@ -1,5 +1,5 @@
1
- import * as schema from '../schema';
2
- import type { DatabaseConnection } from '../sqlite';
1
+ import * as schema from '../schema/index.js';
2
+ import type { DatabaseConnection } from '../sqlite.js';
3
3
  import type { UserProfile } from '../db';
4
4
  export type UserProfileRow = typeof schema.userProfile.$inferSelect;
5
5
  export type UserProfileInsert = typeof schema.userProfile.$inferInsert;
@@ -1,5 +1,5 @@
1
1
  import { and, desc, eq, ne, sql } from 'drizzle-orm';
2
- import * as schema from '../schema';
2
+ import * as schema from '../schema/index.js';
3
3
  /**
4
4
  * Restore a Uint8Array from JSON-parsed data.
5
5
  * Handles: number[] (correct format), {0:x, 1:y, ...} (corrupted from
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, integer, index } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const activeSeekers = sqliteTable('activeSeekers', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  seeker: bytes('seeker').notNull(),
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, text, integer, index } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const contacts = sqliteTable('contacts', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  ownerUserId: text('ownerUserId').notNull(),
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, text, integer, index, uniqueIndex, } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const discussions = sqliteTable('discussions', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  ownerUserId: text('ownerUserId').notNull(),
@@ -1,8 +1,8 @@
1
- export { contacts } from './contacts';
2
- export { messages } from './messages';
3
- export { userProfile } from './userProfile';
4
- export { discussions } from './discussions';
5
- export { pendingEncryptedMessages } from './pendingEncryptedMessages';
6
- export { pendingAnnouncements } from './pendingAnnouncements';
7
- export { activeSeekers } from './activeSeekers';
8
- export { announcementCursors } from './announcementCursors';
1
+ export { contacts } from './contacts.js';
2
+ export { messages } from './messages.js';
3
+ export { userProfile } from './userProfile.js';
4
+ export { discussions } from './discussions.js';
5
+ export { pendingEncryptedMessages } from './pendingEncryptedMessages.js';
6
+ export { pendingAnnouncements } from './pendingAnnouncements.js';
7
+ export { activeSeekers } from './activeSeekers.js';
8
+ export { announcementCursors } from './announcementCursors.js';
@@ -1,8 +1,8 @@
1
- export { contacts } from './contacts';
2
- export { messages } from './messages';
3
- export { userProfile } from './userProfile';
4
- export { discussions } from './discussions';
5
- export { pendingEncryptedMessages } from './pendingEncryptedMessages';
6
- export { pendingAnnouncements } from './pendingAnnouncements';
7
- export { activeSeekers } from './activeSeekers';
8
- export { announcementCursors } from './announcementCursors';
1
+ export { contacts } from './contacts.js';
2
+ export { messages } from './messages.js';
3
+ export { userProfile } from './userProfile.js';
4
+ export { discussions } from './discussions.js';
5
+ export { pendingEncryptedMessages } from './pendingEncryptedMessages.js';
6
+ export { pendingAnnouncements } from './pendingAnnouncements.js';
7
+ export { activeSeekers } from './activeSeekers.js';
8
+ export { announcementCursors } from './announcementCursors.js';
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, text, integer, index } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const messages = sqliteTable('messages', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  ownerUserId: text('ownerUserId').notNull(),
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, text, integer, index, uniqueIndex, } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const pendingAnnouncements = sqliteTable('pendingAnnouncements', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  announcement: bytes('announcement').notNull(),
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, integer, index } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const pendingEncryptedMessages = sqliteTable('pendingEncryptedMessages', {
4
4
  id: integer('id').primaryKey({ autoIncrement: true }),
5
5
  seeker: bytes('seeker').notNull(),
@@ -1,5 +1,5 @@
1
1
  import { sqliteTable, text, integer, index } from 'drizzle-orm/sqlite-core';
2
- import { bytes } from './_helpers';
2
+ import { bytes } from './_helpers.js';
3
3
  export const userProfile = sqliteTable('userProfile', {
4
4
  userId: text('userId').primaryKey(),
5
5
  username: text('username').notNull(),
package/dist/gossip.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { type SdkConfig, type DeepPartial } from './config/sdk';
2
- import { EncryptionKey } from './wasm/encryption';
3
- import { AnnouncementService } from './services/announcement';
4
- import { DiscussionService } from './services/discussion';
5
- import { MessageService } from './services/message';
6
- import { AuthService } from './services/auth';
7
- import { ProfileService } from './services/profile';
8
- import { ContactService } from './services/contact';
9
- import { type ValidationResult } from './utils/validation';
10
- import { type StorageConfig } from './db';
11
- import { Queries } from './db/queries';
12
- import { type UserPublicKeys, type SessionConfig } from './wasm/bindings';
13
- import { SdkEventType, type SdkEventHandlers } from './core/SdkEventEmitter';
1
+ import { type SdkConfig, type DeepPartial } from './config/sdk.js';
2
+ import { EncryptionKey } from './wasm/encryption.js';
3
+ import { AnnouncementService } from './services/announcement.js';
4
+ import { DiscussionService } from './services/discussion.js';
5
+ import { MessageService } from './services/message.js';
6
+ import { AuthService } from './services/auth.js';
7
+ import { ProfileService } from './services/profile.js';
8
+ import { ContactService } from './services/contact.js';
9
+ import { type ValidationResult } from './utils/validation.js';
10
+ import { type StorageConfig } from './db/index.js';
11
+ import { Queries } from './db/queries/index.js';
12
+ import { type UserPublicKeys, type SessionConfig } from './wasm/bindings.js';
13
+ import { SdkEventType, type SdkEventHandlers } from './core/SdkEventEmitter.js';
14
14
  export type { SdkEventHandlers };
15
15
  export { SdkEventType };
16
16
  export declare enum SdkStatus {
package/dist/gossip.js CHANGED
@@ -32,30 +32,30 @@
32
32
  * await gossipSdk.closeSession();
33
33
  * ```
34
34
  */
35
- import { createMessageProtocol } from './api/messageProtocol';
36
- import { createAuthProtocol } from './api/authProtocol';
37
- import { setProtocolBaseUrl } from './config/protocol';
38
- import { defaultSdkConfig, mergeConfig, } from './config/sdk';
39
- import { startWasmInitialization, ensureWasmInitialized } from './wasm/loader';
40
- import { generateUserKeys } from './wasm/userKeys';
41
- import { SessionModule } from './wasm/session';
42
- import { generateEncryptionKeyFromSeed, } from './wasm/encryption';
43
- import { AnnouncementService } from './services/announcement';
44
- import { DiscussionService } from './services/discussion';
45
- import { MessageService } from './services/message';
46
- import { RefreshService } from './services/refresh';
47
- import { AuthService } from './services/auth';
48
- import { ProfileService } from './services/profile';
49
- import { ContactService } from './services/contact';
50
- import { validateUserIdFormat, validateUsernameFormat, } from './utils/validation';
51
- import { QueueManager } from './utils/queue';
52
- import { encodeUserId, decodeUserId } from './utils/userId';
53
- import { MessageStatus } from './db';
54
- import { DatabaseConnection } from './db/sqlite';
55
- import { Queries } from './db/queries';
56
- import { SessionManagerWrapper, } from './wasm/bindings';
57
- import { SdkEventEmitter, SdkEventType, } from './core/SdkEventEmitter';
58
- import { SdkPolling } from './core/SdkPolling';
35
+ import { createMessageProtocol, } from './api/messageProtocol/index.js';
36
+ import { createAuthProtocol } from './api/authProtocol.js';
37
+ import { setProtocolBaseUrl } from './config/protocol.js';
38
+ import { defaultSdkConfig, mergeConfig, } from './config/sdk.js';
39
+ import { startWasmInitialization, ensureWasmInitialized, } from './wasm/loader.js';
40
+ import { generateUserKeys } from './wasm/userKeys.js';
41
+ import { SessionModule } from './wasm/session.js';
42
+ import { generateEncryptionKeyFromSeed, } from './wasm/encryption.js';
43
+ import { AnnouncementService } from './services/announcement.js';
44
+ import { DiscussionService } from './services/discussion.js';
45
+ import { MessageService } from './services/message.js';
46
+ import { RefreshService } from './services/refresh.js';
47
+ import { AuthService } from './services/auth.js';
48
+ import { ProfileService } from './services/profile.js';
49
+ import { ContactService } from './services/contact.js';
50
+ import { validateUserIdFormat, validateUsernameFormat, } from './utils/validation.js';
51
+ import { QueueManager } from './utils/queue.js';
52
+ import { encodeUserId, decodeUserId } from './utils/userId.js';
53
+ import { MessageStatus } from './db/index.js';
54
+ import { DatabaseConnection } from './db/sqlite.js';
55
+ import { Queries } from './db/queries/index.js';
56
+ import { SessionManagerWrapper, } from './wasm/bindings.js';
57
+ import { SdkEventEmitter, SdkEventType, } from './core/SdkEventEmitter.js';
58
+ import { SdkPolling } from './core/SdkPolling.js';
59
59
  export { SdkEventType };
60
60
  export var SdkStatus;
61
61
  (function (SdkStatus) {
package/dist/index.d.ts CHANGED
@@ -19,11 +19,11 @@
19
19
  *
20
20
  * @packageDocumentation
21
21
  */
22
- export * from './api';
23
- export * from './crypto';
24
- export * from './gossip';
25
- export * from './utils';
26
- export * from './wasm';
27
- export * from './db/db';
28
- export * from './db/queries';
29
- export * from './db/sqlite';
22
+ export * from './api/index.js';
23
+ export * from './crypto/index.js';
24
+ export * from './gossip.js';
25
+ export * from './utils/index.js';
26
+ export * from './wasm/index.js';
27
+ export * from './db/db.js';
28
+ export * from './db/queries/index.js';
29
+ export * from './db/sqlite.js';
package/dist/index.js CHANGED
@@ -19,11 +19,11 @@
19
19
  *
20
20
  * @packageDocumentation
21
21
  */
22
- export * from './api';
23
- export * from './crypto';
24
- export * from './gossip';
25
- export * from './utils';
26
- export * from './wasm';
27
- export * from './db/db';
28
- export * from './db/queries';
29
- export * from './db/sqlite';
22
+ export * from './api/index.js';
23
+ export * from './crypto/index.js';
24
+ export * from './gossip.js';
25
+ export * from './utils/index.js';
26
+ export * from './wasm/index.js';
27
+ export * from './db/db.js';
28
+ export * from './db/queries/index.js';
29
+ export * from './db/sqlite.js';