Squash merge develop into master

This commit is contained in:
Prad Nukala
2024-09-14 14:27:45 -04:00
parent a929e61d01
commit 05bda3d1b2
227 changed files with 56902 additions and 10178 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/onsonr/hway/api
default: github.com/onsonr/sonr/api
except:
- buf.build/googleapis/googleapis
- buf.build/cosmos/gogo-proto
+1 -1
View File
@@ -1,5 +1,5 @@
version: v1
name: buf.build/didao/sonr
name: buf.build/onsonr/sonr
deps:
- buf.build/cosmos/cosmos-sdk:9000fcc585a046c9881271d53dd40c34
- buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31
+2 -2
View File
@@ -1,6 +1,6 @@
syntax = "proto3";
package onsonr.hway.did.module.v1;
package onsonr.sonr.did.module.v1;
import "cosmos/app/v1alpha1/module.proto";
@@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto";
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module {
option (cosmos.app.v1alpha1.module) = {
go_import : "github.com/onsonr/hway"
go_import : "github.com/onsonr/sonr"
};
}
+204 -4
View File
@@ -1,8 +1,10 @@
syntax = "proto3";
package did.v1;
import "gogoproto/gogo.proto";
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";
@@ -11,6 +13,17 @@ option go_package = "github.com/onsonr/hway/x/did/types";
message GenesisState {
// Params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
GlobalIntegrity global_integrity = 2;
}
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
message GlobalIntegrity {
string controller = 1;
string seed = 2;
bytes accumulator = 3;
uint64 count = 4;
}
// Params defines the set of module parameters.
@@ -19,11 +32,198 @@ message Params {
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
// Whitelisted Assets
// Whitelisted Assets
repeated AssetInfo whitelisted_assets = 1;
// Whitelisted Blockchains
repeated ChainInfo whitelisted_chains = 2;
// Whitelisted Key Types
map<string, KeyInfo> allowed_public_keys = 2;
// IpfsActive is a flag to enable/disable ipfs
bool ipfs_active = 3;
// Localhost Registration Enabled
bool localhost_registration_enabled = 4;
// ConveyancePreference defines the conveyance preference
string conveyance_preference = 5;
// AttestationFormats defines the attestation formats
repeated string attestation_formats = 6;
}
// AssetInfo defines the asset info
message AssetInfo {
// The coin type index for bip44 path
int64 index = 1;
// The hrp for bech32 address
string hrp = 2;
// The coin symbol
string symbol = 3;
// The coin name
AssetType asset_type = 4;
// The name of the asset
string name = 5;
// The icon url
string icon_url = 6;
}
// 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"
}
// 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;
// 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;
}
}
//
// [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;
}
// 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
@@ -0,0 +1,114 @@
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;
}
+84 -6
View File
@@ -1,19 +1,82 @@
syntax = "proto3";
package did.v1;
import "google/api/annotations.proto";
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/hway/x/did/types";
option go_package = "github.com/onsonr/sonr/x/did/types";
// Query provides defines the gRPC querier service.
service Query {
// Params queries all parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/did/params";
}
// Params queries all parameters of the module.
rpc Params(QueryRequest) returns (QueryParamsResponse) {
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) {
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}";
}
}
// Queryequest is the request type for the Query/Params RPC method.
message QueryRequest {
string did = 1;
string origin = 2;
string key = 3;
string asset = 4;
}
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
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";
@@ -103,3 +166,18 @@ message QueryServiceResponse {
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;
}
+134 -66
View File
@@ -1,17 +1,34 @@
syntax = "proto3";
package did.v1;
option go_package = "github.com/onsonr/hway/x/did/types";
import "cosmos/orm/v1/orm.proto";
import "did/v1/genesis.proto";
import "did/v1/models.proto";
import "did/v1/enums.proto";
// Aliases represents the `alsoKnownAs` property associated with a DID Controller
message Aliases {
option go_package = "github.com/onsonr/sonr/x/did/types";
// Account represents a wallet account associated with a DID Controller
message Account {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {fields: "id"}
index: {
id: 1
fields: "controller,label"
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 }
};
@@ -38,107 +55,113 @@ message Assertion {
primary_key: {fields: "id"}
};
// The unique identifier of the attestation
// The unique identifier of the account
string id = 1;
// Key type (e.g., "passkey", "ssh", "gpg", "native-secure-enclave")
string key_type = 2;
// The controller of the account
string controller = 2;
// The value of the linked identifier
bytes credential = 3;
PubKey public_key = 3;
// Metadata is optional additional information about the assertion
map<string, string> metadata = 4;
// The address of the account
string address = 4;
// The controller of the attestation
string controller = 5;
// 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;
}
// Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone)
message Attestation {
option (cosmos.orm.v1.table) = {
id: 3
primary_key: {fields: "id"}
};
// The unique identifier of the attestation
string id = 1;
// The type of the linked identifier (e.g., "crypto", "github", "email", "phone")
string key_type = 2;
// The value of the linked identifier
string value = 3;
// The proof or verification method for this attestation
string proof = 4;
// The controller of the attestation
string controller = 5;
}
// Controller represents a Sonr DWN Vault
message Controller {
option (cosmos.orm.v1.table) = {
id: 4
id: 2
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 did = 2;
string address = 2;
// The public key of the controller
string public_key_multibase = 3;
// 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 = 4;
string vault_cid = 5;
// Fingerprint is the Accumulator of discrete credential identifiers
bytes fingerprint = 5;
// The Authentications of the controller
repeated Credential authentication = 6;
}
// Delegation represents IBC Account Controllers for various chains (e.g., ETH, BTC)
message Delegation {
// Proof represents a verifiable credential
message Proof {
option (cosmos.orm.v1.table) = {
id: 5
id: 4
primary_key: {fields: "id"}
index: {
id: 1
fields: "controller,issuer,property"
unique: true
}
};
// The unique identifier of the delegation
// The unique identifier of the proof
string id = 1;
// The Decentralized Identifier of the delegated account
string did = 2;
// The controller of the proof
string controller = 2;
// The chain type (e.g., "ETH", "BTC")
string chain_type = 3;
// The value of the linked identifier
string issuer = 3;
// The address on the target chain
string chain_address = 4;
// The property of the proof
string property = 4;
// The controller DID
string controller_did = 5;
// The accumulator of the proof
bytes accumulator = 5;
// The delegation proof or verification method
string public_key_multibase = 6;
// Public Key JWKS is a map of the associated public keys
map<string, string> public_key_jwks = 7;
// IBC Channel ID
uint64 channel_id = 8;
// The secret key of the proof
bytes key = 6;
}
// Service represents a service in a DID Document
message Service {
// ServiceRecord represents a decentralized service in a DID Document
message ServiceRecord {
option (cosmos.orm.v1.table) = {
id: 6
id: 3
primary_key: {fields: "id"}
index: {
id: 1
fields: "origin"
unique: true
}
index: {
id: 2
fields: "authority,origin"
unique: true
}
};
// The ID of the service
@@ -147,6 +170,51 @@ message Service {
// 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"
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 controller DID of the service
string controller_did = 3;
+142 -16
View File
@@ -7,16 +7,35 @@ import "did/v1/enums.proto";
import "did/v1/genesis.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
option go_package = "github.com/onsonr/hway/x/did/types";
import "did/v1/genesis.proto";
import "did/v1/models.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
option (cosmos.msg.v1.service) = true;
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// AuthorizeService asserts the given controller is the owner of the given address.
rpc AuthorizeService(MsgAuthorizeService) returns (MsgAuthorizeServiceResponse);
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// 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);
@@ -43,9 +62,10 @@ message MsgUpdateParams {
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// params defines the parameters to update.
//
// NOTE: All parameters must be supplied.
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
@@ -54,23 +74,79 @@ message MsgUpdateParams {
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
// MsgAllocateVault is the message type for the AllocateVault RPC.
message MsgAllocateVault {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the service account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// subject is a unique human-defined identifier to associate with the vault.
string subject = 2;
// origin is the origin of the request in wildcard form.
string origin = 3;
}
// MsgAllocateVaultResponse is the response type for the AllocateVault RPC.
message MsgAllocateVaultResponse {
// CID is the content identifier of the vault.
string cid = 1;
// ExpiryBlock is the block number at which the vault will expire.
int64 expiry_block = 2;
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
string registration_options = 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"];
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Controller is the address of the controller to authenticate.
string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// property is key to prove.
string property = 2;
// Address is the address to authenticate.
string address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Witness Value is the bytes of the witness.
bytes witness = 3;
// Origin is the origin of the request in wildcard form.
string origin = 4;
// 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 {}
@@ -81,6 +157,14 @@ message MsgProveWitness {
// 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;
// Origin is the origin of the request in wildcard form.
string origin = 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;
@@ -132,6 +216,37 @@ message MsgRegisterController {
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
message MsgRegisterControllerResponse {
// Success returns true if the specified cid is valid and not already encrypted.
bool success = 1;
// Controller is the address of the initialized controller.
string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Accounts are a Address Map and Supported coin Denoms for the controller
map<string, string> accounts = 3;
}
// MsgAuthorizeService is the message type for the AuthorizeService RPC.
message MsgAuthorizeService {
option (cosmos.msg.v1.signer) = "controller";
// Controller is the address of the controller to authenticate.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Origin is the origin of the request in wildcard form.
string origin = 2;
// Permissions is the scope of the service.
Permissions scopes = 3;
// token is the macron token to authenticate the operation.
string token = 4;
}
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC.
message MsgAuthorizeServiceResponse {
bool success = 1;
string token = 2;
// Controller is the address of the initialized controller.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
@@ -141,6 +256,16 @@ message MsgRegisterControllerResponse {
// MsgRegisterService is the message type for the RegisterService RPC.
message MsgRegisterService {
option (cosmos.msg.v1.signer) = "controller";
// authority is the address of the governance account.
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// 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.
@@ -156,4 +281,5 @@ message MsgRegisterService {
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
message MsgRegisterServiceResponse {
bool success = 1;
string did = 2;
}
-13
View File
@@ -1,13 +0,0 @@
syntax = "proto3";
package onsonr.hway.oracle.module.v1;
import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module {
option (cosmos.app.v1alpha1.module) = {
go_import : "github.com/onsonr/hway"
};
}
-10
View File
@@ -1,10 +0,0 @@
syntax = "proto3";
package oracle.v1;
option go_package = "github.com/onsonr/hway/x/oracle/types";
import "gogoproto/gogo.proto";
// GenesisState defines the middlewares genesis state.
message GenesisState {}
-7
View File
@@ -1,7 +0,0 @@
syntax = "proto3";
package oracle.v1;
option go_package = "github.com/onsonr/hway/x/oracle/types";
import "gogoproto/gogo.proto";
-7
View File
@@ -1,7 +0,0 @@
syntax = "proto3";
package oracle.v1;
option go_package = "github.com/onsonr/hway/x/oracle/types";
import "gogoproto/gogo.proto";