Initial Commit
This commit is contained in:
32
src/index.ts
Normal file
32
src/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* XO Wallet CLI - Terminal User Interface for XO crypto wallet.
|
||||
*
|
||||
* Features:
|
||||
* 1. View wallet state and balance
|
||||
* 2. Create invitations for P2PKH transactions
|
||||
* 3. Import and accept invitations
|
||||
* 4. Sign and broadcast transactions
|
||||
* 5. Real-time updates via SSE
|
||||
*/
|
||||
|
||||
import { App } from './app.js';
|
||||
|
||||
/**
|
||||
* Main entry point.
|
||||
*/
|
||||
async function main(): Promise<void> {
|
||||
try {
|
||||
// Create and start the application
|
||||
await App.create({
|
||||
syncServerUrl: process.env['SYNC_SERVER_URL'] ?? 'http://localhost:3000',
|
||||
databasePath: process.env['DB_PATH'] ?? './',
|
||||
databaseFilename: process.env['DB_FILENAME'] ?? 'xo-wallet',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Failed to start XO Wallet CLI:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the application
|
||||
main();
|
||||
Reference in New Issue
Block a user