From 79339962ba2bddaaf0da7bd6118448ee32618035 Mon Sep 17 00:00:00 2001 From: Youngjoon Lee Date: Thu, 15 Jul 2021 15:35:04 +0900 Subject: [PATCH] feat: Update proto files based on Panacea v2.0.0 --- package.json | 2 +- protodep.lock | 8 +- protodep.toml | 6 +- src/panacea-client.ts | 14 +- src/proto/google/protobuf/descriptor.ts | 16 +- src/proto/panacea/aol/v2/owner.ts | 1 + src/proto/panacea/aol/v2/query.ts | 411 +++++++++++------------- src/proto/panacea/aol/v2/record.ts | 1 + src/proto/panacea/aol/v2/topic.ts | 1 + src/proto/panacea/aol/v2/tx.ts | 12 + src/proto/panacea/aol/v2/writer.ts | 1 + src/proto/panacea/did/v2/did.ts | 324 +++++++++++++------ src/proto/panacea/did/v2/query.ts | 123 ++++--- src/proto/panacea/did/v2/tx.ts | 172 +++++----- src/proto/panacea/token/v2/genesis.ts | 1 - src/proto/panacea/token/v2/query.ts | 190 +++++------ src/proto/panacea/token/v2/token.ts | 1 + src/proto/panacea/token/v2/tx.ts | 5 +- 18 files changed, 692 insertions(+), 597 deletions(-) diff --git a/package.json b/package.json index 1da4a8d..befa765 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "proto-gen": "./protocgen.sh", "build": "tsc --module commonjs", - "test": "jest", + "test": "jest --runInBand", "lint": "eslint src test --ext .ts,.tsx", "doc": "typedoc", "prepublishOnly": "npm run build" diff --git a/protodep.lock b/protodep.lock index b334af2..45f3061 100644 --- a/protodep.lock +++ b/protodep.lock @@ -2,21 +2,21 @@ proto_outdir = "./third_party/proto" [[dependencies]] target = "github.com/medibloc/panacea-core/proto" - revision = "8f8223bd73d6d1aabb9eb0a56f1f402ff7c49f47" - branch = "stargate" + revision = "fba1c1c6a14e9c1ff7853094ac8665feea82a41e" + branch = "" path = "" protocol = "" [[dependencies]] target = "github.com/cosmos/cosmos-sdk/third_party/proto" - revision = "842b06003f97d31e4ec83847e9fe8185d51a1fc7" + revision = "84c33215658131d87daf3c629e909e12ed9370fa" branch = "" path = "" protocol = "" [[dependencies]] target = "github.com/cosmos/cosmos-sdk/proto" - revision = "842b06003f97d31e4ec83847e9fe8185d51a1fc7" + revision = "84c33215658131d87daf3c629e909e12ed9370fa" branch = "" path = "" protocol = "" diff --git a/protodep.toml b/protodep.toml index dfbb4fe..d0c7119 100644 --- a/protodep.toml +++ b/protodep.toml @@ -2,14 +2,14 @@ proto_outdir = "./third_party/proto" [[dependencies]] target = "github.com/medibloc/panacea-core/proto" - branch = "stargate" # TODO: use a specific revision + revision = "v2.0.0" [[dependencies]] target = "github.com/cosmos/cosmos-sdk/third_party/proto" - revision = "v0.42.5" + revision = "v0.42.7" [[dependencies]] target = "github.com/cosmos/cosmos-sdk/proto" - revision = "v0.42.5" + revision = "v0.42.7" diff --git a/src/panacea-client.ts b/src/panacea-client.ts index a8779b9..9bf5edc 100644 --- a/src/panacea-client.ts +++ b/src/panacea-client.ts @@ -2,8 +2,8 @@ import { createProtobufRpcClient, StargateClient } from "@cosmjs/stargate"; import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; import { QueryClientImpl as AolQueryClientImpl, - QueryListTopicsResponse, - QueryListWritersResponse + QueryTopicsResponse, + QueryWritersResponse } from "./proto/panacea/aol/v2/query"; import { Topic } from "./proto/panacea/aol/v2/topic"; import { PageRequest } from "./proto/cosmos/base/query/v1beta1/pagination"; @@ -34,7 +34,7 @@ export class PanaceaClient extends StargateClient { const queryService = new AolQueryClientImpl(createProtobufRpcClient(this.forceGetQueryClient())); try { const resp = await queryService.Topic({ownerAddress: ownerAddress, topicName: topicName}); - return resp.Topic ?? null; + return resp.topic ?? null; } catch (error) { if (rpcErrMsgNotFound.test(error)) { return null; @@ -43,7 +43,7 @@ export class PanaceaClient extends StargateClient { } } - async getTopics(ownerAddress: string, pageRequest?: PageRequest): Promise { + async getTopics(ownerAddress: string, pageRequest?: PageRequest): Promise { const queryService = new AolQueryClientImpl(createProtobufRpcClient(this.forceGetQueryClient())); return await queryService.Topics({ownerAddress: ownerAddress, pagination: pageRequest}); } @@ -56,7 +56,7 @@ export class PanaceaClient extends StargateClient { topicName: topicName, writerAddress: writerAddress }); - return resp.Writer ?? null; + return resp.writer ?? null; } catch (error) { if (rpcErrMsgNotFound.test(error)) { return null; @@ -65,7 +65,7 @@ export class PanaceaClient extends StargateClient { } } - async getWriters(ownerAddress: string, topicName: string, pageRequest?: PageRequest): Promise { + async getWriters(ownerAddress: string, topicName: string, pageRequest?: PageRequest): Promise { const queryService = new AolQueryClientImpl(createProtobufRpcClient(this.forceGetQueryClient())); return await queryService.Writers({ownerAddress: ownerAddress, topicName: topicName, pagination: pageRequest}); } @@ -74,7 +74,7 @@ export class PanaceaClient extends StargateClient { const queryService = new AolQueryClientImpl(createProtobufRpcClient(this.forceGetQueryClient())); try { const resp = await queryService.Record({ownerAddress: ownerAddress, topicName: topicName, offset: offset}) - return resp.Record ?? null; + return resp.record ?? null; } catch (error) { if (rpcErrMsgNotFound.test(error)) { return null; diff --git a/src/proto/google/protobuf/descriptor.ts b/src/proto/google/protobuf/descriptor.ts index 2c1f088..da64f98 100644 --- a/src/proto/google/protobuf/descriptor.ts +++ b/src/proto/google/protobuf/descriptor.ts @@ -435,18 +435,18 @@ export interface FileOptions { */ javaPackage: string; /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. + * If set, all the classes from the .proto file are wrapped in a single + * outer class with the given name. This applies to both Proto1 + * (equivalent to the old "--one_java_file" option) and Proto2 (where + * a .proto always translates to a single class, but you may want to + * explicitly choose the class name). */ javaOuterClassname: string; /** - * If enabled, then the Java code generator will generate a separate .java + * If set true, then the Java code generator will generate a separate .java * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be + * file. Thus, these types will *not* be nested inside the outer class + * named by java_outer_classname. However, the outer class will still be * generated to contain the file's getDescriptor() method as well as any * top-level extensions defined in the file. */ diff --git a/src/proto/panacea/aol/v2/owner.ts b/src/proto/panacea/aol/v2/owner.ts index e07bed1..4d5cc65 100644 --- a/src/proto/panacea/aol/v2/owner.ts +++ b/src/proto/panacea/aol/v2/owner.ts @@ -4,6 +4,7 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.aol.v2"; +/** Owner defines a owner type. */ export interface Owner { totalTopics: Long; } diff --git a/src/proto/panacea/aol/v2/query.ts b/src/proto/panacea/aol/v2/query.ts index 52b46eb..a457180 100644 --- a/src/proto/panacea/aol/v2/query.ts +++ b/src/proto/panacea/aol/v2/query.ts @@ -11,62 +11,71 @@ import { Record } from "../../../panacea/aol/v2/record"; export const protobufPackage = "panacea.aol.v2"; -/** this line is used by starport scaffolding # 3 */ -export interface QueryGetTopicRequest { +/** QueryTopicRequest is the request type for the Query/Topic RPC method. */ +export interface QueryTopicRequest { ownerAddress: string; topicName: string; } -export interface QueryGetTopicResponse { - Topic: Topic | undefined; +/** QueryTopicResponse is the response type for the Query/Topic RPC method. */ +export interface QueryTopicResponse { + topic: Topic | undefined; } -export interface QueryListTopicsRequest { +/** QueryTopicsRequest is the request type for the Query/Topics RPC method. */ +export interface QueryTopicsRequest { ownerAddress: string; pagination: PageRequest | undefined; } -export interface QueryListTopicsResponse { +/** QueryTopicsResponse is the response type for the Query/Topics RPC method. */ +export interface QueryTopicsResponse { topicNames: string[]; pagination: PageResponse | undefined; } -export interface QueryGetWriterRequest { +/** QueryWriterRequest is the request type for the Query/Writer RPC method. */ +export interface QueryWriterRequest { ownerAddress: string; topicName: string; writerAddress: string; } -export interface QueryGetWriterResponse { - Writer: Writer | undefined; +/** QueryWriterResponse is the response type for the Query/Writer RPC method. */ +export interface QueryWriterResponse { + writer: Writer | undefined; } -export interface QueryListWritersRequest { +/** QueryWritersRequest is the request type for the Query/Writers RPC method. */ +export interface QueryWritersRequest { ownerAddress: string; topicName: string; pagination: PageRequest | undefined; } -export interface QueryListWritersResponse { +/** QueryWritersResponse is the response type for the Query/Writers RPC method. */ +export interface QueryWritersResponse { writerAddresses: string[]; pagination: PageResponse | undefined; } -export interface QueryGetRecordRequest { +/** QueryRecordRequest is the request type for the Query/Record RPC method. */ +export interface QueryRecordRequest { ownerAddress: string; topicName: string; offset: Long; } -export interface QueryGetRecordResponse { - Record: Record | undefined; +/** QueryRecordResponse is the response type for the Query/Record RPC method. */ +export interface QueryRecordResponse { + record: Record | undefined; } -const baseQueryGetTopicRequest: object = { ownerAddress: "", topicName: "" }; +const baseQueryTopicRequest: object = { ownerAddress: "", topicName: "" }; -export const QueryGetTopicRequest = { +export const QueryTopicRequest = { encode( - message: QueryGetTopicRequest, + message: QueryTopicRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ownerAddress !== "") { @@ -78,13 +87,10 @@ export const QueryGetTopicRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetTopicRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTopicRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTopicRequest } as QueryGetTopicRequest; + const message = { ...baseQueryTopicRequest } as QueryTopicRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -102,8 +108,8 @@ export const QueryGetTopicRequest = { return message; }, - fromJSON(object: any): QueryGetTopicRequest { - const message = { ...baseQueryGetTopicRequest } as QueryGetTopicRequest; + fromJSON(object: any): QueryTopicRequest { + const message = { ...baseQueryTopicRequest } as QueryTopicRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = String(object.ownerAddress); } else { @@ -117,7 +123,7 @@ export const QueryGetTopicRequest = { return message; }, - toJSON(message: QueryGetTopicRequest): unknown { + toJSON(message: QueryTopicRequest): unknown { const obj: any = {}; message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress); @@ -125,8 +131,8 @@ export const QueryGetTopicRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryGetTopicRequest { - const message = { ...baseQueryGetTopicRequest } as QueryGetTopicRequest; + fromPartial(object: DeepPartial): QueryTopicRequest { + const message = { ...baseQueryTopicRequest } as QueryTopicRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = object.ownerAddress; } else { @@ -141,31 +147,28 @@ export const QueryGetTopicRequest = { }, }; -const baseQueryGetTopicResponse: object = {}; +const baseQueryTopicResponse: object = {}; -export const QueryGetTopicResponse = { +export const QueryTopicResponse = { encode( - message: QueryGetTopicResponse, + message: QueryTopicResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.Topic !== undefined) { - Topic.encode(message.Topic, writer.uint32(10).fork()).ldelim(); + if (message.topic !== undefined) { + Topic.encode(message.topic, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetTopicResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTopicResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTopicResponse } as QueryGetTopicResponse; + const message = { ...baseQueryTopicResponse } as QueryTopicResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Topic = Topic.decode(reader, reader.uint32()); + message.topic = Topic.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -175,41 +178,39 @@ export const QueryGetTopicResponse = { return message; }, - fromJSON(object: any): QueryGetTopicResponse { - const message = { ...baseQueryGetTopicResponse } as QueryGetTopicResponse; - if (object.Topic !== undefined && object.Topic !== null) { - message.Topic = Topic.fromJSON(object.Topic); + fromJSON(object: any): QueryTopicResponse { + const message = { ...baseQueryTopicResponse } as QueryTopicResponse; + if (object.topic !== undefined && object.topic !== null) { + message.topic = Topic.fromJSON(object.topic); } else { - message.Topic = undefined; + message.topic = undefined; } return message; }, - toJSON(message: QueryGetTopicResponse): unknown { + toJSON(message: QueryTopicResponse): unknown { const obj: any = {}; - message.Topic !== undefined && - (obj.Topic = message.Topic ? Topic.toJSON(message.Topic) : undefined); + message.topic !== undefined && + (obj.topic = message.topic ? Topic.toJSON(message.topic) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetTopicResponse { - const message = { ...baseQueryGetTopicResponse } as QueryGetTopicResponse; - if (object.Topic !== undefined && object.Topic !== null) { - message.Topic = Topic.fromPartial(object.Topic); + fromPartial(object: DeepPartial): QueryTopicResponse { + const message = { ...baseQueryTopicResponse } as QueryTopicResponse; + if (object.topic !== undefined && object.topic !== null) { + message.topic = Topic.fromPartial(object.topic); } else { - message.Topic = undefined; + message.topic = undefined; } return message; }, }; -const baseQueryListTopicsRequest: object = { ownerAddress: "" }; +const baseQueryTopicsRequest: object = { ownerAddress: "" }; -export const QueryListTopicsRequest = { +export const QueryTopicsRequest = { encode( - message: QueryListTopicsRequest, + message: QueryTopicsRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ownerAddress !== "") { @@ -221,13 +222,10 @@ export const QueryListTopicsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryListTopicsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTopicsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryListTopicsRequest } as QueryListTopicsRequest; + const message = { ...baseQueryTopicsRequest } as QueryTopicsRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -245,8 +243,8 @@ export const QueryListTopicsRequest = { return message; }, - fromJSON(object: any): QueryListTopicsRequest { - const message = { ...baseQueryListTopicsRequest } as QueryListTopicsRequest; + fromJSON(object: any): QueryTopicsRequest { + const message = { ...baseQueryTopicsRequest } as QueryTopicsRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = String(object.ownerAddress); } else { @@ -260,7 +258,7 @@ export const QueryListTopicsRequest = { return message; }, - toJSON(message: QueryListTopicsRequest): unknown { + toJSON(message: QueryTopicsRequest): unknown { const obj: any = {}; message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress); @@ -271,10 +269,8 @@ export const QueryListTopicsRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryListTopicsRequest { - const message = { ...baseQueryListTopicsRequest } as QueryListTopicsRequest; + fromPartial(object: DeepPartial): QueryTopicsRequest { + const message = { ...baseQueryTopicsRequest } as QueryTopicsRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = object.ownerAddress; } else { @@ -289,11 +285,11 @@ export const QueryListTopicsRequest = { }, }; -const baseQueryListTopicsResponse: object = { topicNames: "" }; +const baseQueryTopicsResponse: object = { topicNames: "" }; -export const QueryListTopicsResponse = { +export const QueryTopicsResponse = { encode( - message: QueryListTopicsResponse, + message: QueryTopicsResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.topicNames) { @@ -308,15 +304,10 @@ export const QueryListTopicsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryListTopicsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTopicsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryListTopicsResponse, - } as QueryListTopicsResponse; + const message = { ...baseQueryTopicsResponse } as QueryTopicsResponse; message.topicNames = []; while (reader.pos < end) { const tag = reader.uint32(); @@ -335,10 +326,8 @@ export const QueryListTopicsResponse = { return message; }, - fromJSON(object: any): QueryListTopicsResponse { - const message = { - ...baseQueryListTopicsResponse, - } as QueryListTopicsResponse; + fromJSON(object: any): QueryTopicsResponse { + const message = { ...baseQueryTopicsResponse } as QueryTopicsResponse; message.topicNames = []; if (object.topicNames !== undefined && object.topicNames !== null) { for (const e of object.topicNames) { @@ -353,7 +342,7 @@ export const QueryListTopicsResponse = { return message; }, - toJSON(message: QueryListTopicsResponse): unknown { + toJSON(message: QueryTopicsResponse): unknown { const obj: any = {}; if (message.topicNames) { obj.topicNames = message.topicNames.map((e) => e); @@ -367,12 +356,8 @@ export const QueryListTopicsResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryListTopicsResponse { - const message = { - ...baseQueryListTopicsResponse, - } as QueryListTopicsResponse; + fromPartial(object: DeepPartial): QueryTopicsResponse { + const message = { ...baseQueryTopicsResponse } as QueryTopicsResponse; message.topicNames = []; if (object.topicNames !== undefined && object.topicNames !== null) { for (const e of object.topicNames) { @@ -388,15 +373,15 @@ export const QueryListTopicsResponse = { }, }; -const baseQueryGetWriterRequest: object = { +const baseQueryWriterRequest: object = { ownerAddress: "", topicName: "", writerAddress: "", }; -export const QueryGetWriterRequest = { +export const QueryWriterRequest = { encode( - message: QueryGetWriterRequest, + message: QueryWriterRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ownerAddress !== "") { @@ -411,13 +396,10 @@ export const QueryGetWriterRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetWriterRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryWriterRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetWriterRequest } as QueryGetWriterRequest; + const message = { ...baseQueryWriterRequest } as QueryWriterRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -438,8 +420,8 @@ export const QueryGetWriterRequest = { return message; }, - fromJSON(object: any): QueryGetWriterRequest { - const message = { ...baseQueryGetWriterRequest } as QueryGetWriterRequest; + fromJSON(object: any): QueryWriterRequest { + const message = { ...baseQueryWriterRequest } as QueryWriterRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = String(object.ownerAddress); } else { @@ -458,7 +440,7 @@ export const QueryGetWriterRequest = { return message; }, - toJSON(message: QueryGetWriterRequest): unknown { + toJSON(message: QueryWriterRequest): unknown { const obj: any = {}; message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress); @@ -468,10 +450,8 @@ export const QueryGetWriterRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetWriterRequest { - const message = { ...baseQueryGetWriterRequest } as QueryGetWriterRequest; + fromPartial(object: DeepPartial): QueryWriterRequest { + const message = { ...baseQueryWriterRequest } as QueryWriterRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = object.ownerAddress; } else { @@ -491,31 +471,28 @@ export const QueryGetWriterRequest = { }, }; -const baseQueryGetWriterResponse: object = {}; +const baseQueryWriterResponse: object = {}; -export const QueryGetWriterResponse = { +export const QueryWriterResponse = { encode( - message: QueryGetWriterResponse, + message: QueryWriterResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.Writer !== undefined) { - Writer.encode(message.Writer, writer.uint32(10).fork()).ldelim(); + if (message.writer !== undefined) { + Writer.encode(message.writer, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetWriterResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryWriterResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetWriterResponse } as QueryGetWriterResponse; + const message = { ...baseQueryWriterResponse } as QueryWriterResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Writer = Writer.decode(reader, reader.uint32()); + message.writer = Writer.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -525,41 +502,39 @@ export const QueryGetWriterResponse = { return message; }, - fromJSON(object: any): QueryGetWriterResponse { - const message = { ...baseQueryGetWriterResponse } as QueryGetWriterResponse; - if (object.Writer !== undefined && object.Writer !== null) { - message.Writer = Writer.fromJSON(object.Writer); + fromJSON(object: any): QueryWriterResponse { + const message = { ...baseQueryWriterResponse } as QueryWriterResponse; + if (object.writer !== undefined && object.writer !== null) { + message.writer = Writer.fromJSON(object.writer); } else { - message.Writer = undefined; + message.writer = undefined; } return message; }, - toJSON(message: QueryGetWriterResponse): unknown { + toJSON(message: QueryWriterResponse): unknown { const obj: any = {}; - message.Writer !== undefined && - (obj.Writer = message.Writer ? Writer.toJSON(message.Writer) : undefined); + message.writer !== undefined && + (obj.writer = message.writer ? Writer.toJSON(message.writer) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetWriterResponse { - const message = { ...baseQueryGetWriterResponse } as QueryGetWriterResponse; - if (object.Writer !== undefined && object.Writer !== null) { - message.Writer = Writer.fromPartial(object.Writer); + fromPartial(object: DeepPartial): QueryWriterResponse { + const message = { ...baseQueryWriterResponse } as QueryWriterResponse; + if (object.writer !== undefined && object.writer !== null) { + message.writer = Writer.fromPartial(object.writer); } else { - message.Writer = undefined; + message.writer = undefined; } return message; }, }; -const baseQueryListWritersRequest: object = { ownerAddress: "", topicName: "" }; +const baseQueryWritersRequest: object = { ownerAddress: "", topicName: "" }; -export const QueryListWritersRequest = { +export const QueryWritersRequest = { encode( - message: QueryListWritersRequest, + message: QueryWritersRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ownerAddress !== "") { @@ -574,15 +549,10 @@ export const QueryListWritersRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryListWritersRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryWritersRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryListWritersRequest, - } as QueryListWritersRequest; + const message = { ...baseQueryWritersRequest } as QueryWritersRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -603,10 +573,8 @@ export const QueryListWritersRequest = { return message; }, - fromJSON(object: any): QueryListWritersRequest { - const message = { - ...baseQueryListWritersRequest, - } as QueryListWritersRequest; + fromJSON(object: any): QueryWritersRequest { + const message = { ...baseQueryWritersRequest } as QueryWritersRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = String(object.ownerAddress); } else { @@ -625,7 +593,7 @@ export const QueryListWritersRequest = { return message; }, - toJSON(message: QueryListWritersRequest): unknown { + toJSON(message: QueryWritersRequest): unknown { const obj: any = {}; message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress); @@ -637,12 +605,8 @@ export const QueryListWritersRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryListWritersRequest { - const message = { - ...baseQueryListWritersRequest, - } as QueryListWritersRequest; + fromPartial(object: DeepPartial): QueryWritersRequest { + const message = { ...baseQueryWritersRequest } as QueryWritersRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = object.ownerAddress; } else { @@ -662,11 +626,11 @@ export const QueryListWritersRequest = { }, }; -const baseQueryListWritersResponse: object = { writerAddresses: "" }; +const baseQueryWritersResponse: object = { writerAddresses: "" }; -export const QueryListWritersResponse = { +export const QueryWritersResponse = { encode( - message: QueryListWritersResponse, + message: QueryWritersResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.writerAddresses) { @@ -684,12 +648,10 @@ export const QueryListWritersResponse = { decode( input: _m0.Reader | Uint8Array, length?: number - ): QueryListWritersResponse { + ): QueryWritersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { - ...baseQueryListWritersResponse, - } as QueryListWritersResponse; + const message = { ...baseQueryWritersResponse } as QueryWritersResponse; message.writerAddresses = []; while (reader.pos < end) { const tag = reader.uint32(); @@ -708,10 +670,8 @@ export const QueryListWritersResponse = { return message; }, - fromJSON(object: any): QueryListWritersResponse { - const message = { - ...baseQueryListWritersResponse, - } as QueryListWritersResponse; + fromJSON(object: any): QueryWritersResponse { + const message = { ...baseQueryWritersResponse } as QueryWritersResponse; message.writerAddresses = []; if ( object.writerAddresses !== undefined && @@ -729,7 +689,7 @@ export const QueryListWritersResponse = { return message; }, - toJSON(message: QueryListWritersResponse): unknown { + toJSON(message: QueryWritersResponse): unknown { const obj: any = {}; if (message.writerAddresses) { obj.writerAddresses = message.writerAddresses.map((e) => e); @@ -743,12 +703,8 @@ export const QueryListWritersResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryListWritersResponse { - const message = { - ...baseQueryListWritersResponse, - } as QueryListWritersResponse; + fromPartial(object: DeepPartial): QueryWritersResponse { + const message = { ...baseQueryWritersResponse } as QueryWritersResponse; message.writerAddresses = []; if ( object.writerAddresses !== undefined && @@ -767,15 +723,15 @@ export const QueryListWritersResponse = { }, }; -const baseQueryGetRecordRequest: object = { +const baseQueryRecordRequest: object = { ownerAddress: "", topicName: "", offset: Long.UZERO, }; -export const QueryGetRecordRequest = { +export const QueryRecordRequest = { encode( - message: QueryGetRecordRequest, + message: QueryRecordRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.ownerAddress !== "") { @@ -790,13 +746,10 @@ export const QueryGetRecordRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetRecordRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryRecordRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetRecordRequest } as QueryGetRecordRequest; + const message = { ...baseQueryRecordRequest } as QueryRecordRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -817,8 +770,8 @@ export const QueryGetRecordRequest = { return message; }, - fromJSON(object: any): QueryGetRecordRequest { - const message = { ...baseQueryGetRecordRequest } as QueryGetRecordRequest; + fromJSON(object: any): QueryRecordRequest { + const message = { ...baseQueryRecordRequest } as QueryRecordRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = String(object.ownerAddress); } else { @@ -837,7 +790,7 @@ export const QueryGetRecordRequest = { return message; }, - toJSON(message: QueryGetRecordRequest): unknown { + toJSON(message: QueryRecordRequest): unknown { const obj: any = {}; message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress); @@ -847,10 +800,8 @@ export const QueryGetRecordRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetRecordRequest { - const message = { ...baseQueryGetRecordRequest } as QueryGetRecordRequest; + fromPartial(object: DeepPartial): QueryRecordRequest { + const message = { ...baseQueryRecordRequest } as QueryRecordRequest; if (object.ownerAddress !== undefined && object.ownerAddress !== null) { message.ownerAddress = object.ownerAddress; } else { @@ -870,31 +821,28 @@ export const QueryGetRecordRequest = { }, }; -const baseQueryGetRecordResponse: object = {}; +const baseQueryRecordResponse: object = {}; -export const QueryGetRecordResponse = { +export const QueryRecordResponse = { encode( - message: QueryGetRecordResponse, + message: QueryRecordResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.Record !== undefined) { - Record.encode(message.Record, writer.uint32(10).fork()).ldelim(); + if (message.record !== undefined) { + Record.encode(message.record, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetRecordResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryRecordResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetRecordResponse } as QueryGetRecordResponse; + const message = { ...baseQueryRecordResponse } as QueryRecordResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Record = Record.decode(reader, reader.uint32()); + message.record = Record.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -904,31 +852,29 @@ export const QueryGetRecordResponse = { return message; }, - fromJSON(object: any): QueryGetRecordResponse { - const message = { ...baseQueryGetRecordResponse } as QueryGetRecordResponse; - if (object.Record !== undefined && object.Record !== null) { - message.Record = Record.fromJSON(object.Record); + fromJSON(object: any): QueryRecordResponse { + const message = { ...baseQueryRecordResponse } as QueryRecordResponse; + if (object.record !== undefined && object.record !== null) { + message.record = Record.fromJSON(object.record); } else { - message.Record = undefined; + message.record = undefined; } return message; }, - toJSON(message: QueryGetRecordResponse): unknown { + toJSON(message: QueryRecordResponse): unknown { const obj: any = {}; - message.Record !== undefined && - (obj.Record = message.Record ? Record.toJSON(message.Record) : undefined); + message.record !== undefined && + (obj.record = message.record ? Record.toJSON(message.record) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetRecordResponse { - const message = { ...baseQueryGetRecordResponse } as QueryGetRecordResponse; - if (object.Record !== undefined && object.Record !== null) { - message.Record = Record.fromPartial(object.Record); + fromPartial(object: DeepPartial): QueryRecordResponse { + const message = { ...baseQueryRecordResponse } as QueryRecordResponse; + if (object.record !== undefined && object.record !== null) { + message.record = Record.fromPartial(object.record); } else { - message.Record = undefined; + message.record = undefined; } return message; }, @@ -936,11 +882,16 @@ export const QueryGetRecordResponse = { /** Query defines the gRPC querier service. */ export interface Query { - Topic(request: QueryGetTopicRequest): Promise; - Topics(request: QueryListTopicsRequest): Promise; - Writer(request: QueryGetWriterRequest): Promise; - Writers(request: QueryListWritersRequest): Promise; - Record(request: QueryGetRecordRequest): Promise; + /** Topic returns topic details. */ + Topic(request: QueryTopicRequest): Promise; + /** Topics returns topic names. */ + Topics(request: QueryTopicsRequest): Promise; + /** Writer returns writer details. */ + Writer(request: QueryWriterRequest): Promise; + /** Writers returns writer addresses. */ + Writers(request: QueryWritersRequest): Promise; + /** Record returns record details. */ + Record(request: QueryRecordRequest): Promise; } export class QueryClientImpl implements Query { @@ -953,43 +904,43 @@ export class QueryClientImpl implements Query { this.Writers = this.Writers.bind(this); this.Record = this.Record.bind(this); } - Topic(request: QueryGetTopicRequest): Promise { - const data = QueryGetTopicRequest.encode(request).finish(); + Topic(request: QueryTopicRequest): Promise { + const data = QueryTopicRequest.encode(request).finish(); const promise = this.rpc.request("panacea.aol.v2.Query", "Topic", data); return promise.then((data) => - QueryGetTopicResponse.decode(new _m0.Reader(data)) + QueryTopicResponse.decode(new _m0.Reader(data)) ); } - Topics(request: QueryListTopicsRequest): Promise { - const data = QueryListTopicsRequest.encode(request).finish(); + Topics(request: QueryTopicsRequest): Promise { + const data = QueryTopicsRequest.encode(request).finish(); const promise = this.rpc.request("panacea.aol.v2.Query", "Topics", data); return promise.then((data) => - QueryListTopicsResponse.decode(new _m0.Reader(data)) + QueryTopicsResponse.decode(new _m0.Reader(data)) ); } - Writer(request: QueryGetWriterRequest): Promise { - const data = QueryGetWriterRequest.encode(request).finish(); + Writer(request: QueryWriterRequest): Promise { + const data = QueryWriterRequest.encode(request).finish(); const promise = this.rpc.request("panacea.aol.v2.Query", "Writer", data); return promise.then((data) => - QueryGetWriterResponse.decode(new _m0.Reader(data)) + QueryWriterResponse.decode(new _m0.Reader(data)) ); } - Writers(request: QueryListWritersRequest): Promise { - const data = QueryListWritersRequest.encode(request).finish(); + Writers(request: QueryWritersRequest): Promise { + const data = QueryWritersRequest.encode(request).finish(); const promise = this.rpc.request("panacea.aol.v2.Query", "Writers", data); return promise.then((data) => - QueryListWritersResponse.decode(new _m0.Reader(data)) + QueryWritersResponse.decode(new _m0.Reader(data)) ); } - Record(request: QueryGetRecordRequest): Promise { - const data = QueryGetRecordRequest.encode(request).finish(); + Record(request: QueryRecordRequest): Promise { + const data = QueryRecordRequest.encode(request).finish(); const promise = this.rpc.request("panacea.aol.v2.Query", "Record", data); return promise.then((data) => - QueryGetRecordResponse.decode(new _m0.Reader(data)) + QueryRecordResponse.decode(new _m0.Reader(data)) ); } } diff --git a/src/proto/panacea/aol/v2/record.ts b/src/proto/panacea/aol/v2/record.ts index db2859e..73f6c6a 100644 --- a/src/proto/panacea/aol/v2/record.ts +++ b/src/proto/panacea/aol/v2/record.ts @@ -4,6 +4,7 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.aol.v2"; +/** Record defines a record type. */ export interface Record { key: Uint8Array; value: Uint8Array; diff --git a/src/proto/panacea/aol/v2/topic.ts b/src/proto/panacea/aol/v2/topic.ts index 177f62d..1e0c9a6 100644 --- a/src/proto/panacea/aol/v2/topic.ts +++ b/src/proto/panacea/aol/v2/topic.ts @@ -4,6 +4,7 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.aol.v2"; +/** Topic defines a topic type. */ export interface Topic { description: string; totalRecords: Long; diff --git a/src/proto/panacea/aol/v2/tx.ts b/src/proto/panacea/aol/v2/tx.ts index 8cdc87c..36a3e68 100644 --- a/src/proto/panacea/aol/v2/tx.ts +++ b/src/proto/panacea/aol/v2/tx.ts @@ -4,14 +4,17 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.aol.v2"; +/** MsgCreateTopic defines the Msg/CreateTopic request type. */ export interface MsgCreateTopic { topicName: string; description: string; ownerAddress: string; } +/** MsgCreateTopicResponse defines the Msg/CreateTopic response type. */ export interface MsgCreateTopicResponse {} +/** MsgAddWriter defines the Msg/AddWriter request type. */ export interface MsgAddWriter { topicName: string; moniker: string; @@ -20,16 +23,20 @@ export interface MsgAddWriter { ownerAddress: string; } +/** MsgAddWriter defines the Msg/AddWriter response type. */ export interface MsgAddWriterResponse {} +/** MsgDeleteWriter defines the Msg/DeleteWriter request type. */ export interface MsgDeleteWriter { topicName: string; writerAddress: string; ownerAddress: string; } +/** MsgDeleteWriter defines the Msg/DeleteWriter response type. */ export interface MsgDeleteWriterResponse {} +/** MsgAddRecord defines the Msg/AddRecord request type. */ export interface MsgAddRecord { topicName: string; key: Uint8Array; @@ -39,6 +46,7 @@ export interface MsgAddRecord { feePayerAddress: string; } +/** MsgAddRecordResponse defines the Msg/AddRecordResponse response type. */ export interface MsgAddRecordResponse { ownerAddress: string; topicName: string; @@ -782,9 +790,13 @@ export const MsgAddRecordResponse = { /** Msg defines the Msg service. */ export interface Msg { + /** CreateTopic defines a method for creating a topic. */ CreateTopic(request: MsgCreateTopic): Promise; + /** AddWriter defines a method for adding a writer to the topic. */ AddWriter(request: MsgAddWriter): Promise; + /** DeleteWriter defines a method for deleting a writer to the topic. */ DeleteWriter(request: MsgDeleteWriter): Promise; + /** AddRecord defines a method for adding a record to the topic with the writer. */ AddRecord(request: MsgAddRecord): Promise; } diff --git a/src/proto/panacea/aol/v2/writer.ts b/src/proto/panacea/aol/v2/writer.ts index 2ad9cc6..f9e8678 100644 --- a/src/proto/panacea/aol/v2/writer.ts +++ b/src/proto/panacea/aol/v2/writer.ts @@ -4,6 +4,7 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.aol.v2"; +/** Topic defines a topic type. */ export interface Writer { moniker: string; description: string; diff --git a/src/proto/panacea/did/v2/did.ts b/src/proto/panacea/did/v2/did.ts index 0a954cb..a9c9401 100644 --- a/src/proto/panacea/did/v2/did.ts +++ b/src/proto/panacea/did/v2/did.ts @@ -4,15 +4,23 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "panacea.did.v2"; +/** Strings defines a JSON-LD string array format which is marshalled to a single string if the array length is 1. */ export interface Strings { values: string[]; } +/** + * DIDDocument defines a W3C DID Document + * + * NOTE: All 'json_name' and 'gogoproto.customtype' tags are for panacea-core to unmarshal the v1.3 genesis which is in the W3C JSON-LD format. + * On the other hand, the panacea-core and cosmos-sdk don't use those tags to marshal result to JSON (via grpc-gateway). + */ export interface DIDDocument { contexts: Strings | undefined; - ID: string; + id: string; controller: Strings | undefined; verificationMethods: VerificationMethod[]; + /** TODO: the repeated gogoproto.customtype has an issue: https://github.com/gogo/protobuf/issues/478 */ authentications: VerificationRelationship[]; assertionMethods: VerificationRelationship[]; keyAgreements: VerificationRelationship[]; @@ -21,27 +29,37 @@ export interface DIDDocument { services: Service[]; } +/** VerificationMethod defines a W3C verification method */ export interface VerificationMethod { - ID: string; + id: string; type: string; controller: string; - pubKeyBase58: string; + publicKeyBase58: string; } +/** VerificationRelationship defines a W3C verification relationship */ export interface VerificationRelationship { - verificationMethodID: string; - dedicatedVerificationMethod: VerificationMethod | undefined; + verificationMethodId: string | undefined; + verificationMethod: VerificationMethod | undefined; } +/** Service defines a service in the W3C DID Document. */ export interface Service { - ID: string; + id: string; type: string; serviceEndpoint: string; } +/** DIDDocumentWithSeq defines a message for DID Document with a sequence number for preventing replay attacks. */ export interface DIDDocumentWithSeq { document: DIDDocument | undefined; - seq: Long; + sequence: Long; +} + +/** DataWithSeq defines a message for data with a sequence number for preventing replay attacks. */ +export interface DataWithSeq { + data: Uint8Array; + sequence: Long; } const baseStrings: object = { values: "" }; @@ -109,7 +127,7 @@ export const Strings = { }, }; -const baseDIDDocument: object = { ID: "" }; +const baseDIDDocument: object = { id: "" }; export const DIDDocument = { encode( @@ -119,8 +137,8 @@ export const DIDDocument = { if (message.contexts !== undefined) { Strings.encode(message.contexts, writer.uint32(10).fork()).ldelim(); } - if (message.ID !== "") { - writer.uint32(18).string(message.ID); + if (message.id !== "") { + writer.uint32(18).string(message.id); } if (message.controller !== undefined) { Strings.encode(message.controller, writer.uint32(26).fork()).ldelim(); @@ -167,7 +185,7 @@ export const DIDDocument = { message.contexts = Strings.decode(reader, reader.uint32()); break; case 2: - message.ID = reader.string(); + message.id = reader.string(); break; case 3: message.controller = Strings.decode(reader, reader.uint32()); @@ -227,10 +245,10 @@ export const DIDDocument = { } else { message.contexts = undefined; } - if (object.ID !== undefined && object.ID !== null) { - message.ID = String(object.ID); + if (object.id !== undefined && object.id !== null) { + message.id = String(object.id); } else { - message.ID = ""; + message.id = ""; } if (object.controller !== undefined && object.controller !== null) { message.controller = Strings.fromJSON(object.controller); @@ -300,7 +318,7 @@ export const DIDDocument = { (obj.contexts = message.contexts ? Strings.toJSON(message.contexts) : undefined); - message.ID !== undefined && (obj.ID = message.ID); + message.id !== undefined && (obj.id = message.id); message.controller !== undefined && (obj.controller = message.controller ? Strings.toJSON(message.controller) @@ -371,10 +389,10 @@ export const DIDDocument = { } else { message.contexts = undefined; } - if (object.ID !== undefined && object.ID !== null) { - message.ID = object.ID; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; } else { - message.ID = ""; + message.id = ""; } if (object.controller !== undefined && object.controller !== null) { message.controller = Strings.fromPartial(object.controller); @@ -440,10 +458,10 @@ export const DIDDocument = { }; const baseVerificationMethod: object = { - ID: "", + id: "", type: "", controller: "", - pubKeyBase58: "", + publicKeyBase58: "", }; export const VerificationMethod = { @@ -451,8 +469,8 @@ export const VerificationMethod = { message: VerificationMethod, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.ID !== "") { - writer.uint32(10).string(message.ID); + if (message.id !== "") { + writer.uint32(10).string(message.id); } if (message.type !== "") { writer.uint32(18).string(message.type); @@ -460,8 +478,8 @@ export const VerificationMethod = { if (message.controller !== "") { writer.uint32(26).string(message.controller); } - if (message.pubKeyBase58 !== "") { - writer.uint32(34).string(message.pubKeyBase58); + if (message.publicKeyBase58 !== "") { + writer.uint32(34).string(message.publicKeyBase58); } return writer; }, @@ -474,7 +492,7 @@ export const VerificationMethod = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ID = reader.string(); + message.id = reader.string(); break; case 2: message.type = reader.string(); @@ -483,7 +501,7 @@ export const VerificationMethod = { message.controller = reader.string(); break; case 4: - message.pubKeyBase58 = reader.string(); + message.publicKeyBase58 = reader.string(); break; default: reader.skipType(tag & 7); @@ -495,10 +513,10 @@ export const VerificationMethod = { fromJSON(object: any): VerificationMethod { const message = { ...baseVerificationMethod } as VerificationMethod; - if (object.ID !== undefined && object.ID !== null) { - message.ID = String(object.ID); + if (object.id !== undefined && object.id !== null) { + message.id = String(object.id); } else { - message.ID = ""; + message.id = ""; } if (object.type !== undefined && object.type !== null) { message.type = String(object.type); @@ -510,30 +528,33 @@ export const VerificationMethod = { } else { message.controller = ""; } - if (object.pubKeyBase58 !== undefined && object.pubKeyBase58 !== null) { - message.pubKeyBase58 = String(object.pubKeyBase58); + if ( + object.publicKeyBase58 !== undefined && + object.publicKeyBase58 !== null + ) { + message.publicKeyBase58 = String(object.publicKeyBase58); } else { - message.pubKeyBase58 = ""; + message.publicKeyBase58 = ""; } return message; }, toJSON(message: VerificationMethod): unknown { const obj: any = {}; - message.ID !== undefined && (obj.ID = message.ID); + message.id !== undefined && (obj.id = message.id); message.type !== undefined && (obj.type = message.type); message.controller !== undefined && (obj.controller = message.controller); - message.pubKeyBase58 !== undefined && - (obj.pubKeyBase58 = message.pubKeyBase58); + message.publicKeyBase58 !== undefined && + (obj.publicKeyBase58 = message.publicKeyBase58); return obj; }, fromPartial(object: DeepPartial): VerificationMethod { const message = { ...baseVerificationMethod } as VerificationMethod; - if (object.ID !== undefined && object.ID !== null) { - message.ID = object.ID; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; } else { - message.ID = ""; + message.id = ""; } if (object.type !== undefined && object.type !== null) { message.type = object.type; @@ -545,28 +566,31 @@ export const VerificationMethod = { } else { message.controller = ""; } - if (object.pubKeyBase58 !== undefined && object.pubKeyBase58 !== null) { - message.pubKeyBase58 = object.pubKeyBase58; + if ( + object.publicKeyBase58 !== undefined && + object.publicKeyBase58 !== null + ) { + message.publicKeyBase58 = object.publicKeyBase58; } else { - message.pubKeyBase58 = ""; + message.publicKeyBase58 = ""; } return message; }, }; -const baseVerificationRelationship: object = { verificationMethodID: "" }; +const baseVerificationRelationship: object = {}; export const VerificationRelationship = { encode( message: VerificationRelationship, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.verificationMethodID !== "") { - writer.uint32(10).string(message.verificationMethodID); + if (message.verificationMethodId !== undefined) { + writer.uint32(10).string(message.verificationMethodId); } - if (message.dedicatedVerificationMethod !== undefined) { + if (message.verificationMethod !== undefined) { VerificationMethod.encode( - message.dedicatedVerificationMethod, + message.verificationMethod, writer.uint32(18).fork() ).ldelim(); } @@ -586,10 +610,10 @@ export const VerificationRelationship = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.verificationMethodID = reader.string(); + message.verificationMethodId = reader.string(); break; case 2: - message.dedicatedVerificationMethod = VerificationMethod.decode( + message.verificationMethod = VerificationMethod.decode( reader, reader.uint32() ); @@ -607,33 +631,33 @@ export const VerificationRelationship = { ...baseVerificationRelationship, } as VerificationRelationship; if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = String(object.verificationMethodID); + message.verificationMethodId = String(object.verificationMethodId); } else { - message.verificationMethodID = ""; + message.verificationMethodId = undefined; } if ( - object.dedicatedVerificationMethod !== undefined && - object.dedicatedVerificationMethod !== null + object.verificationMethod !== undefined && + object.verificationMethod !== null ) { - message.dedicatedVerificationMethod = VerificationMethod.fromJSON( - object.dedicatedVerificationMethod + message.verificationMethod = VerificationMethod.fromJSON( + object.verificationMethod ); } else { - message.dedicatedVerificationMethod = undefined; + message.verificationMethod = undefined; } return message; }, toJSON(message: VerificationRelationship): unknown { const obj: any = {}; - message.verificationMethodID !== undefined && - (obj.verificationMethodID = message.verificationMethodID); - message.dedicatedVerificationMethod !== undefined && - (obj.dedicatedVerificationMethod = message.dedicatedVerificationMethod - ? VerificationMethod.toJSON(message.dedicatedVerificationMethod) + message.verificationMethodId !== undefined && + (obj.verificationMethodId = message.verificationMethodId); + message.verificationMethod !== undefined && + (obj.verificationMethod = message.verificationMethod + ? VerificationMethod.toJSON(message.verificationMethod) : undefined); return obj; }, @@ -645,36 +669,36 @@ export const VerificationRelationship = { ...baseVerificationRelationship, } as VerificationRelationship; if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = object.verificationMethodID; + message.verificationMethodId = object.verificationMethodId; } else { - message.verificationMethodID = ""; + message.verificationMethodId = undefined; } if ( - object.dedicatedVerificationMethod !== undefined && - object.dedicatedVerificationMethod !== null + object.verificationMethod !== undefined && + object.verificationMethod !== null ) { - message.dedicatedVerificationMethod = VerificationMethod.fromPartial( - object.dedicatedVerificationMethod + message.verificationMethod = VerificationMethod.fromPartial( + object.verificationMethod ); } else { - message.dedicatedVerificationMethod = undefined; + message.verificationMethod = undefined; } return message; }, }; -const baseService: object = { ID: "", type: "", serviceEndpoint: "" }; +const baseService: object = { id: "", type: "", serviceEndpoint: "" }; export const Service = { encode( message: Service, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.ID !== "") { - writer.uint32(10).string(message.ID); + if (message.id !== "") { + writer.uint32(10).string(message.id); } if (message.type !== "") { writer.uint32(18).string(message.type); @@ -693,7 +717,7 @@ export const Service = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.ID = reader.string(); + message.id = reader.string(); break; case 2: message.type = reader.string(); @@ -711,10 +735,10 @@ export const Service = { fromJSON(object: any): Service { const message = { ...baseService } as Service; - if (object.ID !== undefined && object.ID !== null) { - message.ID = String(object.ID); + if (object.id !== undefined && object.id !== null) { + message.id = String(object.id); } else { - message.ID = ""; + message.id = ""; } if (object.type !== undefined && object.type !== null) { message.type = String(object.type); @@ -734,7 +758,7 @@ export const Service = { toJSON(message: Service): unknown { const obj: any = {}; - message.ID !== undefined && (obj.ID = message.ID); + message.id !== undefined && (obj.id = message.id); message.type !== undefined && (obj.type = message.type); message.serviceEndpoint !== undefined && (obj.serviceEndpoint = message.serviceEndpoint); @@ -743,10 +767,10 @@ export const Service = { fromPartial(object: DeepPartial): Service { const message = { ...baseService } as Service; - if (object.ID !== undefined && object.ID !== null) { - message.ID = object.ID; + if (object.id !== undefined && object.id !== null) { + message.id = object.id; } else { - message.ID = ""; + message.id = ""; } if (object.type !== undefined && object.type !== null) { message.type = object.type; @@ -765,7 +789,7 @@ export const Service = { }, }; -const baseDIDDocumentWithSeq: object = { seq: Long.UZERO }; +const baseDIDDocumentWithSeq: object = { sequence: Long.UZERO }; export const DIDDocumentWithSeq = { encode( @@ -775,8 +799,8 @@ export const DIDDocumentWithSeq = { if (message.document !== undefined) { DIDDocument.encode(message.document, writer.uint32(10).fork()).ldelim(); } - if (!message.seq.isZero()) { - writer.uint32(16).uint64(message.seq); + if (!message.sequence.isZero()) { + writer.uint32(16).uint64(message.sequence); } return writer; }, @@ -792,7 +816,7 @@ export const DIDDocumentWithSeq = { message.document = DIDDocument.decode(reader, reader.uint32()); break; case 2: - message.seq = reader.uint64() as Long; + message.sequence = reader.uint64() as Long; break; default: reader.skipType(tag & 7); @@ -809,10 +833,10 @@ export const DIDDocumentWithSeq = { } else { message.document = undefined; } - if (object.seq !== undefined && object.seq !== null) { - message.seq = Long.fromString(object.seq); + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = Long.fromString(object.sequence); } else { - message.seq = Long.UZERO; + message.sequence = Long.UZERO; } return message; }, @@ -823,8 +847,8 @@ export const DIDDocumentWithSeq = { (obj.document = message.document ? DIDDocument.toJSON(message.document) : undefined); - message.seq !== undefined && - (obj.seq = (message.seq || Long.UZERO).toString()); + message.sequence !== undefined && + (obj.sequence = (message.sequence || Long.UZERO).toString()); return obj; }, @@ -835,15 +859,127 @@ export const DIDDocumentWithSeq = { } else { message.document = undefined; } - if (object.seq !== undefined && object.seq !== null) { - message.seq = object.seq as Long; + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = object.sequence as Long; + } else { + message.sequence = Long.UZERO; + } + return message; + }, +}; + +const baseDataWithSeq: object = { sequence: Long.UZERO }; + +export const DataWithSeq = { + encode( + message: DataWithSeq, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.data.length !== 0) { + writer.uint32(10).bytes(message.data); + } + if (!message.sequence.isZero()) { + writer.uint32(16).uint64(message.sequence); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DataWithSeq { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDataWithSeq } as DataWithSeq; + message.data = new Uint8Array(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.sequence = reader.uint64() as Long; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DataWithSeq { + const message = { ...baseDataWithSeq } as DataWithSeq; + message.data = new Uint8Array(); + if (object.data !== undefined && object.data !== null) { + message.data = bytesFromBase64(object.data); + } + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = Long.fromString(object.sequence); } else { - message.seq = Long.UZERO; + message.sequence = Long.UZERO; + } + return message; + }, + + toJSON(message: DataWithSeq): unknown { + const obj: any = {}; + message.data !== undefined && + (obj.data = base64FromBytes( + message.data !== undefined ? message.data : new Uint8Array() + )); + message.sequence !== undefined && + (obj.sequence = (message.sequence || Long.UZERO).toString()); + return obj; + }, + + fromPartial(object: DeepPartial): DataWithSeq { + const message = { ...baseDataWithSeq } as DataWithSeq; + if (object.data !== undefined && object.data !== null) { + message.data = object.data; + } else { + message.data = new Uint8Array(); + } + if (object.sequence !== undefined && object.sequence !== null) { + message.sequence = object.sequence as Long; + } else { + message.sequence = Long.UZERO; } return message; }, }; +declare var self: any | undefined; +declare var window: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (const byte of arr) { + bin.push(String.fromCharCode(byte)); + } + return btoa(bin.join("")); +} + type Builtin = | Date | Function diff --git a/src/proto/panacea/did/v2/query.ts b/src/proto/panacea/did/v2/query.ts index 5828e5b..d23ad62 100644 --- a/src/proto/panacea/did/v2/query.ts +++ b/src/proto/panacea/did/v2/query.ts @@ -5,37 +5,39 @@ import { DIDDocumentWithSeq } from "../../../panacea/did/v2/did"; export const protobufPackage = "panacea.did.v2"; -/** this line is used by starport scaffolding # 3 */ -export interface QueryGetDIDRequest { - DID: string; +/** QueryDIDRequest is the request type for the Query/DIDDocumentWithSeq RPC method. */ +export interface QueryDIDRequest { + /** NOTE: Using base64 due to the URI path cannot contain colons. */ + didBase64: string; } -export interface QueryGetDIDResponse { - DIDDocumentWithSeq: DIDDocumentWithSeq | undefined; +/** QueryDIDResponse is the response type for the Query/DIDDocumentWithSeq RPC method. */ +export interface QueryDIDResponse { + didDocumentWithSeq: DIDDocumentWithSeq | undefined; } -const baseQueryGetDIDRequest: object = { DID: "" }; +const baseQueryDIDRequest: object = { didBase64: "" }; -export const QueryGetDIDRequest = { +export const QueryDIDRequest = { encode( - message: QueryGetDIDRequest, + message: QueryDIDRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.DID !== "") { - writer.uint32(10).string(message.DID); + if (message.didBase64 !== "") { + writer.uint32(10).string(message.didBase64); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetDIDRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDIDRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetDIDRequest } as QueryGetDIDRequest; + const message = { ...baseQueryDIDRequest } as QueryDIDRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.DID = reader.string(); + message.didBase64 = reader.string(); break; default: reader.skipType(tag & 7); @@ -45,58 +47,58 @@ export const QueryGetDIDRequest = { return message; }, - fromJSON(object: any): QueryGetDIDRequest { - const message = { ...baseQueryGetDIDRequest } as QueryGetDIDRequest; - if (object.DID !== undefined && object.DID !== null) { - message.DID = String(object.DID); + fromJSON(object: any): QueryDIDRequest { + const message = { ...baseQueryDIDRequest } as QueryDIDRequest; + if (object.didBase64 !== undefined && object.didBase64 !== null) { + message.didBase64 = String(object.didBase64); } else { - message.DID = ""; + message.didBase64 = ""; } return message; }, - toJSON(message: QueryGetDIDRequest): unknown { + toJSON(message: QueryDIDRequest): unknown { const obj: any = {}; - message.DID !== undefined && (obj.DID = message.DID); + message.didBase64 !== undefined && (obj.didBase64 = message.didBase64); return obj; }, - fromPartial(object: DeepPartial): QueryGetDIDRequest { - const message = { ...baseQueryGetDIDRequest } as QueryGetDIDRequest; - if (object.DID !== undefined && object.DID !== null) { - message.DID = object.DID; + fromPartial(object: DeepPartial): QueryDIDRequest { + const message = { ...baseQueryDIDRequest } as QueryDIDRequest; + if (object.didBase64 !== undefined && object.didBase64 !== null) { + message.didBase64 = object.didBase64; } else { - message.DID = ""; + message.didBase64 = ""; } return message; }, }; -const baseQueryGetDIDResponse: object = {}; +const baseQueryDIDResponse: object = {}; -export const QueryGetDIDResponse = { +export const QueryDIDResponse = { encode( - message: QueryGetDIDResponse, + message: QueryDIDResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.DIDDocumentWithSeq !== undefined) { + if (message.didDocumentWithSeq !== undefined) { DIDDocumentWithSeq.encode( - message.DIDDocumentWithSeq, + message.didDocumentWithSeq, writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetDIDResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDIDResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetDIDResponse } as QueryGetDIDResponse; + const message = { ...baseQueryDIDResponse } as QueryDIDResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.DIDDocumentWithSeq = DIDDocumentWithSeq.decode( + message.didDocumentWithSeq = DIDDocumentWithSeq.decode( reader, reader.uint32() ); @@ -109,41 +111,41 @@ export const QueryGetDIDResponse = { return message; }, - fromJSON(object: any): QueryGetDIDResponse { - const message = { ...baseQueryGetDIDResponse } as QueryGetDIDResponse; + fromJSON(object: any): QueryDIDResponse { + const message = { ...baseQueryDIDResponse } as QueryDIDResponse; if ( - object.DIDDocumentWithSeq !== undefined && - object.DIDDocumentWithSeq !== null + object.didDocumentWithSeq !== undefined && + object.didDocumentWithSeq !== null ) { - message.DIDDocumentWithSeq = DIDDocumentWithSeq.fromJSON( - object.DIDDocumentWithSeq + message.didDocumentWithSeq = DIDDocumentWithSeq.fromJSON( + object.didDocumentWithSeq ); } else { - message.DIDDocumentWithSeq = undefined; + message.didDocumentWithSeq = undefined; } return message; }, - toJSON(message: QueryGetDIDResponse): unknown { + toJSON(message: QueryDIDResponse): unknown { const obj: any = {}; - message.DIDDocumentWithSeq !== undefined && - (obj.DIDDocumentWithSeq = message.DIDDocumentWithSeq - ? DIDDocumentWithSeq.toJSON(message.DIDDocumentWithSeq) + message.didDocumentWithSeq !== undefined && + (obj.didDocumentWithSeq = message.didDocumentWithSeq + ? DIDDocumentWithSeq.toJSON(message.didDocumentWithSeq) : undefined); return obj; }, - fromPartial(object: DeepPartial): QueryGetDIDResponse { - const message = { ...baseQueryGetDIDResponse } as QueryGetDIDResponse; + fromPartial(object: DeepPartial): QueryDIDResponse { + const message = { ...baseQueryDIDResponse } as QueryDIDResponse; if ( - object.DIDDocumentWithSeq !== undefined && - object.DIDDocumentWithSeq !== null + object.didDocumentWithSeq !== undefined && + object.didDocumentWithSeq !== null ) { - message.DIDDocumentWithSeq = DIDDocumentWithSeq.fromPartial( - object.DIDDocumentWithSeq + message.didDocumentWithSeq = DIDDocumentWithSeq.fromPartial( + object.didDocumentWithSeq ); } else { - message.DIDDocumentWithSeq = undefined; + message.didDocumentWithSeq = undefined; } return message; }, @@ -151,26 +153,21 @@ export const QueryGetDIDResponse = { /** Query defines the gRPC querier service. */ export interface Query { - DIDDocumentWithSeq(request: QueryGetDIDRequest): Promise; + /** DID returns a DID Document with a sequence number. */ + DID(request: QueryDIDRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; - this.DIDDocumentWithSeq = this.DIDDocumentWithSeq.bind(this); + this.DID = this.DID.bind(this); } - DIDDocumentWithSeq( - request: QueryGetDIDRequest - ): Promise { - const data = QueryGetDIDRequest.encode(request).finish(); - const promise = this.rpc.request( - "panacea.did.v2.Query", - "DIDDocumentWithSeq", - data - ); + DID(request: QueryDIDRequest): Promise { + const data = QueryDIDRequest.encode(request).finish(); + const promise = this.rpc.request("panacea.did.v2.Query", "DID", data); return promise.then((data) => - QueryGetDIDResponse.decode(new _m0.Reader(data)) + QueryDIDResponse.decode(new _m0.Reader(data)) ); } } diff --git a/src/proto/panacea/did/v2/tx.ts b/src/proto/panacea/did/v2/tx.ts index a9268f9..09f48cf 100644 --- a/src/proto/panacea/did/v2/tx.ts +++ b/src/proto/panacea/did/v2/tx.ts @@ -5,38 +5,44 @@ import { DIDDocument } from "../../../panacea/did/v2/did"; export const protobufPackage = "panacea.did.v2"; +/** MsgCreateDID defines the Msg/CreateDID request type. */ export interface MsgCreateDID { - DID: string; + did: string; document: DIDDocument | undefined; - verificationMethodID: string; + verificationMethodId: string; signature: Uint8Array; fromAddress: string; } +/** MsgCreateDIDResponse defines the Msg/CreateDID response type. */ export interface MsgCreateDIDResponse {} +/** MsgUpdateDID defines the Msg/UpdateDID request type. */ export interface MsgUpdateDID { - DID: string; + did: string; document: DIDDocument | undefined; - verificationMethodID: string; + verificationMethodId: string; signature: Uint8Array; fromAddress: string; } +/** MsgUpdateDIDResponse defines the Msg/UpdateDID response type. */ export interface MsgUpdateDIDResponse {} +/** MsgDeactivateDID defines the Msg/DeactivateDID request type. */ export interface MsgDeactivateDID { - DID: string; - verificationMethodID: string; + did: string; + verificationMethodId: string; signature: Uint8Array; fromAddress: string; } +/** MsgDeactivateDIDResponse defines the Msg/DeactivateDID response type. */ export interface MsgDeactivateDIDResponse {} const baseMsgCreateDID: object = { - DID: "", - verificationMethodID: "", + did: "", + verificationMethodId: "", fromAddress: "", }; @@ -45,14 +51,14 @@ export const MsgCreateDID = { message: MsgCreateDID, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.DID !== "") { - writer.uint32(10).string(message.DID); + if (message.did !== "") { + writer.uint32(10).string(message.did); } if (message.document !== undefined) { DIDDocument.encode(message.document, writer.uint32(18).fork()).ldelim(); } - if (message.verificationMethodID !== "") { - writer.uint32(26).string(message.verificationMethodID); + if (message.verificationMethodId !== "") { + writer.uint32(26).string(message.verificationMethodId); } if (message.signature.length !== 0) { writer.uint32(34).bytes(message.signature); @@ -72,13 +78,13 @@ export const MsgCreateDID = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.DID = reader.string(); + message.did = reader.string(); break; case 2: message.document = DIDDocument.decode(reader, reader.uint32()); break; case 3: - message.verificationMethodID = reader.string(); + message.verificationMethodId = reader.string(); break; case 4: message.signature = reader.bytes(); @@ -97,10 +103,10 @@ export const MsgCreateDID = { fromJSON(object: any): MsgCreateDID { const message = { ...baseMsgCreateDID } as MsgCreateDID; message.signature = new Uint8Array(); - if (object.DID !== undefined && object.DID !== null) { - message.DID = String(object.DID); + if (object.did !== undefined && object.did !== null) { + message.did = String(object.did); } else { - message.DID = ""; + message.did = ""; } if (object.document !== undefined && object.document !== null) { message.document = DIDDocument.fromJSON(object.document); @@ -108,12 +114,12 @@ export const MsgCreateDID = { message.document = undefined; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = String(object.verificationMethodID); + message.verificationMethodId = String(object.verificationMethodId); } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = bytesFromBase64(object.signature); @@ -128,13 +134,13 @@ export const MsgCreateDID = { toJSON(message: MsgCreateDID): unknown { const obj: any = {}; - message.DID !== undefined && (obj.DID = message.DID); + message.did !== undefined && (obj.did = message.did); message.document !== undefined && (obj.document = message.document ? DIDDocument.toJSON(message.document) : undefined); - message.verificationMethodID !== undefined && - (obj.verificationMethodID = message.verificationMethodID); + message.verificationMethodId !== undefined && + (obj.verificationMethodId = message.verificationMethodId); message.signature !== undefined && (obj.signature = base64FromBytes( message.signature !== undefined ? message.signature : new Uint8Array() @@ -146,10 +152,10 @@ export const MsgCreateDID = { fromPartial(object: DeepPartial): MsgCreateDID { const message = { ...baseMsgCreateDID } as MsgCreateDID; - if (object.DID !== undefined && object.DID !== null) { - message.DID = object.DID; + if (object.did !== undefined && object.did !== null) { + message.did = object.did; } else { - message.DID = ""; + message.did = ""; } if (object.document !== undefined && object.document !== null) { message.document = DIDDocument.fromPartial(object.document); @@ -157,12 +163,12 @@ export const MsgCreateDID = { message.document = undefined; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = object.verificationMethodID; + message.verificationMethodId = object.verificationMethodId; } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = object.signature; @@ -223,8 +229,8 @@ export const MsgCreateDIDResponse = { }; const baseMsgUpdateDID: object = { - DID: "", - verificationMethodID: "", + did: "", + verificationMethodId: "", fromAddress: "", }; @@ -233,14 +239,14 @@ export const MsgUpdateDID = { message: MsgUpdateDID, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.DID !== "") { - writer.uint32(10).string(message.DID); + if (message.did !== "") { + writer.uint32(10).string(message.did); } if (message.document !== undefined) { DIDDocument.encode(message.document, writer.uint32(18).fork()).ldelim(); } - if (message.verificationMethodID !== "") { - writer.uint32(26).string(message.verificationMethodID); + if (message.verificationMethodId !== "") { + writer.uint32(26).string(message.verificationMethodId); } if (message.signature.length !== 0) { writer.uint32(34).bytes(message.signature); @@ -260,13 +266,13 @@ export const MsgUpdateDID = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.DID = reader.string(); + message.did = reader.string(); break; case 2: message.document = DIDDocument.decode(reader, reader.uint32()); break; case 3: - message.verificationMethodID = reader.string(); + message.verificationMethodId = reader.string(); break; case 4: message.signature = reader.bytes(); @@ -285,10 +291,10 @@ export const MsgUpdateDID = { fromJSON(object: any): MsgUpdateDID { const message = { ...baseMsgUpdateDID } as MsgUpdateDID; message.signature = new Uint8Array(); - if (object.DID !== undefined && object.DID !== null) { - message.DID = String(object.DID); + if (object.did !== undefined && object.did !== null) { + message.did = String(object.did); } else { - message.DID = ""; + message.did = ""; } if (object.document !== undefined && object.document !== null) { message.document = DIDDocument.fromJSON(object.document); @@ -296,12 +302,12 @@ export const MsgUpdateDID = { message.document = undefined; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = String(object.verificationMethodID); + message.verificationMethodId = String(object.verificationMethodId); } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = bytesFromBase64(object.signature); @@ -316,13 +322,13 @@ export const MsgUpdateDID = { toJSON(message: MsgUpdateDID): unknown { const obj: any = {}; - message.DID !== undefined && (obj.DID = message.DID); + message.did !== undefined && (obj.did = message.did); message.document !== undefined && (obj.document = message.document ? DIDDocument.toJSON(message.document) : undefined); - message.verificationMethodID !== undefined && - (obj.verificationMethodID = message.verificationMethodID); + message.verificationMethodId !== undefined && + (obj.verificationMethodId = message.verificationMethodId); message.signature !== undefined && (obj.signature = base64FromBytes( message.signature !== undefined ? message.signature : new Uint8Array() @@ -334,10 +340,10 @@ export const MsgUpdateDID = { fromPartial(object: DeepPartial): MsgUpdateDID { const message = { ...baseMsgUpdateDID } as MsgUpdateDID; - if (object.DID !== undefined && object.DID !== null) { - message.DID = object.DID; + if (object.did !== undefined && object.did !== null) { + message.did = object.did; } else { - message.DID = ""; + message.did = ""; } if (object.document !== undefined && object.document !== null) { message.document = DIDDocument.fromPartial(object.document); @@ -345,12 +351,12 @@ export const MsgUpdateDID = { message.document = undefined; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = object.verificationMethodID; + message.verificationMethodId = object.verificationMethodId; } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = object.signature; @@ -411,8 +417,8 @@ export const MsgUpdateDIDResponse = { }; const baseMsgDeactivateDID: object = { - DID: "", - verificationMethodID: "", + did: "", + verificationMethodId: "", fromAddress: "", }; @@ -421,11 +427,11 @@ export const MsgDeactivateDID = { message: MsgDeactivateDID, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.DID !== "") { - writer.uint32(10).string(message.DID); + if (message.did !== "") { + writer.uint32(10).string(message.did); } - if (message.verificationMethodID !== "") { - writer.uint32(18).string(message.verificationMethodID); + if (message.verificationMethodId !== "") { + writer.uint32(18).string(message.verificationMethodId); } if (message.signature.length !== 0) { writer.uint32(26).bytes(message.signature); @@ -445,10 +451,10 @@ export const MsgDeactivateDID = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.DID = reader.string(); + message.did = reader.string(); break; case 2: - message.verificationMethodID = reader.string(); + message.verificationMethodId = reader.string(); break; case 3: message.signature = reader.bytes(); @@ -467,18 +473,18 @@ export const MsgDeactivateDID = { fromJSON(object: any): MsgDeactivateDID { const message = { ...baseMsgDeactivateDID } as MsgDeactivateDID; message.signature = new Uint8Array(); - if (object.DID !== undefined && object.DID !== null) { - message.DID = String(object.DID); + if (object.did !== undefined && object.did !== null) { + message.did = String(object.did); } else { - message.DID = ""; + message.did = ""; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = String(object.verificationMethodID); + message.verificationMethodId = String(object.verificationMethodId); } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = bytesFromBase64(object.signature); @@ -493,9 +499,9 @@ export const MsgDeactivateDID = { toJSON(message: MsgDeactivateDID): unknown { const obj: any = {}; - message.DID !== undefined && (obj.DID = message.DID); - message.verificationMethodID !== undefined && - (obj.verificationMethodID = message.verificationMethodID); + message.did !== undefined && (obj.did = message.did); + message.verificationMethodId !== undefined && + (obj.verificationMethodId = message.verificationMethodId); message.signature !== undefined && (obj.signature = base64FromBytes( message.signature !== undefined ? message.signature : new Uint8Array() @@ -507,18 +513,18 @@ export const MsgDeactivateDID = { fromPartial(object: DeepPartial): MsgDeactivateDID { const message = { ...baseMsgDeactivateDID } as MsgDeactivateDID; - if (object.DID !== undefined && object.DID !== null) { - message.DID = object.DID; + if (object.did !== undefined && object.did !== null) { + message.did = object.did; } else { - message.DID = ""; + message.did = ""; } if ( - object.verificationMethodID !== undefined && - object.verificationMethodID !== null + object.verificationMethodId !== undefined && + object.verificationMethodId !== null ) { - message.verificationMethodID = object.verificationMethodID; + message.verificationMethodId = object.verificationMethodId; } else { - message.verificationMethodID = ""; + message.verificationMethodId = ""; } if (object.signature !== undefined && object.signature !== null) { message.signature = object.signature; @@ -586,9 +592,13 @@ export const MsgDeactivateDIDResponse = { }, }; +/** Msg defines the Msg service. */ export interface Msg { + /** CreateDID defines a method for creating a DID. */ CreateDID(request: MsgCreateDID): Promise; + /** UpdateDID defines a method for updating a DID. */ UpdateDID(request: MsgUpdateDID): Promise; + /** DeactivateDID defines a method for deactivating a DID. */ DeactivateDID(request: MsgDeactivateDID): Promise; } diff --git a/src/proto/panacea/token/v2/genesis.ts b/src/proto/panacea/token/v2/genesis.ts index 6cc7eb2..921e067 100644 --- a/src/proto/panacea/token/v2/genesis.ts +++ b/src/proto/panacea/token/v2/genesis.ts @@ -7,7 +7,6 @@ export const protobufPackage = "panacea.token.v2"; /** GenesisState defines the token module's genesis state. */ export interface GenesisState { - /** this line is used by starport scaffolding # genesis/proto/state */ tokens: { [key: string]: Token }; } diff --git a/src/proto/panacea/token/v2/query.ts b/src/proto/panacea/token/v2/query.ts index 4a07195..0e3cfd3 100644 --- a/src/proto/panacea/token/v2/query.ts +++ b/src/proto/panacea/token/v2/query.ts @@ -9,29 +9,32 @@ import { export const protobufPackage = "panacea.token.v2"; -/** this line is used by starport scaffolding # 3 */ -export interface QueryGetTokenRequest { +/** QueryTokenRequest is the request type for the Query/Token RPC method. */ +export interface QueryTokenRequest { symbol: string; } -export interface QueryGetTokenResponse { - Token: Token | undefined; +/** QueryTokenResponse is the response type for the Query/Token RPC method. */ +export interface QueryTokenResponse { + token: Token | undefined; } -export interface QueryAllTokenRequest { +/** QueryTokensRequest is the request type for the Query/Tokens RPC method. */ +export interface QueryTokensRequest { pagination: PageRequest | undefined; } -export interface QueryAllTokenResponse { - Token: Token[]; +/** QueryTokensResponse is the response type for the Query/Tokens RPC method. */ +export interface QueryTokensResponse { + token: Token[]; pagination: PageResponse | undefined; } -const baseQueryGetTokenRequest: object = { symbol: "" }; +const baseQueryTokenRequest: object = { symbol: "" }; -export const QueryGetTokenRequest = { +export const QueryTokenRequest = { encode( - message: QueryGetTokenRequest, + message: QueryTokenRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.symbol !== "") { @@ -40,13 +43,10 @@ export const QueryGetTokenRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetTokenRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTokenRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTokenRequest } as QueryGetTokenRequest; + const message = { ...baseQueryTokenRequest } as QueryTokenRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -61,8 +61,8 @@ export const QueryGetTokenRequest = { return message; }, - fromJSON(object: any): QueryGetTokenRequest { - const message = { ...baseQueryGetTokenRequest } as QueryGetTokenRequest; + fromJSON(object: any): QueryTokenRequest { + const message = { ...baseQueryTokenRequest } as QueryTokenRequest; if (object.symbol !== undefined && object.symbol !== null) { message.symbol = String(object.symbol); } else { @@ -71,14 +71,14 @@ export const QueryGetTokenRequest = { return message; }, - toJSON(message: QueryGetTokenRequest): unknown { + toJSON(message: QueryTokenRequest): unknown { const obj: any = {}; message.symbol !== undefined && (obj.symbol = message.symbol); return obj; }, - fromPartial(object: DeepPartial): QueryGetTokenRequest { - const message = { ...baseQueryGetTokenRequest } as QueryGetTokenRequest; + fromPartial(object: DeepPartial): QueryTokenRequest { + const message = { ...baseQueryTokenRequest } as QueryTokenRequest; if (object.symbol !== undefined && object.symbol !== null) { message.symbol = object.symbol; } else { @@ -88,31 +88,28 @@ export const QueryGetTokenRequest = { }, }; -const baseQueryGetTokenResponse: object = {}; +const baseQueryTokenResponse: object = {}; -export const QueryGetTokenResponse = { +export const QueryTokenResponse = { encode( - message: QueryGetTokenResponse, + message: QueryTokenResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.Token !== undefined) { - Token.encode(message.Token, writer.uint32(10).fork()).ldelim(); + if (message.token !== undefined) { + Token.encode(message.token, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryGetTokenResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTokenResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryGetTokenResponse } as QueryGetTokenResponse; + const message = { ...baseQueryTokenResponse } as QueryTokenResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Token = Token.decode(reader, reader.uint32()); + message.token = Token.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -122,41 +119,39 @@ export const QueryGetTokenResponse = { return message; }, - fromJSON(object: any): QueryGetTokenResponse { - const message = { ...baseQueryGetTokenResponse } as QueryGetTokenResponse; - if (object.Token !== undefined && object.Token !== null) { - message.Token = Token.fromJSON(object.Token); + fromJSON(object: any): QueryTokenResponse { + const message = { ...baseQueryTokenResponse } as QueryTokenResponse; + if (object.token !== undefined && object.token !== null) { + message.token = Token.fromJSON(object.token); } else { - message.Token = undefined; + message.token = undefined; } return message; }, - toJSON(message: QueryGetTokenResponse): unknown { + toJSON(message: QueryTokenResponse): unknown { const obj: any = {}; - message.Token !== undefined && - (obj.Token = message.Token ? Token.toJSON(message.Token) : undefined); + message.token !== undefined && + (obj.token = message.token ? Token.toJSON(message.token) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): QueryGetTokenResponse { - const message = { ...baseQueryGetTokenResponse } as QueryGetTokenResponse; - if (object.Token !== undefined && object.Token !== null) { - message.Token = Token.fromPartial(object.Token); + fromPartial(object: DeepPartial): QueryTokenResponse { + const message = { ...baseQueryTokenResponse } as QueryTokenResponse; + if (object.token !== undefined && object.token !== null) { + message.token = Token.fromPartial(object.token); } else { - message.Token = undefined; + message.token = undefined; } return message; }, }; -const baseQueryAllTokenRequest: object = {}; +const baseQueryTokensRequest: object = {}; -export const QueryAllTokenRequest = { +export const QueryTokensRequest = { encode( - message: QueryAllTokenRequest, + message: QueryTokensRequest, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.pagination !== undefined) { @@ -165,13 +160,10 @@ export const QueryAllTokenRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAllTokenRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTokensRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllTokenRequest } as QueryAllTokenRequest; + const message = { ...baseQueryTokensRequest } as QueryTokensRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -186,8 +178,8 @@ export const QueryAllTokenRequest = { return message; }, - fromJSON(object: any): QueryAllTokenRequest { - const message = { ...baseQueryAllTokenRequest } as QueryAllTokenRequest; + fromJSON(object: any): QueryTokensRequest { + const message = { ...baseQueryTokensRequest } as QueryTokensRequest; if (object.pagination !== undefined && object.pagination !== null) { message.pagination = PageRequest.fromJSON(object.pagination); } else { @@ -196,7 +188,7 @@ export const QueryAllTokenRequest = { return message; }, - toJSON(message: QueryAllTokenRequest): unknown { + toJSON(message: QueryTokensRequest): unknown { const obj: any = {}; message.pagination !== undefined && (obj.pagination = message.pagination @@ -205,8 +197,8 @@ export const QueryAllTokenRequest = { return obj; }, - fromPartial(object: DeepPartial): QueryAllTokenRequest { - const message = { ...baseQueryAllTokenRequest } as QueryAllTokenRequest; + fromPartial(object: DeepPartial): QueryTokensRequest { + const message = { ...baseQueryTokensRequest } as QueryTokensRequest; if (object.pagination !== undefined && object.pagination !== null) { message.pagination = PageRequest.fromPartial(object.pagination); } else { @@ -216,14 +208,14 @@ export const QueryAllTokenRequest = { }, }; -const baseQueryAllTokenResponse: object = {}; +const baseQueryTokensResponse: object = {}; -export const QueryAllTokenResponse = { +export const QueryTokensResponse = { encode( - message: QueryAllTokenResponse, + message: QueryTokensResponse, writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - for (const v of message.Token) { + for (const v of message.token) { Token.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { @@ -235,19 +227,16 @@ export const QueryAllTokenResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAllTokenResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryTokensResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = { ...baseQueryAllTokenResponse } as QueryAllTokenResponse; - message.Token = []; + const message = { ...baseQueryTokensResponse } as QueryTokensResponse; + message.token = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.Token.push(Token.decode(reader, reader.uint32())); + message.token.push(Token.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -260,12 +249,12 @@ export const QueryAllTokenResponse = { return message; }, - fromJSON(object: any): QueryAllTokenResponse { - const message = { ...baseQueryAllTokenResponse } as QueryAllTokenResponse; - message.Token = []; - if (object.Token !== undefined && object.Token !== null) { - for (const e of object.Token) { - message.Token.push(Token.fromJSON(e)); + fromJSON(object: any): QueryTokensResponse { + const message = { ...baseQueryTokensResponse } as QueryTokensResponse; + message.token = []; + if (object.token !== undefined && object.token !== null) { + for (const e of object.token) { + message.token.push(Token.fromJSON(e)); } } if (object.pagination !== undefined && object.pagination !== null) { @@ -276,12 +265,12 @@ export const QueryAllTokenResponse = { return message; }, - toJSON(message: QueryAllTokenResponse): unknown { + toJSON(message: QueryTokensResponse): unknown { const obj: any = {}; - if (message.Token) { - obj.Token = message.Token.map((e) => (e ? Token.toJSON(e) : undefined)); + if (message.token) { + obj.token = message.token.map((e) => (e ? Token.toJSON(e) : undefined)); } else { - obj.Token = []; + obj.token = []; } message.pagination !== undefined && (obj.pagination = message.pagination @@ -290,14 +279,12 @@ export const QueryAllTokenResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): QueryAllTokenResponse { - const message = { ...baseQueryAllTokenResponse } as QueryAllTokenResponse; - message.Token = []; - if (object.Token !== undefined && object.Token !== null) { - for (const e of object.Token) { - message.Token.push(Token.fromPartial(e)); + fromPartial(object: DeepPartial): QueryTokensResponse { + const message = { ...baseQueryTokensResponse } as QueryTokensResponse; + message.token = []; + if (object.token !== undefined && object.token !== null) { + for (const e of object.token) { + message.token.push(Token.fromPartial(e)); } } if (object.pagination !== undefined && object.pagination !== null) { @@ -311,9 +298,10 @@ export const QueryAllTokenResponse = { /** Query defines the gRPC querier service. */ export interface Query { - /** this line is used by starport scaffolding # 2 */ - Token(request: QueryGetTokenRequest): Promise; - TokenAll(request: QueryAllTokenRequest): Promise; + /** Token returns token details. */ + Token(request: QueryTokenRequest): Promise; + /** Tokens returns details of all tokens. */ + Tokens(request: QueryTokensRequest): Promise; } export class QueryClientImpl implements Query { @@ -321,25 +309,21 @@ export class QueryClientImpl implements Query { constructor(rpc: Rpc) { this.rpc = rpc; this.Token = this.Token.bind(this); - this.TokenAll = this.TokenAll.bind(this); + this.Tokens = this.Tokens.bind(this); } - Token(request: QueryGetTokenRequest): Promise { - const data = QueryGetTokenRequest.encode(request).finish(); + Token(request: QueryTokenRequest): Promise { + const data = QueryTokenRequest.encode(request).finish(); const promise = this.rpc.request("panacea.token.v2.Query", "Token", data); return promise.then((data) => - QueryGetTokenResponse.decode(new _m0.Reader(data)) + QueryTokenResponse.decode(new _m0.Reader(data)) ); } - TokenAll(request: QueryAllTokenRequest): Promise { - const data = QueryAllTokenRequest.encode(request).finish(); - const promise = this.rpc.request( - "panacea.token.v2.Query", - "TokenAll", - data - ); + Tokens(request: QueryTokensRequest): Promise { + const data = QueryTokensRequest.encode(request).finish(); + const promise = this.rpc.request("panacea.token.v2.Query", "Tokens", data); return promise.then((data) => - QueryAllTokenResponse.decode(new _m0.Reader(data)) + QueryTokensResponse.decode(new _m0.Reader(data)) ); } } diff --git a/src/proto/panacea/token/v2/token.ts b/src/proto/panacea/token/v2/token.ts index fca6781..d0e7e87 100644 --- a/src/proto/panacea/token/v2/token.ts +++ b/src/proto/panacea/token/v2/token.ts @@ -5,6 +5,7 @@ import { Coin } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "panacea.token.v2"; +/** Token defines a token. */ export interface Token { name: string; symbol: string; diff --git a/src/proto/panacea/token/v2/tx.ts b/src/proto/panacea/token/v2/tx.ts index bb7448f..0250cac 100644 --- a/src/proto/panacea/token/v2/tx.ts +++ b/src/proto/panacea/token/v2/tx.ts @@ -5,7 +5,7 @@ import { IntProto } from "../../../cosmos/base/v1beta1/coin"; export const protobufPackage = "panacea.token.v2"; -/** this line is used by starport scaffolding # proto/tx/message */ +/** MsgIssueToken defines the Msg/IssueToken request type. */ export interface MsgIssueToken { name: string; shortSymbol: string; @@ -14,6 +14,7 @@ export interface MsgIssueToken { ownerAddress: string; } +/** MsgIssueTokenResponse defines the Msg/IssueToken response type. */ export interface MsgIssueTokenResponse {} const baseMsgIssueToken: object = { @@ -207,7 +208,7 @@ export const MsgIssueTokenResponse = { /** Msg defines the Msg service. */ export interface Msg { - /** this line is used by starport scaffolding # proto/tx/rpc */ + /** IssueToken defines a method for issuing a token. */ IssueToken(request: MsgIssueToken): Promise; }