diff --git a/package.json b/package.json index 8308526..569d050 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/registry-sdk", - "version": "0.2.6", + "version": "0.2.7", "main": "dist/index.js", "types": "dist/index.d.ts", "repository": "git@github.com:cerc-io/registry-sdk.git", diff --git a/proto/cerc/onboarding/v1/onboarding.proto b/proto/cerc/onboarding/v1/onboarding.proto index 002dc6a..fe947f0 100644 --- a/proto/cerc/onboarding/v1/onboarding.proto +++ b/proto/cerc/onboarding/v1/onboarding.proto @@ -16,10 +16,10 @@ message Params { // Participant defines the data that will be stored for each enrolled // participant message Participant { - // participant's cosmos (laconic) address - string cosmos_address = 1 + // participant's laconic address + string laconic_address = 1 [ (gogoproto.moretags) = - "json:\"cosmos_address\" yaml:\"cosmos_address\"" ]; + "json:\"laconic_address\" yaml:\"laconic_address\"" ]; // participant's Nitro address string nitro_address = 2 diff --git a/proto/cerc/onboarding/v1/query.proto b/proto/cerc/onboarding/v1/query.proto index f340d99..29b92b4 100644 --- a/proto/cerc/onboarding/v1/query.proto +++ b/proto/cerc/onboarding/v1/query.proto @@ -17,7 +17,7 @@ service Query { 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) returns (QueryGetParticipantByAddressResponse) { option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}"; diff --git a/src/index.ts b/src/index.ts index 17047ff..3a86466 100644 --- a/src/index.ts +++ b/src/index.ts @@ -470,7 +470,7 @@ export class Registry { } /** - * Get participant by cosmos (laconic) address. + * Get participant by laconic address. */ async getParticipantByAddress (address: string) { return this._client.getParticipantByAddress(address); diff --git a/src/onboarding.test.ts b/src/onboarding.test.ts index 25e6f51..4b95d66 100644 --- a/src/onboarding.test.ts +++ b/src/onboarding.test.ts @@ -30,7 +30,7 @@ const onboardingEnabledTests = () => { expectedParticipants = [ { - cosmosAddress: cosmosWallet.address, + laconicAddress: cosmosWallet.address, nitroAddress: ethWallet.address, role: DUMMY_ROLE, kycId: DUMMY_KYC_ID diff --git a/src/proto/cerc/onboarding/v1/onboarding.ts b/src/proto/cerc/onboarding/v1/onboarding.ts index 4c65d15..57cf53d 100644 --- a/src/proto/cerc/onboarding/v1/onboarding.ts +++ b/src/proto/cerc/onboarding/v1/onboarding.ts @@ -14,8 +14,8 @@ export interface Params { * participant */ export interface Participant { - /** participant's cosmos (laconic) address */ - cosmosAddress: string; + /** participant's laconic address */ + laconicAddress: string; /** participant's Nitro address */ nitroAddress: string; /** participant's role (participant | validator) */ @@ -86,7 +86,7 @@ export const Params = { }; function createBaseParticipant(): Participant { - return { cosmosAddress: "", nitroAddress: "", role: "", kycId: "" }; + return { laconicAddress: "", nitroAddress: "", role: "", kycId: "" }; } export const Participant = { @@ -94,8 +94,8 @@ export const Participant = { message: Participant, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.cosmosAddress !== "") { - writer.uint32(10).string(message.cosmosAddress); + if (message.laconicAddress !== "") { + writer.uint32(10).string(message.laconicAddress); } if (message.nitroAddress !== "") { writer.uint32(18).string(message.nitroAddress); @@ -117,7 +117,7 @@ export const Participant = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.cosmosAddress = reader.string(); + message.laconicAddress = reader.string(); break; case 2: message.nitroAddress = reader.string(); @@ -138,8 +138,8 @@ export const Participant = { fromJSON(object: any): Participant { return { - cosmosAddress: isSet(object.cosmosAddress) - ? String(object.cosmosAddress) + laconicAddress: isSet(object.laconicAddress) + ? String(object.laconicAddress) : "", nitroAddress: isSet(object.nitroAddress) ? String(object.nitroAddress) @@ -151,8 +151,8 @@ export const Participant = { toJSON(message: Participant): unknown { const obj: any = {}; - message.cosmosAddress !== undefined && - (obj.cosmosAddress = message.cosmosAddress); + message.laconicAddress !== undefined && + (obj.laconicAddress = message.laconicAddress); message.nitroAddress !== undefined && (obj.nitroAddress = message.nitroAddress); message.role !== undefined && (obj.role = message.role); @@ -164,7 +164,7 @@ export const Participant = { object: I ): Participant { const message = createBaseParticipant(); - message.cosmosAddress = object.cosmosAddress ?? ""; + message.laconicAddress = object.laconicAddress ?? ""; message.nitroAddress = object.nitroAddress ?? ""; message.role = object.role ?? ""; message.kycId = object.kycId ?? ""; diff --git a/src/proto/cerc/onboarding/v1/query.ts b/src/proto/cerc/onboarding/v1/query.ts index 594be30..0abe670 100644 --- a/src/proto/cerc/onboarding/v1/query.ts +++ b/src/proto/cerc/onboarding/v1/query.ts @@ -470,7 +470,7 @@ export interface Query { Participants( request: QueryParticipantsRequest ): Promise; - /** GetParticipantByAddress queries a participant by cosmos (laconic) address */ + /** GetParticipantByAddress queries a participant by laconic address */ GetParticipantByAddress( request: QueryGetParticipantByAddressRequest ): Promise; diff --git a/src/registry-client.ts b/src/registry-client.ts index 23c7776..517f109 100644 --- a/src/registry-client.ts +++ b/src/registry-client.ts @@ -452,7 +452,7 @@ export class RegistryClient { async getParticipants () { const query = `query { getParticipants { - cosmosAddress + laconicAddress nitroAddress role kycId @@ -465,12 +465,12 @@ export class RegistryClient { } /** - * Get participant by cosmos address. + * Get participant by laconic address. */ async getParticipantByAddress (address: string) { const query = `query ($address: String!) { getParticipantByAddress (address: $address) { - cosmosAddress + laconicAddress nitroAddress role kycId @@ -490,7 +490,7 @@ export class RegistryClient { async getParticipantByNitroAddress (nitroAddress: string) { const query = `query ($nitroAddress: String!) { getParticipantByNitroAddress (nitroAddress: $nitroAddress) { - cosmosAddress + laconicAddress nitroAddress role kycId