Record btc utxo in cashierdb

This commit is contained in:
Janus
2021-09-14 08:28:47 -04:00
parent 1aed118a8f
commit e1df3eead7
3 changed files with 36 additions and 1 deletions

View File

@@ -4,6 +4,15 @@ CREATE TABLE IF NOT EXISTS deposit_keypairs(
coin_key_public BLOB NOT NULL,
asset_id BLOB NOT NULL
);
PRAGMA foreign_keys=on;
CREATE TABLE IF NOT EXISTS btc_utxo(
tx_id BLOB PRIMARY KEY NOT NULL,
balance INTEGER NOT NULL,
btc_key_public BLOB NOT NULL,
FOREIGN KEY (btc_key_public)
REFERENCES deposit_keypairs (coin_key_public)
ON UPDATE CASCADE
);
CREATE TABLE IF NOT EXISTS withdraw_keypairs(
coin_key_id BLOB PRIMARY KEY NOT NULL,
d_key_private BLOB NOT NULL,