From 7a8707e5d0332c4ebbb7da2a777403bc5b45c51d Mon Sep 17 00:00:00 2001 From: "Prad Nukala (aider)" Date: Tue, 26 Nov 2024 13:13:53 -0500 Subject: [PATCH] refactor: Update Credential table to match WebAuthn Credential Descriptor --- proto/dwn/v1/state.proto | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/proto/dwn/v1/state.proto b/proto/dwn/v1/state.proto index 625ab05cf..0ac1efe51 100644 --- a/proto/dwn/v1/state.proto +++ b/proto/dwn/v1/state.proto @@ -10,12 +10,16 @@ option go_package = "github.com/onsonr/sonr/x/dwn/types"; message Credential { option (cosmos.orm.v1.table) = { id: 1; - primary_key: { fields: "account" } - index: { id: 1 fields: "amount" } + primary_key: { fields: "id" } + index: { id: 1 fields: "type" } }; - bytes account = 1; - uint64 amount = 2; + bytes id = 1; // The credential ID as a byte array + string type = 2; // The credential type (e.g. "public-key") + repeated string transports = 3; // Optional transport hints (usb, nfc, ble, internal) + bytes public_key = 4; // The credential's public key + string attestation_type = 5; // The attestation type used (e.g. "none", "indirect", etc) + uint64 created_at = 6; // Timestamp of when the credential was created } message Profile {