Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AccountRestorationProcessor for Improved Key Rotation and Multi-Key Account Discoverability #660

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- This file should undo anything in `up.sql`
DROP TABLE IF EXISTS public_key_auth_keys;
DROP TABLE IF EXISTS auth_key_multikey_layout;
DROP TABLE IF EXISTS auth_key_account_addresses;
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- Public key to associated multikey auth keys
CREATE TABLE public_key_auth_keys (
public_key VARCHAR(200) NOT NULL,
public_key_type VARCHAR(50) NOT NULL,
auth_key VARCHAR(66) NOT NULL,
verified BOOLEAN NOT NULL,
-- Constraints
PRIMARY KEY (
public_key,
public_key_type,
auth_key
)
);

-- Auth key to its corresponding multikey layout
CREATE TABLE auth_key_multikey_layout (
auth_key VARCHAR(66) PRIMARY KEY NOT NULL,
signatures_required BIGINT NOT NULL,
multikey_layout_with_prefixes jsonb NOT NULL,
multikey_type VARCHAR(50) NOT NULL
);

-- Auth key to account addresses
CREATE TABLE auth_key_account_addresses (
auth_key VARCHAR(66) NOT NULL,
address VARCHAR(66) PRIMARY KEY NOT NULL,
verified BOOLEAN NOT NULL
);
Loading
Loading