forked from cerc-io/registry-sdk
Replace cosmos with laconic
This commit is contained in:
parent
f93a297857
commit
f5d3f3ba08
@ -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
|
||||
|
@ -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}";
|
||||
|
@ -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);
|
||||
|
@ -30,7 +30,7 @@ const onboardingEnabledTests = () => {
|
||||
|
||||
expectedParticipants = [
|
||||
{
|
||||
cosmosAddress: cosmosWallet.address,
|
||||
laconicAddress: cosmosWallet.address,
|
||||
nitroAddress: ethWallet.address,
|
||||
role: DUMMY_ROLE,
|
||||
kycId: DUMMY_KYC_ID
|
||||
|
@ -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 ?? "";
|
||||
|
@ -470,7 +470,7 @@ export interface Query {
|
||||
Participants(
|
||||
request: QueryParticipantsRequest
|
||||
): Promise<QueryParticipantsResponse>;
|
||||
/** GetParticipantByAddress queries a participant by cosmos (laconic) address */
|
||||
/** GetParticipantByAddress queries a participant by laconic address */
|
||||
GetParticipantByAddress(
|
||||
request: QueryGetParticipantByAddressRequest
|
||||
): Promise<QueryGetParticipantByAddressResponse>;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user