Expose wallet-side public trades with signed keyset pagination

This commit is contained in:
2026-12-03 12:09:42 +08:00
parent ddbb96c799
commit 220978ec83
12 changed files with 489 additions and 54 deletions
+7
View File
@@ -290,3 +290,10 @@ CREATE TABLE IF NOT EXISTS budget_spend_micros (
order_seq INTEGER PRIMARY KEY REFERENCES budget_buys(order_seq),
micros INTEGER NOT NULL CHECK(micros>=0)
);
-- Keep issued public trade cursors valid after a restart, scoped to this database.
CREATE TABLE IF NOT EXISTS trade_cursor_key (
singleton INTEGER PRIMARY KEY CHECK(singleton=1), secret BLOB NOT NULL CHECK(length(secret)=32)
);
INSERT INTO trade_cursor_key(singleton,secret)
SELECT 1,randomblob(32) WHERE NOT EXISTS(SELECT 1 FROM trade_cursor_key);