Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ genesis:
app_state:
keyregistry:
params: {}
key_pairs:
# - mina_key: "SC/6aqoZ19ObLka8NIQVMs1qPim+uD6epPLuQS4x2n4Z"
# cosmos_key: "UdDr3CCO+4HVrBtbzqLTM3P2xAMNCIrPeCTeVfb5sw1y"
user_key_pairs:
# - mina_key: "SC/6aqoZ19ObLka8NIQVMs1qPim+uD6epPLuQS4x2n4Z"
# cosmos_key: "UdDr3CCO+4HVrBtbzqLTM3P2xAMNCIrPeCTeVfb5sw1y"
validator_key_pairs:
# - mina_key: "3IvK1eWmmcfdlIb+T04+ck9Q5bjbqHqiT0ucGJITzyY="
# cosmos_key: "A8saw69s1DQWvUjseeOtG8hGavmYiInrQ5M1aOPa4QkP"
2 changes: 1 addition & 1 deletion docs/static/openapi.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/keyregistry/v1/get_cosmos_pub_key/{mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetCosmosPubKey Queries a list of GetCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_mina_pub_key/{cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetMinaPubKey Queries a list of GetMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetMinaPubKey","parameters":[{"type":"string","format":"byte","name":"cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin7","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/pulsar/pulsar/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsar.pulsar.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsar.pulsar.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsar.pulsar.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsar.pulsar.v1.Params"}}},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetCosmosPubKeyResponse":{"description":"QueryGetCosmosPubKeyResponse defines the QueryGetCosmosPubKeyResponse message.","type":"object","properties":{"cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetMinaPubKeyResponse":{"description":"QueryGetMinaPubKeyResponse defines the QueryGetMinaPubKeyResponse message.","type":"object","properties":{"mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]}
{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_address/{user_mina_address}":{"get":{"tags":["Query"],"summary":"GetUserCosmosAddress Queries a list of GetUserCosmosAddress items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosAddress","parameters":[{"type":"string","format":"byte","name":"user_mina_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_address/{user_cosmos_address}":{"get":{"tags":["Query"],"summary":"GetUserMinaAddress Queries a list of GetUserMinaAddress items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaAddress","parameters":[{"type":"string","format":"byte","name":"user_cosmos_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosAddress Queries a list of GetValidatorCosmosAddress items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaAddress Queries a list of GetValidatorMinaAddress items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin8","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/pulsar/pulsar/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsar.pulsar.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsar.pulsar.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsar.pulsar.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsar.pulsar.v1.Params"}}},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetUserCosmosAddressResponse":{"description":"QueryGetUserCosmosAddressResponse defines the QueryGetUserCosmosAddressResponse message.","type":"object","properties":{"user_cosmos_address":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaAddressResponse":{"description":"QueryGetUserMinaAddressResponse defines the QueryGetUserMinaAddressResponse message.","type":"object","properties":{"user_mina_address":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosAddressResponse defines the QueryGetValidatorCosmosAddressResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaAddressResponse defines the QueryGetValidatorMinaAddressResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]}
11 changes: 11 additions & 0 deletions proto/pulsarchain/keyregistry/v1/address_pair.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";
package pulsarchain.keyregistry.v1;

option go_package = "github.com/node101-io/pulsar-chain/x/keyregistry/types";

// KeyPair defines the KeyPair message.

message AddressPair {
bytes mina_addr = 1;
bytes cosmos_addr = 2;
}
7 changes: 4 additions & 3 deletions proto/pulsarchain/keyregistry/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package pulsarchain.keyregistry.v1;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "pulsarchain/keyregistry/v1/address_pair.proto";
import "pulsarchain/keyregistry/v1/params.proto";
import "pulsarchain/keyregistry/v1/key_pair.proto";
import "pulsarchain/keyregistry/v1/public_key_pair.proto";

option go_package = "github.com/node101-io/pulsar-chain/x/keyregistry/types";


// GenesisState defines the keyregistry module's genesis state.
message GenesisState {
// params defines all the parameters of the module.
Params params = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated KeyPair key_pairs = 2;
repeated AddressPair user_key_pairs = 2;
repeated PublicKeyPair validator_key_pairs = 3;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package pulsarchain.keyregistry.v1;
option go_package = "github.com/node101-io/pulsar-chain/x/keyregistry/types";

// KeyPair defines the KeyPair message.
message KeyPair {
message PublicKeyPair {
bytes mina_key = 1;
bytes cosmos_key = 2;
}
66 changes: 48 additions & 18 deletions proto/pulsarchain/keyregistry/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,24 @@ service Query {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/params";
}

// GetMinaPubKey Queries a list of GetMinaPubKey items.
rpc GetMinaPubKey(QueryGetMinaPubKeyRequest) returns (QueryGetMinaPubKeyResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_mina_pub_key/{cosmos_pub_key}";
// GetUserMinaAddress Queries a list of GetUserMinaAddress items.
rpc GetUserMinaAddress(QueryGetUserMinaAddressRequest) returns (QueryGetUserMinaAddressResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_address/{user_cosmos_address}";
}

// GetCosmosPubKey Queries a list of GetCosmosPubKey items.
rpc GetCosmosPubKey(QueryGetCosmosPubKeyRequest) returns (QueryGetCosmosPubKeyResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_cosmos_pub_key/{mina_pub_key}";
// GetUserCosmosAddress Queries a list of GetUserCosmosAddress items.
rpc GetUserCosmosAddress(QueryGetUserCosmosAddressRequest) returns (QueryGetUserCosmosAddressResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_address/{user_mina_address}";
}

// GetValidatorMinaAddress Queries a list of GetValidatorMinaAddress items.
rpc GetValidatorMinaPubKey(QueryGetValidatorMinaPubKeyRequest) returns (QueryGetValidatorMinaPubKeyResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}";
}

// GetValidatorCosmosAddress Queries a list of GetValidatorCosmosAddress items.
rpc GetValidatorCosmosPubKey(QueryGetValidatorCosmosPubKeyRequest) returns (QueryGetValidatorCosmosPubKeyResponse) {
option (google.api.http).get = "/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}";
}
}

Expand All @@ -40,22 +50,42 @@ message QueryParamsResponse {
];
}

// QueryGetMinaPubKeyRequest defines the QueryGetMinaPubKeyRequest message.
message QueryGetMinaPubKeyRequest {
bytes cosmos_pub_key = 1;
// QueryGetUserMinaAddressRequest defines the QueryGetUserMinaAddressRequest message.
message QueryGetUserMinaAddressRequest {
bytes user_cosmos_address = 1;
}

// QueryGetUserMinaAddressResponse defines the QueryGetUserMinaAddressResponse message.
message QueryGetUserMinaAddressResponse {
bytes user_mina_address = 1;
}

// QueryGetUserCosmosAddressRequest defines the QueryGetUserCosmosAddressRequest message.
message QueryGetUserCosmosAddressRequest {
bytes user_mina_address = 1;
}

// QueryGetUserCosmosAddressResponse defines the QueryGetUserCosmosAddressResponse message.
message QueryGetUserCosmosAddressResponse {
bytes user_cosmos_address = 1;
}

// QueryGetValidatorMinaAddressRequest defines the QueryGetValidatorMinaAddressRequest message.
message QueryGetValidatorMinaPubKeyRequest {
bytes validator_cosmos_pub_key = 1;
}

// QueryGetMinaPubKeyResponse defines the QueryGetMinaPubKeyResponse message.
message QueryGetMinaPubKeyResponse {
bytes mina_pub_key = 1;
// QueryGetValidatorMinaAddressResponse defines the QueryGetValidatorMinaAddressResponse message.
message QueryGetValidatorMinaPubKeyResponse {
bytes validator_mina_pub_key = 1;
}

// QueryGetCosmosPubKeyRequest defines the QueryGetCosmosPubKeyRequest message.
message QueryGetCosmosPubKeyRequest {
bytes mina_pub_key = 1;
// QueryGetValidatorCosmosAddressRequest defines the QueryGetValidatorCosmosAddressRequest message.
message QueryGetValidatorCosmosPubKeyRequest {
bytes validator_mina_pub_key = 1;
}

// QueryGetCosmosPubKeyResponse defines the QueryGetCosmosPubKeyResponse message.
message QueryGetCosmosPubKeyResponse {
bytes cosmos_pub_key = 1;
// QueryGetValidatorCosmosAddressResponse defines the QueryGetValidatorCosmosAddressResponse message.
message QueryGetValidatorCosmosPubKeyResponse {
bytes validator_cosmos_pub_key = 1;
}
5 changes: 3 additions & 2 deletions proto/pulsarchain/keyregistry/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ message MsgRegisterKeys {
string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string cosmos_signature = 2;
string mina_signature = 3;
bytes cosmos_public_key = 4;
bytes mina_public_key = 5;
bytes cosmos_address = 4;
bytes mina_address = 5;
bool is_user = 6;
}

// MsgRegisterKeysResponse defines the MsgRegisterKeysResponse message.
Expand Down
Loading
Loading