Files
sonr/proto/did/v1/state.proto
T

119 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

2024-07-05 22:20:13 -04:00
syntax = "proto3";
package did.v1;
2024-08-31 16:54:16 -04:00
2024-07-05 22:20:13 -04:00
import "cosmos/orm/v1/orm.proto";
import "did/v1/genesis.proto";
2024-08-31 12:49:44 -04:00
import "did/v1/models.proto";
2024-07-05 22:20:13 -04:00
2024-09-05 01:24:57 -04:00
option go_package = "github.com/onsonr/sonr/x/did/types";
2024-09-18 17:27:30 -04:00
// Alias represents a DID alias
message Alias {
2024-07-06 03:02:45 -04:00
option (cosmos.orm.v1.table) = {
2024-09-05 01:24:57 -04:00
id: 1
2024-07-06 03:02:45 -04:00
primary_key: {fields: "id"}
2024-09-05 01:24:57 -04:00
index: {
id: 1
2024-09-18 17:27:30 -04:00
fields: "did,alias"
2024-09-14 14:46:09 -04:00
unique: true
}
};
2024-07-23 14:18:15 -04:00
// The unique identifier of the alias
string id = 1;
2024-09-18 17:27:30 -04:00
// The DID of the alias
string did = 2;
2024-07-23 14:18:15 -04:00
2024-09-18 17:27:30 -04:00
// The alias of the DID
string alias = 3;
2024-07-23 14:18:15 -04:00
2024-09-18 17:27:30 -04:00
// Origin of the alias
string origin = 4;
2024-07-06 03:02:45 -04:00
2024-09-18 17:27:30 -04:00
// Permissions of the alias
repeated string scopes = 5;
2024-08-31 16:54:16 -04:00
2024-09-18 17:27:30 -04:00
// Expiration of the alias
int64 expiration = 6;
2024-07-05 22:20:13 -04:00
}
// Controller represents a Sonr DWN Vault
message Controller {
option (cosmos.orm.v1.table) = {
2024-09-11 15:10:54 -04:00
id: 2
2024-07-05 22:20:13 -04:00
primary_key: {fields: "id"}
2024-09-05 01:24:57 -04:00
index: {
id: 1
fields: "address"
unique: true
}
index: {
id: 2
fields: "vault_cid"
unique: true
}
2024-09-18 17:27:30 -04:00
index: {
id: 3
fields: "status,vault_cid"
unique: true
}
2024-07-05 22:20:13 -04:00
};
// The unique identifier of the controller
string id = 1;
// The DID of the controller
2024-08-31 12:49:44 -04:00
string address = 2;
2024-07-05 22:20:13 -04:00
2024-09-05 01:24:57 -04:00
// Aliases of the controller
2024-09-11 15:10:54 -04:00
repeated Alias aliases = 3;
2024-09-05 01:24:57 -04:00
2024-08-31 12:49:44 -04:00
// PubKey is the verification method
2024-09-05 01:24:57 -04:00
PubKey public_key = 4;
2024-07-05 22:20:13 -04:00
// The vault address or identifier
2024-08-31 12:49:44 -04:00
string vault_cid = 5;
2024-09-11 15:10:54 -04:00
// The Authentications of the controller
repeated Credential authentication = 6;
2024-07-05 22:20:13 -04:00
2024-09-18 17:27:30 -04:00
// The Status of the claims for the controller
string status = 7;
2024-09-11 15:10:54 -04:00
}
// Verification reprsents a method of verifying membership in a DID
2024-09-18 17:27:30 -04:00
message Verification {
2024-09-11 15:10:54 -04:00
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;
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
// The public key of the verification
PubKey public_key = 6;
2024-09-18 17:27:30 -04:00
// The Verification Kind (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation)
string kind = 7;
2024-07-05 22:20:13 -04:00
}