-- Wallet sign-in nonces (apply once from a DDL-capable session, e.g. ssh ark-library-backend-admin-1 + psql with admin URL).
-- Public API hosts should set RUN_WALLET_AUTH_SCHEMA=false after this exists.

CREATE TABLE IF NOT EXISTS wallet_auth_nonces (
	address TEXT PRIMARY KEY,
	nonce TEXT NOT NULL,
	expires_at TIMESTAMPTZ NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_wallet_auth_nonces_expires ON wallet_auth_nonces(expires_at);
