cleansend
Version:
A TypeScript implementation of the OpenMsg Protocol - secure, decentralized messaging system with end-to-end encryption for cross-domain communication
42 lines • 1.47 kB
TypeScript
/**
* OpenMsg Database Setup and Initialization
*
* This script initializes the MySQL database for the OpenMsg protocol by:
* 1. Creating all required database tables
* 2. Setting up test user accounts for development
*
* Usage:
* - Run via npm script: `npm run setup`
* - Or directly: `npx ts-node src/setup.ts/setup.ts`
*
* Tables Created:
* - openmsg_users: User accounts and credentials
* - openmsg_user_connections: Established connections with encryption keys
* - openmsg_handshakes: Temporary handshake records for authentication
* - openmsg_passCodes: One-time pass codes for authorization
* - openmsg_messages_inbox: Received messages
* - openmsg_messages_outbox: Pending message confirmations
* - openmsg_messages_sent: Confirmed sent messages
*/
/**
* Create all required database tables for the OpenMsg protocol
*
* Tables are created with appropriate indexes and constraints for:
* - Performance optimization
* - Data integrity
* - Security considerations
*/
declare function createTables(): Promise<void>;
/**
* Create test user accounts for development and testing
*
* Creates 2 test accounts with:
* - Sequential numeric IDs (0, 1)
* - Random 7-digit passwords
* - Proper password hashing with salt
*
* These accounts can be used for testing the handshake and messaging flows.
*/
declare function createTestAccounts(): Promise<void>;
export { createTables, createTestAccounts };
//# sourceMappingURL=setup.d.ts.map