Files
sonr/proto/did/v1/genesis.proto
Prad NukalaandGitHub 13e6c3e84d Master (#1262)
* clear

* feat: Add everything

* fix: Commenht
2025-10-03 14:45:52 -04:00

95 lines
2.8 KiB
Protocol Buffer

syntax = "proto3";
package did.v1;
import "amino/amino.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/sonr-io/sonr/x/did/types";
// GenesisState defines the module genesis state
message GenesisState {
// Params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
// Export format version for future migrations
uint32 export_version = 2;
}
// Params defines the set of module parameters.
message Params {
option (amino.name) = "did/params";
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
DocumentParams document = 1;
WebauthnParams webauthn = 2;
}
// DocumentParams defines the parameters for the DID module.
message DocumentParams {
option (gogoproto.equal) = true;
// AutoCreateVault enables automatic vault creation upon DID registration
bool auto_create_vault = 1;
// MaxVerificationMethods limits the number of verification methods
int32 max_verification_methods = 2;
// MaxServiceEndpoints limits the number of service endpoints
int32 max_service_endpoints = 3;
// MaxControllers limits the number of controllers per DID document
int32 max_controllers = 4;
// DidDocumentMaxSize limits the maximum size of a DID document in bytes
int64 did_document_max_size = 5;
// DidResolutionTimeout is the timeout for resolution operations in seconds
int64 did_resolution_timeout = 6;
// KeyRotationInterval is the recommended interval for key rotation in seconds
int64 key_rotation_interval = 7;
// CredentialLifetime is the default lifetime in seconds
int64 credential_lifetime = 8;
// Supported Assertion methods
repeated string supported_assertion_methods = 9;
// Supported Authentication methods
repeated string supported_authentication_methods = 10;
// Supported Invocation methods
repeated string supported_invocation_methods = 11;
// Supported Delegation methods
repeated string supported_delegation_methods = 12;
}
// WebauthnParams defines the parameters for the WebAuthn module.
message WebauthnParams {
option (gogoproto.equal) = true;
// ChallengeTimeout is the default timeout in seconds
int64 challenge_timeout = 1;
// AllowedOrigins are the allowed WebAuthn origins for credential creation
repeated string allowed_origins = 2;
// SupportedAlgorithms are the supported signature for WebAuthn credentials
repeated string supported_algorithms = 3;
// RequireUserVerification enforces verification for WebAuthn credentials
bool require_user_verification = 4;
// MaxCredentialsPerDID limits the number of WebAuthn credentials per DID
int32 max_credentials_per_did = 5;
// DefaultRPID is the default Relying Party ID for WebAuthn operations
string default_rp_id = 6;
// DefaultRPName is the default Relying Party name for WebAuthn operations
string default_rp_name = 7;
}