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

127 lines
3.1 KiB
Protocol Buffer
Raw Normal View History

2024-07-05 22:20:13 -04:00
syntax = "proto3";
package did.v1;
import "amino/amino.proto";
2024-09-05 01:24:57 -04:00
import "did/v1/constants.proto";
import "gogoproto/gogo.proto";
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
option go_package = "github.com/onsonr/sonr/x/did/types";
2024-07-05 22:20:13 -04:00
// GenesisState defines the module genesis state
message GenesisState {
// Params defines all the parameters of the module.
2024-07-05 22:20:13 -04:00
Params params = 1 [(gogoproto.nullable) = false];
}
// Params defines the set of module parameters.
message Params {
option (amino.name) = "did/params";
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
2024-09-05 01:24:57 -04:00
// Whitelisted Assets
2024-07-26 12:14:20 -04:00
repeated AssetInfo whitelisted_assets = 1;
2024-07-05 22:20:13 -04:00
2024-07-26 12:14:20 -04:00
// Whitelisted Blockchains
repeated ChainInfo whitelisted_chains = 2;
// Whitelisted Key Types
2024-08-31 12:49:44 -04:00
repeated KeyInfo allowed_public_keys = 3;
2024-08-31 18:54:14 -04:00
2024-09-05 01:24:57 -04:00
// OpenIDConfig defines the base openid configuration across all did services
OpenIDConfig openid_config = 4;
2024-07-26 12:14:20 -04:00
}
2024-07-05 22:20:13 -04:00
// AssetInfo defines the asset info
message AssetInfo {
2024-09-05 01:24:57 -04:00
// 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 Method of the did namespace
string method = 6;
// The icon url
string icon_url = 7;
}
// ChainInfo defines the chain info
message ChainInfo {
2024-09-05 01:24:57 -04:00
string id = 1;
string chain_id = 2;
string name = 3;
string symbol = 4;
repeated ValidatorInfo validators = 5;
}
2024-08-31 18:54:14 -04:00
// KeyInfo defines information for accepted PubKey types
message KeyInfo {
2024-09-05 01:24:57 -04:00
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"
}
// OpenIDConfig defines the base openid configuration across all did services
message OpenIDConfig {
string issuer = 1;
string authorization_endpoint = 2;
string token_endpoint = 3;
string userinfo_endpoint = 4;
repeated string scopes_supported = 5;
repeated string response_types_supported = 6;
repeated string response_modes_supported = 7;
repeated string grant_types_supported = 8;
repeated string acr_values_supported = 9;
repeated string subject_types_supported = 10;
2024-08-31 18:54:14 -04:00
}
// ValidatorInfo defines information for accepted Validator nodes
message ValidatorInfo {
2024-09-05 01:24:57 -04:00
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 {
2024-09-05 01:24:57 -04:00
string url = 1;
bool is_primary = 2;
}
// ExplorerInfo defines the explorer info
message ExplorerInfo {
2024-09-05 01:24:57 -04:00
string name = 1;
string url = 2;
}
// FeeInfo defines a fee info
message FeeInfo {
2024-09-05 01:24:57 -04:00
string base_denom = 1;
repeated string fee_rates = 2;
int32 init_gas_limit = 3;
bool is_simulable = 4;
double gas_multiply = 5;
}
2024-08-31 12:49:44 -04:00
2024-09-05 01:24:57 -04:00
// IBCChannel defines the IBC channel info
message IBCChannel {
string id = 1;
string port = 2;
}
}