feat: add automated production release workflow

This commit is contained in:
Prad Nukala
2024-09-23 12:25:15 -04:00
parent 05bda3d1b2
commit c31b324bd3
217 changed files with 19760 additions and 56358 deletions
-4
View File
@@ -1,4 +0,0 @@
syntax = "proto3";
package did.v1;
option go_package = "github.com/onsonr/hway/x/did/types";
-24
View File
@@ -1,24 +0,0 @@
syntax = "proto3";
package did.v1;
import "gogoproto/gogo.proto";
import "amino/amino.proto";
option go_package = "github.com/onsonr/hway/x/did/types";
// PermissionScope define the Capabilities Controllers can grant for Services
enum PermissionScope {
PERMISSION_SCOPE_UNSPECIFIED = 0;
PERMISSION_SCOPE_PROFILE_NAME = 1;
PERMISSION_SCOPE_IDENTIFIERS_EMAIL = 2;
PERMISSION_SCOPE_IDENTIFIERS_PHONE = 3;
PERMISSION_SCOPE_TRANSACTIONS_READ = 4;
PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5;
PERMISSION_SCOPE_WALLETS_READ = 6;
PERMISSION_SCOPE_WALLETS_CREATE = 7;
PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8;
PERMISSION_SCOPE_WALLETS_UPDATE = 9;
PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10;
PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11;
PERMISSION_SCOPE_ADMIN_USER = 12;
PERMISSION_SCOPE_ADMIN_VALIDATOR = 13;
}
+43 -150
View File
@@ -5,9 +5,6 @@ import "amino/amino.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
import "did/v1/types.proto";
option go_package = "github.com/onsonr/hway/x/did/types";
// GenesisState defines the module genesis state
message GenesisState {
@@ -63,7 +60,7 @@ message AssetInfo {
string symbol = 3;
// The coin name
AssetType asset_type = 4;
string asset_type = 4;
// The name of the asset
string name = 5;
@@ -72,158 +69,54 @@ message AssetInfo {
string icon_url = 6;
}
// Document defines a DID document
message Document {
string id = 1;
string controller = 2; // The DID of the controller
repeated string authentication = 3;
repeated string assertion_method = 4;
repeated string capability_delegation = 5;
repeated string capability_invocation = 6;
repeated string service = 7;
}
// KeyInfo defines information for accepted PubKey types
message KeyInfo {
KeyRole role = 1;
KeyAlgorithm algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K"
KeyEncoding encoding = 3; // e.g., "hex", "base64", "multibase"
KeyCurve curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1"
KeyType type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC"
string role = 1;
string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K"
string encoding = 3; // e.g., "hex", "base64", "multibase"
string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1"
string type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC"
}
// ValidatorInfo defines information for accepted Validator nodes
message ValidatorInfo {
string moniker = 1;
repeated Endpoint grpc_endpoints = 2;
repeated Endpoint rest_endpoints = 3;
ExplorerInfo explorer = 4;
FeeInfo fee_info = 5;
IBCChannel ibc_channel = 6;
// PubKey defines a public key for a did
message PubKey {
string role = 1;
string algorithm = 2;
string encoding = 3;
string curve = 4;
string key_type = 5;
bytes raw = 6;
JWK jwk = 7;
// Endpoint defines an endpoint
message Endpoint {
string url = 1;
bool is_primary = 2;
}
// ExplorerInfo defines the explorer info
message ExplorerInfo {
string name = 1;
string url = 2;
}
// FeeInfo defines a fee info
message FeeInfo {
string base_denom = 1;
repeated string fee_rates = 2;
int32 init_gas_limit = 3;
bool is_simulable = 4;
double gas_multiply = 5;
}
// IBCChannel defines the IBC channel info
message IBCChannel {
string id = 1;
string port = 2;
// JWK represents a JSON Web Key
message JWK {
string kty = 1; // Key Type
string crv = 2; // Curve (for EC and OKP keys)
string x = 3; // X coordinate (for EC and OKP keys)
string y = 4; // Y coordinate (for EC keys)
string n = 5; // Modulus (for RSA keys)
string e = 6; // Exponent (for RSA keys)
}
}
//
// [Constant Enumerations]
//
// AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified
enum AssetType {
ASSET_TYPE_UNSPECIFIED = 0;
ASSET_TYPE_NATIVE = 1;
ASSET_TYPE_WRAPPED = 2;
ASSET_TYPE_STAKING = 3;
ASSET_TYPE_POOL = 4;
ASSET_TYPE_IBC = 5;
ASSET_TYPE_CW20 = 6;
// Service defines a Decentralized Service on the Sonr Blockchain
message Service {
string id = 1;
string service_type = 2;
string authority = 3;
string origin = 4;
string description = 5;
map<string, string> service_endpoints = 6;
map<string, string> permissions = 7;
}
// DIDNamespace define the different namespaces of DID
enum DIDNamespace {
DID_NAMESPACE_UNSPECIFIED = 0;
DID_NAMESPACE_IPFS = 1;
DID_NAMESPACE_SONR = 2;
DID_NAMESPACE_BITCOIN = 3;
DID_NAMESPACE_ETHEREUM = 4;
DID_NAMESPACE_IBC = 5;
DID_NAMESPACE_WEBAUTHN = 6;
DID_NAMESPACE_DWN = 7;
DID_NAMESPACE_SERVICE = 8;
}
// KeyAlgorithm defines the key algorithm
enum KeyAlgorithm {
KEY_ALGORITHM_UNSPECIFIED = 0;
KEY_ALGORITHM_ES256 = 1;
KEY_ALGORITHM_ES384 = 2;
KEY_ALGORITHM_ES512 = 3;
KEY_ALGORITHM_EDDSA = 4;
KEY_ALGORITHM_ES256K = 5;
KEY_ALGORITHM_ECDSA = 6; // Fixed typo from EDCSA to ECDSA
}
// KeyCurve defines the key curve
enum KeyCurve {
KEY_CURVE_UNSPECIFIED = 0;
KEY_CURVE_P256 = 1; // NIST P-256
KEY_CURVE_P384 = 2;
KEY_CURVE_P521 = 3;
KEY_CURVE_X25519 = 4;
KEY_CURVE_X448 = 5;
KEY_CURVE_ED25519 = 6;
KEY_CURVE_ED448 = 7;
KEY_CURVE_SECP256K1 = 8;
KEY_CURVE_BLS12381 = 9;
KEY_CURVE_KECCAK256 = 10;
}
// KeyEncoding defines the key encoding
enum KeyEncoding {
KEY_ENCODING_UNSPECIFIED = 0;
KEY_ENCODING_RAW = 1;
KEY_ENCODING_HEX = 2;
KEY_ENCODING_MULTIBASE = 3;
}
// KeyRole defines the kind of key
enum KeyRole {
KEY_ROLE_UNSPECIFIED = 0;
KEY_ROLE_AUTHENTICATION = 1; // Passkeys and FIDO
KEY_ROLE_ASSERTION = 2; // Zk Identifiers
KEY_ROLE_DELEGATION = 3; // ETH,BTC,IBC addresses
KEY_ROLE_INVOCATION = 4; // DWN Controllers
}
// KeyType defines the key type
enum KeyType {
KEY_TYPE_UNSPECIFIED = 0;
KEY_TYPE_OCTET = 1;
KEY_TYPE_ELLIPTIC = 2;
KEY_TYPE_RSA = 3;
KEY_TYPE_SYMMETRIC = 4;
KEY_TYPE_HMAC = 5;
KEY_TYPE_MPC = 6;
KEY_TYPE_ZK = 7;
KEY_TYPE_WEBAUTHN = 8;
KEY_TYPE_BIP32 = 9;
}
enum KeyshareRole {
KEYSHARE_ROLE_UNSPECIFIED = 0;
KEYSHARE_ROLE_USER = 1;
KEYSHARE_ROLE_VALIDATOR = 2;
}
// PermissionScope define the Capabilities Controllers can grant for Services
enum PermissionScope {
PERMISSION_SCOPE_UNSPECIFIED = 0;
PERMISSION_SCOPE_BASIC_INFO = 1;
PERMISSION_SCOPE_PERMISSIONS_READ = 2;
PERMISSION_SCOPE_PERMISSIONS_WRITE = 3;
PERMISSION_SCOPE_TRANSACTIONS_READ = 4;
PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5;
PERMISSION_SCOPE_WALLETS_READ = 6;
PERMISSION_SCOPE_WALLETS_CREATE = 7;
PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8;
PERMISSION_SCOPE_WALLETS_UPDATE = 9;
PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10;
PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11;
PERMISSION_SCOPE_ADMIN_USER = 12;
PERMISSION_SCOPE_ADMIN_VALIDATOR = 13;
}
-114
View File
@@ -1,114 +0,0 @@
syntax = "proto3";
package did.v1;
import "did/v1/genesis.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
// Alias defines a subject/origin pair
message Alias {
string subject = 1;
string origin = 2;
string controller = 3;
}
message Credential {
string subject = 1;
string attestation_type = 2;
string origin = 3;
bytes credential_id = 4;
bytes public_key = 5;
repeated string transport = 6;
uint32 sign_count = 7;
bool user_present = 8;
bool user_verified = 9;
bool backup_eligible = 10;
bool backup_state = 11;
bool clone_warning = 12;
}
// Document defines a DID document
message Document {
string id = 1;
string controller = 2; // The DID of the controller
repeated string authentication = 3;
repeated string assertion_method = 4;
repeated string capability_delegation = 5;
repeated string capability_invocation = 6;
repeated string service = 7;
}
// Keyshare defines a keyshare from the MPC protocol
message Keyshare {
map<string, string> metadata = 1;
map<string, bytes> payloads = 2;
string protocol = 3;
bytes public_key = 4;
uint32 version = 5;
int32 role = 6; // 0 =none, 1 = validator, 2 = user
}
// Permissions contains a list of grants and access control rules for
// a Service.
message Permissions {
repeated DIDNamespace grants = 1;
repeated PermissionScope scopes = 2;
}
// PubKey defines a public key for a did
message PubKey {
KeyRole role = 1;
KeyAlgorithm algorithm = 2;
KeyEncoding encoding = 3;
KeyCurve curve = 4;
KeyType key_type = 5;
bytes raw = 6;
JWK jwk = 7;
// JWK represents a JSON Web Key
message JWK {
string kty = 1; // Key Type
string crv = 2; // Curve (for EC and OKP keys)
string x = 3; // X coordinate (for EC and OKP keys)
string y = 4; // Y coordinate (for EC keys)
string n = 5; // Modulus (for RSA keys)
string e = 6; // Exponent (for RSA keys)
}
}
// Service defines a Decentralized Service on the Sonr Blockchain
message Service {
string id = 1;
string service_type = 2;
string authority = 3;
string origin = 4;
string description = 5;
map<string, string> service_endpoints = 6;
Permissions permissions = 7;
}
// ServicceInfo defines a Decentralized Service on the Sonr Blockchain
message ServiceInfo {
bool exists = 1;
string origin = 2;
string fingerprint = 3;
Service service = 4;
}
// FirstPartyCaveat defines a first party caveat
message FirstPartyCaveat {
Permissions scope = 1;
int64 exp = 2;
string cnf = 3;
string aud = 4;
}
// ThirdPartyCaveat defines a third party caveat
message ThirdPartyCaveat {
Permissions scope = 1;
int64 exp = 2;
string cnf = 3;
string aud = 4;
}
+12 -132
View File
@@ -2,9 +2,7 @@ syntax = "proto3";
package did.v1;
import "did/v1/genesis.proto";
import "did/v1/models.proto";
import "google/api/annotations.proto";
import "did/v1/types.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
@@ -15,41 +13,14 @@ service Query {
option (google.api.http).get = "/params";
}
// ParamsAssets queries all parameters of the module.
rpc ParamsAssets(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/assets";
}
// Params queries all parameters of the module.
rpc ParamsByAsset(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/assets/{asset}";
}
// ParamsKeys queries all parameters of the module.
rpc ParamsKeys(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys";
}
// Params queries all parameters of the module.
rpc ParamsByKey(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys/{key}";
}
// Params queries all parameters of the module.
rpc RegistrationOptionsByKey(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys/{key}/registration";
}
// Resolve queries the DID document by its id.
rpc Resolve(QueryRequest) returns (QueryResponse) {
rpc Resolve(QueryRequest) returns (QueryResolveResponse) {
option (google.api.http).get = "/did/{did}";
}
// Service returns associated ServiceInfo for a given Origin
// if the servie is not found, a fingerprint is generated to be used
// as a TXT record in DNS. v=sonr, o=origin, p=protocol
rpc Service(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/service/{origin}";
// Sync queries the DID document by its id. And returns the required PKL information
rpc Sync(SyncRequest) returns (SyncResponse) {
option (google.api.http).post = "/sync";
}
}
@@ -66,118 +37,27 @@ message QueryResponse {
bool success = 1;
string query = 2;
Document document = 3;
ServiceInfo service = 4;
Params params = 5;
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
Params params = 1;
}
message QueryParamsAssetsResponse {
repeated AssetInfo assets = 1;
// Accounts returns associated wallet accounts with the DID.
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
option (google.api.http).get = "/did/{did}/accounts";
}
// Credentials returns associated credentials with the DID and Service Origin.
rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) {
option (google.api.http).get = "/did/{did}/{origin}/credentials";
}
// Identities returns associated identity with the DID.
rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) {
option (google.api.http).get = "/did/{did}/identities";
}
// Resolve queries the DID document by its id.
rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) {
option (google.api.http).get = "/did/resolve/{did}";
}
// Service returns associated ServiceInfo for a given Origin
rpc Service(QueryServiceRequest) returns (QueryServiceResponse) {
option (google.api.http).get = "/did/service/{origin}";
}
}
// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1;
}
// QueryAccountsRequest is the request type for the Query/Exists RPC method.
message QueryAccountsRequest {
string did = 1;
}
// QueryAccountsResponse is the response type for the Query/Exists RPC method.
message QueryAccountsResponse {
bool exists = 1;
}
// QueryCredentialsRequest is the request type for the Query/Exists RPC method.
message QueryCredentialsRequest {
string did = 1;
string origin = 2;
}
// QueryCredentialsResponse is the response type for the Query/Exists RPC method.
message QueryCredentialsResponse {
map<string, bytes> credentials = 1;
}
// QueryIdentitiesRequest is the request type for the Query/Exists RPC method.
message QueryIdentitiesRequest {
string did = 1;
}
// QueryIdentitiesResponse is the response type for the Query/Exists RPC method.
message QueryIdentitiesResponse {
bool exists = 1;
repeated VerificationMethod verificationMethod = 2;
}
// QueryResolveRequest is the request type for the Query/Resolve RPC method.
message QueryResolveRequest {
string did = 1;
}
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
message QueryResolveResponse {
// document is the DID document
Document document = 1;
// document is the DID document
Document document = 1;
}
// QueryServiceRequest is the request type for the Query/LoginOptions RPC method.
message QueryServiceRequest {
string origin = 1;
// SyncRequest is the request type for the Sync RPC method.
message SyncRequest {
string did = 1;
}
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
message QueryServiceResponse {
// options is the PublicKeyCredentialAttestationOptions
string options = 1;
}
message QueryParamsKeysResponse {
map<string, KeyInfo> keys = 1;
}
message QueryParamsByKeyResponse {
KeyInfo key = 1;
}
message QueryParamsByAssetResponse {
AssetInfo asset = 1;
}
message QueryRegistrationOptionsByKeyResponse {
repeated string registration_options = 1;
// SyncResponse is the response type for the Sync RPC method.
message SyncResponse {
bool success = 1;
}
+47 -142
View File
@@ -4,80 +4,29 @@ package did.v1;
import "cosmos/orm/v1/orm.proto";
import "did/v1/genesis.proto";
import "did/v1/models.proto";
import "did/v1/enums.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
// Account represents a wallet account associated with a DID Controller
message Account {
// Alias represents a DID alias
message Alias {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {fields: "id"}
index: {
id: 1
fields: "controller,label"
fields: "subject,origin"
unique: true
}
index: {
id: 2
fields: "controller,address"
unique: true
}
index: {
id: 3
fields: "controller,chain_code,index"
unique: true
}
index: { id: 1, fields: "subject", unique: true }
};
};
// The unique identifier of the alias
string id = 1;
// Origin is the Alias provider
string origin = 2;
// The alias of the DID
string subject = 2;
// Subject is the user defined alias
string subject = 3;
// Controller of the alias
string controller = 4;
// Expiration of the alias
uint64 expiration = 5;
}
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
message Assertion {
option (cosmos.orm.v1.table) = {
id: 2
primary_key: {fields: "id"}
};
// The unique identifier of the account
string id = 1;
// The controller of the account
string controller = 2;
// The value of the linked identifier
PubKey public_key = 3;
// The address of the account
string address = 4;
// The label of the account
string label = 5;
// The bip32 chain code
uint32 chain_code = 6;
// The index of the account
uint32 index = 7;
// The supported chains of the account
repeated string chains = 8;
// Origin of the alias
string origin = 3;
}
// Controller represents a Sonr DWN Vault
@@ -87,113 +36,77 @@ message Controller {
primary_key: {fields: "id"}
index: {
id: 1
fields: "address"
fields: "sonr_address"
unique: true
}
index: {
id: 2
fields: "eth_address"
unique: true
}
index: {
id: 3
fields: "btc_address"
unique: true
}
index: {
id: 4
fields: "vault_cid"
unique: true
}
index: {
id: 5
fields: "status,vault_cid"
unique: true
}
};
// The unique identifier of the controller
string id = 1;
// The DID of the controller
string address = 2;
string sonr_address = 2;
// The DID of the controller
string eth_address = 3;
// The DID of the controller
string btc_address = 4;
// Aliases of the controller
repeated Alias aliases = 3;
repeated string aliases = 5;
// PubKey is the verification method
PubKey public_key = 4;
PubKey public_key = 6;
// The vault address or identifier
string vault_cid = 5;
string vault_cid = 7;
// The Authentications of the controller
repeated Credential authentication = 6;
repeated string authentication = 8;
// The Status of the claims for the controller
string status = 9;
}
// Proof represents a verifiable credential
message Proof {
// Verification reprsents a method of verifying membership in a DID
message Verification {
option (cosmos.orm.v1.table) = {
id: 4
primary_key: {fields: "id"}
index: {
id: 1
fields: "controller,issuer,property"
unique: true
}
};
// The unique identifier of the proof
string id = 1;
// The controller of the proof
string controller = 2;
// The value of the linked identifier
string issuer = 3;
// The property of the proof
string property = 4;
// The accumulator of the proof
bytes accumulator = 5;
// The secret key of the proof
bytes key = 6;
}
// ServiceRecord represents a decentralized service in a DID Document
message ServiceRecord {
option (cosmos.orm.v1.table) = {
id: 3
primary_key: {fields: "id"}
index: {
id: 1
fields: "origin"
fields: "issuer,subject"
unique: true
}
index: {
id: 2
fields: "authority,origin"
fields: "controller,did_method,issuer"
unique: true
}
};
// The ID of the service
string id = 1;
// The type of the service
string service_type = 2;
// The authority DID of the service
string authority = 3;
// The domain name of the service
string origin = 4;
// The description of the service
string description = 5;
// The service endpoint
map<string, string> service_endpoints = 6;
// Scopes is the Authorization Grants of the service
Permissions permissions = 7;
}
// Verification reprsents a method of verifying membership in a DID
message VerificationMethod {
option (cosmos.orm.v1.table) = {
id: 5
primary_key: {fields: "id"}
index: {
id: 1
fields: "controller,method,issuer,subject"
id: 3
fields: "verification_type,subject,issuer"
unique: true
}
};
@@ -205,7 +118,7 @@ message VerificationMethod {
string controller = 2;
// The DIDNamespace of the verification
DIDNamespace method = 3;
string did_method = 3;
// The value of the linked identifier
string issuer = 4;
@@ -215,15 +128,7 @@ message VerificationMethod {
// The public key of the verification
PubKey public_key = 6;
// The controller DID of the service
string controller_did = 3;
// The domain name of the service
string origin_uri = 4;
// The service endpoint
map<string, string> service_endpoints = 5;
// Scopes is the Authorization Grants of the service
repeated PermissionScope scopes = 6;
// The Verification Type (Authentication, Assertion, CapabilityDelegation, CapabilityInvocation)
string verification_type = 7;
}
+29 -162
View File
@@ -3,12 +3,8 @@ syntax = "proto3";
package did.v1;
import "cosmos/msg/v1/msg.proto";
import "did/v1/enums.proto";
import "did/v1/genesis.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "did/v1/genesis.proto";
import "did/v1/models.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
@@ -28,52 +24,13 @@ service Msg {
// this operation is called by services initiating a controller registration.
rpc AllocateVault(MsgAllocateVault) returns (MsgAllocateVaultResponse);
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
rpc SyncController(MsgSyncController) returns (MsgSyncControllerResponse);
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
// Authenticate asserts the given controller is the owner of the given address.
rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse);
// ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators.
rpc ProveWitness(MsgProveWitness) returns (MsgProveWitnessResponse);
// SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet.
rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse);
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
}
// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// params defines the parameters to update.
Params params = 2 [(gogoproto.nullable) = false];
// token is the macron token to authenticate the operation.
string token = 3;
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
// MsgAllocateVault is the message type for the AllocateVault RPC.
message MsgAllocateVault {
option (cosmos.msg.v1.signer) = "authority";
@@ -97,121 +54,27 @@ message MsgAllocateVaultResponse {
int64 expiry_block = 2;
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
string registration_options = 3;
string token = 3;
// IsLocalhost is a flag to indicate if the vault is localhost
bool localhost = 4;
}
// MsgProveWitness is the message type for the ProveWitness RPC.
message MsgProveWitness {
option (cosmos.msg.v1.signer) = "authority";
// MsgAuthenticate is the message type for the Authenticate RPC.
message MsgAuthenticate {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// property is key to prove.
string property = 2;
// Witness Value is the bytes of the witness.
bytes witness = 3;
// token is the macron token to authenticate the operation.
string token = 4;
}
// MsgProveWitnessResponse is the response type for the ProveWitness RPC.
message MsgProveWitnessResponse {
bool success = 1;
string property = 2;
}
// MsgSyncController is the message type for the SyncController RPC.
message MsgSyncController {
option (cosmos.msg.v1.signer) = "controller";
// controller is the address of the controller to sync.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Token is the public token to authenticate the operation.
string token = 3;
}
// MsgSyncControllerResponse is the response type for the SyncController RPC.
message MsgSyncControllerResponse {
bool success = 1;
}
// MsgRegisterController is the message type for the InitializeController RPC.
message MsgRegisterController {
// MsgAuthenticateResponse is the response type for the Authenticate RPC.
message MsgAuthenticateResponse {}
// MsgProveWitness is the message type for the ProveWitness RPC.
message MsgProveWitness {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Assertions is the list of assertions to initialize the controller with.
string cid = 2;
repeated bytes assertions = 2;
// Origin is the origin of the request in wildcard form.
string origin = 3;
// Keyshares is the list of keyshares to initialize the controller with.
repeated bytes keyshares = 3;
// Credential is the list of keyshares to initialize the controller with.
string credential_creation_response = 4;
// property is key to prove.
string property = 2;
// Witness Value is the bytes of the witness.
bytes witness = 3;
}
// MsgProveWitnessResponse is the response type for the ProveWitness RPC.
message MsgProveWitnessResponse {
bool success = 1;
string property = 2;
}
// MsgSyncVault is the message type for the SyncVault RPC.
message MsgSyncVault {
option (cosmos.msg.v1.signer) = "controller";
// controller is the address of the controller to sync.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// cid is the IPFS content identifier.
string cid = 2;
// Macroon is the public token to authenticate the operation.
bytes macron = 3;
}
// MsgSyncVaultResponse is the response type for the SyncVault RPC.
message MsgSyncVaultResponse {
bool success = 1;
}
// MsgRegisterController is the message type for the InitializeController RPC.
message MsgRegisterController {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Assertions is the list of assertions to initialize the controller with.
repeated bytes assertions = 2;
// Keyshares is the list of keyshares to initialize the controller with.
repeated bytes keyshares = 3;
// Verifications is the list of verifications to initialize the controller with.
repeated bytes verifications = 4;
// Verifications is the list of verifications to initialize the controller with.
repeated bytes verifications = 4;
}
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
@@ -237,7 +100,7 @@ message MsgAuthorizeService {
string origin = 2;
// Permissions is the scope of the service.
Permissions scopes = 3;
map<string, string> permissions = 3;
// token is the macron token to authenticate the operation.
string token = 4;
@@ -247,11 +110,6 @@ message MsgAuthorizeService {
message MsgAuthorizeServiceResponse {
bool success = 1;
string token = 2;
// Controller is the address of the initialized controller.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Accounts are a Address Map and Supported coin Denoms for the controller
map<string, string> accounts = 2;
}
// MsgRegisterService is the message type for the RegisterService RPC.
@@ -263,19 +121,6 @@ message MsgRegisterService {
// origin is the origin of the request in wildcard form. Requires valid TXT record in DNS.
Service service = 2;
// token is the macron token to authenticate the operation.
string token = 3;
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// origin is the origin of the request in wildcard form.
string origin_uri = 2;
// PermissionScope is the scope of the service.
repeated PermissionScope scopes = 3;
}
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
@@ -283,3 +128,25 @@ message MsgRegisterServiceResponse {
bool success = 1;
string did = 2;
}
// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// params defines the parameters to update.
Params params = 2 [(gogoproto.nullable) = false];
// token is the macron token to authenticate the operation.
string token = 3;
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
-114
View File
@@ -1,114 +0,0 @@
syntax = "proto3";
package did.v1;
import "cosmos/msg/v1/msg.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
option go_package = "github.com/onsonr/hway/x/did/types";
// AssetInfo defines the asset info
message AssetInfo {
string id = 1;
string denom = 2;
string symbol = 3;
string asset_type = 4;
string origin_chain = 5;
string origin_denom = 6;
int32 decimals = 7;
string description = 8;
string image_url = 9;
string coingecko_id = 10;
bool is_enabled = 11;
string ibc_path = 12;
string ibc_channel = 13;
string ibc_port = 14;
}
// ChainInfo defines the chain info
message ChainInfo {
string id = 1;
string chain_id = 2;
string name = 3;
string symbol = 4;
string bech32_prefix = 5;
string genesis_time = 6;
repeated Endpoint grpc_endpoints = 7;
repeated Endpoint rest_endpoints = 8;
ExplorerInfo explorer = 9;
FeeInfo fee_info = 10;
}
// Credential defines a WebAuthn credential
message Credential {
string id = 1;
string credential_type = 2;
bytes credential_id = 3;
repeated string transport = 4;
string attestation_type = 5;
string display_name = 6;
string controller = 7;
}
// Document defines a DID document
message Document {
string id = 1;
repeated VerificationMethod verification_methods = 2;
repeated string authentication = 4;
repeated string assertion_method = 5;
repeated string capability_delegation = 7;
repeated string capability_invocation = 8;
}
// Endpoint defines an endpoint
message Endpoint {
string url = 1;
bool is_primary = 2;
}
// ExplorerInfo defines the explorer info
message ExplorerInfo {
string name = 1;
string url = 2;
}
// FeeInfo defines a fee info
message FeeInfo {
string base_denom = 1;
repeated string fee_rates = 2;
int32 init_gas_limit = 3;
bool is_simulable = 4;
double gas_multiply = 5;
}
// Identity defines an associated profile for a did subject
message Identity {
string id = 1;
string subject = 2;
string controller = 3;
repeated Credential credentials = 4;
repeated VerificationMethod verification_methods = 5;
}
// PubKey defines a public key for a did
message PubKey {
string id = 1;
bytes key = 2;
string key_type = 3;
string controller = 4;
}
// VerificationMethod defines a verification method
message VerificationMethod {
string id = 1;
string controller = 2;
// The delegation proof or verification method
string public_key_multibase = 3;
// Public Key JWKS is a map of the associated public keys
map<string, string> public_key_jwks = 4;
}