syntax = "proto3"; package did.v1; import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; import "did/v1/models.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) message Assertion { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "id"} index: { id: 1 fields: "subject,origin" unique: true } index: { id: 2 fields: "controller,origin" unique: true } index: { id: 3 fields: "controller,credential_label" unique: true } }; // The unique identifier of the attestation string id = 1; // The controller of the attestation string controller = 2; // Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave") PubKey public_key = 3; // The value of the linked identifier bytes credential_id = 4; // The display label of the attestation string credential_label = 5; // The origin of the attestation string origin = 6; // The subject of the attestation string subject = 7; // Metadata is optional additional information about the assertion Metadata metadata = 8; } // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) message Attestation { option (cosmos.orm.v1.table) = { id: 2 primary_key: {fields: "id"} index: { id: 1 fields: "subject,origin" unique: true } index: { id: 2 fields: "controller,origin" unique: true } }; // The unique identifier of the attestation string id = 1; // The type of the linked identifier (e.g., "crypto", "github", "email", "phone") string controller = 2; // The value of the linked identifier PubKey public_key = 3; // The origin of the attestation string origin = 4; // The subject of the attestation string subject = 5; // The controller of the attestation Metadata metadata = 6; } // Controller represents a Sonr DWN Vault message Controller { option (cosmos.orm.v1.table) = { id: 3 primary_key: {fields: "id"} index: { id: 1 fields: "address" unique: true } index: { id: 2 fields: "vault_cid" unique: true } }; // The unique identifier of the controller string id = 1; // The DID of the controller string address = 2; // Aliases of the controller repeated string aliases = 3; // PubKey is the verification method PubKey public_key = 4; // The vault address or identifier string vault_cid = 5; } // Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC) message Delegation { option (cosmos.orm.v1.table) = { id: 4 primary_key: {fields: "id"} index: { id: 1 fields: "account_address,chain_id" unique: true } index: { id: 2 fields: "controller,account_label" unique: true } index: { id: 3 fields: "controller,chain_id" } }; // The unique identifier of the delegation string id = 1; // The Decentralized Identifier of the delegated account string controller = 2; // Resolved from module parameters string chain_index = 3; // The delegation proof or verification method PubKey public_key = 4; // The Account Address string account_address = 5; // The Account label string account_label = 6; // The Chain ID string chain_id = 7; } // ServiceRecord represents a decentralized service in a DID Document message ServiceRecord { option (cosmos.orm.v1.table) = { id: 5 primary_key: {fields: "id"} index: { id: 1 fields: "origin_uri" unique: true } index: { id: 2 fields: "controller,origin_uri" unique: true } }; // The ID of the service string id = 1; // The type of the service string service_type = 2; // The controller DID of the service string controller = 3; // The domain name of the service string origin_uri = 4; // The description of the service string description = 5; // The service endpoint map service_endpoints = 6; // Scopes is the Authorization Grants of the service Permissions permissions = 7; // Metadata is optional additional information about the service Metadata metadata = 8; }