mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* refactor: update model proto * feat: add status field to Controller * feat: add Verification.Kind field to state protobuf to support different verification types * fix: remove QueryService and QueryResolve RPCs from query.proto
119 lines
2.3 KiB
Protocol Buffer
119 lines
2.3 KiB
Protocol Buffer
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";
|
|
|
|
// Alias represents a DID alias
|
|
message Alias {
|
|
option (cosmos.orm.v1.table) = {
|
|
id: 1
|
|
primary_key: {fields: "id"}
|
|
index: {
|
|
id: 1
|
|
fields: "did,alias"
|
|
unique: true
|
|
}
|
|
};
|
|
|
|
// The unique identifier of the alias
|
|
string id = 1;
|
|
|
|
// The DID of the alias
|
|
string did = 2;
|
|
|
|
// The alias of the DID
|
|
string alias = 3;
|
|
|
|
// Origin of the alias
|
|
string origin = 4;
|
|
|
|
// Permissions of the alias
|
|
repeated string scopes = 5;
|
|
|
|
// Expiration of the alias
|
|
int64 expiration = 6;
|
|
}
|
|
|
|
// Controller represents a Sonr DWN Vault
|
|
message Controller {
|
|
option (cosmos.orm.v1.table) = {
|
|
id: 2
|
|
primary_key: {fields: "id"}
|
|
index: {
|
|
id: 1
|
|
fields: "address"
|
|
unique: true
|
|
}
|
|
index: {
|
|
id: 2
|
|
fields: "vault_cid"
|
|
unique: true
|
|
}
|
|
index: {
|
|
id: 3
|
|
fields: "status,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 Alias aliases = 3;
|
|
|
|
// PubKey is the verification method
|
|
PubKey public_key = 4;
|
|
|
|
// The vault address or identifier
|
|
string vault_cid = 5;
|
|
|
|
// The Authentications of the controller
|
|
repeated Credential authentication = 6;
|
|
|
|
// The Status of the claims for the controller
|
|
string status = 7;
|
|
}
|
|
|
|
// Verification reprsents a method of verifying membership in a DID
|
|
message Verification {
|
|
option (cosmos.orm.v1.table) = {
|
|
id: 5
|
|
primary_key: {fields: "id"}
|
|
index: {
|
|
id: 1
|
|
fields: "controller,method,issuer,subject"
|
|
unique: true
|
|
}
|
|
};
|
|
|
|
// The unique identifier of the verification
|
|
string id = 1;
|
|
|
|
// The controller of the verification
|
|
string controller = 2;
|
|
|
|
// The DIDNamespace of the verification
|
|
DIDNamespace method = 3;
|
|
|
|
// The value of the linked identifier
|
|
string issuer = 4;
|
|
|
|
// The subject of the verification
|
|
string subject = 5;
|
|
|
|
// The public key of the verification
|
|
PubKey public_key = 6;
|
|
|
|
// The Verification Kind (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation)
|
|
string kind = 7;
|
|
}
|