mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
contract/money: Add wallet SQL schema.
This commit is contained in:
37
src/contract/money/wallet.sql
Normal file
37
src/contract/money/wallet.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
-- Wallet definitions for this contract.
|
||||
-- We store data that is needed to be able to receive and send tokens.
|
||||
-- TODO: The tables should be prefixed with ContractId to prevent collision
|
||||
|
||||
-- Arbitrary info that is potentially useful
|
||||
CREATE TABLE IF NOT EXISTS money_info (
|
||||
last_scanned_slot INTEGER NOT NULL
|
||||
);
|
||||
|
||||
-- The Merkle tree containing coins
|
||||
CREATE TABLE IF NOT EXISTS money_tree (
|
||||
tree BLOB NOT NULL
|
||||
);
|
||||
|
||||
-- The keypairs in our wallet
|
||||
CREATE TABLE IF NOT EXISTS money_keys (
|
||||
key_id INTEGER PRIMARY KEY NOT NULL,
|
||||
is_default BOOLEAN NOT NULL,
|
||||
public BLOB NOT NULL,
|
||||
secret BLOB NOT NULL
|
||||
);
|
||||
|
||||
-- The coins we have the information to and can spend
|
||||
CREATE TABLE IF NOT EXISTS money_coins (
|
||||
coin BLOB PRIMARY KEY NOT NULL,
|
||||
is_spent BOOLEAN NOT NULL,
|
||||
serial BLOB NOT NULL,
|
||||
value BLOB NOT NULL,
|
||||
token_id BLOB NOT NULL,
|
||||
coin_blind BLOB NOT NULL,
|
||||
value_blind BLOB NOT NULL,
|
||||
token_blind BLOB NOT NULL,
|
||||
secret BLOB NOT NULL,
|
||||
nullifier BLOB NOT NULL,
|
||||
leaf_position BLOB NOT NULL,
|
||||
memo BLOB
|
||||
);
|
||||
Reference in New Issue
Block a user