[WIP] Replace cosmos_address with laconic_address for onboarding module operations #19

Draft
prathamesh wants to merge 2 commits from deep-stack/registry-sdk:iv-rename-cosmos-to-laconic into main
8 changed files with 23 additions and 23 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@cerc-io/registry-sdk", "name": "@cerc-io/registry-sdk",
"version": "0.2.6", "version": "0.2.7",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"repository": "git@github.com:cerc-io/registry-sdk.git", "repository": "git@github.com:cerc-io/registry-sdk.git",

View File

@ -16,10 +16,10 @@ message Params {
// Participant defines the data that will be stored for each enrolled // Participant defines the data that will be stored for each enrolled
// participant // participant
message Participant { message Participant {
// participant's cosmos (laconic) address // participant's laconic address
string cosmos_address = 1 string laconic_address = 1
[ (gogoproto.moretags) = [ (gogoproto.moretags) =
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ]; "json:\"laconic_address\" yaml:\"laconic_address\"" ];
// participant's Nitro address // participant's Nitro address
string nitro_address = 2 string nitro_address = 2

View File

@ -17,7 +17,7 @@ service Query {
option (google.api.http).get = "/cerc/onboarding/v1/participants"; option (google.api.http).get = "/cerc/onboarding/v1/participants";
} }
// GetParticipantByAddress queries a participant by cosmos (laconic) address // GetParticipantByAddress queries a participant by laconic address
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest) rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
returns (QueryGetParticipantByAddressResponse) { returns (QueryGetParticipantByAddressResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}"; option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";

View File

@ -470,7 +470,7 @@ export class Registry {
} }
/** /**
* Get participant by cosmos (laconic) address. * Get participant by laconic address.
*/ */
async getParticipantByAddress (address: string) { async getParticipantByAddress (address: string) {
return this._client.getParticipantByAddress(address); return this._client.getParticipantByAddress(address);

View File

@ -30,7 +30,7 @@ const onboardingEnabledTests = () => {
expectedParticipants = [ expectedParticipants = [
{ {
cosmosAddress: cosmosWallet.address, laconicAddress: cosmosWallet.address,
nitroAddress: ethWallet.address, nitroAddress: ethWallet.address,
role: DUMMY_ROLE, role: DUMMY_ROLE,
kycId: DUMMY_KYC_ID kycId: DUMMY_KYC_ID

View File

@ -14,8 +14,8 @@ export interface Params {
* participant * participant
*/ */
export interface Participant { export interface Participant {
/** participant's cosmos (laconic) address */ /** participant's laconic address */
cosmosAddress: string; laconicAddress: string;
/** participant's Nitro address */ /** participant's Nitro address */
nitroAddress: string; nitroAddress: string;
/** participant's role (participant | validator) */ /** participant's role (participant | validator) */
@ -86,7 +86,7 @@ export const Params = {
}; };
function createBaseParticipant(): Participant { function createBaseParticipant(): Participant {
return { cosmosAddress: "", nitroAddress: "", role: "", kycId: "" }; return { laconicAddress: "", nitroAddress: "", role: "", kycId: "" };
} }
export const Participant = { export const Participant = {
@ -94,8 +94,8 @@ export const Participant = {
message: Participant, message: Participant,
writer: _m0.Writer = _m0.Writer.create() writer: _m0.Writer = _m0.Writer.create()
): _m0.Writer { ): _m0.Writer {
if (message.cosmosAddress !== "") { if (message.laconicAddress !== "") {
writer.uint32(10).string(message.cosmosAddress); writer.uint32(10).string(message.laconicAddress);
} }
if (message.nitroAddress !== "") { if (message.nitroAddress !== "") {
writer.uint32(18).string(message.nitroAddress); writer.uint32(18).string(message.nitroAddress);
@ -117,7 +117,7 @@ export const Participant = {
const tag = reader.uint32(); const tag = reader.uint32();
switch (tag >>> 3) { switch (tag >>> 3) {
case 1: case 1:
message.cosmosAddress = reader.string(); message.laconicAddress = reader.string();
break; break;
case 2: case 2:
message.nitroAddress = reader.string(); message.nitroAddress = reader.string();
@ -138,8 +138,8 @@ export const Participant = {
fromJSON(object: any): Participant { fromJSON(object: any): Participant {
return { return {
cosmosAddress: isSet(object.cosmosAddress) laconicAddress: isSet(object.laconicAddress)
? String(object.cosmosAddress) ? String(object.laconicAddress)
: "", : "",
nitroAddress: isSet(object.nitroAddress) nitroAddress: isSet(object.nitroAddress)
? String(object.nitroAddress) ? String(object.nitroAddress)
@ -151,8 +151,8 @@ export const Participant = {
toJSON(message: Participant): unknown { toJSON(message: Participant): unknown {
const obj: any = {}; const obj: any = {};
message.cosmosAddress !== undefined && message.laconicAddress !== undefined &&
(obj.cosmosAddress = message.cosmosAddress); (obj.laconicAddress = message.laconicAddress);
message.nitroAddress !== undefined && message.nitroAddress !== undefined &&
(obj.nitroAddress = message.nitroAddress); (obj.nitroAddress = message.nitroAddress);
message.role !== undefined && (obj.role = message.role); message.role !== undefined && (obj.role = message.role);
@ -164,7 +164,7 @@ export const Participant = {
object: I object: I
): Participant { ): Participant {
const message = createBaseParticipant(); const message = createBaseParticipant();
message.cosmosAddress = object.cosmosAddress ?? ""; message.laconicAddress = object.laconicAddress ?? "";
message.nitroAddress = object.nitroAddress ?? ""; message.nitroAddress = object.nitroAddress ?? "";
message.role = object.role ?? ""; message.role = object.role ?? "";
message.kycId = object.kycId ?? ""; message.kycId = object.kycId ?? "";

View File

@ -470,7 +470,7 @@ export interface Query {
Participants( Participants(
request: QueryParticipantsRequest request: QueryParticipantsRequest
): Promise<QueryParticipantsResponse>; ): Promise<QueryParticipantsResponse>;
/** GetParticipantByAddress queries a participant by cosmos (laconic) address */ /** GetParticipantByAddress queries a participant by laconic address */
GetParticipantByAddress( GetParticipantByAddress(
request: QueryGetParticipantByAddressRequest request: QueryGetParticipantByAddressRequest
): Promise<QueryGetParticipantByAddressResponse>; ): Promise<QueryGetParticipantByAddressResponse>;

View File

@ -452,7 +452,7 @@ export class RegistryClient {
async getParticipants () { async getParticipants () {
const query = `query { const query = `query {
getParticipants { getParticipants {
cosmosAddress laconicAddress
nitroAddress nitroAddress
role role
kycId kycId
@ -465,12 +465,12 @@ export class RegistryClient {
} }
/** /**
* Get participant by cosmos address. * Get participant by laconic address.
*/ */
async getParticipantByAddress (address: string) { async getParticipantByAddress (address: string) {
const query = `query ($address: String!) { const query = `query ($address: String!) {
getParticipantByAddress (address: $address) { getParticipantByAddress (address: $address) {
cosmosAddress laconicAddress
nitroAddress nitroAddress
role role
kycId kycId
@ -490,7 +490,7 @@ export class RegistryClient {
async getParticipantByNitroAddress (nitroAddress: string) { async getParticipantByNitroAddress (nitroAddress: string) {
const query = `query ($nitroAddress: String!) { const query = `query ($nitroAddress: String!) {
getParticipantByNitroAddress (nitroAddress: $nitroAddress) { getParticipantByNitroAddress (nitroAddress: $nitroAddress) {
cosmosAddress laconicAddress
nitroAddress nitroAddress
role role
kycId kycId