Add event-sourced wallet and transaction tracking system
Wallets table with 7 seeded wallets, events table for three transaction types (bank_to_exchange, exchange_to_wallet, wallet_to_wallet). Balances computed from event credits/debits in sats. REST endpoints for CRUD. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE wallets (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
--;;
|
||||
INSERT INTO wallets (name) VALUES
|
||||
('Crypto.Com'), ('Nexo'), ('CoinCorner'), ('Strike'),
|
||||
('Cold'), ('Coldcard'), ('Nunchuk Multi Sig');
|
||||
Reference in New Issue
Block a user